_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 |
|---|---|---|---|---|---|---|---|---|
d4aa5eb1419d1caed8fd44cded2769902006f709f41653fbd107133b393931bc | babashka/babashka.nrepl | utils.clj | (ns babashka.nrepl.impl.utils
{:author "Michiel Borkent"
:no-doc true}
(:refer-clojure :exclude [send])
(:require [bencode.core :refer [write-bencode]]
[sci.core :as sci])
(:import [java.io Writer PrintWriter StringWriter OutputStream BufferedWriter]))
(set! *warn-on-reflection* true)
(defn res... | null | https://raw.githubusercontent.com/babashka/babashka.nrepl/c8c8a766e026d5f87e0968a179dad70e13aa13ee/src/babashka/nrepl/impl/utils.clj | clojure | (ns babashka.nrepl.impl.utils
{:author "Michiel Borkent"
:no-doc true}
(:refer-clojure :exclude [send])
(:require [bencode.core :refer [write-bencode]]
[sci.core :as sci])
(:import [java.io Writer PrintWriter StringWriter OutputStream BufferedWriter]))
(set! *warn-on-reflection* true)
(defn res... | |
db4b6ecdbca3b0b0099516d867ec2be0ceb8c1b535464105b5baff195f331967 | ggreif/omega | ForallConstructor.hs | # language ScopedTypeVariables , DataKinds , GADTs , RankNTypes , TypeOperators , TypeFamilies , TypeInType , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts #
import Data.Kind
import Data.Proxy
import Data.Reflection
-- * Idea
-- Every rank-N forall gives rise to a type that onl... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/ForallConstructor.hs | haskell | * Idea
Every rank-N forall gives rise to a type that only unifies with itself
A value which has that type thus cannot be passed anywhere else.
This pretty much parallels the definition of data/type constructors.
So instead of having productions for defining constructors, why not
** Simplifying assumptions
- Disr... | # language ScopedTypeVariables , DataKinds , GADTs , RankNTypes , TypeOperators , TypeFamilies , TypeInType , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts #
import Data.Kind
import Data.Proxy
import Data.Reflection
only have those foralls and /consider/ them being constructo... |
aa074c8e41164c8215f907fdba10f31b252c6923bb43455dfa2d346155783469 | langston-barrett/CoverTranslator | Cl2Fol.hs | module Cl2Fol(cl2fol) where
import Cl.Abs as Cl
import Fol
import Maybe
cl2fol :: Cl.Module -> ([Fol.Def],[Fol.Prop])
cl2fol (Cl.Mod code prop) = (map c2f code, map p2f prop)
c2f :: Cl.Clause -> Fol.Def
c2f (Cl.Cl id ps gs e ls) = (c2fId id,folClause)
where folClause = case (defGuard, defLocal) of
... | null | https://raw.githubusercontent.com/langston-barrett/CoverTranslator/4172bef9f4eede7e45dc002a70bf8c6dd9a56b5c/src/Cl2Fol.hs | haskell | module Cl2Fol(cl2fol) where
import Cl.Abs as Cl
import Fol
import Maybe
cl2fol :: Cl.Module -> ([Fol.Def],[Fol.Prop])
cl2fol (Cl.Mod code prop) = (map c2f code, map p2f prop)
c2f :: Cl.Clause -> Fol.Def
c2f (Cl.Cl id ps gs e ls) = (c2fId id,folClause)
where folClause = case (defGuard, defLocal) of
... | |
46e31f5e4616aeb45c0f50b4e10ae89ddf8aa122ba0591bbdeca789af60e0141 | lspitzner/exference | String.hs | module Data.String where
type String = [Data.Char.Char]
class a where
-- fromString :: String -> a
| null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/String.hs | haskell | fromString :: String -> a | module Data.String where
type String = [Data.Char.Char]
class a where
|
7775e9f761b70e504e5810d0703d6d2bbea5acb81acf3688ab029f0979783d0e | timothypratley/leaderboardx | logging.cljs | (ns algopop.leaderboardx.app.logging
(:require [clojure.string :as string]
[reagent.session :as session]
[taoensso.encore :as encore]))
(defn debug [& args]
(encore/log (string/join " " args)))
(defn error [e & args]
(let [message (str (string/join " " args) ": " (pr-str e))]
(sessio... | null | https://raw.githubusercontent.com/timothypratley/leaderboardx/ad1719b3bb49fb7ab495ed833f1a451ebb3aec4d/src/algopop/leaderboardx/app/logging.cljs | clojure | (ns algopop.leaderboardx.app.logging
(:require [clojure.string :as string]
[reagent.session :as session]
[taoensso.encore :as encore]))
(defn debug [& args]
(encore/log (string/join " " args)))
(defn error [e & args]
(let [message (str (string/join " " args) ": " (pr-str e))]
(sessio... | |
e066c6663515e5eb7d9fcd4033ad027c60b45a6e2c152a23e48600aeaf07ef7c | callum-oakley/advent-of-code | 23.clj | (ns aoc.2021.23
(:require
[aoc.grid :as grid]
[aoc.search :as search]
[aoc.vector :refer [manhattan-distance]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(update-vals (->> s grid/parse (remove (comp #{\# \space} val)) (into {}))
#(case % \. nil %)))
(defn unfold [grid]
(asso... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/3cf44bcb8c57693639630f95f29d4abf49a6f0e4/src/aoc/2021/23.clj | clojure | (ns aoc.2021.23
(:require
[aoc.grid :as grid]
[aoc.search :as search]
[aoc.vector :refer [manhattan-distance]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(update-vals (->> s grid/parse (remove (comp #{\# \space} val)) (into {}))
#(case % \. nil %)))
(defn unfold [grid]
(asso... | |
db33d1b96ab50909bef0a0e740dd1b95cc211ad7ae47173d67179e48d9eb76c6 | redstarssystems/apptemplate | main_test.clj | (ns {{top/ns}}.{{main/ns}}-test
(:require [clojure.test :refer [deftest testing is]]
[matcho.core :refer [match]]))
(deftest ^:unit a-test
(testing "simple test."
(is (= 1 1))
(match {:a 1} {:a int?})))
| null | https://raw.githubusercontent.com/redstarssystems/apptemplate/62d106c5b272eedb6b93ce56730d98e7e1ac6de7/resources/org/rssys/apptemplate/test/main_test.clj | clojure | (ns {{top/ns}}.{{main/ns}}-test
(:require [clojure.test :refer [deftest testing is]]
[matcho.core :refer [match]]))
(deftest ^:unit a-test
(testing "simple test."
(is (= 1 1))
(match {:a 1} {:a int?})))
| |
b22ae60f00e73737d53c4568e921be8ce635b3e94dbd8e05f5d152c34b97e875 | flodihn/NextGen | libtree_sup.erl | %%----------------------------------------------------------------------
@author < >
%% @doc
%% This is the supervisor for the tree algoritm library 'libtree'.
%% @end
%%---------------------------------------------------------------------
-module(libtree_sup).
-behaviour(supervisor).
-export([
start_lin... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/AreaServer/src/libtree/libtree_sup.erl | erlang | ----------------------------------------------------------------------
@doc
This is the supervisor for the tree algoritm library 'libtree'.
@end
--------------------------------------------------------------------- | @author < >
-module(libtree_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
start_link() ->
supervisor:start_link({local, libtree_sup}, libtree_sup, []).
init([]) ->
RestartStrategy = one_for_one,
MaxRestarts = 10,
MaxSecondsBetweenRestarts = 30,
SupFlags =... |
d8d2956c5136339ed173d73b1662751eb1633ec0a9a09c72ee4913734f745978 | haskell-tools/haskell-tools | TySynConstraints.hs | # LANGUAGE FlexibleContexts , ConstraintKinds , TypeOperators , TypeFamilies , RankNTypes #
module TySynConstraints where
import GHC.Exts
import Definitions
* FlexibleContexts , FlexibleContexts , ConstraintKinds *
* FlexibleContexts , FlexibleContexts , ConstraintKinds *
* FlexibleContexts , FlexibleContexts , Cons... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/FlexibleContextsTest/TySynConstraints.hs | haskell | # LANGUAGE FlexibleContexts , ConstraintKinds , TypeOperators , TypeFamilies , RankNTypes #
module TySynConstraints where
import GHC.Exts
import Definitions
* FlexibleContexts , FlexibleContexts , ConstraintKinds *
* FlexibleContexts , FlexibleContexts , ConstraintKinds *
* FlexibleContexts , FlexibleContexts , Cons... | |
5d723af9b502bb64714f878635839b08d751dceb07a661d70919c258fb3feb00 | metametadata/carry | actions.cljs | (ns app.actions
(:require [app.model :as m]
[com.rpl.specter :as s]
[cljs.core.match :refer-macros [match]]))
(defn -update-todos*
[model pred f & args]
(s/transform [:todos s/ALL pred]
#(apply f % args)
model))
(defn -update-todo
[model id f & args]
(apply ... | null | https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/todomvc/src/app/actions.cljs | clojure | (ns app.actions
(:require [app.model :as m]
[com.rpl.specter :as s]
[cljs.core.match :refer-macros [match]]))
(defn -update-todos*
[model pred f & args]
(s/transform [:todos s/ALL pred]
#(apply f % args)
model))
(defn -update-todo
[model id f & args]
(apply ... | |
ca61e0639c1a03fd8b940e7c357e356fe1b4a6e47c3bbf65b46c4db7332d3bc8 | pfdietz/ansi-test | character.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Oct 5 12:52:18 2002
;;;; Contains: Tests associated with the class CHARACTER
(deftest character-class.1
(subtypep* 'character t)
t t)
(deftest base-char.1
(subtypep* 'base-char 'character)
t t)
(deftest base-char.2
(subtypep* 'base-char t)
t t... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/characters/character.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests associated with the class CHARACTER
based on #2
a case mapping
this comment applies to char-upcase.1 and char-upcase.2
Check that the names of various semi-standard characters are
names may refer to the same character (as is allowed by the standard,
If the... | Author :
Created : Sat Oct 5 12:52:18 2002
(deftest character-class.1
(subtypep* 'character t)
t t)
(deftest base-char.1
(subtypep* 'base-char 'character)
t t)
(deftest base-char.2
(subtypep* 'base-char t)
t t)
(deftest base-char.3
(every #'(lambda (c) (typep c 'base-char)) +standard-ch... |
6b9b3b209fb7881e4842d6efad1c9d8a9e5cbf0144b0b1de265f43b4f1ce4179 | bennn/iPoe | more.rkt | #lang ipoe/free-verse
More is a man of an angel's wit and singular learning.
I know not his fellow.
For where is the man of that gentleness, lowliness and affability?
And, as time requireth, a man of marvelous mirth and pastimes, and sometime of as sad gravity.
A man for all seasons.
| null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/free-verse/more.rkt | racket | #lang ipoe/free-verse
More is a man of an angel's wit and singular learning.
I know not his fellow.
For where is the man of that gentleness, lowliness and affability?
And, as time requireth, a man of marvelous mirth and pastimes, and sometime of as sad gravity.
A man for all seasons.
| |
c9b5c931a128b9da03f62d021246d77ddb03a30df6600d2b01ec96be14eb4b3f | np/hlatex | Kit.hs | # LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell #
# OPTIONS_GHC -F -pgmF frquotes #
{-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-unused-imports #-}
module Kit where
-- The writer monad is used to get the "do" notation
-- for writing environments like slides or itemizes.
import Control.Monad.Wr... | null | https://raw.githubusercontent.com/np/hlatex/4f2212c5db5e10dab7f6cbb9cf47a041b3320176/examples/ds/Kit.hs | haskell | # OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-unused-imports #
The writer monad is used to get the "do" notation
for writing environments like slides or itemizes.
String literals are overloaded. This module contains the fromString
function for example.
Getting ⊕ (ø is defined below)
# DEPRECATED todo "You... | # LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell #
# OPTIONS_GHC -F -pgmF frquotes #
module Kit where
import Control.Monad.Writer
import Control.Applicative
import Data.String
import Data.Monoid.Unicode ((⊕))
import Language.LaTeX
import qualified Language.LaTeX.Builder as B
import qualified Language.L... |
7d865ac1037d5738cad792b9065c473d360ef0764b8f5252b3bec9c5034d7e9d | lanl/APPFL | AST.hs | # LANGUAGE TupleSections #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
module MHS.AST
(
Pattern (..),
Defn (..),
Constr (..),
Exp (..),
Atm (..),
Clause,
isODefn,
isTDefn... | null | https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/codegen/MHS/AST.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeSynonymInstances #
object definition
variable bound to
expression being bound
Type, if signature present
datatype definition
List of constructors
type signature definition
variable to give type information for
Type ... | # LANGUAGE TupleSections #
# LANGUAGE FlexibleInstances #
module MHS.AST
(
Pattern (..),
Defn (..),
Constr (..),
Exp (..),
Atm (..),
Clause,
isODefn,
isTDefn,
isDDefn,
partitionDefs,
unfoldEAp,
saturatedPrimAp,
isDefaultPat,
hidesPats,
hidesPat,
isEFn,
isEAt,
int... |
d015262e0edcfa70abf34a94732575937e2119260e32c77c00387fc6f4f8dcea | mirage/wodan | location.mli | type t
exception TooLarge
exception NotUnsigned
val zero : t
val one : t
val succ : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val pred : t -> t
val compare : t -> t -> int
val shift_right_logical : t -> int -> t
val rem : t -> t -> t
val pp : Format.formatter -> t -> unit
val to_string : t -> stri... | null | https://raw.githubusercontent.com/mirage/wodan/fa37883ed73a1e9d7a05781453caf926134edcf3/src/wodan/location.mli | ocaml | type t
exception TooLarge
exception NotUnsigned
val zero : t
val one : t
val succ : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val pred : t -> t
val compare : t -> t -> int
val shift_right_logical : t -> int -> t
val rem : t -> t -> t
val pp : Format.formatter -> t -> unit
val to_string : t -> stri... | |
c18634afa788658534fa742a02c15334c065cee1faa61a7eefdddddd8f03b0d8 | serokell/tzbot | Slack.hs | SPDX - FileCopyrightText : 2022 >
--
SPDX - License - Identifier : MPL-2.0
module TzBot.Slack
( BotM(..)
, runBotM
, AppLevelToken(..)
, BotToken(..)
, BotState(..)
, BotException(..)
, getUserCached
, getChannelMembersCached
, sendEphemeralMessage
, handleTooManyRequests
, sendMessage
,... | null | https://raw.githubusercontent.com/serokell/tzbot/635077e77d6c85ab9c1711076aa1d5970444e7aa/src/TzBot/Slack.hs | haskell |
| Get a user's info.
| Get a user's info using cache.
| Get a list of a channel's members.
| Post an "ephemeral message", a message only visible to the given user.
| Post a message to a given channel.
| Get a message by its id and channel id
| Get a message by its id, channel id and thread id
returns the requi... | SPDX - FileCopyrightText : 2022 >
SPDX - License - Identifier : MPL-2.0
module TzBot.Slack
( BotM(..)
, runBotM
, AppLevelToken(..)
, BotToken(..)
, BotState(..)
, BotException(..)
, getUserCached
, getChannelMembersCached
, sendEphemeralMessage
, handleTooManyRequests
, sendMessage
, re... |
438992d200b03370cd8694f6feb9f31d50c6d5ff496dd3c11ad298208e43d3e7 | project-oak/hafnium-verification | interproc.ml |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/biabduction/interproc.ml | ocaml | * Interprocedural Analysis
* A node with a number of visits
* Set of nodes with number of visits
higher id is better
smaller means higher priority
shorter distance to exit is better
visited fewer times is better
* Table for the results of the join operation on nodes.
* Table of join results
* Pathset todo ... |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
c8285f0f2a9aea26c6f64e3c5b7132ba09a963a63d815d07a471c58097690bd8 | jeffshrager/biobike | math-utils.lisp | -*- Package : utils ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :utils)
;;; +=========================================================================+
| Copyright ( c ) 2002 - 3005 JP , , |
;;; | |
;... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Utils/math-utils.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :utils)
| Copyright ( c ) 2002 - 3005 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to... |
a3ba8ed7de6860481f5dd103f1760fdcc112c2c88376069f26ad34f21065ae19 | jvf/scalaris | merkle_tree.erl | 2011 - 2014 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/rrepair/merkle_tree.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 or implied.
See the License for the specific language gov... | 2011 - 2014 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc tree implementation
-module(merkle_tree).
-author('').
-vsn('$Id$').
-include("record_helpers.hrl").
-in... |
6c43019ae52f151b698750b78642aedaaa9aa0180f9210f3cbe5e36200fb1346 | ezyang/compact | Serialize.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE MagicHash #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Data.Compact.Serialize
( writeCompact, unsafeReadCompact
, hPutCompact, hUnsafeGetCompact
) where
import Type.Reflection
import Cont... | null | https://raw.githubusercontent.com/ezyang/compact/2ce0c0fd2e57e3385fb84ce47d1704720580c4e4/Data/Compact/Serialize.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
Serves as a very rudimentary integrity check.
| Write a compact region to a file. The resulting file can
be read back into memory using 'unsafeReadCompact'.
| Write a compact region to a 'Handle'. The compact region
can be read out of the handle by using 'hUnsafeGetCom... | # LANGUAGE FlexibleContexts #
# LANGUAGE MagicHash #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
module Data.Compact.Serialize
( writeCompact, unsafeReadCompact
, hPutCompact, hUnsafeGetCompact
) where
import Type.Reflection
import Control.Monad
import Data.Monoid
import Data.Word
impor... |
6c06db8df58e563db93969f3d270aaa8e3d027987b011c871132bee829b41014 | nedap/speced.def | defprotocol.cljc | (ns unit.nedap.speced.def.defprotocol
(:refer-clojure :exclude [defprotocol])
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
#?(:clj [clojure.test :refer [deftest testing are is use-fixtures]] :cljs [cljs.test :refer-macros [deftest testing is are] :refer [use-fixtures]])
... | null | https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/test/unit/nedap/speced/def/defprotocol.cljc | clojure | (ns unit.nedap.speced.def.defprotocol
(:refer-clojure :exclude [defprotocol])
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
#?(:clj [clojure.test :refer [deftest testing are is use-fixtures]] :cljs [cljs.test :refer-macros [deftest testing is are] :refer [use-fixtures]])
... | |
2d0f84f7b837f3ab28801de7ad0108c07d116865de5841ad959d037665d247df | kendru/restful-clojure | db.clj | (ns restful-clojure.db
(:use korma.db)
(:require [environ.core :refer [env]]))
(defdb db (postgres {:db (get env :restful-db "restful_clojure")
:user (get env :restful-db-user "restful_clojure")
:password (get env :restful-db-pass "")
:host (get env :r... | null | https://raw.githubusercontent.com/kendru/restful-clojure/d321066aa368516aec28a4102cf013f764548505/restful-clojure/src/restful_clojure/db.clj | clojure | (ns restful-clojure.db
(:use korma.db)
(:require [environ.core :refer [env]]))
(defdb db (postgres {:db (get env :restful-db "restful_clojure")
:user (get env :restful-db-user "restful_clojure")
:password (get env :restful-db-pass "")
:host (get env :r... | |
d4ec5428865797d0a25f3f9103c777209794e18e4718ae9a5038ab9d4b94d33a | CodeJugalbandi/FunctionalProgramming | Test.rkt | #reader(lib "htdp-advanced-reader.ss" "lang")
((modname Test) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define L (rest (build-list 25 (lambda (x) (* x 2)))))
L
| null | https://raw.githubusercontent.com/CodeJugalbandi/FunctionalProgramming/2a6bf7f26852077a3e9bc71d508f4c320cd91fc9/tm-langs/Test.rkt | racket | #reader(lib "htdp-advanced-reader.ss" "lang")
((modname Test) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define L (rest (build-list 25 (lambda (x) (* x 2)))))
L
| |
ae29c1fe8d516291bee43ad283665aba860491438b29b9d8a0c1332637b1f762 | jrh13/hol-light | cvectors.ml | (* ========================================================================= *)
(* A library for vectors of complex numbers. *)
Much inspired from HOL - Light real vector library < " vectors.ml " > .
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Multivariate/cvectors.ml | ocaml | =========================================================================
A library for vectors of complex numbers.
... | Much inspired from HOL - Light real vector library < " vectors.ml " > .
( c ) Copyright , & 2011 - 13
Hardware Verification Group ,
Concordia University
- : n - dimensional dot produ... |
e23129931eae7b1e94f305195ffcbf84dc9b4de3cd0a5baeca8247812ec15c82 | bmourad01/ocamlchess | move.mli | * This module implements a data structure for representing Chess moves .
Note that illegal moves can be instantiated with this datatype ; the only
information that is stored is the source square , destination square , and
the ( optional ) promotion kind .
For the legal moves , see the [ Positi... | null | https://raw.githubusercontent.com/bmourad01/ocamlchess/6c7214f5b709d9b1327b384a057fbdb2b5a9c3db/chess/src/move.mli | ocaml | * The number of bits required to store the move information.
* Piece promotion.
* [of_piece_kind k] returns the associated promotion for piece kind [k].
Raises [Invalid_argument] if [k] is not a valid promotion kind.
* [to_piece_kind p] returns the associated piece kind for promotion [p].
* Returns the human-... | * This module implements a data structure for representing Chess moves .
Note that illegal moves can be instantiated with this datatype ; the only
information that is stored is the source square , destination square , and
the ( optional ) promotion kind .
For the legal moves , see the [ Positi... |
e84b21676644baaa5d34fca91ba1bdcc63532596e13a0c49517cd79b8b6a6661 | papertrail/slack-hooks | scout.clj | (ns slack-hooks.service.scout
(:require [clojure.data.json :as json]
[slack-hooks.slack :as slack]))
(def scout-username
(or
(System/getenv "SCOUT_USERNAME")
"Scout"))
(def scout-avatar
(System/getenv "SCOUT_AVATAR"))
(def scout-slack-url
(System/getenv "SCOUT_SLACK_URL"))
(defn al... | null | https://raw.githubusercontent.com/papertrail/slack-hooks/e9cfdbfee40e678be956416366684ee22d6cb282/src/slack_hooks/service/scout.clj | clojure | can be [start|end|oneoff] -- "oneoff" is for alerts generated internally by plugins
Plugin that's alerting | (ns slack-hooks.service.scout
(:require [clojure.data.json :as json]
[slack-hooks.slack :as slack]))
(def scout-username
(or
(System/getenv "SCOUT_USERNAME")
"Scout"))
(def scout-avatar
(System/getenv "SCOUT_AVATAR"))
(def scout-slack-url
(System/getenv "SCOUT_SLACK_URL"))
(defn al... |
91dead6f55ecee13f602c669dc51c4fe96308bc74b25542394cfca3bb300bf06 | Bost/corona_cases | common.clj | ( printf " Current - ns [ % s ] loading % s ... \n " * ns * ' corona.msg.text.common )
(ns corona.msg.text.common
(:require
[clojure.string :as cstr]
[corona.api.expdev07 :as data]
[corona.cases :as cases]
[corona.common :as com]
[corona.country-codes :as ccc]
[corona.lang :as lang]
[corona.te... | null | https://raw.githubusercontent.com/Bost/corona_cases/b7f62d49b11d9c944e08b3e2e61b978b277e60d1/src/corona/msg/text/common.clj | clojure | (set! *warn-on-reflection* true)
= > 3
U+2005   Four-Per-Em Space
"\uFF05" "\uFE6A"
i.e. com/markdown
"Try" spacer
lang/listings ": " | ( printf " Current - ns [ % s ] loading % s ... \n " * ns * ' corona.msg.text.common )
(ns corona.msg.text.common
(:require
[clojure.string :as cstr]
[corona.api.expdev07 :as data]
[corona.cases :as cases]
[corona.common :as com]
[corona.country-codes :as ccc]
[corona.lang :as lang]
[corona.te... |
bdcbba554b620d20de77f3d974e90a0f3db9d7c2eb5dddc0f6720fd2e4bb0d1b | weblocks-framework/weblocks | init-message.lisp | ;; (in-package :app)
;; (defclass init-message-presentation (input-presentation)
( ( message : accessor get - init - message : initarg : message : initform " Value " ) ) )
;; (defmethod render-view-field-value (value (presentation init-message-presentation)
;; (field form-vie... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/nunb/init-message.lisp | lisp | (in-package :app)
(defclass init-message-presentation (input-presentation)
(defmethod render-view-field-value (value (presentation init-message-presentation)
(field form-view-field) (view form-view) widget obj
&rest args &key intermediate-val... |
( ( message : accessor get - init - message : initarg : message : initform " Value " ) ) )
( unless value ( setf value ( get - init - message presentation ) ) )
: ( input - presentation - max - length presentation ) ) )
( break ( form... |
ef4e707b66074ee60d3cfae6d4e1cdbc9f7ee1dd2ad0101246a3a8bf7a2e105b | distrap/lambdadrive | Modulation.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module LDrive.Control.Modulation where
import Ivory.Language
import Ivory.Stdlib
import LDrive.Platforms (tim_period_clocks)
import LDrive.Control.SVM (svm)
import LDrive.Ivory.Types.Svm
current_modulation :: (GetAlloc eff ~ 'Scope s)
=> IFloat
... | null | https://raw.githubusercontent.com/distrap/lambdadrive/2bbf6b173fbc1c6d1f809ee4f95ec0bf737d7064/src/LDrive/Control/Modulation.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module LDrive.Control.Modulation where
import Ivory.Language
import Ivory.Stdlib
import LDrive.Platforms (tim_period_clocks)
import LDrive.Control.SVM (svm)
import LDrive.Ivory.Types.Svm
current_modulation :: (GetAlloc eff ~ 'Scope s)
=> IFloat
... | |
a7608d80045af369b5932942a1bb9d42225fcd70581f205bf4725f1f59cb7b82 | instedd/planwise | layers.cljs | (ns leaflet.layers
(:require [crate.core :as crate]
[goog.object]))
(defn- js-data
[data]
(cond
(string? data) (js/JSON.parse data)
(vector? data) (clj->js (mapv #(if (string? %) (js/JSON.parse %) %) data))
:else data))
(defn- geojson-layer
[props]
(let [attrs (dissoc... | null | https://raw.githubusercontent.com/instedd/planwise/824b3c630ae6ac15150105fefa99515f5c5c39f0/client/src/leaflet/layers.cljs | clojure | layers can only be updated if the layer type has not changed
update is not possible by default
deactivate markers in cluster to avoid mouseover events/tooltips while the animation is running
re-activate markers after they are fully spiderfied
TODO(gus): the cluster-icon-fn interface can be improved; in particular ... | (ns leaflet.layers
(:require [crate.core :as crate]
[goog.object]))
(defn- js-data
[data]
(cond
(string? data) (js/JSON.parse data)
(vector? data) (clj->js (mapv #(if (string? %) (js/JSON.parse %) %) data))
:else data))
(defn- geojson-layer
[props]
(let [attrs (dissoc... |
99767bf9d4c1c45d187e01142a25e7dfbb7fcbd401845ee6dec08d831334ef9b | hmac/kite | Gen.hs | module Data.Name.Gen where
import Hedgehog ( Gen )
import qualified Hedgehog.Gen as G
import qualified Hedgehog.Range as R
import Data.Name
import Syn.Parse ( keywords )
import Util
genName :: Gen Name
... | null | https://raw.githubusercontent.com/hmac/kite/f58758f20310e23cb50eb41537ec04bfa820cc90/src/Data/Name/Gen.hs | haskell | strings, which is what 'mkPackageName' accepts. | module Data.Name.Gen where
import Hedgehog ( Gen )
import qualified Hedgehog.Gen as G
import qualified Hedgehog.Range as R
import Data.Name
import Syn.Parse ( keywords )
import Util
genName :: Gen Name
... |
75a48f4d81b88e0c920da408c90226e0f2a3beb2bd58121a6276d830fb3bbfa8 | cracauer/sbcl-ita | array-tran.lisp | ;;;; array-specific optimizers and transforms
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public do... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/src/compiler/array-tran.lisp | lisp | array-specific optimizers and transforms
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
utilities for optimizing array operations
GIVE-UP-IR1-TRANSFORM if the upgraded element type can't b... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
Return UPGRADED - ARRAY - ELEMENT - TYPE for LVAR , or do
(defun upgraded-element-type-specifier-or-... |
ca3a0bad83ff9d7e5bdea876526a8624375125df005da195ee845172f3c749b6 | infinisil/on-demand-minecraft | Minecraft.hs | module Minecraft
( module Minecraft.Types
, module Minecraft.Packet
, module Minecraft.Effect
, module Minecraft.Protocol
) where
import Minecraft.Types
import Minecraft.Packet
import Minecraft.Effect
import Minecraft.Protocol
| null | https://raw.githubusercontent.com/infinisil/on-demand-minecraft/303367d49057eed7a4a8889fe5232394934b3923/lib/Minecraft.hs | haskell | module Minecraft
( module Minecraft.Types
, module Minecraft.Packet
, module Minecraft.Effect
, module Minecraft.Protocol
) where
import Minecraft.Types
import Minecraft.Packet
import Minecraft.Effect
import Minecraft.Protocol
| |
56785d437204ae82ac3c3171d9bec4da5e559f8b9f758ef7667c207179d80549 | 2600hz-archive/whistle | mustache.erl | %% The MIT License
%%
Copyright ( c ) 2009 < >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modif... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/utils/rebar/src/mustache.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( c ) 2009 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR... |
a71ec1b62577eb70e40c93c0c14fcb26334021870e664da23a6fef0eb8fc74e3 | ryanslade/influxdb-ocaml | client.mli | val ping : ?port:int -> string -> Influxdb.Protocol.ping_response Lwt.t
* the host
val write :
?precision:Influxdb.Precision.t ->
?port:int ->
database:string ->
host:string ->
Influxdb.Point.t list ->
unit Lwt.t
(** Write a list of points to the host supplied *)
| null | https://raw.githubusercontent.com/ryanslade/influxdb-ocaml/a925f0ea8a04a6a50f16d9fa5b7cd664e954d213/influxdb-lwt/src/client.mli | ocaml | * Write a list of points to the host supplied | val ping : ?port:int -> string -> Influxdb.Protocol.ping_response Lwt.t
* the host
val write :
?precision:Influxdb.Precision.t ->
?port:int ->
database:string ->
host:string ->
Influxdb.Point.t list ->
unit Lwt.t
|
405a8be11dad4a1ca4f440679659c473eb87f8a5130289b4ef054e149e44dd0e | stonebuddha/eopl | syntax.mli | type program =
| AProgram of top_level list
and top_level =
| ExpTop of expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.t
| VarExp of string * Ploc.t
| LetExp ... | null | https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/LET/syntax.mli | ocaml | type program =
| AProgram of top_level list
and top_level =
| ExpTop of expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.t
| VarExp of string * Ploc.t
| LetExp ... | |
5fdc911bb8c47d3ddee1e5fcacb8e387b6ffeb3d03b8d1e33e265c7dcdd81178 | rescript-lang/rescript-compiler | belt_MapInt.mli | # 4 "others/map.cppo.mli"
type key = int
# 8 "others/map.cppo.mli"
type 'value t
(** The type of maps from type `key` to type `'value`. *)
val empty: 'v t
val isEmpty: 'v t -> bool
val has: 'v t -> key -> bool
val cmpU: 'v t -> 'v t -> ('v -> 'v -> int [@bs]) -> int
val cmp: 'v t -> 'v t -> ('v -> 'v -> int) -> int... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/cada0274781511bf92fcc2e32a55b0af48ad1b06/jscomp/others/belt_MapInt.mli | ocaml | * The type of maps from type `key` to type `'value`.
*
`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,
where `k1 ... kN` are the keys of all bindings in `m`
(in increasing order), and `d1 ... dN` are the associated data.
* `every m p` checks if all the bindings of the map
satisfy the predicate `p`. ... | # 4 "others/map.cppo.mli"
type key = int
# 8 "others/map.cppo.mli"
type 'value t
val empty: 'v t
val isEmpty: 'v t -> bool
val has: 'v t -> key -> bool
val cmpU: 'v t -> 'v t -> ('v -> 'v -> int [@bs]) -> int
val cmp: 'v t -> 'v t -> ('v -> 'v -> int) -> int
val eqU: 'v t -> 'v t -> ('v -> 'v -> bool [@bs]) -> boo... |
a01ac8ca6927e19e79492bc8d4712af94f15fcc65dc16def4838d03b3d88f388 | svdm/ClojureGP | test_core.clj | Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php) which
;; can be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound by t... | null | https://raw.githubusercontent.com/svdm/ClojureGP/266e501411b37297bdeb082913df63ececa8515c/test/cljgp/test_core.clj | clojure | Public License 1.0 (-1.0.php) which
can be found in the file epl-v10.html at the root of this distribution. By
using this software in any fashion, you are agreeing to be bound by the
terms of this license. You must not remove this notice, or any other, from
this software.
For generate-run, test-evolve-future... | Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
(ns test.cljgp.test-core
(:use clojure.test
test.helpers
cljgp.core
[cljgp.generate :only [generate-pop]]))
(deftest test-evolve-future-generations
(let ... |
df44ad2c7d1a4140341a44af847183ee40942b5a15785ab7025994561cb7bccb | elaforge/karya | Bali.hs | Copyright 2014
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Calls for Balinese instruments .
module Cmd.Instrument.Bali where
import qualified Data.List as List
import qualified Util.Doc as Doc
import qualified Cmd.Cmd as Cmd
import qualified... | null | https://raw.githubusercontent.com/elaforge/karya/a262a253663c9ebc6c811fc4aedd5fec04e27fde/Cmd/Instrument/Bali.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Dispatch MIDI through to both polos and sangsih instruments.
This only needs to invert if the transform needs it. Otherwise,
mute should do that. | Copyright 2014
| Calls for Balinese instruments .
module Cmd.Instrument.Bali where
import qualified Data.List as List
import qualified Util.Doc as Doc
import qualified Cmd.Cmd as Cmd
import qualified Cmd.InputNote as InputNote
import qualified Cmd.Instrument.MidiInst as MidiInst
import qualified Cmd.MidiThru as... |
638bd1e8972b25f7d544ef0f4f3c61bfa1b868b5557b4309b2bd857b4004ba5e | laurocaetano/programming-in-haskell | 7.hs | type Bit = Int
unfold p h t x
| p x = []
| otherwise = h x : unfold p h t (t x)
chop8' :: [Bit] -> [[Bit]]
chop8' = unfold null (take 8) (drop 8)
map' :: (a -> b) -> [a] -> [b]
map' f = unfold null (f . head) tail
iterate' :: (a -> a) -> a -> [a]
iterate' f = unfold (const False) id f
| null | https://raw.githubusercontent.com/laurocaetano/programming-in-haskell/8b54f802c3949fab8bcb7460ab37229f0c52449a/ch-07/7.hs | haskell | type Bit = Int
unfold p h t x
| p x = []
| otherwise = h x : unfold p h t (t x)
chop8' :: [Bit] -> [[Bit]]
chop8' = unfold null (take 8) (drop 8)
map' :: (a -> b) -> [a] -> [b]
map' f = unfold null (f . head) tail
iterate' :: (a -> a) -> a -> [a]
iterate' f = unfold (const False) id f
| |
05a2daee414a80b95f4e698757f5d9e43e4ad5f9d4b4728c13fba23bc0e5c9fd | returntocorp/semgrep | parse_js.ml |
*
* Copyright ( C ) 2010 , 2013 Facebook
* Copyright ( C ) 2019 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exceptio... | null | https://raw.githubusercontent.com/returntocorp/semgrep/ecfb452fde8fab7afffa5d2cdfc5ef7c1da91ad9/languages/javascript/menhir/parse_js.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Error diagnostic
**************************************************************... |
*
* Copyright ( C ) 2010 , 2013 Facebook
* Copyright ( C ) 2019 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exceptio... |
5481cfe07230b862d3044dec4aa1b7d65072b61c51aefe7aea985746a16f25ac | mrkkrp/megaparsec | Error.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
{-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #... | null | https://raw.githubusercontent.com/mrkkrp/megaparsec/69d4c46e36732df5072782903610e0bee5df34e8/Text/Megaparsec/Error.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE Safe #
|
License : FreeBSD
Stability : experimental
Portability : portable
instead of 'String'-based ones. This gives a lot of flexibility in
describing what exactly went wrong as well as a way to return arbitrary
data in case of fai... | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
Module : Text . . Error
Copyright : ... |
5076763ace92304334a6815e6238322c027aa2864c970d8b8774dd3fee7b5065 | josephwilk/stereotype | resolve_map.clj | (ns stereotype.resolve-map)
(defn- arg-count [f]
(let [m (first (.getDeclaredMethods (class f)))
p (.getParameterTypes m)]
(alength p)))
(defn- resolve-unparameterized-fn [value]
(if (fn? value)
(if (= (arg-count value) 0)
(value)
value)
value))
(defn- resolve-parameterized-fn [attri... | null | https://raw.githubusercontent.com/josephwilk/stereotype/49c845ec7e5b401f5cd6c6e8de6c79fbe60eade8/src/stereotype/resolve_map.clj | clojure | (ns stereotype.resolve-map)
(defn- arg-count [f]
(let [m (first (.getDeclaredMethods (class f)))
p (.getParameterTypes m)]
(alength p)))
(defn- resolve-unparameterized-fn [value]
(if (fn? value)
(if (= (arg-count value) 0)
(value)
value)
value))
(defn- resolve-parameterized-fn [attri... | |
780b7e82f6c592d677bb21e87b090d7676f4d1c26097db1be3659f2d811b7978 | DanielG/ghc-mod | Crash.hs | module Crash where
test :: Maybe a
test x = undefined
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/case-split/Crash.hs | haskell | module Crash where
test :: Maybe a
test x = undefined
| |
e9a76708c3f50d9801b1afcab6227a57250bd4b38df170121a42002f6eeda704 | nuvla/api-server | session_template_mitreid_lifecycle_test.clj | (ns sixsq.nuvla.server.resources.session-template-mitreid-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.lifecycle-test-utils :as ltu]
[sixsq.nuvla.server.resources.session-template :as st]
[sixsq.nuvla.serv... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/session_template_mitreid_lifecycle_test.clj | clojure | (ns sixsq.nuvla.server.resources.session-template-mitreid-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.lifecycle-test-utils :as ltu]
[sixsq.nuvla.server.resources.session-template :as st]
[sixsq.nuvla.serv... | |
569ab6f2a0d3404051679894260a9defe32068ee7c8ac51016b46758e2c33ed1 | ocsigen/ocaml-eliom | test.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-queue/test.ml | ocaml | ************************************************************************
OCaml
... | , Jane Street Europe
Copyright 2015 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Q = struct
include Queue
let to_list q = fold (fun l x -> x :: l) [] q |> List.rev
end
let does... |
55cd9cd086bfa135ac46b8a036289bc9e23b5f72f952676337b4dc112f02fd28 | slyrus/epigraph | simple-edge-list-graph.lisp | ;;; file: simple-edge-list-graph.lisp
author : harmon
;;;
Copyright ( c ) 2011 ( )
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code mu... | null | https://raw.githubusercontent.com/slyrus/epigraph/b70bd9b73aee6e245794daf68d28d869722841b8/simple-edge-list-graph.lisp | lisp | file: simple-edge-list-graph.lisp
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... | author : harmon
Copyright ( c ) 2011 ( )
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :epigraph)
(defclass simple-edge-list-graph (graph)
((node-hash :accessor graph-node-hash
:initarg :no... |
f3e04c4368253bbca5d257c71a25389c9efe0bda8cc178b660fba72ecc6b7dfb | mbutterick/beautiful-racket | run.rkt | #lang br
(require "line.rkt" "struct.rkt")
(provide run)
(define (run line-table)
(define line-vec
(list->vector (sort (hash-keys line-table) <)))
(with-handlers ([end-program-signal? (λ (exn-val) (void))])
(for/fold ([line-idx 0])
([i (in-naturals)]
#:break (>= line-idx (vecto... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-2a/run.rkt | racket | #lang br
(require "line.rkt" "struct.rkt")
(provide run)
(define (run line-table)
(define line-vec
(list->vector (sort (hash-keys line-table) <)))
(with-handlers ([end-program-signal? (λ (exn-val) (void))])
(for/fold ([line-idx 0])
([i (in-naturals)]
#:break (>= line-idx (vecto... | |
9826d95e9d5ec0a220e53330b573ad20c12de60ee0536106e605e6bf749b81b8 | dparis/gen-phzr | exponential.cljs | (ns phzr.easing.exponential
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn in
"Exponential ease-in.
Parameters:
* exponential (Phaser.Easing.Exponential) - Targeted instance for method
* k (number) - The value t... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/easing/exponential.cljs | clojure | (ns phzr.easing.exponential
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn in
"Exponential ease-in.
Parameters:
* exponential (Phaser.Easing.Exponential) - Targeted instance for method
* k (number) - The value t... | |
c4ceeb9b2b9e945e7f0be869ac03fd482aaaf703883ef4751aaa672569206416 | adam-james-v/forge | svg.cljc | (ns forge.compile.svg
(:require [clojure.java.shell :refer [sh]]
[clojure.string :as str]
[svg-clj.elements :as svg]
[svg-clj.path :as path]
[svg-clj.transforms :as tf]
[svg-clj.tools :as tools]
[hiccup.core :refer [html]]
[forge.util... | null | https://raw.githubusercontent.com/adam-james-v/forge/ab86b3e82befc139dcb79bc80051b35c21b27ea3/src/forge/compile/svg.cljc | clojure | multimethod | (ns forge.compile.svg
(:require [clojure.java.shell :refer [sh]]
[clojure.string :as str]
[svg-clj.elements :as svg]
[svg-clj.path :as path]
[svg-clj.transforms :as tf]
[svg-clj.tools :as tools]
[hiccup.core :refer [html]]
[forge.util... |
b8239f0bc4e34ef057a2623c12ab344e480fa0b2df0a91c5fd063453fafdd9d1 | t-sin/rosa | util.lisp | (in-package :cl-user)
(uiop:define-package :rosa/tests/util
(:use :cl)
(:export :plist-equal))
(in-package :rosa/tests/util)
(defun plist-equal (plist1 plist2)
(and (= (length plist1) (length plist2))
(loop
:for (k v) :on plist1 :by #'cddr
:always (equalp (getf plist1 k)
... | null | https://raw.githubusercontent.com/t-sin/rosa/dfa505fa035ccc1811e575034ba79dbb36d9c159/tests/util.lisp | lisp | (in-package :cl-user)
(uiop:define-package :rosa/tests/util
(:use :cl)
(:export :plist-equal))
(in-package :rosa/tests/util)
(defun plist-equal (plist1 plist2)
(and (= (length plist1) (length plist2))
(loop
:for (k v) :on plist1 :by #'cddr
:always (equalp (getf plist1 k)
... | |
39c7410928fe7cb28ca3bf382d30c83a0b432fa1c0acbaa375d992023866005f | skanev/playground | 08.scm | SICP exercise 3.08
;
; When we defined the evaluation model in section 1.1.3, we said that the
first step in evaluating an expression is to evaluate its subexpressions .
; But we never specified the order in which the subexpressions should be
; evaluated (e.g., left to right or right to left). When we introduce
; a... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/08.scm | scheme |
When we defined the evaluation model in section 1.1.3, we said that the
But we never specified the order in which the subexpressions should be
evaluated (e.g., left to right or right to left). When we introduce
assignment, the order in which the arguments to a procedure are evaluated
can make a difference to the ... | SICP exercise 3.08
first step in evaluating an expression is to evaluate its subexpressions .
return 1 if the arguments are evaluated from right to left .
(define f
(let ((current 0))
(lambda (number)
(let ((existing current))
(set! current number)
existing))))
|
e2e41735dd138bf9183723ce409f6257f9bf07fe496558946742286e2c2331e6 | hspec/hspec-laws | LawsSpec.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Test.Hspec.LawsSpec (main, spec) where
import Test.Hspec
import Test.Hspec.Runner
import Test.QuickCheck
import Data.Monoid
import Test.Hspec.Laws
main :: IO ()
main = hspec spec
newtype Minus = Minus Int
deriving (Eq... | null | https://raw.githubusercontent.com/hspec/hspec-laws/4d04662e5d6175c101a1ffad22bb297d5b5e7118/test/Test/Hspec/LawsSpec.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module Test.Hspec.LawsSpec (main, spec) where
import Test.Hspec
import Test.Hspec.Runner
import Test.QuickCheck
import Data.Monoid
import Test.Hspec.Laws
main :: IO ()
main = hspec spec
newtype Minus = Minus Int
deriving (Eq... | |
788b0793f7b04005aea16f40ff15613abe6d8eb1bc0aaf5dc6cc870fb1ce3053 | cyborgize/es-cli | gen_version.ml | let () = Mybuild.Version.save Sys.argv.(1)
| null | https://raw.githubusercontent.com/cyborgize/es-cli/b09ce1eb3deb5cc68b72df8fbd93e7f6fb4d52c5/src/gen_version.ml | ocaml | let () = Mybuild.Version.save Sys.argv.(1)
| |
e40787c6d512b9025bde67c89183929d6854969cccb5130c9e9525825dc6e512 | bloomberg/blpapi-hs | CorrelationId.hs | |
Module : Finance . Blpapi . CorrelationId
Description : I d that can be associated with Requests or Subscriptions
Copyright : Bloomberg Finance L.P.
License : MIT
Maintainer :
Stability : experimental
Portability : * nix , windows
Module : Finance.Blpapi.CorrelationId
Descript... | null | https://raw.githubusercontent.com/bloomberg/blpapi-hs/a4bdff86f3febcf8b06cbc70466c8abc177b973a/src/Finance/Blpapi/CorrelationId.hs | haskell | | Create 'CorrelationId' by providing an integer value and
can then be used with any subscription or request. Any updates or responses | |
Module : Finance . Blpapi . CorrelationId
Description : I d that can be associated with Requests or Subscriptions
Copyright : Bloomberg Finance L.P.
License : MIT
Maintainer :
Stability : experimental
Portability : * nix , windows
Module : Finance.Blpapi.CorrelationId
Descript... |
2778518cac440ea3303a95d93259a69badfbd8991765bf5d156b05b57877487b | netguy204/clojure-gl | project.clj | (defproject clojure-gl "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.lwjgl.lwjgl/lwjgl "2.8.2"]
[org.lwjgl.lwjgl/lwjgl_util "2.8.2"]
[com.nullprogram/native-guide "0.2"]]
:main clojure-gl.main) | null | https://raw.githubusercontent.com/netguy204/clojure-gl/055f73baf1af0149191f3574ad82f35017c532fc/project.clj | clojure | (defproject clojure-gl "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.lwjgl.lwjgl/lwjgl "2.8.2"]
[org.lwjgl.lwjgl/lwjgl_util "2.8.2"]
[com.nullprogram/native-guide "0.2"]]
:main clojure-gl.main) | |
8604b4a9e676f2d6bfd97b1e266dbab9169a33f69c521e2936577852a7862857 | vise890/lein-pocketbook | project.clj | (defproject lein-pocketbook "0.1.4-SNAPSHOT"
:description "A Leiningen plugin to add sources / javadocs to your dev dependencies so that you can jump to them in emacs."
:url "-pocketbook"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:profiles {:ci {:deploy-repositories
... | null | https://raw.githubusercontent.com/vise890/lein-pocketbook/6ca295ec33e493a933ff70d562e88e786d8075d3/project.clj | clojure | (defproject lein-pocketbook "0.1.4-SNAPSHOT"
:description "A Leiningen plugin to add sources / javadocs to your dev dependencies so that you can jump to them in emacs."
:url "-pocketbook"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:profiles {:ci {:deploy-repositories
... | |
6df59525a62b36d5428f7538e889ae585c288d590e25dcced91eb46918ba9f99 | yesodweb/wai | Conduit.hs | | A light - weight wrapper around @Network . Wai@ to provide easy conduit support .
module Network.Wai.Conduit
( -- * Request body
sourceRequestBody
-- * Response body
, responseSource
, responseRawSource
-- * Re-export
, module Network.Wai
) where
import Network.Wai
import Data... | null | https://raw.githubusercontent.com/yesodweb/wai/f59e577f865d017b4726826ac5586bb916cf315b/wai-conduit/Network/Wai/Conduit.hs | haskell | * Request body
* Response body
* Re-export
| Stream the request body.
The @Response@ argument is a backup response. It is sent to the client if
| | A light - weight wrapper around @Network . Wai@ to provide easy conduit support .
module Network.Wai.Conduit
sourceRequestBody
, responseSource
, responseRawSource
, module Network.Wai
) where
import Network.Wai
import Data.Conduit
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.B... |
adbe92bc9d7975fb2b758f99f3a61bd97159cbac50180f155afb97b2d872ccc8 | etorreborre/registry | Exercise3.hs | # LANGUAGE DataKinds #
# LANGUAGE PartialTypeSignatures #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Test.Tutorial.Exercise3 where
import Data.Registry
import Protolude
import Test.Tutorial.Application
import Test.Tutorial.Exercise2
silentLogger :: Logger IO
silentLogger = Logger (const (pure (... | null | https://raw.githubusercontent.com/etorreborre/registry/bab2b9c0388e7ccbdf59423ddb9951c4c8279297/test/Test/Tutorial/Exercise3.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PartialTypeSignatures #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Test.Tutorial.Exercise3 where
import Data.Registry
import Protolude
import Test.Tutorial.Application
import Test.Tutorial.Exercise2
silentLogger :: Logger IO
silentLogger = Logger (const (pure (... | |
3c659566d1efd9f5407a49437fd67e25f46f001072a30c39a490b4e42c8a0a4e | jaredloomis/Haskell-OpenGL | NewGraphics.hs | # LANGUAGE MultiParamTypeClasses #
module Engine.Graphics.NewGraphics (
RenderInfo(..), emptyInfo, Renderable(..),
totalRender, renderToFramebuffer, renderAllToFramebuffer,
renderWorldNewPost, renderWorldNew, withFramebuffer,
screenFramebuffer, bindFramebuffer, unbindFrameBuffer
) where
import Data.Bit... | null | https://raw.githubusercontent.com/jaredloomis/Haskell-OpenGL/5c7363bbc07c5064e49b608d689cda2cab99f3eb/src/Engine/Graphics/NewGraphics.hs | haskell | | The data passed around through the stages of
rendering.
| A class for things that can be rendered to
the screen &| Framebuffers.
* Bind: This is usually where
shaders are set, or the currently
bound shader is modified.
is bound before calling this, so there is
no need to... | # LANGUAGE MultiParamTypeClasses #
module Engine.Graphics.NewGraphics (
RenderInfo(..), emptyInfo, Renderable(..),
totalRender, renderToFramebuffer, renderAllToFramebuffer,
renderWorldNewPost, renderWorldNew, withFramebuffer,
screenFramebuffer, bindFramebuffer, unbindFrameBuffer
) where
import Data.Bit... |
1e8e44ce14fe5007e068750758fec90aa568c22a68cb1fb89b9f5a3c8264a036 | djs55/ocaml-fd-send-recv | test_tuntap.ml | open Unix
open Fd_send_recv
let t_receivefd fd =
Printf.printf "[receiver] t_receivedfd thread started!\n%!";
let buf = String.make (Tuntap.get_ifnamsiz ()) '\000' in
let nb_read, remote_saddr, fd_recv = recv_fd fd buf 0 (String.length buf) [] in
Printf.printf "[receiver] Received %d bytes [%s], received fd = ... | null | https://raw.githubusercontent.com/djs55/ocaml-fd-send-recv/f05e338db2b425710566482112c8c45ec2c7df06/test/test_tuntap.ml | ocaml | Child code
Parent code
Entry point | open Unix
open Fd_send_recv
let t_receivefd fd =
Printf.printf "[receiver] t_receivedfd thread started!\n%!";
let buf = String.make (Tuntap.get_ifnamsiz ()) '\000' in
let nb_read, remote_saddr, fd_recv = recv_fd fd buf 0 (String.length buf) [] in
Printf.printf "[receiver] Received %d bytes [%s], received fd = ... |
bc25435b92e079c9529e01e488f868a81c3a432ead20770263d9b77f1377b9d2 | chenyukang/eopl | 08.scm | (load "../libs/init.scm")
this will drop the elements before the first key element
(define remove-first
(lambda (s los)
(if (null? los)
'()
(if (eqv? (car los) s)
(cdr los)
(remove-first s (cdr los))))))
;;(remove-first 'c '(b c d e))
;;(remove-first 'c '(c d e))
(equal?? (remove-... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch1/08.scm | scheme | (remove-first 'c '(b c d e))
(remove-first 'c '(c d e)) | (load "../libs/init.scm")
this will drop the elements before the first key element
(define remove-first
(lambda (s los)
(if (null? los)
'()
(if (eqv? (car los) s)
(cdr los)
(remove-first s (cdr los))))))
(equal?? (remove-first 'c '(b c d e)) '(d e))
when first emlemnt is the ke... |
9c39f79bd022a85e307739c49a5aecc97365d379f476c47b5d9c51b6226d2f21 | fugue/fregot | Rule.hs | |
Copyright : ( c ) 2020 - 2021 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020-2021 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LAN... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Types/Rule.hs | haskell | # LANGUAGE TemplateHaskell #
| Converts a rule type to a normal type.
| Used to abstract around meta-information for rules. | |
Copyright : ( c ) 2020 - 2021 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020-2021 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LAN... |
777a1e0c68af3569b45491f244ab8b318f8b59588e282315f60a05bb71c175a3 | mkcp/raft-consensus | append_entries.clj | (ns raft.append-entries
(:require [clojure.core.async :refer [>!]]))
(def request-spec
{:from keyword?
:to keyword?
:term integer?
:prev-index integer?
:prev-term integer?
:entries vector?
:commit-index integer?})
(defn request-append
"TODO: Validate with a spec so you don't send garbage data.... | null | https://raw.githubusercontent.com/mkcp/raft-consensus/575cc831d3861ae415e372bd6c15ab067b683471/src/raft/append_entries.clj | clojure | ??? | (ns raft.append-entries
(:require [clojure.core.async :refer [>!]]))
(def request-spec
{:from keyword?
:to keyword?
:term integer?
:prev-index integer?
:prev-term integer?
:entries vector?
:commit-index integer?})
(defn request-append
"TODO: Validate with a spec so you don't send garbage data.... |
055212a48bdaf9a858d5b6eb37e12a633df4a7306588d5e7c8bfc0c5f258edc6 | grin-compiler/ghc-wpc-sample-programs | DocumentOutput.hs | -- ------------------------------------------------------------
|
Module : Text . XML.HXT.Arrow .
Copyright : Copyright ( C ) 2005 - 9
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
State arrows for document output
Module ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Text/XML/HXT/Arrow/DocumentOutput.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
| Write the contents of a document tree into an output stream (file or stdout).
|
write the tree representation of a document to ... |
|
Module : Text . XML.HXT.Arrow .
Copyright : Copyright ( C ) 2005 - 9
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
State arrows for document output
Module : Text.XML.HXT.Arrow.DocumentOutput
Copyright : Copyright... |
8dae9fb6df80b67111f2a591e0ef527026d704b9806bbe17692af13e7a99e22c | digital-asset/ghc | TypeRep.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE PolyKinds #
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeOperators #
# LANGUAGE StarIsType #
# LANGUAGE Unico... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_run/TypeRep.hs | haskell | # LANGUAGE ConstraintKinds #
# OPTIONS -Wno-star-is-type #
the basics
Various instantiations of a kind-polymorphic type
Something lifted and primitive | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeOperators #
# LANGUAGE StarIsType #
# LANGUAGE UnicodeSyntax #
import Data.Typeable... |
74b7c825c4086d034135fbb2c12e88c6c3d8d1ad8f5414b3014fbbad2b6f01a5 | cbaggers/cepl | docs.lisp | (in-package :cepl.streams)
(docs:define-docs
(defstruct buffer-stream
"
A buffer-stream is a structure that represents stream of gpu-data composed from
gpu-array and/or gpu-buffers.
To render in CEPL we map a buffer-stream over a gpu-pipeline. The buffer-stream
contains data (usually geometry) that is passed to... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/streams/docs.lisp | lisp | (in-package :cepl.streams)
(docs:define-docs
(defstruct buffer-stream
"
A buffer-stream is a structure that represents stream of gpu-data composed from
gpu-array and/or gpu-buffers.
To render in CEPL we map a buffer-stream over a gpu-pipeline. The buffer-stream
contains data (usually geometry) that is passed to... | |
d95077ea991f8dc8c585765cc8d83cfd4a3406c4479ebb1c6de531ee8b566716 | bcc32/projecteuler-ocaml | solution.mli | * @inline
| null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/lib/solution.mli | ocaml | * @inline
| |
466e36fb059b038b809f2a1e2bd28f803659ea4051c578e716354dc53384c091 | jtdaugherty/dbmigrations | Main.hs | module Main where
import Prelude
import Test.HUnit
import System.Exit
import System.IO ( stderr )
import qualified DependencyTest
import qualified MigrationsTest
import qualified FilesystemSerializeTest
import qualified FilesystemParseTest
import qualified FilesystemTest
import qualified CycleDetectionTest
import qual... | null | https://raw.githubusercontent.com/jtdaugherty/dbmigrations/80336a736ac394a2d38c65661b249b2fae142b64/test/Main.hs | haskell | module Main where
import Prelude
import Test.HUnit
import System.Exit
import System.IO ( stderr )
import qualified DependencyTest
import qualified MigrationsTest
import qualified FilesystemSerializeTest
import qualified FilesystemParseTest
import qualified FilesystemTest
import qualified CycleDetectionTest
import qual... | |
e3affc2542596e99c6c8c19426050e7a03af87a3a807c9d0fe9c55ad01fb31d3 | realworldocaml/book | test_negotiate.ml | open! Core
open Expect_test_helpers_core
open Protocol_version_header
module Legacy = struct
type t = int list [@@deriving bin_io]
end
let test ~us:(p_us, v_us) ~peer:(p_peer, v_peer) =
let us = create_exn ~protocol:p_us ~supported_versions:v_us in
let peer = create_exn ~protocol:p_peer ~supported_versions:v_pe... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/protocol_version_header/test/src/test_negotiate.ml | ocaml | open! Core
open Expect_test_helpers_core
open Protocol_version_header
module Legacy = struct
type t = int list [@@deriving bin_io]
end
let test ~us:(p_us, v_us) ~peer:(p_peer, v_peer) =
let us = create_exn ~protocol:p_us ~supported_versions:v_us in
let peer = create_exn ~protocol:p_peer ~supported_versions:v_pe... | |
a9fea2189c23df05378db24adfc7eeabd94222496cfec736a15aec4776bd8253 | foreverbell/project-euler-solutions | 510.hs | import Control.Parallel (pseq, par)
solve :: Int -> Int -> Int -> Int
solve n a b = (x' + y' + f) * count * (count + 1) `div` 2 where
x = a * a
y = b * b
f = x * y
g = (a + b) * (a + b)
x' = x * g
y' = y * g
count = n `div` y'
enumerate :: Int -> (Int, Int) -> (Int, Int) -> Int
enumerate n... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/510.hs | haskell | import Control.Parallel (pseq, par)
solve :: Int -> Int -> Int -> Int
solve n a b = (x' + y' + f) * count * (count + 1) `div` 2 where
x = a * a
y = b * b
f = x * y
g = (a + b) * (a + b)
x' = x * g
y' = y * g
count = n `div` y'
enumerate :: Int -> (Int, Int) -> (Int, Int) -> Int
enumerate n... | |
e7ac6d2e49aacac8f2f29620dc0be0419a9cdb5e4529300f7ed53de1b2021495 | informatimago/lisp | stop.lisp | (in-package "COM.INFORMATIMAGO.CLEXT.TELNET.REPL")
(setf *repl-server* (com.informatimago.clext.telnet.repl:stop-repl-server *repl-server*))
(com.informatimago.tools.thread:list-threads)
| null | https://raw.githubusercontent.com/informatimago/lisp/246c79b6b1b888a8fb60bb7201238523ea09347d/clext/telnet/stop.lisp | lisp | (in-package "COM.INFORMATIMAGO.CLEXT.TELNET.REPL")
(setf *repl-server* (com.informatimago.clext.telnet.repl:stop-repl-server *repl-server*))
(com.informatimago.tools.thread:list-threads)
| |
fd803b66de9c377ddfb33a148d259152416af34228cb316278b2b34242c886fe | nathanmarz/storm-deploy | deploy_util.clj | (ns backtype.storm.deploy-util
(:require [clojure.string :as s]
[pallet.execute :as execute]))
(def env-keys-to-resolve [:username :public-key-path :private-key-path])
(defn resolve-path [path]
(s/trim (:out (execute/local-script (echo ~path)))))
(defn resolve-keypaths
[user-map]
(reduce #(%2 %1)... | null | https://raw.githubusercontent.com/nathanmarz/storm-deploy/b97265bb8b79f84f5907deb826c702e9c4947305/src/clj/backtype/storm/deploy_util.clj | clojure | (ns backtype.storm.deploy-util
(:require [clojure.string :as s]
[pallet.execute :as execute]))
(def env-keys-to-resolve [:username :public-key-path :private-key-path])
(defn resolve-path [path]
(s/trim (:out (execute/local-script (echo ~path)))))
(defn resolve-keypaths
[user-map]
(reduce #(%2 %1)... | |
dffc08437ff8a32c85019a056e67822e8bca40a5c77aeed7cf1e7b52cc1b17f1 | portkey-cloud/aws-clj-sdk | support.clj | (ns portkey.aws.support (:require [portkey.aws]))
(def
endpoints
'{"us-east-1"
{:credential-scope {:service "support", :region "us-east-1"},
:ssl-common-name "support.us-east-1.amazonaws.com",
:endpoint "-east-1.amazonaws.com",
:signature-version :v4}})
(comment TODO support "json")
| null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/support.clj | clojure | (ns portkey.aws.support (:require [portkey.aws]))
(def
endpoints
'{"us-east-1"
{:credential-scope {:service "support", :region "us-east-1"},
:ssl-common-name "support.us-east-1.amazonaws.com",
:endpoint "-east-1.amazonaws.com",
:signature-version :v4}})
(comment TODO support "json")
| |
8d0202e27aa7cbfe9401f3616ce397c7ffe19abe4d32761247f96859b4dd1f46 | pavankumarbn/DroneGUIROS | _package_navdata_video_stream.lisp | (cl:in-package ardrone_autonomy-msg)
(cl:export '(HEADER-VAL
HEADER
DRONE_TIME-VAL
DRONE_TIME
TAG-VAL
TAG
SIZE-VAL
SIZE
QUANT-VAL
QUANT
FRAME_SIZE-VAL
FRAME_SIZE
FRAME_NUMBER-VAL
FRAME_NUMBE... | null | https://raw.githubusercontent.com/pavankumarbn/DroneGUIROS/745320d73035bc50ac4fea2699e22586e10be800/devel/share/common-lisp/ros/ardrone_autonomy/msg/_package_navdata_video_stream.lisp | lisp | (cl:in-package ardrone_autonomy-msg)
(cl:export '(HEADER-VAL
HEADER
DRONE_TIME-VAL
DRONE_TIME
TAG-VAL
TAG
SIZE-VAL
SIZE
QUANT-VAL
QUANT
FRAME_SIZE-VAL
FRAME_SIZE
FRAME_NUMBER-VAL
FRAME_NUMBE... | |
eca8bf2c5f7e0e5e832a3eb70134d8ce3aeee08307787538d108df9ffe8f57c8 | solita/mnt-teet | select.cljs | (ns teet.ui.select
"Selection components"
(:require [reagent.core :as r]
[herb.core :as herb :refer [<class]]
[teet.theme.theme-colors :as theme-colors]
[teet.common.common-controller :as common-controller]
[teet.common.common-styles :as common-styles]
[tu... | null | https://raw.githubusercontent.com/solita/mnt-teet/e9477ac003edf47c11eb3dd854c5b179110d88cb/app/frontend/src/cljs/teet/ui/select.cljs | clojure | Show error as tooltip instead of label.
Always add the tootip and wrapper elements, but hide them when
there is no error. This way the input does not lose focus when the
tooltip is added/removed.
We don't want the tooltip wrapper to participate in sequential
keyboard navigation. Otherwise we would need to hit tab... | (ns teet.ui.select
"Selection components"
(:require [reagent.core :as r]
[herb.core :as herb :refer [<class]]
[teet.theme.theme-colors :as theme-colors]
[teet.common.common-controller :as common-controller]
[teet.common.common-styles :as common-styles]
[tu... |
f30ffd4b8b83ce1d309bcda1de6b0cfb25a8de9a6423c5a9fd13572c0fe550df | russelldb/tempile | tempile_app.erl | -module(tempile_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
tempile_sup:... | null | https://raw.githubusercontent.com/russelldb/tempile/43f47f720fde2c488a8502a06f616e0dd051c83d/src/tempile_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(tempile_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
tempile_sup:start_link().
stop(_State) ->
ok.
|
9134f5b247fae7821f0bf9dfaeac66a5e77ab230a411327cd5f98f852e7608d3 | robertmeta/cowboy-examples | echo_get.erl | -module(echo_get).
-export([start/0, start/2, stop/0]).
start() ->
application:start(cowboy),
application:start(echo_get).
start(_Type, _Args) ->
Dispatch = [
{'_', [{'_', echo_get_handler, []}]}
],
cowboy:start_listener(my_http_listener, 1,
cowboy_tcp_transport, [{port, 8080}],
... | null | https://raw.githubusercontent.com/robertmeta/cowboy-examples/d03c289c9fb0d750eca11e3f1671e74d1841bd09/apps/echo_get/src/echo_get.erl | erlang | -module(echo_get).
-export([start/0, start/2, stop/0]).
start() ->
application:start(cowboy),
application:start(echo_get).
start(_Type, _Args) ->
Dispatch = [
{'_', [{'_', echo_get_handler, []}]}
],
cowboy:start_listener(my_http_listener, 1,
cowboy_tcp_transport, [{port, 8080}],
... | |
f42fdfb870e56ab2704dc1e56ff321412b7b2c2b71a838169c269add27cf8437 | rtoal/ple | is_thirty_four_cases.hs | import Control.Monad (guard)
isThirtyFour :: Int -> Bool
isThirtyFour num =
case num of
34 -> True
otherwise -> False
main = do
guard $ not (isThirtyFour 8)
guard $ isThirtyFour 34 | null | https://raw.githubusercontent.com/rtoal/ple/b24cab4de2beca6970833a09d05af6ef96ec3921/haskell/is_thirty_four_cases.hs | haskell | import Control.Monad (guard)
isThirtyFour :: Int -> Bool
isThirtyFour num =
case num of
34 -> True
otherwise -> False
main = do
guard $ not (isThirtyFour 8)
guard $ isThirtyFour 34 | |
3884200a21e427c2a92951c64c258cb035f840594d6ea328f5af8da4e027ac25 | imrehg/ypsilon | constants.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk constants)
(export GDK_2BUTTON_PRESS
GDK_3BUTTON_PRESS
GDK_ACTION_ASK
GDK_ACTION_COPY
GDK_ACTI... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/constants.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk constants)
(export GDK_2BUTTON_PRESS
GDK_3BUTTON_PRESS
GDK_ACTION_ASK
GDK_ACTION_COPY
GDK_ACTI... |
8983d2886b65f915ae3cac37f94a25ad55205cb850c83cd3d2e918473067fcbd | avsm/mirage-duniverse | xencat.ml | open Cmdliner
open Sexplib.Std
open Vchan_lwt_unix
let (>>=) = Lwt.bind
let listen =
let doc = "Act as a server rather than a client." in
Arg.(value & flag & info [ "l"; "listen"] ~doc)
let domid = Arg.(required & pos 0 (some int) None & info ~docv:"DOMID" ~doc:"Domain id of the remote endpoint." [])
let port =... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/vchan/cli/xencat.ml | ocaml | open Cmdliner
open Sexplib.Std
open Vchan_lwt_unix
let (>>=) = Lwt.bind
let listen =
let doc = "Act as a server rather than a client." in
Arg.(value & flag & info [ "l"; "listen"] ~doc)
let domid = Arg.(required & pos 0 (some int) None & info ~docv:"DOMID" ~doc:"Domain id of the remote endpoint." [])
let port =... | |
f546cab17b136e157f67925e56866ea3fdc23235faef0e616d14210cb9b695ec | davdar/maam | Val.hs | module Lang.LamIf.Val where
import FP
import Lang.LamIf.StateSpace
import Lang.LamIf.Syntax
-- Concrete
data CVal lτ dτ = LitC Lit | CloC (Clo lτ dτ) | TupC (PicoVal lτ dτ, PicoVal lτ dτ) | BotC
deriving (Eq, Ord)
makePrisms ''CVal
instance (Eq lτ, Eq dτ) => PartialOrder (CVal lτ dτ) where
pcompare BotC _ = PLT
... | null | https://raw.githubusercontent.com/davdar/maam/2cc3ff3511a7a4daadcd44c60c4b08862c01e183/src/Lang/LamIf/Val.hs | haskell | Concrete
Abstract
Lifting to Powerset | module Lang.LamIf.Val where
import FP
import Lang.LamIf.StateSpace
import Lang.LamIf.Syntax
data CVal lτ dτ = LitC Lit | CloC (Clo lτ dτ) | TupC (PicoVal lτ dτ, PicoVal lτ dτ) | BotC
deriving (Eq, Ord)
makePrisms ''CVal
instance (Eq lτ, Eq dτ) => PartialOrder (CVal lτ dτ) where
pcompare BotC _ = PLT
pcompare _... |
2d438fff60f43a93b0645d42262b598e1b210d8de94ca61a8724c81bf9eb7895 | futurice/haskell-flowdock-grep | Main.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where
import Control.Lens ((&), (.~), (^.))
import Prelude ()
import Prelude.Compat as Prelude
import Control.Monad ... | null | https://raw.githubusercontent.com/futurice/haskell-flowdock-grep/bcd7e0faba786c23cb108b8d4e7884264ac73590/src/Main.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
| Row text with appendet tags
| Fetch users from API
| Fetch joined flows from API
Save auth token
Users
Read from cache
Read from API
Loop only if we got something | # LANGUAGE DeriveGeneric #
module Main (main) where
import Control.Lens ((&), (.~), (^.))
import Prelude ()
import Prelude.Compat as Prelude
import Control.Monad (unless, when)
import Control.Monad.Catch (Exception, MonadCatch (..), MonadThrow (..))
import Data.Aeson.Compat (FromJSON, deco... |
da38ca8353c33a8fe9a193c517c719693c824f8ae515f2e8d320780a3bf75593 | startalkIM/ejabberd | login_success_util.erl | -module(login_success_util).
-export([do_process/1,
close_stat/5
]).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("jlib.hrl").
do_process(User) ->
?DEBUG("the login success user is ~p~n", [User]).
close_stat(User, Server, Resource, {IP, _}, {{MegaSecs, Secs, _}, _}) when U... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/login_success_util.erl | erlang | -module(login_success_util).
-export([do_process/1,
close_stat/5
]).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("jlib.hrl").
do_process(User) ->
?DEBUG("the login success user is ~p~n", [User]).
close_stat(User, Server, Resource, {IP, _}, {{MegaSecs, Secs, _}, _}) when U... | |
357bd163d0c2a83b6f6949c3819f7404efd47ccbd2f3ca4fd87294d0f64de036 | janestreet/universe | std.ml | module Hashtbl = struct
include Hashtbl
let sexp_of_t = Conv.sexp_of_hashtbl
let t_of_sexp = Conv.hashtbl_of_sexp
end
module Lazy = struct
include Lazy
let t_of_sexp = Conv.lazy_t_of_sexp
let sexp_of_t = Conv.sexp_of_lazy_t
let t_sexp_grammar = Sexplib0.Sexp.Private.Raw_grammar.Builtin.lazy_t_sexp_gram... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexplib/src/std.ml | ocaml | module Hashtbl = struct
include Hashtbl
let sexp_of_t = Conv.sexp_of_hashtbl
let t_of_sexp = Conv.hashtbl_of_sexp
end
module Lazy = struct
include Lazy
let t_of_sexp = Conv.lazy_t_of_sexp
let sexp_of_t = Conv.sexp_of_lazy_t
let t_sexp_grammar = Sexplib0.Sexp.Private.Raw_grammar.Builtin.lazy_t_sexp_gram... | |
19d9b57319d25a36f29b6534e802e8860f0321b120f74d497576a289878b5e5f | SovereignShop/codenames | server.cljs | (ns codenames.events.server
(:require
[swig.macros :refer [def-event-ds]]))
(def-event-ds ::set-server-status
[db [_ id status]]
[[:db/add id :server/processing? status]])
(def-event-ds ::set-current-msg
[db [_ id msg]]
[[:db/add id :server/current-msg msg]])
| null | https://raw.githubusercontent.com/SovereignShop/codenames/0a3d5f52b0a704341801bb7125b054a4323bcf19/src/cljs/codenames/events/server.cljs | clojure | (ns codenames.events.server
(:require
[swig.macros :refer [def-event-ds]]))
(def-event-ds ::set-server-status
[db [_ id status]]
[[:db/add id :server/processing? status]])
(def-event-ds ::set-current-msg
[db [_ id msg]]
[[:db/add id :server/current-msg msg]])
| |
68d801fdc7a244a1c3621283f3d78d77267f6f7e131a2e9c900fe69b3ad66767 | dxtr/clsql | odbc-package.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: odbc-package.lisp
Purpose : Package definition for low - level ODBC interface
Author :
Created : April 2004
;;;;
... | null | https://raw.githubusercontent.com/dxtr/clsql/8061aae1ecb878954115c7aacd90685a65bf4107/db-odbc/odbc-package.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: odbc-package.lisp
(), also known as the LLGPL.
************************************************************************* | Purpose : Package definition for low - level ODBC interface
Author :
Created : April 2004
This file , part of CLSQL , is Copyright ( c ) 2004 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:c... |
9461b864c928a5c71f3e0478efdc6d5866ce28f491b7bb734abd6ee90b897d91 | opqdonut/clj-github-actions-example | core_test.clj | (ns clj-github-actions-example.core-test
(:require [clojure.test :refer :all]
[clj-github-actions-example.core :refer [answer]]))
(deftest test-answer
(testing "I know the answer"
(is (= 42 answer))))
| null | https://raw.githubusercontent.com/opqdonut/clj-github-actions-example/daab5f1951e455f36df9748de5025882a52e1fcf/test/clj_github_actions_example/core_test.clj | clojure | (ns clj-github-actions-example.core-test
(:require [clojure.test :refer :all]
[clj-github-actions-example.core :refer [answer]]))
(deftest test-answer
(testing "I know the answer"
(is (= 42 answer))))
| |
39f65d27eb9b1731ba09dde2ee8de7c797fa4ea454b18a0c3f86473caafc968b | hexlet-codebattle/battle_asserts | star_number.clj | (ns battle-asserts.issues.star-number
(:require [clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["math"])
(def description
{:en "Create a function that takes a positive integer and returns the nth \"star number\".
A star number is a centered figurate number a centered hexagram (si... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/654200475b9c84ee8e0a77649e714956480ec5c8/src/battle_asserts/issues/star_number.clj | clojure | (ns battle-asserts.issues.star-number
(:require [clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["math"])
(def description
{:en "Create a function that takes a positive integer and returns the nth \"star number\".
A star number is a centered figurate number a centered hexagram (si... | |
ab45448c9f28cb2fbaff52c7893fd89f5744ef27ee4962f595a27a7c8a3c4081 | tomjridge/kv-hash | test5.ml | * Test of fork with shared mmap
open Kv_hash.Private.Util
let trace (_f:unit -> string) = ()
let h_len = 1024
type t = {
fd:Unix.file_descr;
m:(char,Bigarray.int8_unsigned_elt) Mmap.t;
h:(char,Bigarray.int8_unsigned_elt,Bigarray.c_layout)Bigarray.Array1.t;
}
let init =
let fn = "test.pip" in
let fd = ... | null | https://raw.githubusercontent.com/tomjridge/kv-hash/c2c10fddb8fb1dab0cdde8aaf9a3e1be2c703255/test/test5.ml | ocaml | initialize
* Read an int at offset; off is updated; int is returned
* Write an int at offset off; return new offset
NOTE we write at h.off
where we have read to so far in m
initialize header
child
parent, child is pid | * Test of fork with shared mmap
open Kv_hash.Private.Util
let trace (_f:unit -> string) = ()
let h_len = 1024
type t = {
fd:Unix.file_descr;
m:(char,Bigarray.int8_unsigned_elt) Mmap.t;
h:(char,Bigarray.int8_unsigned_elt,Bigarray.c_layout)Bigarray.Array1.t;
}
let init =
let fn = "test.pip" in
let fd = ... |
62ff5c8b7cba5f513ac739698ac463bdcfd73f48e90db45400d099ee8fd34e87 | kupl/LearnML | original.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((exp : aexp), (var : string)) : aexp =
match exp with
| Const n -> Const 0
| Var x -> if x = var then Const 1 else Var x
| Power (s, i) ->
if s = var then Times [ Const i; ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub114/original.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((exp : aexp), (var : string)) : aexp =
match exp with
| Const n -> Const 0
| Var x -> if x = var then Const 1 else Var x
| Power (s, i) ->
if s = var then Times [ Const i; ... | |
5f9b9b41dc27f27d1438c06c857f837b8359aa4ac5aae862e2cf308f6cf8a8f3 | statebox/cql | Schema.hs |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/src/Language/CQL/Parser/Schema.hs | haskell | base |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... |
fe7cb708f48d691ca07e007cf8acb3d15e318824035810d7ccd4da68192d77f2 | hemmi/coq2scala | cic2acic.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/plugins/xml/cic2acic.ml | ocaml | **********************************************************************
**********************************************************************
This file is distributed under the terms of the
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * The HELM Proje... |
1c2c5b8ec061feaf7eb14459f3cdfd0e24a93ce8c6c5f79184eed93ff87c6f80 | typelead/eta | DriverBkp.hs | # LANGUAGE NondecreasingIndentation #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
-- | This is the driver for the 'ghc --backpack' mode, which
-- is a reimplementation of the "package manager" bits of
Backpack directly in GHC . The basic method of operation
-- is to compil... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/compiler/Eta/Backpack/DriverBkp.hs | haskell | # LANGUAGE TypeSynonymInstances #
| This is the driver for the 'ghc --backpack' mode, which
is a reimplementation of the "package manager" bits of
is to compile packages and then directly insert them into
The compilation products of this mode aren't really suitable
it builds and doesn't serialize out the database... | # LANGUAGE NondecreasingIndentation #
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
Backpack directly in GHC . The basic method of operation
GHC 's in memory database .
for Cabal , because GHC makes up component IDs for the things
module Eta.Backpack.DriverBkp (doBackpack) where
#include "HsVersions.h"
im... |
f8a13521708691b04af5e19bd52bf070acd9c7e7ef5b45f533fe55ea0f59f18f | MLstate/opalang | baseMap.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseMap.mli | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
414d63f9e40b70735a9d87fd0a62e92f587daf163b5c5710bea84fd439dce84e | LaurentRDC/hakyll-images | Metadata.hs | -- |
-- Module : Hakyll.Images.Metadata
-- Description : Handling image metadata
Copyright : ( c ) , 2019 - present
-- License : BSD3
-- Maintainer :
-- Stability : unstable
-- Portability : portable
module Hakyll.Images.Metadata
( module Codec.Picture.Metadata,
imageMetadata,
metadata,... | null | https://raw.githubusercontent.com/LaurentRDC/hakyll-images/5f9284a97f3fc8f056a79fd5321c39e56622c93f/library/Hakyll/Images/Metadata.hs | haskell | |
Module : Hakyll.Images.Metadata
Description : Handling image metadata
License : BSD3
Maintainer :
Stability : unstable
Portability : portable
| Extract metadata from an image. This function will throw an
error in case of a problem.
This function is for testing purposes.
| Extract metadata fro... | Copyright : ( c ) , 2019 - present
module Hakyll.Images.Metadata
( module Codec.Picture.Metadata,
imageMetadata,
metadata,
)
where
import Codec.Picture (decodeImageWithMetadata)
import Codec.Picture.Metadata
import Hakyll.Core.Compiler (Compiler)
import Hakyll.Core.Item (Item, itemBody)
import Ha... |
d3bdb6444da947d354dd77173c76482e7db94a4fe87a32a8089f74d36f912bb5 | i-am-tom/world-building-in-haskell | Vect.hs | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# ... | null | https://raw.githubusercontent.com/i-am-tom/world-building-in-haskell/fe7369b9069793ee6dd2a11e031a53b4af764d1a/src/Data/Vect.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
values.
| Construct a vector without the constructor noise. Given a number of
arguments, this constructs a function to populate a vector.
>>> make @'Z
Vect 'Z x
>>> make @('S 'Z)
x -> Vect ('S 'Z) x
>>> make @('S ('S 'Z))
x -> x -> Vect ('S ('S 'Z)) x
| Con... | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstance... |
d4116b9eb4a07425b7e406d0acad526bb02f1aabdf9f6011e36ac3bfbbfbbfdc | HuwCampbell/grenade | Runner.hs | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
module Grenade.R... | null | https://raw.githubusercontent.com/HuwCampbell/grenade/5206c95c423d9755e620f41576470a281ba59c89/src/Grenade/Recurrent/Core/Runner.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
| Drive and network and collect its back propogated gradients. | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
# LANGUAGE TypeFamilies #
module Grenade.Recurrent.Core.Runner (
runRecurrentExamples
, runRecurrentBackprop
, backPropagateRecurrent
, trainRecurrent
, RecurrentGradients
) where
import Data.List ( foldl' )
imp... |
3f8a645189da507ec5685408fdbaa867657c8c587aade5856011adbc9dc76578 | gethop-dev/hop-cli | main.clj | This Source Code Form is subject to the terms of the MIT license .
If a copy of the MIT license was not distributed with this
file , You can obtain one at
{{=<< >>=}}
(ns <<project.name>>.main
(:gen-class)
(:require [duct.core :as duct]))
(duct/load-hierarchy)
(defn -main [& args]
(let [keys (or (du... | null | https://raw.githubusercontent.com/gethop-dev/hop-cli/c7b848915ff268aa41ff9a61a62c614f58ecbeb9/resources/bootstrap/profiles/core/app/src/%7B%7Bproject.files-name%7D%7D/main.clj | clojure | This Source Code Form is subject to the terms of the MIT license .
If a copy of the MIT license was not distributed with this
file , You can obtain one at
{{=<< >>=}}
(ns <<project.name>>.main
(:gen-class)
(:require [duct.core :as duct]))
(duct/load-hierarchy)
(defn -main [& args]
(let [keys (or (du... | |
e80f6114e7d8c43498abe646dc7bde2a15025d98128fac384eb81d4746727d22 | appleshan/cl-http | cl-http-70-156.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.156
;;; Reason: Function HTTP::PARSE-KEEP-ALIVE-HEADER: trim white space
;;; DEFINE-HEADER :KEEP-ALIVE: -
;;; Function (CLOS:METHOD HTTP:STREAM-DECODE-CRLF-UNTIL-EOF (TCP::TCP-MODAL-HTT... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-156.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::PARSE-KEEP-ALIVE-HEADER: trim white space
DEFINE-HEADER :KEEP-ALIVE: -
Function (CLOS:METHOD HTTP:STREAM-DECODE-CRLF-UNTIL-EOF (TCP::TCP-MODAL-HTTP-STREAM SI:STREAM)): binary mode for input.
Function (CLOS:METHOD H... | Patch file for CL - HTTP version 70.156
Written by JCMa , 11/13/01 13:57:45
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 ,
Compare Merge 404.0 , VC Documentation 401.0 ,
Logica... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.