_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 |
|---|---|---|---|---|---|---|---|---|
f1e189699b783573b2f7eb16c975faa582c17b24ced2dc5063003b5602fd5414 | RDTK/generator | ros-packages.lisp | ;;;; ros-packages.lisp --- Analysis of multi-ROS package repositories.
;;;;
Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.analysis)
(defun meta-package? (package-filename)
(let ((document (cxml:parse package-filename (stp:make-builder))))
(unless (xpat... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/analysis/ros-packages.lisp | lisp | ros-packages.lisp --- Analysis of multi-ROS package repositories.
packages.
Combine the values in the analyzed packages.
Combine descriptions of analyzed packages.
Final result. | Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.analysis)
(defun meta-package? (package-filename)
(let ((document (cxml:parse package-filename (stp:make-builder))))
(unless (xpath:node-set-empty-p
(xpath:evaluate "package/export/metapackage" docu... |
21afa4fa56255cbfdbd03bb0ea2d9d2f5bd4b38142caae6a6eb63006bcaf1878 | skypher/blackthorn | public.lisp | ;;;;
Copyright ( c ) 2007 - 2011 , < >
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use, copy,
;;;... | null | https://raw.githubusercontent.com/skypher/blackthorn/914b38a95f1d192219f197e4b4a77b1632daa94b/src/blackthorn/public.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so, subject to the following conditions:... | Copyright ( c ) 2007 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :b... |
970b596ced2a3bcc50d601125b80bfd824de5c9420c7206d4a70718524dc018a | vladh/lein-sassy | project.clj | (defproject lein-sassy "1.0.8"
:description "Use Sass with Clojure."
:url "-sassy"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url "-sassy"}
:dependencies [[org.jruby/jruby-complete "1.7.16"]
[com.cemerick/pomegranate "0.2.0"]
... | null | https://raw.githubusercontent.com/vladh/lein-sassy/fa3faf8178e03ed8f722f239b331bd09abb2664b/project.clj | clojure | (defproject lein-sassy "1.0.8"
:description "Use Sass with Clojure."
:url "-sassy"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url "-sassy"}
:dependencies [[org.jruby/jruby-complete "1.7.16"]
[com.cemerick/pomegranate "0.2.0"]
... | |
5600b40739c30c3a6a356e2d62421d0e7ab247f6180ec5dbd9b2b1c36d244a33 | ndmitchell/hoogle | Haddock.hs | # LANGUAGE ViewPatterns , PatternGuards , TupleSections , OverloadedStrings , , DeriveDataTypeable #
module Input.Haddock(parseHoogle, fakePackage, input_haddock_test) where
import Language.Haskell.Exts as HSE
import Data.Char
import Data.List.Extra
import Data.Maybe
import Data.Data
import Input.Item
import General... | null | https://raw.githubusercontent.com/ndmitchell/hoogle/25b2872929e3fccd5bbcdef026cec63ce365647e/src/Input/Haddock.hs | haskell | | Given a file name (for errors), feed in lines to the conduit and emit either errors or items
only check Nothing as some items (e.g. "instance () :> Foo a")
don't roundtrip but do come out equivalent
can ignore infix constructors
descendBi stringShare x)
See
for functions like `tail` which start <math>.
newty... | # LANGUAGE ViewPatterns , PatternGuards , TupleSections , OverloadedStrings , , DeriveDataTypeable #
module Input.Haddock(parseHoogle, fakePackage, input_haddock_test) where
import Language.Haskell.Exts as HSE
import Data.Char
import Data.List.Extra
import Data.Maybe
import Data.Data
import Input.Item
import General... |
0ef76beba3283d878aa3bd802051635250bd699877dbf1f5fff3af5c597365c1 | Quid2/flat | Flat.hs | {-|
Haskell implementation of < Flat>, a principled, portable and efficient binary data format.
-}
module Flat
( module Flat.Class
, module Flat.Filler
, module X
, Decoded
, DecodeException(..)
)
where
import Flat.AsBin as X
import Flat.AsSize as X
import Flat.Class
i... | null | https://raw.githubusercontent.com/Quid2/flat/6a07e4004bb6d415710a98cebdac4aadc1bf59d5/src/Flat.hs | haskell | |
Haskell implementation of < Flat>, a principled, portable and efficient binary data format.
| module Flat
( module Flat.Class
, module Flat.Filler
, module X
, Decoded
, DecodeException(..)
)
where
import Flat.AsBin as X
import Flat.AsSize as X
import Flat.Class
import Flat.Decoder
import Flat.Filler
import Flat.Instances as X
impor... |
705098ad12aa8ebe88275c6fc13215b4f2b232838f20a106c35e222efac5a3c6 | ghcjs/jsaddle-dom | TransitionEvent.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.TransitionEvent
(newTransitionEvent, getPropertyName, getElapsedTime,
getPseudoElement, TransitionEvent(..)... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/TransitionEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.TransitionEvent
(newTransitionEvent, getPropertyName, getElapsedTime,
getPseudoElement, TransitionEvent(..), gTypeTransitionEvent)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Doub... |
d85ace072f130556886e98b09445add1f71dc10b919fb36d35714bcac8982f7b | day8/re-frame-10x | compression.cljc | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.compression
"Stylesheet compression utilities."
#?(:clj
(:import (java.io StringReader StringWriter)
(com.yahoo.platform.yui.compressor CssCompressor))))
;; ------------------------------------------------------... | null | https://raw.githubusercontent.com/day8/re-frame-10x/d8dcb17e217449aba2cf64b9f843b0e9f86cfcb6/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v10/garden/compression.cljc | clojure | ---------------------------------------------------------------------
provides a performant and excellent solution to CSS compression.
---------------------------------------------------------------------
ClojureScript
ClojureScript stylesheet compression uses a simple tokenizer and
loop/recur to construct a new ... | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.compression
"Stylesheet compression utilities."
#?(:clj
(:import (java.io StringReader StringWriter)
(com.yahoo.platform.yui.compressor CssCompressor))))
Clojure
Clojure stylesheet compression leverages the... |
e1a5ee364fb30b5dc4f71e031ee94124b24638961ca250ab5f7b28e91a143834 | osa1/sc-plugin | CoreSubst.hs | | This module is adapted from GHC 's CoreSubst . We ca n't use it because of our
different Core AST type with annotations . We have to duplicate and adapt the
-- whole thing here.
module Supercompilation.CoreSubst where
import qualified Var as GHC
import Supercompilation.TaggedExpr
substTaggedExpr :: GHC.Var -> ... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompilation/CoreSubst.hs | haskell | whole thing here. | | This module is adapted from GHC 's CoreSubst . We ca n't use it because of our
different Core AST type with annotations . We have to duplicate and adapt the
module Supercompilation.CoreSubst where
import qualified Var as GHC
import Supercompilation.TaggedExpr
substTaggedExpr :: GHC.Var -> CoreExpr t -> (CoreEx... |
4d4c212c43947c0536cb40f34a082ab04cebb5bf1777cb619ab5395b90658dd4 | pink-gorilla/goldly | animals.cljs | (ns demo.animals)
(def data {:bear {:color "brown" :size "big"}
:snake {:color "varies" :shape "a cylinder"}})
(defn animals []
data)
(defn all []
(map (fn [[k v]] (name k)) data))
| null | https://raw.githubusercontent.com/pink-gorilla/goldly/6f298355dbc99ce403763369bbe2a679655a3442/goldly-test/src/demo/animals.cljs | clojure | (ns demo.animals)
(def data {:bear {:color "brown" :size "big"}
:snake {:color "varies" :shape "a cylinder"}})
(defn animals []
data)
(defn all []
(map (fn [[k v]] (name k)) data))
| |
39dac9e3167be95310275a7b795f5022d29d9049a1f68285bd1095a3c80fd48a | leopiney/tensor-safe | MaxPooling.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| This module declares the 2D MaxPooling layer data type .
module TensorSafe.Layers.MaxPooling where
import Data.Kind (Type)
import Data.Map (fromList)
import Data.Proxy (Proxy (..))
import GHC.TypeLits (KnownNa... | null | https://raw.githubusercontent.com/leopiney/tensor-safe/cdf611dbbe68f6f6cb0b44fe31d86b28a547a3f2/src/TensorSafe/Layers/MaxPooling.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| This module declares the 2D MaxPooling layer data type .
module TensorSafe.Layers.MaxPooling where
import Data.Kind (Type)
import Data.Map (fromList)
import Data.Proxy (Proxy (..))
import GHC.TypeLits (KnownNat, Nat, natVal)
import ... |
15ad6ba289dcf429a8073767a81527920e515fcad790d4536bb60bf8f84a64e8 | okuoku/nausicaa | compile-all.mosh.sps | ;;;
Part of : / Scheme
Contents : compile script for Mosh
Date : Mon May 3 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 , 2011 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published by
the Free Software Foun... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/libraries/compile-all.mosh.sps | scheme |
Abstract
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
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 warra... | Part of : / Scheme
Contents : compile script for Mosh
Date : Mon May 3 , 2010
Copyright ( c ) 2010 , 2011 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
#!r6rs
(import... |
03a137e0ce7215254f7aa66b0432d4669afc6ee3b24d83f03edca8db5bf6fcd9 | herbelin/coq-hh | option.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/lib/option.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Module implementing basic combinat... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let has_some = function
| ... |
9c5c72f840e093e7676eb5d0973656afe7837ba6c369e5f580ab61f1a82792c5 | dolotech/erlang_server | myserver_app.erl | %% -------------------------------------------------
%% myserver application
%%
$ I d : myserver_app.erl 5772 2013 - 12 - 07 09:34:35Z
%%
%% @author Rolong<>
%% -------------------------------------------------
-module(myserver_app).
-behaviour(application).
-export([start/2, prep_stop/1, stop/1]).
-include("comm... | null | https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/kernel/myserver_app.erl | erlang | -------------------------------------------------
myserver application
@author Rolong<>
-------------------------------------------------
初始化环境变量
初始化数据库连接
创建DETS目录
启动监督树
初始化日志记录
修复异常登陆日志
导入竞技场机器人数据
u:d(),
首先停止接收新的连接
强制让在线玩家退出
保存事件管理器中的数据
保存管理/统计进程中的数据
暂停一秒
在线表
离线表
与mysql数据库建立连接 | $ I d : myserver_app.erl 5772 2013 - 12 - 07 09:34:35Z
-module(myserver_app).
-behaviour(application).
-export([start/2, prep_stop/1, stop/1]).
-include("common.hrl").
-include("offline.hrl").
start(_Type, _Args) ->
io:format("start myserver ...~n"),
myenv:init(),
init_mysql(),
inets:start(),
... |
d838494cda1832035c690a046f161cf3dba421e2a2b05dabb03b321a0c863d0d | Beluga-lang/Beluga | history.mli |
(** A history of items.
A history contains a "past" and a "future". The history's state
maintains its position in this sequence.
A history supports moving back in time and forwards again as
inverse operations.
Histories support appending new items. Doing so when having
shifted into the past cr... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/1d39095c99dc255d972a339d447dc04286d8c13f/src/support/history.mli | ocaml | * A history of items.
A history contains a "past" and a "future". The history's state
maintains its position in this sequence.
A history supports moving back in time and forwards again as
inverse operations.
Histories support appending new items. Doing so when having
shifted into the past creat... |
type 'a t
val create : unit -> 'a t
val add : 'a t -> 'a -> unit
module Direction : sig
type t =
[ `forward
| `backward
]
val inverse : t -> t
end
* Moves forward or backward in the history by one step .
This shifts the last recorded item in the history 's future or past
into the past ... |
9991e9d3305339c9dcc10fd99ee213e360ea50d2b754d745a8cc8f5481819e93 | OlivierSohn/hamazed | Discrete.hs | {-# OPTIONS_HADDOCK hide #-}
module Imj.Physics.Discrete
( module Imj.Physics.Discrete.Types
, module Imj.Physics.Discrete.Collision
) where
import Imj.Physics.Discrete.Types
import Imj.Physics.Discrete.Collision
| null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Physics/Discrete.hs | haskell | # OPTIONS_HADDOCK hide # |
module Imj.Physics.Discrete
( module Imj.Physics.Discrete.Types
, module Imj.Physics.Discrete.Collision
) where
import Imj.Physics.Discrete.Types
import Imj.Physics.Discrete.Collision
|
d60e3dae9e48fdcc54b23aba2cf2325403cb52ec2a5c776d05582a8846b34659 | input-output-hk/project-icarus-importer | Main.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TypeApplications #
{-#... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/explorer/src/documentation/Main.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
Produced JSON will be used to create online
version of wallet web API description at cardanodocs.com website
(please see 'update_explorer_web_api_docs.s... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
| This program builds Swagger specification for Explorer web API and converts it to JSON .
We run this program during build .
module Main
( ... |
762116062df1edae3c1951cf3ccbf8c8d300ddf0246a7165f63a9fbffb2b5f98 | sondresl/AdventOfCode | Tuple.hs | module Tuple where
import Data.Monoid
import qualified Data.Set as Set
import Data.Set ( Set )
import Control.Lens
toTuple :: Char -> (Sum Int, Sum Int)
toTuple '^' = (Sum 1, Sum 0)
toTuple 'v' = (Sum (-1), Sum 0)
toTuple '<' = (Sum 0, Sum (-1))
toTuple '>' = (Sum 0, Sum 1)
findHouses :: [(Sum Int, Sum I... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2015/Haskell/src/Tuple.hs | haskell | module Tuple where
import Data.Monoid
import qualified Data.Set as Set
import Data.Set ( Set )
import Control.Lens
toTuple :: Char -> (Sum Int, Sum Int)
toTuple '^' = (Sum 1, Sum 0)
toTuple 'v' = (Sum (-1), Sum 0)
toTuple '<' = (Sum 0, Sum (-1))
toTuple '>' = (Sum 0, Sum 1)
findHouses :: [(Sum Int, Sum I... | |
f1ac5c8ec13d6567acc79e7e948f93ed878743aebd979d514bca98b4ffa9ab23 | tonyrog/canopen | co_os_SUITE.erl | %%%---- BEGIN COPYRIGHT --------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%... | null | https://raw.githubusercontent.com/tonyrog/canopen/b76c0c3503e3087cc7511fe5795e6053702d449e/test/co_os_SUITE.erl | erlang | ---- BEGIN COPYRIGHT --------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furn... | Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author Lönne < >
( C ) 2011 , Marina Westman Lönne
Created : 29 Nov 2011 by Marina Westman Lönne < >
-... |
7e43d899a44e0c51682ee753231acc5b8cdf92ebb3b1851211bb1e03495e9f34 | gafiatulin/codewars | Reverse.hs | -- esreveR
--
module Reverse where
import Prelude hiding (reverse)
reverse :: [a] -> [a]
reverse = foldr (\a b -> b ++ [a]) []
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Reverse.hs | haskell | esreveR
|
module Reverse where
import Prelude hiding (reverse)
reverse :: [a] -> [a]
reverse = foldr (\a b -> b ++ [a]) []
|
2e6f72c0b420c1ee4fe03b42cbf1cfbc486e886e4f2490cf8e5540473cfc5144 | mtnygard/dawn | main.cljs | (ns dawn.main)
;; start is called by init and after code reloading finishes
(defn ^:dev/after-load start []
(js/console.log "start"))
(defn ^:export init []
;; init is called ONCE when the page loads
;; this is called in the index.html and must be exported
;; so it is available even in :advanced release build... | null | https://raw.githubusercontent.com/mtnygard/dawn/259c59b6666a5ea8bbf17162517b76b2dea6c705/dawn/src/cljs/dawn/main.cljs | clojure | start is called by init and after code reloading finishes
init is called ONCE when the page loads
this is called in the index.html and must be exported
so it is available even in :advanced release builds
this is called before any code is reloaded | (ns dawn.main)
(defn ^:dev/after-load start []
(js/console.log "start"))
(defn ^:export init []
(js/console.log "init")
(start))
(defn ^:dev/before-load stop []
(js/console.log "stop")) |
db8f56ce677f0af6776b75e4254db234b9c4f492f4758b6dc91e90791b858163 | ddmcdonald/sparser | grammatical-objects.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 2021 -- all rights reserved
;;;
;;; File: "grammatical-objects"
Module : " : mid - level : "
version : October 2021
;; Initiated 10/19/21. Could have been an extension to the
;; document-parts file, but these are differe... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/5a16c18417f725575e8c8c4a58fde433519e86cb/Sparser/code/s/grammar/model/core/mid-level/grammatical-objects.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "grammatical-objects"
Initiated 10/19/21. Could have been an extension to the
document-parts file, but these are different
This list originated in the old list in
category-defining-words.
Other than the major parts of speech and grammatical
stru... | copyright ( c ) 2021 -- all rights reserved
Module : " : mid - level : "
version : October 2021
(in-package :sparser)
(define-category grammatical-element
:specializes physical
:instantiates nil
:binds ((word :primitive word))
:index (:permanent :key word)
:documentation "This is for ref... |
e1c45ddf825e07ef5c5dabc9f5713158680658ee294b310b485bc6472f18abe8 | OlivierSohn/hamazed | Spec.hs | # LANGUAGE NoImplicitPrelude #
import Imj.Prelude
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-serve-highscores/test/Spec.hs | haskell | # LANGUAGE NoImplicitPrelude #
import Imj.Prelude
main :: IO ()
main = return ()
| |
2cbbc2df6d0fa94528ebff9edc648817b2db9abdb36fc4997625e54b3e6facc0 | softlab-ntua/bencherl | dialyzer_plt.erl | -*- erlang - indent - level : 2 -*-
%%----------------------------------------------------------------------
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not us... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/dialyzer/src/dialyzer_plt.erl | erlang | ----------------------------------------------------------------------
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2006 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Au... |
0044e5d31d7bf0045729dfdf654e3553e1c2b822f696afde8178586263cef61f | esilkensen/yaml | test-nodes.rkt | #lang racket
(module+ test (require rackunit))
(module unknown-nodes typed/racket
(require "../nodes.rkt")
(provide (all-defined-out))
(node: unknown))
(module+ test
(require "../nodes.rkt" (submod ".." unknown-nodes))
(define unknown (unknown-node #f #f))
(test-case "node-tag"
(check-exn
#r... | null | https://raw.githubusercontent.com/esilkensen/yaml/b60a1e4a01979ed447799b07e7f8dd5ff17019f0/yaml/tests/test-nodes.rkt | racket | #lang racket
(module+ test (require rackunit))
(module unknown-nodes typed/racket
(require "../nodes.rkt")
(provide (all-defined-out))
(node: unknown))
(module+ test
(require "../nodes.rkt" (submod ".." unknown-nodes))
(define unknown (unknown-node #f #f))
(test-case "node-tag"
(check-exn
#r... | |
62265a7bb97077732c58a3dd2f3dbffa24854325d2df6fe606a2a17d31a62f03 | blockfrost/blockfrost-haskell | Transactions.hs | # LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Cardano.Transactions
where
import Data.Aeson (decode, eitherDecode, encode, object, (.=))
import Data.Text (Text)
import qualified Money
import Test.Hspec
import Test.Tasty.Hspec
import Te... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/5ced57686d95e7b14569e96f4244b701f1e321e4/blockfrost-api/test/Cardano/Transactions.hs | haskell | # LANGUAGE OverloadedStrings #
deprecated | # LANGUAGE NumericUnderscores #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Cardano.Transactions
where
import Data.Aeson (decode, eitherDecode, encode, object, (.=))
import Data.Text (Text)
import qualified Money
import Test.Hspec
import Test.Tasty.Hspec
import Text.RawString.QQ
import Blockfrost.... |
82c2137ef8353ac62a5281ce04f12717136974ccc673c34574111b7f4e26ca1b | Liqwid-Labs/plutus-extra | Main.hs | module Main (main) where
import Test (Foo)
import Test.Tasty (adjustOption, defaultMain, testGroup)
import Test.Tasty.Plutus.Laws (plutusEqLaws, plutusEqLawsSubstitution)
import Test.Tasty.QuickCheck (QuickCheckTests)
main :: IO ()
main =
defaultMain . adjustOption (max testMinimum) . testGroup "Laws" $
[ plutu... | null | https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/9a18ee822f6a33c3f2cbb6460e7e463ce0537e0d/plutus-deriving/test/laws/Main.hs | haskell | module Main (main) where
import Test (Foo)
import Test.Tasty (adjustOption, defaultMain, testGroup)
import Test.Tasty.Plutus.Laws (plutusEqLaws, plutusEqLawsSubstitution)
import Test.Tasty.QuickCheck (QuickCheckTests)
main :: IO ()
main =
defaultMain . adjustOption (max testMinimum) . testGroup "Laws" $
[ plutu... | |
6e51f7a5ccf818bd410e79f1b9695ddb8ce038c2e4616321e6f93c31fd95e532 | tmattio/js-bindings | main.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
(*
unknown identifiers:
- ChildProcess
- CommonLanguageClient
- Disposable
- InitializeParams
- LanguageClientOptions
- MessageTransports
- NodeJS.ReadableStream
- NodeJS.WritableStream
... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageclient/_gen/main.mli | ocaml |
unknown identifiers:
- ChildProcess
- CommonLanguageClient
- Disposable
- InitializeParams
- LanguageClientOptions
- MessageTransports
- NodeJS.ReadableStream
- NodeJS.WritableStream
- Promise<T1>
import * as cp from 'child_process';
import ChildProcess = cp.ChildProcess;
import { Initializ... | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
[@@@js.stop]
module type Missing = sig
module ChildProcess : sig
type t_0
val t_0_to_js: t_0 -> Ojs.t
val t_0_of_js: Ojs.t -> t_0
end
module CommonLanguageClient : sig
type t_0
val ... |
6ad1097646b0b024cccc6a0a4a8b499f2b7ba812e43cd32cbc796135ff745109 | CryptoKami/cryptokami-core | Slotting.hs | -- Pos.Core.Slotting
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Core/Slotting.hs | haskell | Pos.Core.Slotting | # OPTIONS_GHC -F -pgmF autoexporter #
|
e8d89b127da44ba1de83e8cfa863356b835a4a02a9ee5c6ef5ba809771a8fda7 | webyrd/mediKanren | example-one-hop-ORPHANET-ICD-9-10.rkt | #lang racket/base
(require
"query-low-level.rkt"
racket/pretty)
(define close-match-preds '("biolink:close_match"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Find ORPHANET curies that are close matches to ICD9 or ICD10 curies ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/webyrd/mediKanren/d5269f11966139d5a892ef968a3ca08a2405a736/contrib/medikanren2/Thi/example-one-hop-ORPHANET-ICD-9-10.rkt | racket |
;
| #lang racket/base
(require
"query-low-level.rkt"
racket/pretty)
(define close-match-preds '("biolink:close_match"))
(define prefix.ORPHANET "ORPHANET:")
(define prefix.ICD9 "ICD9:")
(define prefix.ICD10 "ICD10:")
(newline)
(define ORPHANET-ICD9-matches (query:Prefix->Prefix prefix.ORPHANET close-match-pr... |
1927f58f559a1abc0f775bd13d134bd8a494891cca7939857cc23b737a4ae7c7 | pmatos/darwin | darwin.rkt | #lang darwin/config
Called early when launches . Use this to set parameters defined
in / params .
(define/contract (init)
(-> any)
(current-scheme/host "")
(current-title "My Blog")
(current-author "The Unknown Author"))
;; Called once per post and non-post page, on the contents.
(define/contract (enhan... | null | https://raw.githubusercontent.com/pmatos/darwin/311df33cc83f67859ed9db8b236d227dec83d895/example/darwin.rkt | racket | Called once per post and non-post page, on the contents.
Here we pass the xexprs through a series of functions. | #lang darwin/config
Called early when launches . Use this to set parameters defined
in / params .
(define/contract (init)
(-> any)
(current-scheme/host "")
(current-title "My Blog")
(current-author "The Unknown Author"))
(define/contract (enhance-body xs)
(-> (listof xexpr/c) (listof xexpr/c))
(~> x... |
7971461d4d981e475df9431acad5b83e2969228613999f5cb300e545d0fcd1e4 | dongcarl/guix | discover.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 , 2021 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundati... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/scripts/discover.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2020 , 2021 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix scripts discover)
#:use-module (guix avahi)
#:use-module... |
022349ae029c68fecead44dfad5d9fac71d8e10b942a16d14f9f866f905cc8c9 | Clojure2D/clojure2d | home.clj | (ns examples.ex11-pixels
(:require [clojure2d.core :as core]
[clojure2d.pixels :as p]
[clojure2d.color :as c]
[clojure2d.math :as m]
[clojure2d.math.random :as r]
[clojure2d.extra.glitch :as g]
[clojure2d.extra.variations :as v]
[cloj... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d/26cceb14982a30fa6f867a5e5bf120f270c2b170/generateme/home.clj | clojure | mirror
slitscan
v1name (rand-nth v/variation-list-not-random)
v2name (rand-nth v/variation-list-not-random)
v2 (v/make-variation v2name 1.0 {})
f (comp v1 v2)
(println (str v2name " o " v1name))
full process without use of filter-channels
inluv (p/filter-colors c/to-LUV p1)
fold
v1name (rand-nth v/variation-li... | (ns examples.ex11-pixels
(:require [clojure2d.core :as core]
[clojure2d.pixels :as p]
[clojure2d.color :as c]
[clojure2d.math :as m]
[clojure2d.math.random :as r]
[clojure2d.extra.glitch :as g]
[clojure2d.extra.variations :as v]
[cloj... |
a683cf1850b5b046d2856e3548107ccf5e45e376ce38100638d6dfc3a680ae69 | PacktWorkshops/The-Clojure-Workshop | elo.clj | (ns packt-clj.tennis.elo
(:require
[clojure.java.jdbc :as jdbc]
[packt-clj.tennis.query :as query]))
(def ^:private k-factor 32)
(defn- match-probability [player-1-rating player-2-rating]
(/ 1
(+ 1 (Math/pow 10 (/ (- player-2-rating player-1-rating) 1000)))))
(defn- recalculate-rating [previous-rati... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter14/Activity14.01/packt-clj/src/packt_clj/tennis/elo.clj | clojure | (ns packt-clj.tennis.elo
(:require
[clojure.java.jdbc :as jdbc]
[packt-clj.tennis.query :as query]))
(def ^:private k-factor 32)
(defn- match-probability [player-1-rating player-2-rating]
(/ 1
(+ 1 (Math/pow 10 (/ (- player-2-rating player-1-rating) 1000)))))
(defn- recalculate-rating [previous-rati... | |
0c63849cc8a23fd863eedeb40a1ca6a9bbf83c57fa93602d653556a90993250d | abhimanyuma/Academic-Material | repo-item.hs | import Text.PrettyPrint
import System.FilePath
import System.Environment
import System.Exit
import IO
main = do args <- getArgs
prog <- getProgName
case args of
u:n:d:bs -> putStrLn . show $ repo u n d bs
_ -> usage prog
repo url name descr bs = heading $+$ b... | null | https://raw.githubusercontent.com/abhimanyuma/Academic-Material/6badf113084c20d0d9259fc08a71e56528b168e4/Functional%20Programming/Lecture-Notes/testing/scripts/repo-item.hs | haskell | import Text.PrettyPrint
import System.FilePath
import System.Environment
import System.Exit
import IO
main = do args <- getArgs
prog <- getProgName
case args of
u:n:d:bs -> putStrLn . show $ repo u n d bs
_ -> usage prog
repo url name descr bs = heading $+$ b... | |
61594e14fc7f7cd443df7672446802203be243728993ac5d6ec7bb6bf0fcecbe | ksseono/the-joy-of-clojure | qsort.clj | (ns joy.qsort)
(defn rand-ints [n]
(take n (repeatedly #(rand-int n))))
;;
Listing 6.4
;;
(defn sort-parts [work]
(lazy-seq
(loop [[part & parts] work]
(if-let [[pivot & xs] (seq part)]
(let [smaller? #(< % pivot)]
(recur (list*
(filter smaller? xs)
pivo... | null | https://raw.githubusercontent.com/ksseono/the-joy-of-clojure/4fee3fb2750236b85b59ae9d7a83e0929040e4f0/src/clj/ch06/joy/qsort.clj | clojure |
=> (1 2 3 4)
=> (0 0 1 1 3 5 6 9 9 11 12 13 15 15 16 19 19 19 19 19) | (ns joy.qsort)
(defn rand-ints [n]
(take n (repeatedly #(rand-int n))))
Listing 6.4
(defn sort-parts [work]
(lazy-seq
(loop [[part & parts] work]
(if-let [[pivot & xs] (seq part)]
(let [smaller? #(< % pivot)]
(recur (list*
(filter smaller? xs)
pivot
... |
2f08deac47e4a0958d369d097543dfe6051e2537b279cab57726e9409d7a7ad1 | pmundkur/flowcaml | value_description.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/types/value_description.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : value_description.ml , v 1.3 20... |
031f2a71a223d7f2dbf176087376945c0da91c1ca3b89c8bcb98dc5a2c0e98f2 | ocaml-flambda/ocaml-jst | comp_units.ml | (* TEST
flags = "-dshape"
* expect
*)
(* Make sure that shapes of compilation units are never eagerly loaded,
regardless of the context. *)
module Mdirect = Stdlib__Unit
[%%expect{|
{
"Mdirect"[module] -> CU Stdlib__Unit;
}
module Mdirect = Unit
|}]
module Mproj = Stdlib.Unit
[%%expect{|
{
"Mproj"[module... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b0a649516b33b83b7290c6fa5d7cb4c8c343df8c/testsuite/tests/shapes/comp_units.ml | ocaml | TEST
flags = "-dshape"
* expect
Make sure that shapes of compilation units are never eagerly loaded,
regardless of the context.
In the following the shape are not loaded, we just know what the signature
are and build shapes from them. |
module Mdirect = Stdlib__Unit
[%%expect{|
{
"Mdirect"[module] -> CU Stdlib__Unit;
}
module Mdirect = Unit
|}]
module Mproj = Stdlib.Unit
[%%expect{|
{
"Mproj"[module] -> (CU Stdlib . "Unit"[module])<.1>;
}
module Mproj = Unit
|}]
module F (X : sig type t end) = X
[%%expect{|
{
"F"[module] -> Abs<.4>(X/280, X/2... |
55f2f073f6cdef01976f86e677f6e6f2d1c2325d6cb2dde1d9456ec7640c83de | tel/env-parser | Key.hs | # LANGUAGE DeriveFunctor #
-- |
Module : System . Environment . . Key
Copyright : ( C ) 2014
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- A 'Key' is a name under which values used in environment
-- configuration can be found. A... | null | https://raw.githubusercontent.com/tel/env-parser/2b5ab428929df7429630ecb220701875eb4fab54/src/System/Environment/Parser/Key.hs | haskell | |
License : BSD3
Stability : experimental
Portability : non-portable
A 'Key' is a name under which values used in environment
configuration can be found. At it's simplest, a 'Key' is just a
command to look up a particular value under a particular name in
the ENV. It may also contain documentation and ... | # LANGUAGE DeriveFunctor #
Module : System . Environment . . Key
Copyright : ( C ) 2014
Maintainer : < >
module System.Environment.Parser.Key (
Key (Key), make, name, def, doc, def'
, setName, setDef, setDoc, setDef'
, SomeKey, forget
, Shown (..)... |
bcf6c77c9201e3008fc68b948593556a2a2b5afd5ee0d532a44a5840b2160fa8 | c-cube/frog-utils | Prover.ml |
(* This file is free software, part of frog-utils. See file "license" for more details. *)
(** {1 Run Prover} *)
type version =
| Tag of string
| Git of string * string (* branch & commit hash *)
[@@deriving yojson]
[@@@warning "-39"]
type t = {
(* Prover identification *)
name : string;
version : vers... | null | https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/src/lib/Prover.ml | ocaml | This file is free software, part of frog-utils. See file "license" for more details.
* {1 Run Prover}
branch & commit hash
Prover identification
Pover execution
name of the program itself
additional list of binaries this depends on
the command line to run.
possibly contains $bin... |
type version =
| Tag of string
[@@deriving yojson]
[@@@warning "-39"]
type t = {
name : string;
version : version;
} [@@deriving yojson]
[@@@warning "+39"]
type t_ = t
let equal p1 p2 = p1.name = p2.name
let version_to_string = function
| Tag s -> s
| Git (b, c) -> Printf.sprintf "%s#%s" b c
let n... |
8510384ae8c3deb3d1d2405e002b0225a5c99df1788169f7e4d137df74919e6c | monadbobo/ocaml-core | agnostic_mutex.mli | * Agnostic mutexes do not remember the thread by which they got locked .
Therefore anybody can unlock them , even if they have not locked them .
This also means that they will work in child processes : they are
fork - safe . The only error - check is that unlocked agnostic mutexes
can not be u... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/agnostic_mutex.mli | ocaml | * Agnostic mutexes do not remember the thread by which they got locked .
Therefore anybody can unlock them , even if they have not locked them .
This also means that they will work in child processes : they are
fork - safe . The only error - check is that unlocked agnostic mutexes
can not be u... | |
cb391f2a0793790ac3107eb1776db4740368eb3602bb7eb1646ff4b7c8df479a | discus-lang/ddc | Parser.hs |
-- | Parser for the Source Discus language.
module DDC.Source.Discus.Parser
( Parser
-- * Modules
, pModule
-- * Expressions
, pExp
, pExpAppSP
-- * Types
, pType
, pTypeApp
, pTypeArgSP
-- * Witnesses
, pWitness
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-source-discus/DDC/Source/Discus/Parser.hs | haskell | | Parser for the Source Discus language.
* Modules
* Expressions
* Types
* Witnesses
* Variables
* Constructors
* Raw Tokens |
module DDC.Source.Discus.Parser
( Parser
, pModule
, pExp
, pExpAppSP
, pType
, pTypeApp
, pTypeArgSP
, pWitness
, pWitnessApp
, pWitnessAtom
, pBindNameSP
, pBoundNameSP, pBoundName
, pBoundIxSP
... |
63dd6f1fb4d373b90c91fff763a95b1f4bb44c7a49b2e13b154102856e49ef1c | haskell-unordered-containers/hashable | Benchmarks.hs | # LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , MagicHash ,
UnboxedTuples , DeriveGeneric #
UnboxedTuples, DeriveGeneric #-}
module Main (main) where
import Control.Monad.ST
import Criterion.Main
import Data.Hashable
import Data.Hashable.SipHash
import Data.Int
import Foreign.ForeignPtr
import GH... | null | https://raw.githubusercontent.com/haskell-unordered-containers/hashable/b8a718c73916ebfd8d05e1a9513c271e1ec4933f/hashable-bench/benchmarks/Benchmarks.hs | haskell | We do not actually care about the contents of these pointers.
We don't care about the contents of these either. | # LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , MagicHash ,
UnboxedTuples , DeriveGeneric #
UnboxedTuples, DeriveGeneric #-}
module Main (main) where
import Control.Monad.ST
import Criterion.Main
import Data.Hashable
import Data.Hashable.SipHash
import Data.Int
import Foreign.ForeignPtr
import GH... |
3d06643d1f7371fe92d3d082bb206379acbebefe952d722f513e2ea493d3d068 | sgbj/MaximaSharp | dgebd2.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dgebd2.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
627cc04b1e2b7e40f81b9ad17f675e09de8a6f13185b25cf7a9e0d80315c7fb8 | Ninjapouet/clim | clim.ml | open Cmdliner
type 'a conv = 'a Arg.conv
type spec
type final
type ('a, 'b) arg =
| Spec : 'a * 'a Arg.t -> ('a, spec) arg
| Arg : 'a * 'a Term.t -> ('a, final) arg
let infos k ?docs ?docv ?doc ?env aka =
let env = match env with
| None -> None
| Some e -> Some (Arg.env_var ?docs ?doc e) in
let info... | null | https://raw.githubusercontent.com/Ninjapouet/clim/dbba4bc86ac407b15af35c4c27aa6b911a09328d/lib/clim.ml | ocaml | open Cmdliner
type 'a conv = 'a Arg.conv
type spec
type final
type ('a, 'b) arg =
| Spec : 'a * 'a Arg.t -> ('a, spec) arg
| Arg : 'a * 'a Term.t -> ('a, final) arg
let infos k ?docs ?docv ?doc ?env aka =
let env = match env with
| None -> None
| Some e -> Some (Arg.env_var ?docs ?doc e) in
let info... | |
22ca164a1940c6129d402e52e311a3762244e6f39869aa5cc5c5746ee0ae2bb3 | nikita-volkov/jsonifier | Jsonifier.hs | -- |
Simple DSL for mapping values into JSON representation and
rendering it into ' ByteString ' .
module Jsonifier
( -- * Execution
toByteString,
toWrite,
-- * Json
Json,
-- ** Primitives
null,
true,
false,
bool,
-- ** Numbers
intNumber,
wordNumber,
doubleN... | null | https://raw.githubusercontent.com/nikita-volkov/jsonifier/3c9be59dd55bd09e2d8cd5da45ef41a8dfbd6651/library/Jsonifier.hs | haskell | |
* Execution
* Json
** Primitives
** Numbers
** Strings
** Composites
** Low-level
|
Render a JSON value into strict bytestring.
|
Render a JSON value into Write.
* Json
|
using the specialized conversion functions
like 'intNumber', 'textString' or 'object'.
using the 'toByteString' function.
|
JSO... | Simple DSL for mapping values into JSON representation and
rendering it into ' ByteString ' .
module Jsonifier
toByteString,
toWrite,
Json,
null,
true,
false,
bool,
intNumber,
wordNumber,
doubleNumber,
scientificNumber,
textString,
scientificString,
arra... |
38209ea18bf8d2dd5a3f8c1bdb7f0c6b61c585a0597cdfd2ff0d1662037221b8 | expipiplus1/vulkan | Poke.hs | # language AllowAmbiguousTypes #
module Render.Stmts.Poke
( getPokeDirect
, getPokeDirect'
, getPokeDirectElided
, getPokeIndirect
, elidedLengthPoke
, ValueDoc(..)
, AddrDoc(..)
, UnitDoc(..)
, FunDoc(..)
, CmdsDoc(..)
, HasSiblingInfo
, SiblingInfo(..)
, getSiblingInfo
, allocArray
, Al... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/generate-new/src/Render/Stmts/Poke.hs | haskell | | Generate a poke action which puts the given value at the given memory
address
| Generate a poke action which puts the given value at the given memory
address
| Generate an action returning the C-side type for a value, this isn't
always possible (for example fixed arrrays, or structs with complex pokes)
and som... | # language AllowAmbiguousTypes #
module Render.Stmts.Poke
( getPokeDirect
, getPokeDirect'
, getPokeDirectElided
, getPokeIndirect
, elidedLengthPoke
, ValueDoc(..)
, AddrDoc(..)
, UnitDoc(..)
, FunDoc(..)
, CmdsDoc(..)
, HasSiblingInfo
, SiblingInfo(..)
, getSiblingInfo
, allocArray
, Al... |
e77a54524fe4b3095d2225925520885bb1551816110670241f9b9db44a59e400 | gstew5/cs4100-public | symtab.mli | (** The [Symtab] module defines a symbol table data structure. *)
(** The abstract type of symbol tables mapping identifiers of
type [string] to values of type ['a]. *)
type 'a t
(** Create an empty symbol table. *)
val create : unit -> 'a t
(** Get the value associated with an [id], if one exists. *)
val get ... | null | https://raw.githubusercontent.com/gstew5/cs4100-public/53c99e3e87331aa5dfa9161ca350a8e23acee739/tyckeck-example/symtab.mli | ocaml | * The [Symtab] module defines a symbol table data structure.
* The abstract type of symbol tables mapping identifiers of
type [string] to values of type ['a].
* Create an empty symbol table.
* Get the value associated with an [id], if one exists.
* Set the value associated with an [id]. |
type 'a t
val create : unit -> 'a t
val get : string -> 'a t -> 'a option
val set : string -> 'a -> 'a t -> 'a t
|
56ee10558201b858f98032d5556579209e1140b5bbddd62f6a8130e5fa5564b0 | tsloughter/kuberl | kuberl_apps_v1beta1_deployment_list.erl | -module(kuberl_apps_v1beta1_deployment_list).
-export([encode/1]).
-export_type([kuberl_apps_v1beta1_deployment_list/0]).
-type kuberl_apps_v1beta1_deployment_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_apps_v1beta1_deployment_list.erl | erlang | -module(kuberl_apps_v1beta1_deployment_list).
-export([encode/1]).
-export_type([kuberl_apps_v1beta1_deployment_list/0]).
-type kuberl_apps_v1beta1_deployment_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()... | |
e24b07ef93ef214e7441b960abd84b4d595ef1c3b809186261c4e7a5473582b5 | monadbobo/ocaml-core | syscall.mli | open Core.Std
val syscall : (unit -> 'a) -> ('a, exn) Result.t
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/unix/lib/syscall.mli | ocaml | open Core.Std
val syscall : (unit -> 'a) -> ('a, exn) Result.t
| |
352806c36d4c180b2be967d113ce5c252999c9007ff0f0f09fa92982782b03da | thepower/tpnode | erun_app.erl | %%%-------------------------------------------------------------------
%% @doc erun public API
%% @end
%%%-------------------------------------------------------------------
-module(erun_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
erun_sup:start_link().
stop(_Sta... | null | https://raw.githubusercontent.com/thepower/tpnode/11b8bf67be72b4ceea5a75e387cc33dcd8ec1898/apps/erun/src/erun_app.erl | erlang | -------------------------------------------------------------------
@doc erun public API
@end
-------------------------------------------------------------------
internal functions |
-module(erun_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
erun_sup:start_link().
stop(_State) ->
ok.
|
d1ace749437ffe771413e9d8f1d785e56bf4255d29e26a46cda94237d3121432 | whitequark/ocaml-m17n | test_ru.ml | open OUnit2
let test_Цвет ctxt =
assert_equal "Красный" (Цвет.show_цвет Цвет.Красный)
let suite = "ru" >::: [
"test_Цвет" >:: test_Цвет
]
| null | https://raw.githubusercontent.com/whitequark/ocaml-m17n/adc9db47f19cf4a0e5b2d7d1e80e832dc1cd8ab7/src_test/ru/test_ru.ml | ocaml | open OUnit2
let test_Цвет ctxt =
assert_equal "Красный" (Цвет.show_цвет Цвет.Красный)
let suite = "ru" >::: [
"test_Цвет" >:: test_Цвет
]
| |
61ec28b09d8fd1448fbd66b1a4e509a5ae25afbbd85324f5a9f93aec2b0778cd | fmw/vix | routes.clj | test / vix / test / routes.clj tests for routes namespace .
Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;... | null | https://raw.githubusercontent.com/fmw/vix/112a45d6e376f099ad0a3f5bff9cc07511f2ff5e/test/clj/vix/test/routes.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | test / vix / test / routes.clj tests for routes namespace .
Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns vix.test.routes
(:use [clojure.test]
[ring.middleware params
keyword-params
... |
c4c008e0da5c40648b1cee22ee9545a4905a7f7abd569f83ab5f1499eecedf21 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PaymentMethodOptionsCardInstallments.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema PaymentMethodOptionsCardInstallments
module StripeAPI.Types.PaymentMethodOpt... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentMethodOptionsCardInstallments.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# SOURCE #
| available_plans: Installment plans that may be selected for this PaymentIntent.
| enabled: Whether Installments are enabled for this PaymentIntent.
| plan: Installment plan selected for this PaymentIntent.
| 'paymentMethodOptionsCardInstallmentsEna... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema PaymentMethodOptionsCardInstallments
module StripeAPI.Types.PaymentMethodOptionsCardInstallments where
import qualified Control.Monad.Fail... |
214a2c77c98dd8423776c5de021f183a42fbb875419928c362b4ea1c3f9c5e53 | haskell-tools/haskell-tools | PrettyPrint.hs | # LANGUAGE NamedFieldPuns #
-- | Pretty printing the AST
module Language.Haskell.Tools.PrettyPrint (prettyPrint, toRoseTree, PrettyPrintProblem(..)) where
import FastString (fsLit)
import SrcLoc
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.PrettyPrint.Prepare.SourceTemplate
import Language.Haskel... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/prettyprint/Language/Haskell/Tools/PrettyPrint.hs | haskell | | Pretty printing the AST
| Pretty prints an AST by using source templates stored as node info
simple implementation could be optimized a bit
warning: the length of the file should not exceed maxbound::Int
| Prints the elements of a list where the elements must be printed in the same line (do stmts, case alts, let... | # LANGUAGE NamedFieldPuns #
module Language.Haskell.Tools.PrettyPrint (prettyPrint, toRoseTree, PrettyPrintProblem(..)) where
import FastString (fsLit)
import SrcLoc
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.PrettyPrint.Prepare.SourceTemplate
import Language.Haskell.Tools.PrettyPrint.RoseTree
... |
ad40dc2b0fb9aae575676b9a75b9569283e3cc3d0eae0609d5f7eaf7d5c32af8 | nasa/ogma | Main.hs | -- | Test ogma-core
module Main where
import Data.Monoid ( mempty )
import Test.Framework ( Test, defaultMainWithOpts )
import Test.Framework.Providers.HUnit ( testCase )
import Test.HUnit ( assertBool )
-- Internal imports
import Command.CStructs2Copilot ... | null | https://raw.githubusercontent.com/nasa/ogma/377f47dc99cba8deaa120a08caf8196358c4f2f8/ogma-core/tests/Main.hs | haskell | | Test ogma-core
Internal imports
| Run all unit tests on ogma-core.
| All unit tests for ogma-core.
Should pass
Should fail because the file does not exist
Should fail because the opening bracket is [ and not {
Should fail because a field is missing in an external variable
Should fail because a field is missi... | module Main where
import Data.Monoid ( mempty )
import Test.Framework ( Test, defaultMainWithOpts )
import Test.Framework.Providers.HUnit ( testCase )
import Test.HUnit ( assertBool )
import Command.CStructs2Copilot ( cstructs2Copilot )
import Command.FR... |
fef94e842a47730cae98b62e1fdb277d486a13fcd8f9a60cc08c08548eabb82c | threatgrid/ctia | graphql_schemas.clj | (ns ctia.entity.investigation.graphql-schemas
(:require [flanders.utils :as fu]
[ctia.schemas.graphql
[sorting :as graphql-sorting]
[flanders :as flanders]
[helpers :as g]
[pagination :as pagination]]
[ctia.schemas.graphql.refs :as refs]
... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/src/ctia/entity/investigation/graphql_schemas.clj | clojure | (ns ctia.entity.investigation.graphql-schemas
(:require [flanders.utils :as fu]
[ctia.schemas.graphql
[sorting :as graphql-sorting]
[flanders :as flanders]
[helpers :as g]
[pagination :as pagination]]
[ctia.schemas.graphql.refs :as refs]
... | |
3f9fe7b4ec879d5f28ffcfc65ade8336b2b3d7cca767862dbac62e6424528177 | awkward-squad/hasql-interpolate | Sql.hs | {-# LANGUAGE OverloadedStrings #-}
module Hasql.Interpolate.Internal.Sql
( Sql (..),
)
where
import Control.Monad.Trans.State.Strict
import Data.ByteString.Builder
import Data.String (IsString (..))
import Hasql.Encoders
-- | A SQL string with interpolated expressions.
data Sql = Sql
{ -- | The sql string. It ... | null | https://raw.githubusercontent.com/awkward-squad/hasql-interpolate/8691d65dbbb8e61f7e58adb87a40a9fe6a61e8b1/lib/Hasql/Interpolate/Internal/Sql.hs | haskell | # LANGUAGE OverloadedStrings #
| A SQL string with interpolated expressions.
| The sql string. It is stateful over an 'Int' in order to
| The encoders associated with the sql string. Already applied
to their parameters.
# INLINE (<>) # |
module Hasql.Interpolate.Internal.Sql
( Sql (..),
)
where
import Control.Monad.Trans.State.Strict
import Data.ByteString.Builder
import Data.String (IsString (..))
import Hasql.Encoders
data Sql = Sql
assign the postgresql parameter placeholders ( e.g. , @$2@ )
sqlTxt :: State Int Builder,
encoder :: ... |
e8ca89511ed39aa5a5c94777161c84c764e8f9a104b7c902bd32d228323e2cb0 | dongcarl/guix | adns.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2015 , 2016 , 2018 , 2020 < >
Copyright © 2018 < >
Copyright © 2019 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU G... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/adns.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2015 , 2016 , 2018 , 2020 < >
Copyright © 2018 < >
Copyright © 2019 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module ... |
b90ba81c99c61413460203251121be7141076ae9d3d10e7dfd94fcbcec3f2034 | haskell/text | BigTable.hs | -- | Create a large HTML table and dump it to a handle
--
-- Tested in this benchmark:
--
-- * Creating a large HTML document using a builder
--
-- * Writing to a handle
--
# LANGUAGE CPP , OverloadedStrings #
module Benchmarks.Programs.BigTable
( benchmark
) where
import Test.Tasty.Bench (Benchmark, bench, wh... | null | https://raw.githubusercontent.com/haskell/text/8d1b6ff5d636059c427bc80ba038de2105a8cfa6/benchmarks/haskell/Benchmarks/Programs/BigTable.hs | haskell | | Create a large HTML table and dump it to a handle
Tested in this benchmark:
* Creating a large HTML document using a builder
* Writing to a handle
between the benchmark samples. | # LANGUAGE CPP , OverloadedStrings #
module Benchmarks.Programs.BigTable
( benchmark
) where
import Test.Tasty.Bench (Benchmark, bench, whnfIO)
import Data.Text.Lazy.Builder (Builder, fromText, toLazyText)
import Data.Text.Lazy.IO (hPutStr)
import System.IO (Handle)
import qualified Data.Text as T
benchmark :... |
df695588b35529b47156aa5eabce55a7284dde811fbb80f1d7a19b2115512f30 | fetburner/Coq2SML | logic.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/proofs/logic.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This suppresses check done in [pri... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Sig... |
b9674c37232f7ef77733c950573f34739cf46694de23fded242d87651e5a501f | dgtized/shimmers | falling_gradients.cljs | (ns shimmers.sketches.falling-gradients
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.deterministic-random :as dr]
[shimmers.math.geometry :as geometry]
[shimmers.sketch :as sketch :i... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/falling_gradients.cljs | clojure | (ns shimmers.sketches.falling-gradients
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.deterministic-random :as dr]
[shimmers.math.geometry :as geometry]
[shimmers.sketch :as sketch :i... | |
7c09ebc1bbe519b2b28ab04bed279b392c28334d57be9dc65ae7fa694c416b17 | abhimanyuma/Academic-Material | lecture.hs | import System.Environment
import System.FilePath
import Data.Char
import IO
import Data.List (intercalate)
url f ext = "./lectures" </> map mapper f <.> ext
where mapper x | isSpace x = '-'
| otherwise = x
alt i ln ext f = "[" ++ i ++ "]"
++ "("
++ url f... | null | https://raw.githubusercontent.com/abhimanyuma/Academic-Material/6badf113084c20d0d9259fc08a71e56528b168e4/Functional%20Programming/Lecture-Notes/testing/scripts/lecture.hs | haskell | import System.Environment
import System.FilePath
import Data.Char
import IO
import Data.List (intercalate)
url f ext = "./lectures" </> map mapper f <.> ext
where mapper x | isSpace x = '-'
| otherwise = x
alt i ln ext f = "[" ++ i ++ "]"
++ "("
++ url f... | |
ea75a782bdfe7f1611f8deb46329255451fee888777aa241175cc7b4a0b6f6cf | vseloved/cl-nlp | perceptron.lisp | ( c ) 2014 - 2017 Vsevolod Dyomkin
(in-package #:nlp.learning)
(named-readtables:in-readtable rutilsx-readtable)
(defclass perceptron (categorical-model)
((classes :initarg :classes :accessor model-classes)))
(defclass avg-perceptron (perceptron)
((step :initform 0 :accessor ap-step)
(timestamps :initform ... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/learning/perceptron.lisp | lisp | (1- (random 2.0)))))
training
final update of totals | ( c ) 2014 - 2017 Vsevolod Dyomkin
(in-package #:nlp.learning)
(named-readtables:in-readtable rutilsx-readtable)
(defclass perceptron (categorical-model)
((classes :initarg :classes :accessor model-classes)))
(defclass avg-perceptron (perceptron)
((step :initform 0 :accessor ap-step)
(timestamps :initform ... |
1dd85a641e6295867ef38002d9d995897002b47726163ea56b7760a057739816 | zenspider/schemers | exercise.4.23.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval)
(import eval)
Exercise 4.23
does n't understand why
;; `analyze-sequence' needs to be so complicated. All the other
;; analysis procedures are straightforward transformations of the
;; corresponding evaluation procedures (or `eval' clauses) in s... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.23.scm | scheme | `analyze-sequence' needs to be so complicated. All the other
analysis procedures are straightforward transformations of the
corresponding evaluation procedures (or `eval' clauses) in section
(define (analyze-sequence exps)
(define (execute-sequence procs env)
(cond ((null? (cdr procs)) ((ca... | #!/usr/bin/env csi -s
(require rackunit)
(require-library eval)
(import eval)
Exercise 4.23
does n't understand why
* Note 4 - 1 - 1 : : . She expected ` analyze - sequence ' to look like this :
explains to that the version in the text does
's sequence - execution procedure , rather than having t... |
2b8a5de090c930706c30e02776352b153a9b7766e766aee249b7d44091612afa | McCLIM/McCLIM | sheet-geometry.lisp | (defpackage #:clim-demo.sheet-geometry
(:use #:clim-lisp #:clim)
(:export #:frame))
(in-package #:clim-demo.sheet-geometry)
(defparameter *redisplay-counter* 0)
(defparameter *sheet->stream-transformation*
(compose-transformation-with-translation
(make-scaling-transformation .7 .7) 100 100))
(defun <-sheet ... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/46ff154baf95bce604f5b3c7ae09f494da407d54/Examples/sheet-geometry.lisp | lisp | Intentionally ignore the space allocation request.
FIXME :shape :polygon
This command is used to redisplay the sheet manipulation pane. DND
translators perform side effects in their corresponding feedback function.
FIXME order of operations in WITH-DRAWING-OPTIONS should depend on the
being draw outside of the c... | (defpackage #:clim-demo.sheet-geometry
(:use #:clim-lisp #:clim)
(:export #:frame))
(in-package #:clim-demo.sheet-geometry)
(defparameter *redisplay-counter* 0)
(defparameter *sheet->stream-transformation*
(compose-transformation-with-translation
(make-scaling-transformation .7 .7) 100 100))
(defun <-sheet ... |
a43d9ebc9de992ed162eb9e215a1a1cc78b91170b8500780e8874a0922012b96 | dbuenzli/hyperbib | doi_relinker.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2019 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/8cf79152cb71950dacc7e1467d62c9b695a2089c/src/front/doi_relinker.ml | ocaml | Quicly hacked and messy, needs reviewing with the right signal flow.
Will add a final / to r if host only | ---------------------------------------------------------------------------
Copyright ( c ) 2019 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
c9c6f66343aa443e37370eddaa8b15629b15c47e5e99745d70ca05276f0fc164 | abtv/tech-radar | hype_meter_test.clj | (ns tech-radar.analytics.hype-meter-test
(:require [clojure.test :refer :all]
[tech-radar.analytics.hype-meter :as hype-meter]
[tech-radar.analytics.utils :as utils]))
(defn- abs [x]
(if (> x 0)
x
(- x)))
(deftest calc-similarity-test
(let [s1 "Clojure.Spec is awesome"
s... | null | https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/test/tech_radar/analytics/hype_meter_test.clj | clojure | (ns tech-radar.analytics.hype-meter-test
(:require [clojure.test :refer :all]
[tech-radar.analytics.hype-meter :as hype-meter]
[tech-radar.analytics.utils :as utils]))
(defn- abs [x]
(if (> x 0)
x
(- x)))
(deftest calc-similarity-test
(let [s1 "Clojure.Spec is awesome"
s... | |
4fa48ef1c342d44c7273948ac0fe50b18eff1f94e05ae94d36c89f6da4eab379 | otto-de/leinsync | namespace_1.clj | (ns ns.namespace-1)
(defn fnc-1 [y] y) | null | https://raw.githubusercontent.com/otto-de/leinsync/744bab6d59cf2a17a2c9f613f75410a9bc6d7152/example/project-2/src/ns/namespace_1.clj | clojure | (ns ns.namespace-1)
(defn fnc-1 [y] y) | |
7b7189a858c5008a900792d24902fa06a411780c323f7ae66a900fd37461b6dc | synrc/nitro | element_number.erl | -module(element_number).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#number.show_if==false -> [<<>>];
render_element(Record) ->
Id = case Record#number.postback of
[] -> Record#... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/input/element_number.erl | erlang | global
spec | -module(element_number).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#number.show_if==false -> [<<>>];
render_element(Record) ->
Id = case Record#number.postback of
[] -> Record#... |
2b482213650b2bd1f57d352816ac7d4e11c1155a9b2ac4300f6fac6041b750d4 | Elzair/nazghul | rep.scm | ;;----------------------------------------------------------------------------
;; Player reputation management
;;
;; Crimes are worth various points. When the player crosses the line he becomes
;; an outlaw (his faction is changed). Over time the points decrement, and
;; eventually, if he stops committing crimes, his f... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/rep.scm | scheme | ----------------------------------------------------------------------------
Player reputation management
Crimes are worth various points. When the player crosses the line he becomes
an outlaw (his faction is changed). Over time the points decrement, and
eventually, if he stops committing crimes, his faction will ... | normal . In general the third misdemeanor , second felony or first murder
Murder should result in an outlaw period of one week . To allow for accidents
one assault alone will have no ill effect , but the second should result in a
1 minute = 20 turns
1 hour = 1200 turns
1 day = 28,800 turns
... |
f7eb41e21a0fc72d4b9a6402153635769aeb71936525ecc1f6c0be664df9d02a | BinaryAnalysisPlatform/bap | bap_cache_gc.ml | *
The main goal is to delete files randomly and prioritizing larger files ,
but still giving the probability for all files to be deleted .
Notation :
1 . s(i ) - the size of i - th file , where i = 0 .. m-1 with m being the
total number of files ;
2 . Sum(x(i ) ) = x(0 ) + ... x(m-1 )... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/plugins/cache/bap_cache_gc.ml | ocaml | *
The main goal is to delete files randomly and prioritizing larger files ,
but still giving the probability for all files to be deleted .
Notation :
1 . s(i ) - the size of i - th file , where i = 0 .. m-1 with m being the
total number of files ;
2 . Sum(x(i ) ) = x(0 ) + ... x(m-1 )... | |
d89961d5308b89e59e3c210ebc8c709550acd21c01ae20e86fe0db6eb7ffcd02 | geremih/xcljb | composite_types.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.composite-types
(:require [xcljb gen-common] [xcljb.gen xfixes-types xproto-types]))
(def
QueryVersionRequest
(xcljb.gen-common/->Request
"Composite"
0
[(xcljb.gen-common/->Field
"client-major-version"
xcljb.gen.xpro... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/composite_types.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.composite-types
(:require [xcljb gen-common] [xcljb.gen xfixes-types xproto-types]))
(def
QueryVersionRequest
(xcljb.gen-common/->Request
"Composite"
0
[(xcljb.gen-common/->Field
"client-major-version"
xcljb.gen.xpro... |
fa121d93c1ad37f3ef4f505bc7fa864974c4814df6c6744b1592bbd36ca90b59 | mstksg/functor-combinators | Route.hs | -- |
-- Module : Data.HFunctor.Route
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- This module contains the useful combinators 'Pre' and 'Post', which
-- enhances a functor with a "route" to and from the outside world; eve... | null | https://raw.githubusercontent.com/mstksg/functor-combinators/3e1ab9fc4c4fe756ba05d348cd9ba0342201c611/src/Data/HFunctor/Route.hs | haskell | |
Module : Data.HFunctor.Route
License : BSD3
Stability : experimental
Portability : non-portable
This module contains the useful combinators 'Pre' and 'Post', which
enhances a functor with a "route" to and from the outside world; even if
the functor itself is existentially closed in a functor comb... | Copyright : ( c ) 2019
Maintainer :
module Data.HFunctor.Route (
* *
Pre(..)
, interpretPre, getPre, retractPre
, injectPre, mapPre
, preDivisible, preDivise, preContravariant
, Post(..)
, interpretPost, getPost, retractPost
, injectPost, mapPost
, postPlus, postAlt, postFunctor
* *
... |
d2580ed65577e741c287a2c8074ed05e4f0c536e6a46218106cfe6fd1a7f9d1e | shayan-najd/QFeldspar | Conversion.hs | module QFeldspar.Expression.Conversion () where
import QFeldspar.MyPrelude
import QFeldspar.Conversion
import QFeldspar.Singleton
import QFeldspar.Nat.ADT
import qualified QFeldspar.Nat.GADT as NG
import qualified Language.Haskell.TH.Syntax as TH
import qualified QFeldspar.Expression.ADTUntypedNamed as AUN
import qua... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Expression/Conversion.hs | haskell | ---------------------------------------------------------------------
Conversion from TH.TExp
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------... | module QFeldspar.Expression.Conversion () where
import QFeldspar.MyPrelude
import QFeldspar.Conversion
import QFeldspar.Singleton
import QFeldspar.Nat.ADT
import qualified QFeldspar.Nat.GADT as NG
import qualified Language.Haskell.TH.Syntax as TH
import qualified QFeldspar.Expression.ADTUntypedNamed as AUN
import qua... |
bb6e65dc1f3b4938fa87dc6a7fb42c164982447497e0f916a01e48823fe6a8ce | Incubaid/arakoon | to_string.ml |
* Copyright ( 2010 - 2014 ) INCUBAID BVBA
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* -2.0
*
* Unless required by applicable law or agreed to in... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/lib/to_string.ml | ocaml |
* Copyright ( 2010 - 2014 ) INCUBAID BVBA
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* -2.0
*
* Unless required by applicable law or agreed to in... | |
020474f5f4da5059511baaca1dd687aa776363392536f5c95a89748faa481a17 | yutopp/rill | debug.ml |
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/_migrating/debug.ml | ocaml | seconds |
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2015 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... |
1c313ca749f8a5d285b4e51338ed39c88e64ee8add03448754d6a3e89f41c976 | ReadyForZero/babbage | graph.clj | (ns babbage.graph
(:require [babbage.util :as u]
[clojure.set :as set]
[babbage.derefmap :as derefmap]
[macroparser.bindings :as b]
[macroparser.functions :as f]
[macroparser.parsers :as p]
[the.parsatron :as parsatron]))
(defn- parse-defgraphfn... | null | https://raw.githubusercontent.com/ReadyForZero/babbage/bc1297a5192be6c839db8fc9ad7a80e3c1561636/src/babbage/graph.clj | clojure | \"outer\"
\"inner\" | (ns babbage.graph
(:require [babbage.util :as u]
[clojure.set :as set]
[babbage.derefmap :as derefmap]
[macroparser.bindings :as b]
[macroparser.functions :as f]
[macroparser.parsers :as p]
[the.parsatron :as parsatron]))
(defn- parse-defgraphfn... |
500c708098a311c686f4c983949034f2d4b18eded081e6896c8b106e3923887e | bufferswap/ViralityEngine | example-collision.lisp | (in-package #:virality-examples)
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is not really a general purpose component. It is just here to help out
;; testing how destruction and colliders work together.
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(v:define-component destroy-my-actor ()
((%time-to-destroy :accessor time-to-... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/examples/src/example-collision.lisp | lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
This is not really a general purpose component. It is just here to help out
testing how destruction and colliders work together.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Testing getting the directions from a transform
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | (in-package #:virality-examples)
(v:define-component destroy-my-actor ()
((%time-to-destroy :accessor time-to-destroy
:initarg :time-to-destroy
:initform 5f0)))
(defmethod v:on-collision-enter ((self destroy-my-actor) other-collider)
#++(:printv "DESTROY-MY-ACTOR: Actor ~... |
fed32b2523e1cf67837469878cf534e0085f74346972418e283b8a9af95195fd | ocamllabs/ocaml-modular-implicits | patmatch.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/basic/patmatch.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let f = function 1 -> 1 | 2 -> 2 | 3 ... |
713bbed180d97bc488c3748901c7064c3b1099ffbca28f505f4317d667681ea8 | earl-ducaine/cl-garnet | x-buttons.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gadgets/x-buttons.lisp | lisp | Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
Features and operation of X-buttons:
superimposed on the button.
currently selected button... | X - Button - Panel
1 ) X - button - panel is a set of rectangular buttons with text on one
side . Any number of buttons may be selected at one time .
2 ) Click the left mouse button in a button to cause an X to be
3 ) The top level : value slot points to a list of the strings of t... |
d5054b92e1364d43d0c9e0e3d9590618a33ddc1d846530f7bc133e29113fae8c | mtgred/netrunner | card_coverage.clj | (ns tasks.card-coverage
"Utilities for card tests"
(:require [clojure.data :refer [diff]]
[clojure.string :as s]
[jinteki.cards :refer [all-cards]]
[jinteki.utils :refer [slugify]]
[game.core-test :refer [load-all-cards]]))
(defn- get-cards []
(map (comp symbol slu... | null | https://raw.githubusercontent.com/mtgred/netrunner/022eec2cb2c51011076c13935199129e3f980011/src/clj/tasks/card_coverage.clj | clojure | (println (format-output "\tCards with tests: " (count both) ansi-green))
(doseq [c (sort both)]
(println "\t\t" c)) | (ns tasks.card-coverage
"Utilities for card tests"
(:require [clojure.data :refer [diff]]
[clojure.string :as s]
[jinteki.cards :refer [all-cards]]
[jinteki.utils :refer [slugify]]
[game.core-test :refer [load-all-cards]]))
(defn- get-cards []
(map (comp symbol slu... |
85a54b5808dbe0ecbf8d331c0d6071dd35d3075c02dff43c3c8f6ddb930b4f57 | mariari/Misc-Lisp-Scripts | sheet.lisp | ;; (eval-when (:compile-toplevel :load-toplevel :execute)
( ql : quickload : )
( ql : quickload : clim ) )
(defpackage :sheet-example
(:use :clim :clim-lisp)
(:export :app-main))
(in-package :sheet-example)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Types
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/1cac9035ae27a3497a3c8abcf0ac66472777f0fa/mcclim/sheet.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
Types
(defclass person ()
((%last-name :initarg :last-name :accessor person-last-name)
(%address :initarg :address :accessor person-address)
(%membership-number :initarg :number :reader person-number)))
(make-instance 'person
:last-... | ( ql : quickload : )
( ql : quickload : clim ) )
(defpackage :sheet-example
(:use :clim :clim-lisp)
(:export :app-main))
(in-package :sheet-example)
( % first - name : initarg : first - name : accessor person - first - name )
(defstruct person
last-name
first-name
address
number)
(defcla... |
185c034d64469dd5fced13c7f01dedd0cf8a3a0576777c124a9adf443e38a1fa | webyrd/scheme-primer | test-all.scm | (load "test-check.scm")
(printf "==-tests\n")
(load "==-tests.scm")
(printf "symbolo-tests\n")
(load "symbolo-tests.scm")
(printf "numbero-tests\n")
(load "numbero-tests.scm")
(printf "symbolo-numbero-tests\n")
(load "symbolo-numbero-tests.scm")
(printf "stringo-tests.scm\n")
(load "stringo-tests.scm")
(printf "d... | null | https://raw.githubusercontent.com/webyrd/scheme-primer/3381a4a70c7ffd76878a5cfe5818b89e71e53f7f/faster-miniKanren/test-all.scm | scheme | (load "test-check.scm")
(printf "==-tests\n")
(load "==-tests.scm")
(printf "symbolo-tests\n")
(load "symbolo-tests.scm")
(printf "numbero-tests\n")
(load "numbero-tests.scm")
(printf "symbolo-numbero-tests\n")
(load "symbolo-numbero-tests.scm")
(printf "stringo-tests.scm\n")
(load "stringo-tests.scm")
(printf "d... | |
befec09adf47ee9979fa6e8a14a1923f2341773205cc563cc40c1c49d12b0e71 | thelema/ocaml-community | testset.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/testsuite/tests/lib-set/testset.ml | ocaml | *********************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
module S = Set.Make(struct type t = int... |
2f4dee5af54cc56ca0edefa8ba8a67fb6781aa19d65d7b8f9962fb4128b78e32 | kssytsrk/.nyxt.d | smol-improvements.lisp | (in-package :nyxt)
;; doesn't work the right way yet
(defun downloads-handler (url)
(cond ((str:ends-with? ".pdf" (quri:render-uri url))
(define-configuration buffer
((download-path (make-instance 'download-data-path
:dirname "~/usr/pdf/dl/")))))
... | null | https://raw.githubusercontent.com/kssytsrk/.nyxt.d/d4f5a4c8c5766500fda021066dc3c72236ce328a/smol-improvements.lisp | lisp | doesn't work the right way yet | (in-package :nyxt)
(defun downloads-handler (url)
(cond ((str:ends-with? ".pdf" (quri:render-uri url))
(define-configuration buffer
((download-path (make-instance 'download-data-path
:dirname "~/usr/pdf/dl/")))))
(t
(define-configuration ... |
41ec22238b911dbc5a929168e6c12c623f60bb6570f78e97750eeb0385bb1eaf | slipstream/SlipStreamServer | resource_metadata_value_scope_single_value.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-value-scope-single-value
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::units ::cimi-core/token)
(s/def ::value ::cimi-core/scal... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/resources/spec/resource_metadata_value_scope_single_value.cljc | clojure | (ns com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-value-scope-single-value
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::units ::cimi-core/token)
(s/def ::value ::cimi-core/scal... | |
dd8a61959d0c1dca608454f605f4ac192e4b048d3a9f9f38d62121e7c28d33fd | haskell-mafia/projector | Property.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Test.IO.Projector.Html.Backend.Property where
import qualified Data.List as L
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Disorder.Core.IO
import Disorder.Jack
import... | null | https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-html/test/Test/IO/Projector/Html/Backend/Property.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TupleSections #
module Test.IO.Projector.Html.Backend.Property where
import qualified Data.List as L
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Disorder.Core.IO
import Disorder.Jack
import P
import Proj... |
175c83c576a2644cd7d70ff8384a6db5b3097e1cd1d1a9f56ed2dcde155b289a | chenyukang/eopl | 42.scm | (load-relative "../libs/init.scm")
(load-relative "./base/store.scm")
(load-relative "./base/test.scm")
(load-relative "./base/pair-v1.scm")
(load-relative "./base/callneed-cases.scm")
still some problem for two cases
;; see new stuff
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (ar... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch4/42.scm | scheme | see new stuff
sllgen boilerplate ;;;;;;;;;;;;;;;;
extractors:
procedures ;;;;;;;;;;;;;;;;
environment data structures ;;;;;;;;;;;;;;;;
thunks ;;;;;;;;;;;;;;;;
environment constructors and observers ;;;;;;;;;;;;;;;;
new stuff
no deref!
| (load-relative "../libs/init.scm")
(load-relative "./base/store.scm")
(load-relative "./base/test.scm")
(load-relative "./base/pair-v1.scm")
(load-relative "./base/callneed-cases.scm")
still some problem for two cases
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newlin... |
b8f378936150fba68b2848e48edd35953fe6005b28b6252b927fa39c9066074e | ageldama/cl-state-machine | suites.lisp | (in-package :cl-state-machine-test)
(def-suite test-suite)
(def-suite skip-suite)
;;; Do it! (fiveam:run! 'cl-state-machine-test:test-suite)
| null | https://raw.githubusercontent.com/ageldama/cl-state-machine/eb5d59f7a864c2fc38822fc258162f9cda56adb4/test/suites.lisp | lisp | Do it! (fiveam:run! 'cl-state-machine-test:test-suite) | (in-package :cl-state-machine-test)
(def-suite test-suite)
(def-suite skip-suite)
|
b2b0ae2e35064a74a3acdc248963bdccc93e152eb4140b3278f29fe6303943e2 | dustin/mqttd | Types.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDerivin... | null | https://raw.githubusercontent.com/dustin/mqttd/b47114b2ffa13546515306da8a0f34825d46d941/src/MQTTD/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DerivingVia #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances # | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE StrictData #
# LANGUAGE TypeApplications ... |
1def8ef7f1e7652ba576181b38f5f6cdd8bb0b1a87a79e55963c55b5969663a5 | runtimeverification/haskell-backend | ErrorContext.hs | |
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module ErrorContext (
ErrorContext (..),
withErrorContext,
) where
import Control.Exception (
Exception (..),
SomeException,
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/ErrorContext.hs | haskell | | Some 'Pretty'-printable data for context.
| The error itself.
| Compute a value, putting error messages in context.
| The value computed. | |
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module ErrorContext (
ErrorContext (..),
withErrorContext,
) where
import Control.Exception (
Exception (..),
SomeException,
... |
080ac02d8d537006c7acab7dc2bd685b1553628ab18fda27a2c66484664cc52b | Clojure2D/clojure2d-examples | ex10_curvature2.clj | ;; -from-noise/
;; forced movement
(ns ex10-curvature2
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[fastmath.random :as rr]
[fastmath.vector :as v]
[fastmath.fields :as f]
[clojure.pprint :refer [pprint]])
(:import [fastmath.vector Vec2 Vec3]... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex10_curvature2.clj | clojure | -from-noise/
forced movement
distance for particle in single step
stroke size
range for variation (-coord-scale, coord-scale)
angle modifier
|
(ns ex10-curvature2
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[fastmath.random :as rr]
[fastmath.vector :as v]
[fastmath.fields :as f]
[clojure.pprint :refer [pprint]])
(:import [fastmath.vector Vec2 Vec3]))
(set! *warn-on-reflection* true... |
aeee98a2edddf04b7d103cd5f7efb80a6985c0009fb70ed0646bdc4cd4e6b4d8 | teknql/wing | match_test.cljc | (ns wing.core.match-test
(:require [wing.core.match :as sut #?(:clj :refer :cljs :refer-macros) [match?]]
#?(:clj [clojure.test :as t :refer [deftest is testing]]
:cljs [cljs.test :as t :refer-macros [deftest is testing]])))
(deftest match?-test
(testing "returns whether the pattern matc... | null | https://raw.githubusercontent.com/teknql/wing/de8148bf48210eac0c0e3f8e31346b5b2ead39c2/test/wing/core/match_test.cljc | clojure | (ns wing.core.match-test
(:require [wing.core.match :as sut #?(:clj :refer :cljs :refer-macros) [match?]]
#?(:clj [clojure.test :as t :refer [deftest is testing]]
:cljs [cljs.test :as t :refer-macros [deftest is testing]])))
(deftest match?-test
(testing "returns whether the pattern matc... | |
98e3d062511e5fd6501d5ff3ee4e108392378954c58520cd539171a5ce6f66a9 | wololock/programming-in-haskell-2nd-edition | ch10_00_sandbox.hs | module Chapter_10_Sandbox where
import System.IO
import Data.List
import Data.Char
getLine' :: IO String
getLine' = do x <- getChar
if x == '\n' then
return []
else
do xs <- getLine'
return (x:xs)
putStr' :: String -> IO ()
putStr' [] ... | null | https://raw.githubusercontent.com/wololock/programming-in-haskell-2nd-edition/19d4b173ac3a41a0579bcd9f55753dbeda293494/ch10_00_sandbox.hs | haskell | Hangman
Game of nim example
Game Of Life
Redefine putStr :: String -> IO () using a list comprehension and the library
function sequence_ :: [IO a] -> IO () .
Using recursion, define a version of putBoard :: Board -> IO () that displays
additional argument.
Define an action adder :: IO () that reads a given num... | module Chapter_10_Sandbox where
import System.IO
import Data.List
import Data.Char
getLine' :: IO String
getLine' = do x <- getChar
if x == '\n' then
return []
else
do xs <- getLine'
return (x:xs)
putStr' :: String -> IO ()
putStr' [] ... |
51415904eb0f69f08a64c7fda3276a1282e42eb2664e702797b6bb2450652e84 | yellowtides/owenbot-hs | EventHandler.hs | module EventHandler (handleEvent) where
import Control.Applicative ((<|>))
import Control.Monad (unless)
import Data.Foldable (for_)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import Discord
import Discord.Interactions
import Discord.Types
import UnliftIO (liftIO)
import Command
import quali... | null | https://raw.githubusercontent.com/yellowtides/owenbot-hs/9aaf66cc09b038c8c45b462ed93b77edbe0e5622/src/EventHandler.hs | haskell | | This command executes the handler if there are no arguments. If there are
arguments, it replies with the help message set in each command.
# ANN messageReceivers "HLint: ignore Evaluate" #
AprilFools.reactionReceivers | module EventHandler (handleEvent) where
import Control.Applicative ((<|>))
import Control.Monad (unless)
import Data.Foldable (for_)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import Discord
import Discord.Interactions
import Discord.Types
import UnliftIO (liftIO)
import Command
import quali... |
b5b2541f625e068ffb7ac6107af0b6e6455c30c014a0bfe69f822195656c078d | ocaml/dune | cram_stanza.ml | open Import
open Dune_lang.Decoder
type applies_to =
| Whole_subtree
| Files_matching_in_this_dir of Predicate_lang.Glob.t
let default_applies_to = Files_matching_in_this_dir Predicate_lang.Glob.true_
let decode_applies_to =
let open Dune_lang.Decoder in
let subtree =
let+ _ = keyword ":whole_subtree" in... | null | https://raw.githubusercontent.com/ocaml/dune/4358616cc6cfc09f188a9a50051b1cae1db964a9/src/dune_rules/cram/cram_stanza.ml | ocaml | open Import
open Dune_lang.Decoder
type applies_to =
| Whole_subtree
| Files_matching_in_this_dir of Predicate_lang.Glob.t
let default_applies_to = Files_matching_in_this_dir Predicate_lang.Glob.true_
let decode_applies_to =
let open Dune_lang.Decoder in
let subtree =
let+ _ = keyword ":whole_subtree" in... | |
a7284dfb85799c55ea30bf8b0d93ab3c60032b928c178c62ae46b2de12278bad | reborg/clojure-essential-reference | 12.clj | < 1 >
< 2 >
;; (0 1 1 2 3 5 8 13 21 34)
(last (take 1e6 fibs)) ; <3>
java.lang . OutOfMemoryError : Java heap space | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialGeneration/OtherGenerators/concatandlazy-cat/12.clj | clojure | (0 1 1 2 3 5 8 13 21 34)
<3> | < 1 >
< 2 >
java.lang . OutOfMemoryError : Java heap space |
c4f698f3238b39cbad1f28a5c87f2ccfe481ba758b537d3275ca74204bdac86a | camsaul/lein-check-namespace-decls | bad.clj | (ns project.invalid-file.core
(:require [clojure.string :as str]
(defn hello []
(str/join ["HEL" "LO"]))
| null | https://raw.githubusercontent.com/camsaul/lein-check-namespace-decls/56f8ddd1b5654862073565287bceac008d7c37ce/test-namespaces/invalid_file/bad.clj | clojure | (ns project.invalid-file.core
(:require [clojure.string :as str]
(defn hello []
(str/join ["HEL" "LO"]))
| |
395eca6bf2f08335c7927cee4d2d71e2978925b33914ddc3187c54f028d9847e | MinaProtocol/mina | chain_status.ml | (* chain_status.ml *)
open Core_kernel
[%%versioned
module Stable = struct
module V1 = struct
type t = Canonical | Orphaned | Pending [@@deriving yojson, equal]
let to_latest = Fn.id
end
end]
let to_string = function
| Canonical ->
"canonical"
| Orphaned ->
"orphaned"
| Pending ->
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/ed8cb7e9a780c51fe359d652444d519ea95b8113/src/app/archive/lib/chain_status.ml | ocaml | chain_status.ml |
open Core_kernel
[%%versioned
module Stable = struct
module V1 = struct
type t = Canonical | Orphaned | Pending [@@deriving yojson, equal]
let to_latest = Fn.id
end
end]
let to_string = function
| Canonical ->
"canonical"
| Orphaned ->
"orphaned"
| Pending ->
"pending"
let of_st... |
04b73eacd4e54f523b6f3a3bcf9d19328ceab900a0735cc7ed9a6fbbabe5314d | ghc/ghc | Simplify.hs | module GHC.Driver.Config.Core.Opt.Simplify
( initSimplifyExprOpts
, initSimplifyOpts
, initSimplMode
, initGentleSimplMode
) where
import GHC.Prelude
import GHC.Core.Rules ( RuleBase )
import GHC.Core.Opt.Pipeline.Types ( CoreToDo(..) )
import GHC.Core.Opt.Simplify ( SimplifyExprOpts(..), SimplifyOpts(..) )... | null | https://raw.githubusercontent.com/ghc/ghc/7eac2468a726f217dd97c5e2884f6b552e8ef11d/compiler/GHC/Driver/Config/Core/Opt/Simplify.hs | haskell | Do not do any inlining, in case we expose some
unboxed tuple stuff that confuses the bytecode
interpreter
Don't do case-of-case transformations.
This makes full laziness work better | module GHC.Driver.Config.Core.Opt.Simplify
( initSimplifyExprOpts
, initSimplifyOpts
, initSimplMode
, initGentleSimplMode
) where
import GHC.Prelude
import GHC.Core.Rules ( RuleBase )
import GHC.Core.Opt.Pipeline.Types ( CoreToDo(..) )
import GHC.Core.Opt.Simplify ( SimplifyExprOpts(..), SimplifyOpts(..) )... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.