_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 |
|---|---|---|---|---|---|---|---|---|
7daf22dc95ff8b69fe4766c0425a25fc6a85c232868335cc2973fe8a7ea89b84 | qkrgud55/ocamlmulti | subst.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/subst.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 .
$ I d : subst.ml 12800 2012 - 07 - 30... |
55952898f22c05f14694ac44e7102be6251e2d64972d668ceb1ed06adeee7719 | clojure/tools.nrepl | transport.clj |
(ns ^{:author "Chas Emerick"}
clojure.tools.nrepl.transport
(:require [clojure.tools.nrepl.bencode :as be]
[clojure.java.io :as io]
(clojure walk set))
(:use [clojure.tools.nrepl.misc :only (returning uuid)])
(:refer-clojure :exclude (send))
(:import (java.io InputStream OutputStre... | null | https://raw.githubusercontent.com/clojure/tools.nrepl/d4bb14e841b453721f009f4e9e0e9b2742b4bdc2/src/main/clojure/clojure/tools/nrepl/transport.clj | clojure |
(ns ^{:author "Chas Emerick"}
clojure.tools.nrepl.transport
(:require [clojure.tools.nrepl.bencode :as be]
[clojure.java.io :as io]
(clojure walk set))
(:use [clojure.tools.nrepl.misc :only (returning uuid)])
(:refer-clojure :exclude (send))
(:import (java.io InputStream OutputStre... | |
b3f48b84486d0345dc6402aee8096ea7751e6f7152bf056885181b4085f0ff6d | ocaml-ppx/ppxlib | ast_traverse0.mli | open! Import
class map :
object
inherit Ppxlib_traverse_builtins.map
inherit Ast.map
end
class iter :
object
inherit Ppxlib_traverse_builtins.iter
inherit Ast.iter
end
class ['acc] fold :
object
inherit ['acc] Ppxlib_traverse_builtins.fold
inherit ['acc] Ast.fold
end
class ['acc]... | null | https://raw.githubusercontent.com/ocaml-ppx/ppxlib/c9c8209fce2f95feb9665ec0e1e7e23b96e55953/src/ast_traverse0.mli | ocaml | open! Import
class map :
object
inherit Ppxlib_traverse_builtins.map
inherit Ast.map
end
class iter :
object
inherit Ppxlib_traverse_builtins.iter
inherit Ast.iter
end
class ['acc] fold :
object
inherit ['acc] Ppxlib_traverse_builtins.fold
inherit ['acc] Ast.fold
end
class ['acc]... | |
9c2eae86bd9726d555430473416ef0fa811faca21f590892394e890feee1b853 | deadcode/Learning-CL--David-Touretzky | 8.37.lisp | (defun combine (m n)
(+ m n))
(defun fib (n)
( declare ( NOTINLINE fib ) )
(cond ((<= n 0) 1)
((= n 1) 1)
(t (combine
(fib (- n 1))
(fib (- n 2))))))
(let ((test1 '(fib 3))
(test2 '(fib 4)))
(format t "~s = ~s~%" test1 (eval test1))
(format t "... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.37.lisp | lisp | (defun combine (m n)
(+ m n))
(defun fib (n)
( declare ( NOTINLINE fib ) )
(cond ((<= n 0) 1)
((= n 1) 1)
(t (combine
(fib (- n 1))
(fib (- n 2))))))
(let ((test1 '(fib 3))
(test2 '(fib 4)))
(format t "~s = ~s~%" test1 (eval test1))
(format t "... | |
a76be233c7eb3408737da77ac15a1bb6ffbf78fd7d5e533b282970a6f1141244 | HaskellForCats/HaskellForCats | BiTree01.hs | module BiTree01 where
import
data Tree a = Nil | Node Int a ( Tree a ) ( Tree a ) deriving ( Eq , Ord , Show , Read )
data Tree a = Nil | Node Int (Tree a) a (Tree a) deriving (Eq, Ord, Show, Read)
depth :: Tree t -> Int
depth Nil = 0
depth (Node _ t1 n t2) = 1 + max (depth t1) (depth t2)
... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/Trees/BiTree01.hs | haskell | node l x r = Node (1 + weight l + weight r) l x r
trees are ordered data structure
O-log-n cost -- left of right rotation swaping out root position recursively to balance out the tree so as reduce the ceiling on the amount of work to reach each node -- slow better than crash
inserts time --
Right subtree s... | module BiTree01 where
import
data Tree a = Nil | Node Int a ( Tree a ) ( Tree a ) deriving ( Eq , Ord , Show , Read )
data Tree a = Nil | Node Int (Tree a) a (Tree a) deriving (Eq, Ord, Show, Read)
depth :: Tree t -> Int
depth Nil = 0
depth (Node _ t1 n t2) = 1 + max (depth t1) (depth t2)
... |
2677f2f5ca94edca2872844d82ad3612240eb9ef5bf0a11158f8706791e6e176 | jwiegley/trade-journal | Entry.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Journal.Types.Entry where
import Amount
import Control.Lens
import Data.Sum
import Data.Sum.Lens
| The ' netAmount ' indicates the exact effect on account balance this action
-- represents.... | null | https://raw.githubusercontent.com/jwiegley/trade-journal/f995af96cab8b7ae3eea1b7b4fcf9ae29ce93292/src/Journal/Types/Entry.hs | haskell | represents. | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Journal.Types.Entry where
import Amount
import Control.Lens
import Data.Sum
import Data.Sum.Lens
| The ' netAmount ' indicates the exact effect on account balance this action
class HasNetAmou... |
8a0b968ea0d7413a677bee1509c4fbab9490cf7f983fcb23da7133fe4135733c | iokasimov/pandora | Comonadic.hs | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic (Comonadic (..), (:<) (..)) where
import Pandora.Core.Functor (type (<))
import Pandora.Core.Interpreted (Interpreted (Primary, run, unite, (<~~~)))
import Pandora.Pattern.Semigroupoid ((.))
import Pandora.Pattern.Catego... | null | https://raw.githubusercontent.com/iokasimov/pandora/68662a508749f1cf02d0178679435a24f07dcaf2/Pandora/Paradigm/Controlflow/Effect/Transformer/Comonadic.hs | haskell | ), (<---), (<----))
)))
<<)))
>))
-- f <-|- x
>) (:*:) (:*:) (Schematic Comonad t u) => Semimonoidal (-->) (:*:) (:*:) (t :< u) where
mult @(-- > ) @ (: * :) @ (: * :)
>) (-->) (:*:) (:*:) (Schematic Comonad t u) => Monoidal (-->) (-->) (:*:) (:*:) (t :< u) where
One ) . run
f <-/- x
- tc . f -<< x
- tc . f =<< x
- ... | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic (Comonadic (..), (:<) (..)) where
import Pandora.Core.Functor (type (<))
import Pandora.Core.Interpreted (Interpreted (Primary, run, unite, (<~~~)))
import Pandora.Pattern.Semigroupoid ((.))
import Pandora.Pattern.Morphi... |
363b3d01b5a27149e0ae1d47b4dbe67fa47b03319dbcaedc01df0a8d748f4d1a | bluelisp/hemlock | htext4.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
;;;
;;; ******************************************... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/htext4.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
**********************************************************************
**********************************************************************
More Hemlock Text-Manipulation functions.
The code in this file implements the delete and copy functions in the
DELETE-CHARA... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
Written by and .
Modified by .
" Doing Stuff and Going Places " chapter of the Hemlock Design document .
(in-package :hemlock-internals)
(defvar *internal-temp-reg... |
2eb73e93f89cd03e7486eeeb08e3f07af6bc0371d6c3df2f44cece3cb590131a | jonase/eastwood | green.clj | (ns testcases.unused-fn-args.multimethods.green)
(defmulti foo
(fn [a b c]
;; all args unintentionally unused
(rand)))
| null | https://raw.githubusercontent.com/jonase/eastwood/1f0bbf4397a95f7ae326edd990de621e9949a2e5/cases/testcases/unused_fn_args/multimethods/green.clj | clojure | all args unintentionally unused | (ns testcases.unused-fn-args.multimethods.green)
(defmulti foo
(fn [a b c]
(rand)))
|
6188f6bbc8bdae506bd49e3451811501fd2c7dd6f7d1a0bec766145ab2b82558 | Happy0/wordify | Internal.hs | module Wordify.Rules.LetterBag.Internal (LetterBag(LetterBag), tiles, bagSize, validLetters, generator) where
import Wordify.Rules.Tile
import System.Random
import Data.Map
data LetterBag = LetterBag { tiles :: [Tile], bagSize :: Int, generator :: StdGen, validLetters :: Map Char Tile } deriving (Sho... | null | https://raw.githubusercontent.com/Happy0/wordify/70704824ae6829c518ab24875ba6b98ebf5db158/src/Wordify/Rules/LetterBag/Internal.hs | haskell | module Wordify.Rules.LetterBag.Internal (LetterBag(LetterBag), tiles, bagSize, validLetters, generator) where
import Wordify.Rules.Tile
import System.Random
import Data.Map
data LetterBag = LetterBag { tiles :: [Tile], bagSize :: Int, generator :: StdGen, validLetters :: Map Char Tile } deriving (Sho... | |
2b9cefc378b733df96a5c22bab050f1ff317b00dfe20304ed103d9a3be553c05 | fosskers/kanji | About.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Pages.About where
import Data.Foldable
import Lucid
import Pages.Bootstrap
import Text.Printf.TH
---
about :: Html ()
about = row_ $ left *> right
where left = col5_ [class_ "col-md-offset-1"] $ fold [ theSite, hr_ [], kanken, hr_ [], me... | null | https://raw.githubusercontent.com/fosskers/kanji/93dd7d16d1a3690db36ca0ffbeb21e05083c42ea/nanq-site/Pages/About.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
- |
module Pages.About where
import Data.Foldable
import Lucid
import Pages.Bootstrap
import Text.Printf.TH
about :: Html ()
about = row_ $ left *> right
where left = col5_ [class_ "col-md-offset-1"] $ fold [ theSite, hr_ [], kanken, hr_ [], me ]
right = col5_ $ fold [theSiteJ, hr_ [], kankenJ, hr_ [], meJ ]
... |
3efe5c59196cda02258e9ba15435cfb557eb5aa8e6a23b471e9bd71969b39abd | tkaryadis/squery-mongo-core | commands.cljc | (ns squery-mongo-core.internal.convert.commands
(:require [squery-mongo-core.internal.convert.stages :refer [squery-addFields->mql-addFields squery-project->mql-project]]
[squery-mongo-core.internal.convert.common :refer [squery-var-ref->mql-var-ref]]
[squery-mongo-core.utils :refer [ordered-m... | null | https://raw.githubusercontent.com/tkaryadis/squery-mongo-core/7df7d6733cfacaf0379d2a39908e6ceb0d86ffeb/src/squery_mongo_core/internal/convert/commands.cljc | clojure | those are for all commands,
----------------------------------squery-pipeline->mql-pipeline---------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
String is ok also {"a" ".."}
TODO : REVIEW : ... | (ns squery-mongo-core.internal.convert.commands
(:require [squery-mongo-core.internal.convert.stages :refer [squery-addFields->mql-addFields squery-project->mql-project]]
[squery-mongo-core.internal.convert.common :refer [squery-var-ref->mql-var-ref]]
[squery-mongo-core.utils :refer [ordered-m... |
bd37f09799cc5d73486f1ecba44b696f8fe695b1943432b37ce64b3b5c086319 | cirodrig/triolet | Common.hs | -----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Common
Copyright : ( c ) 2009
-- License : BSD-style
Maintainer :
-- Stability : experimental
Portability : ghc
--
-- Convenient re-export of common code, which
works with both vers... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Language/Python/Common.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.Python.Common
License : BSD-style
Stability : experimental
Convenient re-export of common code, which
---------------------------------------------------------------------------
* Pretty printing infrastru... | Copyright : ( c ) 2009
Maintainer :
Portability : ghc
works with both version 2.x and 3.x of Python .
module Language.Python.Common (
module Language.Python.Common.Pretty,
module Language.Python.Common.Token,
module Language.Python.Common.AST,
module Language.Python.Common.SrcLocation,
t... |
709fdd304a5862676a7e52bbf0ba9cdff5d90b7887edce55a20090f5b89594d1 | Frama-C/Frama-C-snapshot | doc.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/server/doc.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
78a9a94c48a5b738694baadc5a89903a738248841c19384763f4d99cb4b8bc2f | wireless-net/erlang-nommu | io_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2013 . 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
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/io_SUITE.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
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1999 - 2013 . 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 "
-module(io_SUITE).
-export([all/0, suite/0... |
a898695abd584f376821b9277163ddde3be8490f1bd566b603d40629d3864d70 | clojure/clr.tools.namespace | reload.clj | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this
;; distribution. By using this software in any fashion, you are
;; agreeing to be bound by ... | null | https://raw.githubusercontent.com/clojure/clr.tools.namespace/e2eb4253305e99d0d123c5266af6febcc49a59c5/src/clojure/tools/namespace/reload.clj | clojure | Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution. By using this software in any fashion, you are
agreeing to be bound by the terms of this license. You must not
remove this notice, or any other, from this software.
Throwable | Copyright ( c ) , 2012 . All rights reserved . The use and
distribution terms for this software are covered by the Eclipse
(ns ^{:author "Stuart Sierra, modified for ClojureCLR by David Miller"
:doc "Force reloading namespaces on demand or through a
dependency tracker"}
clojure.tools.namespace.relo... |
6458cbbf97de8f91467ba9aed9bcb7295558cb3a2156683d5736d371a5d05bba | racket/old-plt | readWriteClass.scm | , 20 Mai 1998
23 May 2000
;;
;; Reading and writing .class files. This file was built using
lireclass.scm from my Ph.D. work .
;;
(define (read-class-dir dir f)
(with-input-from-file (++dir dir f)
(lambda ()
(let* ((magic (read-long)))
(if (not (= magic #xCAFEBABE))
(be... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/java/readWriteClass.scm | scheme |
Reading and writing .class files. This file was built using
(display-ln "Attention, attribut inconnu " name)
les n octets.
The bytecode is read here.
O : [int]
cas spécial où il faut compter deux entrées pour une constante.
cas spécial où il faut compter deux entrées pour une constante.
O : (list n str)
is i... | , 20 Mai 1998
23 May 2000
lireclass.scm from my Ph.D. work .
(define (read-class-dir dir f)
(with-input-from-file (++dir dir f)
(lambda ()
(let* ((magic (read-long)))
(if (not (= magic #xCAFEBABE))
(begin
(error "The magic number " magic " is incorrect. The file... |
2ed25da1b0c1da728d2118e99c7a340c9e3d352558bfe516771dfc5b97f48796 | panda-planner-dev/ipc2020-domains | p-03.lisp | (defproblem problem domain
(
(visible waypoint0 waypoint1)
(visible waypoint1 waypoint0)
(visible waypoint0 waypoint3)
(visible waypoint3 waypoint0)
(visible waypoint1 waypoint2)
(visible waypoint2 waypoint1)
(visible waypoint1 waypoint3)
(visible waypoint3 waypoint1)
(visible way... | null | https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/Rover/other/SHOP2/p-03.lisp | lisp | (defproblem problem domain
(
(visible waypoint0 waypoint1)
(visible waypoint1 waypoint0)
(visible waypoint0 waypoint3)
(visible waypoint3 waypoint0)
(visible waypoint1 waypoint2)
(visible waypoint2 waypoint1)
(visible waypoint1 waypoint3)
(visible waypoint3 waypoint1)
(visible way... | |
d7cbdc1fd10ad094fc0b611f51e62755c8535c62764f2feea0772f220aebfc99 | tomas81508/ysera | error.cljc | (ns ysera.error
(:require [ysera.test :refer [error?]]))
(defn error
"Throws an error with the given messages"
{:test (fn []
(error? (error "hello")))}
[& messages]
(let [message (apply str messages)]
(throw #?(:cljs (js/Error message)
:clj (Exception. message)))))
| null | https://raw.githubusercontent.com/tomas81508/ysera/b30a2f87f2d56bde5bdde524af548edde2427cfc/src/ysera/error.cljc | clojure | (ns ysera.error
(:require [ysera.test :refer [error?]]))
(defn error
"Throws an error with the given messages"
{:test (fn []
(error? (error "hello")))}
[& messages]
(let [message (apply str messages)]
(throw #?(:cljs (js/Error message)
:clj (Exception. message)))))
| |
188c1a78bd4c340f8c3afc62ee68ee79e08b2f4376e389f26091f41aa34e6d28 | typeable/schematic | Common.hs | module Data.Schematic.Verifier.Common where
import Data.List (nub)
simplifyNumberConstraint :: ([Integer] -> Integer) -> [Integer] -> Maybe Integer
simplifyNumberConstraint f =
\case
[] -> Nothing
x -> Just $ f x
simplifyDNLs :: [Integer] -> Maybe Integer
simplifyDNLs = simplifyNumberConstraint minimum
si... | null | https://raw.githubusercontent.com/typeable/schematic/7db0b46d7a43bd929a9dd932fa7f0d0e9bf6e94a/src/Data/Schematic/Verifier/Common.hs | haskell | module Data.Schematic.Verifier.Common where
import Data.List (nub)
simplifyNumberConstraint :: ([Integer] -> Integer) -> [Integer] -> Maybe Integer
simplifyNumberConstraint f =
\case
[] -> Nothing
x -> Just $ f x
simplifyDNLs :: [Integer] -> Maybe Integer
simplifyDNLs = simplifyNumberConstraint minimum
si... | |
89e2ba7eb3bd7fab31d0934f1fbca7ca3bae185cf27eafbdebb35339d9650e91 | gwkkwg/metatilities-base | l0-time.lisp | (in-package #:metatilities)
(defconstant +minutes-per-hour+ 60
"The number of minutes in one hour.")
(defconstant +seconds-per-minute+ 60
"The number of seconds in one minute.")
(defconstant +usual-days-per-year+ 365
"The number of days in an ordinary year.")
(defconstant +seconds-per-hour+ (* +seconds-per-mi... | null | https://raw.githubusercontent.com/gwkkwg/metatilities-base/ef04337759972fd622c9b27b53149f3d594a841f/dev/l0-time.lisp | lisp | logand is faster but less perspicuous
%% - A '%' character
%A - Full weekday name
%b - Abbreviated month name
%B - Full month name
%c - Shorthand for "%X, %x", the locale format for date and time
Unlike strftime, does not print a leading space
%p - AM/PM designation for the locale
%x - Date using the da... | (in-package #:metatilities)
(defconstant +minutes-per-hour+ 60
"The number of minutes in one hour.")
(defconstant +seconds-per-minute+ 60
"The number of seconds in one minute.")
(defconstant +usual-days-per-year+ 365
"The number of days in an ordinary year.")
(defconstant +seconds-per-hour+ (* +seconds-per-mi... |
525addb33e16a3546ccf67f291eeba84bb664c28252468186d30dd04b87aae04 | iambrj/imin | cond_test_10.rkt | (if (and #t (or #f #t))
(+ 1 2)
(- 10 5))
| null | https://raw.githubusercontent.com/iambrj/imin/a02104f795e11baba8b2df173c4061e69640891f/tests/cond_test_10.rkt | racket | (if (and #t (or #f #t))
(+ 1 2)
(- 10 5))
| |
613d0aa7950f96c283eb924bc491741c5b020b61108fdadf8bd38dee8e90e83e | NorfairKing/the-notes | PropositionalLogic.hs | module Logic.PropositionalLogic where
import Notes
import Prelude (map)
import Functions.Basics.Terms
import Functions.BinaryOperation.Terms
import Logic.AbstractLogic.Macro
import Logic.AbstractLogic.Terms
import Lo... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Logic/PropositionalLogic.hs | haskell | module Logic.PropositionalLogic where
import Notes
import Prelude (map)
import Functions.Basics.Terms
import Functions.BinaryOperation.Terms
import Logic.AbstractLogic.Macro
import Logic.AbstractLogic.Terms
import Lo... | |
0273586cb933c31f53ccb223e9ab8f46c7dfc19f0d68561b3bae8dc95d8ef74c | christian-marie/oauth2-server | Foundation.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
# LANGUAGE RecordWildCards #
-- |
Description : Foundation code for the Yesod web - app .
module Network.OA... | null | https://raw.githubusercontent.com/christian-marie/oauth2-server/ebb75be9d05dd52d478a6e069d32461d4e54544e/lib/Network/OAuth2/Server/Foundation.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
Include default resources resources.
This will define the following variables:
- @semantic_css@
- @stylesheet_css@
application.
This generates the rout... | # LANGUAGE TemplateHaskell #
# LANGUAGE RecordWildCards #
Description : Foundation code for the Yesod web - app .
module Network.OAuth2.Server.Foundation where
import Blaze.ByteString.Builder
import Control.Concurrent.STM
import Data.Monoid
import qualified Data.Text.Encoding as ... |
0eccb65b4c099704c9859d4735b1c9eea74f60ad5116961965f1fdd5875457e4 | avh4/elm-format | ParsecAdapter.hs | This adapter module allows one to interact with the new Elm parser with a
-- parsec-like API
--
Historically the Elm compiler and elm - format have shared the same parsing logic
and used parsec[1 ] + indents[2 ] as parser . Since Elm 0.15 the compiler got
its own custom parser[3 ] and the dependency on parsec w... | null | https://raw.githubusercontent.com/avh4/elm-format/af3acfc89b619b9dbcdbdb7185d3936971d76f87/elm-format-lib/src/Parse/ParsecAdapter.hs | haskell | parsec-like API
change was not integrated into elm-format however which has continued using
parsec[3]. It is desirable for elm-format to utilize the new parser however, and
it has been possible to replace parsec with the new parser without having to
rewrite all of the higher level parser, they just interact with ... | This adapter module allows one to interact with the new Elm parser with a
Historically the Elm compiler and elm - format have shared the same parsing logic
and used parsec[1 ] + indents[2 ] as parser . Since Elm 0.15 the compiler got
its own custom parser[3 ] and the dependency on parsec was removed . This
th... |
4503d8d4660b5a19ef6b935151ca1161ac24f8c835dcff7fd871dd4f3cc41811 | ssardina/ergo | prog-two-towers.scm | This is an offline program for the Two Towers problem
(include "two-towers.scm")
(define (control)
(:begin (:act (pick! 'A))
(:until (known? (eq? hand 'empty))
(:if (known? (eq? hand 'red)) (:act (put! 'B)) (:act (put! 'C)))
(:act (pick! 'A)))))
;; find a plan that works for all the i... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Examples/PlanningExamples/prog-two-towers.scm | scheme | find a plan that works for all the initial states | This is an offline program for the Two Towers problem
(include "two-towers.scm")
(define (control)
(:begin (:act (pick! 'A))
(:until (known? (eq? hand 'empty))
(:if (known? (eq? hand 'red)) (:act (put! 'B)) (:act (put! 'C)))
(:act (pick! 'A)))))
(define (main) (ergo-gendo (control)))
|
ad886345d856f93d57e86fd810b1bffbd091e63c09785033ea41e6327ae6ced9 | 0install/0install | utils.ml | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Common
(* For temporary directory names *)
let () = Random.self_init ()
type path_component =
| Filename of string (* foo/ *)
| ParentDir (* ../ *)
./
| EmptyComponent... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/utils.ml | ocaml | For temporary directory names
foo/
../
/
Skip any leading slashes and return the rest
e.g. "/bin/sh", "./prog" or "foo/bar"
e.g. "python"
User function raised an exception. Kill and reap the child.
Faster version, since we know the path is relative
Printf.printf "join_realpath <%s> + <%s>\n" path res... | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Common
let () = Random.self_init ()
type path_component =
./
let finally_do cleanup resource f =
let result =
try f resource
with ex -> cleanup resource; raise ex in
let (... |
04197763c8b6215f83b8b27a0642dbdd3c4ba6f3359d781e71f66c09d94b0306 | AshleyYakeley/Truth | Dynamic.hs | module Pinafore.Language.Type.Storable.Dynamic
( DynamicType
, mkDynamicType
, DynamicEntityType
, DynamicEntity(..)
, ADynamicEntityFamily(..)
, aDynamicStorableFamilyWitness
, dynamicStoreAdapter
, dynamicStorableGroundType
, aDynamicStorableGroundType
, getConcreteDynamicEntit... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/c1c9e70f2789ba8bd336c06fd1bdc0f41675b9c1/Pinafore/pinafore-language/lib/Pinafore/Language/Type/Storable/Dynamic.hs | haskell | P <: DynamicEntity
P <: Q | module Pinafore.Language.Type.Storable.Dynamic
( DynamicType
, mkDynamicType
, DynamicEntityType
, DynamicEntity(..)
, ADynamicEntityFamily(..)
, aDynamicStorableFamilyWitness
, dynamicStoreAdapter
, dynamicStorableGroundType
, aDynamicStorableGroundType
, getConcreteDynamicEntit... |
198c2ec8e30a4b311037caf0aae777dd36371a1786ef1dc27468b397261402c7 | threatgrid/asami | query_internals_test.cljc | (ns asami.query-internals-test
"Tests internals of the query portion of the memory storage"
(:require [asami.planner :refer [Bindings]]
[asami.core :as core]
[asami.query :as q :refer [pattern-left-join outer-product
create-binding create-bindings minus... | null | https://raw.githubusercontent.com/threatgrid/asami/641379c059c765a3b0b34d9209e40376d7a690d4/test/asami/query_internals_test.cljc | clojure | This example represents the uncommon, but legal, scenario
wherein some variables appearing in the :find clause are only
present in the :in clause. Consider the following.
:in [$ ?param] ,,,}
db
param))
In this case, a user may rely on substitution r... | (ns asami.query-internals-test
"Tests internals of the query portion of the memory storage"
(:require [asami.planner :refer [Bindings]]
[asami.core :as core]
[asami.query :as q :refer [pattern-left-join outer-product
create-binding create-bindings minus... |
4357f1747f9b973fb13f7bd8e626b95f5ceacfc1a32aa93947db0a468c6138e4 | garrigue/labltk | dummyUnix.ml | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/browser/dummyUnix.ml | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 2000 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
module Mutex = struct
type ... |
739557767d44419b057471654c7420fcf513a0aae6297c07c1c10150cb1c8ed0 | typeclasses/loc | SpanOrLoc.hs | module Data.Loc.SpanOrLoc
(
SpanOrLoc,
-- * Constructing
span, loc, fromTo,
-- * Deconstructing
spanOrLoc,
-- * Querying
start, end,
)
where
import Data.Loc.Internal.Prelude
import Data.Loc.Loc (Loc)
import Data.Loc.Span (Span)
import qualified Data.Loc.Loc as Loc
import qualifie... | null | https://raw.githubusercontent.com/typeclasses/loc/11177054d894be5aa01c10c22b13bc224b99b67f/loc/src/Data/Loc/SpanOrLoc.hs | haskell | * Constructing
* Deconstructing
* Querying
|
A 'SpanOrLoc' consists of a start location and an end location.
The end location must be greater than or equal to the start location;
in other words, backwards spans are not permitted.
If the start and end location are the same, then the value is a 'Loc'.
If they diffe... | module Data.Loc.SpanOrLoc
(
SpanOrLoc,
span, loc, fromTo,
spanOrLoc,
start, end,
)
where
import Data.Loc.Internal.Prelude
import Data.Loc.Loc (Loc)
import Data.Loc.Span (Span)
import qualified Data.Loc.Loc as Loc
import qualified Data.Loc.Span as Span
import Data.Data (Data)
data SpanOrLoc... |
11f00b51892ff981598c7516fb0f908776f3d8c5de883756e5320e27df25f159 | goblint/analyzer | sharedFunctions.apron.ml | (** Functions and modules that are shared among the original apronDomain and the new affineEqualityDomain. *)
open GoblintCil
open Prelude
open Apron
module M = Messages
module BI = IntOps.BigIntOps
module Var =
struct
include Var
let equal x y = Var.compare x y = 0
end
module Lincons1 =
struct
include Linc... | null | https://raw.githubusercontent.com/goblint/analyzer/b276934e50b476c1e6a6ee6e50977ee511688a5c/src/cdomains/apron/sharedFunctions.apron.ml | ocaml | * Functions and modules that are shared among the original apronDomain and the new affineEqualityDomain.
HACK
infinity means unbounded
octD, boxD
floor division
ceiling division
* Cast is not injective, i.e. may under-/overflow.
* Expression constructor not supported.
* Expression type could not be determi... |
open GoblintCil
open Prelude
open Apron
module M = Messages
module BI = IntOps.BigIntOps
module Var =
struct
include Var
let equal x y = Var.compare x y = 0
end
module Lincons1 =
struct
include Lincons1
let show = Format.asprintf "%a" print
let num_vars x =
Apron . Linexpr0.get_size returns some int... |
05e64be778833b02c3169e2108ec98011489b839dfd81ce0a862ed2a00fe36fc | coco-team/lustrec | model_stopwatch.ml | open Datatype
open Basetypes
(* open Transformer2 *)
open SF
let verbose = false
let actionv x = no_action (*TODO if verbose then action x else no_action*)
TODO
let condition x = condition {
expr = Corelang.mkexpr Location.dummy_loc (Lustre_types.Expr_const (Corelang.const_of_bool true));
cinputs = [];
coutput... | null | https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/tools/stateflow/models/model_stopwatch.ml | ocaml | open Transformer2
TODO if verbose then action x else no_action
DPath [smain;srun];
name
type
clock
not a constant
no default value
no parent known | open Datatype
open Basetypes
open SF
let verbose = false
TODO
let condition x = condition {
expr = Corelang.mkexpr Location.dummy_loc (Lustre_types.Expr_const (Corelang.const_of_bool true));
cinputs = [];
coutputs = [];
cvariables = [];
}
let name = "stopwatch"
let model =
let smain = "main" in
let s... |
6c0fa3ed234fc2b53a3c0184c5625303049365e88827168ba7ec2a7791536b34 | racket/web-server | mm01.rkt | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define (gn which)
(cadr
(call-with-serializable-current-continuation
(lambda (k)
(let ([ignore (printf "Please send the ~a number.\n" which)])
k)))))
(define (start initial)
(gn "first"))
| null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/lang-servlets/mm01.rkt | racket | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define (gn which)
(cadr
(call-with-serializable-current-continuation
(lambda (k)
(let ([ignore (printf "Please send the ~a number.\n" which)])
k)))))
(define (start initial)
(gn "first"))
| |
0a916f8dcbc5c778ef12712f2cda7fdbed6f2e0fb17b51c0ab4002b211a4c8cc | BBVA/ust2dsa | Parser.hs | |
Copyright 2020 Banco Bilbao Vizcaya Argentaria , S.A.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , soft... | null | https://raw.githubusercontent.com/BBVA/ust2dsa/0688651f77ebda312dac76ae6a1901357ab12907/src/Text/UbuntuSources/Parser.hs | haskell | |
Copyright 2020 Banco Bilbao Vizcaya Argentaria , S.A.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , soft... | |
f8037554a02fa7219cd4b4e87648d1929da2df62a65a4cb42ed63fe3aa654da1 | chrovis/cljam | reader.clj | (ns cljam.io.bcf.reader
(:refer-clojure :exclude [read])
(:require [clojure.string :as cstr]
[clojure.tools.logging :as logging]
[cljam.io.protocols :as protocols]
[cljam.io.util.bgzf :as bgzf]
[cljam.io.util.lsb :as lsb]
[cljam.io.vcf.reader :as vcf-reade... | null | https://raw.githubusercontent.com/chrovis/cljam/59edbba2c561f6e5b330c2d0572ca9b89b220d21/src/cljam/io/bcf/reader.clj | clojure | need dynamic extension for namespace issue.
NULL-terminated | (ns cljam.io.bcf.reader
(:refer-clojure :exclude [read])
(:require [clojure.string :as cstr]
[clojure.tools.logging :as logging]
[cljam.io.protocols :as protocols]
[cljam.io.util.bgzf :as bgzf]
[cljam.io.util.lsb :as lsb]
[cljam.io.vcf.reader :as vcf-reade... |
0b1adafc58cfe5e263138869b38f2c1d8e0226fd963d2510403fc5158b420d18 | Gabriella439/Haskell-Morte-Library | Context.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveFunctor #-}
| All ` Context`-related operations
module Morte.Context (
-- * Context
Context
, empty
, insert
, lookup
, toList
) where
import Control.DeepSeq (NFData)
import Data.Text.Lazy (Text)
import Prelude hi... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Morte-Library/f7a459c7ec1d69f71c389f5693a26a94c1854636/src/Morte/Context.hs | haskell | # LANGUAGE DeriveFunctor #
* Context
| An empty context with no key-value pairs
> toList empty = []
| Add a key-value pair to the `Context`
| Return all key-value associations as a list | # LANGUAGE GeneralizedNewtypeDeriving #
| All ` Context`-related operations
module Morte.Context (
Context
, empty
, insert
, lookup
, toList
) where
import Control.DeepSeq (NFData)
import Data.Text.Lazy (Text)
import Prelude hiding (lookup)
| Bound variable names and their types
... |
a0e45e2880eeae0bfefda17aff70e3c7f223fb9463a3e6c09ddb395acb42b7fc | pmundkur/flowcaml | compare.mli | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/utils/compare.mli | 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 : compare.mli , v 1.2 2003/06/26 ... |
8f21a19995c512c5e44331989cd3afe95cf574c1ef304df76ebab4b0f0fea9e2 | didierverna/focus | directive.lisp | ;;; directive.lisp --- Format directives management
Copyright ( C ) 2015
Author : < >
This file is part of FoCus .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice and this permission not... | null | https://raw.githubusercontent.com/didierverna/focus/bf2da0220ad0d0a08b52f88a1c843dcb4fb3fbf8/core/src/directive.lisp | lisp | directive.lisp --- Format directives management
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIE... |
Copyright ( C ) 2015
Author : < >
This file is part of FoCus .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
(in-pac... |
4e9ef0592a2608d1f79db507fd925df241401459dcdd5473b7321b32183726ef | NethermindEth/horus-checker | FuncSpec.hs | module Horus.SW.FuncSpec (FuncSpec (..), emptyFuncSpec, emptyFuncSpec', FuncSpec' (..), toFuncSpec) where
import Data.Aeson (FromJSON (..), withObject, (.:))
import Data.Coerce (coerce)
import Data.Maybe (fromMaybe)
import Horus.Expr (Expr, Ty (..))
import Horus.Expr qualified as Expr
import Horus.JSON.Util (HSExpr (... | null | https://raw.githubusercontent.com/NethermindEth/horus-checker/b4ce60c7739a0d12dab6c9b2ff87719b321f6200/src/Horus/SW/FuncSpec.hs | haskell | module Horus.SW.FuncSpec (FuncSpec (..), emptyFuncSpec, emptyFuncSpec', FuncSpec' (..), toFuncSpec) where
import Data.Aeson (FromJSON (..), withObject, (.:))
import Data.Coerce (coerce)
import Data.Maybe (fromMaybe)
import Horus.Expr (Expr, Ty (..))
import Horus.Expr qualified as Expr
import Horus.JSON.Util (HSExpr (... | |
dc7941357e0914832dd08e81e2c29f4fde757619128dc61e68043fb9ab5560fc | bsansouci/bsb-native | testglob.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/test/test9/testglob.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 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 .
open Bool;;
open Glob;;
let yep f x =
try
i... |
04c9bd96a2f1f8047bd1ab43e8052f6e8fcdf8aad802786ca1ce671d5c716182 | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
-- No unicode in custom fields.
main = cabalTest . recordMode DoNotRecord $
fails $ cabal "check" []
-- You cannot check this against the output,
as the way to display “ unicode
char ” wobbles between OSes .
| null | https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/NonConfCheck/UnicodeCustomFields/cabal.test.hs | haskell | No unicode in custom fields.
You cannot check this against the output, | import Test.Cabal.Prelude
main = cabalTest . recordMode DoNotRecord $
fails $ cabal "check" []
as the way to display “ unicode
char ” wobbles between OSes .
|
94a525362535374086a2e975bf389cf0b17fb23344e5de2bcbff6f9373bd6517 | DKurilo/hackerrank | solution3.hs | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import Data.List
import Data.List.Split
import Data.Set
import System.Environment
import System.IO
--
-- Complete the problemSolving function below.
--
data Problem = P { pvi :: Int
,... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/problemsolving/solution3.hs | haskell |
Complete the problemSolving function below.
Write your code here.
hPutStrLn fptr $ show result | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import Data.List
import Data.List.Split
import Data.Set
import System.Environment
import System.IO
data Problem = P { pvi :: Int
, pord :: Int
} deriving (Show)
data... |
59b264c76eae62775b7c178cf917e44c7f760922006263e79f6cba6bc110af5f | dalaing/little-languages | Term.hs | # LANGUAGE TemplateHaskell #
module Term where
import Control.Lens.TH
data Term =
TmZero
| TmSucc Term
| TmPred Term
deriving (Eq, Ord, Show)
makeClassyPrisms ''Term
size :: Term -> Int
size TmZero = 1
size (TmSucc t) = 1 + size t
size (TmPred t) = 1 + size t
| null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/unityped/n/src/Term.hs | haskell | # LANGUAGE TemplateHaskell #
module Term where
import Control.Lens.TH
data Term =
TmZero
| TmSucc Term
| TmPred Term
deriving (Eq, Ord, Show)
makeClassyPrisms ''Term
size :: Term -> Int
size TmZero = 1
size (TmSucc t) = 1 + size t
size (TmPred t) = 1 + size t
| |
34911795092275f16d62e94946d830700db5f9b3915e92e627cd9bd66d689f68 | lojic/LearningRacket | day03-string-version.rkt | #lang racket
(define (col lst n) (map (curryr string-ref n) lst))
(define (common lst) (if (>= (count (curry char=? #\1) lst) (/ (length lst) 2)) #\1 #\0))
(define (to-decimal s) (read (open-input-string (format "#b~a" s))))
(define (flipc c) (if (char=? c #\1) #\0 #\1))
(define (flip s) (build-string (string-length s)... | null | https://raw.githubusercontent.com/lojic/LearningRacket/c6899bdcd0d5417252f40d20ae118c18c27f905f/advent-of-code-2021/solutions/day03/day03-string-version.rkt | racket | #lang racket
(define (col lst n) (map (curryr string-ref n) lst))
(define (common lst) (if (>= (count (curry char=? #\1) lst) (/ (length lst) 2)) #\1 #\0))
(define (to-decimal s) (read (open-input-string (format "#b~a" s))))
(define (flipc c) (if (char=? c #\1) #\0 #\1))
(define (flip s) (build-string (string-length s)... | |
dc2a212e7d3136bbce2a92c31a4bc6ea457991a42742e320e918f5b709fef4a6 | bonniee/svg-puzzle-gen | project.clj | (defproject puzzle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-exec "0.3.7"]]
:dependencies [
[org.clojure/clojure "1.8.0"]
[trystan/voronoi-diagram "1.0.0"]
[clj-kdtree "1.2.0" :exclusions [org.c... | null | https://raw.githubusercontent.com/bonniee/svg-puzzle-gen/f6250c24ab0fdf5cbb9383489b6e350f101ad256/project.clj | clojure | (defproject puzzle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-exec "0.3.7"]]
:dependencies [
[org.clojure/clojure "1.8.0"]
[trystan/voronoi-diagram "1.0.0"]
[clj-kdtree "1.2.0" :exclusions [org.c... | |
78b87751331ad6de6bedf75706e19f89ba5d07c16ef1605aa65af7551c230c0d | haguenau/wyrd | setup.ml | setup.ml generated for the first time by OASIS v0.2.0
OASIS_START
(* DO NOT EDIT (digest: bc7b6e0baeb13541a4989f56e19ebc42) *)
Regenerated by OASIS v0.2.0
Visit for more information and
documentation about functions used in this file .
Regenerated by OASIS v0.2.0
Visit for more information... | null | https://raw.githubusercontent.com/haguenau/wyrd/490ce39ad9ecf36969eb74b9f882f85a1ef14ba3/setup.ml | ocaml | DO NOT EDIT (digest: bc7b6e0baeb13541a4989f56e19ebc42)
Nothing more in the string
String end with a separator
Start with a _ if digit
Default value container
Last chance to get a value: the default
Get data
Get value
Set data
Set data, from string
Output value as string, if possible
Get data, as ... | setup.ml generated for the first time by OASIS v0.2.0
OASIS_START
Regenerated by OASIS v0.2.0
Visit for more information and
documentation about functions used in this file .
Regenerated by OASIS v0.2.0
Visit for more information and
documentation about functions used in this file.
*)
m... |
579660addda8b745d8a80bea6abc878a1de724d56fc6436aebe2dd9e620281d1 | vbedegi/re-alm | boot.cljs | (ns fastgoodcheap.boot
(:require
[re-alm.boot :as boot]
[re-alm.core :as ra]
[fastgoodcheap.core :as core]))
(enable-console-print!)
(defn ^:export init []
(boot/boot
(.getElementById js/document "app")
core/counter-component
(core/init-fastgoodcheap)
(-> ra/default-handler
ra/... | null | https://raw.githubusercontent.com/vbedegi/re-alm/73fdb86b2cb92bec16865be44b101361e7e84115/examples/fastgoodcheap/src/cljs/fastgoodcheap/boot.cljs | clojure | (ns fastgoodcheap.boot
(:require
[re-alm.boot :as boot]
[re-alm.core :as ra]
[fastgoodcheap.core :as core]))
(enable-console-print!)
(defn ^:export init []
(boot/boot
(.getElementById js/document "app")
core/counter-component
(core/init-fastgoodcheap)
(-> ra/default-handler
ra/... | |
9f6d535554ce22163e989c5b80e72db285c61603ff261d1e25593fad305ac1d7 | cyverse-archive/DiscoveryEnvironmentBackend | rename.clj | (ns data-info.services.rename
(:use [clojure-commons.error-codes]
[clj-jargon.init :only [with-jargon]]
[clj-jargon.item-ops :only [move move-all]]
[slingshot.slingshot :only [try+ throw+]])
(:require [clojure.tools.logging :as log]
[clojure-commons.file-utils :as ft]
... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/data-info/src/data_info/services/rename.clj | clojure | (ns data-info.services.rename
(:use [clojure-commons.error-codes]
[clj-jargon.init :only [with-jargon]]
[clj-jargon.item-ops :only [move move-all]]
[slingshot.slingshot :only [try+ throw+]])
(:require [clojure.tools.logging :as log]
[clojure-commons.file-utils :as ft]
... | |
0a5ad9b92181dedf3bf713d41ec831cd7e8a1d70e25a6a9f04fb320d25443392 | ocamllabs/ocaml-modular-implicits | graph_example.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/interactive/lib-graph/graph_example.ml | ocaml | *********************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1999 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 .
open Graphics;;
open_graph " 480x270";;
... |
53e162ec8d008338c12631b1bed4946d77abdc62c6cf5c3c446303e3a0f5232f | Clojure2D/clojure2d-examples | P_1_1_1_01.clj | (ns GG.P.P-1-1-1-01
(:require [clojure2d.core :refer :all]
[clojure2d.color :as c]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Draw rectangles"
[canvas window _ _]
(when (mouse-in-window? window... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/P/P_1_1_1_01.clj | clojure | (ns GG.P.P-1-1-1-01
(:require [clojure2d.core :refer :all]
[clojure2d.color :as c]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defn draw
"Draw rectangles"
[canvas window _ _]
(when (mouse-in-window? window... | |
3167ae50dd6a1fe2722ba6cc859c6468fab375e5c54a74fb3eb23ae3ace587c8 | shayan-najd/NativeMetaprogramming | tc045.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
module ShouldSucceed where
class C a where
op1 :: a -> a
class (C a) => B a where
op2 :: a -> a -> a
instance (B a) => B [a] where
op2 xs ys = xs
instance C [a] where
op1 xs = xs
{- This was passed by the prototype, but failed hard in the new
typechecker wi... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/tc045.hs | haskell | This was passed by the prototype, but failed hard in the new
typechecker with the message
Fail:No match in theta_class
| # OPTIONS_GHC -fno - warn - redundant - constraints #
module ShouldSucceed where
class C a where
op1 :: a -> a
class (C a) => B a where
op2 :: a -> a -> a
instance (B a) => B [a] where
op2 xs ys = xs
instance C [a] where
op1 xs = xs
|
50edef566e7c290c305b3c962b350778979a913323abdb74d72b78b22fba7cdf | simonmar/haskell-eXchange-2015 | HaxlShake.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
module Main (main) where
import Haxl.Prelude
import Prelude ()
import Haxl.Core
import Haxl.Core.Monad (unsafeLiftIO)
import System.FilePath
import qualified Data.Map as Map
import Data.Map (Map)
import Data... | null | https://raw.githubusercontent.com/simonmar/haskell-eXchange-2015/3ae0e34a051201eb77721bee2e940ec1f764a0df/build/HaxlShake.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
-----------------------------------------------------------------------------
Cache the build of a particular target
-----------------------------------------------------------------------------
Compiling Haskell programs | # LANGUAGE GeneralizedNewtypeDeriving #
module Main (main) where
import Haxl.Prelude
import Prelude ()
import Haxl.Core
import Haxl.Core.Monad (unsafeLiftIO)
import System.FilePath
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Monoid
import System.Directory
import Control.Monad (when)
import qual... |
9453add71dcdf9154ae4a1ca9c18d10a36c2f36c86a9bdae901ea78fb587b861 | ocamllabs/ocaml-effects | includecore.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/typing/includecore.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 .
open Asttypes
open Path
open Types
ope... |
a380f7dbab7201e854ac302dbba2c90342f02145c9d89e29907ead347a0f5bc6 | braidchat/braid | thread.cljs | (ns braid.core.client.ui.views.thread
(:require
[braid.lib.color :as color]
[braid.lib.date :as date]
[braid.lib.url :as url]
[braid.core.client.helpers :as helpers]
[braid.core.client.ui.views.card-border :refer [card-border-view]]
[braid.core.client.ui.views.message :refer [message-view]]
[brai... | null | https://raw.githubusercontent.com/braidchat/braid/a457cf26393789534dccaccb5177e9dd62405a5b/src/braid/core/client/ui/views/thread.cljs | clojure | Closing over thread-id, but the only time a thread's id changes is the new
thread box, which doesn't have messages anyway
applied to fragments properly, so we need to set
the key in this way instead | (ns braid.core.client.ui.views.thread
(:require
[braid.lib.color :as color]
[braid.lib.date :as date]
[braid.lib.url :as url]
[braid.core.client.helpers :as helpers]
[braid.core.client.ui.views.card-border :refer [card-border-view]]
[braid.core.client.ui.views.message :refer [message-view]]
[brai... |
f07d105f344f5f0fa04726c1989f49a4fb76d5be10d8a43b6bb11efd0692ae12 | Smoltbob/Caml-Est-Belle | alpha_tricky.ml | let rec f x =
if x=42 then
1
else
let rec f x =
2
in
f 42
in print_int (f 0)
| null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/gen-code/valid/alpha_tricky.ml | ocaml | let rec f x =
if x=42 then
1
else
let rec f x =
2
in
f 42
in print_int (f 0)
| |
c00d2fffafcb5e96914bdf2b4cb802f8689516638e90c50f2a114dd473a056f0 | SamB/coq | recdef.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/funind/recdef.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i camlp4deps: "parsing/grammar.cma" ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Term
open Te... |
a4649fe8b6b50a88cf24fe9d1d3c044b1c02bb8ebd7fd3ddbae6b2e7e9b7529c | JHU-PL-Lab/jaylang | enc-zip3.ml | let rec loop x = loop ()
let rec zip x y =
if x = 0
then
if y = 0
then 0
else loop ()
else
if y = 0
then loop ()
else 1 + zip (x-1) (y-1)
let main n =
assert (zip n n = n)
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/enc-zip3.ml | ocaml | let rec loop x = loop ()
let rec zip x y =
if x = 0
then
if y = 0
then 0
else loop ()
else
if y = 0
then loop ()
else 1 + zip (x-1) (y-1)
let main n =
assert (zip n n = n)
| |
78f6fd020052f3faef8b7de540ca310bfdd7383b282b4b76099d3c7e3638f1ce | plumatic/grab-bag | expiring_cache_test.clj | (ns plumbing.expiring-cache-test
(:use clojure.test plumbing.test)
(:require
[plumbing.expiring-cache :as ec]
[plumbing.core :as plumbing]
[plumbing.resource :as resource]
))
(deftest always-prune-test
(let [ec (ec/create 0 0)]
(is (nil? (ec/get ec 1)))
(is (= (ec/count ec) 0))
(is (= 2 (... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/test/plumbing/expiring_cache_test.clj | clojure | (ns plumbing.expiring-cache-test
(:use clojure.test plumbing.test)
(:require
[plumbing.expiring-cache :as ec]
[plumbing.core :as plumbing]
[plumbing.resource :as resource]
))
(deftest always-prune-test
(let [ec (ec/create 0 0)]
(is (nil? (ec/get ec 1)))
(is (= (ec/count ec) 0))
(is (= 2 (... | |
cdb116bb7f889d8d8c7d47da7c9a903f39f3910f6d4d4d3ee613e16ffa33ec9b | mariari/Misc-Lisp-Scripts | 566.lisp |
(defun flip-cake (&rest degree-to-flip)
"flips a cake by an integer or a list of integers,
the cake is properly flipped when the frosting is back on the top"
(let ((flip-value (reduce #'+ degree-to-flip)))
(labels ((flipped-p (num) (= 0 (mod num 720)))
(flip-until-up (flip-num... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Project-Euler/566.lisp | lisp | converts any number to integers, so very poor!!
1 is frosting on top
the total number of times we need to flip
set the last part of the cake we flipped the frosting |
(defun flip-cake (&rest degree-to-flip)
"flips a cake by an integer or a list of integers,
the cake is properly flipped when the frosting is back on the top"
(let ((flip-value (reduce #'+ degree-to-flip)))
(labels ((flipped-p (num) (= 0 (mod num 720)))
(flip-until-up (flip-num... |
9b73b66c24481f55d83fc09697065f53dd9502a7dd3f913511f34c04dbc870e9 | nervous-systems/eulalie | xml.clj | (ns eulalie.platform.xml
(:require [clojure.string :as str]
[clojure.walk :as walk]
[clojure.xml :as xml]
[camel-snake-kebab.core :as csk]))
(defn xml-map [mess]
;; I don't really know what people do. We don't care about attributes.
(walk/postwalk
(fn [x]
(if (and (ma... | null | https://raw.githubusercontent.com/nervous-systems/eulalie/ee435987278f5ed628f576700b716d9d0bc17c61/src/eulalie/platform/xml.clj | clojure | I don't really know what people do. We don't care about attributes. | (ns eulalie.platform.xml
(:require [clojure.string :as str]
[clojure.walk :as walk]
[clojure.xml :as xml]
[camel-snake-kebab.core :as csk]))
(defn xml-map [mess]
(walk/postwalk
(fn [x]
(if (and (map? x) (:tag x))
(let [{:keys [tag content]} x]
{(csk/->keb... |
d8ffcb8279e388070197cbff96a6a721b2dcc3a3b4ae1b880821b9e76ffc5c0c | nuprl/gradual-typing-performance | vars.rkt | #lang racket/base
(require racket/file
"utils.rkt")
(provide (all-defined-out))
;; This value depends on the server; this seems to work for freenode
(define *my-nick*
(box (from-env "BOTNICK" "fake-rudybot")))
(define *my-master*
;; use authentication by default, but allow to set a regexp for convenience... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/rudybot/vars.rkt | racket | This value depends on the server; this seems to work for freenode
use authentication by default, but allow to set a regexp for convenience
This should probably be a hash table, keyed by network name.
env var can be "#foo,#bar"
some state is put globally, to be able to separate functions conveniently
but adding
M... | #lang racket/base
(require racket/file
"utils.rkt")
(provide (all-defined-out))
(define *my-nick*
(box (from-env "BOTNICK" "fake-rudybot")))
(define *my-master*
(box (let ([master (from-env "BOTMASTER" "")])
(and (not (equal? master ""))
(regexp (string-append "^" master "$"))))))
... |
671405683b338c6a863a6f1c2b97970480d5b811e7a9991fc19f9e0ad1408e7c | LuisThiamNye/chic | ui.clj | Licensed under Apache License 2.0 ( -2.0 )
;; Adapted from
( commit 4deed5195a61511c348c0799db118c5c25d73c04 )
(ns chic.ui
(:require
[chic.util :as util]
[clojure.pprint :as pp]
[potemkin :refer [doit]]
[clj-commons.primitive-math :as prim]
[io.github.humbleui.core :as hui :refer [deftype+]]
[... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/ui.clj | clojure | Adapted from
(neg? (:right cs))
within a certain significant 'render distance' beyond the window, perhaps tell components
to 'suspend' and deallocate resources so that UI would have to be
regenerated the next time it becomes visible (inside the window)
(clojure.pprint/pprint event) | Licensed under Apache License 2.0 ( -2.0 )
( commit 4deed5195a61511c348c0799db118c5c25d73c04 )
(ns chic.ui
(:require
[chic.util :as util]
[clojure.pprint :as pp]
[potemkin :refer [doit]]
[clj-commons.primitive-math :as prim]
[io.github.humbleui.core :as hui :refer [deftype+]]
[io.github.humbleu... |
fcbc8310019af58198164452147d20de902d137cfe98dfb7ab7ca5731ba9a96a | alexprut/earth-defender | slave_handler.erl | -module(slave_handler).
-behavior(gen_server).
-include("room_state.hrl").
%% External exports
-export([start_link/1, connect_to_master/1, get_master_data/0, set_master_data/1, get_pid/0, slave_handler_sup/1]).
%% Internal exports
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_chang... | null | https://raw.githubusercontent.com/alexprut/earth-defender/5d4d8f0832fc74882a701d6a0dedee23fd494648/server/src/slave_handler.erl | erlang | External exports
Internal exports
---------------------------------------------------
Supervisor.
---------------------------------------------------
---------------------------------------------------
gen_server.
---------------------------------------------------
Synchronous messages
Asynchronous messag... | -module(slave_handler).
-behavior(gen_server).
-include("room_state.hrl").
-export([start_link/1, connect_to_master/1, get_master_data/0, set_master_data/1, get_pid/0, slave_handler_sup/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-record(state, {master_name, mas... |
fefb7e06013e15874eb2f987a74e1efe6937e7b7f2e62d19984773d0158fa1b3 | kana/sicp | ex-2.61.scm | Exercise 2.61 .
;;;
;;; Give an implementation of adjoin-set using the ordered representation.
(define (adjoin-set x set)
(if (null? set)
(list x)
(let ([x1 (car set)])
(cond [(= x x1) set]
[(< x x1) (cons x set)]
[(< x1 x) (cons x1 (adjoin-set x (cdr set)))]))))
;;; By anal... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-2.61.scm | scheme |
Give an implementation of adjoin-set using the ordered representation.
By analogy with element-of-set? show how to take advantage of the ordering
steps as with the unordered representation.
If the item we want to add is the P-th item of the resulting set, the number
of steps required is P. Because we can reuse t... | Exercise 2.61 .
(define (adjoin-set x set)
(if (null? set)
(list x)
(let ([x1 (car set)])
(cond [(= x x1) set]
[(< x x1) (cons x set)]
[(< x1 x) (cons x1 (adjoin-set x (cdr set)))]))))
to produce a procedure that requires on the average about half as many
So that the av... |
a689798b3afcba6f63aef5582b6c26df999860419874e2066d97c417af198d78 | liebke/avout | sdb_atom_test.clj | (ns avout.test.sdb-atom-test
(:use avout.core
simpledb.core
avout.sdb.atom
clojure.test))
(System/setProperty "org.apache.commons.logging.Log"
"org.apache.commons.logging.impl.NoOpLog")
(defn timer [f]
(let [start (System/nanoTime)]
(f)
(/ (double (- (System/nano... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/experimental/orolo/plugins/avout-sdb/test/avout/test/sdb_atom_test.clj | clojure | (ns avout.test.sdb-atom-test
(:use avout.core
simpledb.core
avout.sdb.atom
clojure.test))
(System/setProperty "org.apache.commons.logging.Log"
"org.apache.commons.logging.impl.NoOpLog")
(defn timer [f]
(let [start (System/nanoTime)]
(f)
(/ (double (- (System/nano... | |
0ec94e35c5b2985d5a6f8f83a4040b462b3dabc7ffb4b287943ef54b8f3b2280 | alex-gutev/tridash | package.lisp | package.lisp
;;;;
;;;; Tridash Programming Language.
Copyright ( C ) 2017 ,
;;;;
;;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;;; (at your opti... | null | https://raw.githubusercontent.com/alex-gutev/tridash/48853919257f512893b5d041afe5d609c48ecd0a/src/util/package.lisp | lisp |
Tridash Programming Language.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPO... | package.lisp
Copyright ( C ) 2017 ,
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(defpackage :tridash.util
(:use :generic-cl
:anaphora
... |
6e2f522aaab08c44b4ae140462d49d6dabd3536ac862203aa2d40738bda289d7 | jackfirth/resyntax | let-binding.rkt | #lang racket/base
(provide body-with-refactorable-let-expression
refactorable-let-expression)
(require racket/list
racket/match
racket/sequence
racket/set
racket/syntax
rebellion/base/option
rebellion/collection/entry
rebellion/private/guarded-... | null | https://raw.githubusercontent.com/jackfirth/resyntax/89136df868d43b295e08148d16a2df259b578545/default-recommendations/private/let-binding.rkt | racket | @----------------------------------------------------------------------------------------------------
conservative under-estimate | #lang racket/base
(provide body-with-refactorable-let-expression
refactorable-let-expression)
(require racket/list
racket/match
racket/sequence
racket/set
racket/syntax
rebellion/base/option
rebellion/collection/entry
rebellion/private/guarded-... |
a8fb2b6ae3fb4582abccaff7160f852a761184f9e5c2cb6f0a0d65db2a8948df | basho/riak_cs | riak_cs_wm_stats.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_wm_stats.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
b9303aa84d3569f59403087b34702add2f4c72ed1a29367f13351538c1d4acd0 | gergoerdi/chip8-papilio | Video.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances , FlexibleContexts #
module Video (main, emitBench, vgaFB, encodeVGA, synthesize) where
import Types
import Utils
import DCM
import Language.KansasLava
import Language.KansasLava.VHDL
import Language.Netlist.GenVHDL
import Lang... | null | https://raw.githubusercontent.com/gergoerdi/chip8-papilio/6bf0cbf0e8830495ec4298d7de586f69d5526de0/src/Video.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances , FlexibleContexts #
module Video (main, emitBench, vgaFB, encodeVGA, synthesize) where
import Types
import Utils
import DCM
import Language.KansasLava
import Language.KansasLava.VHDL
import Language.Netlist.GenVHDL
import Lang... | |
20f17ec576cba093ede2bec7f990af6b937c78309c85ae2d5d281d91cb7157a7 | wtfleming/clojurescript-examples | project.clj | (defproject core-async-examples "0.1.0"
:description "Examples using core.async with clojurescript"
:url "-examples"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2505"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]... | null | https://raw.githubusercontent.com/wtfleming/clojurescript-examples/6f878f431a2cba405b6ae715199f776a19dda6f7/core-async-examples/project.clj | clojure | (defproject core-async-examples "0.1.0"
:description "Examples using core.async with clojurescript"
:url "-examples"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2505"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]... | |
53d5a3776c34b29f1f2cf9f9e885769b7d1f693b713596685780e4bc808e7cc4 | spl/ivy | yices_solver_test.ml |
open Printf
module Y = Yices
let test () =
(*Y.enable_type_checker true;
Y.set_arith_only true;*)
let yc = Y.mk_context () in
let intType = Y.mk_type yc "int" in
let x = Y.mk_var_decl yc "x" intType in
let y = Y.mk_var_decl yc "y" intType in
let xe = Y.mk_var_from_decl yc x in
let ye ... | null | https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/deputy/optimizer/solver/yicesSolver/yices_solver_test.ml | ocaml | Y.enable_type_checker true;
Y.set_arith_only true;
let e = Y.mk_not yc xpygtten in
let e = Y.mk_gt yc xe (Y.mk_num yc 10) in
XXX: why doesn't this work??? |
open Printf
module Y = Yices
let test () =
let yc = Y.mk_context () in
let intType = Y.mk_type yc "int" in
let x = Y.mk_var_decl yc "x" intType in
let y = Y.mk_var_decl yc "y" intType in
let xe = Y.mk_var_from_decl yc x in
let ye = Y.mk_var_from_decl yc y in
let ten = Y.mk_num yc 10 in
... |
cb544742552e0c309ba0600091860babc2a99418c5f754a144d4e0b51b22b247 | tonyrog/canopen | co_objdef.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2017 ,
%%% @doc
%%% object definition database
%%% @end
Created : 11 Oct 2016 by < >
%%%-------------------------------------------------------------------
-module(co_objdef).
-behaviour(gen_server).
%% API
-ex... | null | https://raw.githubusercontent.com/tonyrog/canopen/b76c0c3503e3087cc7511fe5795e6053702d449e/src/co_objdef.erl | erlang | -------------------------------------------------------------------
@doc
object definition database
@end
-------------------------------------------------------------------
API
gen_server callbacks
test
debug
===================================================================
API
===========================... | @author < >
( C ) 2017 ,
Created : 11 Oct 2016 by < >
-module(co_objdef).
-behaviour(gen_server).
-export([start_link/0]).
-export([object/1, object/3]).
-export([entry/2, entry/4]).
-export([enum/1, enum/3]).
-export([next/1, prev/1]).
-export([add_object/3, add_enum/3, add_index/4]).
-export([lookup_... |
937fe96b8c2d60d0e0d9370a8552a125c8174c0ac0aa43992cc3f71d813376fe | nikita-volkov/graph-db | GraphDB.hs | -- |
-- The API is based on multiple monads and monad transformers:
--
-- * 'Session'.
-- A class of monad transformers,
-- which execute transactions and run the server.
--
-- * 'Read' and 'Write' transactions.
-- Monads,
which execute granular updates or reads on the database with ACID guarantees .
--
The li... | null | https://raw.githubusercontent.com/nikita-volkov/graph-db/3e886f6b298d2b2b09eb94c2818a7b648f42cb0a/library/GraphDB.hs | haskell | |
The API is based on multiple monads and monad transformers:
* 'Session'.
A class of monad transformers,
which execute transactions and run the server.
* 'Read' and 'Write' transactions.
Monads,
* A 'Persistent.PersistentSession' over an in-memory data structure.
* A 'Client.ClientSession',
w... | which execute granular updates or reads on the database with ACID guarantees .
The library provides three types of sessions :
* A ' Nonpersistent . NonpersistentSession ' over an in - memory data structure .
All the IO failures are encoded in the results of monad transformers .
module GraphDB
(
Session,
Non... |
5ab0d5efd2f20e2d8bf59f77dae6affa0434e162ae9dc9c8bf7a7fc9d1fdf14d | neil-lindquist/linear-programming | expressions.lisp |
(uiop:define-package :linear-programming/expressions
(:use :cl
:iterate
:linear-programming/conditions)
(:import-from :alexandria
#:if-let
#:plist-alist)
(:export #:scale-linear-expression
#:sum-linear-expressions
#:parse-linear-expression
... | null | https://raw.githubusercontent.com/neil-lindquist/linear-programming/868eb79bcd49903e6d49fbbc80177cbdd21ad9b9/src/expressions.lisp | lisp | atoms
lists
low-level specifiers
arithmetic
Unknown functions
Unknown objecects |
(uiop:define-package :linear-programming/expressions
(:use :cl
:iterate
:linear-programming/conditions)
(:import-from :alexandria
#:if-let
#:plist-alist)
(:export #:scale-linear-expression
#:sum-linear-expressions
#:parse-linear-expression
... |
4f7db63cf469668e21adc5de6d3057c8b3513564acdef4c2da7a8ac8bf401bfb | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2021.M03.D02.Solution where
import Y2021.M03.D01.Solution
-
Yesterday we approved a set of aliased wineries , ending up with a
Map Idx Winery
set of approved aliases .
Today , we 're going to store the results in the graph .
But what does that mean ?
1 . We... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M03/D02/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
}
for wineries
country-alias resolver
in the graph-store do not?
... Wait. I meant to say 'aliased countries.'
}
}
QNames?
of course, we need to translate the rows returned to Map-entries
}
we also need to map the alias to the graph-winery
update the graph-winery nodes ... |
module Y2021.M03.D02.Solution where
import Y2021.M03.D01.Solution
-
Yesterday we approved a set of aliased wineries , ending up with a
Map Idx Winery
set of approved aliases .
Today , we 're going to store the results in the graph .
But what does that mean ?
1 . We need to update the graph - winery ... |
fa3c411103c08ba5593aad2d60d5be8483ac34c1099a79239023db010b19d4c6 | clash-lang/clash-compiler | Fifo.hs | # LANGUAGE ScopedTypeVariables #
module Fifo where
import Clash.Prelude
type Elm = Unsigned 8
type Pntr n = Unsigned (n + 1)
type Elms = Vec 4 Elm
fifo :: forall n e . (KnownNat n, KnownNat (n+1), KnownNat (n+1+1)
,KnownNat (n+1+2), KnownNat (2^n))
=> (Pntr n, Pntr n, Vec (2^n) e)
-> ... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/examples/Fifo.hs | haskell | fill up fifo firs then empty it again
Expected value for different testdata inputs | # LANGUAGE ScopedTypeVariables #
module Fifo where
import Clash.Prelude
type Elm = Unsigned 8
type Pntr n = Unsigned (n + 1)
type Elms = Vec 4 Elm
fifo :: forall n e . (KnownNat n, KnownNat (n+1), KnownNat (n+1+1)
,KnownNat (n+1+2), KnownNat (2^n))
=> (Pntr n, Pntr n, Vec (2^n) e)
-> ... |
9a883cfb01f19728c781871f8b57a2b730a170ab458e50ef9582d0c8253ad0f9 | crate/craterl | craterl_url.erl | %%%-------------------------------------------------------------------
( C ) 2014 , CRATE Technology GmbH
Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor
%%% license agreements. See the NOTICE file distributed with this work for
%%% additional information regarding copyright ownershi... | null | https://raw.githubusercontent.com/crate/craterl/2b90bf61c3c3a0a62e82f8c1710d7825c879fb10/src/craterl_url.erl | erlang | -------------------------------------------------------------------
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. Crate licenses
obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, sof... | ( C ) 2014 , CRATE Technology GmbH
Licensed to CRATE Technology GmbH ( " Crate " ) under one or more contributor
this file to you under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License . You may
distributed under the License is distribut... |
2b76a652817ac1a97f7a2ea1d67a11778e4b430e4ed333c79fed10ba1c1f1222 | janestreet/learn-ocaml-workshop | problem.mli | open! Base
type 'a option =
| None
| Some of 'a
val safe_divide : dividend:int -> divisor:int -> int option
val option_concatenate : string option -> string option -> string option
val concatenate : ?separator : string -> string -> string -> string
| null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/15-options/problem.mli | ocaml | open! Base
type 'a option =
| None
| Some of 'a
val safe_divide : dividend:int -> divisor:int -> int option
val option_concatenate : string option -> string option -> string option
val concatenate : ?separator : string -> string -> string -> string
| |
e3a13fa0af59a82886f294dfec76bf6d17293cd41424d4aab8e2e9ed9eff38a8 | replikativ/datahike | time_variance_test.cljc | (ns datahike.test.time-variance-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
#?(:cljs [datahike.cljs :refer [Throwable]])
[datahike.constants :as const]
[datahike.db.interface :as ... | null | https://raw.githubusercontent.com/replikativ/datahike/3625234370d336aa7e4caa77ec07566d340ca910/test/datahike/test/time_variance_test.cljc | clojure | => #'datahike.test.time-variance/test-no-duplicates-with-cardinality-many
| (ns datahike.test.time-variance-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
#?(:cljs [datahike.cljs :refer [Throwable]])
[datahike.constants :as const]
[datahike.db.interface :as ... |
e039fe2252c4eeb50ea46c531d2fb1304c3582675ecb4b5386181fef788b0ebe | graninas/Hydra | SqlDBSpec.hs | # LANGUAGE FunctionalDependencies #
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE TemplateHaskell #-}
module Hydra.Tests.Integration.SqlDBSpec where
import Hydra.Prelude
import Test.Hspec
import Database.Beam
import qualified Database.Beam as B
import qualified Database.Be... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/test/Hydra/Tests/Integration/SqlDBSpec.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE TemplateHaskell #
TODO: deinit conn here
Sample of autoincrement:
$ B.insertExpressions [ (B.val_ meteorDB) { CatDB._id = B.default_ } ] | # LANGUAGE FunctionalDependencies #
module Hydra.Tests.Integration.SqlDBSpec where
import Hydra.Prelude
import Test.Hspec
import Database.Beam
import qualified Database.Beam as B
import qualified Database.Beam.Query as B
import qualified Database.Beam.Sqlite as BS
import Datab... |
0b853292e54b2bca45382f645880c9ad4246338fd7ea8d98c954e238e89b51da | ngorogiannis/cyclist | frontend.ml | open Lib
module Make (Prover : Prover.S) = struct
module Seq = Prover.Seq
type result_t = TIMEOUT | NOT_FOUND | SUCCESS of Prover.Proof.t
let show_proof = ref false
let latex_path = ref ""
let open_file_for_append = ref false
let timeout = ref 30
let minbound = ref 1
let maxbound = ref 11
let... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/generic/frontend.ml | ocaml | open Lib
module Make (Prover : Prover.S) = struct
module Seq = Prover.Seq
type result_t = TIMEOUT | NOT_FOUND | SUCCESS of Prover.Proof.t
let show_proof = ref false
let latex_path = ref ""
let open_file_for_append = ref false
let timeout = ref 30
let minbound = ref 1
let maxbound = ref 11
let... | |
fc9571e9d62b6decb183f920ba78b6bff3646f8584d25125ea01f0b9a7ad45a2 | rsharifnasab/my-learning | Boool.hs | module Boool where
and2 :: Bool -> Bool -> Bool
and2 x y = (&&) x y
andT :: Bool -> Bool
andT x = x
andF :: Bool -> Bool
andF x = False
mand :: Bool -> Bool -> Bool
mand x y =
if x
then andT y
else andF y
| null | https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/4-dataTypes/Boool.hs | haskell | module Boool where
and2 :: Bool -> Bool -> Bool
and2 x y = (&&) x y
andT :: Bool -> Bool
andT x = x
andF :: Bool -> Bool
andF x = False
mand :: Bool -> Bool -> Bool
mand x y =
if x
then andT y
else andF y
| |
0dffff721bddd85bce71ae4339f9e51f4ecfd9f9dcf484697289c7513cca9bad | clojure/clojurescript | type_inference_tests.clj | (ns cljs.type-inference-tests
(:require
[cljs.analyzer :as ana]
[cljs.analyzer-tests :refer [analyze test-env test-cenv]]
[cljs.env :as env]
[cljs.test-util :refer [unsplit-lines]]
[clojure.test :refer [is are deftest testing]]))
(deftest basic-inference
(is (= (env/with-compiler-env test-cenv
... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/clojure/cljs/type_inference_tests.clj | clojure | should always infer 'function as tag
methods should have inferred types
has changed, why does this return #{clj any} ?
(is (= (env/with-compiler-env test-cenv
(:tag (analyze test-env '(assoc nil :foo :bar))))
'clj))
will only work if the previous test works | (ns cljs.type-inference-tests
(:require
[cljs.analyzer :as ana]
[cljs.analyzer-tests :refer [analyze test-env test-cenv]]
[cljs.env :as env]
[cljs.test-util :refer [unsplit-lines]]
[clojure.test :refer [is are deftest testing]]))
(deftest basic-inference
(is (= (env/with-compiler-env test-cenv
... |
2f5789e38c0432138799686c9d167c5fbe03eeb6875e55fad8b60efe7c271c34 | tlaplus/tlapm | lltoisar.ml | Copyright 2008 INRIA
open Printf;;
open Expr;;
open Llproof;;
open Misc;;
open Namespace;;
module Dict = Set.Make (String);;
let rec dict_addlist l d =
match l with
| [] -> d
| h::t -> dict_addlist t (Dict.add h d)
;;
let dict_add x d = Dict.add x d;;
let dict_mem x d = Dict.mem x d;;
let dict_empty = D... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/lltoisar.ml | ocaml | args
args
see also arith.intrange below
| "arith.power" -> " ^ " not defined yet
see is_infix below
see arith.natrange above
FIXME TODO
FIXME TODO
FIXME TODO | Copyright 2008 INRIA
open Printf;;
open Expr;;
open Llproof;;
open Misc;;
open Namespace;;
module Dict = Set.Make (String);;
let rec dict_addlist l d =
match l with
| [] -> d
| h::t -> dict_addlist t (Dict.add h d)
;;
let dict_add x d = Dict.add x d;;
let dict_mem x d = Dict.mem x d;;
let dict_empty = D... |
e3cbabb41ec79719bf696132caa5c29eb94c5dcc753491889495883d9aaa9e5f | ktakashi/sagittarius-scheme | markdown.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; text/markdown.scm - Markdown utilities
;;;
Copyright ( c ) 2010 - 2015 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1.... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/946948050fa16ca79c7649187d140a5c4ef53c39/sitelib/text/markdown.scm | scheme | coding : utf-8 -*-
text/markdown.scm - Markdown utilities
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of ... | Copyright ( c ) 2010 - 2015 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (text markdown)
(ex... |
9daccb91218ead8bb8ca956e8a149e4246c1ab1d8797dc9c581689e659de90b7 | skanev/playground | 02.scm | SICP exercise 2.02
;
; Consider the problem of representing line segments in a plane. Each segment
; is represented as a pair of points: a starting point and an ending point.
; Define a constructor make-segment and selectors start-segment and end-segment
; that define the representation of segments in terms of points... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/02.scm | scheme |
Consider the problem of representing line segments in a plane. Each segment
is represented as a pair of points: a starting point and an ending point.
Define a constructor make-segment and selectors start-segment and end-segment
that define the representation of segments in terms of points. Furthermore, a
point ca... | SICP exercise 2.02
(define (make-point x y)
(cons x y))
(define (x-point point)
(car point))
(define (y-point point)
(cdr point))
(define (make-segment start-point end-point)
(cons start-point end-point))
(define (start-segment segment)
(car segment))
(define (end-segment segment)
(cdr segment))
(d... |
f16cd72ad25bce6fb369ff1a8f829433dbd78b72fac01b12eb814bb0deb0a619 | 05st/capri | Monomorphize.hs | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Monomorphize where
import qualified Data.Map as M
import qualified Data.Text as T
import Data.Maybe
import Data.List
import Data.Either.Combinators
import Data.Generics.Uniplate.Data
import Control.Monad.State
import Control.Monad.Except
import Text.Megapars... | null | https://raw.githubusercontent.com/05st/capri/516883dbf9d882ab3c545a3568f283242a30837e/src/Monomorphize.hs | haskell | Should never occur
Should never occur | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Monomorphize where
import qualified Data.Map as M
import qualified Data.Text as T
import Data.Maybe
import Data.List
import Data.Either.Combinators
import Data.Generics.Uniplate.Data
import Control.Monad.State
import Control.Monad.Except
import Text.Megapars... |
b9b0c83eac4f23a6a121ecfe5a50c238830236134f0310f04795b673a677a499 | jixiuf/helloerlang | ppool_worker_sup.erl | -module(ppool_worker_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/1]).
start_link(MFA={_,_,_})->
io:format("ppool_worker_sup is starting ...~n",[]),
supervisor:start_link({local,pool_worker_super},?MODULE,MFA)
.
init({M,F,A})->
io:format("ppool_worker_sup initing...~n",[]),
Max... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/ppool-1.1/src/ppool_worker_sup.erl | erlang | id
Local Variables:
End: | -module(ppool_worker_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/1]).
start_link(MFA={_,_,_})->
io:format("ppool_worker_sup is starting ...~n",[]),
supervisor:start_link({local,pool_worker_super},?MODULE,MFA)
.
init({M,F,A})->
io:format("ppool_worker_sup initing...~n",[]),
Max... |
af9008f46210385ae1159477c27e29a73de1cfce7111e25361192ab84283912a | minio/minio-hs | GetObject.hs | #!/usr/bin/env stack
-- stack --resolver lts-14.11 runghc --package minio-hs
--
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
... | null | https://raw.githubusercontent.com/minio/minio-hs/d59f45fec4481313cfb5fafd635558ce385e7422/examples/GetObject.hs | haskell | stack --resolver lts-14.11 runghc --package minio-hs
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.
S... | #!/usr/bin/env stack
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
import qualified Data.Conduit as C
import qualified Data.Conduit.Binary as CB
import Network.Minio
im... |
dcadd1554ebeed9d182a727655dc85b3b15e91e6211d121c23aec15a8a202e66 | open-company/open-company-web | emoji_picker.cljs | (ns oc.web.components.ui.emoji-picker
(:require [rum.core :as rum]
[oc.web.lib.utils :as utils]
[oc.web.utils.rum :as rutils]
[oc.web.mixins.ui :refer (on-window-click-mixin)]
[oc.lib.cljs.useragent :as ua]
[oc.web.utils.dom :as dom-utils]
[goog.... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/components/ui/emoji_picker.cljs | clojure | Enabled when:
active element is emojiable and active element is descendant of container
===== D3 Chart Component =====
Render an emoji button that reveal a picker for emoji.
It will add the selected emoji in place of the current selection if
the current activeElement has the class `emojiable`. | (ns oc.web.components.ui.emoji-picker
(:require [rum.core :as rum]
[oc.web.lib.utils :as utils]
[oc.web.utils.rum :as rutils]
[oc.web.mixins.ui :refer (on-window-click-mixin)]
[oc.lib.cljs.useragent :as ua]
[oc.web.utils.dom :as dom-utils]
[goog.... |
ce17410c51d878154ba250f2f0b8e99037f74f33f80b2230a4233109b2372dc3 | TrustInSoft/tis-kernel | print_interface.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/print_api/print_interface.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
3d5d1045085a7c20549c57cd0a0a766fdb4a12d08f5544dbf77aaf624a3b6015 | webyrd/quines | q.scm | (load "mk.scm")
(define eval-expo
(lambda (exp env val)
(conde
((fresh (v)
(== `(quote ,v) exp)
(not-in-envo 'quote env)
(noo 'closure v)
(== v val)))
((fresh (a*)
(== `(list . ,a*) exp)
(not-in-envo 'list env)
(noo 'closure a*)
... | null | https://raw.githubusercontent.com/webyrd/quines/35436bd5b6edc63827058e0b1bf7b85d30cbde7d/q.scm | scheme | (load "mk.scm")
(define eval-expo
(lambda (exp env val)
(conde
((fresh (v)
(== `(quote ,v) exp)
(not-in-envo 'quote env)
(noo 'closure v)
(== v val)))
((fresh (a*)
(== `(list . ,a*) exp)
(not-in-envo 'list env)
(noo 'closure a*)
... | |
3dfef877c14c9be86a97fbbe996bb4cfb24dbeb91f57968d60d8f6d4154233c5 | fortytools/holumbus | Html.hs | # OPTIONS #
-- ------------------------------------------------------------
module Holumbus.Crawler.Html
where
import Data.Function.Selector
import Data.List
import Data.Maybe
import Holumbus.Crawler.Types
import Holumbus.Crawler.URIs
import System.FileP... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Holumbus-Searchengine/src/Holumbus/Crawler/Html.hs | haskell | ------------------------------------------------------------
just for debugging
import qualified Debug.Trace as D
--
------------------------------------------------------------
------------------------------------------------------------
| Collect all HTML references to other documents within ... | # OPTIONS #
module Holumbus.Crawler.Html
where
import Data.Function.Selector
import Data.List
import Data.Maybe
import Holumbus.Crawler.Types
import Holumbus.Crawler.URIs
import System.FilePath
import Text.XML.HXT.Core hiding ( wh... |
08cc3cc10741fce3e31629e8f545ebf2cc65c4bb8d1a76f7a741cae7ffabb90c | TOTBWF/teenytt | Splice.hs | -- | Splicing of Values.
module TeenyTT.Core.Splice
( Splice
, val
, tp
, term
, compile
) where
import Control.Monad.Primitive
import TeenyTT.Base.Env qualified as Env
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Core.TermBuilder (TB)
import TeenyTT.... | null | https://raw.githubusercontent.com/TOTBWF/teenytt/a45162254b4b3c056b1607f4759bd608fd355165/src/TeenyTT/Core/Splice.hs | haskell | | Splicing of Values.
| A 'Splice' gives us a means of building terms
in the semantic domain, while avoiding having to do
We do so by building terms that contain only variables,
and then tracking all the terms/types we've "spliced"
in an environment.
| Splice a 'D.Term'. | module TeenyTT.Core.Splice
( Splice
, val
, tp
, term
, compile
) where
import Control.Monad.Primitive
import TeenyTT.Base.Env qualified as Env
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Core.TermBuilder (TB)
import TeenyTT.Core.TermBuilder qualifie... |
447fd7b981b092b07f02a9821ae2323fb3f88757d53029f31ad3dda9932454eb | jship/monad-logger-aeson | MetadataYesThreadContextNo.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module TestCase.LogWarn.MetadataYesThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson ((.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logWarn)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Ti... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/268ece4d43bd59d727e0515c2f47980d42042224/monad-logger-aeson/test-suite/TestCase/LogWarn/MetadataYesThreadContextNo.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module TestCase.LogWarn.MetadataYesThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson ((.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logWarn)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTCTime(..))
import TestCase (T... |
06007f5cd70d472c4bf255486c39929727f719db9d3936bd3b1aebb163f299ea | onedata/op-worker | atm_parallel_runner.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Convenience functions for parallel... | null | https://raw.githubusercontent.com/onedata/op-worker/0b059f432df26a54f372f7d4b99a40ffca5f802a/src/modules/automation/utils/atm_parallel_runner.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Convenience functions for parallel code execution in automation related modules.
Those from lists_utils have serious flaws like waiting for all processes
to end even if... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
TODO VFS-8395 Do not use lists_utils but rather write custom pmap / pforeach .
-module(atm_parallel_runner).
-author("Lukasz Opiola").
-include("modules/automation/atm_execution.hrl").
-include_l... |
de1e27a5354108ffd0ad3a9e979df385bdfab0a89336a157d4432889f631fb6f | autolwe/autolwe | Test_Singular.ml | open CAS
open Expr
open ExprSyntax
open Type
open Util
module F = Format
let main =
let vs = Vsym.mk "x" mk_Fq in
let v = mk_V vs in
let gv = Groupvar.mk "1" in
let h = Hsym.mk "h" (mk_G gv) mk_Fq in
let e = ((v +: (fint 2)) /: ((fpow v 2) -: (fint 4))) +: mk_H h (mk_GGen gv) in
F.printf "%a\n" pp_exp (n... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Test/Test_Singular.ml | ocaml | open CAS
open Expr
open ExprSyntax
open Type
open Util
module F = Format
let main =
let vs = Vsym.mk "x" mk_Fq in
let v = mk_V vs in
let gv = Groupvar.mk "1" in
let h = Hsym.mk "h" (mk_G gv) mk_Fq in
let e = ((v +: (fint 2)) /: ((fpow v 2) -: (fint 4))) +: mk_H h (mk_GGen gv) in
F.printf "%a\n" pp_exp (n... | |
5702869a838069ca262731c0b76b8946edc15e5e386ec22eb663c7ed6b6fcf92 | chef/chef-server | oc_chef_cookbook_artifact_version.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright 2015 Chef Software , Inc. Some Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compl... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_authz/src/oc_chef_cookbook_artifact_version.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
chef_object... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright 2015 Chef Software , Inc. Some Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the Licens... |
3b0fe3da5898730957def3b32fe85a31498a16202ede1e45c140375c5d2135a3 | halgari/mjolnir | jna_bench.clj | (ns examples.jna-bench
(:require [criterium.core :as crit])
(:import [com.sun.jna Native Pointer Memory Function Platform]))
(set! *warn-on-reflection* true)
(defn cos-invoke ^Function []
(com.sun.jna.Function/getFunction Platform/C_LIBRARY_NAME "cos"))
(defn -main []
(let [f (cos-invoke)]
(crit/quick-b... | null | https://raw.githubusercontent.com/halgari/mjolnir/cfb82a55bc316a6a0e235b46f6ee04c6b55c8cc5/src/examples/jna_bench.clj | clojure | (ns examples.jna-bench
(:require [criterium.core :as crit])
(:import [com.sun.jna Native Pointer Memory Function Platform]))
(set! *warn-on-reflection* true)
(defn cos-invoke ^Function []
(com.sun.jna.Function/getFunction Platform/C_LIBRARY_NAME "cos"))
(defn -main []
(let [f (cos-invoke)]
(crit/quick-b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.