_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 |
|---|---|---|---|---|---|---|---|---|
4b0b940aef4172559b4d6a33068c2623ba0fbb044ae4be3b1ee93de5317c5095 | typelead/etlas | CmdClean.hs | # LANGUAGE RecordWildCards #
module Distribution.Client.CmdClean (cleanCommand, cleanAction) where
import Prelude ()
import Distribution.Client.Compat.Prelude
import Distribution.Client.DistDirLayout
( DistDirLayout(..), defaultDistDirLayout )
import Distribution.Client.ProjectConfig
( findProjectRoot )
impor... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/CmdClean.hs | haskell | # LANGUAGE RecordWildCards #
module Distribution.Client.CmdClean (cleanCommand, cleanAction) where
import Prelude ()
import Distribution.Client.Compat.Prelude
import Distribution.Client.DistDirLayout
( DistDirLayout(..), defaultDistDirLayout )
import Distribution.Client.ProjectConfig
( findProjectRoot )
impor... | |
4fffff869d2d5b6b881b957297f1a9eda97b8d10a8dfd2abaa9031bda4645b29 | input-output-hk/cardano-sl | Constants.hs | {-| Constants used by algorithm. See paper for more details.
-}
module Pos.Constants
(
module Pos.Core.Constants
, module Pos.Chain.Genesis
, module Pos.Chain.Update
) where
-- Reexports
import Pos.Chain.Genesis
import Pos.Chain.Update
import Pos.Core... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Constants.hs | haskell | | Constants used by algorithm. See paper for more details.
Reexports |
module Pos.Constants
(
module Pos.Core.Constants
, module Pos.Chain.Genesis
, module Pos.Chain.Update
) where
import Pos.Chain.Genesis
import Pos.Chain.Update
import Pos.Core.Constants
|
1a260387ce89c5e072651d193e35b756ea02d328e59ddd5607c0a6db34bde65a | noinia/hgeometry | Extremes.hs | --------------------------------------------------------------------------------
-- |
Module : Geometry . Polygon . Extremes
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
-- Finding the Extremal vertex of a polygon in a given direction.
--
--------------------------... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/Polygon/Extremes.hs | haskell | ------------------------------------------------------------------------------
|
License : see the LICENSE file
Finding the Extremal vertex of a polygon in a given direction.
------------------------------------------------------------------------------
--------------------------------------------------------... | Module : Geometry . Polygon . Extremes
Copyright : ( C )
Maintainer :
module Geometry.Polygon.Extremes( cmpExtreme
, extremesLinear
) where
import Control.Lens hiding (Simple,simple)
import Data.Ext... |
3a82200a756a0ce4bc62c0fa115c619b2794170c1b127b8b7c2527529e536390 | w3ntao/sicp-solution | 2-26.rkt | #lang racket
(define x (list 1 2 3 4))
(define y (list 4 5 6))
(append x y)
(cons x y)
(list x y) | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-2/2-26.rkt | racket | #lang racket
(define x (list 1 2 3 4))
(define y (list 4 5 6))
(append x y)
(cons x y)
(list x y) | |
313291bdbfb1347480ededb01cb43ab04b3ead911860d7d38ddf02bb26040f10 | tbsklg/advent-of-code-2022 | Day3.hs | module Day3 where
import Data.List ( elemIndex, intersect )
import Data.List.Split (divvy)
type Rucksacks = [String]
type Rucksack = String
type Items = String
type Item = Char
type Compartment = (Items, Items)
type Priorities = String
type Priority = Int
solve :: Rucksacks -> Int
solve = sum . map ((priorityOfA . it... | null | https://raw.githubusercontent.com/tbsklg/advent-of-code-2022/2e47251625f4fbfaf6a5b91856257219296c03c2/src/Day3.hs | haskell | module Day3 where
import Data.List ( elemIndex, intersect )
import Data.List.Split (divvy)
type Rucksacks = [String]
type Rucksack = String
type Items = String
type Item = Char
type Compartment = (Items, Items)
type Priorities = String
type Priority = Int
solve :: Rucksacks -> Int
solve = sum . map ((priorityOfA . it... | |
31f99f9b56c6c8b1b9e473530b0d0489ff6e7f5761ea489a043ff7019b5f7e2e | bsaleil/lc | mbrot.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->f64vector lst))
(def-macro (FLOATvector? x) `(f64vector? ,x))
(def-macro (FLOATvector... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/mbrot.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->f64vector lst))
(def-macro (FLOATvector? x) `(f64vector? ,x))
(def-macro (FLOATvector . lst) `(f64vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make... |
9c298567534afca797df371d876d473aa009b7d6ca548c7fdaf40afe3a531467 | SaswatPadhi/LoopInvGen | Process.ml | open Core
open LoopInvGen
let command =
let open Command.Let_syntax in
Command.basic
~summary: "Check, simplify, and optimize a SyGuS-INV problem."
[%map_open
let z3_path = flag "z3-path" (required string)
~doc:"FILENAME path to the z3 executable"
and out_path ... | null | https://raw.githubusercontent.com/SaswatPadhi/LoopInvGen/6ac90265b11431c9477dfbd33e3e3380234c0499/bin/Process.ml | ocaml | open Core
open LoopInvGen
let command =
let open Command.Let_syntax in
Command.basic
~summary: "Check, simplify, and optimize a SyGuS-INV problem."
[%map_open
let z3_path = flag "z3-path" (required string)
~doc:"FILENAME path to the z3 executable"
and out_path ... | |
26bc0a25280c4923657f6400b8160c3cac2febcef8d4f59e022016b3c28ec341 | marijnh/Postmodern | transaction.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN ; -*-
(in-package :postmodern)
(defparameter *current-logical-transaction* nil
"This is bound to the current transaction-handle or savepoint-handle instance
representing the innermost open logical transaction.")
(defgeneric abort-h... | null | https://raw.githubusercontent.com/marijnh/Postmodern/a4a13ec20a6f4419fa914ba3dac42c0e8bc3a755/postmodern/transaction.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN ; -*- | (in-package :postmodern)
(defparameter *current-logical-transaction* nil
"This is bound to the current transaction-handle or savepoint-handle instance
representing the innermost open logical transaction.")
(defgeneric abort-hooks (obj)
(:documentation "An accessor for the transaction or savepoint's list of abort
... |
e2e3a5a1f897be8f1087c755085af948f331815417425f5c1ac6753f8ad015d1 | deadeyejoe/fabrikk | core.cljc | (ns fabrikk.directives.core
(:require [fabrikk.build-context.interface :as context]
[fabrikk.directive-core.interface :as core]
[fabrikk.directory.interface :as directory]
[fabrikk.entity.interface :as entity]
[fabrikk.execution.interface :as execution]
[fab... | null | https://raw.githubusercontent.com/deadeyejoe/fabrikk/c731cd435baaf241450a9b280286b894c8cee81c/components/directives/src/fabrikk/directives/core.cljc | clojure | =========== CONSTANT ===========
=========== SEQUENCE ===========
=========== BUILD ===========
=========== BUILD LIST ===========
=========== DERIVE =========== | (ns fabrikk.directives.core
(:require [fabrikk.build-context.interface :as context]
[fabrikk.directive-core.interface :as core]
[fabrikk.directory.interface :as directory]
[fabrikk.entity.interface :as entity]
[fabrikk.execution.interface :as execution]
[fab... |
91b252f0b4989d7f85a48a9b6c76f4743b144e7a1f8c5ccb5d3fc374bc96f3ea | jaydchan/tawny-karyotype | random.clj | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2012 - 2015 , Newcastle University
;; 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 versio... | null | https://raw.githubusercontent.com/jaydchan/tawny-karyotype/3a875e5ef7de9372aee70d9e6cc8c22fc5187544/src/ncl/karyotype/random.clj | clojure | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public Li... | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2012 - 2015 , Newcastle University
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 G... |
4393208e3abd83a558b38dc0db981350dcc368466eb19db98a7ec3885f20f042 | haskell-graphql/graphql-api | SchemaSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module SchemaSpec (spec) where
import Protolude hiding (Down, Enum)
import Test.Hspec
import GraphQL.API
( Field
, Enum
, List
, getAnnotatedInputType
, getDefinition
)
import qualified GraphQL.Internal.Syntax.AST as AST
import GraphQL.Internal.API
( ge... | null | https://raw.githubusercontent.com/haskell-graphql/graphql-api/8ced344485cd638cee50eeb6b653baecea359406/tests/SchemaSpec.hs | haskell | todo: add all the others (union type, ..?) | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module SchemaSpec (spec) where
import Protolude hiding (Down, Enum)
import Test.Hspec
import GraphQL.API
( Field
, Enum
, List
, getAnnotatedInputType
, getDefinition
)
import qualified GraphQL.Internal.Syntax.AST as AST
import GraphQL.Internal.API
( ge... |
f29896b58e2acc6aa6f9c800d240a62af170ab47c67cc5c06ecc6031c17ec278 | cubicle-model-checker/cubicle | z3wrapper_actual.ml | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/smt/z3wrapper_actual.ml | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2014
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
924a7f3fa37b3eef2f13214c0236eff8a74384fa9c187b4763b2a3f24b975f29 | BranchTaken/Hemlock | test_hash_fold_u128.ml | open! Basis.Rudiments
open! Basis
open Hash
let u128_of_tup = RudimentsInt0.u128_of_tup
let test () =
let hash_fold u128s t = begin
State.Gen.init t
|> State.Gen.fold_u128 Stdlib.(Int64.of_int (Array.length u128s)) ~f:(fun i ->
Stdlib.(Array.get u128s Int64.(to_int i))
)
|> State.Gen.fini
en... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/hash/test_hash_fold_u128.ml | ocaml | open! Basis.Rudiments
open! Basis
open Hash
let u128_of_tup = RudimentsInt0.u128_of_tup
let test () =
let hash_fold u128s t = begin
State.Gen.init t
|> State.Gen.fold_u128 Stdlib.(Int64.of_int (Array.length u128s)) ~f:(fun i ->
Stdlib.(Array.get u128s Int64.(to_int i))
)
|> State.Gen.fini
en... | |
f14eb67270c6ef09cb28cdd24e410cf106cdb7df7bcccf0d7c0c8f7f3a40b6e5 | footprintanalytics/footprint-web | stats_test.clj | (ns metabase.analytics.stats-test
(:require [clojure.test :refer :all]
[metabase.analytics.stats :as stats :refer [anonymous-usage-stats]]
[metabase.email :as email]
[metabase.integrations.slack :as slack]
[metabase.models.card :refer [Card]]
[metabase.model... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/analytics/stats_test.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------+
alert_condition character varying(254), -- Condition (i.e. "rows" or "goal") used as a... | (ns metabase.analytics.stats-test
(:require [clojure.test :refer :all]
[metabase.analytics.stats :as stats :refer [anonymous-usage-stats]]
[metabase.email :as email]
[metabase.integrations.slack :as slack]
[metabase.models.card :refer [Card]]
[metabase.model... |
fbe6a151a0d7836ced576ed7a3d96164f414fb232e55bd77005d1daf90fa4e17 | Apress/beg-haskell | Par.hs | module Main where
import Control.Monad.Par
import System.Environment
import Control.DeepSeq
import Chapter8.APriori.Par
import Chapter8.APriori.Par2
main :: IO ()
main = do n <- fmap (read . head) getArgs
print $ findTwoFactors n (n + 1)
-- Version 1 : no parallelism
findTwoFactors : : Integer - > In... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter8/src/Par.hs | haskell | Version 1 : no parallelism
Version 1: no parallelism
factorsY <- get factorsYVar | module Main where
import Control.Monad.Par
import System.Environment
import Control.DeepSeq
import Chapter8.APriori.Par
import Chapter8.APriori.Par2
main :: IO ()
main = do n <- fmap (read . head) getArgs
print $ findTwoFactors n (n + 1)
findTwoFactors : : Integer - > Integer - > ( [ Integer],[Integer ... |
930d0378bfb99d9ce5d99cf39c5b9f156799aa9786e693b4eb8664634cefecfb | portkey-cloud/aws-clj-sdk | _2017-08-22.clj | (ns portkey.aws.acm-pca.-2017-08-22 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "acm-pca", :region "ap-northeast-1"},
:ssl-common-name "acm-pca.ap-northeast-1.amazonaws.com",
:endpoint "-pca.ap-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-wes... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/acm_pca/_2017-08-22.clj | clojure | (ns portkey.aws.acm-pca.-2017-08-22 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "acm-pca", :region "ap-northeast-1"},
:ssl-common-name "acm-pca.ap-northeast-1.amazonaws.com",
:endpoint "-pca.ap-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-wes... | |
f27b203ff92ba8629d3896a48ef412e3a32d1ccc72177aa35f4d11941619606f | pascal-knodel/haskell-craft | E'6'22.hs | --
--
--
-----------------
Exercise 6.22 .
-----------------
--
--
--
module E'6'22 where
import Pictures
(
Picture
, beside
, above
, flipV
, flipH
, rotate
, horse
)
import Data.List ( intercalate )
type Picture'S = String
horse'S :: Picture'S
horse'S = (intercalate "\n" horse) ++ "\n"
deli... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'6'22.hs | haskell |
---------------
---------------
Naive split.
-0.1.1/docs/Data-List-Split.html
splitOn
flipV --
---------
flipH --
---------
rotate --
----------
invertColour --
----------------
height --
----------
width --
---------
above --
---------
beside --
----------
---------------- | Exercise 6.22 .
module E'6'22 where
import Pictures
(
Picture
, beside
, above
, flipV
, flipH
, rotate
, horse
)
import Data.List ( intercalate )
type Picture'S = String
horse'S :: Picture'S
horse'S = (intercalate "\n" horse) ++ "\n"
delimiterPos :: String -> Char -> [Int]
delimiterPos [] ... |
861cbd9d1fc876ad6c5d8e6e3dcf19a8aa0949ed4b90f68fcd983da59a351a28 | binaryage/cljs-oops | runner.clj | (ns oops.runner
(:require [environ.core :refer [env]]))
(defmacro ansi-enabled? []
(not (:oops-disable-test-runner-ansi env)))
(defmacro emit-clojure-version []
(clojure-version))
| null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/runner/oops/runner.clj | clojure | (ns oops.runner
(:require [environ.core :refer [env]]))
(defmacro ansi-enabled? []
(not (:oops-disable-test-runner-ansi env)))
(defmacro emit-clojure-version []
(clojure-version))
| |
89a5838e3530192baacabfccf1b22c4b7a3e449124c89b1f03b700be1212675e | apache/couchdb-rebar | neotoma_parse.erl | -module(neotoma_parse).
-export([parse/1,file/1]).
-define(p_anything,true).
-define(p_charclass,true).
-define(p_choose,true).
-define(p_label,true).
-define(p_not,true).
-define(p_one_or_more,true).
-define(p_optional,true).
-define(p_scan,true).
-define(p_seq,true).
-define(p_string,true).
-define(p_zero_or_more,tru... | null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/neotoma1/mock/neotoma/src/neotoma_parse.erl | erlang | insert escapes into a string
" comment inserted to help some editors with highlighting the generated parser
' comment inserted to help some editors with highlighting the generated parser
\ -> \\
" -> \"
See if the current reduction is memoized
Memo; % If it is, return the stored result
If n... | -module(neotoma_parse).
-export([parse/1,file/1]).
-define(p_anything,true).
-define(p_charclass,true).
-define(p_choose,true).
-define(p_label,true).
-define(p_not,true).
-define(p_one_or_more,true).
-define(p_optional,true).
-define(p_scan,true).
-define(p_seq,true).
-define(p_string,true).
-define(p_zero_or_more,tru... |
298892a43a3c96cea95ad77e1af0877bf01cf8793a6fbda7488ab3d484b8ddb4 | bitemyapp/bloodhound | BulkAPI.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Test.BulkAPI (spec) where
import qualified Data.Aeson.KeyMap as X
import qualified Data.Vector as V
import qualified Lens.Micro.Aeson as LMA
import Test.Common
import Test.Import
newtype BulkTest
= BulkTest Text
deriving (Eq, Show)
instance ToJSON BulkT... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/7402e66455adebaa2b2fd9ae1e8c60bb4b48505c/tests/Test/BulkAPI.hs | haskell | # LANGUAGE OverloadedStrings #
Upserting in a to a fresh index should insert
Upserting existing documents should update
then upsert with the script
Without "script_upsert" flag new documents are simply inserted and are not handled by the script
Without "script_upsert" flag new documents are simply inserted and are... | # LANGUAGE CPP #
module Test.BulkAPI (spec) where
import qualified Data.Aeson.KeyMap as X
import qualified Data.Vector as V
import qualified Lens.Micro.Aeson as LMA
import Test.Common
import Test.Import
newtype BulkTest
= BulkTest Text
deriving (Eq, Show)
instance ToJSON BulkTest where
toJSON (BulkTest name')... |
c69243a312cc22a8082d55e7d04b5f6137ab3979a4049f0a33775fdee4cfb832 | spurious/sagittarius-scheme-mirror | types.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; rfc/ssh/types.scm - SSH2 protocol types.
;;;
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:
;;;
;;; ... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/ssh/types.scm | scheme | coding : utf-8 ; -*-
rfc/ssh/types.scm - SSH2 protocol types.
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... | 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
#!read-macro=sagittarius/regex
(library (rfc... |
64410495702663e924e7583ee8861f7b4e6922c244cc0862fba88e8ee9ffbeea | xebia/VisualReview | screenshot.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Copyright 2015 Xebia B.V.
;
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/xebia/VisualReview/c74c18ff73cbf11ece23203cb7a7768e626a03e2/src/main/clojure/com/xebia/visualreview/service/screenshot.clj | clojure |
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 the specific language governing permis... | Copyright 2015 Xebia B.V.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.xebia.visualreview.service.screenshot
(:require [com.xebia.visualreview.service.image :as image]
[com.xebia.visualreview.service... |
d8e967fdbb4dd05e876d8f757b5df1eac806b2952760e88b86c3d056111a447c | Liqwid-Labs/agora | Utils.hs | module Property.Utils (props) where
import Agora.Utils (phashDatum)
import Generics.SOP (NP (Nil, (:*)))
import Plutarch.Api.V2 (datumHash)
import Plutarch.Test.QuickCheck (
Equality (OnPEq),
Partiality (ByComplete),
TestableTerm (TestableTerm),
arbitraryPLift,
haskEquiv,
)
import Plutarch.Test.QuickCheck.I... | null | https://raw.githubusercontent.com/Liqwid-Labs/agora/6827855c70a53e331a2c17993d76a7bf0c969825/agora-specs/Property/Utils.hs | haskell | module Property.Utils (props) where
import Agora.Utils (phashDatum)
import Generics.SOP (NP (Nil, (:*)))
import Plutarch.Api.V2 (datumHash)
import Plutarch.Test.QuickCheck (
Equality (OnPEq),
Partiality (ByComplete),
TestableTerm (TestableTerm),
arbitraryPLift,
haskEquiv,
)
import Plutarch.Test.QuickCheck.I... | |
5cacd7c042d3cf372740857a1f078cb5e2018c9b88c76f4fb4d4dbfcc977dd6c | fimad/scalpel | Serial.hs | # LANGUAGE TupleSections #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
{-# OPTIONS_HADDOCK hide #-}
module Text.HTML.Scalpel.Internal.Seria... | null | https://raw.githubusercontent.com/fimad/scalpel/bd42bdfe48eccfdc1544dcc9dad26bbc66c2854a/scalpel-core/src/Text/HTML/Scalpel/Internal/Serial.hs | haskell | # OPTIONS_HADDOCK hide #
| Serial scrapers operate on a zipper of tag specs that correspond to the
root nodes / siblings in a document.
Access to the zipper is always performed in a move-then-read manner. For this
reason it is valid for the current focus of the zipper to be just off either
end of list such that m... | # LANGUAGE TupleSections #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
module Text.HTML.Scalpel.Internal.Serial (
SerialScraper
, Ser... |
e5ad67b5e6af2f358854f484e5e3b18b9f4d50f479e143cdb271b44fa1a98717 | clojure-interop/java-jdk | TargetedNotification.clj | (ns javax.management.remote.TargetedNotification
"A (Notification, Listener ID) pair.
This class is used to associate an emitted notification
with the listener ID to which it is targeted."
(:refer-clojure :only [require comment defn ->])
(:import [javax.management.remote TargetedNotification]))
(defn ->ta... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.management/src/javax/management/remote/TargetedNotification.clj | clojure | (ns javax.management.remote.TargetedNotification
"A (Notification, Listener ID) pair.
This class is used to associate an emitted notification
with the listener ID to which it is targeted."
(:refer-clojure :only [require comment defn ->])
(:import [javax.management.remote TargetedNotification]))
(defn ->ta... | |
b5d86fdb135bd26f1d065dfe1cf63e428ca3c86c39283b99f6b155a854d7d2be | haskell-suite/base | Foreign.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
Module :
Copyright : ( c ) The University of Glasgow , 2008 - 2011
-- License : see libraries/base/LICENSE
--
-- Maintainer :
-- Stability : int... | null | https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/GHC/Foreign.hs | haskell | ---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Portability : non-portable
---------------------------------------------------------------------------
* C strings with a configurable encoding
I... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Module :
Copyright : ( c ) The University of Glasgow , 2008 - 2011
Foreign marshalling support for with configurable encodings
module GHC.Foreign (
conversion of C strings into strings
peekCString,
peekCStringLen,
... |
dd76cb8aee637d11aef0913c57b5c70a6562652b0c3eaba484d8b15e231dc5e1 | tek/polysemy-hasql | StatementTest.hs | module Polysemy.Hasql.Test.StatementTest where
import Exon (exon)
import Polysemy.Db.Data.Cond (LessOrEq)
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.Rep (Auto, Flatten, IdQuery, Prim, PrimQuery, PrimaryKey, Product, Sum, UidRep, Unique)
import Polysemy.Db.Data.Uid (Uid)
import quali... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/e1ed71cacf6f329ee1428c3012d582c9eb6cf497/packages/hasql/test/Polysemy/Hasql/Test/StatementTest.hs | haskell | module Polysemy.Hasql.Test.StatementTest where
import Exon (exon)
import Polysemy.Db.Data.Cond (LessOrEq)
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.Rep (Auto, Flatten, IdQuery, Prim, PrimQuery, PrimaryKey, Product, Sum, UidRep, Unique)
import Polysemy.Db.Data.Uid (Uid)
import quali... | |
1f1d9033229b76c97f03ed5f1a4d3d5b011a9b625aaa8561ea8bab86064c8c89 | thomaseding/hearthshroud | HeroPowerName.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
module Hearth.Model.Authoring.HeroPowerName (
HeroPowerName(..),
showHeroPowerName,
) where
--------------------------------------------------------------------------------
import Data.Data
impor... | null | https://raw.githubusercontent.com/thomaseding/hearthshroud/b21e2f69f394c94a106a3b57b95aa1a76b8d4003/src/Hearth/Model/Authoring/HeroPowerName.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
module Hearth.Model.Authoring.HeroPowerName (
HeroPowerName(..),
showHeroPowerName,
) where
import Data.Data
import Data.Namespace
import Hearth.Authored.HeroPower.Basic.Names
import Text.LambdaOptions.Parseable
import Text.Read (readMaybe)
data Hero... |
0d3b8478a9218d69252daaf560e4806cb8ab967e5787a8a457378d04f9ccaa4c | yuce/bert.erl | bert.erl | -module(bert).
-version('0.1.0').
-author("Yuce Tekol").
%% API exports
-export([encode/1,
decode/1]).
%%====================================================================
%% API functions
%%====================================================================
%%@doc Encode Erlang term to a binary data.
... | null | https://raw.githubusercontent.com/yuce/bert.erl/24328b0490551c6f009dac3ac1c1c08cea4c142e/src/bert.erl | erlang | API exports
====================================================================
API functions
====================================================================
@doc Encode Erlang term to a binary data.
====================================================================
===========================================... | -module(bert).
-version('0.1.0').
-author("Yuce Tekol").
-export([encode/1,
decode/1]).
-spec encode(term()) -> binary().
encode(Term) ->
term_to_binary(encode_term(Term)).
@doc Decode a binary data to Erlang term .
-spec decode(binary()) -> term().
decode(Bin) ->
decode_term(binary_to_term(Bin)... |
fe654fe93cf23f4a12c6779bf8dc9c5fed527d527252986e485671aa3bc60d80 | wdebeaum/step | yell.lisp | ;;;;
;;;; W::yell
;;;;
(define-words :pos W::v
:words (
(W::yell
(wordfeats (W::morph (:forms (-vb) :past W::yelled :ing w::yelling)))
(SENSES
((LF-PARENT ONT::manner-say)
(meta-data :origin step :entry-date 20080711 :change-date nil :comments nil)
(example "He yelled that three teams are goin... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/yell.lisp | lisp |
W::yell
((LF-PARENT ONT::NONVERBAL-EXPRESSION)
(example "he yelled")
(SEM (F::Aspect F::bounded) (F::Time-span F::extended))
(TEMPL AGENT-TEMPL)
) |
(define-words :pos W::v
:words (
(W::yell
(wordfeats (W::morph (:forms (-vb) :past W::yelled :ing w::yelling)))
(SENSES
((LF-PARENT ONT::manner-say)
(meta-data :origin step :entry-date 20080711 :change-date nil :comments nil)
(example "He yelled that three teams are going to Delta")
(SEM ... |
4abc06832a0cd48ebb92ae1852d46a8f6e5e8c9b4710c4609c17c69630cf5899 | AndrasKovacs/ELTE-func-lang | Notes05.hs |
import Control.Monad
Admin : első házit kiírom ma / holnap ( 4 pont ) ( téma : State monad )
State , Applicative
--------------------------------------------------------------------------------
newtype State s a = State {runState :: s -> (a, s)}
-- Szimpla függőség: a -> b (b függ a-tól)
Állapot - ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-2/ea/Notes05.hs | haskell | ------------------------------------------------------------------------------
Szimpla függőség: a -> b (b függ a-tól)
s -> (a, s)
------------------------------------------------------------------------------
label (Node (Node (Leaf True) (Leaf False)) (Node (Leaf True) (Leaf False)))
==... |
import Control.Monad
Admin : első házit kiírom ma / holnap ( 4 pont ) ( téma : State monad )
State , Applicative
newtype State s a = State {runState :: s -> (a, s)}
Állapot - függőség : s - > ( a , s ) ( a függ s - től mint állapottól )
input state - > ( , output state )
runState : :... |
46f7dd2ec1a1c16a9eff7e2b4898914953726d200bade7d9bcfefc36db51e3a4 | typelead/etlas | Types.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
-- | Types used while planning how to build everything in a project.
--
-- Primarily this is the 'ElaboratedInstallPlan'.
--
module Distribution.Client.ProjectPlanning.Types (
SolverInstallPlan,
* Elaborated install plan ty... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/ProjectPlanning/Types.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Types used while planning how to build everything in a project.
Primarily this is the 'ElaboratedInstallPlan'.
* Build targets
* Setup script
| The combination of an elaborated install plan plus a
to execute the plan without having to make further policy decisions.
It does no... | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
module Distribution.Client.ProjectPlanning.Types (
SolverInstallPlan,
* Elaborated install plan types
ElaboratedInstallPlan,
ElaboratedConfiguredPackage(..),
elabDistDirParams,
elabExeDependencyPaths,
elabLibDependencies,
elabOrderLib... |
97f1eed09ed4a317b3755a656fea26b875f2e03fd77cf3f7af936662ad55b84d | openvstorage/alba | fsutil.ml |
Copyright ( c ) 2013 ,
Permission to use , copy , modify , and/or distribute this software for
any purpose with or without fee is hereby granted , provided that the
above copyright notice and this permission notice appear in all
copies .
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL
... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/tools/fsutil.ml | ocaml | we started from:
-statvfs/blob/master/lib/statvfs.ml
and modified & added stuff
|
Copyright ( c ) 2013 ,
Permission to use , copy , modify , and/or distribute this software for
any purpose with or without fee is hereby granted , provided that the
above copyright notice and this permission notice appear in all
copies .
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL
... |
1b9e2240ce6e994911e16fe04b0d4678e764dc6b6aed41ee7f549f6250be003e | commercialhaskell/pantry | CabalSpec.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Pantry.CabalSpec (spec) where
import Test.Hspec
import Pantry
import qualified Pantry.SHA256 as SHA256
import RIO
import Distribution.Types.PackageName (mkPackageName)
import Distribution.Types.Version (mkVersion)
spec :: Spec
spec = describe "w... | null | https://raw.githubusercontent.com/commercialhaskell/pantry/c7923fc963e36efd179ba301ac426139a9dc182d/test/Pantry/CabalSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Pantry.CabalSpec (spec) where
import Test.Hspec
import Pantry
import qualified Pantry.SHA256 as SHA256
import RIO
import Distribution.Types.PackageName (mkPackageName)
import Distribution.Types.Version (mkVersion)
spec :: Spec
spec = describe "wrong cabal file" $ do
let test ::... |
ddd3ecbcd5a98c7da983852bc0f658a13f62068db690df0619b711cef8ef83c7 | scslab/hails | Views.hs | {-# LANGUAGE OverloadedStrings #-}
module HailsRock.Views where
import Prelude hiding (div, span, head, id)
import Data.Maybe (isJust, fromJust)
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.Text as T
import Text.Blaze.Html5 hiding (Tag, map)
import Text.Blaze.Html5.Attributes hiding ( la... | null | https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/examples/hails-rock/HailsRock/Views.hs | haskell | # LANGUAGE OverloadedStrings #
Get all the games for which the current user is not the creator;
|
module HailsRock.Views where
import Prelude hiding (div, span, head, id)
import Data.Maybe (isJust, fromJust)
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.Text as T
import Text.Blaze.Html5 hiding (Tag, map)
import Text.Blaze.Html5.Attributes hiding ( label, form, span
... |
de96dfdd9e3e15b735619a887304a35ecd79c85df5572c64ca52091fa107842b | erlang/corba | c_client_erl_server_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2016 . All Rights Reserved .
%%
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 by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/test/c_client_erl_server_SUITE.erl | erlang |
%CopyrightBegin%
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 the specific l... | Copyright Ericsson AB 2001 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(c_client_erl_server_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([init_per_testcase/2, end... |
5032f71487086dd01b5e25377af423e5dcc1d5feff9d00fdec01f9d3dc750c2d | haskell-jp/makeMistakesToLearnHaskell | Ex02_5.hs | {-# OPTIONS_GHC -Wno-unused-imports #-}
module Education.MakeMistakesToLearnHaskell.Exercise.Ex02_5
( exercise2_5
) where
#include <imports/external.hs>
import Education.MakeMistakesToLearnHaskell.Exercise.Core
import Education.MakeMistakesToLearnHaskell.Exercise.Types
exercise2_5 :: Exercise
exercise2_5 = Exer... | null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/src/Education/MakeMistakesToLearnHaskell/Exercise/Ex02_5.hs | haskell | # OPTIONS_GHC -Wno-unused-imports # |
module Education.MakeMistakesToLearnHaskell.Exercise.Ex02_5
( exercise2_5
) where
#include <imports/external.hs>
import Education.MakeMistakesToLearnHaskell.Exercise.Core
import Education.MakeMistakesToLearnHaskell.Exercise.Types
exercise2_5 :: Exercise
exercise2_5 = Exercise "2.5" noVeirificationExercise
|
5a3838d7db35843852c0f7a16a37a16bfbf5171d44605eb5ddc33f6b9cf9a087 | ucsd-progsys/dsolve | matmult.ml | module Big = Bigarray.Array2
let sub2 data i j =
Big.get data i j
let update2 data i j x =
Big.set data i j x
let fillar arr2 fill =
let d1 = Big.dim1 arr2 in
let d2 = Big.dim2 arr2 in
let rec loop i =
let i' = i + 1 in
if i < d1
then
let rec loopi j =
let j' = j + 1 ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/PLDI2008/matmult.ml | ocaml | module Big = Bigarray.Array2
let sub2 data i j =
Big.get data i j
let update2 data i j x =
Big.set data i j x
let fillar arr2 fill =
let d1 = Big.dim1 arr2 in
let d2 = Big.dim2 arr2 in
let rec loop i =
let i' = i + 1 in
if i < d1
then
let rec loopi j =
let j' = j + 1 ... | |
9d5889879c6011aa2856a71f9cae7932e66b951b330bc5fc87414cab5be13280 | dparis/gen-phzr | button.cljs | (ns phzr.button
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Button
"Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events autom... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/button.cljs | clojure | (ns phzr.button
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [update]))
(defn ->Button
"Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events autom... | |
e66eca14a0ca943eeb43f2fd55f2f278520ccd7f2aa8239c5b66de54d5d6356a | Opetushallitus/ataru | virkailija_kevyt_valinta_rights.cljs | (ns ataru.virkailija.application.kevyt-valinta.virkailija-kevyt-valinta-rights)
(defn kevyt-valinta-read-only-rights-for-hakukohteet? [hakukohde-oids rights-by-hakukohde]
(->> hakukohde-oids
(map #(get rights-by-hakukohde %))
(every? (partial some #{:view-valinta :edit-valinta}))))
(defn kevyt-valinta... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/application/kevyt_valinta/virkailija_kevyt_valinta_rights.cljs | clojure | (ns ataru.virkailija.application.kevyt-valinta.virkailija-kevyt-valinta-rights)
(defn kevyt-valinta-read-only-rights-for-hakukohteet? [hakukohde-oids rights-by-hakukohde]
(->> hakukohde-oids
(map #(get rights-by-hakukohde %))
(every? (partial some #{:view-valinta :edit-valinta}))))
(defn kevyt-valinta... | |
bdf72ac538cf33643602a96981d537aac082c94dcf17e063124bdd41b8c1e24b | well-typed-lightbulbs/ocaml-esp32 | identifiable.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/utils/identifiable.mli | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
module type Thing = sig
type t
include Hashtbl.HashedType with... |
b33a22b29833b2fc5bc288d0d7c9c26c16e5274c771ed193fd088dfb2b9652b9 | 0install/0install | gpg.ml | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Common
type t = system
module U = Utils
let spf = Printf.sprintf
let gpg_lock = Lwt_mutex.create ()
gnupg does not work reliably when multiple processes are using the keyring at once... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/gpg.ml | ocaml | Message has been tampered with
Start collecting output...
At the same time, write the input, if any
Join the collection threads
* Call 'gpg --list-keys' and return the results split into lines and columns.
Note: GnuPG 2 always uses --fixed-list-mode
GnuPG 2.1.16 sets the higher bits (possibly by mistake).
... | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Common
type t = system
module U = Utils
let spf = Printf.sprintf
let gpg_lock = Lwt_mutex.create ()
gnupg does not work reliably when multiple processes are using the keyring at once... |
cec817e5cd493fae94ff40514a95a8bb1f750aedac3204080efc34c34b6ff923 | kmi/irs | emergency-gis-domain.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-domain)
;; spatial object query
(def-class emergency-type (spatial-object)
())
(def-class localized-emergency-type (emergency-type)
((has-location :TYPE AREA-LOCATION)));;should be has-location AREA-LOCATION
... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/emergency-gis-domain/emergency-gis-domain.lisp | lisp | Package :
spatial object query
should be has-location AREA-LOCATION
(all-instances 'input-roles-adapter)
(setofall '?x `(instance-of ?x 'spatial-affordance))
(has-max-range-km 15)
default values do not inherit, is that normal?
results' elements
spatial-object
resources
#|
(def-class emergency-resource-method (spa... |
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-domain)
(def-class emergency-type (spatial-object)
())
(def-class localized-emergency-type (emergency-type)
(def-instance GET-GIS-DATA-GOAL-HOSPITALS-ADAPTER input-roles-adapter
((HAS-MAPPING "HAS-METHOD \"get!Hospitals!In!Radius\"" "H... |
d3d147d16d388a1dbc8092fbfcc5c50eedf7e32cfe7243c8691133e5307e69b0 | kupl/FixML | sub29.ml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec evalHelper1: exp -> int
= fun f -> match f with
| Num (a) -> a
|... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub29.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec evalHelper1: exp -> int
= fun f -> match f with
| Num (a) -> a
|... | |
0ec2aee01defd3c2540947b4fbbdcbec9ca79fcf61935ab7b503067554f6b882 | shirok/Gauche | win-noconsole-stdio.scm | ;;
;; This manually test AllocConsole() opeartion of gosh-noconsole.exe
;; on MinGW. This can't be automated easily, so it's not run by
;; make check.
;;
(cond-expand
[(not gauche.os.windows)
(exit 1 "This script needs to be run on MinGW version of gosh-noconsole.")]
[else])
(use gauche.process)
;;... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/win-noconsole-stdio.scm | scheme |
This manually test AllocConsole() opeartion of gosh-noconsole.exe
on MinGW. This can't be automated easily, so it's not run by
make check.
stdio test
run-process input test
run-process output test
sys-system test
|
(cond-expand
[(not gauche.os.windows)
(exit 1 "This script needs to be run on MinGW version of gosh-noconsole.")]
[else])
(use gauche.process)
(print "1+2+3=" (+ 1 2 3))
(print "HIT ENTER KEY!")
(read-line)
(display "4+5+6=" (current-error-port))
(display (+ 4 5 6) (current-error-port))
(newline ... |
21e6ce0ba19d710eac0661614a6341bda9ec426368e5de41a3a5c439bc5782d0 | SimulaVR/godot-haskell | AnimationNodeBlendSpace1D.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AnimationNodeBlendSpace1D
(Godot.Core.AnimationNodeB... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/AnimationNodeBlendSpace1D.hs | haskell | | Returns the number of points on the blend axis.
| Returns the number of points on the blend axis.
| Returns the @AnimationNode@ referenced by the point at index @point@.
| Returns the @AnimationNode@ referenced by the point at index @point@.
| Returns the position of the point at index @point@.
| Returns the po... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AnimationNodeBlendSpace1D
(Godot.Core.AnimationNodeB... |
032ea0bf32f4a7101c0573ee09d03dd95d6fedae9de881dda49584aaee85400b | ff-notes/ron | String.hs | module String (s) where
import RON.Prelude
import Language.Haskell.TH (litE, stringL)
import Language.Haskell.TH.Quote (QuasiQuoter (QuasiQuoter), quoteDec,
quoteExp, quotePat, quoteType)
s :: QuasiQuoter
s = QuasiQuoter
{ quoteDec = undef... | null | https://raw.githubusercontent.com/ff-notes/ron/0df2b7985996ecc498808ea7247d0d8de471da4f/ron-test/String.hs | haskell | module String (s) where
import RON.Prelude
import Language.Haskell.TH (litE, stringL)
import Language.Haskell.TH.Quote (QuasiQuoter (QuasiQuoter), quoteDec,
quoteExp, quotePat, quoteType)
s :: QuasiQuoter
s = QuasiQuoter
{ quoteDec = undef... | |
66937f4b176dda228cad35beeda33df0ef587f0877ca2db3cad33c7bd02d6e93 | lhope/cl-bayesnet | packages.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; packages - Package and external API definition.
;;
Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
;;
;; This file is part of cl-bayesnet - a Common Lisp Bayesian Network
Inference Engine .
;;
;... | null | https://raw.githubusercontent.com/lhope/cl-bayesnet/3834f6ec27a297054e9b2f67220161682d63109d/src/packages.lisp | lisp |
packages - Package and external API definition.
This file is part of cl-bayesnet - a Common Lisp Bayesian Network
This file is licensed under the terms of the LLGPL.
This library is free software; you can redistribute it and/or modify
This library is distributed in the hope that it will be useful,
but WITHO... | Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
Inference Engine .
it under the terms of the Lisp Lesser General Public License version
3 , which consists of the GNU Lesser General Public License , either
version 3 or ( at your option ) any later version , as publ... |
c7dd48d8ee0996369b1b21314f853acd67de27fee8682e22c98e7e74185d3c64 | Netflix/PigPen | functional_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
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 by applicable law or agreed to ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-rx/src/test/clojure/pigpen/rx/functional_test.clj | clojure |
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 the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.rx.functional-test
(:require [clojure.test :refer :all]
[schema.test]
[pigpen.functional-test :as t :refer [TestHarness]]
[pigpen.functional-suite :refer [... |
9c6c6f1a278290196a250eb0ce8c46b79303c1e913b96fdeef184627f530d216 | bobzhang/fan | gensym.ml |
let fresh =
let cnt = ref 0 in
fun ?(prefix = "_fan") () -> begin
incr cnt;
Printf.sprintf "%s__%03i_" prefix !cnt
end
(* local variables: *)
compile - command : " cd .. & & pmake main_annot / gensym.cmo "
(* end: *)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/main/gensym.ml | ocaml | local variables:
end: |
let fresh =
let cnt = ref 0 in
fun ?(prefix = "_fan") () -> begin
incr cnt;
Printf.sprintf "%s__%03i_" prefix !cnt
end
compile - command : " cd .. & & pmake main_annot / gensym.cmo "
|
5187e53ba3ecf95469bdfaa83e3e0d8d19f2e0609306d64af327afcade80fcba | samcf/ogres | canvas.cljs | (ns ogres.app.form.canvas
(:require [clojure.string :refer [capitalize]]
[ogres.app.form.render :refer [form]]
[ogres.app.hooks :refer [use-dispatch use-image use-image-uploader use-query use-store]]
[ogres.app.render :refer [checkbox icon]]
[uix.core.alpha :as uix]))
... | null | https://raw.githubusercontent.com/samcf/ogres/c6441f6556403b3c4ed4300f38718173c18e8838/src/main/ogres/app/form/canvas.cljs | clojure | (ns ogres.app.form.canvas
(:require [clojure.string :refer [capitalize]]
[ogres.app.form.render :refer [form]]
[ogres.app.hooks :refer [use-dispatch use-image use-image-uploader use-query use-store]]
[ogres.app.render :refer [checkbox icon]]
[uix.core.alpha :as uix]))
... | |
5c1d184f65b5e669d629feb21ea2aeb2350d8c260ad7cb46065b792a89d003ca | lspitzner/exference | Printf.hs | module Text.Printf where
class PrintfArg a where
class PrintfType t where
class HPrintfType t where
| null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Printf.hs | haskell | module Text.Printf where
class PrintfArg a where
class PrintfType t where
class HPrintfType t where
| |
13cbcefeb8d62f19b1645eab3a4bc67093ee08fba1622a6963f77eaa973de23a | ahefner/asm6502 | grayscale.lisp |
(defpackage :rgbi
(:use :common-lisp :6502 :6502-modes :asm6502 :asm6502-utility :asm6502-nes))
(in-package :rgbi)
(defvar *path* #.*compile-file-pathname*)
(defparameter *mmc3-bank-config* 0
"Used for upper bits of writes to $8000 via MMC3-BANK function")
(defun mmc3-bank (bank value)
(poke (logior *mmc3-ba... | null | https://raw.githubusercontent.com/ahefner/asm6502/11807096abc0c08f7c2f2915af57fce961c73606/hacks/rgbi/grayscale.lisp | lisp | Disable NMI
Disable rendering
Kill time while PPU warms up..
PPU $0000
PPU $0800
PPU $1800
PPU $1C00
Disable IRQ
-- PPU should be ready now.. build the screen contents --
tile # to clear nametable to
Clear attribute table
Display character rom
Turn the screen back on
Interrupt handlers
ACK / Disable IRQ
... |
(defpackage :rgbi
(:use :common-lisp :6502 :6502-modes :asm6502 :asm6502-utility :asm6502-nes))
(in-package :rgbi)
(defvar *path* #.*compile-file-pathname*)
(defparameter *mmc3-bank-config* 0
"Used for upper bits of writes to $8000 via MMC3-BANK function")
(defun mmc3-bank (bank value)
(poke (logior *mmc3-ba... |
4fd67754daf2d78fa6d8bd0f338884017f034259e659e8708872700105cf6bcd | emqx/emqx | emqx_router_utils.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/emqx_router_utils.erl | erlang | --------------------------------------------------------------------
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 ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_router_utils).
-include("emqx.hrl").
-export([
delete_direct_route/2,
del... |
4be51ba926de8697728bcaac563aa56330b0096a618c4a4cfc072084666f8b10 | ptaoussanis/clojure-web-server-benchmarks | nginx_clojure.clj | (ns nginx-clojure
(:require
[clojure.string :as str]
[clojure.java.io :as io])
(:use [clojure.java.shell :only [sh]]))
;;;; Handler
(def nginx-clojure-ver "0.3.0")
( def max - balanced - tcp - connections " 65000 " )
(def properties (into {} (System/getProperties)))
(def arc (let [c (properties "os.a... | null | https://raw.githubusercontent.com/ptaoussanis/clojure-web-server-benchmarks/338614cdd46f2b5111ece79f8fdebafa3145944f/servers/nginx-clojure/src/nginx_clojure.clj | clojure | Handler
check
(println (slurp tpl-file)) | (ns nginx-clojure
(:require
[clojure.string :as str]
[clojure.java.io :as io])
(:use [clojure.java.shell :only [sh]]))
(def nginx-clojure-ver "0.3.0")
( def max - balanced - tcp - connections " 65000 " )
(def properties (into {} (System/getProperties)))
(def arc (let [c (properties "os.arch")]
... |
e0a469203a025c9986331f564779ed445d7b4719bfdf2aaa75dcb587c9dd2515 | ArulselvanMadhavan/diffusers-ocaml | ddim.mli | open Torch
module BetaSchedule : sig
type t
end
module DDIMSchedulerConfig : sig
type t =
{ beta_start : float
; beta_end : float
; beta_schedule : BetaSchedule.t
; eta : float
}
val default : unit -> t
end
module DDimScheduler : sig
type t =
{ timesteps : int array
; alphas_cump... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/diffusers-ocaml/439673c85b23564773480fb677f8b237c59ce022/lib/schedulers/ddim.mli | ocaml | open Torch
module BetaSchedule : sig
type t
end
module DDIMSchedulerConfig : sig
type t =
{ beta_start : float
; beta_end : float
; beta_schedule : BetaSchedule.t
; eta : float
}
val default : unit -> t
end
module DDimScheduler : sig
type t =
{ timesteps : int array
; alphas_cump... | |
61e45f217e0a1d811090893e51e873e6797354d88b4fe1a0d893d35927917505 | emilaxelsson/ag-graph | Internal.hs | --------------------------------------------------------------------------------
-- |
-- Module : Dag.Internal
Copyright : ( c ) 2014 ,
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC Extensions )
--
-- This module defines the types... | null | https://raw.githubusercontent.com/emilaxelsson/ag-graph/50fb1ebb819e1ed0bd3b97e8a9f82bb9310e782f/src/Dag/Internal.hs | haskell | ------------------------------------------------------------------------------
|
Module : Dag.Internal
License : BSD3
Stability : experimental
This module defines the types for representing DAGs. However,
"Dag".
------------------------------------------------------------------------------
| The ... | Copyright : ( c ) 2014 ,
Maintainer : < >
Portability : non - portable ( GHC Extensions )
' Dag 's should only be constructed using the interface provided by
module Dag.Internal where
import Tree
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
type Node = Int
type Edge... |
c8591069a8fdbc3685356f09311d446b89efe417dbebd40c30b356e582747629 | esl/MongooseIM | mod_global_distrib_receiver.erl | %%==============================================================================
Copyright 2017 Erlang Solutions Ltd.
%%
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
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/src/global_distrib/mod_global_distrib_receiver.erl | erlang | ==============================================================================
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 ex... | Copyright 2017 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_global_distrib_receiver).
-author('').
-behaviour(gen_mod).
-behaviour(ranch_protocol).
-behaviour(gen_server).
-behaviour(m... |
c35ba4c2e395f19874fba9dc5a51c881ffdc412045cbe7e062565fa538f85786 | ocaml-flambda/ocaml-jst | include_functor.ml | (* TEST
flags = "-extension include_functor -w +a"
* expect
*)
(* Test 1: Basic usage in structs *)
module type S = sig
type t
val x : t
end
module F1 (X : S) = struct
let y = X.x
end
module M1 = struct
type t = int
let x = 5
include functor F1
end
let () = assert Int.(equal M1.y 5);;
[%%expect{|
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/testsuite/tests/typing-modules/include_functor.ml | ocaml | TEST
flags = "-extension include_functor -w +a"
* expect
Test 1: Basic usage in structs |
module type S = sig
type t
val x : t
end
module F1 (X : S) = struct
let y = X.x
end
module M1 = struct
type t = int
let x = 5
include functor F1
end
let () = assert Int.(equal M1.y 5);;
[%%expect{|
module type S = sig type t val x : t end
module F1 : functor (X : S) -> sig val y : X.t end
module M1 : s... |
a51516c278b20bdd4b90e463b62d211e44abfb58b87eed3ea29c9e8eb02c089d | yetibot/core | chat.clj | (ns yetibot.core.chat
(:require
[yetibot.core.adapters.adapter :as a]
[yetibot.core.models.channel :as channel]
[taoensso.timbre :refer [color-str debug trace info warn error]]
[yetibot.core.util.format :as fmt]))
(def ^:dynamic *thread-ts*
"The thread_ts value from Slack. Only applies to Slack"
... | null | https://raw.githubusercontent.com/yetibot/core/fc44d52cb7364e8f2a2293b0fd0bb19998d1c7c4/src/yetibot/core/chat.clj | clojure | lookup the adapter to bind
send each item in the coll as a separate message if it contains images and
send the message with newlines as a paste
send as regular message
(prn "send msg to all" msg)
(doseq [n @active-chat-namespaces]
(when-let [send-to-all (deref (ns-resolve n 'send-to-all))]
(send-t... | (ns yetibot.core.chat
(:require
[yetibot.core.adapters.adapter :as a]
[yetibot.core.models.channel :as channel]
[taoensso.timbre :refer [color-str debug trace info warn error]]
[yetibot.core.util.format :as fmt]))
(def ^:dynamic *thread-ts*
"The thread_ts value from Slack. Only applies to Slack"
... |
7d05f904be35780a3f4d2c04996b0f1263d69227df8ca5f10ead4dea33b55ab2 | juxt/bolt | encoding.clj | (ns bolt.oauth.encoding
(:require
[ring.util.codec :refer (url-encode url-decode)]
[clojure.string :as str]
[plumbing.core :refer (?>>)]))
(defn encode-scope [scopes]
(->>
scopes
(?>> (keyword? (first scopes)) (map #(apply str (interpose ":" (remove nil? ((juxt namespace name) %))))))
(interpose ... | null | https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/src/bolt/oauth/encoding.clj | clojure | (ns bolt.oauth.encoding
(:require
[ring.util.codec :refer (url-encode url-decode)]
[clojure.string :as str]
[plumbing.core :refer (?>>)]))
(defn encode-scope [scopes]
(->>
scopes
(?>> (keyword? (first scopes)) (map #(apply str (interpose ":" (remove nil? ((juxt namespace name) %))))))
(interpose ... | |
c75976f13a107b75dfda307aa5ca5e1d75024184d606bf82fa582364011db12e | TerrorJack/ghc-alter | QSem.hs | {-# LANGUAGE Safe #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSem
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file li... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Control/Concurrent/QSem.hs | haskell | # LANGUAGE Safe #
# LANGUAGE BangPatterns #
# OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : Control.Concurrent.QSem
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portab... |
Copyright : ( c ) The University of Glasgow 2001
module Control.Concurrent.QSem
: : > IO QSem
) where
import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar, tryTakeMVar
, putMVar, newMVar, tryPutMVar)
import Control.Exception
import Data.Maybe
for satisfying b... |
e2b0e45f644962ab37185368a3d6ea3dfde1d96f5843ec429465552878a811ef | AbstractMachinesLab/caramel | hashtbl_intf.ml | module type S = sig
type 'a t
type key
val create : int -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val set : 'a t -> key -> 'a -> unit
val add_exn : 'a t -> key -> 'a -> unit
val add : 'a t -> key... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/hashtbl_intf.ml | ocaml | module type S = sig
type 'a t
type key
val create : int -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val set : 'a t -> key -> 'a -> unit
val add_exn : 'a t -> key -> 'a -> unit
val add : 'a t -> key... | |
7fd1731b52e8fd85e807f3cb9bc37966afe0352183df8e8892f4b8d568cecd1b | LexiFi/dead_code_analyzer | qux.ml | let z = Baz.t
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/qux.ml | ocaml | let z = Baz.t
| |
62af8d8b9f357a964d7b33ec4e9b4d0b9efc58ffbf10821c5041d30737c48447 | JacquesCarette/Drasil | Printers.hs | module Language.Drasil.Printers (
-- * Formats
DocType(SRS, Website, Jupyter), Format(TeX, HTML, JSON)
* DOT
-- ** Types
, GraphInfo(..), NodeFamily(..)
-- ** Functions
, outputDot
-- * HTML
-- ** Printer
, genHTML
-- ** Helpers
, makeCSS
*
-- ** Printer
, makeMd
-- ** Section Printers... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/84272acccc09574dec70d8d96c6ea994f15f8b22/code/drasil-printers/lib/Language/Drasil/Printers.hs | haskell | * Formats
** Types
** Functions
* HTML
** Printer
** Helpers
** Printer
** Section Printers
* Plain
** Types
** Functions
* TeX
* Jupyter
* Log
* Printing Information and Options | module Language.Drasil.Printers (
DocType(SRS, Website, Jupyter), Format(TeX, HTML, JSON)
* DOT
, GraphInfo(..), NodeFamily(..)
, outputDot
, genHTML
, makeCSS
*
, makeMd
, introInfo, verInfo, unsupOS, regularSec, instDoc, extLibSec, endNote, whatInfo
, Linearity(..)
, sentenceDoc, exprDoc, codeE... |
56cfdc9df8d607952b5bf669d88cc18866edb468544183a8348588a2200a65f6 | pirapira/coq2rust | environ.mli | (************************************************************************)
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/kernel/environ.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Unsafe environments. We define her... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Con... |
27c5ee2d2e3cf35ed702b83386d6561464c46feb6a1f6fbafb25eaff2466f235 | billstclair/Lisplog | start.lisp | (in-package :cl-user)
(unless (find-package "QUICKLISP")
(cond ((probe-file "~/quicklisp/setup.lisp")
(load "~/quicklisp/setup"))
(t (format t "Installing Quicklisp...")
(load "")
(funcall (find-symbol "INSTALL" :quicklisp-quickstart)))))
(defvar *lisplog-dir*
(directory-nam... | null | https://raw.githubusercontent.com/billstclair/Lisplog/827e737062b4873ecf86c255649d44aca4b4f48f/start.lisp | lisp | (in-package :cl-user)
(unless (find-package "QUICKLISP")
(cond ((probe-file "~/quicklisp/setup.lisp")
(load "~/quicklisp/setup"))
(t (format t "Installing Quicklisp...")
(load "")
(funcall (find-symbol "INSTALL" :quicklisp-quickstart)))))
(defvar *lisplog-dir*
(directory-nam... | |
e42381e0420aabafe68f44b29c259a31a39bfc0e6d924106828300a36baec948 | green-labs/gosura | util.clj | (ns gosura.util
(:require [camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :as cske]
[clojure.string :refer [ends-with?]]
[com.walmartlabs.lacinia.resolve :refer [is-resolver-result?]]
[com.walmartlabs.lacinia.select-utils :refer [is-wrapped-value?]]
... | null | https://raw.githubusercontent.com/green-labs/gosura/45d5cec24da94f5050f465ff26e2083a9c5403bb/src/gosura/util.clj | clojure | (ns gosura.util
(:require [camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :as cske]
[clojure.string :refer [ends-with?]]
[com.walmartlabs.lacinia.resolve :refer [is-resolver-result?]]
[com.walmartlabs.lacinia.select-utils :refer [is-wrapped-value?]]
... | |
c65896d1c5095614ed516c51f209eff713039f5b8de9b005e54de670dfbbcb36 | informatimago/lisp | try-systems.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : try-systems.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Tries to compile all the systems in an ... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/tools/try-systems.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Tries to compile all the systems in an environment similar to
Report errors.
LEGAL
This program is free software: you can redistribut... | FILE : try-systems.lisp
USER - INTERFACE :
the one used by quicklisp when validating systems .
< PJB > < >
MODIFICATIONS
2015 - 07 - 08 < PJB > Created .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as published by
... |
60d88e2b6581b2f1b874c0134fe891da13384782aa6ec21abeacafb1ce263969 | oklm-wsh/MrMime | header_test.ml | open MrMime
module H =
struct
type t = Header.header
let pp = Header.pp
let equal = Header.equal
end
let header = (module H : Alcotest.TESTABLE with type t = Header.header)
let make_compute_test s =
Printf.sprintf "header",
`Slow,
(fun () -> match Header.of_string s with
| Some _ -> ()
| None -... | null | https://raw.githubusercontent.com/oklm-wsh/MrMime/4d2a9dc75905927a092c0424cff7462e2b26bb96/lib_test/header_test.ml | ocaml | See RFC 5322 § Appendix A.4
See RFC 5322 § Appendix A.5
See RFC 822 § A.3.1
See RFC 822 § A.3.2
See RFC 822 § A.3.3
See RFC 2047 § 8 | open MrMime
module H =
struct
type t = Header.header
let pp = Header.pp
let equal = Header.equal
end
let header = (module H : Alcotest.TESTABLE with type t = Header.header)
let make_compute_test s =
Printf.sprintf "header",
`Slow,
(fun () -> match Header.of_string s with
| Some _ -> ()
| None -... |
534bf3f96070f2a68d5170d7573eb683c555a284142fcb7fd41c0eb688f937df | arichiardi/replumb | load.clj | (ns foo.load)
(def a true)
(defn b [] (+ 10 20 20))
(defn c [number] (inc number))
| null | https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/dev-resources/private/test/src/clj/foo/load.clj | clojure | (ns foo.load)
(def a true)
(defn b [] (+ 10 20 20))
(defn c [number] (inc number))
| |
88645ba2d63b02623bc821e1efcf43ec1ee6b14138fa0562cea8a54d12c2ac0d | openmusic-project/openmusic | package.lisp | This file is part of yason , a Common Lisp JSON parser / encoder
;;
Copyright ( c ) 2008 - 2012 and contributors
;; All rights reserved.
;;
;; Please see the file LICENSE in the distribution.
(defpackage :yason
(:use :cl)
(:export
Parser
#:parse
#:*parse-object-key-fn*
#:*parse-object-as*
#:*... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/Yason/package.lisp | lisp |
All rights reserved.
Please see the file LICENSE in the distribution.
deprecated
Basic encoder interface
Streaming encoder interface | This file is part of yason , a Common Lisp JSON parser / encoder
Copyright ( c ) 2008 - 2012 and contributors
(defpackage :yason
(:use :cl)
(:export
Parser
#:parse
#:*parse-object-key-fn*
#:*parse-object-as*
#:*parse-json-arrays-as-vectors*
#:*parse-json-booleans-as-symbols*
#:*parse-js... |
6a8e88e1f79d61c375efd102e4711f0879aa85bf14d8d1a40ab8288564822960 | jwiegley/notes | dyntype.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Control.Lens
import Data.Aeson as A
import Data.Aeson.Lens
import Data.ByteString as B
import Data.ByteString.Lazy as BL
import Data.Text as T
import Data.Yaml as Y
import Data.Maybe
import qualified Data.Vector as V
import Data.Data.Lens
main :: IO... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/dyntype.hs | haskell | # LANGUAGE OverloadedStrings #
where test.yaml is the following:
{
"sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"url": "-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"tree": [
{
"path": "file.rb",
"type": "blob",
"url": "-World/git/blobs/44b4fc6d56897b048c772eb4087f... |
import Control.Applicative
import Control.Lens
import Data.Aeson as A
import Data.Aeson.Lens
import Data.ByteString as B
import Data.ByteString.Lazy as BL
import Data.Text as T
import Data.Yaml as Y
import Data.Maybe
import qualified Data.Vector as V
import Data.Data.Lens
main :: IO ()
main = do
str <- B.readFile "... |
379b2440d433232bad11194ed2fc559561782812b585583356c4531a8f67c810 | triffon/fp-2021-22 | 03.higher-order-functions.rkt | #lang racket
(define (sum-interval start end)
(if (> start end)
0
(+ start (sum-interval (+ start 1) end)))
)
(define (product-interval start end)
(if (> start end)
1
(* start (product-interval (+ start 1) end)))
)
(define (combine-interval start end op null-value)
(if (> start end)
... | null | https://raw.githubusercontent.com/triffon/fp-2021-22/3a68b34e247dcd29081660300c4514f0c8a6a7c0/exercises/7/class/03.higher-order-functions.rkt | racket | (combine-interval start end (lambda (x y) (+ x y)) 0)
(lambda (x) x)
(lambda (x) (even? x))
(lambda (x y) (if (> x y) x y))
(compose f g) = f(g(x)) | #lang racket
(define (sum-interval start end)
(if (> start end)
0
(+ start (sum-interval (+ start 1) end)))
)
(define (product-interval start end)
(if (> start end)
1
(* start (product-interval (+ start 1) end)))
)
(define (combine-interval start end op null-value)
(if (> start end)
... |
f80941f8de1229d6075c041c156234c3eeb49a895a40f445376cfc6366f9f4b5 | satos---jp/mincaml_self_hosting | type.ml | open Genint
type tyvar = int
type type_name = string
type ty =
| TyInt
| TyFloat
| TyStr
| TyChar
| TyNum (* int も float もこれの部分型 *)
| TyRef of ty (* 参照 *)
| TyVar of tyvar
| TyArr of ty
| TyFun of (ty list) * ty
| TyTuple of ty list
| TyUserDef of type_name * (ty list)
let tyvar2str v = Printf.sprintf "... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/compiler/type.ml | ocaml | int も float もこれの部分型
参照
constrs_subst のとこでO(n^2) かかっていそう。
部分適用に対応する。
多相性のために追加する
Format string 用
schemeの中身をalpha変換しておく(キャプチャ防ぐやつ)
ta < tb かを判定する(毎回どっちやねんとなるが)
Format string 用 | open Genint
type tyvar = int
type type_name = string
type ty =
| TyInt
| TyFloat
| TyStr
| TyChar
| TyVar of tyvar
| TyArr of ty
| TyFun of (ty list) * ty
| TyTuple of ty list
| TyUserDef of type_name * (ty list)
let tyvar2str v = Printf.sprintf "'a%d" v
let rec type2str_with_pa t =
match t with
... |
50f84c882f9d35aaabd1d10b17dc4592feb70a3b03bbe6184afd4c380b473bc3 | zeromq/cljzmq | sendable.clj | (ns zeromq.sendable
(:refer-clojure :exclude [send])
(:require [zeromq.zmq :as zmq]))
(defprotocol Sendable
(send
[this socket flags]))
(extend-protocol Sendable
String
(send [this socket flags]
(zmq/send socket (.getBytes ^String this) (int flags))))
| null | https://raw.githubusercontent.com/zeromq/cljzmq/b8252906a149fe68c49e83568b8f256c8ca2523e/src/zeromq/sendable.clj | clojure | (ns zeromq.sendable
(:refer-clojure :exclude [send])
(:require [zeromq.zmq :as zmq]))
(defprotocol Sendable
(send
[this socket flags]))
(extend-protocol Sendable
String
(send [this socket flags]
(zmq/send socket (.getBytes ^String this) (int flags))))
| |
d885e0eba78719507b244a0d38c6e04b1d309d9daa6e1119dbc6434e8c358812 | echeran/clj-thamil | core_test.clj | (ns clj-spanish.core-test
(:require [clojure.test :refer :all]
[clj-spanish.core :refer :all]))
(deftest core-test
(let [numbers [2 3 5 7 11]]
(testing "Clojure en español"
(is (= 11 (último numbers))))))
| null | https://raw.githubusercontent.com/echeran/clj-thamil/692a6d94329bb14cb58fb39b875792e5d774d2c4/examples/clj/clj-spanish/test/clj_spanish/core_test.clj | clojure | (ns clj-spanish.core-test
(:require [clojure.test :refer :all]
[clj-spanish.core :refer :all]))
(deftest core-test
(let [numbers [2 3 5 7 11]]
(testing "Clojure en español"
(is (= 11 (último numbers))))))
| |
f9d48e2e70f9525c1556bf5cc28ff12d6bfef5b5415672aca8dab27427f4cc67 | nextjournal/advent-of-clerk | day_12.clj | # 🎄 Advent of Clerk : Day 12
(ns advent-of-clerk.day-12
(:require [nextjournal.clerk :as clerk])) | null | https://raw.githubusercontent.com/nextjournal/advent-of-clerk/9f358c9f13995f591981a26fc3683dea574933b1/src/advent_of_clerk/day_12.clj | clojure | # 🎄 Advent of Clerk : Day 12
(ns advent-of-clerk.day-12
(:require [nextjournal.clerk :as clerk])) | |
84158a8c71069e730f8b59bc09c7ffc90f06364f80f235197befab626f719a68 | gsakkas/rite | 0056.ml | IteG (BopG EmptyG EmptyG) (AppG [EmptyG]) (AppG [EmptyG])
if sumList (digits n) < 10
then numdigits (digits n)
else additivePersistence (sumList (digits n))
if eval (x1 , x , y) < eval (x2 , x , y)
then eval (x3 , x , y)
else eval (x4 , x , y)
if sumList (digits n) > 9
then digitalRoot (sumList (digits n))
else sumList... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0056.ml | ocaml | IteG (BopG EmptyG EmptyG) (AppG [EmptyG]) (AppG [EmptyG])
if sumList (digits n) < 10
then numdigits (digits n)
else additivePersistence (sumList (digits n))
if eval (x1 , x , y) < eval (x2 , x , y)
then eval (x3 , x , y)
else eval (x4 , x , y)
if sumList (digits n) > 9
then digitalRoot (sumList (digits n))
else sumList... | |
b4aa0f3369da2436157ff4ac96aab5f68ce856e9241fb41f0703d123c1233bab | titola/incudine | sbcl.lisp | Copyright ( c ) 2018
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (at your option) any later version.
;;;
;;; This program is distributed i... | null | https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/src/serial/sbcl.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | Copyright ( c ) 2018
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
(in-package :incudine)
(defun posix-value (&rest flag-constants)
(... |
1f0c089f67700662049393ea63231dbffbb21aa689015576e9e843401a711bb6 | pfdietz/ansi-test | format-logical-block.lsp | ;-*- Mode: Lisp -*-
Author :
;;;; Created: Sun Aug 8 12:17:31 2004
;;;; Contains: Tests of the ~< ~:> format directives
;;; Error cases
;;; Prefix and suffix cannot contain format directives
(deftest format.logical-block.error.1
(signals-error-always (format nil "~<foo~A~;~A~;bar~:>" '(X) '(Y)) er... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-logical-block.lsp | lisp | -*- Mode: Lisp -*-
Created: Sun Aug 8 12:17:31 2004
Contains: Tests of the ~< ~:> format directives
Error cases
Prefix and suffix cannot contain format directives
"an error is also signaled if the ~<...~:;...~> form of ~<...~> is used
in the same format string with ~W, ~_, ~<...~:>, ~I, or ~:T."
Non-error ... | Author :
(deftest format.logical-block.error.1
(signals-error-always (format nil "~<foo~A~;~A~;bar~:>" '(X) '(Y)) error)
t t)
(deftest format.logical-block.error.2
(signals-error-always (format nil "~<foo~A~@;~A~;bar~:>" '(X) '(Y)) error)
t t)
(deftest format.logical-block.error.3
(signals-err... |
59ad42c10e98d070671bf07f7d35fd8b48eca3d22b28f4d0e26dcdf386184861 | Copilot-Language/copilot | Structs.hs | -- | An example showing how specifications involving structs (in particular,
-- nested structs) are compiled to C using copilot-c99.
# LANGUAGE DataKinds #
module Main where
import qualified Prelude as P
import Control.Monad (void, forM_)
import Language.Copilot
import Copilot.Compile.C99
| Definition for ` Volt... | null | https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot/examples/Structs.hs | haskell | | An example showing how specifications involving structs (in particular,
nested structs) are compiled to C using copilot-c99.
| `Battery` instance for `Struct`.
| `Battery` instance for `Typed`. Note that `undefined` is used as an
argument to `Field`. This argument is never used, so `undefined` will never
throw ... |
# LANGUAGE DataKinds #
module Main where
import qualified Prelude as P
import Control.Monad (void, forM_)
import Language.Copilot
import Copilot.Compile.C99
| Definition for ` Volts ` .
data Volts = Volts
{ numVolts :: Field "numVolts" Word16
, flag :: Field "flag" Bool
}
| ` Struct ` instance f... |
4a8b592e6f6b72d32fa7e7edc53ecbcdf1e0d8f9ef508a3252ae2913ea42afa4 | chaoxu/fancy-walks | 23.hs | import System.Random
rnd_select :: [a] -> Int -> IO [a]
rnd_select _ 0 = return []
rnd_select (x:xs) n =
do
r <- randomRIO (0, length xs)
if r < n
then do
remaining <- rnd_select xs (n-1)
return (x:remaining)
else rnd_select xs n
| null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/haskell.org/99_Problems/23.hs | haskell | import System.Random
rnd_select :: [a] -> Int -> IO [a]
rnd_select _ 0 = return []
rnd_select (x:xs) n =
do
r <- randomRIO (0, length xs)
if r < n
then do
remaining <- rnd_select xs (n-1)
return (x:remaining)
else rnd_select xs n
| |
9c3a116855181ede0498d788063c7a75c5bf237318d48c28886ffe1a754515ab | UCSD-PL/refscript | Types.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TupleSections ... | null | https://raw.githubusercontent.com/UCSD-PL/refscript/884306fef72248ac41ecdbb928bbd7b06ca71bd4/src/Language/Rsc/Parser/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE UndecidableInstances #
import Language.Rsc.Pretty
TODO: Can Also take care of qualified names etc...
Type variables in scope
Ambient m... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TupleSections #
module Language.Rsc.Parser.Types where
import Control.Exception (throw)
import Contro... |
65c1dba6395fd346011464c0873ae1a2c5364f85e23c5053369bfe5e9916d214 | zenspider/schemers | exercise.3.62.scm | #lang racket/base
Exercise 3.62
Use the results of * Note Exercise 3 - 60 : : and * Note Exercise 3 - 61 : :
to define a procedure ` div - series ' that divides two power series .
` Div - series ' should work for any two series , provided that the
;; denominator series begins with a nonzero constant term. (If... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_3/exercise.3.62.scm | scheme | denominator series begins with a nonzero constant term. (If the
signal an error.) Show how to use `div-series' together with the
tangent.
todo (doubtful) | #lang racket/base
Exercise 3.62
Use the results of * Note Exercise 3 - 60 : : and * Note Exercise 3 - 61 : :
to define a procedure ` div - series ' that divides two power series .
` Div - series ' should work for any two series , provided that the
denominator has a zero constant term , then ` div - series '... |
57bc32665bf8dd4efc0924874eb7ba20b96b9885cff1a796724db747c2de3c62 | xtdb/xtdb | main.clj | (ns xtdb.main
(:gen-class))
(defn -main [& args]
((requiring-resolve 'xtdb.cli/start-node-from-command-line) args))
| null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/core/src/xtdb/main.clj | clojure | (ns xtdb.main
(:gen-class))
(defn -main [& args]
((requiring-resolve 'xtdb.cli/start-node-from-command-line) args))
| |
da889e5f35d9352ae81f6a1e05d20aa5681f3ea1a6b74e9b2b5d7571c8c7b5df | tezos/tezos-mirror | tezos_tree_encoding.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 TriliTech < >
Copyright ( c )... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/a305d9ded27e234c7937fce7adfc1f199196283a/src/lib_tree_encoding/tezos_tree_encoding.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 TriliTech < >
Copyright ( c ) 2022 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 " , WITHOU... |
df813f89f3a2d66323e916720d12233054caed46dee9c23de069cf1eee8416c2 | cram2/cram | fast-fourier-transform.lisp | ;; Fast fourier transform tests
2010 - 08 - 14 11:58:26EDT fast-fourier-transform.lisp
Time - stamp : < 2011 - 05 - 26 12:37:30EDT fast-fourier-transform.lisp >
;;
Copyright 2010 , 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute i... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/fast-fourier-transform.lisp | lisp | Fast fourier transform tests
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | 2010 - 08 - 14 11:58:26EDT fast-fourier-transform.lisp
Time - stamp : < 2011 - 05 - 26 12:37:30EDT fast-fourier-transform.lisp >
Copyright 2010 , 2011
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Fou... |
761293769fd80202085687c1c0a074905992f23c6059f2a0b5801c4948283eea | f-me/carma-public | PartnerCancel.hs | module Carma.Model.PartnerCancel where
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Model
import Data.Typeable
import Data.Model.View
import Carma.Model.Types()
import Carma.Model.Case (Case)
import Carma.Model.Partner (Partner)
import Carma.Model.Service (Service)
import Carma.Model.PartnerRefusalR... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/PartnerCancel.hs | haskell | module Carma.Model.PartnerCancel where
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Model
import Data.Typeable
import Data.Model.View
import Carma.Model.Types()
import Carma.Model.Case (Case)
import Carma.Model.Partner (Partner)
import Carma.Model.Service (Service)
import Carma.Model.PartnerRefusalR... | |
f97188c4c927d1392904e52b0178e25a76c09b54c5999f46808e48b4a21f50be | snowleopard/cats | Matrix.hs | # LANGUAGE DefaultSignatures , GADTs , LambdaCase , ScopedTypeVariables #
# LANGUAGE FlexibleContexts , RankNTypes , TypeFamilies , TypeOperators #
module Matrix where
-- Experimenting with an inductive matrix data type that forms a category.
--
-- This experiment is heavily inspired by the LAoP matrix manipulation li... | null | https://raw.githubusercontent.com/snowleopard/cats/2da3858923f0c89800543ac020a7f4b00aeed08b/src/Matrix.hs | haskell | Experimenting with an inductive matrix data type that forms a category.
This experiment is heavily inspired by the LAoP matrix manipulation library
following data type:
Empty :: Matrix e Void Void
Join :: Matrix e a r -> Matrix e b r -> Matrix e (Either a b) r
Fork :: Matrix e c a -> Matrix e c b ... | # LANGUAGE DefaultSignatures , GADTs , LambdaCase , ScopedTypeVariables #
# LANGUAGE FlexibleContexts , RankNTypes , TypeFamilies , TypeOperators #
module Matrix where
by ( ) that defines the
data Matrix e c r where
One : : e - > Matrix e ( ) ( )
import Control.Category
import Data.Bool
import Data.Fun... |
069fde0d8a2c9d4556b24c7d61ce24345400c6d979065aef636a79fc271ba1bf | toschoo/mom | Common.hs | module Common
where
import qualified Data.ByteString.Char8 as B
import Test.QuickCheck
import Control.Applicative ((<$>))
import Control.Concurrent
import System.IO (stdout, hFlush)
import Types
import Network.Mom.Stompl.Client.Queue
-------... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stomp-patterns/test/suite/Common.hs | haskell | ----------------------------------------------------------------------
For debugging it's much nicer to work with digits
----------------------------------------------------------------------
----------------------------------------------------------------------
Ease working with either
------------------------------... | module Common
where
import qualified Data.ByteString.Char8 as B
import Test.QuickCheck
import Control.Applicative ((<$>))
import Control.Concurrent
import System.IO (stdout, hFlush)
import Types
import Network.Mom.Stompl.Client.Queue
data Di... |
9485cf601d96d35814c3cb550000afc37978e212d147ff376b65fb8628aecc8e | jordanthayer/ocaml-search | drn_george_algs.ml | (* George (Learning) Based algorithms *)
open Drn_instance
open Dynamic
let hd problem =
let d = (make_approx_d problem)
and h = (make_approx_time_h problem) in
(fun n -> h n, d n)
(* Unbounded *)
(*************************************************************************)
let george problem lim =
let probl... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/dyn_robot/drn_george_algs.ml | ocaml | George (Learning) Based algorithms
Unbounded
***********************************************************************
***********************************************************************
Bounded Quality
*********************************************************************** | open Drn_instance
open Dynamic
let hd problem =
let d = (make_approx_d problem)
and h = (make_approx_time_h problem) in
(fun n -> h n, d n)
let george problem lim =
let problem = expand_obstacles problem in
Simple_estimatedf.george_dups_global_err
~limit:lim
(make_root problem)
goal_... |
4692f270a80cafd160b49d14fe234a50506e373a45be4f6fb0f86c42ea32c87e | acieroid/scala-am | indexer7.scm | (let* ((size 128)
(max 4)
(table (atom (make-vector size 0)))
(thread (lambda (tid)
(letrec ((hash (lambda (w) (modulo (* w 7) size)))
(process (lambda (m)
(if (< m max)
(letrec ((w (+ (*... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/variations/indexer7.scm | scheme | (let* ((size 128)
(max 4)
(table (atom (make-vector size 0)))
(thread (lambda (tid)
(letrec ((hash (lambda (w) (modulo (* w 7) size)))
(process (lambda (m)
(if (< m max)
(letrec ((w (+ (*... | |
4264f6db51a8c0da88446271cd4edf73797802a6ff1b91641e772d922031a3e5 | rtrusso/scp | mul.scm | (need sasm/machdesc)
(define (nasm-x86-multiply)
(machine-description
;; multiply - binop w/ register constraints
(instruction (input-pattern `(assign (,x86-accumulator? dest)
(op hyg-mul)
(,x86-accumulator? dest)
... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm/nasmx86/mul.scm | scheme | multiply - binop w/ register constraints
| (need sasm/machdesc)
(define (nasm-x86-multiply)
(machine-description
(instruction (input-pattern `(assign (,x86-accumulator? dest)
(op hyg-mul)
(,x86-accumulator? dest)
(result (op loa... |
f5a774463e0008fb4b5c47d216ca4169538a8a31761e3e272330120cf1892da5 | davisp/couchdb | couch_index_compactor.erl | 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 by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couch_index/src/couch_index_compactor.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_index_compactor).
-behaviour(gen_server).
-export([start_link/2, run/2, cancel/1, is_running/1]).
-export([init/1, terminate/2, code_change... |
22c7c3e2bb3d957db376e3d626438989e41284f7b7b39a23a10015b99fb6b2db | nuvla/ui | values_test.cljs | (ns sixsq.nuvla.ui.utils.values-test
(:require [cljs.test :refer [are deftest]]
[sixsq.nuvla.ui.utils.values :refer [markdown->summary]]))
(deftest markdown->summary-test
(are [result input]
(= result
(markdown->summary input))
"simple paragraph" "simple paragraph"
"simple paragraph... | null | https://raw.githubusercontent.com/nuvla/ui/3b126b937046584c6b41d2037de7e61c6e87b545/code/test/cljs/sixsq/nuvla/ui/utils/values_test.cljs | clojure | (ns sixsq.nuvla.ui.utils.values-test
(:require [cljs.test :refer [are deftest]]
[sixsq.nuvla.ui.utils.values :refer [markdown->summary]]))
(deftest markdown->summary-test
(are [result input]
(= result
(markdown->summary input))
"simple paragraph" "simple paragraph"
"simple paragraph... | |
9cc253f5c47c5e73e1cf33f6e36eeeae38c14b732621f4a83bb30010e5d61c0b | GaloisInc/semmc | Main.hs | # LANGUAGE NondecreasingIndentation #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main ( main ) where
import qualified Control.Concurrent as C
import qualified Data.ByteString.Lazy as LB
import Data.Proxy ( Proxy(..) )
import qualified Data.Vector.Sized as V
import GHC.Typ... | null | https://raw.githubusercontent.com/GaloisInc/semmc/a3b8b89b9e88c94aab2ec6e06f993edcc9126cea/semmc-x86_64/tools/Main.hs | haskell | mov %rax, %rsi
| Convert a list to a 'V.Vector' of length @n@. If the length of the list is | # LANGUAGE NondecreasingIndentation #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main ( main ) where
import qualified Control.Concurrent as C
import qualified Data.ByteString.Lazy as LB
import Data.Proxy ( Proxy(..) )
import qualified Data.Vector.Sized as V
import GHC.Typ... |
395be56c753458d5fba5646b1ffaba3baf139188e9803747069def2693f0ca1c | Zert/amqp-erlang-sample | dispatcher_broker.erl | -module(dispatcher_broker).
-author('Maxim Treskin').
-behaviour(gen_server).
-include("dispatcher.hrl").
-include_lib("amqp_client/include/amqp_client.hrl").
-export([start_link/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change... | null | https://raw.githubusercontent.com/Zert/amqp-erlang-sample/db6619a78a5eb1c3fe6b241b96b147f56de65f41/dispatcher/src/dispatcher_broker.erl | erlang | -module(dispatcher_broker).
-author('Maxim Treskin').
-behaviour(gen_server).
-include("dispatcher.hrl").
-include_lib("amqp_client/include/amqp_client.hrl").
-export([start_link/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change... | |
7b55c568dcc1ca65e10eeb27cab4dcdcb55cd956f96efca5bf371e43a8f788f5 | Opetushallitus/ataru | poista_valinnainen_kieli.cljs | (ns ataru.hakija.arvosanat.components.poista-valinnainen-kieli
(:require [ataru.application-common.components.link-component :as link-component]
[ataru.translations.translation-util :as translations]
[re-frame.core :as re-frame]
[schema.core :as s]))
(s/defn poista-valinnainen-kie... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/hakija/arvosanat/components/poista_valinnainen_kieli.cljs | clojure | (ns ataru.hakija.arvosanat.components.poista-valinnainen-kieli
(:require [ataru.application-common.components.link-component :as link-component]
[ataru.translations.translation-util :as translations]
[re-frame.core :as re-frame]
[schema.core :as s]))
(s/defn poista-valinnainen-kie... | |
04fb371d3b26ad64b493893e8b32d3fb9b9bb1a13b6064eb9effc75cf65aba2e | Tyruiop/syncretism | core.clj | (ns datops-compute.core
(:gen-class)
(:require
[clojure.string :as str]
[taoensso.timbre :as timbre :refer [info warn error]]
[datops-compute.db :as db]
[datops-compute.timeseries :as ts]))
(defn parse-args
[acc [arg v & r :as args]]
(cond (nil? arg)
acc
(= arg "--init-db")
... | null | https://raw.githubusercontent.com/Tyruiop/syncretism/2304feb60f04ef24dcd67239749494229a002f70/datops-compute/src/datops_compute/core.clj | clojure | (ns datops-compute.core
(:gen-class)
(:require
[clojure.string :as str]
[taoensso.timbre :as timbre :refer [info warn error]]
[datops-compute.db :as db]
[datops-compute.timeseries :as ts]))
(defn parse-args
[acc [arg v & r :as args]]
(cond (nil? arg)
acc
(= arg "--init-db")
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.