_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 |
|---|---|---|---|---|---|---|---|---|
d1886279b1328e80d904e83e6ee38cdbbd84e9820c5096d08b2fee55102eae27 | mysema/lein-dbmaintain | dbmaintain.clj | (ns leiningen.dbmaintain
(:import [java.io File FileInputStream]
[java.util Map Properties]
[org.dbmaintain MainFactory]))
(defn get-properties
[{:keys [dbmaintain]}]
(let [{:keys [driver url user-name password schemas scripts dialect]} dbmaintain]
(doto (Properties.)
(.load (.ge... | null | https://raw.githubusercontent.com/mysema/lein-dbmaintain/99a5798f54cccbfc0d47baadd3d3acdf807ba8ff/src/leiningen/dbmaintain.clj | clojure | (ns leiningen.dbmaintain
(:import [java.io File FileInputStream]
[java.util Map Properties]
[org.dbmaintain MainFactory]))
(defn get-properties
[{:keys [dbmaintain]}]
(let [{:keys [driver url user-name password schemas scripts dialect]} dbmaintain]
(doto (Properties.)
(.load (.ge... | |
76858fcd2dd892acf6e50f16e3471ccf07990ea3ffe07cefda88398514fec844 | laurencer/confluence-sync | SecureSocketsSnippet.hs | --
-- HTTP client for use with io-streams
--
Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd
--
-- The code in this file, and the program it is a part of, is made
-- available to you by its authors as open source software: you can
redistribute it and/or modify it under a BSD licence .
--
{-# LANG... | null | https://raw.githubusercontent.com/laurencer/confluence-sync/442fdbc84fe07471f323af80d2d4580026f8d9e8/vendor/http-streams/tests/SecureSocketsSnippet.hs | haskell |
HTTP client for use with io-streams
The code in this file, and the program it is a part of, is made
available to you by its authors as open source software: you can
# LANGUAGE OverloadedStrings #
# OPTIONS -fno-warn-unused-imports #
Otherwise redundent imports, but useful for testing in GHCi.
| Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd
redistribute it and/or modify it under a BSD licence .
module Snippet where
import Control.Exception (bracket)
import Network.Http.Client
import Blaze.ByteString.Builder (Builder)
import qualified Blaze.ByteString.Builder as Builder
import Data.... |
b336a91e09f608f3335ef30e597542d874008b35b2f12584c67031af8d649f0c | immutant/feature-demo | scheduling.clj | (ns demo.scheduling
(:require [immutant.scheduling :refer (every at in until limit cron singleton) :as sch]
[immutant.util :as util]
immutant.scheduling.joda
clj-time.core
clj-time.periodic)
(:import java.util.Date))
;; scheduling specs are just maps. we provid... | null | https://raw.githubusercontent.com/immutant/feature-demo/151fb330601421a23a1bdfd71f724afcdba0900c/src/demo/scheduling.clj | clojure | scheduling specs are just maps. we provide optional helpers for
generating thoes maps
you can use clj-time periods if using clj-time
scheduling a simple job, using bound-fn to capture *out* for the repl
the return value of the schedule call can be used to stop it
schedule a job from a clj-time sequence
start sin... | (ns demo.scheduling
(:require [immutant.scheduling :refer (every at in until limit cron singleton) :as sch]
[immutant.util :as util]
immutant.scheduling.joda
clj-time.core
clj-time.periodic)
(:import java.util.Date))
(def every-5s
(or
{:every (or 5000 [5 ... |
64be62a01704c56a8688adc320e0a697292ce6e73e5f4439c8f3f40ad7a32825 | ocaml/dune | dialect.mli | open Import
open Ocaml
* Dialects
A dialect is an alternative frontend to OCaml ( such as ) . It is
described by a pair of file extensions , one corresponding to interfaces and
one to implementations .
The extensions are unique among all dialects of a given project , so that a
given ex... | null | https://raw.githubusercontent.com/ocaml/dune/c5994e2be7e2048fc65ea0101d9b89709fff775f/src/dune_engine/dialect.mli | ocaml | open Import
open Ocaml
* Dialects
A dialect is an alternative frontend to OCaml ( such as ) . It is
described by a pair of file extensions , one corresponding to interfaces and
one to implementations .
The extensions are unique among all dialects of a given project , so that a
given ex... | |
a678e991cb5bec058dd0879af3481b2177823d818b586ed3c05c756475cd0c6b | batterseapower/test-framework | XML.hs | module Test.Framework.Runners.XML (
produceReport
) where
import Test.Framework.Runners.Statistics ( testCountTotal, TestStatistics(..) )
import Test.Framework.Runners.Core ( FinishedTest )
import Test.Framework.Runners.XML.JUnitWriter ( RunDescription(..), serialize )
import Data.Time.... | null | https://raw.githubusercontent.com/batterseapower/test-framework/eefad382c3377d734aa3f0df4f84e4077b8362d6/core/Test/Framework/Runners/XML.hs | haskell | | Generates a description of the complete test run, given some
initial over-all test statistics and the list of tests that was
run.
@Runner@ doesn't need this level of detail to produce summary
information, and the per-test details are generated during
execution.
defined within `issueTests`.
not yet available... | module Test.Framework.Runners.XML (
produceReport
) where
import Test.Framework.Runners.Statistics ( testCountTotal, TestStatistics(..) )
import Test.Framework.Runners.Core ( FinishedTest )
import Test.Framework.Runners.XML.JUnitWriter ( RunDescription(..), serialize )
import Data.Time.... |
0ce61afff4bb7e84a75780d765edfb8df044a0b62a4359e7e8afaf742c8ac05b | sbcl/sbcl | array.lisp | ;;;; various array operations that are too expensive (in space) to do
;;;; inline
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public doma... | null | https://raw.githubusercontent.com/sbcl/sbcl/b430f314c93aa3fbd303614a8a162d113d879073/src/assembly/arm64/array.lisp | lisp | various array operations that are too expensive (in space) to do
inline
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
double-word align
Touch the last element, to ensure that null-termin... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-VM")
(define-assembly-routine (allocate-vector-on-heap
(:policy :fast-safe)
... |
1446db7ea59471a1bf399739045fcc41ecf8ce1134f7609f2dcb767371d655f3 | janestreet/memtrace_viewer_with_deps | ppx_js_style.mli | open Ppxlib
module Ignored_reason : sig
type t = Argument_to_ignore | Underscore_pattern
end
module Invalid_deprecated : sig
type t =
| Not_a_string
| Missing_date
| Invalid_month
end
module Invalid_constant : sig
type t
end
module Suspicious_literal : sig
type t
end
module Invalid_ocamlformat_... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_js_style/src/ppx_js_style.mli | ocaml | open Ppxlib
module Ignored_reason : sig
type t = Argument_to_ignore | Underscore_pattern
end
module Invalid_deprecated : sig
type t =
| Not_a_string
| Missing_date
| Invalid_month
end
module Invalid_constant : sig
type t
end
module Suspicious_literal : sig
type t
end
module Invalid_ocamlformat_... | |
2bf57fcfe83d6def3fa3dabc97300e2bde871a0dc506d21a2ae4518c27f0a999 | unison-code/unison | RenameMachineBlocks.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/MachineIR/Transformations/RenameMachineBlocks.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
cbe37e3ae35e93842353158e278d66b117f3f021c19d8293bac0228099d166ba | scymtym/utilities.print-items | protocol.lisp | ;;;; protocol.lisp --- Protocol functions of the utilities.print-items system.
;;;;
Copyright ( C ) 2011 - 2022 Jan Moringen
;;;;
Author : < >
(cl:in-package #:utilities.print-items)
;;; Print items protocol
(defgeneric print-items (object)
(:method-combination append)
(:documentation
"Return a list of... | null | https://raw.githubusercontent.com/scymtym/utilities.print-items/dd80d20883ce7f25335ae065bc38495bb9a66097/code/protocol.lisp | lisp | protocol.lisp --- Protocol functions of the utilities.print-items system.
Print items protocol
Default behavior
Default behavior is to not return any print items for OBJECT.
Formatting functions
TODO we might remove this later and expect the client to
pass in the effective list of items
Print items mixin | Copyright ( C ) 2011 - 2022 Jan Moringen
Author : < >
(cl:in-package #:utilities.print-items)
(defgeneric print-items (object)
(:method-combination append)
(:documentation
"Return a list of items that should appear in the printed
representation of OBJECT.
Each method should return a list of it... |
41a555cdfada6343814b5373e306090e597f4ef2361e2bdc9f7f533aadfe4109 | drlivingston/kabob | entrez_gene_id_typing_rules.clj | ;; All Entrez Gene identifiers are of type kiao/DNAIdentifier
`{:name "eg-id-type-assertion"
:head ((?/ice kiao/denotesSubClassOf obo/SO_0000352)) ;dna
:body ((_/f kiao/hasTemplate iaoeg/EntrezGeneInfoFileData_geneIDDataField1)
(_/f obo/IAO_0000219 ?/ice))
;;:options {:magic-prefixes [["franzOption_clause... | null | https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/id_typing/entrez_gene_id_typing_rules.clj | clojure | All Entrez Gene identifiers are of type kiao/DNAIdentifier
dna
:options {:magic-prefixes [["franzOption_clauseReorderer" "franz:identity"]]}
:options {:magic-prefixes [
["franzOption_chunkProcessingAllowed" "franz:yes"]
["franzOption_chunkProcessingSize" "franz:... | `{:name "eg-id-type-assertion"
:body ((_/f kiao/hasTemplate iaoeg/EntrezGeneInfoFileData_geneIDDataField1)
(_/f obo/IAO_0000219 ?/ice))
}
|
3c90c39a2080fb79074e1ecbb31a6aafece154b6fb4ad22af844a9a20268a939 | reflectionalist/S9fES | string-reverse.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; (string-reverse string) ==> string
; (string-reverse! string) ==> unspecific
;
; Create a fresh string and fill it with the characters of
; STRING, but in reverse order. STRING-REVERSE! reverses the
; characters of STRI... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-reverse.scm | scheme | Placed in the Public Domain
(string-reverse string) ==> string
(string-reverse! string) ==> unspecific
Create a fresh string and fill it with the characters of
STRING, but in reverse order. STRING-REVERSE! reverses the
characters of STRING in situ, overwriting the original
string.
Example: (string-rev... | Scheme 9 from Empty Space , Function Library
By , 2010
(define (string-reverse! s)
(let* ((k (string-length s))
(m (quotient k 2)))
(do ((i 0 (+ 1 i))
(j (- k 1) (- j 1)))
((= i m))
(let ((c (string-ref s i)))
(string-set! s i (string-ref s j))
(string-set! ... |
e1efef08ea41d7c4c349d91a32a6e66bd89922f6fc212286aabbabb987245580 | tsoding/kgbotka | DiscordLog.hs | # LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
module KGBotka.DiscordLog where
import qualified Data.Text as T
import Database.SQLite.Simple
import Database.SQLite.Simple.QQ
import Discord.Types
logMessage ::
Connection
-> Maybe GuildId
-> ChannelId
-> UserId
-> T.Text
-> T.Text
-> IO (... | null | https://raw.githubusercontent.com/tsoding/kgbotka/67278a93611b0abe4e07df7967559884263147aa/src/KGBotka/DiscordLog.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module KGBotka.DiscordLog where
import qualified Data.Text as T
import Database.SQLite.Simple
import Database.SQLite.Simple.QQ
import Discord.Types
logMessage ::
Connection
-> Maybe GuildId
-> ChannelId
-> UserId
-> T.Text
-> T.Text
-> IO ()
logMessage dbConn guild channel u... |
921cb35236c50fd280257db1128f1e7f4f0d8377a2b0a98150443cc881cd3945 | LexiFi/menhir | InputFile.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/InputFile.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
63626f4abb58cffbcdcca09174f8f17a9f02604900d97fa647d4e64543ea41ac | lassik/upscheme | err.scm | (define (f x) (begin (list-tail '(1) 3) 3))
(f 2)
a
(trycatch a (lambda (e) (write (stacktrace))))
| null | https://raw.githubusercontent.com/lassik/upscheme/61935bd866acb18902199bc4bc4cdd1760aa1ffc/scheme-tests/err.scm | scheme | (define (f x) (begin (list-tail '(1) 3) 3))
(f 2)
a
(trycatch a (lambda (e) (write (stacktrace))))
| |
6a69647066cb4eadb1d44fc4f57e863d590b01dadfd0ba32bf8620aacfd57ff2 | PeterDWhite/Osker | Test8.hs | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Main where
----------------------------------------------------------------------
Test the mvars in the layered braid
----------------------------------------------------------------------
--Haskell imports
import Monad
import System (getArgs, exitWith... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/Test8.hs | haskell | --------------------------------------------------------------------
--------------------------------------------------------------------
Haskell imports
Test imports
Utility imports
This is not a lifted thread.
; B.showState "Start hubl1"
Another non-local braid
; B.putStrLn ( "=== gs1mvar, taking: " ++ ... | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Main where
Test the mvars in the layered braid
import Monad
import System (getArgs, exitWith, ExitCode(..))
import TestSupport
import Null
import qualified IOUtilities as IOU
Braid imports
import qualified BraidExternal as B
import qualified BraidInt... |
d1f061015c5e1b61927222326b1a3ebf87cf2252aa50868a2d42420de779a9ee | chrovis/cljam | util.clj | (ns cljam.io.fasta.util
(:require [cljam.util :refer [space?]]))
(defn header-line?
[line]
(= (first line) \>))
(def ^:private vertial-bar (char 0x7c))
(defn- vertial-bar?
[c]
(= c vertial-bar))
(defn- header-blank?
[c]
(or (space? c)
(vertial-bar? c)))
(defn parse-header-line
[line]
(let [... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/fasta/util.clj | clojure | (ns cljam.io.fasta.util
(:require [cljam.util :refer [space?]]))
(defn header-line?
[line]
(= (first line) \>))
(def ^:private vertial-bar (char 0x7c))
(defn- vertial-bar?
[c]
(= c vertial-bar))
(defn- header-blank?
[c]
(or (space? c)
(vertial-bar? c)))
(defn parse-header-line
[line]
(let [... | |
e81e2f19409033db8b820c2447d264a1bf796e611d1c12813b80c436e877954d | haskell/cabal | cabal-list.test.hs | import Test.Cabal.Prelude
Issue 7124
-- when we sdist, error should tell which package caused the failure
main :: IO ()
main = cabalTest $ do
tmpdir <- fmap testTmpDir getTestEnv
fails $ cabal "v2-sdist" ["--list-only", "--output-directory", tmpdir, "all"]
| null | https://raw.githubusercontent.com/haskell/cabal/d2bff20fae387cffef4425820b6c1975f1821188/cabal-testsuite/PackageTests/SDist/T7124/cabal-list.test.hs | haskell | when we sdist, error should tell which package caused the failure | import Test.Cabal.Prelude
Issue 7124
main :: IO ()
main = cabalTest $ do
tmpdir <- fmap testTmpDir getTestEnv
fails $ cabal "v2-sdist" ["--list-only", "--output-directory", tmpdir, "all"]
|
d0696f3f82d8cba941d5ce4bb7ffbb5cb5530e8f3090b2f66d6e29d24f3df5af | Frama-C/Frama-C-snapshot | Factory.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/Factory.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
4f6c9727bd0f62c4acdc417f711ee17eec4467cdfa275929e086569c075bcaae | finkel-lang/finkel | opexp-app.hs | pure foldr <*> Just (+) <*> pure 1 <*> pure [2, 3] -- Haskell
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/expr/opexp-app.hs | haskell | Haskell | |
ff3b5eec3fb1220428c1515fe963589ba206d9c8837a870a5d7ad3eff0c34114 | Liqwid-Labs/agora | Governor.hs | |
Module : Spec . Governor
Maintainer :
Description : Tests for Agora governor .
Thie module exports ` specs ` , a list of ` TestTree`s , which ensure
that Agora 's governor component as intended .
Tests should pass when the validator or policy is given one of the
valid script contexts , which ... | null | https://raw.githubusercontent.com/Liqwid-Labs/agora/d8587995884cc1e131ee77d2cabcca1de3b75eaa/agora-specs/Spec/Governor.hs | haskell | |
Module : Spec . Governor
Maintainer :
Description : Tests for Agora governor .
Thie module exports ` specs ` , a list of ` TestTree`s , which ensure
that Agora 's governor component as intended .
Tests should pass when the validator or policy is given one of the
valid script contexts , which ... | |
d246850988f3c4fe91c3107c6e27bd01fea908ff24d46358db4e15e739e69efc | facebookarchive/duckling_old | communication.clj | (
{}
"650-283-4757"
"+1 6502834757"
"+33 4 76095663"
"06 2070 2220"
"(650)-283-4757 ext 897"
(fn [token _] (and (= :phone-number (:dim token))
(= (:text token) (:val token))))
""
"www.bla.com:8080/path"
""
"cnn.com/info"
"bla.com/path/path?ext=%23&foo=bla"
"localhost"
"localhost:80... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/es/corpus/communication.clj | clojure | local url | (
{}
"650-283-4757"
"+1 6502834757"
"+33 4 76095663"
"06 2070 2220"
"(650)-283-4757 ext 897"
(fn [token _] (and (= :phone-number (:dim token))
(= (:text token) (:val token))))
""
"www.bla.com:8080/path"
""
"cnn.com/info"
"bla.com/path/path?ext=%23&foo=bla"
"localhost"
"localhost:80... |
4513101deecc6ea62306db29dfd8d1ee4d0844bbb4dd5c84d573030c5a24b659 | screenshotbot/screenshotbot-oss | skip-list.lisp | (in-package :bknr.skip-list)
;;; TODO:
index - protokoll fuer cursor
;;; range-queries
(defparameter *sl-random-state*
(make-random-state t)
"Internal status of the random number generator.")
(defun sl-random ()
"Pseudo-random number generator, returns NIL 3/4 of the time."
(declare (optimize (speed 3)))
... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/1faeba2a45c639354e1298eb8a75aa82805a9ad5/third-party/bknr.datastore/src/skip-list/skip-list.lisp | lisp | TODO:
range-queries
A node is a SIMPLE-VECTOR containing KEY, VALUE and the forward pointers
ein knoten mit dem KEY existiert schon, nur VALUE veraendern
es muss ein neuer knoten mit zufaelligem LEVEL eingefuegt werden
jeweiligen previous knoten an naechster stelle
level slot der skip-liste anpassen an die heade... | (in-package :bknr.skip-list)
index - protokoll fuer cursor
(defparameter *sl-random-state*
(make-random-state t)
"Internal status of the random number generator.")
(defun sl-random ()
"Pseudo-random number generator, returns NIL 3/4 of the time."
(declare (optimize (speed 3)))
(< 2 (random 4 *sl-random-s... |
1ced506bedaf19a458b0b0e468634fb11b3bb683e922f9ff035dd7539501c8e2 | LexiFi/menhir | SortUnification.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/SortUnification.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
345ce2c8bf1da17b2f6747556d6fdd8d272f947515e8959f41af421c4408ec94 | FreeProving/free-compiler | ExportPass.hs | -- | This module contains a compiler pass that adds a module interface for the
-- translated module to the environment.
--
-- The interface contains all top-level entries that are currently in the
-- environment. Only entries that are defined in the translated module
-- are listed as exported. All other entries... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Pass/ExportPass.hs | haskell | | This module contains a compiler pass that adds a module interface for the
translated module to the environment.
The interface contains all top-level entries that are currently in the
environment. Only entries that are defined in the translated module
are listed as exported. All other entries are "hidden... | Additionally , all Coq identifiers of exported entries are qualified with
= = Example 1
@Prelude@ module and an entry for the type @A.Foo@ and constructor
= = Example 2
When a module imports the module from the example above ,
@Prelude@ module , the entries from 's module interface and the en... |
dfe27847fbac9b138bbab62b252c2fadd11ea278ac074f7a4d3f60e5a6f82488 | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.AR.Corpus
( corpus
, negativeCorpus
) where
... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Time/AR/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Time.AR.Corpus
( corpus
, negativeCorpus
) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Resolve
import Duckling.Time.Corpus
import Duckling.Time.Types hiding (Month)
import Duckling.TimeGrain.Types hiding (ad... |
6801693afc29d405fe2512671cfbaa5133163f4e69808ce7eeeac68c8deda670 | kitlang/kit | CTypeDeclSpec.hs | # OPTIONS_GHC -w #
module Kit.Compiler.Generators.C.CTypeDeclSpec where
import Test.Hspec
import Test.QuickCheck
import Text.PrettyPrint
import Language.C
import Data.List
import Kit.Ast
import Kit.Ir
import Kit.Str
import Kit.Compiler.Generators.C
showstruct x = intercalate
"\n"
[ renderStyle (Style {mode = Lef... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/tests/Kit/Compiler/Generators/C/CTypeDeclSpec.hs | haskell | # OPTIONS_GHC -w #
module Kit.Compiler.Generators.C.CTypeDeclSpec where
import Test.Hspec
import Test.QuickCheck
import Text.PrettyPrint
import Language.C
import Data.List
import Kit.Ast
import Kit.Ir
import Kit.Str
import Kit.Compiler.Generators.C
showstruct x = intercalate
"\n"
[ renderStyle (Style {mode = Lef... | |
bb5ab66fc69e867dc0df372e5f846211987e391c144b07766e7b33c24c2d2eb7 | VERIMAG-Polyhedra/VPL | Rtree_t.ml | open Vpl
(* Rtree.set *)
let setNilConsTs: Test.t
= fun () ->
let chk (name, tree) = fun state ->
if Rtree.is_empty tree
then Test.fail name "rt is nil" state
else Test.succeed state
in
let tcs = [
"_", Rtree.set 0 Rtree.empty Var.u 1;
"O_", Rtree.set 0 Rtree.empty (Var.fromLeft Var.u) 1;
"I_", Rtree... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/test/datatypes/Rtree_t.ml | ocaml | Rtree.set
Rtree.find
Rtree.pathsGet | open Vpl
let setNilConsTs: Test.t
= fun () ->
let chk (name, tree) = fun state ->
if Rtree.is_empty tree
then Test.fail name "rt is nil" state
else Test.succeed state
in
let tcs = [
"_", Rtree.set 0 Rtree.empty Var.u 1;
"O_", Rtree.set 0 Rtree.empty (Var.fromLeft Var.u) 1;
"I_", Rtree.set 0 Rtree.emp... |
6b3ddd56955cce85bbcf6592c47f4b49a4fa72ac649409a9bfd3c090aa9b1e2a | ajhc/ajhc | Float.hs | # OPTIONS_JHC -fno - prelude -fffi -fm4 -funboxed - tuples #
module Prelude.Float(readDouble,doubleToDigits,doubleToRational) where
import Jhc.Basics
import Jhc.Class.Real
import Jhc.Float
import Jhc.List(length,notElem,take,elem)
import Jhc.Num
import Jhc.Numeric((^),(^^))
import Jhc.Order
import Jhc.Type.C
import... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/lib/jhc/Prelude/Float.hs | haskell | the real minimum exponent
Haskell requires that f be adjusted so denormalized numbers
will have an impossibly low exponent. Adjust for this.
the following will err on the low side. Ignoring
the fraction will make it err even more. | # OPTIONS_JHC -fno - prelude -fffi -fm4 -funboxed - tuples #
module Prelude.Float(readDouble,doubleToDigits,doubleToRational) where
import Jhc.Basics
import Jhc.Class.Real
import Jhc.Float
import Jhc.List(length,notElem,take,elem)
import Jhc.Num
import Jhc.Numeric((^),(^^))
import Jhc.Order
import Jhc.Type.C
import... |
fe2c17daa170472d57310599efcd7cedffa9493d92f69b3ce0a763818525dab5 | xvw/preface | bind.ml | open QCheck2
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.BIND with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) =
struct
module Functor = Functor.Suite (R) (F) (A) (B) (C)
module Laws = Preface_laws.Bind.For (F)
let print pp = Format.asprint... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/bind.ml | ocaml | open QCheck2
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.BIND with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) =
struct
module Functor = Functor.Suite (R) (F) (A) (B) (C)
module Laws = Preface_laws.Bind.For (F)
let print pp = Format.asprint... | |
94df354d08e2bbc0ddd00e95ac7308184c437924a5c92d37d1accd501bd2b7ef | sealchain-project/sealchain | Main.hs | # LANGUAGE LambdaCase #
module Main where
import Universum
import Data.Swagger (Swagger)
import Options.Applicative
import Cardano.Wallet.API (walletDocAPI)
import Pos.Chain.Update (ApplicationName (..), SoftwareVersion (..))
import Pos.Util.CompileInfo (C... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/generate-swagger-file/Main.hs | haskell | which require parsing a configuration file. This only to get a more-or-less
accurate string somewhere in the Swagger description about the software
version (e.g. cardano-sl:0). See previous commit for an example on how to
this if needed but for the sake of this tools, it only clutters its scope. | # LANGUAGE LambdaCase #
module Main where
import Universum
import Data.Swagger (Swagger)
import Options.Applicative
import Cardano.Wallet.API (walletDocAPI)
import Pos.Chain.Update (ApplicationName (..), SoftwareVersion (..))
import Pos.Util.CompileInfo (C... |
599e292cea0a9e984bd4619508f88d097ea0d073a52cf3acf656410cb061d26f | kazu-yamamoto/hhp | Hhp.hs | | The Happy Haskell Programming library .
-- API for commands.
module Hhp (
-- * Cradle
Cradle(..)
, findCradle
-- * Options
, Options(..)
, LineSeparator(..)
, OutputStyle(..)
, defaultOptions
-- * Types
, ModuleString
, Expression
-- * 'IO' utilities
, bootInfo
, browseModule
, ch... | null | https://raw.githubusercontent.com/kazu-yamamoto/hhp/b72793ef134f46fce3ecdbe4ec2cd50880cc3c70/lib/Hhp.hs | haskell | API for commands.
* Cradle
* Options
* Types
* 'IO' utilities
* Misc | | The Happy Haskell Programming library .
module Hhp (
Cradle(..)
, findCradle
, Options(..)
, LineSeparator(..)
, OutputStyle(..)
, defaultOptions
, ModuleString
, Expression
, bootInfo
, browseModule
, checkSyntax
, lintSyntax
, expandTemplate
, infoExpr
, typeExpr
, listModules
... |
bcc4ab32826966add6a242b8f399346cb315848454da4d849994681d8748fa8a | amnh/PCG | UnpackedBuild.hs | module Packing.UnpackedBuild (performBuild) where
import Packing.PackedBuild
import qualified Data.Map as M
import qualified Packing.BitPackedNode as BN
import qualified Data.Bits as B
import Component
import ReadFiles
import qualified Data.Vector as V
import Data.List
import Data.Word
import Data.Maybe
import Debug.T... | null | https://raw.githubusercontent.com/amnh/PCG/3a1b6bdde273ed4dc09717623986e1144b006904/prototype/Packing/UnpackedBuild.hs | haskell | | Master function to determine the mode and do all of the packing after checking for incorrect data types
("packed forest "++ show packForest)
| Function to correctly map the question mark to all characters
uses the charInfo as meaningful, but has a fall through in case
| Helper function to take string input and ... | module Packing.UnpackedBuild (performBuild) where
import Packing.PackedBuild
import qualified Data.Map as M
import qualified Packing.BitPackedNode as BN
import qualified Data.Bits as B
import Component
import ReadFiles
import qualified Data.Vector as V
import Data.List
import Data.Word
import Data.Maybe
import Debug.T... |
8ad1ec500f7cfbcab95f47da82b76201241cff093eafd8a197e251d11ce26643 | ocaml-ppx/ppx | ppx_driver_runner_as_ppx.ml | Ppx.Driver.run_as_ppx_rewriter ()
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/runner_as_ppx/ppx_driver_runner_as_ppx.ml | ocaml | Ppx.Driver.run_as_ppx_rewriter ()
| |
bb5bc8fafa7ec4d3c24f41c28c4e7a7847f419a2253bb513832cf3ef5ff4085a | nikita-volkov/rebase | Monad.hs | module Rebase.Control.Monad
(
module Control.Monad
)
where
import Control.Monad
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Control/Monad.hs | haskell | module Rebase.Control.Monad
(
module Control.Monad
)
where
import Control.Monad
| |
ebfd8adb961378bfd11eefd0b22e3a214d85b62db967a9dd20b1b024b90a82e3 | larrychristensen/orcpub | ua_warlock_and_wizard.cljc | (ns orcpub.dnd.e5.templates.ua-warlock-and-wizard
(:require [orcpub.dnd.e5.options :as opt5e]
[orcpub.dnd.e5.modifiers :as mod5e]
[orcpub.dnd.e5.character :as char5e]
[orcpub.dnd.e5.weapons :as weapon5e]
[orcpub.dnd.e5.units :as units5e]
[orcpub.modifiers :a... | null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/src/cljc/orcpub/dnd/e5/templates/ua_warlock_and_wizard.cljc | clojure | (ns orcpub.dnd.e5.templates.ua-warlock-and-wizard
(:require [orcpub.dnd.e5.options :as opt5e]
[orcpub.dnd.e5.modifiers :as mod5e]
[orcpub.dnd.e5.character :as char5e]
[orcpub.dnd.e5.weapons :as weapon5e]
[orcpub.dnd.e5.units :as units5e]
[orcpub.modifiers :a... | |
cf5e5dcdca79605ec61758d0c4fb42e7e3eeb693e94ac9b5ec516a1f0cdcfc05 | ggreif/omega | finally-llvm.hs | # LANGUAGE DataKinds , KindSignatures , MultiParamTypeClasses
, FlexibleInstances , GADTs , DeriveFunctor , StandaloneDeriving #
, FlexibleInstances, GADTs, DeriveFunctor, StandaloneDeriving #-}
module FinallyLLVM where
import GHC.TypeLits
import Control.Applicative
import Control.Monad (ap)
... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/finally-llvm.hs | haskell | (:=) :: repr -> repr -> repr
TEST
a free-monad like thingy to implement Block | # LANGUAGE DataKinds , KindSignatures , MultiParamTypeClasses
, FlexibleInstances , GADTs , DeriveFunctor , StandaloneDeriving #
, FlexibleInstances, GADTs, DeriveFunctor, StandaloneDeriving #-}
module FinallyLLVM where
import GHC.TypeLits
import Control.Applicative
import Control.Monad (ap)
... |
4e4aed632bb904e535188ada93d4c45cd266e0c48babd3caeb5d6e48d0971b4c | narimiran/AdventOfCode2017 | day21.ml | module Grid = struct
open CCFun
type t = bool array array
let of_string: (string -> t) =
let to_bool =
CCString.to_array %> Array.map (Char.equal '#') in
String.split_on_char '/' %> CCArray.of_list %> Array.map to_bool
let make size : t =
Array.make_matrix size size false
let flip (g: t) ... | null | https://raw.githubusercontent.com/narimiran/AdventOfCode2017/41d7bb5d8b6373aa309c1b300ad317a8f9a5c71b/ocaml/day21.ml | ocaml | module Grid = struct
open CCFun
type t = bool array array
let of_string: (string -> t) =
let to_bool =
CCString.to_array %> Array.map (Char.equal '#') in
String.split_on_char '/' %> CCArray.of_list %> Array.map to_bool
let make size : t =
Array.make_matrix size size false
let flip (g: t) ... | |
d3b23629a9a9ff0b043f5a0e892630660972b636badf0eed8b89878e85e59f76 | timoore/lpsg | allocator.lisp | ;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
(in-package #:lpsg)
(defgeneric open-allocator (allocator)
(:documentation "Prepare ALLOCATOR for allocation."))
(defgeneric allocate-target (allocator target size alignment)
(:documentation "Allocate SIZE storage with ALIGNMENT from a buffer object that will TARGET
... | null | https://raw.githubusercontent.com/timoore/lpsg/af2dcddb9d95c350a25e24da1f7dc53ce6d0f22b/lpsg/allocator.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
The freelist allocator seemed like a good idea at the time, but is probably unnecessary for
most buffer uses.
Obsolete. |
(in-package #:lpsg)
(defgeneric open-allocator (allocator)
(:documentation "Prepare ALLOCATOR for allocation."))
(defgeneric allocate-target (allocator target size alignment)
(:documentation "Allocate SIZE storage with ALIGNMENT from a buffer object that will TARGET
usage.
Returns values (buffer offset-in-buf... |
fe7f3cc92f1f8e3568b6fda5c22e5ba22deac721a154bcb13a2a26416a212633 | clojure-interop/java-jdk | core.clj | (ns javax.xml.ws.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[javax.xml.ws.Action])
(require '[javax.xml.ws.AsyncHandler])
(require '[javax.xml.ws.Binding])
(require '[javax.xml.ws.BindingProvider])
(require '[javax.xml.ws.BindingType])
(require '[javax.xml.ws.Dispatch])
(require '[... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/core.clj | clojure | (ns javax.xml.ws.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[javax.xml.ws.Action])
(require '[javax.xml.ws.AsyncHandler])
(require '[javax.xml.ws.Binding])
(require '[javax.xml.ws.BindingProvider])
(require '[javax.xml.ws.BindingType])
(require '[javax.xml.ws.Dispatch])
(require '[... | |
13f82778716bfc361334277c9c840ef3aff7f1bf33689ea098b4a6993cda60ba | koka-lang/koka | deriv.hs | -- Adapted from:
data Expr =
Val Int
| Var String
| Add Expr Expr
| Mul Expr Expr
| Pow Expr Expr
| Ln Expr
pown :: Int -> Int -> Int
pown a 0 = 1
pown a 1 = a
pown a n =
let b = pown a (n `div` 2) in
b * b * (if n `mod` 2 == 0 then 1 else a)
add :: Expr -> Expr -> Expr
add (Val n) (Val m) ... | null | https://raw.githubusercontent.com/koka-lang/koka/df177d5663dcaefb4c087458e6b6e6f5ae9e2a31/test/bench/haskell/deriv.hs | haskell | Adapted from: | data Expr =
Val Int
| Var String
| Add Expr Expr
| Mul Expr Expr
| Pow Expr Expr
| Ln Expr
pown :: Int -> Int -> Int
pown a 0 = 1
pown a 1 = a
pown a n =
let b = pown a (n `div` 2) in
b * b * (if n `mod` 2 == 0 then 1 else a)
add :: Expr -> Expr -> Expr
add (Val n) (Val m) = Val (n + m)
a... |
ea29178a93d138b8c5d483d628149a38e34d854ef503f0eca4e3624804722a95 | mfoemmel/erlang-otp | pman_options.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 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/pman/src/pman_options.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 1997 - 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(pman_options).
-export([dialog/3,... |
a2904c1439029e3d42f565044fea417ff2a553007f9d672c4bd5720106da79be | kindl/Hypatia | Qualification.hs | module Qualification where
import Syntax
import Prelude hiding (lookup)
import Data.HashMap.Strict(lookup, mapKeys, fromList)
import Data.Generics.Uniplate.Data(transformM, descendM, transformBi, transformBiM)
import Data.Foldable(foldMap')
import Control.Applicative(liftA2, liftA3)
import Control.Monad((>=>))
-- Qua... | null | https://raw.githubusercontent.com/kindl/Hypatia/79bedd3607c1839a41482e4d7b947976530b6602/src/Qualification.hs | haskell | Qualification is split into value level and type level,
Aliases are mixed:
Tuple2 might be a type or a value alias
Value Level
Qualify the bindings and expressions appearing in declarations
for example, combining the name from a declaration
and a signature should not result in a shadowing error.
Type Level
The... | module Qualification where
import Syntax
import Prelude hiding (lookup)
import Data.HashMap.Strict(lookup, mapKeys, fromList)
import Data.Generics.Uniplate.Data(transformM, descendM, transformBi, transformBiM)
import Data.Foldable(foldMap')
import Control.Applicative(liftA2, liftA3)
import Control.Monad((>=>))
othe... |
0840446f60ab4998b267e6ec3097a27f91563ef41e8102e0b495cb3697d3363c | abyala/advent-2021-clojure | day03_test.clj | (ns advent-2021-clojure.day03-test
(:require [clojure.test :refer :all]
[advent-2021-clojure.day03 :refer :all]))
(def test-input "00100\n11110\n10110\n10111\n10101\n01111\n00111\n11100\n10000\n11001\n00010\n01010")
(def puzzle-input (slurp "resources/day03_data.txt"))
(deftest part1-test
(are [expect... | null | https://raw.githubusercontent.com/abyala/advent-2021-clojure/c090205abb80f833a149dfa22e17fb5cf827bb5c/test/advent_2021_clojure/day03_test.clj | clojure | (ns advent-2021-clojure.day03-test
(:require [clojure.test :refer :all]
[advent-2021-clojure.day03 :refer :all]))
(def test-input "00100\n11110\n10110\n10111\n10101\n01111\n00111\n11100\n10000\n11001\n00010\n01010")
(def puzzle-input (slurp "resources/day03_data.txt"))
(deftest part1-test
(are [expect... | |
e574c66ec87ef97491bdc7c4a051f187943f4768f7dab91127c4bfc716a3459f | ghcjs/jsaddle-dom | CanvasRenderingContext2D.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CanvasRenderingContext2D
(save, restore, commit, scale, rotate, translate, transform,
setTransform, resetTr... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/CanvasRenderingContext2D.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/CanvasRenderingContext2D.transform Mozilla CanvasRenderingContext2D.transform documentation>
| <-US/docs/Web/API/CanvasRenderingContext2D.isPointInPath Mozilla CanvasRenderingContext2D.isPointInPath docum... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CanvasRenderingContext2D
(save, restore, commit, scale, rotate, translate, transform,
setTransform, resetTransform, setLineDash, getLineDash,
getLineDash_, clearRect, fillRect, beginPath, fillPath, ... |
d8c068f263ebebe339351e3818f53c49303f599fb5f7893946bd31288fd18501 | metabase/metabase | malli_test.clj | (ns ^:mb/once metabase.util.malli-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[malli.core :as mc]
[malli.error :as me]
[metabase.test :as mt]
[metabase.util.i18n :refer [deferred-tru]]
[metabase.util.malli :as mu]
[metabase.util.malli.describe :as umd]))
... | null | https://raw.githubusercontent.com/metabase/metabase/eab2af99ed4b974ad94047259b187422be604bd4/test/metabase/util/malli_test.clj | clojure | (ns ^:mb/once metabase.util.malli-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[malli.core :as mc]
[malli.error :as me]
[metabase.test :as mt]
[metabase.util.i18n :refer [deferred-tru]]
[metabase.util.malli :as mu]
[metabase.util.malli.describe :as umd]))
... | |
a77cb9b9839a9033e914768ebd7d2efdbd1be71f03d921f50cb31e966c6efeec | yogeshsajanikar/hspark | Context.hs | -- |
Module : Spark . Context
--
-- Context defines the stratum on which the distributed process will
-- be based.
module Spark.Context where
import Control.Distributed.Process
import Control.Distributed.Static
data Strategy = Distributed { masterNode :: NodeId
, slaveNodes :: [NodeId] ... | null | https://raw.githubusercontent.com/yogeshsajanikar/hspark/43e150ec38a62be3d14a7072787d1a8992f1841e/src/Spark/Context.hs | haskell | |
Context defines the stratum on which the distributed process will
be based.
| Context for creating spark workflow.
list of peers (slaves) where the tasks can be run. The peers, in
the context of Distributed.Process are nodes on which tasks can
run.
| Creates context from slave nodes
| Creates the context.
... | Module : Spark . Context
module Spark.Context where
import Control.Distributed.Process
import Control.Distributed.Static
data Strategy = Distributed { masterNode :: NodeId
, slaveNodes :: [NodeId] }
Defines the context for processing RDD tasks . The context stores
data Context = Cont... |
8a5f92489f612163d27b80b4182941be724eeff653f854ca59a844f8d7ab0430 | tallaproject/onion | onion_time.erl | %%%
Copyright ( c ) 2016 The Talla Authors . All rights reserved .
%%% Use of this source code is governed by a BSD-style
%%% license that can be found in the LICENSE file.
%%%
%%% -----------------------------------------------------------
@author < >
%%% @doc Time Utility API
%%%
%%% @end
%%% -----------------... | null | https://raw.githubusercontent.com/tallaproject/onion/d0c3f86c726c302744d3cfffa2de21f85c190cf0/src/onion_time.erl | erlang |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-----------------------------------------------------------
@doc Time Utility API
@end
-----------------------------------------------------------
API.
@doc Get current UNIX epoch.
@doc Convert UNIX epoch to ca... | Copyright ( c ) 2016 The Talla Authors . All rights reserved .
@author < >
-module(onion_time).
-export([epoch/0,
from_epoch/1,
to_epoch/1
]).
-include("onion_test.hrl").
calendar : datetime_to_gregorian_seconds({{1970 , 1 , 1 } , { 0 , 0 , 0 } } ) .
-define(EPOCH, 62167219200).
-... |
c636fae4fb0d2a249d57f5b5a40b8afd570e5f58199936be4d6d00d8a6fd48ab | mransan/ocaml-protoc | pb_typing_recursion.mli |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... | null | https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/compilerlib/pb_typing_recursion.mli | ocaml | * Mutually recursive type resolution
* [group types] returns the list of all the mutually recursive group
of types in reverse order of dependency. In other the last group of
types of the returned list don't depend on any other types. |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... |
b82298991adf24bf322132c05cee8b4a6116ec181c8ea2d761d174d16c63bd8b | Soostone/hs-d3 | Layout.hs | ------------------------------------------------------------------------------
-- | Layout primitives.
------------------------------------------------------------------------------
# LANGUAGE ExtendedDefaultRules #
{-# LANGUAGE QuasiQuotes #-}
# OPTIONS_GHC -fno - warn - type - defaults #
module Graphics... | null | https://raw.githubusercontent.com/Soostone/hs-d3/fb319ba444e263d7bc9655436db2723115a01c46/src/Graphics/HSD3/Chart/Layout.hs | haskell | ----------------------------------------------------------------------------
| Layout primitives.
----------------------------------------------------------------------------
# LANGUAGE QuasiQuotes #
----------------------------------------------------------------------------
| A graph's anchor in it's curre... |
# LANGUAGE ExtendedDefaultRules #
# OPTIONS_GHC -fno - warn - type - defaults #
module Graphics.HSD3.Chart.Layout where
import Language.Javascript.JMacro
import Graphics.HSD3.Chart.Base
import Graphics.HSD3.D3
data Anchor = Top | RightSide | Bottom | LeftSide
anchor :: Anchor -> Chart a ()
anchor Bottom = d... |
b8af72e503b7022ce03446b27ca152a2e633c5a6d89d3a75955ce6f212fbc5c9 | bhk/scam | memo-q.scm | (require "core.scm")
(require "io.scm")
(require "string.scm")
(require "memo.scm" &private)
(define TMPDIR (get-tmp-dir "memo-q.XXXX"))
(define db-file (.. TMPDIR "db.txt"))
Utilities
(define (showdb)
(print "memo-db:")
(foreach (pair *memo-db*)
(printf " %q" pair))
nil)
(define *log* nil)
Increm... | null | https://raw.githubusercontent.com/bhk/scam/59d7c02e673f1faebd0b7625d8c595daaa5efc51/memo-q.scm | scheme |
Assert: Tag is successfully saved/restored on session exit/entry, and
does not pollute DB.
top-level does).
----------------------------------------------------------------
Pure function
----------------------------------------------------------------
include some potentially problematic encoding cases
results a... | (require "core.scm")
(require "io.scm")
(require "string.scm")
(require "memo.scm" &private)
(define TMPDIR (get-tmp-dir "memo-q.XXXX"))
(define db-file (.. TMPDIR "db.txt"))
Utilities
(define (showdb)
(print "memo-db:")
(foreach (pair *memo-db*)
(printf " %q" pair))
nil)
(define *log* nil)
Increm... |
b20cb61c65b7a423ea7e0570883a62fe2be7e140d146642a4faa270faee5e6f7 | Helium4Haskell/helium | ForgetClose.hs | main = (3, 4
f x = x
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/ForgetClose.hs | haskell | main = (3, 4
f x = x
| |
1ff1892097a3f5e426f48b5856fa10b1e3b2c67069e8d2bce9f331bfd9eb2281 | Eduap-com/WordMat | bessel.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/bessel.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
expanded in terms o... |
(in-package :maxima)
(declare-top (special $hypergeometric_representation))
When non - NIL , the functions of half - integral order are
(defmvar $besselexpand nil)
When T Bessel functions with an integer order are reduced to order 0 and 1
(defmvar $bessel_reduce nil)
If E is a maxima ratio with a denomin... |
e6e4c08949b6eb3201a0c4543a8467fc1623e3fbf8481b773eaa4597a121b8fa | AbstractMachinesLab/caramel | Cmts.ml | (**************************************************************************)
(* *)
(* OCamlFormat *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocamlformat-0.17.0/lib/Cmts.ml | ocaml | ************************************************************************
OCamlFormat
... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in
module Format = Format_
open Migrate_ast
open Parsetree
type t =
{ debug: bool
; mutable cmts_before: Cmt.t Multimap.M(Location).t
; mutable cmts_after: Cmt.t ... |
ab7cbdfbedde44666901f161fcc355c2da8809d3fc7c96020b5cb882d7cde2e9 | basho/riak_cs | riak_cs_wm_object_upload_part.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_object_upload_part.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
... |
9b719cd3d2fc4ff386e49ad4fadf47d6374e7ba284d2f633eba9511ac922c275 | elaforge/karya | MridangamTirmanam.hs | Copyright 2020
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# LANGUAGE RecordWildCards #
module Solkattu.Score.MridangamTirmanam where
import Prelude hiding ((.), repeat)
import qualified Solkattu.Tala as Tala
import Solkattu... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Solkattu/Score/MridangamTirmanam.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2020
# LANGUAGE RecordWildCards #
module Solkattu.Score.MridangamTirmanam where
import Prelude hiding ((.), repeat)
import qualified Solkattu.Tala as Tala
import Solkattu.Dsl.Mridangam
tir_short_adi :: Korvai
tir_short_adi = tirmanam $ korvaiS adi
[ __D 1 . tri_ (p&u.__.k.k.o)... |
b42390b5512ab63a99a679f459f0929a6d309ae89ffece041528acc3cfb9801d | alexwl/haskell-code-explorer | CompileTest.hs | {-# LANGUAGE ScopedTypeVariables, GADTs #-}
import System.Environment (getArgs)
import System.Directory
import System.FilePath
import System.Process
import System.Exit
import System.IO
import Control.Exception as E
import Data.List
import Data.Maybe
import Data.Version
import Data.Functor
import Data.Function
import q... | null | https://raw.githubusercontent.com/alexwl/haskell-code-explorer/2f1c2a4c87ebd55b8a335bc4670eec875af8b4c4/vendor/cabal-helper-0.8.1.2/tests/CompileTest.hs | haskell | # LANGUAGE ScopedTypeVariables, GADTs #
"1.14.0" -- not supported at runtime |
import System.Environment (getArgs)
import System.Directory
import System.FilePath
import System.Process
import System.Exit
import System.IO
import Control.Exception as E
import Data.List
import Data.Maybe
import Data.Version
import Data.Functor
import Data.Function
import qualified Distribution.Compat.ReadP as Dist
i... |
414a9d87562b2983475db6ecc62fda8ff1023ece83fda24e139d30b7c980ce42 | goldfirere/singletons | T401b.hs | module T401b where
import Data.Singletons.TH
$(singletons [d|
newtype T where
MkT :: (forall a. a) -> T
|])
| null | https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Singletons/T401b.hs | haskell | module T401b where
import Data.Singletons.TH
$(singletons [d|
newtype T where
MkT :: (forall a. a) -> T
|])
| |
01bbb0b3086c315092d168216be7b49dc6f56b40ecb3f2e19a9f77f2e74ebfe4 | erlang/rebar3 | rebar_dist_utils_SUITE.erl | %%% This suite currently only tests for options parsing since we do
%%% not know if epmd will be running to actually boot nodes.
-module(rebar_dist_utils_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
all() -> [from_config, from_cli, overlap, from_con... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_dist_utils_SUITE.erl | erlang | This suite currently only tests for options parsing since we do
not know if epmd will be running to actually boot nodes.
Make sure that CLI config takes over rebar config without clash for names, though
cookies can pass through
running as a profile does not create name clashes | -module(rebar_dist_utils_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
all() -> [from_config, from_cli, overlap, from_config_profile].
init_per_testcase(_, Config0) ->
Config = rebar_test_utils:init_rebar_state(Config0),
AppDir = ?config(app... |
e948121128761692016d06a51b71a402111820fc93e4daefa9bcd0dddfa7b294 | Clozure/ccl-tests | modules8b.lsp | (in-package :cl-test)
(defun modules8b-fun () :also-good)
| null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/modules8b.lsp | lisp | (in-package :cl-test)
(defun modules8b-fun () :also-good)
| |
d3d7b03421eb793c82b573f98e2457611f71a36050d077c8c62a311d4360b7e8 | wh5a/thih | SourceThih.hs | -----------------------------------------------------------------------------
SourceThih : encoding of Typing Haskell in Haskell source
--
Part of ` Typing Haskell in ' , version of November 23 , 2000
Copyright ( c ) and the Oregon Graduate Institute
of Science and Technology , 1999 - 2000
--... | null | https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/src/SourceThih.hs | haskell | ---------------------------------------------------------------------------
in the file "License" that is included in the distribution
of this software, copies of which may be obtained from:
/~mpj/thih/
---------------------------------------------------------------------------
------------... | SourceThih : encoding of Typing Haskell in Haskell source
Part of ` Typing Haskell in ' , version of November 23 , 2000
Copyright ( c ) and the Oregon Graduate Institute
of Science and Technology , 1999 - 2000
This program is distributed as Free Software under the terms
module SourceThih w... |
b4e18abec8563ba77490c98f9dcca57645d4c13c09650c0a93e2bb626cfa9602 | ocramz/heidi | GenericTrie.hs |
{-# language DeriveTraversable #-}
# language GeneralizedNewtypeDeriving #
# language LambdaCase #
# language RankNTypes #
# options_ghc -Wno - unused - imports #
-----------------------------------------------------------------------------
-- |
Module : . Data . Row .
Description : A sparse datafram... | null | https://raw.githubusercontent.com/ocramz/heidi/153b3ffbf56f5b95929a0c68850b61e1e6ad3722/src/Heidi/Data/Row/GenericTrie.hs | haskell | # language DeriveTraversable #
---------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Rows are internally represented with prefix trees ("tries"), as provided by the
@generic-trie@ library; in addition to supporting the possibility of mis... |
# language GeneralizedNewtypeDeriving #
# language LambdaCase #
# language RankNTypes #
# options_ghc -Wno - unused - imports #
Module : . Data . Row .
Description : A sparse dataframe row , based on
Copyright : ( c ) ( 2018 - 2019 )
Maintainer : ocramz fripost org
Portability : G... |
621e2a018c6249af92d568b891ce6c212ce4ffcfe35fb30adb73a68a9ff9d689 | naoiwata/sicp | q2.30.scm | ;; @author naoiwata
SICP Chapter2
question 2.30
; Mapping over trees
(define (scale-tree tree factor)
(cond
((null? tree)
())
((not (pair? tree))
(* tree factor))
(else
(cons
(scale-tree (car tree) factor)
(scale-tree (cdr tree) factor)))))
(print
(scale-tree (list 1 (list 2 (list 3 4) ... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/q2.30.scm | scheme | @author naoiwata
Mapping over trees
question
be abstruct this map procedure
test
test
ADDED
Define square-tree both directly (i.e., without using any higher-order procedures) and also by using map and recursion.
test
test
END | SICP Chapter2
question 2.30
(define (scale-tree tree factor)
(cond
((null? tree)
())
((not (pair? tree))
(* tree factor))
(else
(cons
(scale-tree (car tree) factor)
(scale-tree (cdr tree) factor)))))
(print
(scale-tree (list 1 (list 2 (list 3 4) 5) (list 6 7)) 10))
( 10 ( 20 ( 30 40 )... |
7f18df0f10b7f9937457a5c3ecf02121f5aa0ea5e67ad890a05b4e7784a79701 | mirage/conan | generate.ml | #load "unix.cma"
let pp_filename ppf str = Format.fprintf ppf "%s" str
let pp_module ppf str =
Format.fprintf ppf "%s" Filename.(basename (remove_extension str))
let pp_sep ppf () = Format.fprintf ppf "@ "
let pp_list ~sep:pp_sep pp ppf lst =
let rec go = function
| [] -> ()
| [ x ] -> pp ppf x
| x ... | null | https://raw.githubusercontent.com/mirage/conan/fb144c7785ff0aa4ec6d8c87e58ca2a0c2d328db/standalone/generate.ml | ocaml | #load "unix.cma"
let pp_filename ppf str = Format.fprintf ppf "%s" str
let pp_module ppf str =
Format.fprintf ppf "%s" Filename.(basename (remove_extension str))
let pp_sep ppf () = Format.fprintf ppf "@ "
let pp_list ~sep:pp_sep pp ppf lst =
let rec go = function
| [] -> ()
| [ x ] -> pp ppf x
| x ... | |
0cfd6a8225305fc3c3cfac482e5e31f118b9d372a8d8276e215f4b15bcae1f75 | kawasima/darzana | okhttp.clj | (ns darzana.http-client.okhttp
(:require [integrant.core :as ig]
[clojure.string :as string]
[cheshire.core :as json]
[ring.util.codec :as codec]
[darzana.http-client :as http-client])
(:import [okhttp3 OkHttpClient
Callback
MediaType
... | null | https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/src/darzana/http_client/okhttp.clj | clojure | (ns darzana.http-client.okhttp
(:require [integrant.core :as ig]
[clojure.string :as string]
[cheshire.core :as json]
[ring.util.codec :as codec]
[darzana.http-client :as http-client])
(:import [okhttp3 OkHttpClient
Callback
MediaType
... | |
1ca809cbebce3082c65d78605a96ff548574cf1839695c4661f7f0d58df53e88 | thephoeron/quipper-language | Template.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- | This module provides the public interface to... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Libraries/Template.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
| This module provides the public interface to the template lifting
lift this to another declaration or expression, with all functions... | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
library . It provides functions that input a declaration or
expression ( in the form of a abstract syntax tree ) , and
This can be combined with Template Haskell to convert source code
to abstract syntax trees and vice versa .
mo... |
8533fdb8f84835399728663a59f917a94c9de88f2c7daa1708f9797b96600d67 | uber/queryparser | Test.hs | Copyright ( c ) 2017 Uber Technologies , Inc.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
-- to use, copy, modify, mer... | null | https://raw.githubusercontent.com/uber/queryparser/6015e8f273f4498326fec0315ac5580d7036f8a4/test/Database/Sql/Util/Schema/Test.hs | haskell |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice ... | Copyright ( c ) 2017 Uber Technologies , Inc.
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K... |
92d3a5296beea01274009caa4208ca020319e56c8849d3cee0035b74e6261cfe | returntocorp/semgrep | dots_params.ml | (* ERROR: match *)
let foo a = 1
(* ERROR: match *)
let bar a b = 1
let bar2 a b = 2
| null | https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/patterns/ocaml/dots_params.ml | ocaml | ERROR: match
ERROR: match | let foo a = 1
let bar a b = 1
let bar2 a b = 2
|
2c9a14ac05a0e8d700ae6ce5fca45e73b30a556b8298a2a6b2131e7f4ee48d55 | johnlawrenceaspden/hobby-code | project.clj | (defproject hello "0.0.0"
:plugins [[cider/cider-nrepl "0.25.2"]]
:global-vars {*print-length* 150 *print-level* 100}
:dependencies [[org.clojure/clojure "1.10.1"]]
)
| null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/clojure2020/project.clj | clojure | (defproject hello "0.0.0"
:plugins [[cider/cider-nrepl "0.25.2"]]
:global-vars {*print-length* 150 *print-level* 100}
:dependencies [[org.clojure/clojure "1.10.1"]]
)
| |
e0240c5d03249bd3b930ea3c1744d7af57a9e1f3db63b8341adfc0e4d4e3a57e | AllAlgorithms/haskell | Self-Balancing-BinaryTree.hs | -- /~madhavan/courses/prog2-2012/lectures/balanced-search-trees-in-haskell.txt
data Tree a = Empty | Node Int (Tree a) a (Tree a)
instance (Show a) => Show (Tree a) where
show = showTree
instance Functor Tree where
-- fmap :: (a->b) -> Tree a -> Tree b
fmap f Empty = Empty
fmap f (Node h l v r) = Node h (fm... | null | https://raw.githubusercontent.com/AllAlgorithms/haskell/66611c3abad036db962d6d299dcb39c18b1b3cf8/algorithms/data-structures/Self-Balancing-BinaryTree.hs | haskell | /~madhavan/courses/prog2-2012/lectures/balanced-search-trees-in-haskell.txt
fmap :: (a->b) -> Tree a -> Tree b
Usage |
data Tree a = Empty | Node Int (Tree a) a (Tree a)
instance (Show a) => Show (Tree a) where
show = showTree
instance Functor Tree where
fmap f Empty = Empty
fmap f (Node h l v r) = Node h (fmap f l) (f v) (fmap f r)
showTree Empty = ""
showTree n@(Node i _ _ _) = go i n
where
go _ Empty = ""
... |
77789aed815d4d9e1d168ed189d5c4ce7f045dc4c91d03642a958a53803e853a | SimulaVR/godot-haskell | AudioEffectCompressor.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AudioEffectCompressor
(Godot.Core.AudioEffectCompres... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/AudioEffectCompressor.hs | haskell | | Gain applied to the output signal.
| Gain applied to the output signal.
| Reduce the sound level using another audio bus for threshold detection.
| Reduce the sound level using another audio bus for threshold detection.
| The level above which compression is applied to the audio. Value can range from -60 to 0.
... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.AudioEffectCompressor
(Godot.Core.AudioEffectCompres... |
c40191262e9ea54a8b33b78fc1a1748d53f1a4368178fbdc497554164ec6964c | karlhof26/gimp-scheme | sg-copy-mask-from-above.scm | ; 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 distributed in the hope that it will be useful,
; ... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/b70258ee08394321a0eba0aa566b546c4c6e27ff/sg-copy-mask-from-above.scm | scheme | 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 ... | it under the terms of the GNU General Public License as published by
(define (script-fu-sg-copy-mask-from-above image layer)
(gimp-image-undo-group-start image)
(set! layer (car (gimp-image-get-active-layer image)))
(unless (= (car (gimp-layer-get-mask layer)) -1)
(gimp-image-remove-layer-mask i... |
56580f5b26627b1f7673ec492a227b4f498017d4e777defd004dfa015210c501 | defunkydrummer/abcl-jazz | swing-test.lisp | ;; -------------------------------------------------------------------------------------
;; SAMPLE APPS
;; -------------------------------------------------------------------------------------
;; Partial rewrite of
(defun notepad-app ()
(let*
((f
(frame "Notepad App" 640 480))
(status-bar
... | null | https://raw.githubusercontent.com/defunkydrummer/abcl-jazz/b5a2b72892d344bfc539769eca449a63243148bc/swing-test.lisp | lisp | -------------------------------------------------------------------------------------
SAMPLE APPS
-------------------------------------------------------------------------------------
Partial rewrite of
textarea
Here we go...
menu bar
right-click popup menu
to text area
caretlistener for text area
simple app... |
(defun notepad-app ()
(let*
((f
(frame "Notepad App" 640 480))
(status-bar
(label "|| Ln 1, Col 1 " +align-right+))
(textarea "" 30 60))
(not-implemented
(lambda (e)
(declare (ignore e))
(show-warning-message f "Not Implemented"))))... |
90dda557205c37dcd78604b657825cb3781d12d2b1571779ba83d81312d10432 | jeffshrager/biobike | utils.lisp | -*- Package : pb ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :pb)
(defun pubid->pubframe (id)
(frame-fnamed (formatn "Pub.~D" id)))
(defun year->year-frame (year)
(frame-fnamed (format nil "year.~a" year)))
| null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Trbl/utils.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- |
(in-package :pb)
(defun pubid->pubframe (id)
(frame-fnamed (formatn "Pub.~D" id)))
(defun year->year-frame (year)
(frame-fnamed (format nil "year.~a" year)))
|
f79ffa7cc2263e7ee028aa1d8e52423bd468e072c07f6a75dacc535293a019ec | danieljharvey/mimsa | Convert.hs | module Smol.Core.Interpreter.Convert (fromExpr, toExpr) where
import Control.Monad.Identity
import qualified Data.Map.Strict as M
import Data.Set (Set)
import qualified Data.Set as S
import Smol.Core.ExprUtils
import Smol.Core.Interpreter.Types
import Smol.Core.Types
swapOutVar :: Identifier -> Expr Identity ann -> E... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/7931b803a9f7e71ff47dc9afa7dc6bceaeb238ee/smol-core/src/Smol/Core/Interpreter/Convert.hs | haskell | we end up with lots of `{ varName: varName }.varName , this turns them back
into `varName` | module Smol.Core.Interpreter.Convert (fromExpr, toExpr) where
import Control.Monad.Identity
import qualified Data.Map.Strict as M
import Data.Set (Set)
import qualified Data.Set as S
import Smol.Core.ExprUtils
import Smol.Core.Interpreter.Types
import Smol.Core.Types
swapOutVar :: Identifier -> Expr Identity ann -> E... |
048bbbe2babdde11ffc667941b27e5309a751a09b66b8496a8eb6e413b5fb5ab | soulomoon/haskell-katas | FundamentalMonads.hs | module Kyu4.FundamentalMonads where
import Prelude hiding (Monad, Identity, Maybe(..), State, Reader, Writer)
import Data.Monoid
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
data Identity a = Identity a
deriving (Show, Eq)
data Maybe a = Nothing | Just a
deriving (Show, Eq)
data... | null | https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/src/Kyu4/FundamentalMonads.hs | haskell | module Kyu4.FundamentalMonads where
import Prelude hiding (Monad, Identity, Maybe(..), State, Reader, Writer)
import Data.Monoid
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
data Identity a = Identity a
deriving (Show, Eq)
data Maybe a = Nothing | Just a
deriving (Show, Eq)
data... | |
8fd36eca770ae1eb5d6b8ca17652543463caa01259d6f30818952928a5e16601 | geophf/1HaskellADay | Solution.hs | module Y2021.M03.D05.Solution where
-
' Shell scripting ' is the name of the game for today .
Today we 're going to build a application that interacts with the
shell , or ' command line , ' if you prefer .
Specifically , we 're creating the application ' i m ' that has this interaction :
$ i m Hello ,... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M03/D05/Solution.hs | haskell | }
asks 'name' how they are.
use the file im.hs in this directory to create your shell ... um: 'script.'
BONUS -------------------------------------------------------
tailor (swift?) the response based upon that context, if you want to get
fancy. | module Y2021.M03.D05.Solution where
-
' Shell scripting ' is the name of the game for today .
Today we 're going to build a application that interacts with the
shell , or ' command line , ' if you prefer .
Specifically , we 're creating the application ' i m ' that has this interaction :
$ i m Hello ,... |
d803db7b5176f49032acaee5ca308582465a457188c49932e0acc0ca180c37d3 | sbcl/sbcl | system.lisp | ;;;; ARM VM definitions of various system hacking operations
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is i... | null | https://raw.githubusercontent.com/sbcl/sbcl/971576bde9552bb3eefd2a1a7685d2bca2464c41/src/compiler/arm/system.lisp | lisp | ARM VM definitions of various system hacking operations
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Type frobbing VOPs
If it wasn't a fixnum, start with the full widetag.
Now, we have ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-VM")
(define-vop (widetag-of)
(:translate widetag-of)
(:policy :fast-safe)
(:args (object :scs (desc... |
001872172ee74c4c6beb650d4fc767e4f7f6e97850670aa8fc2ac2b2355d52a8 | stan-dev/stanc3 | Pedantic_analysis.mli | open Middle
type warning_span = Location_span.t * string
val warn_pedantic : Program.Typed.t -> warning_span list
(**
Collect all pedantic mode warnings and print to a string.
*)
val warn_uninitialized : Program.Typed.t -> warning_span list
(**
Collect warnings about each variable which is used before being in... | null | https://raw.githubusercontent.com/stan-dev/stanc3/86267798050f9a24f61263b0825f1d44395040db/src/analysis_and_optimization/Pedantic_analysis.mli | ocaml | *
Collect all pedantic mode warnings and print to a string.
*
Collect warnings about each variable which is used before being initialized and print to a string.
| open Middle
type warning_span = Location_span.t * string
val warn_pedantic : Program.Typed.t -> warning_span list
val warn_uninitialized : Program.Typed.t -> warning_span list
|
dec227aff66b438030ab9eef0a54fe54bb58bd0ec4bab7525ef3ecc95d6df49d | TristanCacqueray/Haxible | rescue.hs | #!/usr/bin/env cabal
-- Generated with haxible
# LANGUAGE QuasiQuotes , , OverloadedStrings #
cabal :
build - depends : base , haxible
ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T
build-depends: base, haxible
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-}
modul... | null | https://raw.githubusercontent.com/TristanCacqueray/Haxible/2097a9e7b843d96d718d8bb1f0f10e24a2a9beb4/test/playbooks/rescue.hs | haskell | Generated with haxible | #!/usr/bin/env cabal
# LANGUAGE QuasiQuotes , , OverloadedStrings #
cabal :
build - depends : base , haxible
ghc - options : -threaded -rtsopts -with - rtsopts=-N -with - rtsopts=-T
build-depends: base, haxible
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-}
module Main (main) where
impor... |
82ad9cde164121ceb6fb621ad33792eb1731dee2074ae6f224d170ad3aacec60 | c4-project/c4f | payload_impl.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/src/payload_impl.mli | ocaml | * Stock payloads.
See {!Payload_types.S} for the shape of an payload.
* Dummy payload module for actions that take no payload.
* Adapts payload generators that don't depend on a generation context.
* Type of pathed payloads.
* [make payload ~where] makes a payload that expresses the desire to
apply [payl... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
88070f27ebc1f00f56667c24b48482e0efdffe28861423ed31746cc1b38b79bc | exercism/clojure | tracks_on_tracks_on_tracks.clj | (ns tracks-on-tracks-on-tracks)
(defn new-list
"Creates an empty list of languages to practice."
[]
)
(defn add-language
"Adds a language to the list."
[lang-list lang]
)
(defn first-language
"Returns the first language on the list."
[lang-list]
)
(defn remove-language
"Removes the first languag... | null | https://raw.githubusercontent.com/exercism/clojure/21dd63dd72b0fd196e0d77d3c750bb99da34c14b/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj | clojure | (ns tracks-on-tracks-on-tracks)
(defn new-list
"Creates an empty list of languages to practice."
[]
)
(defn add-language
"Adds a language to the list."
[lang-list lang]
)
(defn first-language
"Returns the first language on the list."
[lang-list]
)
(defn remove-language
"Removes the first languag... | |
5598ec97696d7483bb6c5802e690d4ba4b44e59d30baa4bbbb06e9b6dd3de4a5 | gothinkster/clojurescript-reframe-realworld-example-app | views.cljs | (ns conduit.views
(:require [reagent.core :as reagent]
[re-frame.core :refer [subscribe dispatch]]
[clojure.string :as str :refer [trim split]]))
;; -- Helpers -----------------------------------------------------------------
;;
(defn format-date
[date]
(.toDateString (js/Date. date)))
... | null | https://raw.githubusercontent.com/gothinkster/clojurescript-reframe-realworld-example-app/20d28a7ae3f38659f6fed848dc376d8a71587640/src/conduit/views.cljs | clojure | -- Helpers -----------------------------------------------------------------
defined in Helpers section
-- Header ------------------------------------------------------------------
-- Footer ------------------------------------------------------------------
-- Home ----------------------------------------------... | (ns conduit.views
(:require [reagent.core :as reagent]
[re-frame.core :refer [subscribe dispatch]]
[clojure.string :as str :refer [trim split]]))
(defn format-date
[date]
(.toDateString (js/Date. date)))
(defn tags-list
[tags-list]
[:ul.tag-list
(for [tag tags-list]
^{:key t... |
ab2e07650de6fb409a25699fda261d303241ba5d47e52653fdc212414d0e982c | ajtulloch/dnngraph | Demo.hs | {-# LANGUAGE OverloadedStrings #-}
module NN.Examples.Demo where
import Control.Lens
import Control.Monad
import Gen.Caffe.LayerParameter as LP
import Gen.Caffe.NetParameter as NP
import GHC.IO.Handle
import System.IO.Temp
import System.Process
im... | null | https://raw.githubusercontent.com/ajtulloch/dnngraph/152f45780f3c4e9204cf4e129017df4394df662c/NN/Examples/Demo.hs | haskell | # LANGUAGE OverloadedStrings # | module NN.Examples.Demo where
import Control.Lens
import Control.Monad
import Gen.Caffe.LayerParameter as LP
import Gen.Caffe.NetParameter as NP
import GHC.IO.Handle
import System.IO.Temp
import System.Process
import Text.Printf
import ... |
e207dab35268a5be2dc0b512709561277072caa93f2b85976942fa9d2df59a39 | hasktorch/ffi-experimental | TensorList.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module ATen.Unmanaged.Type.TensorList where
import qualified Language.C.Inline.Cpp as C
imp... | null | https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/ATen/Unmanaged/Type/TensorList.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module ATen.Unmanaged.Type.TensorList where
import qualified Language.C.Inline.Cpp as C
import qualified Language.C.Inline.Cpp... |
9ed6e9d0bd2bc34214e88239c8dc20bac206ce1ca0d8aeb7f235693d83587ea3 | pink-gorilla/pinkie | snippets.cljs | (ns demo.snippets
(:require
[reagent.core :as r]))
(defonce v (r/atom 20))
(def js-demo
[:div
[:p "small"]
[:p/add-one-js {:data {:nr 10 :color "yellow"} :box :sm}]
[:p "md medium"]
[:p/add-one-js {:data {:nr 100 :color "red"} :box :md}]
[:p "lg large"]
[:p/add-one-js {:data {:nr 100 :color "... | null | https://raw.githubusercontent.com/pink-gorilla/pinkie/83f47f5cf793e24ab97f2c3716b7c8585d487976/profiles/demo/src/demo/snippets.cljs | clojure | (ns demo.snippets
(:require
[reagent.core :as r]))
(defonce v (r/atom 20))
(def js-demo
[:div
[:p "small"]
[:p/add-one-js {:data {:nr 10 :color "yellow"} :box :sm}]
[:p "md medium"]
[:p/add-one-js {:data {:nr 100 :color "red"} :box :md}]
[:p "lg large"]
[:p/add-one-js {:data {:nr 100 :color "... | |
1cc66ff91a252e9e393f7665c32783c71fb42989dd43d4ce2579690ec3561c4c | ocamllabs/ocaml-modular-implicits | b2.ml | open A
let f =
L.map S.capitalize
let () =
L.iter print_endline (f ["jacques"; "garrigue"])
module C : sig module L : module type of List end = struct include A end
(* The following introduces a (useless) dependency on A:
module C : sig module L : module type of List end = A
*)
(* No dependency on D *)
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/typing-modules/b2.ml | ocaml | The following introduces a (useless) dependency on A:
module C : sig module L : module type of List end = A
No dependency on D | open A
let f =
L.map S.capitalize
let () =
L.iter print_endline (f ["jacques"; "garrigue"])
module C : sig module L : module type of List end = struct include A end
|
18e57d9aadec26d099b21877cef22c52fec41dc03e007abe84e422c87cfbf8db | andrewMacmurray/haskell-book-solutions | IdentityFold.hs | module Ch20.IdentityFold where
data Identity a =
Identity a
deriving (Eq, Show)
-- Identity foldable less about combining values into a summary value
more about consuming the value inside the Identity constructor
instance Foldable Identity where
foldr f x (Identity a) = f a x
foldl f x (Identity a) = f x a
... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch20/IdentityFold.hs | haskell | Identity foldable less about combining values into a summary value | module Ch20.IdentityFold where
data Identity a =
Identity a
deriving (Eq, Show)
more about consuming the value inside the Identity constructor
instance Foldable Identity where
foldr f x (Identity a) = f a x
foldl f x (Identity a) = f x a
foldMap f (Identity a) = f a
|
69b2d11cae9d1f9581675ae22523b8a49643e41eefb7896277d019c44a931bd7 | symbiont-io/detsys-testkit | Agenda.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scheduler.Agenda where
import Data.Heap (Entry(Entry), Heap)
import qualified Data.Heap as Heap
import Data.List (foldl')
import Scheduler.Event
import StuntDouble.Time
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/src/Scheduler/Agenda.hs | haskell | ---------------------------------------------------------------------- | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scheduler.Agenda where
import Data.Heap (Entry(Entry), Heap)
import qualified Data.Heap as Heap
import Data.List (foldl')
import Scheduler.Event
import StuntDouble.Time
newtype Agenda = Agenda (Heap (Entry Time SchedulerEvent))
derivin... |
296dbfaa284b4d539b7ace40a949191944b70c4ab37464d02fd79b7ed3c93c2b | kupl/FixML | print.ml | open Lang
open Util
open Label_lang
open Symbol_lang
(*****************************)
(********language*************)
(*****************************)
let rec tab_to_string : int -> string
= fun n ->
"" ^
match n with
| 0 -> ""
| _ -> " " ^ tab_to_string (n-1)
let pp_tuple func tup =
match tup with
|[] -> ... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/engine/print.ml | ocaml | ***************************
*******language************
***************************
***************************
*****typechecking**********
***************************
***************************
*******labeling************
***************************
variable binding
function binding
Symbols
binary operation | open Lang
open Util
open Label_lang
open Symbol_lang
let rec tab_to_string : int -> string
= fun n ->
"" ^
match n with
| 0 -> ""
| _ -> " " ^ tab_to_string (n-1)
let pp_tuple func tup =
match tup with
|[] -> "()"
|hd::tl ->
"(" ^ (func hd) ^
(list_fold (fun elem r -> r ^ ", " ^ (func elem)) t... |
fa725b576a87d59239cda9b372b2afad7053d822aecbbee59fa429fd03be557a | imrehg/ypsilon | run-guile.scm | #!/usr/bin/env guile
!#
(use-syntax (ice-9 syncase))
(use-modules (ice-9 time))
(set! %load-path (append (list "./gambit-benchmarks") %load-path))
(define bitwise-and logand)
(define bitwise-not lognot)
(define (run-benchmark name count ok? run-maker . args)
(form... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/bench/run-guile.scm | scheme | (flush)
(flush)
(flush) | #!/usr/bin/env guile
!#
(use-syntax (ice-9 syncase))
(use-modules (ice-9 time))
(set! %load-path (append (list "./gambit-benchmarks") %load-path))
(define bitwise-and logand)
(define bitwise-not lognot)
(define (run-benchmark name count ok? run-maker . args)
(form... |
3e143830af8ebc9f2a08f9776085be7879df22c213bfbd5b748e018231af53ad | ha-mo-we/Racer | owl-import.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : OWL - SYNTAXES ; Base : 10 -*-
Copyright ( c ) 1998 - 2014 ,
, , .
;;; All rights reserved.
Racer is distributed under the following BSD 3 - clause license
;;; Redistribution and use in source and binary forms, with or without
;;; modificati... | null | https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/owl-import.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : OWL - SYNTAXES ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this ... |
Copyright ( c ) 1998 - 2014 ,
, , .
Racer is distributed under the following BSD 3 - clause license
Neither the name Racer nor the names of its contributors may be used
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING ,
VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY
... |
eeed92b90b23d86c8cbfbe7cc0c9a24ebb158f8588bf0bc9fb940d9e22931b9c | rabbitmq/rmq-0mq | r0mq_pub_service.erl | -module(r0mq_pub_service).
%% A pub service.
%%
%% See -0mq/pubsub
%% Callbacks
-export([init/3, create_socket/0,
start_listening/3]).
-include_lib("amqp_client/include/amqp_client.hrl").
-record(params, {queue}).
%% -- Callbacks --
create_socket() ->
{ok, Out} = zmq:socket(pub, [{active, false}]),
... | null | https://raw.githubusercontent.com/rabbitmq/rmq-0mq/63456e25d30015da7b4e1f3ea74f1039e0c4af31/src/r0mq_pub_service.erl | erlang | A pub service.
See -0mq/pubsub
Callbacks
-- Callbacks --
We use prefetch here for flow control | -module(r0mq_pub_service).
-export([init/3, create_socket/0,
start_listening/3]).
-include_lib("amqp_client/include/amqp_client.hrl").
-record(params, {queue}).
create_socket() ->
{ok, Out} = zmq:socket(pub, [{active, false}]),
Out.
init(Options, Connection, ConsumeChannel) ->
Exchange = case... |
c83c2fbf37f9ff6a5cfa426d0e68e397e8db2926f34afb70b66e91900ab528eb | jsa-aerial/DMM | core.clj | (ns dmm.core
"The core part of Dataflow Matrix Machine engine"
(:require [aerial.utils.coll :as coll
:refer [rotate]]
[clojure.math.numeric-tower :refer [abs]]))
;;; auxiliary primitives
(defn mORn? [x] (or (map? x) (number? x)))
(defn mANDn? [x y] (and (map? x) (number? y)))
(defn =num0?... | null | https://raw.githubusercontent.com/jsa-aerial/DMM/2baf47aaab227e8e1e0af64c187acf2384d205c5/src/dmm/core.clj | clojure | auxiliary primitives
odd or even members of the resulting sequences, and similar)
***********************************************************************
recurrent maps section - see design notes
rec-map-mult and its relatives (an operation
involving a scalar and a recurrent map;
the most important case is multi... | (ns dmm.core
"The core part of Dataflow Matrix Machine engine"
(:require [aerial.utils.coll :as coll
:refer [rotate]]
[clojure.math.numeric-tower :refer [abs]]))
(defn mORn? [x] (or (map? x) (number? x)))
(defn mANDn? [x y] (and (map? x) (number? y)))
(defn =num0? [x] (and (number? x) (ze... |
4b7ca348888ad7db5694b4757d7d7567817b661fc74ee02859c7bc0cd4a48795 | jwiegley/una | Main.hs | #!/usr/bin/env runhaskell
{-# LANGUAGE DeriveDataTypeable #-}
# OPTIONS_GHC -Wall
-fno - warn - name - shadowing
-fno - warn - missing - signatures
-fno - warn - incomplete - patterns #
-fno-warn-name-shadowing
-fno-warn-missing-sign... | null | https://raw.githubusercontent.com/jwiegley/una/7c9b2708212a44f82fe82b5d49fbe09e9d63f650/Main.hs | haskell | # LANGUAGE DeriveDataTypeable #
A simple universal unarchiving utility. Just point it at any archive or
compressed file, and it spits out a single file or directory in the current
directory with its contents. Use -d to delete the original archive on
success. Use -f to overwrite any existing file or directory w... | #!/usr/bin/env runhaskell
# OPTIONS_GHC -Wall
-fno - warn - name - shadowing
-fno - warn - missing - signatures
-fno - warn - incomplete - patterns #
-fno-warn-name-shadowing
-fno-warn-missing-signatures
-fno-warn-inc... |
d66a8b0eabaea9cc46c297bb125a126af9234f9a846e1a97cda1dfc94ad65775 | icicle-lang/icicle-ambiata | Simp.hs | -- | Simplifying and transforming statements
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
# LANGUAGE TupleSections #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
module Icicle.Avalanche.Statement.Simp (
pullLets
, convertValues
, forwardStmts
, renameRea... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Avalanche/Statement/Simp.hs | haskell | | Simplifying and transforming statements
# LANGUAGE BangPatterns #
Allow for nested buffers
This can mutate since it's on a newly created array
| Let-forwarding on statements
| Funky renaming for C
Rename reads from accumulators to refer to the accumulator name.
This is an awful hack, but means that inst... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
# LANGUAGE TupleSections #
# LANGUAGE ScopedTypeVariables #
module Icicle.Avalanche.Statement.Simp (
pullLets
, convertValues
, forwardStmts
, renameReads
, substXinS
, substXinS'
, thresherWithAlpha, thresherNoAlpha
, nestBlo... |
487368affcee9675cd982ad97e05cf8f17bc808331b9d068c522bf3f01ce1869 | lilyball/projecteuler-ocaml | prob4.ml |
A palindromic number reads the same both ways .
The largest palindrome made from the product of two 2 - digit numbers is 9009 = 91 99 .
Find the largest palindrome made from the product of two 3 - digit numbers .
A palindromic number reads the same both ways.
The largest palindrome made from the pr... | null | https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob4.ml | ocaml |
A palindromic number reads the same both ways .
The largest palindrome made from the product of two 2 - digit numbers is 9009 = 91 99 .
Find the largest palindrome made from the product of two 3 - digit numbers .
A palindromic number reads the same both ways.
The largest palindrome made from the pr... | |
6a1c08a9eec96dfe933cc89bff1cccab0a914d7b31e204caf2543509035255f5 | coco-team/lustrec | parse.ml | (********************************************************************)
(* *)
The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
(* ... | null | https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/parse.ml | ocaml | ******************************************************************
LustreC is free software, distributed WITHOUT ANY WARRANTY
under the terms of the GNU Lesser General Public L... | The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
version 2.1 .
open Format
open Lustre_types
open Corelang
type error =
| Undefined_token of string
| Unexpected_eof
| ... |
010483e3ff6c4153879c50f70e205cb08ec7d940b16c85df4a5b84272109a01f | larcenists/larceny | generator.sps | (import (scheme base)
(scheme write)
(tests scheme generator)
(tests scheme test))
(display "Running tests for (scheme generator)\n")
(run-generator-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/R7RS/Lib/tests/scheme/run/generator.sps | scheme | (import (scheme base)
(scheme write)
(tests scheme generator)
(tests scheme test))
(display "Running tests for (scheme generator)\n")
(run-generator-tests)
(report-test-results)
| |
3cf689e8813d1ae8979454de9bbde5fa6af1f0c83dc1433563313a7d3a6ccd2b | clojure/core.typed | records.clj | (ns clojure.core.typed.test.records
(:require [clojure.core.typed :refer [check-ns ann-record ann-form cf]]
[clojure.repl :refer [pst]]))
(set! *warn-on-reflection* true)
(ann-record MyRecord [a :- Number])
(defrecord MyRecord [a]
Object
(toString [this] nil))
(ann-form (:a (->MyRecord 1)) Number)... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/records.clj | clojure | (ns clojure.core.typed.test.records
(:require [clojure.core.typed :refer [check-ns ann-record ann-form cf]]
[clojure.repl :refer [pst]]))
(set! *warn-on-reflection* true)
(ann-record MyRecord [a :- Number])
(defrecord MyRecord [a]
Object
(toString [this] nil))
(ann-form (:a (->MyRecord 1)) Number)... | |
bbe0968b271b2862c91e30ade5535c162bf85005e4aa6182e85a75d82bdad107 | AlexKnauth/reprovide-lang | a.rkt | #lang racket/base
(provide a aa aaa)
(define a 1)
(define aa 2)
(define aaa 3)
| null | https://raw.githubusercontent.com/AlexKnauth/reprovide-lang/8c3c912d200eec45d22fc267d151fb1939471b49/reprovide-lang/reprovide/test/example-directory/a.rkt | racket | #lang racket/base
(provide a aa aaa)
(define a 1)
(define aa 2)
(define aaa 3)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.