_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 |
|---|---|---|---|---|---|---|---|---|
9fef8f65d83a2b2e88c6d4fce1b7703f5c83711b51275b654065126bf5d2279b | googleson78/fp-lab-2022-23 | Intro.hs | # OPTIONS_GHC -fwarn - incomplete - patterns #
# OPTIONS_GHC -fwarn - unused - matches #
# OPTIONS_GHC -fwarn - missing - signatures #
{-# OPTIONS_GHC -fwarn-name-shadowing #-} -- use different names!
# OPTIONS_GHC -fwarn - incomplete - uni - patterns #
module Intro where
---------------------------------
--... | null | https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/c08f1e4d6ee998490c93241c465fe4289d19fe8e/exercises/00/Intro.hs | haskell | # OPTIONS_GHC -fwarn-name-shadowing #
use different names!
-------------------------------
TODO: me
chaos, tweag
live for now
github repo - -lab-2022-23
TODO: exposition
throw away most of the terminology you know from other languages
(Typed) Functional Programming is
- Defining Datatypes To Represent ... | # OPTIONS_GHC -fwarn - incomplete - patterns #
# OPTIONS_GHC -fwarn - unused - matches #
# OPTIONS_GHC -fwarn - missing - signatures #
# OPTIONS_GHC -fwarn - incomplete - uni - patterns #
module Intro where
, he / him , contact info in readme
TODO : administrivia - georgi look at README !
ask about git knowl... |
86b02bc66754affc2e40f0c7a1c551b6b023ee0c73d5728ec7f3d209cb898e5c | valpackett/octohipster | schema_spec.clj | (ns octohipster.documenters.schema-spec
(:use [speclj core]
[ring.mock request]
[octohipster core routes json]
[octohipster.documenters schema]))
(def contact-schema
{:id "Contact"
:type "object"
:properties {:guid {:type "string"}}})
(defresource contact-collection)
(defresource con... | null | https://raw.githubusercontent.com/valpackett/octohipster/4c1d210643940576eed42a194f810c5c719da63f/spec/octohipster/documenters/schema_spec.clj | clojure | (ns octohipster.documenters.schema-spec
(:use [speclj core]
[ring.mock request]
[octohipster core routes json]
[octohipster.documenters schema]))
(def contact-schema
{:id "Contact"
:type "object"
:properties {:guid {:type "string"}}})
(defresource contact-collection)
(defresource con... | |
e58c9a2d3bd7c1e9d558c393a2a98bbd586cf22fd5b19c2852948990e2bb8929 | quintenpalmer/dungeons | Server.hs | module Main where
import Control.Concurrent (forkIO)
import Data.Map (Map, lookup)
import Prelude hiding (lookup)
import Network (accept,
Socket,
listenOn,
PortID(..),
withSocketsDo)
import System.IO (hPutStrLn,
Handle,
... | null | https://raw.githubusercontent.com/quintenpalmer/dungeons/ad9445882e3cfd9d63df42a4e37265a71374598d/server/Server.hs | haskell | module Main where
import Control.Concurrent (forkIO)
import Data.Map (Map, lookup)
import Prelude hiding (lookup)
import Network (accept,
Socket,
listenOn,
PortID(..),
withSocketsDo)
import System.IO (hPutStrLn,
Handle,
... | |
b818c9e680cfe4d29d60082bb520fc21b6a3c401883940ed944e2314ed231cc1 | yqrashawn/GokuRakuJoudo | layers.clj | (ns karabiner-configurator.layers
(:require
[karabiner-configurator.conditions :refer [is-simple-set-variable? parse-conditions]]
[karabiner-configurator.data :as d]
[karabiner-configurator.froms :as froms]
[karabiner-configurator.misc :refer [dissoc-in massert]]
[karabiner-configurator.tos :as tos]))
... | null | https://raw.githubusercontent.com/yqrashawn/GokuRakuJoudo/2295ee42923d439ec5c60bb9ff1655becfad273d/src/karabiner_configurator/layers.clj | clojure | (ns karabiner-configurator.layers
(:require
[karabiner-configurator.conditions :refer [is-simple-set-variable? parse-conditions]]
[karabiner-configurator.data :as d]
[karabiner-configurator.froms :as froms]
[karabiner-configurator.misc :refer [dissoc-in massert]]
[karabiner-configurator.tos :as tos]))
... | |
db165431ea5e5e58dfdd208e2d26930afa7bc75ab94cd4fb69c69b3642a6d2d2 | Mayvenn/storefront | reviews.cljc | (ns catalog.reviews
"Product reviews, possibly more in the future"
(:require #?@(:cljs [[storefront.hooks.reviews :as yotpo]])
[storefront.component :as c]
[storefront.events :as e]
[storefront.effects :as fx]
[storefront.platform.reviews :as review-component]))
B... | null | https://raw.githubusercontent.com/Mayvenn/storefront/1ceb9907e54b2e625a3ac61f9ca2b4bfe9caffed/src-cljc/catalog/reviews.cljc | clojure | (ns catalog.reviews
"Product reviews, possibly more in the future"
(:require #?@(:cljs [[storefront.hooks.reviews :as yotpo]])
[storefront.component :as c]
[storefront.events :as e]
[storefront.effects :as fx]
[storefront.platform.reviews :as review-component]))
B... | |
6f1d2f19f9090581b80c4e71e270de9f668fc630874430ab82a873260d485f30 | jaspervdj/number-six | NumberSix.hs | --------------------------------------------------------------------------------
-- | Main module, containing the 'numberSix' function needed to launch your bot.
{-# LANGUAGE OverloadedStrings #-}
module NumberSix
( numberSix
, numberSixWith
) where
--------------------------------------------------------... | null | https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix.hs | haskell | ------------------------------------------------------------------------------
| Main module, containing the 'numberSix' function needed to launch your bot.
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
----------------------------------------------------... | module NumberSix
( numberSix
, numberSixWith
) where
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar (newMVar)
import Control.Monad (forM, forM_)
import Data.Maybe (catMay... |
e7e9971890105c91d9e343abce90125cc904a7f76298ff9efa4615f4f72bcb9b | Mayvenn/storefront | events.cljs | (ns storefront.browser.events
(:require goog.events
catalog.keypaths
[goog.events.EventType :as EventType]
[mayvenn.concept.email-capture :as email-capture]
[storefront.platform.messages :refer [handle-message]]
[storefront.effects :as effects]
[... | null | https://raw.githubusercontent.com/Mayvenn/storefront/246c6906e2152a55683d5e8bf642208d7d082513/src-cljs/storefront/browser/events.cljs | clojure | we don't need to worry about unlistening because the handler will do that
Full screen events cannot be unlistened for some reason, so we need to
track when we attach ourselves | (ns storefront.browser.events
(:require goog.events
catalog.keypaths
[goog.events.EventType :as EventType]
[mayvenn.concept.email-capture :as email-capture]
[storefront.platform.messages :refer [handle-message]]
[storefront.effects :as effects]
[... |
b35ca7bca3fc496535e64b40e3d85f88af987c91c6d8fb2ab80025a290d9c81f | nniclausse/manderlbot | mdb_control.erl | %%%----------------------------------------------------------------------
%%% File : mdb_control.erl
Author : < >
%%% Purpose : Control manderlbot, rpc to the running node
Created : 26 Aug 2003 by < >
%%%----------------------------------------------------------------------
-module(mdb_control).
-author... | null | https://raw.githubusercontent.com/nniclausse/manderlbot/a65cfffc50801c09551b70d6bbd7a19e6b2c57dd/src/mdb_control.erl | erlang | ----------------------------------------------------------------------
File : mdb_control.erl
Purpose : Control manderlbot, rpc to the running node
----------------------------------------------------------------------
The main control function
Some util functions
| Author : < >
Created : 26 Aug 2003 by < >
-module(mdb_control).
-author('').
-export([stop/0, status/0]).
-include("config.hrl").
-include("log.hrl").
-define(mdb_node, "manderlbot").
stop() ->
rpc:call(getNode(), application, stop, [manderlbot]),
rpc:call(getNode(), init, stop, []),
init:s... |
898f8c9981fd12b44a9deefc43737348dc2ecd70d1e3feef55526ff8bf241c9d | manzyuk/groebner | Main.hs | # LANGUAGE FlexibleContexts , TypeOperators , TemplateHaskell #
import Eliminate
import Groebner
import Ordering
import Monomial
import Polynomial
import Types
import Variable
$(defineVariables ["X", "Y"])
ideal :: Ord (Monomial (X :<: Y) o) => [Polynomial Rational (X :<: Y) o]
ideal = [x ^ 10 + x ^ 9 * y ^ 2, y ^ 8 ... | null | https://raw.githubusercontent.com/manzyuk/groebner/3f68f3512f19ee0a4740e6ee204f6b117ecbbcad/examples/Main.hs | haskell | # LANGUAGE FlexibleContexts , TypeOperators , TemplateHaskell #
import Eliminate
import Groebner
import Ordering
import Monomial
import Polynomial
import Types
import Variable
$(defineVariables ["X", "Y"])
ideal :: Ord (Monomial (X :<: Y) o) => [Polynomial Rational (X :<: Y) o]
ideal = [x ^ 10 + x ^ 9 * y ^ 2, y ^ 8 ... | |
10e275477c64fbe982386b5b908cc1637388a3d608d0b5991f81f2d5326b3617 | TristeFigure/shuriken | read_eval_test.clj | (ns shuriken.read-eval-test
(:require [clojure.test :refer :all]
[shuriken.read-eval :refer :all]
[clojure.java.io :as io])
(:import [java.io FileReader PushbackReader]
[clojure.lang LispReader]))
(deftest test-read-with
(let [r #(-> (io/file "test/shuriken/read_eval_test.clj")... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/read_eval_test.clj | clojure | (ns shuriken.read-eval-test
(:require [clojure.test :refer :all]
[shuriken.read-eval :refer :all]
[clojure.java.io :as io])
(:import [java.io FileReader PushbackReader]
[clojure.lang LispReader]))
(deftest test-read-with
(let [r #(-> (io/file "test/shuriken/read_eval_test.clj")... | |
1dc392b3b5fffcb9aee74d3f34eb7139cfe7ae26aa915cae61123ef17d758edc | grin-compiler/ghc-wpc-sample-programs | Options.hs | {-# LANGUAGE CPP #-}
# LANGUAGE DataKinds #
module Agda.Interaction.Options
( CommandLineOptions(..)
, PragmaOptions(..)
, OptionsPragma
, Flag, OptM, runOptM, OptDescr(..), ArgDescr(..)
, Verbosity, VerboseKey, VerboseLevel
, HtmlHighlight(..)
, WarningMode(..)
, checkOpts
, ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Interaction/Options.hs | haskell | # LANGUAGE CPP #
Paths_Agda.hs is in $(BUILD_DIR)/build/autogen/.
------------------------------------------------
Don't forget to update
doc/user-manual/tools/command-line-options.rst
if you make changes to the command-line options!
^ look for .agda-lib files
^ In the absence of a path the project root i... | # LANGUAGE DataKinds #
module Agda.Interaction.Options
( CommandLineOptions(..)
, PragmaOptions(..)
, OptionsPragma
, Flag, OptM, runOptM, OptDescr(..), ArgDescr(..)
, Verbosity, VerboseKey, VerboseLevel
, HtmlHighlight(..)
, WarningMode(..)
, checkOpts
, parsePragmaOptions
, pa... |
9ceb082655f32e56df737cbb38d6f507442866498fbb94f74f23ce8d3163d1dd | fourmolu/fourmolu | output-LetNewline-InNoSpace-indent=4.hs | {-- should be the same in every option --}
let_oneline_empty =
let in 10
let_oneline_single =
let a = 1 in a + 2
let_oneline_multi =
let a = 1; b = 2 in a + b
{-- pure let expressions --}
let_empty =
let
in
10
let_single =
let
a = 1
in
a + 2
let_single_sig =
... | null | https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/data/fourmolu/let-style/output-LetNewline-InNoSpace-indent%3D4.hs | haskell | - should be the same in every option -
- pure let expressions -
a comment
- do-block -
- list comprehension - |
let_oneline_empty =
let in 10
let_oneline_single =
let a = 1 in a + 2
let_oneline_multi =
let a = 1; b = 2 in a + b
let_empty =
let
in
10
let_single =
let
a = 1
in
a + 2
let_single_sig =
let
a :: Int
a = 1
in
a + 2
let_single_c... |
cfa7339231a902fa09485dd7507f3dc3c2db47ceebf47939843058028a15fac4 | quil/quil | primitives_3d.cljc | (ns quil.snippets.shape.primitives-3d
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
(defsnippet box
"box"
{:renderer :p3d}
... | null | https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/src/cljc/quil/snippets/shape/primitives_3d.cljc | clojure | default | (ns quil.snippets.shape.primitives-3d
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
(defsnippet box
"box"
{:renderer :p3d}
... |
d8d41dd1564968b9448d337acf5168ebe0eed16b500866322cd65622fec82c9f | runtimeverification/haskell-backend | OrPattern.hs | module Test.Kore.Simplify.OrPattern (
test_orPatternSimplification,
) where
import Kore.Internal.Conditional (
Conditional (Conditional),
)
import Kore.Internal.Conditional qualified as Conditional.DoNotUse
import Kore.Internal.OrPattern (
OrPattern,
)
import Kore.Internal.OrPattern qualified as OrPatter... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/test/Test/Kore/Simplify/OrPattern.hs | haskell | wrap the given term for sort agreement
wrap the given term for sort agreement | module Test.Kore.Simplify.OrPattern (
test_orPatternSimplification,
) where
import Kore.Internal.Conditional (
Conditional (Conditional),
)
import Kore.Internal.Conditional qualified as Conditional.DoNotUse
import Kore.Internal.OrPattern (
OrPattern,
)
import Kore.Internal.OrPattern qualified as OrPatter... |
88725428e173b5026695dbd8b52302938156ff85568e50253c02b3b55c844ebb | anoma/juvix | Info.hs | | This file defines Infos stored in JuvixCore Nodes . The Info data structure
-- maps an info type to an info of that type.
module Juvix.Compiler.Core.Info where
import Data.Dynamic
import Data.HashMap.Strict qualified as HashMap
import Juvix.Prelude hiding (insert)
class (Typeable a) => IsInfo a
newtype Info = I... | null | https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/src/Juvix/Compiler/Core/Info.hs | haskell | maps an info type to an info of that type. | | This file defines Infos stored in JuvixCore Nodes . The Info data structure
module Juvix.Compiler.Core.Info where
import Data.Dynamic
import Data.HashMap.Strict qualified as HashMap
import Juvix.Prelude hiding (insert)
class (Typeable a) => IsInfo a
newtype Info = Info
{ _infoMap :: HashMap TypeRep Dynamic
}... |
a4267a0e05452ec340dcf91a30c077437e12f62d54c8d6559641c89f538a0894 | stchang/macrotypes | stlc+reco+var.rkt | #lang turnstile/base
(extends "stlc+tup.rkt" #:except × ×? tup proj ~×)
(require (only-in "stlc+tup.rkt" [~× ~stlc:×])
(for-meta 2 racket/base syntax/parse)
(postfix-in - racket/bool))
;; Simply-Typed Lambda Calculus, plus records and variants
;; Types:
;; - types from stlc+tup.rkt
;; - redefine tupl... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/stlc%2Breco%2Bvar.rkt | racket | Simply-Typed Lambda Calculus, plus records and variants
Types:
- types from stlc+tup.rkt
- redefine tuple type × to records
- sum type constructor ∨
Terms:
- terms from stlc+tup.rkt
- redefine tup to records
- sums (var)
re-define tuples as records
dont use define-type-constructor because I want the : litera... | #lang turnstile/base
(extends "stlc+tup.rkt" #:except × ×? tup proj ~×)
(require (only-in "stlc+tup.rkt" [~× ~stlc:×])
(for-meta 2 racket/base syntax/parse)
(postfix-in - racket/bool))
(provide (type-out × ∨) tup proj var case)
(define-syntax ×
(syntax-parser #:datum-literals (:)
[(_ [label:i... |
846343e1991545453e8fabdbd632cf68b7a95c3d83bb8b41a3ab26cd63f8b2c0 | qerub/ring-middleware-jsonp | jsonp.clj | (ns ring.middleware.jsonp
(:import (java.io ByteArrayInputStream
File
FileInputStream
InputStream
SequenceInputStream)
(java.nio.charset Charset)
(clojure.lang Sequential
SeqEnumeration))
(... | null | https://raw.githubusercontent.com/qerub/ring-middleware-jsonp/e0c0bccc7964c71f9b5045059db1fa30908196f1/src/ring/middleware/jsonp.clj | clojure | (ns ring.middleware.jsonp
(:import (java.io ByteArrayInputStream
File
FileInputStream
InputStream
SequenceInputStream)
(java.nio.charset Charset)
(clojure.lang Sequential
SeqEnumeration))
(... | |
84f1c85c6a4f212664a69dcda8876d8ce394a639b5eca2b2ba47ff342fe7e067 | drdo/logic-translation | Main.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE UnicodeSyntax #
import Control.Exception
import Data.List (intersperse)
import System.Console.GetOpt
import System.Environment
import Text.Parsec
import Parse
import Pretty
import Separation
import Translation
---------------------------------------... | null | https://raw.githubusercontent.com/drdo/logic-translation/3efca7ce74b2e018a6ac4a8dacfc8a2dcfbd467f/executable/Main.hs | haskell | # LANGUAGE MultiWayIf #
------------------------------------------------------------------------------ | # LANGUAGE FlexibleContexts #
# LANGUAGE UnicodeSyntax #
import Control.Exception
import Data.List (intersperse)
import System.Console.GetOpt
import System.Environment
import Text.Parsec
import Parse
import Pretty
import Separation
import Translation
instance Exception ParseError
data Flags
= Help
| NoSimplifica... |
2dcacfd131d303a16050c71a0ba976712a99a48ed13b9ca389a340ea8d27e4f7 | cerner/clara-rules | test_rhs_retract.cljc | #?(:clj
(ns clara.test-rhs-retract
(:require [clara.tools.testing-utils :refer [def-rules-test] :as tu]
[clara.rules :refer [fire-rules
insert
insert-all
insert!
... | null | https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/common/clara/test_rhs_retract.cljc | clojure | The session should contain our initial cold reading.
Insert a higher temperature and ensure the cold fact was retracted. | #?(:clj
(ns clara.test-rhs-retract
(:require [clara.tools.testing-utils :refer [def-rules-test] :as tu]
[clara.rules :refer [fire-rules
insert
insert-all
insert!
... |
84dc33a5eab226789bb569e2c870a8eab496bcf77230eda6a7839c7b764220e0 | msfm2018/Online-Service | reloader.erl | %%%-------------------------------------------------------------------
@author wl
( C ) 2015 , < COMPANY >
%%% @doc
ebin目录为beam目录,ebin_update为更新beam放的目录 , 详见do/0
%%% @end
Created : 06 . 二月 2015 19:43
%%%-------------------------------------------------------------------
-module(reloader).
-include("common.h... | null | https://raw.githubusercontent.com/msfm2018/Online-Service/281c2db795f09c7e4dc6768d08d35bbe83350670/src/lib/reloader.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
?CON... | @author wl
( C ) 2015 , < COMPANY >
ebin目录为beam目录,ebin_update为更新beam放的目录 , 详见do/0
Created : 06 . 二月 2015 19:43
-module(reloader).
-include("common.hrl").
-behaviour(gen_server).
-export([
start/1,
start_link/0
]).
-include_lib("kernel/include/file.hrl").
-define(DEFAULT_TIME, 10).
-export([init/1,
ha... |
50364be69589090784b1d303899486cbacdb3e63fd421a89e3cca1161571280d | discus-lang/ddc | FreeT.hs |
module DDC.Core.Collect.FreeT
( FreeVarConT(..)
, freeVarsT)
where
import DDC.Core.Collect.BindStruct
import DDC.Type.Exp
import DDC.Type.Env (KindEnv)
import Data.Set (Set)
import qualified DDC.Type.Env as Env
import qualified DDC.Type.Sum as Sum
import qualified Data.S... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Collect/FreeT.hs | haskell | | Collect the free type variables in a type.
| Collect the free type variables and constructors used in a thing. |
module DDC.Core.Collect.FreeT
( FreeVarConT(..)
, freeVarsT)
where
import DDC.Core.Collect.BindStruct
import DDC.Type.Exp
import DDC.Type.Env (KindEnv)
import Data.Set (Set)
import qualified DDC.Type.Env as Env
import qualified DDC.Type.Sum as Sum
import qualified Data.S... |
175ef15a2fde79cb98d35e6731becb30362bf5171a16c91ca45236823b8e19ec | FlowerWrong/mblog | example1.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/ports/example1.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(example1).
-export([start/0, stop/0]).
-export([twice/1, sum/2]).
start() ->
register(example1,
spawn(fun() ->
process_flag(trap_exit, true),
Port = open_port({spawn, "./example1"}, [{... |
7703143b288bc5df4a2994ca790c84422a55594fb1e95b88f9b9815095e3d689 | leftaroundabout/beamonad | Maths.hs | -- |
-- Module : Presentation.Yeamer.Maths
Copyright : ( c ) 2017
-- License : GPL v3
--
-- Maintainer : (@) jsag $ hvl.no
-- Stability : experimental
-- Portability : portable
--
Convenience module , re - exporting the necessary LaTeX builders for writing maths
-- in a Yeamer presentation.
# LA... | null | https://raw.githubusercontent.com/leftaroundabout/beamonad/67cb0f34b38dc31944ff9c360051face3f7760d5/Presentation/Yeamer/Maths.hs | haskell | |
Module : Presentation.Yeamer.Maths
License : GPL v3
Maintainer : (@) jsag $ hvl.no
Stability : experimental
Portability : portable
in a Yeamer presentation. | Copyright : ( c ) 2017
Convenience module , re - exporting the necessary LaTeX builders for writing maths
# LANGUAGE CPP #
module Presentation.Yeamer.Maths
( module Presentation.Yeamer
, module Math.LaTeX.Prelude
, module Math.LaTeX.StringLiterals
... |
5be946962a5cd185d9f657be3ee14686588964a8533da400665c6edfa230a7b4 | NorfairKing/the-notes | Macro.hs | module Macro.LinearAlgebra.Macro where
import Types
import NumberTheory.Macro
import Macro.Math
import Macro.MetaMacro
import Macro.Text
import Macro.Tuple
Transpose
trans :: Note -> Note
trans n = n ^: "T"
veclst :: Note -> Note -> Note
veclst m n = p... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Macro/LinearAlgebra/Macro.hs | haskell | Matrix inverse
Real vectors
Operations on Vector of numbers
Field
Set
Addition
Multiplication
| Dotproduct
| Addition of euclidean vectors
Field
Set
Addition
Multiplication
Inner product
Identity matrix
| Times, in the context of matrix dimensions
> C-k *X | module Macro.LinearAlgebra.Macro where
import Types
import NumberTheory.Macro
import Macro.Math
import Macro.MetaMacro
import Macro.Text
import Macro.Tuple
Transpose
trans :: Note -> Note
trans n = n ^: "T"
veclst :: Note -> Note -> Note
veclst m n = p... |
a405eabb8bd978e2bf96b13aa3750b8bc7ce7e0d5f833224b268ef28b6731083 | Guest0x0/normalization-bench | Normalizer.ml |
open Common
type normalizer =
{ run : Syntax.term -> Syntax.term option -> unit }
exception Wrong_Answer
let simple_normalizer f =
let run tm expected =
let t0 = Sys.time () in
let nf = f tm in
let t1 = Sys.time () in
match expected with
| Some nf' when Hashtbl.hash nf... | null | https://raw.githubusercontent.com/Guest0x0/normalization-bench/ed3a61c65c5ac3238f8905a020df671caac991fa/Normalizers/Normalizer.ml | ocaml | Printf.printf " (gen=%.6f)\n" (t1 -. t0) |
open Common
type normalizer =
{ run : Syntax.term -> Syntax.term option -> unit }
exception Wrong_Answer
let simple_normalizer f =
let run tm expected =
let t0 = Sys.time () in
let nf = f tm in
let t1 = Sys.time () in
match expected with
| Some nf' when Hashtbl.hash nf... |
19984b54c3b9607c734f30665631b8a0693c13f6ab76ce11a6804d08848c1d09 | clojure/clr.tools.namespace | track.cljc | Copyright ( c ) , 2012 . 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 ... | null | https://raw.githubusercontent.com/clojure/clr.tools.namespace/e2eb4253305e99d0d123c5266af6febcc49a59c5/src/clojure/tools/namespace/track.cljc | 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.
With a new tracker, old dependencies are ... | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
(ns ^{:author "Stuart Sierra"
:doc "Dependency tracker which can compute which namespaces need to be
reloaded after files have changed. This is the low-level
implementation that re... |
d604b6f7f60440c61e9d3f2bd35c48632b8d9fb4f64d7ebc11f97d894c6a006d | aws-beam/aws-erlang | aws_medialive.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc API for AWS Elemental MediaLive
-module(aws_medialive).
-export([accept_input_device_transfer/3,
accept_input_device_transfer/4,
batch_delete/2,
batch_delete/3,
batch_start/2,
b... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_medialive.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
====================================================================
API
====================================================================
@doc Accept an incoming input device transfer.
The ownership of the device will transfer to your AWS account.
@doc Starts delete ... | See -beam/aws-codegen for more details .
@doc API for AWS Elemental MediaLive
-module(aws_medialive).
-export([accept_input_device_transfer/3,
accept_input_device_transfer/4,
batch_delete/2,
batch_delete/3,
batch_start/2,
batch_start/3,
batch_stop/2,
... |
6a363c5b3e3383bd9977a545441d1796d54f9ea2c17e2aa468d134a7435a900e | faylang/fay | ReExportGlobally.hs | module ReExportGlobally (main, x) where
import FFI
import ReExportGlobally.A (x)
main :: Fay ()
main = do
ffi "console.log(ReExportGlobally.x)" :: Fay () -- Re-export to JS
ffi "console.log('NewTy' in ReExportGlobally.A)" :: Fay () -- Don't add exports for new types
ffi "console.log('NewTy'... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/ReExportGlobally.hs | haskell | Re-export to JS
Don't add exports for new types
Don't add exports for new types
Don't add exports for new types
Don't add exports for new types | module ReExportGlobally (main, x) where
import FFI
import ReExportGlobally.A (x)
main :: Fay ()
main = do
|
2318739a9f5554442355c95bf3ed406a515ee367a6ba64fc119a1f568f55b804 | ocaml-community/ocamlscript | common.mli | (** Options that are shared by all compilation modules. *)
* All arguments which are not valid options for ocamlscript
but are not arguments of the script either .
Typically it would be the case of unix.cmxa in
" # ! /usr / bin / ocamlscript unix.cmxa " .
It is the responsibility of the " compile " fun... | null | https://raw.githubusercontent.com/ocaml-community/ocamlscript/df0f04d7e41655944bd14e6989dd695425e5f871/common.mli | ocaml | * Options that are shared by all compilation modules.
* runtime trash which may contain the name of the executable itself,
for self-removal, in case it is a temporary file (e.g. generated from
standard input).
* If this option is true, ocamlscript prints some debugging information
to stdout.
* [script_dir] i... |
* All arguments which are not valid options for ocamlscript
but are not arguments of the script either .
Typically it would be the case of unix.cmxa in
" # ! /usr / bin / ocamlscript unix.cmxa " .
It is the responsibility of the " compile " function to handle these
arguments . The default " compile... |
57f57f558ac412d6ef08b784993538b8da3cbf1f774b8ea4383adb35cefd9e19 | ocharles/blog | 2014-05-28-querying.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverlappingInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
module Querying where
impor... | null | https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2014-05-28-querying.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverlappingInstances #
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
module Querying where
import Control.Applicative
import Control.Monad
import D... |
5cab48525007547159eea49baefe5463e0ac2d86be3eb8ec932072a94f3a7ef9 | wfnuser/sicp-solutions | e2-45.scm | (define up-split (split below beside))
(define (split big-operate small-operate)
(lambda (painter n)
(if (= n 0)
painter
(let ((smaller ((split big-combiner small-combiner) painter (- n 1))))
(big-operate painter (small-operate smaller smaller))
)
... | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch2/e2-45.scm | scheme | (define up-split (split below beside))
(define (split big-operate small-operate)
(lambda (painter n)
(if (= n 0)
painter
(let ((smaller ((split big-combiner small-combiner) painter (- n 1))))
(big-operate painter (small-operate smaller smaller))
)
... | |
3ce4ae996fbc62bd3ad0f6bf3529d1e6afefdd6269704a9947e8a1c4434331ab | huangz1990/SICP-answers | 1-list-of-values-from-left-to-right.scm | 1-list-of-values-from-left-to-right.scm
(define (list-of-values exps env)
(if (not-operands? exps)
'()
(let ((first-value (eval (first-operand exps) env)))
(cons first-value
(list-of-values (rest-operands exps) env)))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp4/code/1-list-of-values-from-left-to-right.scm | scheme | 1-list-of-values-from-left-to-right.scm
(define (list-of-values exps env)
(if (not-operands? exps)
'()
(let ((first-value (eval (first-operand exps) env)))
(cons first-value
(list-of-values (rest-operands exps) env)))))
| |
07cdeda7af863f15b5af907fa78f6451c9571cd91d04dc10ddef1c200431e1c1 | ml4tp/tcoq | goal.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/proofs/goal.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module implements the abstract... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Pp
open Term
o... |
e5ac34c8f35d2d7604f02b80809976b973b22111ff77a18d33c5d704b3722aa7 | eschulte/elf | elf-test.lisp | ;;; elf-test.lisp --- Tests for elf.lisp
Copyright ( C ) 2011 - 2013
;; Licensed under the Gnu Public License Version 3 or later
;;; Code:
(in-package :elf/test)
(defsuite test)
(in-suite test)
;;; testing components
(defvar *test-class* :32-bit "architecture to test (e.g. 32-bit or 64-bit)")
(defvar *tmp-... | null | https://raw.githubusercontent.com/eschulte/elf/795ca3352ad981e6773fac89b3884d0eda701cee/test/elf-test.lisp | lisp | elf-test.lisp --- Tests for elf.lisp
Licensed under the Gnu Public License Version 3 or later
Code:
testing components
tests which run
elf-test.lisp ends here |
Copyright ( C ) 2011 - 2013
(in-package :elf/test)
(defsuite test)
(in-suite test)
(defvar *test-class* :32-bit "architecture to test (e.g. 32-bit or 64-bit)")
(defvar *tmp-file* nil "temporary file used for testing")
(defvar *elf* nil "variable to hold elf object")
(defixture hello-elf
(:setup
(setf... |
8acdb0476e38dc0873f391dafef7916766d10fb06e4da1cd9d4d6581df8e5b7b | zack-bitcoin/amoveo | vanity.erl | -module(vanity).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
start/1, stop/0, check/0, speed/0,
start2/2, is_vanity/2, go/0]).
-define(TIMES, 1000).%how many times till we check the gen server if we should stop mining.
-define(LEAD_CHARS, 8... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_core/src/vanity.erl | erlang | how many times till we check the gen server if we should stop mining.
how close to the front does the word have to appear?
io:fwrite(integer_to_list(Y1)),
io:fwrite("\n"), | -module(vanity).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
start/1, stop/0, check/0, speed/0,
start2/2, is_vanity/2, go/0]).
init(ok) -> {ok, []}.
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, ok, []).
code_change(_OldV... |
9ddcc766477dbefb27913ef63108f86c409652f71800275e3e1c11d0d791a93d | tnelson/Forge | unreferencedAtomsDontPopulateBug.rkt | #lang forge
-- If a sig is not explicitly part of any constraint, then it does not
-- get populated in any instances. The meta-universe is populated
-- up to the bounds, but the generated instances don't use unused sigs.
option verbosity 0
-- This sig will be explicitly referenced in our predicate;
-- it will end u... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/OLD/bugs/unreferencedAtomsDontPopulateBug.rkt | racket | #lang forge
-- If a sig is not explicitly part of any constraint, then it does not
-- get populated in any instances. The meta-universe is populated
-- up to the bounds, but the generated instances don't use unused sigs.
option verbosity 0
-- it will end up populating instances
sig A {}
-- it will not end up popul... | |
a79765a2a0665b4ab2f8e697bad581e616ea64e57b21dd09f3825ee15f44eccf | GaloisInc/daedalus | Diagnostics.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- | Implements core diagnostics (parse errors, type errors, etc.)
module Daedalus.LSP.Diagnostics where
import Data.Text (Text)
import qualified Data.Text as Text
import Control.Lens ... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/fc973de33b7728c02cd6de07962674090596098a/daedalus-language-server/src/Daedalus/LSP/Diagnostics.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Implements core diagnostics (parse errors, type errors, etc.)
This module handles parsing and type checking of modules. Note
that parsing can be done independently of other modules, but
scoping and type checking need dependencies to be processed.
We do thi... |
module Daedalus.LSP.Diagnostics where
import Data.Text (Text)
import qualified Data.Text as Text
import Control.Lens hiding (Iso, (<.>))
import Language.LSP.Types (Diagnostic (..))
import qualified Language.LSP.Types ... |
af7e7ca95250bda04d82b39903e38b84b402040da86b8de286027400a484e5a1 | brendanhay/terrafomo | Settings.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : Terrafomo . Vault . Settings
Copyright : ( c ) 2017 - 2018
License... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-vault/gen/Terrafomo/Vault/Settings.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* ClientAuth
* DatabaseSecretBackendConnectionCassandra
* DatabaseSecretBackendConnectionHana
* DatabaseSecretBackendConnectionMongodb
* DatabaseSecretBackendConnectionMssql
* DatabaseSecretBackendConnectionMysql
* DatabaseSecretBackendConnectionO... |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : Terrafomo . Vault . Settings
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0... |
c5c1c6477638c5df2947116243e558d0a54a0e905273601a92a53f2748d6f174 | haskell/hackage-server | Browse.hs | # LANGUAGE BlockArguments , NamedFieldPuns #
module Distribution.Server.Features.Browse (initBrowseFeature, PaginationConfig(..), StartIndex(..), NumElems(..), paginate) where
import Control.Monad.Except (ExceptT, throwError)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import qualifi... | null | https://raw.githubusercontent.com/haskell/hackage-server/f624f6f20f54694904ba2ba21fb4493839f02c1d/src/Distribution/Server/Features/Browse.hs | haskell | make sure it is kept in sync with frontend
We don't want to claim that the page 0 is ever out of bounds, | # LANGUAGE BlockArguments , NamedFieldPuns #
module Distribution.Server.Features.Browse (initBrowseFeature, PaginationConfig(..), StartIndex(..), NumElems(..), paginate) where
import Control.Monad.Except (ExceptT, throwError)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import qualifi... |
99f01e9555540c691db39b31223081c5c8670e4cae05b3f8490ec8626b3a8531 | modular-macros/ocaml-macros | t090-acc5.ml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
let c = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUSHCONST0
1... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t090-acc5.ml | ocaml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
let c = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUSHCONST0
1... | |
1e52febe6711180ec046315590cc49c34748eb3bdba7305aa3478d49144ade36 | dnaeon/cl-rfc4251 | stream.lisp | Copyright ( c ) 2020 Nikolov < >
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
1 . Redistributions of source code must retain the above copyright
;; notice, this list of co... | null | https://raw.githubusercontent.com/dnaeon/cl-rfc4251/3b431bb43348335cfcdfb73054515f76930174e8/src/stream.lisp | 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:
notice, this list of conditions and the following disclaimer
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2020 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
7977e591d8d81257ebc4e31e0fe13cfec0a990745231d018cd63424a03ad81f1 | 3b/3bgl-misc | file-loader.lisp | (in-package 3bgl-sg2)
;; controls post-processing done by assimp while loading files. not
;; included in cache index, so probably shouldn't be changed much at
;; runtime unless all uses of any give file are known to be with same
;; settings
(defparameter *ai-loader-post-processing*
;; other code assumes triangles on... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph2/file-loader.lisp | lisp | controls post-processing done by assimp while loading files. not
included in cache index, so probably shouldn't be changed much at
runtime unless all uses of any give file are known to be with same
settings
other code assumes triangles only, so should include at least
that much if data isn't previously validated/... | (in-package 3bgl-sg2)
(defparameter *ai-loader-post-processing*
currently assuming 16bit indices in meshes , max 4 bones per vert ,
'(:ai-process-preset-target-realtime-max-quality))
(defparameter *ai-loader-properties*
'(:pp-sbp-remove (:point :line)
:pp-slm-vertex-limit 65535))
(defparameter *ai-attribute... |
eca39488f73bdc06281a93affed5c903622ab1dd3cea30907ae777d8ae5c7330 | brendanhay/gogol | Delete.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-searchconsole/gen/Gogol/SearchConsole/Webmasters/Sites/Delete.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
/See:/ 'newWebmastersSitesDelete' smart constructor.
| V1 error format.
| OAuth access token.
| Upload protocol for media (e.g. \"raw\", \"multipart\"). | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
879235b152de7506cd991f972a4e7afd154dba57dc13eb72ad51d5d044b86be3 | syntax-objects/syntax-parse-example | dot-underscore.rkt | #lang racket/base
;;;
;;; Exports
;;;
(provide
:=
(rename-out [top #%top])
(rename-out [app #%app]))
;;;
;;; Imports
;;;
(require (for-syntax racket/base
syntax/parse
syntax/strip-context
racket/string
racket/syntax)
rac... | null | https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/dot-underscore/dot-underscore.rkt | racket |
Exports
Imports
Syntax Utilities
> (split-string-at-dot/underscore "foo.bar_baz.qux")
'("foo" "." "bar" "_" "baz" "." "qux")
note: context is either #f or a syntax object
prop is either #f or a syntax object
Like #%top, but additionally:
- identifiers containing a dot is rewritten to u... | #lang racket/base
(provide
:=
(rename-out [top #%top])
(rename-out [app #%app]))
(require (for-syntax racket/base
syntax/parse
syntax/strip-context
racket/string
racket/syntax)
racket/list
racket/class
... |
18840129e28703af827f4c0f817e65e6c1512a62a489f4c80c2227b10698ddcc | kumarshantanu/keypin | 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 LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/keypin/d5151adebff2cb4970ff531c92c03593697d49c2/src/keypin/core.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE 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 ... | Copyright ( c ) . All rights reserved .
(ns keypin.core
"Public API for the core functionality."
(:require
[clojure.edn :as edn]
[clojure.string :as string]
[keypin.internal :as i]
[keypin.type :as t]
[keypin.util :as u])
(:import
[clojure.lang Associative IDeref]
... |
9bdb044516b4e7968c1e7c37d64a130a3e24dc13a1404c88173f49edc8cbb1a7 | josefs/Gradualizer | sets_set.erl | -module(sets_set).
-compile([export_all, nowarn_export_all]).
-spec add_var(string(), sets:set(string())) -> sets:set(string()).
add_var(Var, Set) ->
sets:add_element(Var, Set).
| null | https://raw.githubusercontent.com/josefs/Gradualizer/0a3b667c72460500e3b2d5c70db3088bd87539c8/test/should_pass/sets_set.erl | erlang | -module(sets_set).
-compile([export_all, nowarn_export_all]).
-spec add_var(string(), sets:set(string())) -> sets:set(string()).
add_var(Var, Set) ->
sets:add_element(Var, Set).
| |
51087cb7fe068baacefe54957938f0a6fba54d958d7016284c78c39cc9f73c58 | processone/pgsql | pgsql_sup.erl | %%%----------------------------------------------------------------------
File : pgsql_sup.erl
Author : < >
Purpose : PostgreSQL erlang driver supervisor
Created : 15 May 2013 by < >
%%%
%%%
p1_pgsql , Copyright ( C ) 2002 - 2015 ProcessOne
%%%
%%% This program is free software; you can redistr... | null | https://raw.githubusercontent.com/processone/pgsql/584fbbfce063af5c3848854c2476179d820e2a6a/src/pgsql_sup.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
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
MER... | File : pgsql_sup.erl
Author : < >
Purpose : PostgreSQL erlang driver supervisor
Created : 15 May 2013 by < >
p1_pgsql , Copyright ( C ) 2002 - 2015 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
... |
d5f6e9df59a3a7f3ae895bb34571b6b8ffaf677ce43e073adf7ed08793abbe3e | cljdoc/cljdoc | sqlite_cache_test.clj | (ns cljdoc.util.sqlite-cache-test
(:require [clojure.test :as t]
[clojure.java.io :as io]
[clojure.core.memoize :as memo]
[cljdoc.util.sqlite-cache :as c])
(:import [clojure.lang ExceptionInfo]
[java.time Instant]))
(def database-filename "data/unit-test-cache.db")
(... | null | https://raw.githubusercontent.com/cljdoc/cljdoc/1a1c12d88d289b65ca196d49b7c41279c7fa3a51/test/cljdoc/util/sqlite_cache_test.clj | clojure | (ns cljdoc.util.sqlite-cache-test
(:require [clojure.test :as t]
[clojure.java.io :as io]
[clojure.core.memoize :as memo]
[cljdoc.util.sqlite-cache :as c])
(:import [clojure.lang ExceptionInfo]
[java.time Instant]))
(def database-filename "data/unit-test-cache.db")
(... | |
eb6cc9ab0f23d6ff443e4c3d83cd658a96d0f9a5af4bfd55a831daa4e25df681 | con-kitty/categorifier-c | ArrayName.hs | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
-- | Naming primitives.
module Categorifier.C.Prim.ArrayName
( ArrayName (..),
* ' Control . Lens . '
_ArrayName, -- from makePrisms
)
where
import Codec.Serialise (Serialise)
import Con... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/Prim/ArrayName.hs | haskell | | Naming primitives.
from makePrisms | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Categorifier.C.Prim.ArrayName
( ArrayName (..),
* ' Control . Lens . '
)
where
import Codec.Serialise (Serialise)
import Control.DeepSeq (NFData (..), NFData1 (..))
import Control.Len... |
7edd689abe2df40a0317f2612279cd5e0bb2ee5a7bcb2c60a54b66b75e802f8e | avsm/mirage-duniverse | ast_pattern.ml | open! Import
include Ast_pattern0
let save_context ctx = ctx.matched
let restore_context ctx backup = ctx.matched <- backup
let incr_matched c = c.matched <- c.matched + 1
let parse (T f) loc ?on_error x k =
try f { matched = 0 } loc x k
with Expected (loc, expected) ->
match on_error with
| None -> Loc... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppxlib/src/ast_pattern.ml | ocaml | open! Import
include Ast_pattern0
let save_context ctx = ctx.matched
let restore_context ctx backup = ctx.matched <- backup
let incr_matched c = c.matched <- c.matched + 1
let parse (T f) loc ?on_error x k =
try f { matched = 0 } loc x k
with Expected (loc, expected) ->
match on_error with
| None -> Loc... | |
3cbaa0678fc3eb568c9550948aa2a7554eb05bd3123739ab2b38dd06733af125 | sondresl/AdventOfCode | Day23.hs | module Day23 where
import Lib
import Control.Lens
import Data.List.Extra
parseInput = id
part1 input = undefined
part2 input = undefined
main :: IO ()
main = do
input <- parseInput <$> readFile "../data/day01.in"
print input
-- print $ part1 input
-- print $ part2 input
| null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2015/Haskell/src/Day23.hs | haskell | print $ part1 input
print $ part2 input | module Day23 where
import Lib
import Control.Lens
import Data.List.Extra
parseInput = id
part1 input = undefined
part2 input = undefined
main :: IO ()
main = do
input <- parseInput <$> readFile "../data/day01.in"
print input
|
bca7df94e684107dcb6960262dc5da6fe3f3ab069208f9d83ffa0995d8b31baa | bozsahin/ccglab-database | g-ko.ccg.lisp | (defparameter *ccg-grammar*
'(((KEY 1) (PHON I) (MORPH N) (SYN ((BCAT NP) (FEATS ((AGR |1S|))))) (SEM "I")
(PARAM 1.0))
((KEY 2) (PHON ARRIVES) (MORPH EN)
(SYN
(((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL)
((BCAT NP) (FEATS ((AGR |3S|))))))
(SEM (LAM X ("ARRIVE" X))) (PARAM 1.0))
((KEY 3) (PHON ARR... | null | https://raw.githubusercontent.com/bozsahin/ccglab-database/f24215aaa4ac8102f6d76c9c0ec5bd58a29743d7/cl-db1/g-ko.ccg.lisp | lisp | (defparameter *ccg-grammar*
'(((KEY 1) (PHON I) (MORPH N) (SYN ((BCAT NP) (FEATS ((AGR |1S|))))) (SEM "I")
(PARAM 1.0))
((KEY 2) (PHON ARRIVES) (MORPH EN)
(SYN
(((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL)
((BCAT NP) (FEATS ((AGR |3S|))))))
(SEM (LAM X ("ARRIVE" X))) (PARAM 1.0))
((KEY 3) (PHON ARR... | |
a005f5b56ae5a5bd2fec52dc04a1b4dd0ac31efc8489cca4c69bb1754697c4ba | Relph1119/sicp-solutions-manual | p50-sqrt.scm | (load "src/examples/ch01/p49-newtons-method.scm")
(load "src/examples/ch01/p8-square.scm")
(load "src/examples/ch01/p50-fixed-point-of-transform.scm")
(load "src/examples/ch01/p48-average-damp.scm")
(define (sqrt x)
(newtons-method (lambda (y) (- (square y) x))
1.0))
(define (sqrt x)
(fixed-point-of-t... | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/examples/ch01/p50-sqrt.scm | scheme | (load "src/examples/ch01/p49-newtons-method.scm")
(load "src/examples/ch01/p8-square.scm")
(load "src/examples/ch01/p50-fixed-point-of-transform.scm")
(load "src/examples/ch01/p48-average-damp.scm")
(define (sqrt x)
(newtons-method (lambda (y) (- (square y) x))
1.0))
(define (sqrt x)
(fixed-point-of-t... | |
ac041fecd95530084d209cb8fc02000ac2c2608fb324e4813055f3bfac6cf47c | souenzzo/souenzzo.github.io | ds_http_test.clj | (ns br.com.souenzzo.ds-http-test
(:require [br.com.souenzzo.ds-http :as ds]
[io.pedestal.test :refer [response-for]]
[io.pedestal.http :as http]
[midje.sweet :refer [fact =>]]
[br.com.souenzzo.ds-http.testing :refer [str->is request->input-stream]]
[clojure.... | null | https://raw.githubusercontent.com/souenzzo/souenzzo.github.io/30a811c4e5633ad07bba1d58d19eb091dac222e9/ds-http/test/br/com/souenzzo/ds_http_test.clj | clojure | :scheme :http
:server-name "foo.bar" | (ns br.com.souenzzo.ds-http-test
(:require [br.com.souenzzo.ds-http :as ds]
[io.pedestal.test :refer [response-for]]
[io.pedestal.http :as http]
[midje.sweet :refer [fact =>]]
[br.com.souenzzo.ds-http.testing :refer [str->is request->input-stream]]
[clojure.... |
b385fe76669d93a872e00401c45e9a2962638e8a48781b857ef1a17c644a63b2 | gedge-platform/gedge-platform | ranch_sup.erl | Copyright ( c ) 2011 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
%%
%% 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... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_sup.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_... |
6021d66b593b1e766a283a54a129d134094e9380427fdf2b66fa535850b78dfc | cnuernber/avclj | libavclj.clj | (ns avclj.libavclj
(:require [avclj :as avclj]
[avclj.libavclj-init :as libinit]
[avclj.av-codec-ids :as codec-ids]
[tech.v3.datatype.ffi :as dt-ffi]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.native-buffer :as native-buffer]
[tech.v3.datatyp... | null | https://raw.githubusercontent.com/cnuernber/avclj/877a239c73edbc55a826d030fa3b23ef5cacf948/native_test/avclj/libavclj.clj | clojure | int pointers are translated into native buffers of int width
both encoders and decoders are auto-closeable | (ns avclj.libavclj
(:require [avclj :as avclj]
[avclj.libavclj-init :as libinit]
[avclj.av-codec-ids :as codec-ids]
[tech.v3.datatype.ffi :as dt-ffi]
[tech.v3.datatype :as dtype]
[tech.v3.datatype.native-buffer :as native-buffer]
[tech.v3.datatyp... |
2ed76df1f459e168bff72d30c46198b073a02050b558ec00d77aaf22ff331f21 | plexus/chestnut | integration.clj | (ns chestnut.test.integration
(:require [clojure.java.io :as io]
[mistletoe.process :refer :all]
[mistletoe.test :refer :all]
[clj-webdriver.taxi :as browser]
[clojure.string :as s]
[leiningen.new.chestnut :as chestnut]
[clojure.java.shell :refer... | null | https://raw.githubusercontent.com/plexus/chestnut/684b668141586ed5ef4389f94a4dc7f4fde13112/src/chestnut/test/integration.clj | clojure | The path to the driver executable must be set by the
webdriver.chrome.driver system property; for more information, see
. The latest
version can be downloaded from
SASS is officially unsupported and requires a SASSC binary | (ns chestnut.test.integration
(:require [clojure.java.io :as io]
[mistletoe.process :refer :all]
[mistletoe.test :refer :all]
[clj-webdriver.taxi :as browser]
[clojure.string :as s]
[leiningen.new.chestnut :as chestnut]
[clojure.java.shell :refer... |
9a7b53514ce76ac56bd0e3992bb0a73d6cf0536c45ddc329fb6cb4d7068b4dd1 | rabbitmq/rabbitmq-web-dispatch | rabbit_web_dispatch_unit_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_web_dispatch_unit_SUITE).
-compil... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-web-dispatch/3fc4f8471bf1afad24bbb07ecad8853d5b3a05a7/test/rabbit_web_dispatch_unit_SUITE.erl | erlang |
-------------------------------------------------------------------
Test suite setup/teardown.
-------------------------------------------------------------------
-------------------------------------------------------------------
Test cases.
------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_web_dispatch_unit_SUITE).
-compile(expo... |
278abf04150923f8f98229453b88ee878d95e1af97b3d53a6732bbf30288e23e | nebularis/systest | systest_cli.erl | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% ----------------------------------------------------------------------------
%%
Copyright ( c ) 2005 - 2012 Nebularis .
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this ... | null | https://raw.githubusercontent.com/nebularis/systest/fbef181fd0203137f9f6ca6a471c75ca180ec375/src/systest_cli.erl | erlang | ex: ts=4 sw=4 et
----------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), deal
to use, copy, modify, merge, publish, distribute, sublicense, and/o... | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
Copyright ( c ) 2005 - 2012 Nebularis .
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 ... |
3e0677a33436d548801d7ee74407e0f8f229bf7b9641197507893b514277c5bf | borkdude/advent-of-cljc | mrmcc3.cljc | (ns aoc.y2018.d04.mrmcc3
(:refer-clojure :exclude [read-string format])
(:require
[aoc.utils :as u :refer [deftest read-string format]]
[aoc.y2018.d04.data :refer [input answer-1 answer-2]]
[clojure.test :refer [is testing]]
[clojure.string :as str]))
(defn parse-event [s]
(let [[_ id] (re-find #... | null | https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d04/mrmcc3.cljc | clojure | map of guard id -> seq of minutes asleep
delay computation
- lexographic sorting is sufficient to put events in time order | (ns aoc.y2018.d04.mrmcc3
(:refer-clojure :exclude [read-string format])
(:require
[aoc.utils :as u :refer [deftest read-string format]]
[aoc.y2018.d04.data :refer [input answer-1 answer-2]]
[clojure.test :refer [is testing]]
[clojure.string :as str]))
(defn parse-event [s]
(let [[_ id] (re-find #... |
7f77952a0bc01a0505d816956817cdea7dad2c22e70cfe3d65425d39ddc00bb6 | Kappa-Dev/KappaTools | symmetries_sig.mli | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/symmetries/symmetries_sig.mli | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
type 'a site_partition =
{
over_binding_states: 'a list list ;
over_internal_states: 'a list list ;
over_full_states: 'a list list ;
}
val empty : 'a site_partition
val map: ('a -> 'b) -> 'a site_partition -> 'b... |
13bda5551f645ae251c1d33085a2d00493e61669c1328d7c789ffbc515b51f46 | grin-compiler/ghc-whole-program-compiler-project | Word8Spec.hs | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns #
module PrimOp.Word8Spec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Type(..))
import Stg.Interpret... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/3fe5fb0aaebfe8005d44d29357dc53156c8b6537/external-stg-interpreter/test/PrimOp/Word8Spec.hs | haskell | HINT: it is safe to extend representation size
HINT: compare the wider representations
HINT: it is safe to extend representation size
HINT: compare the wider representations
HINT: it is safe to extend representation size
HINT: compare the wider representations
HINT: it is safe to extend representation size
HINT... | # LANGUAGE OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns #
module PrimOp.Word8Spec where
import Control.Monad.State.Strict
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Modifiers
import Test.QuickCheck.Monadic
import Stg.Syntax (Name, Type(..))
import Stg.Interpret... |
565bd1519d13bb232e9c27983cd99d82af1f6b8051750ebe31c55409a8406ce5 | janestreet/lwt-async | lwt_gc.mli | Lightweight thread library for
* Module Lwt_gc
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* either ... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/unix/lwt_gc.mli | ocaml | * Interaction with the garbage collector
* This module offer a convenient way to add a finaliser launching a
thread to a value, without having to use [Lwt_unix.run] in the
finaliser.
* [finalise f x] ensures [f x] is evaluated after [x] has been
garbage collected. If [f x] yields, then Lwt will waits fo... | Lightweight thread library for
* Module Lwt_gc
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* either ... |
61ca36af5839950c322df4c3ca13e9399110c70c8bb8d0156e246a2abfb9174b | sir4ur0n/blog | site.hs | {-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import qualified GHC.IO.Encoding as E
import Hakyll
main :: IO ()
main = do
E.setLocaleEncoding E.utf8
hakyll $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "css/*" $ do
route... | null | https://raw.githubusercontent.com/sir4ur0n/blog/789d695ae266f953952fb19f1b85098d588bd793/site.hs | haskell | # LANGUAGE OverloadedStrings # |
import Data.Monoid (mappend)
import qualified GHC.IO.Encoding as E
import Hakyll
main :: IO ()
main = do
E.setLocaleEncoding E.utf8
hakyll $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "css/*" $ do
route idRoute
compile compressCssC... |
aab674c78e27e2c732d4e3db8b01ec8539297477f0801d04dd5d7ba0d9e3db10 | bitc/omegagb | MachineStateIO.hs | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
-----------------------------------------------------------------------------
-- |
-- Module : MachineStateIO
Copyright : ( c ) Bit Connor 2007 < >
-- License : GPL
-- Maintainer :
-- Stab... | null | https://raw.githubusercontent.com/bitc/omegagb/5ab9c3a22f5fc283906b8af53717d81fef96db7f/src/MachineStateIO.hs | haskell | ---------------------------------------------------------------------------
|
Module : MachineStateIO
License : GPL
Maintainer :
Stability : in-progress
OmegaGB
Game Boy Emulator
This module defines mutable state for the MachineIO module.
-----------------------------------------------------... | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
Copyright : ( c ) Bit Connor 2007 < >
module MachineStateIO where
import Data.Bits
import Data.IORef
import Data.Word
import Data.Array.Base
import Data.Array.IArray
import Data.Array.MArray
import Da... |
c62ad7e75d593976743d2e4aa84f628ded1b49b568c59e74808cc04ebc553aa5 | kkd26/SiFun | type.ml | open Sifun
open Type
open OUnit2
let intToString _ =
(* ARRANGE *)
let input = Int in
let expected = "Int" in
ACT
let output = typeExprToString input in
assert_equal expected output
let varToString _ =
(* ARRANGE *)
let input = Var "a" in
let expected = "Var(a)" in
ACT
let output = typeExprTo... | null | https://raw.githubusercontent.com/kkd26/SiFun/d0c17619f083440a20977b4b18326c775c6106c0/test/type.ml | ocaml | ARRANGE
ARRANGE
ARRANGE
ARRANGE
ARRANGE
ARRANGE
ARRANGE
ARRANGE | open Sifun
open Type
open OUnit2
let intToString _ =
let input = Int in
let expected = "Int" in
ACT
let output = typeExprToString input in
assert_equal expected output
let varToString _ =
let input = Var "a" in
let expected = "Var(a)" in
ACT
let output = typeExprToString input in
assert_equa... |
4001e2a73a015fcc7a85a5a061a650f5295ea155c609c9e80e9cdadd9a5cd53c | dharmatech/abstracting | larceny.scm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(import (rnrs)
(err5rs load)
(primitives current-directory))
(import (srfi :1))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define scheme-implementation 'larceny)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/dharmatech/abstracting/9dc5d9f45a9de03c6ee379f1928ebb393dfafc52/src/boot/larceny/larceny.scm | scheme |
(import (rnrs)
(err5rs load)
(primitives current-directory))
(import (srfi :1))
(define scheme-implementation 'larceny)
(define (print . elts) (for-each display elts))
(define *roots* #f)
(define *loaded* '())
(define *included* '())
(define (directory-contains file)
(lambda (dir)
(fi... | |
471e134e8eee5a2338e9a6fe4e29f42b3710c03552319f8aa54f50723d4e26e2 | jmtd/hwadtools | wadxtract.hs | import System.Environment (getArgs)
import System.IO
import System.Directory (createDirectoryIfMissing)
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as LC -- unpack
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Binary.Get
import ... | null | https://raw.githubusercontent.com/jmtd/hwadtools/e5639a068edf8d88f3e560cbc3708593223e3109/wadxtract.hs | haskell | unpack
(</>)
XXX: invalid magic
XXX: sort the dirents by offset to do a recursive walk for holes
XXX possibly negative?
type: B.ByteString
XXX problem: rawname is being truncated at the first \0 here so we need a mapping fn instead
XXX another problem: lump names could clash, we need to distinguish them somehow
... | import System.Environment (getArgs)
import System.IO
import System.Directory (createDirectoryIfMissing)
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Binary.Get
import Data.List (sortBy)
import Codec.Binary.QuotedPrintable (enco... |
054026855270db4abb1ea324c6464c3e4cb4113b39cea22826ddbffe2cd5a9af | tmattio/js-bindings | promise.ml | open Es2020
let (_ : unit Promise.t) =
let promise = Promise.create (fun ~resolve ~reject:_ -> resolve 1) in
Promise.then_
promise
~onfulfilled:(fun value ->
Promise.resolve @@ print_endline (Printf.sprintf "Got %i" value))
()
| null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/es2020/example/promise.ml | ocaml | open Es2020
let (_ : unit Promise.t) =
let promise = Promise.create (fun ~resolve ~reject:_ -> resolve 1) in
Promise.then_
promise
~onfulfilled:(fun value ->
Promise.resolve @@ print_endline (Printf.sprintf "Got %i" value))
()
| |
863bed0458e14f6b748a18c4f4c869c3afa3cb8498c1b1fa0f250977b7ea07ae | mzp/coq-for-ipad | glClear.ml | $ I d : glClear.ml , v 1.5 2000/04/12 07:40:23 garrigue Exp $
open Gl
external accum : float -> float -> float -> float -> unit
= "ml_glClearAccum"
let accum ?(alpha=1.) (r,g,b : rgb) =
accum r g b alpha
type buffer = [`color|`depth|`accum|`stencil]
external clear : buffer list -> unit = "ml_glClear"
extern... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/lablGL/glClear.ml | ocaml | $ I d : glClear.ml , v 1.5 2000/04/12 07:40:23 garrigue Exp $
open Gl
external accum : float -> float -> float -> float -> unit
= "ml_glClearAccum"
let accum ?(alpha=1.) (r,g,b : rgb) =
accum r g b alpha
type buffer = [`color|`depth|`accum|`stencil]
external clear : buffer list -> unit = "ml_glClear"
extern... | |
5c89a3da20fbaf1aef5e7ef0588bc8af6a4aae1c0061ed9589f6b55c97b1e95c | mirage/encore | deke.ml | ( c ) 2013
* ( c ) 2020
* (c) 2020 Romain Calascibetta *)
type cell =
| One of string
| Two of string * string
| Three of string * string * string
type inner_node = {
mutable cell : cell;
mutable next : inner_node;
mutable prev : inner_node;
}
type node = Empty | Node of inner_node
type t = { ... | null | https://raw.githubusercontent.com/mirage/encore/55d8377c9fd3cb8f71cfe16d90aede0487a214cc/lib/deke.ml | ocaml | ( c ) 2013
* ( c ) 2020
* (c) 2020 Romain Calascibetta *)
type cell =
| One of string
| Two of string * string
| Three of string * string * string
type inner_node = {
mutable cell : cell;
mutable next : inner_node;
mutable prev : inner_node;
}
type node = Empty | Node of inner_node
type t = { ... | |
37ad169a6f36e5780d2b58aebb019e6a947911fa515c79b295657d5d18646204 | samoht/camloo | buffcode.scm | ;; Le module
(module
__caml_buffcode
(library camloo-runtime)
(import __caml_misc __caml_config __caml_opcodes)
(export
out_buffer_163@buffcode
out_position_239@buffcode
(realloc_out_buffer_139@buffcode x1)
(init_out_code_133@buffcode x1)
(out_60@buffcode x1)
(out_short_156@buffcode x1)... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Llib.bootstrap/buffcode.scm | scheme | Le module
Les variables globales
Les expressions globales | (module
__caml_buffcode
(library camloo-runtime)
(import __caml_misc __caml_config __caml_opcodes)
(export
out_buffer_163@buffcode
out_position_239@buffcode
(realloc_out_buffer_139@buffcode x1)
(init_out_code_133@buffcode x1)
(out_60@buffcode x1)
(out_short_156@buffcode x1)
(out_long... |
4b3b27573097b16b125734773ab158e770c0eee2c33b399d15e9b01dd2f4804a | discus-lang/ddc | Defix.hs |
-- | Convert infix expressions to prefix form.
--
-- The parser packs up sequences of expressions and operators into an
-- XDefix node, but does not convert them to standard prefix applications.
-- That is the job of this module.
--
The parsed code will contain XDefix , and XInfixVar nodes ,
-- which are ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-source-discus/DDC/Source/Discus/Transform/Defix.hs | haskell | | Convert infix expressions to prefix form.
The parser packs up sequences of expressions and operators into an
XDefix node, but does not convert them to standard prefix applications.
That is the job of this module.
which are pretty-printed like this:
@
After applying the transform in this module, a... |
The parsed code will contain XDefix , and XInfixVar nodes ,
@ [ DEFIX| Cons start [ DEFIX| enumFromTo [ DEFIX| start ( INFIXOP " + " ) 1 ] end ]
@ Cons start ( ( ( + ) start 1 ) end)@
module DDC.Source.Discus.Transform.Defix
( FixTable (..)
, FixDef (..)
, InfixAssoc (.... |
1f7c6bc9555a184f5920203eda3b5652fce4256bfce0baf43cc1380565467c5d | vii/dysfunkycom | squashed.lisp | ( C ) 2006 , minor changes by
Additional changes by
(in-package #:lispbuilder-sdl-examples)
(defun show-score (score)
(sdl:set-caption (format nil "Squashed - Score: ~a" score) "Squashed"))
(defun load-image (filename)
(sdl:convert-surface :surface
(sdl:load-image (sdl:create-pat... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/examples/squashed.lisp | lisp | Open the audio mixer. Use a smaller buffer for lower latency.
check if squashed
increase the bug jumping speed
Play the swatting sound effect.
fill the background with white
draw images | ( C ) 2006 , minor changes by
Additional changes by
(in-package #:lispbuilder-sdl-examples)
(defun show-score (score)
(sdl:set-caption (format nil "Squashed - Score: ~a" score) "Squashed"))
(defun load-image (filename)
(sdl:convert-surface :surface
(sdl:load-image (sdl:create-pat... |
2fe0673ed784e6afd7389f41bb6ee333f128c80322b102b946d116b080f705ff | hunt-framework/hunt | PrefixTreeIndex2Dim.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
-- ----------------------------------------------------------------------------
|
Text index using the ' DocIdMap ' based on the ' StringMap ' implementation .
Text index using the 'Do... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/src/Hunt/Index/PrefixTreeIndex2Dim.hs | haskell | # LANGUAGE DeriveDataTypeable #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------------------
itself.
--------------------------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
|
Text index using the ' DocIdMap ' based on the ' StringMap ' implementation .
Text index using the 'DocIdMap' based on the 'StringMap' implementation.
-}
module Hunt.Index.PrefixTreeIndex2Dim
( DmPrefixTree(..)
, PrefixTr... |
9d6e15b361c334520edca406ce5e65fc4c7f5149da187521f874590e42b57a59 | osimon8/CombinatorC | utils.ml | type json = Yojson.Safe.t
let create_ctr ?i:(i=1) () =
let s = ref (i - 1) in
fun () ->
incr s;
(* print_endline ("INCED, RETURNING " ^ (string_of_int !s)); *)
!s
let deopt_list l =
List.concat @@ List.map (function | None -> [] | Some x -> [x]) l | null | https://raw.githubusercontent.com/osimon8/CombinatorC/0bdbbc893ee458ec75eab7a48712d07a62e190aa/src/utils/utils.ml | ocaml | print_endline ("INCED, RETURNING " ^ (string_of_int !s)); | type json = Yojson.Safe.t
let create_ctr ?i:(i=1) () =
let s = ref (i - 1) in
fun () ->
incr s;
!s
let deopt_list l =
List.concat @@ List.map (function | None -> [] | Some x -> [x]) l |
955d9d1473131a0a7269486f77505f8b5785ff1a7db8efe3b8ede66671842b21 | karlhof26/gimp-scheme | ev_iccii_photoeffects_246_02_part4.scm | ;***************************************************************************************
Texturizer script for GIMP 2.10.14
Copyright ( C ) 2001 Iccii < >
;
;
; ; 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... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/fecb89875adf04e76f4b58e20d2206dc5cd26393/ev_iccii_photoeffects_246_02_part4.scm | scheme | ***************************************************************************************
; This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but W... | Texturizer script for GIMP 2.10.14
Copyright ( C ) 2001 Iccii < >
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. , 675 Mass Ave , Cambridge , , USA .
version 0.1 by Iccii 2001/09/26 < ... |
caa85b8c843b7c1dfb55b8fca23853bbd48a88bf0e888e159260358978b18d2a | aav/clojure.osgi | project.clj | (defproject clojure.osgi.example.loading.aot "1.0.0.qualifier"
:description "test bundle for clojure.osgi and aot"
:url ""
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:aot [clojure.osgi.example.loading.aot.CljClass])
| null | https://raw.githubusercontent.com/aav/clojure.osgi/9ece403636a0cd550b06fe0073ba96fd8933ab4b/clojure.osgi.example.loading.aot/project.clj | clojure | (defproject clojure.osgi.example.loading.aot "1.0.0.qualifier"
:description "test bundle for clojure.osgi and aot"
:url ""
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:aot [clojure.osgi.example.loading.aot.CljClass])
| |
ebf2d84579b3b2135650234e8fd11ee4fed8a3a9a0a5988cf7dbb054cbcc7931 | pirapira/coq2rust | invfun.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/plugins/funind/invfun.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Some pretty printing function for d... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Tacexpr
open Declarations... |
8af787bfb79d234f5845ccfffa90676b8b1aa22b9fce10e1f801b7c5628ea55a | pierric/neural-network | Adapter.hs | ------------------------------------------------------------
-- |
Module : Data . NeuralNetwork . Adapter
-- Description : Neural network in abstract
Copyright : ( c ) 2016
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : p... | null | https://raw.githubusercontent.com/pierric/neural-network/406ecaf334cde9b10c9324e1f6c4b8663eae58d7/Base/Data/NeuralNetwork/Adapter.hs | haskell | ----------------------------------------------------------
|
Description : Neural network in abstract
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : portable
This module defines an general adapter component.
---------------------------------------------------------- | Module : Data . NeuralNetwork . Adapter
Copyright : ( c ) 2016
Maintainer : < >
module Data.NeuralNetwork.Adapter (
Adapter(..)
) where
import Data.Data
import Data.NeuralNetwork
data Adapter m i o e = Adapter (i -> m (e,o)) (e -> o -> m i)
deriving Typeable
instance (Typeable m, Type... |
7e6d639516a6c1c600a8958b7c1a3efa3af0e74a1ae3a0bb944f1a0dbae6e388 | craigl64/clim-ccl | system.lisp | -*- Mode : Lisp ; : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
#-Genera
(in-package :CL-USER)
#+ANSI-CL (pushnew :ansi-90 *features*)
#+CLozure (pushnew :CLIM-Uses-Lisp-Stream-Classes *features*)
#+Clozure (pushnew :CLIM-Uses-Lisp-Stream-Functions *features*)
# + Clozure ( pushnew : CLIM - Exten... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/utils/system.lisp | lisp | : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
postscript/pkgdcl
Don't know how to fit these into the set of files for this directory
autoconstructor
#-CLIM-uses-Lisp-stream-classes cl-stream-classes
#-CLIM-uses-Lisp-stream-functions cl-stream-functions
cl-streams
#+CCL coral-char-bits
---- defp... |
#-Genera
(in-package :CL-USER)
#+ANSI-CL (pushnew :ansi-90 *features*)
#+CLozure (pushnew :CLIM-Uses-Lisp-Stream-Classes *features*)
#+Clozure (pushnew :CLIM-Uses-Lisp-Stream-Functions *features*)
# + Clozure ( pushnew : CLIM - Extends - CLOS * features * )
(pushnew :clim *features*)
(pushnew :... |
ce0833f59912bdcf9b8ee8bde64a9b437ae5e189786bcd91eedccb20ef85ce06 | victornicolet/parsynt | AcTerm.ml | open Term
open Typ
open TermPp
open TermUtils
open Utils
open Base
let norm_assoc = ref true
let ident_elts =
[
(Plus, EConst (CInt 0));
(Times, EConst (CInt 1));
(Max, EVar (Var _INT_MIN));
(Min, EVar (Var _INT_MAX));
(And, EConst (CBool true));
(Or, EConst (CBool false));
(Concat, ECon... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/lang/AcTerm.ml | ocaml | In following, failure is a bug in program, clause is guarded by is_ac.
In following, failure is a bug in program, clause is guarded by is_a.
Associative-commutative case.
Associative case.
* Equality under associativity and commutativity. Can be defined
as structural equality of expressions trees with reord... | open Term
open Typ
open TermPp
open TermUtils
open Utils
open Base
let norm_assoc = ref true
let ident_elts =
[
(Plus, EConst (CInt 0));
(Times, EConst (CInt 1));
(Max, EVar (Var _INT_MIN));
(Min, EVar (Var _INT_MAX));
(And, EConst (CBool true));
(Or, EConst (CBool false));
(Concat, ECon... |
7ec749e769e18c528299a358d065f36d4f0d982ae80707be8a77a99846564f82 | static-analysis-engineering/codehawk | bCHCTypeUtil.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/7e79e94ccce0df9d22d6f77764609e469c02f035/CodeHawk/CHB/bchcil/bCHCTypeUtil.ml | ocaml | chutil
byte where the last field started
width of the previous field without padding
union
union | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
5a45087f0f67ce454c4081bb6f359efae80cbd7d81008701f53377f527fbc837 | TrustInSoft/tis-interpreter | users_register.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/users/users_register.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
dd3be3a45be73036b12a9abe59d2794e2c42d1a2a840c5d7bcefc2f1c1e70457 | stuarthalloway/programming-clojure | chat.clj | (ns examples.chat)
START : message
(defrecord Message [sender text])
; END: message
START : messages
(def messages (ref ()))
; END: messages
START : validate - message - list
(def validate-message-list
(partial every? #(and (:sender %) (:text %))))
(def messages (ref () :validator validate-message-lis... | null | https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/src/examples/chat.clj | clojure | END: message
END: messages
END: validate-message-list
bad idea
END: naive-add-message
END: add-message
END: add-message-commute | (ns examples.chat)
START : message
(defrecord Message [sender text])
START : messages
(def messages (ref ()))
START : validate - message - list
(def validate-message-list
(partial every? #(and (:sender %) (:text %))))
(def messages (ref () :validator validate-message-list))
START : naive - add - message
... |
d652ca935e6b161a385b6df92840f43ec182e8305268d65d73026523a3f6e4fa | Carnap/Carnap | Gentzen.hs | # LANGUAGE ConstraintKinds , RankNTypes , ScopedTypeVariables , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses #
module Carnap.Languages.PureFirstOrder.Logic.Gentzen
( parseGentzenFOLK, gentzenFOLKCalc, GentzenFOLK(..)
, parseGentzenFOLJ, gentzenFOLJCalc, GentzenFOLJ(..)
) where
im... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/PureFirstOrder/Logic/Gentzen.hs | haskell | # LANGUAGE ConstraintKinds , RankNTypes , ScopedTypeVariables , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses #
module Carnap.Languages.PureFirstOrder.Logic.Gentzen
( parseGentzenFOLK, gentzenFOLKCalc, GentzenFOLK(..)
, parseGentzenFOLJ, gentzenFOLJCalc, GentzenFOLJ(..)
) where
im... | |
e0f644bd85d79826284cd62437076771cf6e412a977e7b44978462af4e50c97a | ucsd-progsys/liquidhaskell | Meas4.hs | module Meas4 () where
import Language.Haskell.Liquid.Prelude
mylen :: [a] -> Int
mylen [] = 0
mylen (_:xs) = 1 + mylen xs
mymap f [] = []
mymap f (x:xs) = (f x) : (mymap f xs)
zs :: [Int]
zs = [1..100]
prop2 = liquidAssertB (n1 == n2)
where n1 = mylen zs
n2 = mylen $ mymap (`plus` 1... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/Meas4.hs | haskell | module Meas4 () where
import Language.Haskell.Liquid.Prelude
mylen :: [a] -> Int
mylen [] = 0
mylen (_:xs) = 1 + mylen xs
mymap f [] = []
mymap f (x:xs) = (f x) : (mymap f xs)
zs :: [Int]
zs = [1..100]
prop2 = liquidAssertB (n1 == n2)
where n1 = mylen zs
n2 = mylen $ mymap (`plus` 1... | |
d61d57aa400d1cd36584a51f2e1e291660de5a54ae725630e9de3f6b6c11aa7b | VisionsGlobalEmpowerment/webchange | core.clj | (ns webchange.migrations.core
(:require [webchange.migrations.add-unique-ids]
[webchange.migrations.change-first-word-book-template]
[webchange.migrations.activity-stats-fill-unique-id]
[webchange.migrations.concepts]
[webchange.migrations.scene-id-in-course-data]
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/02be5ba713ea8f00a6e16296ed824865ae839263/src/clj/webchange/migrations/core.clj | clojure | (ns webchange.migrations.core
(:require [webchange.migrations.add-unique-ids]
[webchange.migrations.change-first-word-book-template]
[webchange.migrations.activity-stats-fill-unique-id]
[webchange.migrations.concepts]
[webchange.migrations.scene-id-in-course-data]
... | |
243f37dd80cd66ac7821119d20621a95e425b7f06915660f3562c864ec14e230 | smahood/re-frame-conj-2016 | step11.cljs | (ns show.steps.step11
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(def initial-state
{:slideshow/current-slide 0})
(re-frame/reg-event-fx
:slideshow/next-slide
(fn [{:keys... | null | https://raw.githubusercontent.com/smahood/re-frame-conj-2016/51fe544a5f4e95f28c26995c11d64301ba9a2142/show/src/show/steps/step11.cljs | clojure | (ns show.steps.step11
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frisk.core :as re-frisk]
[cljs.spec :as s]
[show.slides.views :as views]))
(declare slides)
(def initial-state
{:slideshow/current-slide 0})
(re-frame/reg-event-fx
:slideshow/next-slide
(fn [{:keys... | |
148614a1932ffd51797087d0eebe904f10e14fc8912709b71a18b0a9d345a399 | apache/couchdb-oauth | oauth.erl | -module(oauth).
-export([get/3, get/5, get/6, post/3, post/5, post/6, put/6, put/7, uri/2, header/1,
sign/6, params_decode/1, token/1, token_secret/1, verify/6]).
-export([plaintext_signature/2, hmac_sha1_signature/5,
hmac_sha1_signature/3, rsa_sha1_signature/4, rsa_sha1_signature/2,
signature_base_string/3, pa... | null | https://raw.githubusercontent.com/apache/couchdb-oauth/02851639fa4d5aa6a6c493cc38d32e4b078d48e2/src/oauth.erl | erlang | cf. ruby-oauth
cf. #section-3.4.1.3.2
R15B
, A, B | T], Acc) -> | -module(oauth).
-export([get/3, get/5, get/6, post/3, post/5, post/6, put/6, put/7, uri/2, header/1,
sign/6, params_decode/1, token/1, token_secret/1, verify/6]).
-export([plaintext_signature/2, hmac_sha1_signature/5,
hmac_sha1_signature/3, rsa_sha1_signature/4, rsa_sha1_signature/2,
signature_base_string/3, pa... |
81dbc92e63b8c5319ba5741ad3d406a80f03c650522a1d55ad6cc6b45952c29c | srid/neuron | Parser.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
module Neuron.CLI.Parser
( commandParser,
)
where
import Data.Some... | null | https://raw.githubusercontent.com/srid/neuron/bfa276ee6eb7b146408e16653b2188d974ee993e/src/Neuron/CLI/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
| optparse-applicative parser for neuron CLI
Old commands are retained (but as alias) for backwards compat | # LANGUAGE ApplicativeDo #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
module Neuron.CLI.Parser
( commandParser,
)
where
import Data.Some (Some (..))
import qualified Data.... |
a39030d7e2b59cfe2f7fcc9b3e8cd66c01fd83026be2ff79e535f76739931bf4 | lolepezy/rpki-prover | Pdus.hs | # LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StrictData #
module RPKI.RTR.Pdus where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Text as Text
import Data.Binary
import ... | null | https://raw.githubusercontent.com/lolepezy/rpki-prover/11ec79415d5c1fcd7ad5f2f98c15309d4efeb1b2/src/RPKI/RTR/Pdus.hs | haskell | # LANGUAGE OverloadedStrings #
| # LANGUAGE DerivingStrategies #
# LANGUAGE StrictData #
module RPKI.RTR.Pdus where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Text as Text
import Data.Binary
import Data.Binary.Get (getByt... |
7c09df10b14daea195db173de77cf43a34bccf732714de8df01e8917d77d53aa | florence/cover | info.rkt | #lang info
(define cover-formats
'(("html" cover generate-html-coverage)
;; Undocumented. Meant for internal/debugging only
("raw" cover generate-raw-coverage)))
(define raco-commands
'(("cover" (submod cover/raco main) "a code coverage tool" 30)))
| null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-lib/cover/info.rkt | racket | Undocumented. Meant for internal/debugging only | #lang info
(define cover-formats
'(("html" cover generate-html-coverage)
("raw" cover generate-raw-coverage)))
(define raco-commands
'(("cover" (submod cover/raco main) "a code coverage tool" 30)))
|
6aef6daee2610e5a89f2fabaae68f1e3a3151a99e40ce75194cc9387d9a67907 | granule-project/gerty | Literal.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Language.Gerty.Syntax.Literal
( Literal(..)
) where
import Data.Data (Data)
import Language.Gerty.Syntax.Position
import Language.Gerty.Util.Pretty
data Literal = LitNat Range !Integer
deriving Data
instance Show Literal where
showsPrec p l = showParen (p > 9) ... | null | https://raw.githubusercontent.com/granule-project/gerty/972fa027973032a4499747039b45e744ca17e9e2/src/Language/Gerty/Syntax/Literal.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module Language.Gerty.Syntax.Literal
( Literal(..)
) where
import Data.Data (Data)
import Language.Gerty.Syntax.Position
import Language.Gerty.Util.Pretty
data Literal = LitNat Range !Integer
deriving Data
instance Show Literal where
showsPrec p l = showParen (p > 9) $ case l of
LitNat _ n -> sh ... |
8af62fa2d5fb5b03882d0064a419bb7ef8664d39399a752fadb88cd2cb17738a | daveyarwood/ezzmq | poll.clj | (ns ezzmq.poll
(:require [ezzmq.context :refer (*context* before-shutdown)]
[ezzmq.message :refer (receive-msg)])
(:import [java.nio.channels ClosedChannelException]
[org.zeromq ZMQ$Context ZContext ZMQ$Poller]
[zmq ZError$IOException]))
(defprotocol PollerMaker
(create-poller [... | null | https://raw.githubusercontent.com/daveyarwood/ezzmq/7ad3c234bb39c7425fec4cc93228a80268dc1902/src/ezzmq/poll.clj | clojure | (ns ezzmq.poll
(:require [ezzmq.context :refer (*context* before-shutdown)]
[ezzmq.message :refer (receive-msg)])
(:import [java.nio.channels ClosedChannelException]
[org.zeromq ZMQ$Context ZContext ZMQ$Poller]
[zmq ZError$IOException]))
(defprotocol PollerMaker
(create-poller [... | |
5c9136744d455d40b443042ba3498f857b0bb212456cfd97c34f98d007c1d6de | bevuta/pepa | schema.clj | (ns pepa.tasks.schema
(:require [clojure.string :as s]))
(def prologue "
DROP TYPE IF EXISTS PROCESSING_STATUS;
DROP TYPE IF EXISTS ENTITY;
CREATE TYPE PROCESSING_STATUS AS ENUM ('pending', 'failed', 'processed');
CREATE TYPE ENTITY AS ENUM ('files', 'documents', 'pages', 'inbox', 'tags');
")
(def tables
... | null | https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src/pepa/tasks/schema.clj | clojure | (ns pepa.tasks.schema
(:require [clojure.string :as s]))
(def prologue "
")
(def tables
[["files"
{:columns "
id SERIAL PRIMARY KEY CHECK(id > 0),
data BYTEA NOT NULL,
content_type TEXT NOT NULL,
status PROCESSING_STATUS NOT NULL DEFAULT 'pending',
origin TEXT NOT NULL,
... | |
e03d7326f0fbabb0bba34575bfa2295fc0acd82b14b2626123a8297c6982fa34 | spechub/Hets | Modal2CASL.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / Modal2CASL.hs
Copyright : ( c ) , Uni Bremen 2004 , DFKI GmbH 2011
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non ... | null | https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/Comorphisms/Modal2CASL.hs | haskell | CASL
ModalCASL
generated function
| The identity of the comorphism
default definition is okay
to support going to SPASS
| relations on possible worlds
needs to be changed once modal symbols are added
head [VAR] is always the current world variable (for predication)
head [VAR] is always the current world varia... | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / Modal2CASL.hs
Copyright : ( c ) , Uni Bremen 2004 , DFKI GmbH 2011
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non ... |
966c68ba3a199d41a8dd316673e7acefc20d52b7ef980773f521a6bc98294b8a | jumarko/clojure-experiments | 118_reimplement_map.clj | (ns four-clojure.118-reimplement-map
".
Given a function f and an input sequence s, return a lazy sequence of (f x) for each element x in s.
Special restrictions: map, map-indexed, mapcat, for")
;; non-lazy version
(defn my-map [f s]
(reduce #(conj %1 (f %2))
[]
s))
;; lazy version
(defn m... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/118_reimplement_map.clj | clojure | non-lazy version
lazy version | (ns four-clojure.118-reimplement-map
".
Given a function f and an input sequence s, return a lazy sequence of (f x) for each element x in s.
Special restrictions: map, map-indexed, mapcat, for")
(defn my-map [f s]
(reduce #(conj %1 (f %2))
[]
s))
(defn my-map [f xs]
(when-let [s (seq xs)... |
263a44df25805783742433b4954b3e702abf7076676017942057a69ba9dc9bbb | andrejbauer/repl-in-browser | lambda.ml | module Lambda = Main.Make(LanguageDefinition) ;;
Lambda.main ()
| null | https://raw.githubusercontent.com/andrejbauer/repl-in-browser/71a38349d67e0c0017adac6f7cd93b8ffea81249/src/lambda.ml | ocaml | module Lambda = Main.Make(LanguageDefinition) ;;
Lambda.main ()
| |
6b49f0c1f57a46750b20a94cebeea2e25944a6953c8fe611969925d6ee789aa5 | nmichel/ejpet | ejpet_mochijson2_codec.erl | -module(ejpet_mochijson2_codec).
-author('').
-export([decode/1, encode/1]).
decode(Node) ->
mochijson2:decode(Node).
encode(Node) ->
mochijson2:encode(Node).
| null | https://raw.githubusercontent.com/nmichel/ejpet/f2cafee31582d1e538cd3623edf249d0d3fc1162/src/ejpet_mochijson2_codec.erl | erlang | -module(ejpet_mochijson2_codec).
-author('').
-export([decode/1, encode/1]).
decode(Node) ->
mochijson2:decode(Node).
encode(Node) ->
mochijson2:encode(Node).
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.