_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 |
|---|---|---|---|---|---|---|---|---|
b502b673eda1861f63e34ace1e8beb57222c1ef839bb49825a01a37e15294fee | fp-works/2019-winter-Haskell-school | TestFibonacci.hs | import Fibonacci
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec $ do
describe "fibs1" $ do
it "the first few values should be correct" $ do
take 13 fibs1 `shouldBe` [0,1,1,2,3,5,8,13,21,34,55,89,144]
describe "fibs2" $ do
it "should have [0,1] as the first two elements" $ do
... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week6/zhansongl/TestFibonacci.hs | haskell | import Fibonacci
import Test.Hspec
import Test.QuickCheck
main :: IO ()
main = hspec $ do
describe "fibs1" $ do
it "the first few values should be correct" $ do
take 13 fibs1 `shouldBe` [0,1,1,2,3,5,8,13,21,34,55,89,144]
describe "fibs2" $ do
it "should have [0,1] as the first two elements" $ do
... | |
88b00c7254335b2fa183ee889fcc4d01994e7fe9b55fc33b0f04da439f372af9 | manavpatnaik/haskell | 28_is_num_prime.hs | factors1 n = [x | x <- [1..n`div`2], n `mod` x == 0] ++ [n]
isPrime :: Int -> Bool
isPrime n = length (factors1 n) == 2
main = do
print(isPrime 2)
print(isPrime 3)
print(isPrime 4)
print(isPrime 5)
print(isPrime 6)
print(isPrime 7) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/9995a9e13c92a4daa3e6697aceebf6f41c0cb796/basic-programs/28_is_num_prime.hs | haskell | factors1 n = [x | x <- [1..n`div`2], n `mod` x == 0] ++ [n]
isPrime :: Int -> Bool
isPrime n = length (factors1 n) == 2
main = do
print(isPrime 2)
print(isPrime 3)
print(isPrime 4)
print(isPrime 5)
print(isPrime 6)
print(isPrime 7) | |
772d1c90b7e34de9b4b1518b1f897580088934fff47e6fd8e7b9f448c3563e05 | backtracking/mlpost | unionfind.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/unionfind.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
This is code which has been taken from
( * : a generic graph library for OCaml ... |
97b9c9a426ac1a08a10bead23cfd6e3ac613ebda0005c09537e8bba940cb5415 | fused-effects/diffused-effects | Internal.hs | # LANGUAGE GADTSyntax #
# LANGUAGE KindSignatures #
module Effect.Throw.Internal
( Throw(..)
) where
import Data.Kind (Type)
data Throw e (m :: Type -> Type) k where
Throw :: e -> Throw e m a
| null | https://raw.githubusercontent.com/fused-effects/diffused-effects/83e070da3232d9a909e06d775f3f245eabb70a84/src/Effect/Throw/Internal.hs | haskell | # LANGUAGE GADTSyntax #
# LANGUAGE KindSignatures #
module Effect.Throw.Internal
( Throw(..)
) where
import Data.Kind (Type)
data Throw e (m :: Type -> Type) k where
Throw :: e -> Throw e m a
| |
3717e257ba09f527d0d2b9d2f7e3e5198d1df3ae3a2f4f98f886839fa58b1062 | pedropramos/PyonR | info.rkt | #lang info
(define collection "python")
(define compile-omit-paths (list "examples" "test"))
(define deps '("base"
"parser-tools"
"compatibility-lib"
"srfi-lite-lib"))
| null | https://raw.githubusercontent.com/pedropramos/PyonR/16edd14f3950fd5a01f8b0237e023536ef48d17b/info.rkt | racket | #lang info
(define collection "python")
(define compile-omit-paths (list "examples" "test"))
(define deps '("base"
"parser-tools"
"compatibility-lib"
"srfi-lite-lib"))
| |
65b513d918d81a85d0be12b283dbb7e9640c4e0b0ef50234a30c0dde23e016ae | racket/rhombus-prototype | grammar-s-exp.rkt | #lang at-exp racket/base
(require scribble/bnf
scribble/manual)
(provide shrubbery_s_expression_grammar)
(define shrubbery_s_expression_grammar
(BNF (list @nonterm{parsed}
@racket[(top @#,nonterm{group} ...)])
(list @nonterm{group}
@racket[(group @#,nonterm{term} ... @#,non... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/f21679842c56b0841b156dde6b389e0366f15532/shrubbery/scribblings/grammar-s-exp.rkt | racket | #lang at-exp racket/base
(require scribble/bnf
scribble/manual)
(provide shrubbery_s_expression_grammar)
(define shrubbery_s_expression_grammar
(BNF (list @nonterm{parsed}
@racket[(top @#,nonterm{group} ...)])
(list @nonterm{group}
@racket[(group @#,nonterm{term} ... @#,non... | |
be1d35eb877bfdbcf38efcd318c48fc5b597b3cfb7daf364baf0023e9ffca8b8 | gotthardp/lorawan-server | lorawan_control.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_control).
-export([backup/1, restore/1, stop/0]).
backup(Name) ->
invoke(mnesia, backup, [Name]).
restore(Name) ->
invoke(mnesia, restore, [Name, [{default... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_control.erl | erlang |
All rights reserved.
end of file | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_control).
-export([backup/1, restore/1, stop/0]).
backup(Name) ->
invoke(mnesia, backup, [Name]).
restore(Name) ->
invoke(mnesia, restore, [Name, [{default_op, recreate_tables}]]).
... |
0cbedef8a87d3bd89a7155b047de7f09e1ef442594079204cecbefc31c20cf43 | timbod7/haskell-chart | Grid.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.Chart.Grid
Copyright : ( c ) 2010 , 2014
-- License : BSD-style (see chart/COPYRIGHT)
--
-- A container type for values that can be composed by horizonal
-- and vertical layout.
module ... | null | https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/chart/Graphics/Rendering/Chart/Grid.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Rendering.Chart.Grid
License : BSD-style (see chart/COPYRIGHT)
A container type for values that can be composed by horizonal
and vertical layout.
| When more space is available for an item than the total wi... | Copyright : ( c ) 2010 , 2014
module Graphics.Rendering.Chart.Grid (
Grid, Span, SpaceWeight,
tval, tspan,
empty, nullt,
(.|.), (./.),
above, aboveN,
beside, besideN,
overlay,
width, height,
gridToRenderable,
weights,
aboveWide,
wideAbove,
tallBeside,
be... |
20f9eada2c64faddc1c10ae3e625099d5eded30b36a4756dc73ad371fdd1b95a | Gandalf-/coreutils | Split.hs | {-# LANGUAGE OverloadedStrings #-}
module Coreutils.Split where
-- split
--
-- break a file into chunks by line count, byte count, or figure out the size based on a
-- goal
import Control.Monad
import Coreutils.Util
import qualified Data.ByteString.Lazy as L
import Data.Char
import ... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/9ebe7b3897b97ee635d866f8cc651a74338001c8/Coreutils/Split.hs | haskell | # LANGUAGE OverloadedStrings #
split
break a file into chunks by line count, byte count, or figure out the size based on a
goal
what kinds of splits are we doing?
parse arguments and check for obvious errors
take the filename, acquire a handle and determine it's size
switchboard
simplest split, just by byte ra... |
module Coreutils.Split where
import Control.Monad
import Coreutils.Util
import qualified Data.ByteString.Lazy as L
import Data.Char
import Data.Int
import Data.List
import System.Console.GetOpt
import System.Exit
import System.IO
import... |
195e51aac7a8f901c153cd4709959f4742033177ab8d6a25b2260df54e467dd7 | SonyCSLParis/BENG | constituent-analysis.lisp | Copyright 2019 Sony Computer Science Laboratories Paris
( )
;;; 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 , version 3 of the License .
;;;
;;; This pr... | null | https://raw.githubusercontent.com/SonyCSLParis/BENG/1eb525e132d2b1f74ae18532657561725f6fbb78/experts/constituent-analysis.lisp | lisp | This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more... | Copyright 2019 Sony Computer Science Laboratories Paris
( )
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 of the License .
You should have received a copy of the GNU General Public License
(in-package :beng)
(def... |
c6743c41eec35b63b03bb628b58cbaa03bd541dcceabc372f38c9e31c2cd0acf | dparis/gen-phzr | sound_manager.cljs | (ns phzr.impl.accessors.sound-manager)
(def sound-manager-get-properties
{:channels "channels"
:connect-to-master "connectToMaster"
:context "context"
:game "game"
:mute "mute"
:no-audio "noAudio"
:on-mute "onMute"
:on-sound-decode "onSoundDecode"
:on-un-mute "onUnMute"
:on-volume-change "... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/sound_manager.cljs | clojure | (ns phzr.impl.accessors.sound-manager)
(def sound-manager-get-properties
{:channels "channels"
:connect-to-master "connectToMaster"
:context "context"
:game "game"
:mute "mute"
:no-audio "noAudio"
:on-mute "onMute"
:on-sound-decode "onSoundDecode"
:on-un-mute "onUnMute"
:on-volume-change "... | |
268e78bebe773c585e66639fb4e37f3dc5419f21ba07544962e50d4415269f4d | Th30n/cl-shake | package.lisp | 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 2 of the License , or
;;;; (at your option) any later version.
;;;;
;;;; This program is distribu... | null | https://raw.githubusercontent.com/Th30n/cl-shake/80550dba138fee977bf2f6deb62739dc7f381216/shake/package.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | Copyright ( C ) 2017
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License along
51 Franklin Street , Fifth Floor , Boston , USA .
(in-package #:cl-user)
(defpackage #:shake.debug
(:use #:cl #:alexandria #:shake-utils)
... |
d629d141f56b6164c2795ef87560077e299a76eb417ba20cdb93b4e08397c0fd | mbutterick/brag | top-level-cut-3.rkt | #lang brag
/top : sub
@sub : "x" | null | https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/examples/top-level-cut-3.rkt | racket | #lang brag
/top : sub
@sub : "x" | |
0410b8aca3501821eb5bfbad2a33f714c2701ad2786a578d3bc6b0f5c59cad02 | fragnix/fragnix | Data.Map.Merge.Strict.hs | # LANGUAGE Haskell98 #
# LINE 1 " Data / Map / Merge / Strict.hs " #
# LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
{-# LANGUAGE Safe #-}
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE Magi... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Map.Merge.Strict.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable, StandaloneDeriving #
# LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.Map.Merge.Strict
License : BSD-style
Maintainer :
Portability : portable
maps. The key functions are 'merge' a... | # LANGUAGE Haskell98 #
# LINE 1 " Data / Map / Merge / Strict.hs " #
# LANGUAGE CPP #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE MagicHash #
... |
8ba2e77abf137c6a7ec5f8b2bc9c7c538f3827a5269a547d1e813ee275ca60a3 | unclebob/mastermindclj | code_breaker_test.clj | (ns mastermind.code-breaker-test
(:require [midje.sweet :refer :all]
[mastermind.code-breaker :refer :all]
[mastermind.code-maker :as cm]))
(facts
"Code Breaker"
(fact
"guess-to-number"
(guess-to-number [0 0 0 0]) => 0
(guess-to-number [0 0 0 1]) => 1
(guess-to-number [0 0... | null | https://raw.githubusercontent.com/unclebob/mastermindclj/278c56fa9219f1270135067505ce1cff1737bfc9/test/mastermind/code_breaker_test.clj | clojure | This was an experiment to make sure that past guesses cannot be repeated. | (ns mastermind.code-breaker-test
(:require [midje.sweet :refer :all]
[mastermind.code-breaker :refer :all]
[mastermind.code-maker :as cm]))
(facts
"Code Breaker"
(fact
"guess-to-number"
(guess-to-number [0 0 0 0]) => 0
(guess-to-number [0 0 0 1]) => 1
(guess-to-number [0 0... |
6f155d53e4ebd9e9aba11f862f1f3a64b886240905ff54e1d20b21a666cd7aad | haskell-mafia/mafia | Lock.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Mafia.Lock (
LockError(..)
, renderLockError
, getLockFile
, readLockFile
, writeLockFile
) where
import Control.Monad.Trans.Bifunctor (firstT)
import Con... | null | https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/src/Mafia/Lock.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Mafia.Lock (
LockError(..)
, renderLockError
, getLockFile
, readLockFile
, writeLockFile
) where
import Control.Monad.Trans.Bifunctor (firstT)
import Control.Monad.Trans.Either (EitherT, h... |
c6a9647a3cb754c609935fcf42a132913aa483ea3ecb7e322a8fe995885bdf2b | jwiegley/parsec-free | Eval.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Text.Parsec.Free.Eval where
import Control.Monad.Free
import Control.Monad.Trans.Class
import qualified "parsec" Text.Parsec.Char as P
import qualified "parsec" Text.Parsec.Combinato... | null | https://raw.githubusercontent.com/jwiegley/parsec-free/b8bbaaa0457e1871747af889fea4be97d20b41b1/Text/Parsec/Free/Eval.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Text.Parsec.Free.Eval where
import Control.Monad.Free
import Control.Monad.Trans.Class
import qualified "parsec" Text.Parsec.Char as P
import qualified "parsec" Text.Parsec.Combinator as P
import ... |
8737726f88e86e1acfa05362bd796b28111a7e63e6553a9728ba323d48d4e241 | kaznum/programming_in_ocaml_exercise | queue2.ml | module type QUEUE =
sig
type 'a t
val empty: 'a t
val add: 'a t -> 'a -> 'a t
val take: 'a t -> 'a * 'a t
val peek: 'a t -> 'a
exception Empty
end
;;
module Queue2 : QUEUE =
struct
type 'a t = Queue of ('a list * 'a list)
let empty = Queue([], [])
let peek = function Queue ([], _) -> raise Empty | Qu... | null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex9.3/queue2.ml | ocaml | module type QUEUE =
sig
type 'a t
val empty: 'a t
val add: 'a t -> 'a -> 'a t
val take: 'a t -> 'a * 'a t
val peek: 'a t -> 'a
exception Empty
end
;;
module Queue2 : QUEUE =
struct
type 'a t = Queue of ('a list * 'a list)
let empty = Queue([], [])
let peek = function Queue ([], _) -> raise Empty | Qu... | |
5794379b32132243132a861cff80a00ad9cc0ce8843d81adb532b04069fe79be | 3b/cl-opengl | stroke.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;; stroke.lisp --- Lisp version of stroke.c (Red Book examples)
;;;
;;; Original C version contains the following copyright notice:
Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc.
;;; ALL RIGHTS RESERVED
;;; This program demonstrates some characters of a
;;; ... | null | https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/examples/redbook/stroke.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
stroke.lisp --- Lisp version of stroke.c (Red Book examples)
Original C version contains the following copyright notice:
ALL RIGHTS RESERVED
This program demonstrates some characters of a
stroke (vector) font. The characters are represented
by display lists, which ar... | Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc.
(in-package #:cl-glut-examples)
(defclass stroke-window (glut:window)
()
(:default-initargs :width 440 :height 120 :title "stroke.lisp"
:mode '(:single :rgb)))
(defmethod glut:display-window :before ((w stroke-window))
(let ((a '(... |
3c25cddf4bc6410c6fca083cc4c2a13c6fbebeb920ebc06805e6f39b3b6439d0 | TorXakis/TorXakis | CmdLineParser.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module CmdLineParser
( optsP -- Optio... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/server/src/CmdLineParser.hs | haskell | Options parser exported for testing purposes only.
imports from `core`
| Configuration options read by the command line. |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module CmdLineParser
, CmdLineConfig ... |
5057f153e03eca66c9ac51566aa4503792d433cf23beffebc753e00917d45cb2 | haskell-CI/hackage-matrix-builder | Cli.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
-- |
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
--
module Controller.Cli where
import Prelude.Local
import Options.Generic
TODO
data Opts
= Init -- ^ "Sync worker info into database"
... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-exe/Controller/Cli.hs | haskell | # LANGUAGE OverloadedStrings #
|
^ "Sync worker info into database"
^ "Perform package index sync/update"
^ "Run scheduling server"
^ "Run HTTP server"
^ "Run computation engine"
main = print =<< getOpts | # LANGUAGE DeriveGeneric #
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
module Controller.Cli where
import Prelude.Local
import Options.Generic
TODO
data Opts
deriving (Show, Generic)
instance ParseRecord Opts
getOpts :: IO Opts
getOpts = getRecord "h... |
bed528fd2056a9e00419561b6cdc15cf9c1537c2232729fc02fafcb81aff1b20 | jackfirth/resyntax | list-shortcuts-test.rkt | #lang resyntax/testing/refactoring-test
require: resyntax/default-recommendations list-shortcuts
header:
- #lang racket/base
test: "car reverse of list not refactorable to last of list, due to imports (see issue #11)"
- (car (reverse (list 1 2 3)))
test: "first reverse of list refactorable to last of list"
----... | null | https://raw.githubusercontent.com/jackfirth/resyntax/0dc271951d63d8b3cd289802dadff8767fc097b9/default-recommendations/list-shortcuts-test.rkt | racket | #lang resyntax/testing/refactoring-test
require: resyntax/default-recommendations list-shortcuts
header:
- #lang racket/base
test: "car reverse of list not refactorable to last of list, due to imports (see issue #11)"
- (car (reverse (list 1 2 3)))
test: "first reverse of list refactorable to last of list"
----... | |
22941eb38868f5ccee164bac472d5829a144a7db1abcffa00da5783899561170 | AccelerateHS/accelerate | Spectral.hs | {-# LANGUAGE RankNTypes #-}
-- |
-- Module : Data.Array.Accelerate.Test.NoFib.Spectral
Copyright : [ 2009 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
module Data.Array.Accelerate.Test.NoFib.... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Test/NoFib/Spectral.hs | haskell | # LANGUAGE RankNTypes #
|
Module : Data.Array.Accelerate.Test.NoFib.Spectral
License : BSD3
Stability : experimental
| Copyright : [ 2009 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.Test.NoFib.Spectral (
test_spectral,
module Data.Array.Accelerate.Test.NoFib.Spectral.SMVM,
module Data.Array.Accelerate.Test.NoFib.Spectral.RadixSort,
... |
ee5eb590c8d96b1d348a1e0174b849c3c4bc67e1ef7f1f94490882907722eea3 | nachivpn/mt | b8.erl | -module(b8).
% undefined function foo2
foo() -> foo2(). | null | https://raw.githubusercontent.com/nachivpn/mt/fcffbcb770cfe0b19c189e6c8ce2ccab61062195/test/bad/b8.erl | erlang | undefined function foo2 | -module(b8).
foo() -> foo2(). |
fee22fc721966cab9fec88c9cfab1b8abbbf789410075b133be15cf443cffa7a | 8c6794b6/haskell-sc-scratch | hl.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
------------------------------------------------------------------------------
-- |
-- Module : $Header$
-... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Repl/hl.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : portable
| Environment for repl.
| Removes space characters in beginning and end of given String.
Variant of repl using type synonym
... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
Maintainer :
Module to play with repl with haskeline .
Try main , go , and goGuts to run interactive r... |
8804de288c343b0305f033901442d1fa448347ef1802d21e5b0241e0e235390c | manavpatnaik/haskell | 1.hs | import Prelude
main = do
putStrLn "Enter your address: "
x <- getLine
print("You address: " ++ x) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/bb4d09c75a2894469d870408be5b0051a225366c/practice-set-3-miscellaneous/4_strings/1.hs | haskell | import Prelude
main = do
putStrLn "Enter your address: "
x <- getLine
print("You address: " ++ x) | |
f9ac0fe85268464c0be0e297b8fe7608876d98c6e0c35415bbd9bc8afce15101 | Datomic/day-of-datomic | migration.clj | Copyright ( c ) Cognitect , Inc. 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... | null | https://raw.githubusercontent.com/Datomic/day-of-datomic/20c02d26fd2a12481903dd5347589456c74f8eeb/tutorial/migration.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file 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 ... | Copyright ( c ) Cognitect , Inc. All rights reserved .
(require
'[datomic.api :as d]
'[datomic.samples.repl :as repl]
'[datomic.samples.schema :as schema])
(def conn (repl/scratch-conn))
(def schema-map (-> (repl/resource "day-of-datomic/schema.edn")
slurp read-string))
(schema/has-attrib... |
bf7d01e306830770cc11d0dda79e5288b283beb0b2f398b444d41c1917cf311e | Kakadu/fp2022 | utils.mli | * Copyright 2021 - 2023 , andreyizrailev and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
module ListStack : sig
type 'a t
val empty : 'a t
val push : 'a -> 'a t -> 'a t
val peek : 'a t -> 'a option
val pop : 'a t -> 'a t option
val pp : (Format.formatter -> 'a -> unit) -> Format.fo... | null | https://raw.githubusercontent.com/Kakadu/fp2022/bbcc2e9752b547876b655ea5c86483cb48b6d90e/Asm4/lib/utils.mli | ocaml | Map with int keys
Map with string keys | * Copyright 2021 - 2023 , andreyizrailev and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
module ListStack : sig
type 'a t
val empty : 'a t
val push : 'a -> 'a t -> 'a t
val peek : 'a t -> 'a option
val pop : 'a t -> 'a t option
val pp : (Format.formatter -> 'a -> unit) -> Format.fo... |
4302fff0b9715b87af5bf9fd8589d5093359ffdfc15425ea3de5a5fc68d2ece8 | thheller/shadow-cljs | data.clj | (ns shadow.build.data
"generic helpers for the build data structure"
(:require
[clojure.set :as set]
[clojure.java.io :as io]
[shadow.debug :refer (?> ?-> ?->>)]
[shadow.jvm-log :as log]
[shadow.build.resource :as rc]
[cljs.tagged-literals :as tags]
[cljs.analyzer :as ana])
(:import
... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/3c98a4e009562c0087fffff13833c87aede65877/src/main/shadow/build/data.clj | clojure | FIXME: there are still lots of places that work directly with the map
that is ok for most things but makes it really annoying to change the structure of the data
this is basically just trying to create a formal API for the data
keeping entries per ns since they might be relative
so the same alias might have differ... | (ns shadow.build.data
"generic helpers for the build data structure"
(:require
[clojure.set :as set]
[clojure.java.io :as io]
[shadow.debug :refer (?> ?-> ?->>)]
[shadow.jvm-log :as log]
[shadow.build.resource :as rc]
[cljs.tagged-literals :as tags]
[cljs.analyzer :as ana])
(:import
... |
a4673d73c0b03b5be0872321751e46b9b0282cd5e086c173ccfad5820cf49dac | tchoutri/pg-entity | QQ.hs | # LANGUAGE TemplateHaskell #
|
Module : Database . PostgreSQL.Entity . Internal . QQ
Copyright : , 2021
License : MIT
Maintainer :
Stability : Experimental
A quasi - quoter for ' Field 's , supporting optional types .
There is little reason to import this module directly ; inste... | null | https://raw.githubusercontent.com/tchoutri/pg-entity/3d9a29a181c0aeabb9f70bdb422fd8ceb243e370/src/Database/PostgreSQL/Entity/Internal/QQ.hs | haskell | ← This is where we specify an optional PostgreSQL type annotation
← This is where we specify an optional PostgreSQL type annotation
Helpers | # LANGUAGE TemplateHaskell #
|
Module : Database . PostgreSQL.Entity . Internal . QQ
Copyright : , 2021
License : MIT
Maintainer :
Stability : Experimental
A quasi - quoter for ' Field 's , supporting optional types .
There is little reason to import this module directly ; inste... |
863cace738f85e1bcfd5e0a84cc1b684ddbef7f8ac9eee239b1c8bee2f496ea2 | lpeterse/koka | Simplify.hs | -----------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at ... | null | https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Core/Simplify.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
---------------------------------------------------------------------------
-----------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
Core simplification
-}
module Core.Simplify (simplify) where
import Type.Type
import Type.TypeVar
import Core.C... |
8486fbdf77d403e4ce0432d692e07aee953bb5df34a656a3335c2cbdb8a4a2ff | zero-one-group/geni | dataset_creation_test.clj | (ns zero-one.geni.dataset-creation-test
(:require
[clojure.string :refer [includes?]]
[midje.sweet :refer [facts fact =>]]
[zero-one.geni.core :as g]
[zero-one.geni.test-resources :as tr])
(:import
(org.apache.spark.sql Dataset
Row)
(org.apache.spark.sql.types StructField
... | null | https://raw.githubusercontent.com/zero-one-group/geni/f0bb380c9cb0a86e4d471a0399b1842d1603b11b/test/zero_one/geni/dataset_creation_test.clj | clojure | (ns zero-one.geni.dataset-creation-test
(:require
[clojure.string :refer [includes?]]
[midje.sweet :refer [facts fact =>]]
[zero-one.geni.core :as g]
[zero-one.geni.test-resources :as tr])
(:import
(org.apache.spark.sql Dataset
Row)
(org.apache.spark.sql.types StructField
... | |
12a66df9c2f54dadaba18450a212e8c5fc926f871b513dea696a820c08eca363 | shamazmazum/wavelet-audio | package.lisp | (defpackage wavelet-audio
(:use #:cl #:cl-wavelets #:trivial-bit-streams)
(:local-nicknames (:wav :easy-audio.wav)
(:core :easy-audio.core))
(:export #:encode-wavelet-audio
#:decode-wavelet-audio
#:open-wavelet-audio
#:write-wavelet-audio-header
#:... | null | https://raw.githubusercontent.com/shamazmazum/wavelet-audio/93d181724240de9a619c3b590a68ad651243149e/src/package.lisp | lisp | (defpackage wavelet-audio
(:use #:cl #:cl-wavelets #:trivial-bit-streams)
(:local-nicknames (:wav :easy-audio.wav)
(:core :easy-audio.core))
(:export #:encode-wavelet-audio
#:decode-wavelet-audio
#:open-wavelet-audio
#:write-wavelet-audio-header
#:... | |
e09e60661203c1a24fb6975ce6a0ca7207dc7007c51bf086b1f7f9b21317f7ab | asivitz/Hickory | StockShaders.hs | # LANGUAGE QuasiQuotes #
module Hickory.Graphics.StockShaders where
import Data.String.QM (qt)
import Data.Text (Text)
import Hickory.Graphics.Shader (loadShader, Shader)
-- These shaders likely work with different opengl versions
Known to work are : 410 , 300 es
texturedVertexShader :: String -> Text
texturedVer... | null | https://raw.githubusercontent.com/asivitz/Hickory/d871992cb0ad0d530b68dcccb8a675527f25ff18/core/Hickory/Graphics/StockShaders.hs | haskell | These shaders likely work with different opengl versions | # LANGUAGE QuasiQuotes #
module Hickory.Graphics.StockShaders where
import Data.String.QM (qt)
import Data.Text (Text)
import Hickory.Graphics.Shader (loadShader, Shader)
Known to work are : 410 , 300 es
texturedVertexShader :: String -> Text
texturedVertexShader version = [qt|
#version ${version}
in vec4 positi... |
071c1798a878ac4a5a849f8c64847f583513be27a4a0464d1d14de8f9169a19b | AshleyYakeley/Truth | Convert.hs | {-# OPTIONS -fno-warn-orphans #-}
module Pinafore.Language.Library.Convert
(
) where
import Changes.Core
import Pinafore.Base
import Pinafore.Language.Convert
import Pinafore.Language.Type
import Shapes
-- IO
instance (HasQType 'Positive a) => HasQType 'Positive (IO a) where
qType = mapPosShimWit (functi... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/ecacfea61f96a9f925606ff06020f4fbcdd37159/Pinafore/pinafore-language/lib/Pinafore/Language/Library/Convert.hs | haskell | # OPTIONS -fno-warn-orphans #
IO
View
Entity
DynamicEntity |
module Pinafore.Language.Library.Convert
(
) where
import Changes.Core
import Pinafore.Base
import Pinafore.Language.Convert
import Pinafore.Language.Type
import Shapes
instance (HasQType 'Positive a) => HasQType 'Positive (IO a) where
qType = mapPosShimWit (functionToShim "liftIO" $ liftIO @Action) qTyp... |
bdf7124f233576a097d94eeffab4c489ef2a51512a9b54d964f5b2563692a035 | pallet/awaze | s3_test.clj | (ns com.palletops.awaze.s3-test
(:require
[clojure.test :refer :all]
[com.palletops.awaze.s3 :refer :all]))
(deftest simple-test
(is (map? (list-buckets-map {:access-key "a" :secret-key "b"})))
(is (map? (set-bucket-cross-origin-configuration-map
{:access-key "a" :secret-key "b"}
... | null | https://raw.githubusercontent.com/pallet/awaze/90f1965744c4a2c5a2d87480dd3eea23ba584ed3/test/com/palletops/awaze/s3_test.clj | clojure | (ns com.palletops.awaze.s3-test
(:require
[clojure.test :refer :all]
[com.palletops.awaze.s3 :refer :all]))
(deftest simple-test
(is (map? (list-buckets-map {:access-key "a" :secret-key "b"})))
(is (map? (set-bucket-cross-origin-configuration-map
{:access-key "a" :secret-key "b"}
... | |
7a716b4ee11abf07339276beedf088d273a1d971b6e1ae20b84ad57d40bacba7 | tomprimozic/type-systems | test_infer.ml |
Parts of this file are based on code from
reference implementation of HMF , available at ( as of 2014/04/04 )
-us/um/people/daan/download/hmf-prototype-ref.zip
Parts of this file are based on code from Daan Leijen's
reference implementation of HMF, available at (as of 2014/04/04)
-us/um/people/daan/dow... | null | https://raw.githubusercontent.com/tomprimozic/type-systems/4403586a897ee94cb8f0de039aeee8ef1ecef968/first_class_polymorphism/test_infer.ml | ocaml | propagation of types |
Parts of this file are based on code from
reference implementation of HMF , available at ( as of 2014/04/04 )
-us/um/people/daan/download/hmf-prototype-ref.zip
Parts of this file are based on code from Daan Leijen's
reference implementation of HMF, available at (as of 2014/04/04)
-us/um/people/daan/dow... |
dd8d00ef3e71a2a54b6661ff60a2c61b86d39c7c9d7d30db31f169be0394552c | themetaschemer/malt | test-F-max.rkt | (module+ test
(require rackunit)
(require (only-in "../tensors.rkt" tensor))
(let ((y (tensor (tensor 0.0 0.0 1.0 0.0)
(tensor 0.0 1.0 0.0 0.0)
(tensor 1.0 0.0 0.0 0.0)
(tensor 0.0 0.0 0.0 1.0))))
(check-ρ-∇ (d-max y) (tensor 1.0 1.0 1.0 1.0)
... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/flat-tensors/ext-ops/test/test-F-max.rkt | racket | (module+ test
(require rackunit)
(require (only-in "../tensors.rkt" tensor))
(let ((y (tensor (tensor 0.0 0.0 1.0 0.0)
(tensor 0.0 1.0 0.0 0.0)
(tensor 1.0 0.0 0.0 0.0)
(tensor 0.0 0.0 0.0 1.0))))
(check-ρ-∇ (d-max y) (tensor 1.0 1.0 1.0 1.0)
... | |
f5be46e8f19ba7ebbbfaa80bc9f4db36f7298eec760f9824fc36f266a8cd11b7 | racket/racket7 | catalog-update.rkt | #lang racket/base
(require racket/format
racket/list
net/url
(prefix-in db: "../db.rkt")
"params.rkt"
"catalog.rkt"
"content.rkt"
"config.rkt"
"print.rkt"
"desc.rkt")
(provide pkg-catalog-update-local)
(define (pkg-catalog-update-local #... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/pkg/private/catalog-update.rkt | racket | set packages:
Add available module and dependency info:
If module information isn't available for a package, download
the package to fill in that information: | #lang racket/base
(require racket/format
racket/list
net/url
(prefix-in db: "../db.rkt")
"params.rkt"
"catalog.rkt"
"content.rkt"
"config.rkt"
"print.rkt"
"desc.rkt")
(provide pkg-catalog-update-local)
(define (pkg-catalog-update-local #... |
c1751149b7b5b422f33e5d26c59c15afeb5a5c7d9fe5e411cb0ce7fee25a9f61 | trchopan/scheduled-blocks | PersistReport.hs | module Application.PersistReport where
import Application.CardanoHelpers ( slotToTime )
import Application.CommonHelpers ( withStatusMessage )
import Application.HistoryBlocks ( HistoryBlocksArgs
( HistoryBlocksArgs
... | null | https://raw.githubusercontent.com/trchopan/scheduled-blocks/ce1da7e412a384c8b9fec2910b121afb295223ef/src/Application/PersistReport.hs | haskell | module Application.PersistReport where
import Application.CardanoHelpers ( slotToTime )
import Application.CommonHelpers ( withStatusMessage )
import Application.HistoryBlocks ( HistoryBlocksArgs
( HistoryBlocksArgs
... | |
800e9300a846126aef47006729abe348bb345fe656f49cf61736fe489e6e0c4b | kenreilly/clojure-example | project.clj | (defproject clojure_example "0.1.0-SNAPSHOT"
:description "An example project demonstrating how to build a REST API in Clojure"
:url ""
:license {:name "MIT"
:url "-example/blob/master/LICENSE"}
:dependencies [
[org.clojure/clojure "1.10.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/java.jdbc... | null | https://raw.githubusercontent.com/kenreilly/clojure-example/820ab83d214478e56993827f276e9c0308e02212/project.clj | clojure | (defproject clojure_example "0.1.0-SNAPSHOT"
:description "An example project demonstrating how to build a REST API in Clojure"
:url ""
:license {:name "MIT"
:url "-example/blob/master/LICENSE"}
:dependencies [
[org.clojure/clojure "1.10.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/java.jdbc... | |
9c8be7bada8f30fb9d7154b0b9dd4836f12b0327fd2e51d48ec9bc786b2461bc | informatimago/lisp | xoroshiro128.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : xoroshiro128.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Implements Xoroshiro128+ PRNG
;;;; ... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/cesarum/xoroshiro128.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Implements Xoroshiro128+ PRNG
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any lat... | FILE : xoroshiro128.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2018 - 06 - 02 < PJB > Created .
AGPL3
Copyright 2018 - 2018
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of th... |
1902f9289eeeb9c168056691da7cc43d7961bece2d0397d8f4d472cb5643e3aa | jmtd/liquorice | example2.hs | -- simple box example; default line textures
module Main where
import Liquorice.Monad
import Liquorice.Render
example = runWadL $ do
box 128 128 0 128 160
step 64 64
thing
main = buildWad "example2.wad" example
| null | https://raw.githubusercontent.com/jmtd/liquorice/907af53036c57f55909bc32c634c2a876b48c899/examples/example2.hs | haskell | simple box example; default line textures | module Main where
import Liquorice.Monad
import Liquorice.Render
example = runWadL $ do
box 128 128 0 128 160
step 64 64
thing
main = buildWad "example2.wad" example
|
983f5114d176557b84484427e28dde11cf9024409e2a4fcfc6380ef16022bc62 | onyx-platform/onyx-template | project.clj | (defproject onyx-app/lein-template "0.14.5.0"
:description "Onyx Leiningen application template"
:url "-platform/onyx-template"
:license {:name "MIT License"
:url "/#"}
:repositories {"snapshots" {:url ""
:username :env
:password :env
... | null | https://raw.githubusercontent.com/onyx-platform/onyx-template/950f4d92b70d1b313fac1b148048230ea551b13e/project.clj | clojure | (defproject onyx-app/lein-template "0.14.5.0"
:description "Onyx Leiningen application template"
:url "-platform/onyx-template"
:license {:name "MIT License"
:url "/#"}
:repositories {"snapshots" {:url ""
:username :env
:password :env
... | |
46900f8dc24c89f166402c9a08a3642b8e547ade6b1f63dc12ccec2b54028c63 | Vetd-Inc/vetd-app | a_search.cljs | (ns vetd-admin.pages.a-search
(:require [vetd-app.ui :as ui]
[vetd-app.util :as util]
[reagent.core :as r]
[re-frame.core :as rf]))
(def last-query-id (atom 0))
(defn get-next-query-id []
(swap! last-query-id inc))
(rf/reg-event-fx
:a/nav-search
(fn [{:keys [db]} _]
{:na... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/admin/vetd_admin/pages/a_search.cljs | clojure | (ns vetd-admin.pages.a-search
(:require [vetd-app.ui :as ui]
[vetd-app.util :as util]
[reagent.core :as r]
[re-frame.core :as rf]))
(def last-query-id (atom 0))
(defn get-next-query-id []
(swap! last-query-id inc))
(rf/reg-event-fx
:a/nav-search
(fn [{:keys [db]} _]
{:na... | |
950e0ebf1e65f4bd41f94225a15f00c38d0daf1065abbd45ab695de66e3669db | aiya000/haskell-examples | Mario.hs | refered to
import Control.Monad.State
--- Status
data Mario = Chibi | Deka | Die deriving(Show, Eq)
--- Value
type Shout = String
--- Productor
kinoko :: State Mario Shout
kinoko = state body -- simply notate
where body s | s == Die = ("...", Chibi)
| otherwise = ("hyahoo!!", Die)
kuribo ::... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Monad/State/Mario.hs | haskell | - Status
- Value
- Productor
simply notate
lambda abstraction
- Function | refered to
import Control.Monad.State
data Mario = Chibi | Deka | Die deriving(Show, Eq)
type Shout = String
kinoko :: State Mario Shout
where body s | s == Die = ("...", Chibi)
| otherwise = ("hyahoo!!", Die)
kuribo :: State Mario Shout
Deka -> ("mamma-mia", Chibi)
... |
0c41a0ee821bbda5251c5478e4449add00aaf2ea5011a7a1deef9395979caad6 | ghc/packages-base | Buffer.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Buffer
Copyright : ( c ) The University of Glasgow 2008
-- License : see libraries/base/LICENSE... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/GHC/IO/Buffer.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : GHC.IO.Buffer
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Buffers used in the IO system
-----------------------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Copyright : ( c ) The University of Glasgow 2008
Portability : non - portable ( GHC Extensions )
module GHC.IO.Buffer (
Buffer(..), BufferState(..), CharBuffer, CharBufElem,
newByteBuffer,
newCharBuffer,
newBuffer,
emptyBuff... |
09a1be3433d047ffc53c7bba7835b989ea434cb4f5328afaa15ed40b42b788b2 | adamConnerSax/Frames-map-reduce | Aggregation.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiPara... | null | https://raw.githubusercontent.com/adamConnerSax/Frames-map-reduce/4e762c9ff87d1e064912847c3591f75d0126a323/src/Frames/Aggregation.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
* Types
* Constraint Helpers
* Aggreg... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... |
d35aa56cc5511975c7357cd33bcbc0d26f4e50895b9e057dfc030b3da19a97b1 | xxyzz/SICP | Exercise_3_80.rkt | #lang racket/base
(require racket/stream)
(require racket/promise)
(define (integral delayed-integrand initial-value dt)
(stream-cons
initial-value
(let ([integrand (force delayed-integrand)])
(if (stream-empty? integrand)
empty-stream
(integral (delay (stream-rest integrand))
... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.5_Streams/Exercise_3_80.rkt | racket | -3.5160605800000004 | #lang racket/base
(require racket/stream)
(require racket/promise)
(define (integral delayed-integrand initial-value dt)
(stream-cons
initial-value
(let ([integrand (force delayed-integrand)])
(if (stream-empty? integrand)
empty-stream
(integral (delay (stream-rest integrand))
... |
d690d2d07bf5575d47e274def52e56645d6556a5ee8542878bec4ef310382eba | haskell/haskell-ide-engine | TypedHoles.hs | module TypedHoles where
foo :: [Int] -> Int
foo x = _ | null | https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/testdata/TypedHoles.hs | haskell | module TypedHoles where
foo :: [Int] -> Int
foo x = _ | |
752e10c7267895342c03b0eaed83b61c12c83f29cb3be5aa734d19615cd21a12 | mzp/coq-for-ipad | parser.mli | type token =
| Tident of (string)
| Tchar of (int)
| Tstring of (string)
| Taction of (Syntax.location)
| Trule
| Tparse
| Tparse_shortest
| Tand
| Tequal
| Tend
| Tor
| Tunderscore
| Teof
| Tlbracket
| Trbracket
| Tstar
| Tmaybe
| Tplus
| Tlparen
| Trparen
| Tcaret
| Tdash
... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/lex/parser.mli | ocaml | type token =
| Tident of (string)
| Tchar of (int)
| Tstring of (string)
| Taction of (Syntax.location)
| Trule
| Tparse
| Tparse_shortest
| Tand
| Tequal
| Tend
| Tor
| Tunderscore
| Teof
| Tlbracket
| Trbracket
| Tstar
| Tmaybe
| Tplus
| Tlparen
| Trparen
| Tcaret
| Tdash
... | |
fc668a5e524b21c9edc068617b428b2330327a6b229593f70dead96bccd316f1 | DavidAlphaFox/RabbitMQ | rabbit_mgmt_test_db_unit.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_db_unit.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
Cut off old sample, move to base
The same, but a bit less
Nothing nee... | The contents of this file are subject to the Mozilla 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 "
The Original Code is RabbitMQ Management Console .
The Initial Developer of the Original Cod... |
c8a609146fc378ecdb22306f162e5b0a42af31ff7b5b8e7b3ef9894cf71b5eb3 | ryanpbrewster/haskell | parsec_example_5.hs | -- parsec_example_5.hs
- A very simple , short example of parsing a CSV file ,
- taken from Real World Haskell
- A very simple, short example of parsing a CSV file,
- taken from Real World Haskell
-}
import Text.ParserCombinators.Parsec
csvFile = endBy line eol -- take `line' until you find `eol'
line = s... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/parsec/parsec_example_5.hs | haskell | parsec_example_5.hs
take `line' until you find `eol'
split up `cell' by `(char ',')' |
- A very simple , short example of parsing a CSV file ,
- taken from Real World Haskell
- A very simple, short example of parsing a CSV file,
- taken from Real World Haskell
-}
import Text.ParserCombinators.Parsec
cell = many (noneOf ",\n")
eol = char '\n'
parseCSV :: String -> Either ParseError [[Strin... |
a9a34e818a3c8e60147a48e36193642aa8093263e969a8385100ced95bffa10e | mfoemmel/erlang-otp | ex_canvas_paint.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . 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 Public Lic... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/examples/demo/ex_canvas_paint.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 2009 . 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(ex_canvas_paint).
-behaviour(wx_object).... |
d8da0601372e0c92f9dc2437b01dac5d4e22ac592c8ab75ea7b58cf362c20a95 | xinhaoyuan/morpheus | sandbox_tcp_test.erl | -module(sandbox_tcp_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
all_test_() ->
[ ?_test( dummy )
, {timeout, 120, ?_test( t_basic() )}
].
t_basic() ->
{Ctl, MRef} = morpheus_sandbox:start(
?MODULE, basic_test_entry, [],
[ monitor
... | null | https://raw.githubusercontent.com/xinhaoyuan/morpheus/a402f816a33fb5020d56f3b3e708e3835bebf23a/test/sandbox_tcp_test.erl | erlang | -module(sandbox_tcp_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
all_test_() ->
[ ?_test( dummy )
, {timeout, 120, ?_test( t_basic() )}
].
t_basic() ->
{Ctl, MRef} = morpheus_sandbox:start(
?MODULE, basic_test_entry, [],
[ monitor
... | |
be9c8b2d9d2c8a8a2283d9a08a093468f2c74ecf3449d7b22235551609459a66 | samrushing/irken-compiler | t21.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/frb.scm")
;; test tree/make macro
(let ((t (tree/make <
(1 #\t)
(2 #\f)
(3 #\l)
(4 #\a)
(5 #\b)
)))
(print t)
(tree/member t < 5)
)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t21.scm | scheme | -*- Mode: Irken -*-
test tree/make macro |
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/frb.scm")
(let ((t (tree/make <
(1 #\t)
(2 #\f)
(3 #\l)
(4 #\a)
(5 #\b)
)))
(print t)
(tree/member t < 5)
)
|
580b7213be8a188941e03b6487ed842d8d18d35489375621ee6871cc092e6474 | avsm/platform | uucp_block_data.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% NAME% % VERSION%
---------------------------------------------------------------------------
Copyrig... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/src/uucp_block_data.ml | ocaml | WARNING do not edit. This file was automatically generated. | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% NAME% % VERSION%
---------------------------------------------------------------------------
Copyrig... |
342ca45de8df867b231549894fc1fb75e89db86686310e660bdcfd0e4fd33e81 | johnwhitington/ocamli | marshal.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/stdlib/marshal.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type extern_flags =
No_sharing
| Closures
| Compat_32
external to_channel: out_channel -> 'a -> ... |
90dc62d6e49be87d01ea3ef3a38c623d5b8ee59aa4fc56cdab8879f323c74ee6 | haskell-haskey/haskey | Database.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
-- | This module implements data structures and functions related to the database.
module Database.Haskey.Alloc.Concurrent.Internal.Database where
import Control.Applicative ((<$>))
import Co... | null | https://raw.githubusercontent.com/haskell-haskey/haskey/299f070fcb0d287404d78399f903cecf7ad48cdd/src/Database/Haskey/Alloc/Concurrent/Internal/Database.hs | haskell | # LANGUAGE RankNTypes #
| This module implements data structures and functions related to the database.
| An active concurrent database.
This can be shared amongst threads.
| Lock the database.
This needs to be called manually, if you want exclusive access, before
calling either 'createConcurrentDb' or 'openCon... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Database.Haskey.Alloc.Concurrent.Internal.Database where
import Control.Applicative ((<$>))
import Control.Concurrent.STM
import Control.Monad (void, unless)
import Control.Monad.IO.Class
import Control.Monad.Cat... |
7e21615e62aa9c5fa2253ffbd97347bb6a5d63bea84801c63921d2953278f690 | cbaggers/rtg-math | consing.lisp | (in-package #:rtg-math.vector3)
;;---------------------------------------------------------------
(defn-inline make ((x single-float) (y single-float) (z single-float)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(let ((vec (make-array 3 :element-type `single-float)))
(setf (aref vec 0) x
... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/vectors/vector3/consing.lisp | lisp | ---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
... | (in-package #:rtg-math.vector3)
(defn-inline make ((x single-float) (y single-float) (z single-float)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(let ((vec (make-array 3 :element-type `single-float)))
(setf (aref vec 0) x
(aref vec 1) y
(aref vec 2) z)
vec))
(defn-inli... |
47d3e060cf115b68bdf851d6c255d54ad920d6173add9788cd5d334ee1be05f7 | dizzyd/epop | epop_db.erl | -module(epop_db).
-author('').
%%%---------------------------------------------------------------------
%%% File : epop_db.erl
Created : 4 Mar 1998 by
%%% Function: Some simple functions for manipulating a session database.
%%% The session database consists of a collection of {Key,Value}
%%% t... | null | https://raw.githubusercontent.com/dizzyd/epop/41251928d48990603d04cbd5751eb6f158e738fa/src/epop_db.erl | erlang | ---------------------------------------------------------------------
File : epop_db.erl
Function: Some simple functions for manipulating a session database.
The session database consists of a collection of {Key,Value}
tuples.
=================================================================... | -module(epop_db).
-author('').
Created : 4 Mar 1998 by
The contents of this file are subject to the Erlang Public License
License , Version 1.0 , ( the " License " ) ; you may not use this file
Software distributed under the License is distributed on an " AS IS "
The Original Code is epop-2 - 3
The Initial... |
a3624f097c0b90992ad5cde2f36803b67e35f5f87b1b458769b67282f8420fef | AccelerateHS/accelerate-llvm | Environment.hs | -- |
Module : Data . Array . Accelerate . . Execute . Environment
Copyright : [ 2014 .. 2015 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
module Data.Array.Accelerate.LLVM.Multi.Execute.Environme... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/icebox/accelerate-llvm-multidev/Data/Array/Accelerate/LLVM/Multi/Execute/Environment.hs | haskell | |
License : BSD3
Stability : experimental
| Module : Data . Array . Accelerate . . Execute . Environment
Copyright : [ 2014 .. 2015 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.Multi.Execute.Environment (
Aval, aprj
) where
import Data.Array.Accelerate.LLVM.... |
10a3c9690708c784c5942349b237d9fc79488e10ee7bd3d25144dbfbd19b3fd0 | ocaml-flambda/flambda-backend | flambda_features.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/2eea6bab3ef6e2d90a9bed292b9547eccf86454d/middle_end/flambda2/ui/flambda_features.ml | ocaml | ************************************************************************
OCaml
... | , Jane Street Europe
Copyright 2020 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
let flambda2_is_enabled () = Clflags.is_flambda2 ()
let with_default (r : 'a Flambda_backend_flags.or_defa... |
967b4f533b17b7c484cd1bb02ed4ea55606898704970cbfeb51ac661328713b9 | jixiuf/helloerlang | hello_sup.erl | -module(hello_sup).
-vsn("0.2").
%% 升级到0.2之后也对world_gen进行监督
-behaviour(supervisor).
-export([start_link/0,init/1]).
start_link()->
io:format("~p start link~n",[?MODULE]) ,
supervisor:start_link({local,?MODULE},?MODULE,[])
.
init([])->
{ok,{{one_for_one,5,3000},
using spec snippet for childspec
... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/release_handle/release_h/src/hello_sup.erl | erlang | 升级到0.2之后也对world_gen进行监督
id
id | -module(hello_sup).
-vsn("0.2").
-behaviour(supervisor).
-export([start_link/0,init/1]).
start_link()->
io:format("~p start link~n",[?MODULE]) ,
supervisor:start_link({local,?MODULE},?MODULE,[])
.
init([])->
{ok,{{one_for_one,5,3000},
using spec snippet for childspec
{hello_gen,start_... |
bb6b34c38f6b3cfc443f5e33f6fd38bf33b9d655b11318b481f2fcd63b7e6143 | input-output-hk/plutus | Flat.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - or... | null | https://raw.githubusercontent.com/input-output-hk/plutus/5b648b877565f807d79d816a0eea7e87ef40365d/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Core/Instance/Flat.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE NamedFieldPuns #
---------------|-------------------|------|-----------|
---------------|-------------------|------|-----------|
This instance could probably be derived, but better to write it expli... | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module UntypedPlutusCore.Core.Instance.Flat where
import UntypedPlutusCore.Core.Type
import PlutusCore.Flat
import Data.Word (Word8)
import... |
8b9b274998ce614ff3ec200fb12c76ea8e70d9a90aa8a026c80086b0fb18cec4 | ermine-language/ermine | Module.hs | # LANGUAGE FlexibleContexts #
--------------------------------------------------------------------
-- |
Copyright : ( c ) 2015
License : BSD2
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
--------------------------------------------------------------------
module Er... | null | https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Inference/Module.hs | haskell | ------------------------------------------------------------------
|
Stability : experimental
Portability: non-portable
------------------------------------------------------------------
data Module = Module
, _moduleImports :: [Import Global]
, _moduleFixities :: [FixityDecl]
TODO : support type not ju... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2015
License : BSD2
Maintainer : < >
module Ermine.Inference.Module
( checkModule
) where
import Control.Applicative
import Control.Lens
import qualified Data.Map as Map
import Data.Bifunctor
import Data.Text (Text)
import Data.Void
import Ermin... |
21caa33f76871e380511b5e692d03f754015441da6072f4359c3b6d20affd7e8 | flyingmachine/datomic-junk | load_test.clj | (ns com.flyingmachine.datomic-junk.load-test
(:require [com.flyingmachine.datomic-junk :as dj]
[com.flyingmachine.datomic-junk.load :as l]
[com.flyingmachine.datomic-junk.test-helper :as th]
[datomic.api :as d])
(:use midje.sweet))
(def schema
(th/inflate-attrs
[;; tag
... | null | https://raw.githubusercontent.com/flyingmachine/datomic-junk/c5688686cd1a9f4b181e9ffc2478b913f578f347/test/com/flyingmachine/datomic_junk/load_test.clj | clojure | tag
topic
post | (ns com.flyingmachine.datomic-junk.load-test
(:require [com.flyingmachine.datomic-junk :as dj]
[com.flyingmachine.datomic-junk.load :as l]
[com.flyingmachine.datomic-junk.test-helper :as th]
[datomic.api :as d])
(:use midje.sweet))
(def schema
(th/inflate-attrs
{:db/ident ... |
f46d8638dce06f618e0fa2a7ae5539ca98ec90ac9e2e27558eb6cad762759574 | twashing/edgaru | core.clj | (ns edgaru.eight.core
(:require [clj-time.core :as tc]
[clj-time.coerce :as tco]))
;;
(defn random-in-range [lower upper]
(let [r (rand upper)]
(if (>= r lower)
r
(+ (rand (- upper lower))
lower))))
(defn stochastic-k [last-price low-price high-price]
(let [hlrange (- hig... | null | https://raw.githubusercontent.com/twashing/edgaru/7a6bb30eee5fa2dfdf3baabe8b25e9bcc5019181/src/edgaru/eight/core.clj | clojure |
(println (str "[" last " | " low " | " high "] <=> k[" k "] / kPM[" kPM "] / newprice[" newprice "]"))
generate a raw infinite list of floats within a given range
generate a timeseries based on thoe numbers | (ns edgaru.eight.core
(:require [clj-time.core :as tc]
[clj-time.coerce :as tco]))
(defn random-in-range [lower upper]
(let [r (rand upper)]
(if (>= r lower)
r
(+ (rand (- upper lower))
lower))))
(defn stochastic-k [last-price low-price high-price]
(let [hlrange (- high-p... |
e5558735584ea77008b48857a13555d198fbfbd8915cc92bb6070ebf3645dd9d | tezos/tezos-mirror | helpers.ml | (*****************************************************************************)
(* *)
MIT License
Copyright ( c ) 2022 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/603edb19d5217fcf0cc1036effe617d78a6ba265/src/lib_bls12_381_polynomial/test/helpers.ml | ocaml | ***************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this so... | MIT License
Copyright ( c ) 2022 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS... |
9008dc72ee05ad64c1d51fb9de7877c65d9a6fbe70c93be659c8022b4cfd5e8b | matterhorn-chat/matterhorn | Login.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE RankNTypes #-}
| This module provides the login interface for Matterhorn .
--
-- * Overview
--
-- The interface provides a set of form fields for the user to use to
-- enter their server information and credentials. The user enters
-- this informat... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/56ddbc012685b1e3dc50feca716f63b5d810f37a/src/Matterhorn/Login.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
* Overview
The interface provides a set of form fields for the user to use to
enter their server information and credentials. The user enters
this information and presses Enter, and then this module
attempts to connect to the server. The module's main function,
in... | # LANGUAGE TemplateHaskell #
| This module provides the login interface for Matterhorn .
The interactiveGetLoginSession function takes the Matterhorn
the case where the configuration provided all four values needed :
application and returning control to Matterhorn . This ensures that
module Matterhorn.Login
(... |
df4d331331c7603fa339658be803e6fdd0a0b48c49c60281ef1990521ff6f07b | dbuenzli/remat | git.ml | #!/usr/bin/env ocaml
#directory "pkg"
#use "config.ml"
(* This is only for git checkout builds, it can be ignored
for distribution builds. *)
let () =
if Dir.exists ".git" then begin
Vars.subst ~skip:Config.subst_skip ~vars:Config.vars ~dir:"."
>>& fun () -> Cmd.exec_hook Config.git_hook
>>& fun () -... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/pkg/git.ml | ocaml | This is only for git checkout builds, it can be ignored
for distribution builds. | #!/usr/bin/env ocaml
#directory "pkg"
#use "config.ml"
let () =
if Dir.exists ".git" then begin
Vars.subst ~skip:Config.subst_skip ~vars:Config.vars ~dir:"."
>>& fun () -> Cmd.exec_hook Config.git_hook
>>& fun () -> ()
end
|
dd87772c805ea961b64f682a26f89beaec757e93243e5fece085c6959e75239b | thicksteadTHpp/Obvius | numerical-recipes.lisp | (in-package :obvius)
Routines translated from Numerical Recipes in C.
;; Each should be functionally identical to the C version.
(defun gammln (xx)
(if (< xx 1.0)
(let ((z (- 1.0 xx)))
(- (log (/ (* pi z) (sin (* pi z))))
(gammln (+ 1.0 z))))
(let* ((z (- xx 1.0))
(tmp (+ z 5.... | null | https://raw.githubusercontent.com/thicksteadTHpp/Obvius/9a91673609def033539c9ebaf098e8f11eb0df6e/statistics/numerical-recipes.lisp | lisp | Each should be functionally identical to the C version.
save old answer
renormalize | (in-package :obvius)
Routines translated from Numerical Recipes in C.
(defun gammln (xx)
(if (< xx 1.0)
(let ((z (- 1.0 xx)))
(- (log (/ (* pi z) (sin (* pi z))))
(gammln (+ 1.0 z))))
(let* ((z (- xx 1.0))
(tmp (+ z 5.0 0.5)))
(+ (* (log tmp) (+ z 0.5))
(- tmp)
... |
3b38e24920558e6753e697654fd91870af07687ae688b1e01fa676a39f0a4484 | atomvm/atomvm_lib | ledc_pwm_example.erl | %%
Copyright ( c ) 2020 dushin.net
%% All rights reserved.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in wr... | null | https://raw.githubusercontent.com/atomvm/atomvm_lib/e48bfcda8e6580913f0208e0179f556de8a9d61b/examples/ledc_pwm_example/src/ledc_pwm_example.erl | erlang |
All rights reserved.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific ... | Copyright ( c ) 2020 dushin.net
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module (ledc_pwm_example).
-export([start/0]).
start() ->
ok = ledc_pwm:start(),
Freq = 5000,
{ok, Timer} = ledc_pwm:create_tim... |
ee5678e0ec5282efe0446cfa68a7490e907035ef08dd4fcf90c4b40accf95a18 | backtracking/mlpost | command.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/command.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Types
module T = Transform
type hposition = Types.hposition
type vposition = Types.vposition
ty... |
8156d4365549e2264286fa5b01e4ad7c18f21cb38085634041eee87283b0adf8 | danhper/evm-analyzer | bigInt.ml | open Core
include Z
let pp f t = Format.pp_print_string f (format "#0x%x" t)
let two = of_int 2
let of_hex raw_string =
let string =
if String.is_prefix ~prefix:"0x" raw_string
then String.drop_prefix raw_string 2
else raw_string
in
of_string_base 16 string
let to_hex ?length t =
let format... | null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/src/bigInt.ml | ocaml | open Core
include Z
let pp f t = Format.pp_print_string f (format "#0x%x" t)
let two = of_int 2
let of_hex raw_string =
let string =
if String.is_prefix ~prefix:"0x" raw_string
then String.drop_prefix raw_string 2
else raw_string
in
of_string_base 16 string
let to_hex ?length t =
let format... | |
57c8b431d336f95f2b2c8fd82568a0841a023bb2e7da72b84b4f23abc798f52b | achirkin/vulkan | StructureType.hs | # OPTIONS_HADDOCK ignore - exports #
{-# LANGUAGE DataKinds #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE Strict #-}
module Graphics.Vulkan.Types.Enum.StructureType
(VkStructureType(VkStructureType,
... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Types/Enum/StructureType.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
| Structure type enumerant
type = @enum@
| Reserved for internal use by the loader, layers, and ICDs
| Reserved for internal use by the loader, layers, and ICDs | # OPTIONS_HADDOCK ignore - exports #
# LANGUAGE GeneralizedNewtypeDeriving #
module Graphics.Vulkan.Types.Enum.StructureType
(VkStructureType(VkStructureType,
VK_STRUCTURE_TYPE_APPLICATION_INFO,
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
VK_STR... |
4f6d99f65ac540e062346c07677ad04bca57039a726c0317f43774981e69118f | ocsigen/js_of_ocaml | defaultinit.ml | (* TEST
include testing
*)
(* Check that the numbers drawn from the default state are the same
on all platforms. *)
open Random
let _ =
for i = 0 to 20 do
print_char ' '; print_int (int 1000);
done;
print_newline (); print_newline ();
for i = 0 to 20 do
print_char ' '; print_float (float 1000.... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/31c8a3d9d4e34f3fd573dd5056e733233ca4f4f6/compiler/tests-ocaml/lib-random/defaultinit.ml | ocaml | TEST
include testing
Check that the numbers drawn from the default state are the same
on all platforms. |
open Random
let _ =
for i = 0 to 20 do
print_char ' '; print_int (int 1000);
done;
print_newline (); print_newline ();
for i = 0 to 20 do
print_char ' '; print_float (float 1000.);
done
let _ = exit 0
|
281554e211b562d974fef2d690efd4df37e09a957b3ad978c79c039c71970ec3 | i-am-tom/learn-me-a-haskell | Bag.hs | # OPTIONS_HADDOCK not - home #
# LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
|
Module : Bag
Description : An opaque heterogeneous ' ' .
Copyright : ( c ) , 2018
License : MIT
Maintainer :
Stability : experimental
Often in life , we have plenty of data that we col... | null | https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/src/Bag.hs | haskell | * Convenience functions
The full API of the 'Bag' type.
We can use these pragmas to say "these instances are only available when
building with a compiler new enough to understand how to parse them. | # OPTIONS_HADDOCK not - home #
# LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
|
Module : Bag
Description : An opaque heterogeneous ' ' .
Copyright : ( c ) , 2018
License : MIT
Maintainer :
Stability : experimental
Often in life , we have plenty of data that we col... |
0c8fe477663b0ed0c102b4e1cfb418fcbc0a1235f8e312700c0ec7127e650439 | andreas/ocaml-graphql-server | test.ml | let () =
Alcotest.run "graphql-server"
[
("schema", Schema_test.suite);
("arguments", Argument_test.suite);
("variables", Variable_test.suite);
("introspection", Introspection_test.suite);
("errors", Error_test.suite);
("custom_errors", Custom_error_test.suite);
("abstrac... | null | https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql/test/test.ml | ocaml | let () =
Alcotest.run "graphql-server"
[
("schema", Schema_test.suite);
("arguments", Argument_test.suite);
("variables", Variable_test.suite);
("introspection", Introspection_test.suite);
("errors", Error_test.suite);
("custom_errors", Custom_error_test.suite);
("abstrac... | |
28b1039894bcc407c71a4d4ef8f12dc7740a1e6f9e2facbe18b10095519c3b18 | mfoemmel/erlang-otp | wxListEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . 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/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxListEvent.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 2008 - 2009 . 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 "
< dd><em > > , < em > command_list_begi... |
929571cab24f5c22c4cb714f2d31406db8e95b117ce451b9eb712ad071f19413 | analyticbastard/xicotrader | loader.clj | (ns xicotrader.loader
(:require
[cemerick.pomegranate :as p]
[xicotrader.strategy :as strategy]))
(defn load-strategy [config system-map strategy-jar]
(p/add-classpath strategy-jar)
(require '[xicotrader.strategy.impl])
(eval '(xicotrader.strategy.impl/new {})))
(defn load-service [config system-map s... | null | https://raw.githubusercontent.com/analyticbastard/xicotrader/67e15143d853649afabbb9a778225457e97c70cd/src/clj/xicotrader/loader.clj | clojure | todo | (ns xicotrader.loader
(:require
[cemerick.pomegranate :as p]
[xicotrader.strategy :as strategy]))
(defn load-strategy [config system-map strategy-jar]
(p/add-classpath strategy-jar)
(require '[xicotrader.strategy.impl])
(eval '(xicotrader.strategy.impl/new {})))
(defn load-service [config system-map s... |
fa64229933e6cc9b81303346b7f15b77eb5943a1c79f64c3e37cf15f7361f587 | haskell/cabal | LicenseReference.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.SPDX.LicenseReference (
LicenseRef,
licenseRef,
licenseDocumentRef,
mkLicenseRef,
mkLicenseRef',
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Utils.Generic (isAsciiAlphaNum)
i... | null | https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/SPDX/LicenseReference.hs | haskell | # LANGUAGE DeriveDataTypeable #
| License reference.
| Document reference.
| Create 'LicenseRef' from optional document ref and name.
| Like 'mkLicenseRef' but convert invalid characters into @-@. | # LANGUAGE DeriveGeneric #
module Distribution.SPDX.LicenseReference (
LicenseRef,
licenseRef,
licenseDocumentRef,
mkLicenseRef,
mkLicenseRef',
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Utils.Generic (isAsciiAlphaNum)
import Distribution.Pretty
import Dis... |
b35d419fddd14fb2ab71c70c8b65d1fcdba3ea0882508fd3fc578581f269d026 | serras/cobalt | MainU.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module Main where
import Control.Lens hiding ((.=), Empty)
import Data.Aeson hiding (json, Error)
import Data.HashMap.Strict (inse... | null | https://raw.githubusercontent.com/serras/cobalt/cd8df75581a320fcca0d7d11b4b8c1788e8a5f9c/src/MainU.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
# LANGUAGE TypeSynonymInstances #
Get parameters
Get parameters
COMMAND LINE PART
JSON PART
red
, "tags" .= [showWithGreek t]
blue
Special case for later
Special case for cond
Nothing -> ["?" :: String]
, "tags" .= case k of
No... | # LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Main where
import Control.Lens hiding ((.=), Empty)
import Data.Aeson hiding (json, Error)
import Data.HashMap.Strict (insert)
import Data.List (intercalate)
import Data.Foldable (toList)
import System.Console.ANSI
impo... |
80500cd59166e19139fed2e8e537473e3f5a811a93866709c8af527fa9b7eaba | Nayshins/ocaml-tic-tac-toe | consoleIOTest.ml | open Core.Std
open OUnit2
open ReaderWriter
open ConsoleIO
let line_to_read_string = ref [""]
let line_to_read_int = ref [1]
let printed_string = ref ""
module MockPervasives : ReaderWriter = struct
let read_line () =
let line_read = List.hd_exn !line_to_read_string in
line_to_read_string := List.tl_exn !li... | null | https://raw.githubusercontent.com/Nayshins/ocaml-tic-tac-toe/a177feed4938552ce7df79f0e4d09b24cdcb3667/test/consoleIOTest.ml | ocaml | open Core.Std
open OUnit2
open ReaderWriter
open ConsoleIO
let line_to_read_string = ref [""]
let line_to_read_int = ref [1]
let printed_string = ref ""
module MockPervasives : ReaderWriter = struct
let read_line () =
let line_read = List.hd_exn !line_to_read_string in
line_to_read_string := List.tl_exn !li... | |
ab13770ab517f4f0848e6206ac7c69ba6bdc4d483c2421d319d732c6cfb6bb09 | Eduap-com/WordMat | sint1b.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/fftpack5/lisp/sint1b.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format single-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
b36b3484848468f6510063572304a560f7fdfe4343a4be3f16024a126b532465 | haskell-servant/servant-auth | JWT.hs | module Servant.Auth.JWT where
import Control.Lens ((^.))
import qualified Crypto.JWT as Jose
import Data.Aeson (FromJSON, Result (..), ToJSON, fromJSON,
toJSON)
import qualified Data.HashMap.Strict as HM
import qualified Data.Text ... | null | https://raw.githubusercontent.com/haskell-servant/servant-auth/482a50b1b1593b7cdcb8eb066fc414e0c0cb7003/servant-auth/src/Servant/Auth/JWT.hs | haskell |
The default implementation assumes the data is stored in the unregistered
uses the type's @ToJSON@ instance to encode the data. | module Servant.Auth.JWT where
import Control.Lens ((^.))
import qualified Crypto.JWT as Jose
import Data.Aeson (FromJSON, Result (..), ToJSON, fromJSON,
toJSON)
import qualified Data.HashMap.Strict as HM
import qualified Data.Text ... |
b7a070737edc031ac77838d8307f747ec5cc5c0ba8f7787f4ace095c5a0ca49f | emqx/emqx | emqx_topic_metrics_api.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_modules/src/emqx_topic_metrics_api.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_topic_metrics_api).
-behaviour(minirest_api).
-include_lib("hocon/include/hoconsc... |
36801d4bf5419f02cdefd2e3c336db84e239a21334f26d3fc8b7090d5d23873a | owickstrom/motor | Logging.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE ScopedTypeVariables #
| Simple MonadIO - based logging for ' ' programs .
module Motor.FSM.Logging where
import Control.Monad.IO.Class
import Data.Row.Records
import ... | null | https://raw.githubusercontent.com/owickstrom/motor/46b69e474b115907889ee18544bbc4a5c6bbf2ad/motor/src/Motor/FSM/Logging.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures # | # LANGUAGE ScopedTypeVariables #
| Simple MonadIO - based logging for ' ' programs .
module Motor.FSM.Logging where
import Control.Monad.IO.Class
import Data.Row.Records
import Data.Proxy
import Data.Reflection
import Motor.FSM
log ::
(MonadIO (m i i), KnownS... |
d88bbab47c5e7081ddeb4494b8e20a94c791ae630b72e83e8754724cd94e27e8 | ml4tp/tcoq | wg_Command.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ide/wg_Command.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
false causes problems for selection... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Preferences
class comma... |
5dc64bfc179a8e9d9f2f1e2e8585d9317985ca8c6611cc69ae5b9b07d2fc744a | ngorogiannis/cyclist | test_slterm_bug2.ml | open Lib
open Sl_term
let mk str = handle_reply (MParser.parse_string parse str ())
let () =
runtest
"Fresh existential var must not be nil."
(fun () ->
let x = mk "x" in
let xprime = fresh_evar (Set.singleton x) in
assert (not (is_nil xprime))
) | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/tests/test_slterm_bug2.ml | ocaml | open Lib
open Sl_term
let mk str = handle_reply (MParser.parse_string parse str ())
let () =
runtest
"Fresh existential var must not be nil."
(fun () ->
let x = mk "x" in
let xprime = fresh_evar (Set.singleton x) in
assert (not (is_nil xprime))
) | |
bdcc811c9ad9d28eb1a5cea611f3a9ffe0610b99f983ce12c26bbedc6327b279 | mvr/at | Bicone.hs | # LANGUAGE UndecidableInstances #
| ( Suspension of ) Pushouts of surjections
--
The suspension avoids some special casing with dimension 0 , and
-- means no desuspension is necessary to define the projections.
module Math.Algebra.ChainComplex.Bicone where
import Math.Algebra.ChainComplex
import Math.Algebra.Chai... | null | https://raw.githubusercontent.com/mvr/at/f08b25ee2d83f761fd288a66f05dad1943879db1/src/Math/Algebra/ChainComplex/Bicone.hs | haskell |
means no desuspension is necessary to define the projections.
Can all be defined without reference to the differentials, so we
use UMorphism. | # LANGUAGE UndecidableInstances #
| ( Suspension of ) Pushouts of surjections
The suspension avoids some special casing with dimension 0 , and
module Math.Algebra.ChainComplex.Bicone where
import Math.Algebra.ChainComplex
import Math.Algebra.ChainComplex.Reduction
import Math.Algebra.Combination
import Prelude hi... |
719aa5e8683a0433ede13a89cb342939517ef7d6808c04fcd7656ce19b8cd217 | BioHaskell/hPDB | Neighbours.hs | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
-- | Searching for neighbouring atoms in a 3D space using `Octree`.
module Bio.PDB.Structure.Neighbours(makeOctree,
findInRadius, findNearest,
... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/Structure/Neighbours.hs | haskell | | Searching for neighbouring atoms in a 3D space using `Octree`.
| Octree of `Atom`s.
| Preparing atom to be inserted into `Octree`.
| Make an Octree of `Atom`s
| Find all `Atom`s within a given radius from a point.
| Find an `Atom`s closest to a point. | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
module Bio.PDB.Structure.Neighbours(makeOctree,
findInRadius, findNearest,
AtomOctree(..))
where
import qualified Data.Octree ... |
d0973d7091d79fc2d763fe807a3dffb6670d3c91bdca1607872d2c6e7a2866ff | webyrd/scheme-primer | chez.scm | (eval-when (compile) (optimize-level 3))
(module mk (run run* == =/= fresh conde symbolo numbero absento test)
(import (except scheme subst))
(implicit-exports #t)
(include "./mk-vicare.scm")
(include "./mk.scm")
(include "./test-check.scm"))
| null | https://raw.githubusercontent.com/webyrd/scheme-primer/3381a4a70c7ffd76878a5cfe5818b89e71e53f7f/faster-miniKanren/chez.scm | scheme | (eval-when (compile) (optimize-level 3))
(module mk (run run* == =/= fresh conde symbolo numbero absento test)
(import (except scheme subst))
(implicit-exports #t)
(include "./mk-vicare.scm")
(include "./mk.scm")
(include "./test-check.scm"))
| |
ee506dd0e5e64c85c2f0a426e6674131afbd5d6573d14336423ee8a8bdbfeb81 | kelsey-sorrels/robinson | lightning.clj | ;; Utility functions for rendering state
(ns robinson.fx.lightning
(:require
[robinson.common :as rc]
[robinson.error :as re]
[robinson.catmull-rom :as rcr]
[robinson.renderutil :as rutil]
[robinson.math :as rmath]
[robinson.color :as rcolor]
... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/fx/lightning.clj | clojure | Utility functions for rendering state
start
end
middle
vertical
horizontal
above
sliding window
sliding window
move item
find min-y for lightning
create a character fx
create a corresponding actor that controls the fx | (ns robinson.fx.lightning
(:require
[robinson.common :as rc]
[robinson.error :as re]
[robinson.catmull-rom :as rcr]
[robinson.renderutil :as rutil]
[robinson.math :as rmath]
[robinson.color :as rcolor]
[robinson.random :as rr]
... |
f19a759f98b71b7d9dba634ebf81c7544799823e4655cd419da96eb20d49cf0c | TrustInSoft/tis-kernel | eval_stmt.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/legacy/eval_stmt.mli | 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 ... |
365503f8da18c8fcbd0156071f5414c189687dc3cd4ed7019bd350b8b22facd0 | ekmett/ekmett.github.com | Hex.hs | #
# GHC_OPTIONS -fth #
{-# GHC_OPTIONS -fallow-undecidable-instances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Type.Hex
Copyright : ( C ) 2006
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : < >
-- St... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/type-int/_darcs/pristine/src/Type/Hex.hs | haskell | # GHC_OPTIONS -fallow-undecidable-instances #
---------------------------------------------------------------------------
|
Module : Type.Hex
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
Type-level hexadecimal numbers, positive and negative with infinite
-----... | #
# GHC_OPTIONS -fth #
Copyright : ( C ) 2006
Maintainer : < >
Portability : non - portable ( MPTC , FD , TH , undecidable instances , missing constructors )
precision . Should work out to about 2 ^ 72 without changing the default
context length limit in GHC .
TODO : TDivMod , TImplies ... |
13fe4d0a7e1d5c802347c748c5222940b9549d9c0585e8def3d329f4585d7f81 | JHU-PL-Lab/jaylang | CE-1CFA05.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c7_COEFFICIENT_1128 = 0
let rec c6_COEFFICIENT_1126 = 0
let rec c5_COEFFICIENT_1125 = 0
let rec c4_COEFFICIENT_1123 = 0
let rec c3_COEFFICIENT_1120 = 0
let rec c2_COEFFICIENT_1118 = 0
let rec c1_COEFFICIENT_1117 = 0
let rec c0_COEFFICIEN... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/CE-1CFA05.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c7_COEFFICIENT_1128 = 0
let rec c6_COEFFICIENT_1126 = 0
let rec c5_COEFFICIENT_1125 = 0
let rec c4_COEFFICIENT_1123 = 0
let rec c3_COEFFICIENT_1120 = 0
let rec c2_COEFFICIENT_1118 = 0
let rec c1_COEFFICIENT_1117 = 0
let rec c0_COEFFICIEN... | |
e9c5748710941c94e2c8e998e5bf49b86aad0ecb1629b796ea5094f8065227fc | google/clang-lens | Setup.hs |
Copyright 2014 Google Inc. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
... | null | https://raw.githubusercontent.com/google/clang-lens/09caa8fb234024af18706060085ef0fc1e8b6f5f/Setup.hs | haskell |
Copyright 2014 Google Inc. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
... | |
bcb7baded58d843bb6132e97e695a16d2cc1db4420c10e78b7bb2ec0fd17584a | parapluu/Concuerror | depend_4_1.erl | -module(depend_4_1).
-export([result/0, procs/0, run/1]).
result() -> io:format("30").
procs() -> io:format("6").
run(Procs) ->
[S] = io_lib:format("~p",[Procs]),
initial(),
run_aux(S),
block().
run_aux([]) -> ok;
run_aux([P|R]) ->
spawn(fun() -> proc(P) end),
run_aux(R).
block() ->
re... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/resources/perm_tests/src/depend_4_1.erl | erlang | -module(depend_4_1).
-export([result/0, procs/0, run/1]).
result() -> io:format("30").
procs() -> io:format("6").
run(Procs) ->
[S] = io_lib:format("~p",[Procs]),
initial(),
run_aux(S),
block().
run_aux([]) -> ok;
run_aux([P|R]) ->
spawn(fun() -> proc(P) end),
run_aux(R).
block() ->
re... | |
2f5ef9fe86b89b68f1cd1ceb2f49dd13a6f4365a352fdcf640d4ff450c41cee7 | TristeFigure/shuriken | lazy.clj | (ns shuriken.lazy)
(defn deep-doall [m]
(doall (clojure.walk/postwalk identity m)))
| null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/lazy.clj | clojure | (ns shuriken.lazy)
(defn deep-doall [m]
(doall (clojure.walk/postwalk identity m)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.