_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
f58766941d4f1d1571f6aa4cd5fb001996375cab76a2396838f6ee02ee1655f1
lerouxrgd/celtuce
scan.clj
(ns celtuce.manifold.scan (:require [celtuce.scan :refer [scan-res PScanResult]] [manifold.deferred]) (:import (manifold.deferred Deferred))) (extend-protocol PScanResult Deferred (scan-res [this] (scan-res @this)))
null
https://raw.githubusercontent.com/lerouxrgd/celtuce/c8c501f8fbb00780a7e4218c908b81d5ac06b74a/modules/celtuce-manifold/src/celtuce/manifold/scan.clj
clojure
(ns celtuce.manifold.scan (:require [celtuce.scan :refer [scan-res PScanResult]] [manifold.deferred]) (:import (manifold.deferred Deferred))) (extend-protocol PScanResult Deferred (scan-res [this] (scan-res @this)))
4c33660af4f7fa413fabe8a038d783c0f9df116568d675b9f381b604a9628ce2
hiratara/Haskell-Nyumon-Sample
chap05-samples-5-4-1-eSafeDiv.hs
module Main(main) where -- eSafeDiv.hs safeDiv :: Integer -> Integer -> Either String Integer safeDiv k n | n == 0 = Left $ "Illegal division by zero. k:" ++ show k | otherwise = Right (k `div` n) calc :: Integer -> Either String Integer calc n = do x <- 100 `safeDiv` n y <- 100 `safeDiv` (x - 1) ...
null
https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap05-samples/chap05-samples-5-4-1-eSafeDiv.hs
haskell
eSafeDiv.hs
module Main(main) where safeDiv :: Integer -> Integer -> Either String Integer safeDiv k n | n == 0 = Left $ "Illegal division by zero. k:" ++ show k | otherwise = Right (k `div` n) calc :: Integer -> Either String Integer calc n = do x <- 100 `safeDiv` n y <- 100 `safeDiv` (x - 1) return y main...
49582165cb9e929edbfe0a57ce3092e029fdc56c95f9e0767e2936cca6084218
gafiatulin/codewars
VowelOne.hs
-- Vowel one -- module Codewars.Kata.VowelOne where import Data.Char (toLower) vowelOne :: String -> String vowelOne = map ((\c -> if c `elem` "aeioyu" then '1' else '0') . toLower)
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/VowelOne.hs
haskell
Vowel one
module Codewars.Kata.VowelOne where import Data.Char (toLower) vowelOne :: String -> String vowelOne = map ((\c -> if c `elem` "aeioyu" then '1' else '0') . toLower)
843db9bc6642c66482e9d2166ea21c4626e75c344164a57ca8d2c997a0a95102
LPCIC/matita
nUri.mli
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_kernel/nUri.mli
ocaml
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
121a64930cea23d9d931681f6cc84d7575ade3f5f814a6cc3e36e43ba50de324
mfoemmel/erlang-otp
snmp_note_store_test.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2004 - 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 Pu...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/test/snmp_note_store_test.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 limit...
Copyright Ericsson AB 2004 - 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(snmp_note_store_test). -include("...
9c10341031c40f665f89ad551435e657cde83a56118070e04f4d14c2d1e6d94b
Darkkey/erlamsa
erlamsa_app.erl
Copyright ( c ) 2011 - 2014 Copyright ( c ) 2014 - 2018 % % 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, cop...
null
https://raw.githubusercontent.com/Darkkey/erlamsa/ec7403eab2631a945ebab2083b6841e1eec2832c/src/erlamsa_app.erl
erlang
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 ) 2011 - 2014 Copyright ( c ) 2014 - 2018 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...
f2006ea94f96b9846bc632838a8749b3ace376c18368c107a37e4256dec8ffa7
chapmanb/bcbio.variation
normalize.clj
(ns bcbio.variation.normalize "Prepare a VCF file for comparison by normalizing chromosome names, sort order, sample name, and genotype representation. This handles the work of making slightly different representations match, enabling VCF comparisons. Currently implemented for human only, with hooks to genera...
null
https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/normalize.clj
clojure
Provide mapping from variant chromosome names to reference Cached version of hg19 map to avoid having to make database connections '), found in parser.
(ns bcbio.variation.normalize "Prepare a VCF file for comparison by normalizing chromosome names, sort order, sample name, and genotype representation. This handles the work of making slightly different representations match, enabling VCF comparisons. Currently implemented for human only, with hooks to genera...
acdecdd226e750d150c66bd558bd42b9a3f5c69fa427fe5f78a562f2537add6a
johnlawrenceaspden/hobby-code
htmltidy.clj
Tidying up HTML with to dynamically load libraries from maven and must have [ com.cemerick/pomegranate " 0.3.1 " ] on your classpath (require 'cemerick.pomegranate) ;; Here's an example: we get and load weavejester's hiccup library (cemerick.pomegranate/add-dependencies :coordinates '[[hiccup "1.0.5"]] :...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/htmltidy.clj
clojure
Here's an example: we get and load weavejester's hiccup library "<h1>hello</h1>" But there's no way to pretty print the resulting html, which can get hard to read This problem made it to Stack Overflow -html-formatting/1967179#1967179 JTidy to the rescue <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html>...
Tidying up HTML with to dynamically load libraries from maven and must have [ com.cemerick/pomegranate " 0.3.1 " ] on your classpath (require 'cemerick.pomegranate) (cemerick.pomegranate/add-dependencies :coordinates '[[hiccup "1.0.5"]] :repositories {"clojars" "" }) (require '[hiccup.core :as hc]) ...
96dd150e58f8a1fa180053cfc7259999c50f968440d13c02e012ff81474e6c31
xapi-project/xapi-xe
cli_protocol.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xapi-xe/7a170a1c7a4ed7855b3c1acd702f8a013c044cf5/src/cli_protocol.ml
ocaml
* * @group Command-Line Interface (CLI) * Used to ensure that we actually are talking to a thin CLI server * A prefix string which should be unique, used to detect that we're talking to a totally different kind of server (eg a standard HTTP server) * Command sent by the server to the client. If the comman...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
f77c322badd583b52c2bc46f40e4fa5da0ddcc8b09fd1691044a3b476a30df85
ocaml/ocaml-lsp
ocamlformat_rpc.mli
open Import type t val create : unit -> t val stop : t -> unit Fiber.t val format_type : t -> typ:string -> (string, [> `Msg of string | `No_process ]) result Fiber.t val format_doc : t -> Document.t -> (TextEdit.t list, [> `Msg of string | `No_process | `No_V2 ]) result Fiber.t val run : log...
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/2b853dfa91b62ed9e889a00bd2b958a07fdef2d2/ocaml-lsp-server/src/ocamlformat_rpc.mli
ocaml
open Import type t val create : unit -> t val stop : t -> unit Fiber.t val format_type : t -> typ:string -> (string, [> `Msg of string | `No_process ]) result Fiber.t val format_doc : t -> Document.t -> (TextEdit.t list, [> `Msg of string | `No_process | `No_V2 ]) result Fiber.t val run : log...
2cdb7b2eefd1caf73107621560d9646eebc917c64c4394e4165547fd05b6fc24
brendanhay/terrafomo
Resources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . PagerDuty . Resources Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-pagerduty/gen/Terrafomo/PagerDuty/Resources.hs
haskell
This module is auto-generated. | Stability : auto-generated * pagerduty_escalation_policy * pagerduty_extension * pagerduty_maintenance_window * pagerduty_schedule * pagerduty_service_integration * pagerduty_service * pagerduty_team_membership * pagerduty_team * pagerduty_user_contact_method * pagerduty...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . PagerDuty . Resources Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . ...
024e80269078e234a974b42200ee7137681c0eb3de236255a2e5662b378bf821
uhc/uhc
CoreUtils.hs
| Module : CoreUtils License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.CodeGeneration.CoreUtils ( c...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/CodeGeneration/CoreUtils.hs
haskell
let! guardId = <guardExpr> in match guardId True -> <thenExpr> _ -> <elseExpr> Function "coreList" builds a linked list of the given expressions Example: coreList [e1, e2] ==> Ap (Ap (Con ":") e1) (Ap (Ap (Con ":") e2) (Con "[]") )
| Module : CoreUtils License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.CodeGeneration.CoreUtils ( c...
eb9086cf5281a9d31a3a12a76e7bf1427af9fd9fac699d37e152ea686711be79
Oblosys/proxima
Magic.hs
{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #-} ----------------------------------------------------------------------------------------- {-| Module : Magic Copyright : License : All Rights Reserved Maintainer : ...
null
https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/papers/Haskell%202008/Haskell/src/Magic.hs
haskell
# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction # --------------------------------------------------------------------------------------- | Module : Magic Copyright : License : All Rights Reserved Maintainer : St...
module Magic where import Layers fix :: (a->a) -> a fix a = let fixa = a fixa in fixa liftStep :: LayerFn hArg vArg hRes vRes -> (hRes -> g ns) -> hArg -> (Step d vArg vRes :.: g) ns liftStep f next horArgs = Comp . Step $ \vArg -> let (vertRes, horRes) = f horArgs vArg in (ver...
c24b39f7788cefd94bbaa5a996fcf5823a4c998a4553e95152ec6417eb7b1c7e
shentufoundation/deepsea
Types.mli
open Datatypes open Int0 type __ = Obj.t type valtype = | T_i32 | T_i64 | T_f32 | T_f64 type functype = | FT of valtype list * valtype list type limits = { coq_L_min : I32.t; coq_L_max : I32.t option } type memtype = limits type tabletype = (limits, __) prod type mut = | GT_const | GT_var type globaltype = (mut...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Types.mli
ocaml
open Datatypes open Int0 type __ = Obj.t type valtype = | T_i32 | T_i64 | T_f32 | T_f64 type functype = | FT of valtype list * valtype list type limits = { coq_L_min : I32.t; coq_L_max : I32.t option } type memtype = limits type tabletype = (limits, __) prod type mut = | GT_const | GT_var type globaltype = (mut...
d3c174b2f8a2058fb70604c5b889d4069003c36ec0de88f3ced3f8ea835666d9
HaskellZhangSong/Introduction_to_Haskell
ShortestPath.hs
import Data.List (transpose,minimumBy) import Data.Ord (comparing) type Distance = Double type Name = String type Direction = String type Weight = (Distance, Direction) zipD :: [Name] -> [[String]] zipD ns = [[(start++"->"++des)| des <- ns ]|start <- ns] zipW :: [[Distance]] -> [Name] -> [[Weight]] zipW ds ns = [zip...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell/0478693817f761c17624b1eebf20b0cad8810993/Chapter06/ShortestPath.hs
haskell
import Data.List (transpose,minimumBy) import Data.Ord (comparing) type Distance = Double type Name = String type Direction = String type Weight = (Distance, Direction) zipD :: [Name] -> [[String]] zipD ns = [[(start++"->"++des)| des <- ns ]|start <- ns] zipW :: [[Distance]] -> [Name] -> [[Weight]] zipW ds ns = [zip...
210fcab1ee0844052877a221a2656641ae00dd6f935bdc3302b93e666795edc8
morpheusgraphql/morpheus-graphql
Objects.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeFamilies # module Feature.Input.Objects ( api, ) where import Data.Morpheus.Server (interpreter) import Data.Morpheus.Server.Types ( GQLRequest, GQLResponse, GQLType (..), RootResolver (..), Und...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/0d7ec120df4ea3b1e030f64ed9820a8a66de7d6a/morpheus-graphql-server/test/Feature/Input/Objects.hs
haskell
# LANGUAGE DeriveAnyClass # types & args query resolver
# LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeFamilies # module Feature.Input.Objects ( api, ) where import Data.Morpheus.Server (interpreter) import Data.Morpheus.Server.Types ( GQLRequest, GQLResponse, GQLType (..), RootResolver (..), Undefined, defaultRootResolver,...
4c73306ca1923c916734da37a86624f4b211770eaeba90b404cbba5f39ceff28
pgj/mirage-kfreebsd
pervasives.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/pervasives.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : pervasives.ml 10549 2010 - 06...
3bf0d2d5b2e1e6b1ffbdb6974af032e50f8b22a07968babacd8434d2b9c468a4
jcclinton/wow-emulator
char_helper.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% 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 Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/lib/char_helper.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
e1b69872c801ad9041611c1d68ddcdf361845c0621023c2d7e8b71f3d863dcff
nackjicholson/haskellbook-solutions
chapter5.hs
-- chapter5.hs module Chapter5 where addStuff :: Integer -> Integer -> Integer addStuff a b = a + b + 5 funcIgnoresArgs :: a -> a -> a -> String funcIgnoresArgs x y z = "Blah" nonsense :: Bool -> Integer nonsense True = 805 nonsense False = 31337 typicalCurriedFunction :: Integer -> Bool -> Integer typicalCurriedFu...
null
https://raw.githubusercontent.com/nackjicholson/haskellbook-solutions/c21bd87773734ba2ae1559553a6a4d10891c61c8/chapter5/chapter5.hs
haskell
chapter5.hs
module Chapter5 where addStuff :: Integer -> Integer -> Integer addStuff a b = a + b + 5 funcIgnoresArgs :: a -> a -> a -> String funcIgnoresArgs x y z = "Blah" nonsense :: Bool -> Integer nonsense True = 805 nonsense False = 31337 typicalCurriedFunction :: Integer -> Bool -> Integer typicalCurriedFunction i b = i ...
2f331a8833a42de6525e6ce216bcc861c8a2b4bac0bbc910c6555c7d880fe528
kappelmann/engaging-large-scale-functional-programming
Exercise04.hs
module Exercise04 where import Data.List (maximumBy, nub, isInfixOf) --import Test.QuickCheck rudolph :: String -> (Int, Int) rudolph s = let rlens = rudolph' s 0 mx = last rlens in if null rlens || mx == 0 then (0, 1) else (mx, length (dropWhile (mx /=) rlens)) evalChar :...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/04/uploads/maol/Exercise04.hs
haskell
import Test.QuickCheck Testing arbitrary = oneof [return R, return L]
module Exercise04 where import Data.List (maximumBy, nub, isInfixOf) rudolph :: String -> (Int, Int) rudolph s = let rlens = rudolph' s 0 mx = last rlens in if null rlens || mx == 0 then (0, 1) else (mx, length (dropWhile (mx /=) rlens)) evalChar :: Char -> (Int -> Int) ev...
ffda8587329b486e6dcafa69c25416eec9ce1318a3f7f813c228ab13aae888a3
xguerin/ocaml-indexeddb
db.ml
* Copyright ( c ) 2019 < > * Copyright ( c ) 2020 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWAR...
null
https://raw.githubusercontent.com/xguerin/ocaml-indexeddb/0560527b41f6741aa660c5b355ee94de928814c3/lib/db.ml
ocaml
* Firefox throws the exception away and returns * AbortError instead, so save it here. Already reported a better exception
* Copyright ( c ) 2019 < > * Copyright ( c ) 2020 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWAR...
3616f4e977e12a68bd003b7bf8a24c83d2565a8f95da02e33dd4f84102804b89
rtoy/cmucl
source-test.lisp
(defmacro zoq (x) `(roq (ploq (+ ,x 3)))) (defun foo (y) (declare (symbol y)) (zoq y))
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/source-test.lisp
lisp
(defmacro zoq (x) `(roq (ploq (+ ,x 3)))) (defun foo (y) (declare (symbol y)) (zoq y))
79b3bc4365457477f33abe23e20345222ba5bb2a406dc0117614b3b3e5174357
askvortsov1/nittany_market
localvendor.mli
module LocalVendor: sig type t = { email : string; business_name : string; business_address_id: string; customer_service_number: string } type key = string type fields = string * string * string * string include Model_intf.SingleKeyModel with type t := t and type key := key and type fields := fields en...
null
https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/models/localvendor.mli
ocaml
module LocalVendor: sig type t = { email : string; business_name : string; business_address_id: string; customer_service_number: string } type key = string type fields = string * string * string * string include Model_intf.SingleKeyModel with type t := t and type key := key and type fields := fields en...
c6aab5206cced9eb5f6d7e780f51401877c867f4ac3072c61b574554b50a54b8
re-ops/re-cog
constants.clj
(ns re-cog.common.constants) (def apt-bin "/usr/bin/apt") (def ufw-bin "/usr/sbin/ufw") (def dpkg-bin "/usr/bin/dpkg") (def systemd-bin "/usr/sbin/service") (def systemctl-bin "/bin/systemctl") (def sysctl-bin "/usr/sbin/sysctl") (def openssl-bin "/usr/bin/openssl") (def cat-bin "/usr/bin/cat") (defn require-c...
null
https://raw.githubusercontent.com/re-ops/re-cog/4b8fa5ab81f51af2f6e41a6f5e2655128b4be5cb/src/re_cog/common/constants.clj
clojure
(ns re-cog.common.constants) (def apt-bin "/usr/bin/apt") (def ufw-bin "/usr/sbin/ufw") (def dpkg-bin "/usr/bin/dpkg") (def systemd-bin "/usr/sbin/service") (def systemctl-bin "/bin/systemctl") (def sysctl-bin "/usr/sbin/sysctl") (def openssl-bin "/usr/bin/openssl") (def cat-bin "/usr/bin/cat") (defn require-c...
06409fe45f1aa5569be67a66de478f150ccd6e71df4944807b0aced0e1ef47fa
leksah/leksah
Workspaces.hs
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- Module : IDE.Command . VCS.Common . Workspaces Copyright : 2007 - 2011 , -- License : GPL Nothing -- -- Maintainer : -- Stability : provisional -- Portability : -- -- | -...
null
https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src/IDE/Command/VCS/Common/Workspaces.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- License : GPL Nothing Maintainer : Stability : provisional Portability : | ---------------------------------------------------------------------------
Module : IDE.Command . VCS.Common . Workspaces Copyright : 2007 - 2011 , module IDE.Command.VCS.Common.Workspaces ( onWorkspaceOpen , onWorkspaceClose ) where import Prelude () import Prelude.Compat import GHC.Stack (HasCallStack) VCS imports import qualified IDE.Utils.GUIUtils as G...
8a2e46673c6a404bf618944a9d0856f706373bad101b912d9a66efc211ab2e0d
dinosaure/bob
state.ml
XXX(dinosaure ): rational : - a client can only communicate to a server or a relay - a server can only communicate to a client or a relay - a relay can communicate to anyone With GADTs , we can encore these properties and discard many cases that - the client should never handle - t...
null
https://raw.githubusercontent.com/dinosaure/bob/210dce2f3f7bfe1b15472a7d09544b4afbac8ca6/lib/state.ml
ocaml
broadcast available servers to **the** client broadcast **the** server to available clients clean hashtbls transmit ~src ~dst packet t.queue ; A registered client, wants to say (again) hello. A registered server, wants to say (again) hello. XXX(dinosaure): it's impossible to craft on the [Client]/[Server] ...
XXX(dinosaure ): rational : - a client can only communicate to a server or a relay - a server can only communicate to a client or a relay - a relay can communicate to anyone With GADTs , we can encore these properties and discard many cases that - the client should never handle - t...
8782c254bc10c83b207e3cac14bcd64b448e532686392e60cf797f81b967e8de
metabase/metabase
classloader_test.clj
(ns metabase.plugins.classloader-test (:require [clojure.test :refer :all] [metabase.plugins.classloader :as classloader]) (:import (clojure.lang DynamicClassLoader))) (set! *warn-on-reflection* true) (deftest has-shared-context-classloader-as-ancestor?-test (testing "make sure we correctly detect when...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/plugins/classloader_test.clj
clojure
(ns metabase.plugins.classloader-test (:require [clojure.test :refer :all] [metabase.plugins.classloader :as classloader]) (:import (clojure.lang DynamicClassLoader))) (set! *warn-on-reflection* true) (deftest has-shared-context-classloader-as-ancestor?-test (testing "make sure we correctly detect when...
1d5f6d7fb23d6602e839e267e6efe7f36f3536bc36221082a3e9f2dd27070fec
AlexCharlton/Hypergiant
particles.scm
;;;; particles.scm Particle system , implemented as a plugin so particles can be sorted by depth before being drawn (module hypergiant-particles (particles emitter? emitter-node add-emitter delete-emitter add-particle delete-particle emitter-n-particles emitter-max-particles (for-emitter emitter-mesh mesh...
null
https://raw.githubusercontent.com/AlexCharlton/Hypergiant/5f1ae8c209715980b2bb061d3eb4d93132e34305/particles.scm
scheme
particles.scm Bindings Largely copied from gl-utils Scheme interface end module hypergiant-particles
Particle system , implemented as a plugin so particles can be sorted by depth before being drawn (module hypergiant-particles (particles emitter? emitter-node add-emitter delete-emitter add-particle delete-particle emitter-n-particles emitter-max-particles (for-emitter emitter-mesh mesh-update* %update-em...
a725ad8196b099c1cbcd9d1dd1ad644e6abd84632bf42c4d1cdc8596d5909ab6
AbstractMachinesLab/caramel
misc.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_408/utils/misc.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the val fatal_error: string -> 'a val fatal_errorf: ('a, Format.formatter, unit, 'b) format4 -> 'a exception...
14ace4151618a20c64c75b45140a352af63d3f2966bbc3dabfcec555c9d77e8b
racehub/om-bootstrap
stacked.cljs
#_ (:require [om-bootstrap.progress-bar :as pb]) (pb/progress-bar {} (pb/progress-bar {:now 35 :bs-style "success" :nested? true}) (pb/progress-bar {:now 20 :bs-style "warning" :striped? true :nested? true}) (pb/progress-bar {:now 10 :bs-style "danger" :nested? true})...
null
https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/progressbar/stacked.cljs
clojure
#_ (:require [om-bootstrap.progress-bar :as pb]) (pb/progress-bar {} (pb/progress-bar {:now 35 :bs-style "success" :nested? true}) (pb/progress-bar {:now 20 :bs-style "warning" :striped? true :nested? true}) (pb/progress-bar {:now 10 :bs-style "danger" :nested? true})...
92d271a2f35ba53aa66e309face93c7b3931adf02448416a40083b22418d378f
mathinstitut/goemaxima
arccos.lisp
(mapc #'tex-setup '( (%acos "\\arccos ") (%asin "\\arcsin ") (%atan "\\arctan ") Latex 's arg(x ) is ... ? (%cos "\\cos ") (%cosh "\\cosh ") (%cot "\\cot ") (%coth "\\coth ") (%csc "\\csc ") Latex 's " deg " is ... ? (%determinant "\\det ") (%dim "\\dim ") (%exp "\\exp ") (%gcd "\\gcd ") Latex '...
null
https://raw.githubusercontent.com/mathinstitut/goemaxima/6077c3c279e69b84e9c225c810e3e0b453b90845/stack/2018080600/maxima/arccos.lisp
lisp
many will prefer "\\infty". Hmmm. lim is handled by tex-limit. (%erf "{\\rm erf}") this would tend to set erf(x) as erf x. Unusual (%laplace "{\\cal L}") etc
(mapc #'tex-setup '( (%acos "\\arccos ") (%asin "\\arcsin ") (%atan "\\arctan ") Latex 's arg(x ) is ... ? (%cos "\\cos ") (%cosh "\\cosh ") (%cot "\\cot ") (%coth "\\coth ") (%csc "\\csc ") Latex 's " deg " is ... ? (%determinant "\\det ") (%dim "\\dim ") (%exp "\\exp ") (%gcd "\\gcd ") Latex '...
366db0848f7a56502a62bb5fd504f3e1131efafaae55a73e3de24dd075a1ce25
ocaml-multicore/parafuzz
open_in_classes.ml
(* TEST * expect *) module M = struct type t = int let x = 42 end ;; [%%expect{| module M : sig type t = int val x : int end |}] class c = let open M in object method f : t = x end ;; [%%expect{| class c : object method f : M.t end |}] class type ct = let open M in object method f : t end ;;...
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/typing-objects/open_in_classes.ml
ocaml
TEST * expect
module M = struct type t = int let x = 42 end ;; [%%expect{| module M : sig type t = int val x : int end |}] class c = let open M in object method f : t = x end ;; [%%expect{| class c : object method f : M.t end |}] class type ct = let open M in object method f : t end ;; [%%expect{| class type...
3c41fe5638e4e9d030be600b2434be0b0c2aaf6e9d4d10e5d9fb848c3d072861
huangz1990/SICP-answers
test-p33-prime.scm
(load "test-manager/load.scm") (load "p33-prime.scm") (define-each-check (prime? 7) (false? (prime? 8)) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-p33-prime.scm
scheme
(load "test-manager/load.scm") (load "p33-prime.scm") (define-each-check (prime? 7) (false? (prime? 8)) ) (run-registered-tests)
8837349e4105ca30bdb3bef1e06991e4b904130b34105253066eb26ad38ed627
open-company/open-company-storage
org.clj
(ns oc.storage.representations.org "Resource representations for OpenCompany orgs." (:require [cheshire.core :as json] [cuerdas.core :as s] [clj-time.core :as t] [oc.lib.time :as lib-time] [oc.lib.hateoas :as hateoas] [oc.storage.urls.org :as org-urls] ...
null
https://raw.githubusercontent.com/open-company/open-company-storage/ae4bbe6245f8736f3c1813c3048448035aff5815/src/oc/storage/representations/org.clj
clojure
All orgs get the item link Only if user is member add the digest link
(ns oc.storage.representations.org "Resource representations for OpenCompany orgs." (:require [cheshire.core :as json] [cuerdas.core :as s] [clj-time.core :as t] [oc.lib.time :as lib-time] [oc.lib.hateoas :as hateoas] [oc.storage.urls.org :as org-urls] ...
759a9747310b39bf17d3196de56e0474ee09cdc66b959bc62c52214d109cb18b
smarkets/epgsql_connpool
epgsql_connpool.erl
Copyright ( c ) 2011 Smarkets Limited Distributed under the MIT license ; see LICENSE for details . -module(epgsql_connpool). -behaviour(gen_server). -export([name/1]). -export([available/2, status/1, reserve/2, release/2]). -export([transaction/2, transaction/3, transaction/4]). -export([dirty/2, dirty/3, dirty/...
null
https://raw.githubusercontent.com/smarkets/epgsql_connpool/8ac731fc3c19664d9b85a02c1f16d34414135aae/src/epgsql_connpool.erl
erlang
gen_server count of busy connections No connections available Immediately hand off connection in reply Discard request which timed out Otherwise, reply and track new busy pair Revert to original queues as no connections are available
Copyright ( c ) 2011 Smarkets Limited Distributed under the MIT license ; see LICENSE for details . -module(epgsql_connpool). -behaviour(gen_server). -export([name/1]). -export([available/2, status/1, reserve/2, release/2]). -export([transaction/2, transaction/3, transaction/4]). -export([dirty/2, dirty/3, dirty/...
e4a930eef3f0e8e808ffb16df63360d337acd0de4650cf7fa366b7d27a746794
HaskellZhangSong/Introduction_to_Haskell
TwentyFour.hs
import Data.List (permutations) data Exp = Val Double | Plus Exp Exp | Sub Exp Exp | Mult Exp Exp | Div Exp Exp deriving (Show,Eq) eval :: Exp -> Double eval (Val a ) = a eval (Plus a b ) = eval a + eval b eval (Sub a b ) = eval a - eval b eval (Mult a b ) = eval a * ev...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell/0478693817f761c17624b1eebf20b0cad8810993/Chapter08/TwentyFour.hs
haskell
import Data.List (permutations) data Exp = Val Double | Plus Exp Exp | Sub Exp Exp | Mult Exp Exp | Div Exp Exp deriving (Show,Eq) eval :: Exp -> Double eval (Val a ) = a eval (Plus a b ) = eval a + eval b eval (Sub a b ) = eval a - eval b eval (Mult a b ) = eval a * ev...
a4e3ad0afccb32d0061c2efa6c83acbd4c716c6547516a48d07143b1b4a2b02d
kendroe/CoqRewriter
test1.ml
let exp1 = Exp.parseExp "apply(f,e)" ;; print_string ("Test 1:" ^ (Exp.prExp exp1) ^ "\n") ;; let exp2 = Exp.parseExp "fn x => x+2" ;; print_string ("Test 2:" ^ (Exp.prExp exp2) ^ "\n") ;; let exp3 = Exp.parseExp "apply((fn x => nplus(x,3)),4)" ;; print_string ("Test 3:" ^ (Exp.prExp exp3) ^ "\n") ;; let exp4 = List.h...
null
https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/test1.ml
ocaml
let (Exp.APPL (f,l)) = exp4 ;; print_string ("functor " ^ (string_of_int f) ^ "\n");; let exp10 = convert_overloads emptyEnv exp9 ; Exp.parseRule "yin(0) -> 3"; Exp.parseRule "yin(x) { nless(0,x) } -> nplus(yin(nminus(x,1)),1)" Exp.parseRule "yan(0) -> 4"; Exp.parseRule "yan(x) { nless(0,x) } -> nminus(...
let exp1 = Exp.parseExp "apply(f,e)" ;; print_string ("Test 1:" ^ (Exp.prExp exp1) ^ "\n") ;; let exp2 = Exp.parseExp "fn x => x+2" ;; print_string ("Test 2:" ^ (Exp.prExp exp2) ^ "\n") ;; let exp3 = Exp.parseExp "apply((fn x => nplus(x,3)),4)" ;; print_string ("Test 3:" ^ (Exp.prExp exp3) ^ "\n") ;; let exp4 = List.h...
36819919f936d50b8cf772607b00eceeebc97fddd6bfd7f96b58e126ee95d8ba
aiya000/haskell-examples
HelloGtk.hs
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew label <- labelNewWithMnemonic "Hello,world!!" set window [ windowDefaultWidth := 200 , windowDefaultHeight := 200 , containerChild := label , containerBorderWidth := 10 ] onDestroy window mainQuit widge...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Graphics/UI/Gtk/hello/HelloGtk.hs
haskell
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew label <- labelNewWithMnemonic "Hello,world!!" set window [ windowDefaultWidth := 200 , windowDefaultHeight := 200 , containerChild := label , containerBorderWidth := 10 ] onDestroy window mainQuit widge...
1959a97d271cfc0b2c9124f2d8dd67a13a43c8c354fbe4c4dadad36662608e9c
clojure-interop/aws-api
project.clj
(defproject clojure-interop/com.amazonaws.services.xray "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.xray" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths ["src"])
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.xray/project.clj
clojure
(defproject clojure-interop/com.amazonaws.services.xray "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.xray" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths ["src"])
052266ab50f7dbbe3bcaa8bd26ae62f5bb3dc2dc3397223c3b8661ddb89eb433
brendanhay/amazonka
ModificationResourceEnum.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces/gen/Amazonka/WorkSpaces/Types/ModificationResourceEnum.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service descriptions , licensed under Apache 2.0 . Module : A...
27c54eb60cb31509ac55524f726167aa2485321d81d30d7b647eb06f1e849520
abyala/advent-2021-clojure
day06_test.clj
(ns advent-2021-clojure.day06-test (:require [clojure.test :refer :all] [advent-2021-clojure.day06 :refer :all])) (def test-input "3,4,3,1,2") (def puzzle-input (slurp "resources/day06_data.txt")) (deftest part1-test (are [expected input] (= expected (day1 input)) 5934 test-inp...
null
https://raw.githubusercontent.com/abyala/advent-2021-clojure/ca39870dd3d4f203c3f783b47e39f51acf8dc1bb/test/advent_2021_clojure/day06_test.clj
clojure
(ns advent-2021-clojure.day06-test (:require [clojure.test :refer :all] [advent-2021-clojure.day06 :refer :all])) (def test-input "3,4,3,1,2") (def puzzle-input (slurp "resources/day06_data.txt")) (deftest part1-test (are [expected input] (= expected (day1 input)) 5934 test-inp...
c726006cc444d8b7ef8b2692de411c6e8824878f6388132b4f8fa76155d94ba0
webyrd/n-grams-for-synthesis
bitwise-core.scm
;;;; bitwise-core, core bitwise operations Copyright ( C ) 1991 , 1993 , 2001 , 2003 , 2005 This implementation of the seven core functions required by SRFI 33 ;;; (bitwise-not, bitwise-and, bitwise-ior, bitwise-xor, arithmetic-shift, bit - count , integer - length ) is drawn from the SRFI 60 implementation . ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-142/srfi-142/bitwise-core.scm
scheme
bitwise-core, core bitwise operations (bitwise-not, bitwise-and, bitwise-ior, bitwise-xor, arithmetic-shift, arithmetic, so a simple-minded implementation again doesn't need to do much to support them -- however, [these] general implementations are terribly inefficient relative to native support and should *not* ...
Copyright ( C ) 1991 , 1993 , 2001 , 2003 , 2005 This implementation of the seven core functions required by SRFI 33 bit - count , integer - length ) is drawn from the SRFI 60 implementation . Here is 's comment on this code in SRFI 33 : The [ following ] implementations of these functions use [ only ] R4...
3b7c9ffddd998335377f330617e6d93d6c2ec7f4a62c3303bf18ac62cfbbd734
patrickt/possession
Id.hs
module Raw.Id ( Id (..), ) where import Apecs (Component (..), Map) import Data.Store.Exts (Store) import GHC.Generics (Generic) newtype Id = Id Int deriving stock (Eq, Show, Ord, Generic) deriving anyclass (Store) instance Component Id where type Storage Id = Map Id
null
https://raw.githubusercontent.com/patrickt/possession/24f7607ebfce3c10e8aae620cf70aafc5fa43e5a/src/Raw/Id.hs
haskell
module Raw.Id ( Id (..), ) where import Apecs (Component (..), Map) import Data.Store.Exts (Store) import GHC.Generics (Generic) newtype Id = Id Int deriving stock (Eq, Show, Ord, Generic) deriving anyclass (Store) instance Component Id where type Storage Id = Map Id
ab15bcde07c25b1a76bbcbf27051e4e55c288645ca181da8bc08dc5ab94092f3
lpw25/ecaml
eval.ml
open Syntax exception PatternMatch let rec extend_with_pattern p v env = match p.plain, v with | Nonbinding, _ -> env | Var x, v -> Map.update x v env | Const c, Value.Const c' when c = c' -> env | Tuple ps, Value.Tuple vs -> List.fold_right2 extend_with_pattern ps vs env | _, _ -> raise PatternMatch let...
null
https://raw.githubusercontent.com/lpw25/ecaml/4588abb18436fb8a4983a353923ee667bf8c90a0/src/eval.ml
ocaml
open Syntax exception PatternMatch let rec extend_with_pattern p v env = match p.plain, v with | Nonbinding, _ -> env | Var x, v -> Map.update x v env | Const c, Value.Const c' when c = c' -> env | Tuple ps, Value.Tuple vs -> List.fold_right2 extend_with_pattern ps vs env | _, _ -> raise PatternMatch let...
e06b0624b60326d1f99ba92f631387c5864bb62c9cacea3059068a2190064a33
cyverse-archive/DiscoveryEnvironmentBackend
raw.clj
(ns donkey.clients.metadactyl.raw (:use [donkey.util.transformers :only [secured-params]]) (:require [cemerick.url :as curl] [clj-http.client :as client] [donkey.util.config :as config])) (def metadactyl-sort-params [:limit :offset :sort-field :sort-dir]) (def metadactyl-analysis-listing-pa...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/clients/metadactyl/raw.clj
clojure
(ns donkey.clients.metadactyl.raw (:use [donkey.util.transformers :only [secured-params]]) (:require [cemerick.url :as curl] [clj-http.client :as client] [donkey.util.config :as config])) (def metadactyl-sort-params [:limit :offset :sort-field :sort-dir]) (def metadactyl-analysis-listing-pa...
b013bd112e6aa7802c0859cdabd337cb4c5a67006982aada243b2708e8b3f857
passivsystems/protean
main.clj
(ns protean.cli.main "A basic command line interface for Protean." (:require [clojure.string :as s] [clojure.java.io :as io] [clojure.tools.cli :refer [parse-opts]] [io.aviso.ansi :as aa] [protean.cli.interface :as i] [protean.config :as conf] ...
null
https://raw.githubusercontent.com/passivsystems/protean/5e9a9a83428899a42c45af019c86bd961d890f92/src/protean/cli/main.clj
clojure
============================================================================= Helper functions ============================================================================= No defaults ============================================================================= Domain functionality =============================...
(ns protean.cli.main "A basic command line interface for Protean." (:require [clojure.string :as s] [clojure.java.io :as io] [clojure.tools.cli :refer [parse-opts]] [io.aviso.ansi :as aa] [protean.cli.interface :as i] [protean.config :as conf] ...
4530d2e43b9d8d4e2d71db13067e328ea552dafceeb9c158377613141dd59d91
vincenthz/hs-crypto-cipher
Benchmarks.hs
import Crypto.Cipher.Benchmarks import Crypto.Cipher.DES (DES) import Crypto.Cipher.TripleDES main = defaultMain [GBlockCipher (undefined :: DES) ,GBlockCipher (undefined :: DES_EEE3) ,GBlockCipher (undefined :: DES_EDE3) ,GBlockCipher (undefined :: DES_EEE2) ,GBlockCipher (undefined :: DES_EDE2) ...
null
https://raw.githubusercontent.com/vincenthz/hs-crypto-cipher/d12559572eb7df9e4497db40a729680481ad3124/cipher-des/Benchmarks/Benchmarks.hs
haskell
import Crypto.Cipher.Benchmarks import Crypto.Cipher.DES (DES) import Crypto.Cipher.TripleDES main = defaultMain [GBlockCipher (undefined :: DES) ,GBlockCipher (undefined :: DES_EEE3) ,GBlockCipher (undefined :: DES_EDE3) ,GBlockCipher (undefined :: DES_EEE2) ,GBlockCipher (undefined :: DES_EDE2) ...
4ef98cd473cb7cf2a77847fcb01de29733054cb6122a96c7ffc735a772e05e4f
cmsc430/www
ast.rkt
#lang racket (provide (all-defined-out)) ;; Concrete syntax: ;; module ::= <elem>* ;; <elem> ::= (provide id*) ;; | (require <string>*) ;; | (define (<id> <id>*) <expr>) ;; | <expr> type Module = ( Module [ I d ] [ ] [ ] ) (struct Module (ps rs ds) #:prefab) type = ( Defn I d ( ...
null
https://raw.githubusercontent.com/cmsc430/www/e8b67fa34ba8561599b25120156f270591bfa1d7/langs/modules-in-progress/ast.rkt
racket
Concrete syntax: module ::= <elem>* <elem> ::= (provide id*) | (require <string>*) | (define (<id> <id>*) <expr>) | <expr> | (Empty) | (Int Integer) | (Var Id) type Id = Symbol type Op0 = 'read-byte | 'write-byte | 'eof-object? ...
#lang racket (provide (all-defined-out)) type Module = ( Module [ I d ] [ ] [ ] ) (struct Module (ps rs ds) #:prefab) type = ( Defn I d ( I d ) Expr ) (struct Defn (f xs e) #:prefab) type = ( Eof ) | ( ) | ( ) | ( ) | ( ) | ( Prim1 ...
2ca8be0249aceecd580a99f7da7de451d23a5cb0f9e3d61217006f38bf31d08e
thephoeron/quipper-language
TemplateOracle.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. -- -- ====================================================================== # LANGUAGE NoMonomorphismRestriction # -- | Thi...
null
https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Algorithms/QLS/TemplateOracle.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== | This module contains an implementation of the oracle and its | Auxiliary function. | Auxiliary function. | Auxiliary function. The...
This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the # LANGUAGE NoMonomorphismRestriction # automatic lifting to quantum circuits using Template Haskell . module Algorithms.QLS.TemplateOracle where import Data.Complex import Libraries.Auxiliary import Control.Monad import QuipperLib.Ari...
b6cec71b5122aad8596546c7108726053cd770e891007097dec81eb16aa1d0a1
PLTools/OCanren
WGC.ml
SPDX - License - Identifier : LGPL-2.1 - or - later open GT module L = List open OCanren open OCanren.Std ocanren type nonrec move = Empty | Goat | Wolf | Cabbage let (!) = inj let qua x y z t = OCanren.inj (x, y, z, t) let [[isGoat; isWolf; isCabbage; isMan] as are; [noGoat; noWolf; noCabbage; noMan] as no] = ...
null
https://raw.githubusercontent.com/PLTools/OCanren/c0883f79c395aa5a9e3afaede82248660627457f/samples/WGC.ml
ocaml
module T1 = struct [%% distrib type nonrec t = A [@@deriving gt ~options:{gmap}] type ground = t] end module T2 = struct [%%distrib type nonrec 'a t = B of 'a [@@deriving gt ~options:{gmap}] type ground = T1.ground t ] end type solution = move logic Std.List.logic [@@deriving gt ~options:{show}]
SPDX - License - Identifier : LGPL-2.1 - or - later open GT module L = List open OCanren open OCanren.Std ocanren type nonrec move = Empty | Goat | Wolf | Cabbage let (!) = inj let qua x y z t = OCanren.inj (x, y, z, t) let [[isGoat; isWolf; isCabbage; isMan] as are; [noGoat; noWolf; noCabbage; noMan] as no] = ...
fa806d7afb057e7162fbe8a548a36bd2a8b1b899998af70c95a15d86ef8a5dbb
sbcl/sbcl
interrupted-sleep.impure.lisp
#-sb-thread (invoke-restart 'run-tests::skip-file) ;; test that SLEEP actually sleeps for at least the given time, even ;; if interrupted by another thread exiting/a gc/anything (with-test (:name (sleep :continue-sleeping-after-interrupt)) (let ((start-time (get-universal-time))) (make-join-thread (lambda () (sl...
null
https://raw.githubusercontent.com/sbcl/sbcl/dd911e00794a976aa590f5c458a9c3ae4d0bb6fa/tests/interrupted-sleep.impure.lisp
lisp
test that SLEEP actually sleeps for at least the given time, even if interrupted by another thread exiting/a gc/anything
#-sb-thread (invoke-restart 'run-tests::skip-file) (with-test (:name (sleep :continue-sleeping-after-interrupt)) (let ((start-time (get-universal-time))) (make-join-thread (lambda () (sleep 1) (sb-ext:gc :full t))) (sleep 5) (assert (>= (get-universal-time) (+ 5 start-time)))))
d3e8872861a0ae9d1bf03d5f7197951112ae4370e5f0d77b74ec74d162fe237e
ghcjs/jsaddle-dom
ChildNode.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ChildNode (before, after, replaceWith, remove, ChildNode(..), gTypeChildNode, IsChildNode, toChildNode) ...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/ChildNode.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ChildNode (before, after, replaceWith, remove, ChildNode(..), gTypeChildNode, IsChildNode, toChildNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe,...
a91edb28df51276e2ea1e12acee67871e4650273f17bb141d532499b56fb2ad4
polyfy/polylith
select_candidates_test.clj
(ns polylith.clj.core.shell.candidate.select-candidates-test (:require [clojure.test :refer :all] [polylith.clj.core.util.interface.color :as color] [polylith.clj.core.shell.candidate.setup :as setup] [polylith.clj.core.shell.candidate.engine :as engine]) (:refer-clojure :exclud...
null
https://raw.githubusercontent.com/polyfy/polylith/0ffbd88effe0b665ca3b50ce211db7f875daa502/components/shell/test/polylith/clj/core/shell/candidate/select_candidates_test.clj
clojure
(ns polylith.clj.core.shell.candidate.select-candidates-test (:require [clojure.test :refer :all] [polylith.clj.core.util.interface.color :as color] [polylith.clj.core.shell.candidate.setup :as setup] [polylith.clj.core.shell.candidate.engine :as engine]) (:refer-clojure :exclud...
9b3e4cf28afb2e3b08f4afa7716030209940d733d00183c675a8271ed963fd0f
b0-system/brzo
brzo_b0_js_of_ocaml.ml
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src-ocaml/brzo_b0_js_of_ocaml.ml
ocaml
See caml_sys_{getenv,get_argv} in jsoo's stdlib.js. Don't pollute the toplevel namespace bottom can be empty to be used in the browser console See
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
d95e1cf3da27edb3a9e33341075de36d12b87afa27fd2c82ff64452303b1ec3c
tcsprojects/mlsolver
pgsolversregistry.mli
open Tcsgames type solver_func = (string array -> (explicit_pg -> explicit_pg_solution * explicit_pg_strategy)) val register_solver: solver_func -> string -> string -> string -> unit val mem_solver: string -> bool val find_solver: string -> solver_func * string * string val enum_solvers: (solver_func -> stri...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/pgsolvers/pgsolversregistry.mli
ocaml
open Tcsgames type solver_func = (string array -> (explicit_pg -> explicit_pg_solution * explicit_pg_strategy)) val register_solver: solver_func -> string -> string -> string -> unit val mem_solver: string -> bool val find_solver: string -> solver_func * string * string val enum_solvers: (solver_func -> stri...
958e38aea3033a5186d0bf4a34c416f815c92c46435d3549f1b9078ebd5bf8c4
ndmitchell/ghcid
API.hs
-- | Test the high level library API module Test.API(apiTests) where import Test.Tasty import Test.Tasty.HUnit import System.FilePath import System.IO.Extra import System.Time.Extra import Language.Haskell.Ghcid import Language.Haskell.Ghcid.Util import Test.Common apiTests :: TestTree apiTests = testGroup "API test...
null
https://raw.githubusercontent.com/ndmitchell/ghcid/f944399fcc8833f44a91ae0206994ae5b01fccbe/src/Test/API.hs
haskell
| Test the high level library API
module Test.API(apiTests) where import Test.Tasty import Test.Tasty.HUnit import System.FilePath import System.IO.Extra import System.Time.Extra import Language.Haskell.Ghcid import Language.Haskell.Ghcid.Util import Test.Common apiTests :: TestTree apiTests = testGroup "API test" [testCase "No files" $ withTemp...
dd7ec4485ce69236aa923a779cdc6d62cedae4aeeb9118d7d63b1a2c7a30592d
tweag/gazelle_cabal
Cabal_9_2.hs
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ == 902 module Cabal.Cabal_9_2(module Cabal, depLibraries, hsSourceDirs) where import Distribution.Compiler as Cabal (CompilerFlavor(GHC), perCompilerFlavorToList, unknownCompilerInfo, CompilerId(CompilerId), AbiTag(NoAbiTag)) import Distribution.ModuleName as Cabal (toFilePa...
null
https://raw.githubusercontent.com/tweag/gazelle_cabal/3871c0b8edc2dbda883151185f827e1e73351fcc/cabalscan/src/Cabal/Cabal_9_2.hs
haskell
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ == 902 module Cabal.Cabal_9_2(module Cabal, depLibraries, hsSourceDirs) where import Distribution.Compiler as Cabal (CompilerFlavor(GHC), perCompilerFlavorToList, unknownCompilerInfo, CompilerId(CompilerId), AbiTag(NoAbiTag)) import Distribution.ModuleName as Cabal (toFilePa...
b178eff6a8f50d111614ef291b569c886b7c67c08f9306bc9b1d21596c185de6
conal/shaped-types
Orphans.hs
# LANGUAGE CPP # # LANGUAGE EmptyCase # # LANGUAGE LambdaCase # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wall -fno - warn - orphans # ---------------------------------------------------------------------- -- | Module : . Orphans Copyright : ( c ) 2016 Conal Elliott -- Li...
null
https://raw.githubusercontent.com/conal/shaped-types/3778974bca793fa810195546e0d4362151aa9a6b/src/ShapedTypes/Orphans.hs
haskell
-------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental Orphan instances -------------------------------------------------------------------- ------------------------------------------------------------------- newtype Par1 p = Pa...
# LANGUAGE CPP # # LANGUAGE EmptyCase # # LANGUAGE LambdaCase # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wall -fno - warn - orphans # Module : . Orphans Copyright : ( c ) 2016 Conal Elliott module ShapedTypes.Orphans () where import Prelude hiding (zip,zipWith) import...
1d306e4b4697b4a4f8c31f45015aed25761f56be147dd91666a2072d7f44de17
tov/dssl2
strlen.rkt
#lang dssl2 assert ''.len() == 0 assert '0'.len() == 1 assert '01234'.len() == 5
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/strlen.rkt
racket
#lang dssl2 assert ''.len() == 0 assert '0'.len() == 1 assert '01234'.len() == 5
3d619f2af5e5c7eafb95c7349c22335ca0f9b3c891ee12a064ecd8c863392757
nilenso/kulu-backend
20150115181457100-create-users.clj
;; migrations/20150115181457100-create-users.clj (defn up [] ["CREATE TABLE users(id UUID default uuid_generate_v4() primary key, user_name VARCHAR(250), email VARCHAR(255), created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP WITHO...
null
https://raw.githubusercontent.com/nilenso/kulu-backend/0b404f76643e77219432dcbffa681172a61e591b/migrations/20150115181457100-create-users.clj
clojure
migrations/20150115181457100-create-users.clj
(defn up [] ["CREATE TABLE users(id UUID default uuid_generate_v4() primary key, user_name VARCHAR(250), email VARCHAR(255), created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, CONSTRAIN...
3aea7fbc854575bb5ad3e5b5a609f4b97095c528cb3833ac9a0b8700bc466e74
tathougies/beam-mysql
Syntax.hs
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # module Database.Beam.MySQL.Syntax where import Database.Beam.Backend.SQL import Database.Beam.Query import Database.MySQL.Base (Connection) import qualified Data.Aeson as A (Value, encode) import Data.ByteString (ByteSt...
null
https://raw.githubusercontent.com/tathougies/beam-mysql/2c561b486acf80c7847f48667f1a7d9222f2b35a/Database/Beam/MySQL/Syntax.hs
haskell
We use backticks in MySQL, because the double quote mode requires ANSI_QUOTES, which may not always be enabled | Note: MySQL does not allow timezones in date/time types Remove this dependence on Sql99ExpressionSyntax instance IsSql2003EnhancedNumericFunctionsExpressionSyntax MysqlExpressionSyntax where expE ...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # module Database.Beam.MySQL.Syntax where import Database.Beam.Backend.SQL import Database.Beam.Query import Database.MySQL.Base (Connection) import qualified Data.Aeson as A (Value, encode) import Data.ByteString (ByteSt...
27d48b9a0ba343aaddec6fc2470e9b6599693cf21cd54786c187c72862a763b9
ckirkendall/kioo
core_test.clj
(ns kioo.server.core-test (:use clojure.test) (:require [kioo.server.core :refer [component snippet defsnippet template defsnippet content content set-attr append prepend remove-attr before after do-> ...
null
https://raw.githubusercontent.com/ckirkendall/kioo/970d029ca0ab813a916c77286bcb7cf33a005e3c/test/kioo/server/core_test.clj
clojure
note that ract wraps text nodes in span tags this is expected to be corrected soon in react but for now this is correct color:red;\">testing</span>"
(ns kioo.server.core-test (:use clojure.test) (:require [kioo.server.core :refer [component snippet defsnippet template defsnippet content content set-attr append prepend remove-attr before after do-> ...
f071c3bba8113026f3140f5373668bb00bedd0f3619c6dbdb60e7f20b221af37
tweag/ormolu
operators-0.hs
a = b & c .~ d & e %~ f g
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/operators-0.hs
haskell
a = b & c .~ d & e %~ f g
86eb6cd35cbf586d8fac8f32614468236f6649b468435980a2b662c5bec8a2f6
dmitryvk/cl-gtk2
gdk.objects.lisp
(in-package :gdk) (define-g-enum "GdkGrabStatus" grab-status () :success :already-grabbed :invalid-time :not-viewable :frozen) (defcenum crossing-mode :normal :grab :ungrab :gtk-grab :gtk-ungrab :state-changed) (export 'crossing-mode) (defcenum notify-type (:ancestor 0) :virtual :inferior :nonlinear :nonlinear-virtu...
null
https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/gdk/gdk.objects.lisp
lisp
gdk_display_get_screen FIXME: Check correct type TODO: GIcon
(in-package :gdk) (define-g-enum "GdkGrabStatus" grab-status () :success :already-grabbed :invalid-time :not-viewable :frozen) (defcenum crossing-mode :normal :grab :ungrab :gtk-grab :gtk-ungrab :state-changed) (export 'crossing-mode) (defcenum notify-type (:ancestor 0) :virtual :inferior :nonlinear :nonlinear-virtu...
61fd551b5cab8e5bbf4bac7c7429c831848f43d539c8469ce9f0f0e4df694eac
xaptum/oneup_metrics
functional_SUITE.erl
%%%------------------------------------------------------------------- @author iguberman ( C ) 2017 , Xaptum , Inc. %%% @doc %%% %%% @end Created : 20 . Dec 2017 3:16 PM %%%------------------------------------------------------------------- -module(functional_SUITE). -author("iguberman"). -define(TEST_CONFIG, [...
null
https://raw.githubusercontent.com/xaptum/oneup_metrics/cfbf248a8f630596f7c3e40c3da1f32d9c1c0531/ct/functional_SUITE.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API API
@author iguberman ( C ) 2017 , Xaptum , Inc. Created : 20 . Dec 2017 3:16 PM -module(functional_SUITE). -author("iguberman"). -define(TEST_CONFIG, [ {oneup_counter, [[a, b, c1, d1, ref1], [a, b, c1, d2, ref2], [a, b, c2, d1, ref3], [a, b, c2, d1, ref4], [a2, b2, c2, d2, ref5]]} ]). -include_lib("comm...
91e7b0569ed53f2683ce07e6ace2516164b8858590985c4003345fe6d09cbbe2
hidaris/thinking-dumps
interp.rkt
#lang typed/racket (provide (all-defined-out)) (require "parser.rkt") (require "ast.rkt") (require "env.rkt") (: value-of (-> Expression Environment Value)) (define (value-of exp env) (match exp [(Const n) (Num n)] [(BoolExp b) (Bool b)] [(Var a) (apply-env a env)] [(Diff n1 n2) (let...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-08/interp.rkt
racket
#lang typed/racket (provide (all-defined-out)) (require "parser.rkt") (require "ast.rkt") (require "env.rkt") (: value-of (-> Expression Environment Value)) (define (value-of exp env) (match exp [(Const n) (Num n)] [(BoolExp b) (Bool b)] [(Var a) (apply-env a env)] [(Diff n1 n2) (let...
d2192ec162cf8cdc115c776be9e42f4f5c7095f144edb6ec31615898fc6888f2
apache/couchdb-erlfdb
erlfdb_01_basic_test.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-erlfdb/0fa8eac025253c56ddacfe0e0420d4d3ac5e9768/test/erlfdb_01_basic_test.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(erlfdb_01_basic_test). -include_lib("eunit/include/eunit.hrl"). load_test() -> erlfdb_nif:ohai(). get_error_string_test() -> ?assertEqual...
167443f34ff27a489449a055ee2cab669433297fb0c1f728945984942fc6f411
haskell-compat/base-compat
Compat.hs
# LANGUAGE CPP , NoImplicitPrelude # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,12,0)) {-# LANGUAGE BangPatterns #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeInType #-} #endif #if MIN_VERSION_base(4,17,0) && !(MIN_VERSION_base(4,18,0)) # LANGU...
null
https://raw.githubusercontent.com/haskell-compat/base-compat/e18c4664d784542505966a7610bbac43652afda6/base-compat/src/Prelude/Compat.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # LANGUAGE TypeInType # classes data types type synonyms The equality types | A variant of 'error' that does not produce a stack trace. | Strict (call-by-value) application operator. It takes a function and an the function with that value.
# LANGUAGE CPP , NoImplicitPrelude # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,12,0)) #endif #if MIN_VERSION_base(4,17,0) && !(MIN_VERSION_base(4,18,0)) # LANGUAGE ExplicitNamespaces # #endif module Prelude.Compat ( #if MIN_VERSION_base(4,18,0) ...
5a031f25da8b7bd9df1af83750977c8b59d02feedb06e35085cdf71869feeec6
digital-asset/ghc
CaretDiagnostics2.hs
module CaretDiagnostics2 where Ó&lËĺ5kÍ
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/warnings/should_fail/CaretDiagnostics2.hs
haskell
module CaretDiagnostics2 where Ó&lËĺ5kÍ
ef3fa101a5a6f36aa22341d2e1cb91ebaf922d50d28d64c7eb42476311cc5551
wwezhuimeng/kazoo
rabbit_policies.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/wwezhuimeng/kazoo/06a15811dbf123ae1601dc7a4ced956a7e04f58a/deps/rabbitmq_server-3.3.5/src/rabbit_policies.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
394aad4e6a48c84978452d17682b87292dadff5ae9b313672a00aa98bf65ee81
haas/harmtrace
Instances.hs
# OPTIONS_GHC -Wall -fno - warn - orphans # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE TypeFamilies # {-# LANGUAGE GADTs #-} module HarmTrace.Base.Instances where import Control.DeepSeq import HarmTrace.Base.MusicRep -------...
null
https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Base/Instances.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# OPTIONS_GHC -Wall -fno - warn - orphans # # LANGUAGE TypeFamilies # module HarmTrace.Base.Instances where import Control.DeepSeq import HarmTrace.Base.MusicRep NFData instances for HarmTrace - Base instance NFData Mode where rnf MinMode = () rnf MajMode = ()
fbf52416663b8f6c8a098d68e6a900f548472dfd803a261472737dc0813d6cf3
logseq/deprecated-github-backend
s3.clj
(ns app.s3 (:require [clojure.string :as str] [clj-time.core :as t] [clj-time.coerce :as coerce]) (:import (com.amazonaws AmazonServiceException HttpMethod SdkClientException) (com.amazonaws.auth AWSStaticCredentialsProvider BasicAWSCredentials) (com.amazonaws.client.builder AwsClie...
null
https://raw.githubusercontent.com/logseq/deprecated-github-backend/7aa2f187f0f2d7b1e9c3f6a057bede939b4790b7/src/main/app/s3.clj
clojure
(ns app.s3 (:require [clojure.string :as str] [clj-time.core :as t] [clj-time.coerce :as coerce]) (:import (com.amazonaws AmazonServiceException HttpMethod SdkClientException) (com.amazonaws.auth AWSStaticCredentialsProvider BasicAWSCredentials) (com.amazonaws.client.builder AwsClie...
d514604687375811296c7f5b5238e1d8a1da2cbf9c261d210215d52b58865328
boris-ci/boris
Build.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Boris.Client.Build ( trigger , cancel , fetch , list , ignore , rebuild , queue , heartbeat , acknowledge , avow , complete ) where import Data.Aeson ((.=)) import qualified Data.Aeson as Aeson import qualifi...
null
https://raw.githubusercontent.com/boris-ci/boris/c321187490afc889bf281442ac4ef9398b77b200/boris-client/src/Boris/Client/Build.hs
haskell
# LANGUAGE OverloadedStrings # } } - H.delete ["build", renderBuildId i] - } } }
# LANGUAGE NoImplicitPrelude # module Boris.Client.Build ( trigger , cancel , fetch , list , ignore , rebuild , queue , heartbeat , acknowledge , avow , complete ) where import Data.Aeson ((.=)) import qualified Data.Aeson as Aeson import qualified Boris.Client.Response as Respons...
42a75eb26511d0fce49211c6c8d5927f692d819a08a66f0edc8863dbeea88336
fumieval/extensible
Effect.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : Data.Extensible.Effect Copyright : ( c ) 2018 -- License : BSD3 -- Maintainer : < > -- -- Name-based extens...
null
https://raw.githubusercontent.com/fumieval/extensible/4a1edb50c90d377085fcc3bad4c9f6e9d296b00e/extensible-skeleton/src/Data/Extensible/Effect.hs
haskell
# LANGUAGE BangPatterns # --------------------------------------------------------------------------- | Module : Data.Extensible.Effect License : BSD3 Name-based extensible effects --------------------------------------------------------------------------- * Base * Step-wise handling * Peeling * An...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Copyright : ( c ) 2018 Maintainer : < > module Data.Extensible.Effect ( Instruction(..) , Eff , liftEff , liftsEff , hoistEff , castEff , Interpreter(..) , handleEff , peelEff , Rebinder , rebindEff0 , peelEff0 , rebi...
130b60099ef3b92e72c03a3f49d5dd9b6e5f5efdce0d1096f1adfb4496472af8
maxdore/elfe
Preprocessor.hs
module Elfe.Preprocessor where import Data.List import Data.Maybe (listToMaybe) import System.IO.Unsafe (unsafePerformIO) incMarker :: String incMarker = "Include " includeLibraries :: String -> String includeLibraries t = case findSubstring incMarker t of Nothing -> t Just i -> includeLibraries $ insertLibr...
null
https://raw.githubusercontent.com/maxdore/elfe/56ecf5f704594221f30e342b9bb9dbc7874f5656/src/Elfe/Preprocessor.hs
haskell
module Elfe.Preprocessor where import Data.List import Data.Maybe (listToMaybe) import System.IO.Unsafe (unsafePerformIO) incMarker :: String incMarker = "Include " includeLibraries :: String -> String includeLibraries t = case findSubstring incMarker t of Nothing -> t Just i -> includeLibraries $ insertLibr...
d199392cc1dc32ec635130b1eb6c62b22822625b882d601f15d990855ea4b5cf
lley154/cardano-lottery
LottoContract.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # ...
null
https://raw.githubusercontent.com/lley154/cardano-lottery/e7f714472d869b336acf4c90303319498e493b4e/app/LottoContract.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes #
# LANGUAGE DeriveGeneric # # LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module LottoContract( StarterContracts(..) ) where import Data.Aeson ...
25e9087c433d9e1fd5fc62d0fc694568021ed07375741bcc0f76822fbc390f3e
openmusic-project/openmusic
vectors.lisp
-*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / vectors.lisp , v 1.8.1.1 2014/05/27 20:56:57 davef Exp $ " -*- Copyright ( c ) 1987 - -2015 LispWorks Ltd. All rights reserved . (in-package "OPENGL") ;;; ---------------------------------------------...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/OpenGL/opengl-lw/vectors.lisp
lisp
rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / vectors.lisp , v 1.8.1.1 2014/05/27 20:56:57 davef Exp $ " -*- ---------------------------------------------------------------------- ---------------------------------------------------------------------- opengl:gl-vector...
Copyright ( c ) 1987 - -2015 LispWorks Ltd. All rights reserved . (in-package "OPENGL") OPENGL portable vector handling utilities . DEFTYPES : : for the vector Vector is allocated within the scope of the BODY . : signed-8 , : signed-16 , : signed-32 : ...
ee1d82a32dd561c63621eac6673c1aec7e15919aa4a1166154bad2089ad0513e
RedPenguin101/aoc2021
day13.clj
(ns aoc2021.day13 (:require [clojure.set :as set] [clojure.string :as str] [aoc2021.utils :as u])) (defn parse [input-str] (let [[coords instr] (str/split input-str #"\n\n")] [(set (map vec (partition 2 (u/extract-ints coords)))) (map vector (map #(if (= "x" %) 0 1) (re-seq #"[xy]"...
null
https://raw.githubusercontent.com/RedPenguin101/aoc2021/be100c972dc749c20203f3e30412b2e4cdb87e26/clojure/src/aoc2021/day13.clj
clojure
(ns aoc2021.day13 (:require [clojure.set :as set] [clojure.string :as str] [aoc2021.utils :as u])) (defn parse [input-str] (let [[coords instr] (str/split input-str #"\n\n")] [(set (map vec (partition 2 (u/extract-ints coords)))) (map vector (map #(if (= "x" %) 0 1) (re-seq #"[xy]"...
f4425b2d3943e0a49fc68f655b3fe1823af39802f558e405593878d5bc5106a4
DKurilo/hackerrank
solution2.hs
# LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields # module Main where import Control.Monad import Data.Array import Data.Bits import qualified Data.List as DL import Data.List.Split import Debug.Trace import System.Environment import System.IO import System.IO.Unsafe import Control.Monad.ST ...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/common-child/solution2.hs
haskell
Complete the commonChild function below. hPutStrLn fptr $ show result
# LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields # module Main where import Control.Monad import Data.Array import Data.Bits import qualified Data.List as DL import Data.List.Split import Debug.Trace import System.Environment import System.IO import System.IO.Unsafe import Control.Monad.ST ...
c1b960c68d7d157eb93e225440a81becc493adc0b4b8e742a40a48971b058dbf
spawnfest/eep49ers
wxTopLevelWindow.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxTopLevelWindow.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxTopLevelWindow). -include("wxe.hrl"). -export([centerOnScreen/1,centerOnScreen/2,centreOnScreen/1,centreOn...
c6aac44667a4ac958b11b5e12b1bc75861d3ad3d3a4467b3d6593e51dc019093
clojure-quant/infra-guix
programming.scm
(define-module (awb99 packages programming)) (define-public clojure-packages (list " icedtea " ; open - jdk java ;"openjdk" ;(list "openjdk" "jdk" "doc" "out") ;"openjdk:doc" ; doc output of openjdk - needed by cider/orchard having first openjdk does not "fastjar" ; java "jar" app "java-q...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/0058e257d67d22cfdc768896e97818c1c2cc7575/modules/awb99/packages/programming.scm
scheme
open - jdk java "openjdk" (list "openjdk" "jdk" "doc" "out") "openjdk:doc" ; doc output of openjdk - needed by cider/orchard java "jar" app from this is old . brings clojure ( OLD ) - tools already brings this . guix version ( OLD ) nongnu downloads java-8 jar from github repo , v 2.9.5 dependency gr...
(define-module (awb99 packages programming)) (define-public clojure-packages (list having first openjdk does not "java-qdox" "java-swt" "rlwrap" brings clj and clojure letsencrypt certs "git" )) (define-public node-packages (list v10 , v14 is in development . brings n...
2ac5ad2e9f7c9b7572f821b1019a6cbb9a978e8ebad41c16bd91e1c8ff414269
ghcjs/ghcjs-base
Internal.hs
{-# LANGUAGE DeriveDataTypeable #-} module JavaScript.Web.ErrorEvent.Internal where import GHCJS.Types import Data.Typeable newtype ErrorEvent = ErrorEvent JSVal deriving Typeable
null
https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Web/ErrorEvent/Internal.hs
haskell
# LANGUAGE DeriveDataTypeable #
module JavaScript.Web.ErrorEvent.Internal where import GHCJS.Types import Data.Typeable newtype ErrorEvent = ErrorEvent JSVal deriving Typeable
3710098196dc14357c5e01c103d2b9effb6b5ff2dbdcd8d3cdd6edc11901bb6d
george-steel/maxent-learner
Generators.hs
| Module : Text . PhonotacticLearner . PhonotacticConstraints . Generators Description : Generation of candidate constraint sets . Copyright : © 2016 - 2017 George Steel and License : GPL-2 + Maintainer : Functions for generating sets of candidate constraint sets . For basic use , ' CandidateSettings ' ...
null
https://raw.githubusercontent.com/george-steel/maxent-learner/dfa29387338418e55f681886a7b3e5ca46bba459/maxent-learner-hw/src/Text/PhonotacticLearner/PhonotacticConstraints/Generators.hs
haskell
| Settings for grammar generation ^ Allow single classes and bigrams restricted to word boundaries. | Generate a reasonable set of candidate constraints based single classes, bigrams, and the4 additionsl constraint types specified in the settings. | Given a number n and a sequence, returns all subsewuences of lengt...
| Module : Text . PhonotacticLearner . PhonotacticConstraints . Generators Description : Generation of candidate constraint sets . Copyright : © 2016 - 2017 George Steel and License : GPL-2 + Maintainer : Functions for generating sets of candidate constraint sets . For basic use , ' CandidateSettings ' ...
6b6b063da2700d07310462e4fd6be1621e8dcef296380a124487c82ec0338f15
diku-dk/futhark
SegRed.hs
# LANGUAGE TypeFamilies # | We generate code for non - segmented / single - segment SegRed using the basic approach outlined in the paper " Design and GPGPU -- Performance of Futhark’s Redomap Construct" (ARRAY '16). The main -- deviations are: -- * While we still use two - phase reduction , we use only a singl...
null
https://raw.githubusercontent.com/diku-dk/futhark/0abe630e53af313018c1cb39f7d5fb74bf1e0b6e/src/Futhark/CodeGen/ImpGen/GPU/SegRed.hs
haskell
Performance of Futhark’s Redomap Construct" (ARRAY '16). The main deviations are: kernel, with the final workgroup to write a result (tracked via an atomic counter) performing the final reduction as well. * Instead of depending on storage layout transformations to handle non-commutative reductions effici...
# LANGUAGE TypeFamilies # | We generate code for non - segmented / single - segment SegRed using the basic approach outlined in the paper " Design and GPGPU * While we still use two - phase reduction , we use only a single @groupsize@-sized window over the input , and perform a parallel Regular Segmented R...
26884645e4b2aa352dc14ae7955d49bf45bb82aa7d9ce3a61314f20208e141f7
c-cube/ocaml-containers
CCMixtbl.mli
(* This file is free software, part of containers. See file "license" for more details. *) * Hash Table with Heterogeneous Keys From ( thanks to him ) . Example : { [ let inj_int = CCMixtbl.create_inj ( ) ; ; let = CCMixtbl.create 10 ; ; assert_equal None ( CCMixtbl.get ...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCMixtbl.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * A hash table containing values of different types. The type parameter ['a] represents the type of the keys. * An accessor for values of type 'b in any table. Values put in the table using a key can only be retrieved using ...
* Hash Table with Heterogeneous Keys From ( thanks to him ) . Example : { [ let inj_int = CCMixtbl.create_inj ( ) ; ; let = CCMixtbl.create 10 ; ; assert_equal None ( CCMixtbl.get ~inj : inj_int tbl " a " ) ; ; CCMixtbl.set inj_int tbl " a " 1 ; ; asser...
5bbf92eadd4c23e24eab7b862c5b536e51a1eaa9bf1f094e6c3dbcac73d57ea8
penpot/penpot
changes_spec.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.common.pages.changes-spec (:require [app.common.spec :as us] [app.common.types.color :as ctc] ...
null
https://raw.githubusercontent.com/penpot/penpot/da517f2d3559c9e03c00fe4397e99ebee90088b8/common/src/app/common/pages/changes_spec.cljc
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.common.pages.changes-spec (:require [app.common.spec :as us] [app.common.types.color :as ctc] [app.common.types.file.media-o...
8b41d4eda50c75f4b2495814d4a5bddbc1e128fc0e14d86f4601498a1c6a20b0
squint-cljs/squint
changelog.clj
#!/usr/bin/env bb (ns changelog (:require [clojure.string :as str])) (let [changelog (slurp "CHANGELOG.md") replaced (str/replace changelog #" #(\d+)" (fn [[_ issue after]] (format " [#%s](-cljs/squint/issues/%s)%s" ...
null
https://raw.githubusercontent.com/squint-cljs/squint/c8cf858228cccc24f3317034bd5d700092dc6169/script/changelog.clj
clojure
#!/usr/bin/env bb (ns changelog (:require [clojure.string :as str])) (let [changelog (slurp "CHANGELOG.md") replaced (str/replace changelog #" #(\d+)" (fn [[_ issue after]] (format " [#%s](-cljs/squint/issues/%s)%s" ...
838140aa3640cc8ee44e823c774e1a6cee602eeb1a45d79bb8b391bc91c297db
kronkltd/jiksnu
group_membership_routes.clj
(ns jiksnu.modules.web.routes.group-membership-routes (:require [jiksnu.modules.core.actions.group-membership-actions :as actions.group-membership] [jiksnu.modules.http.resources :refer [defresource defgroup]] [jiksnu.modules.web.core :refer [jiksnu]] [jiksnu.modules.web.helpers :r...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/web/routes/group_membership_routes.clj
clojure
(ns jiksnu.modules.web.routes.group-membership-routes (:require [jiksnu.modules.core.actions.group-membership-actions :as actions.group-membership] [jiksnu.modules.http.resources :refer [defresource defgroup]] [jiksnu.modules.web.core :refer [jiksnu]] [jiksnu.modules.web.helpers :r...
da1404efa2ee8e13e5933575faf50f4fe35d956ceec0924ba2cdfed202f48ebf
facet-lang/facet
Readline.hs
{-# LANGUAGE GADTs #-} -- FIXME: split this into separate input and output effect modules. module Facet.Effect.Readline ( -- * Input effect Input(..) , getInputLine , withInterrupt , handleInterrupt -- * Output effect , Output(..) , outputStr , outputStrLn , outputText , outputTextLn , outputDoc , outputDocLn -- ...
null
https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Effect/Readline.hs
haskell
# LANGUAGE GADTs # FIXME: split this into separate input and output effect modules. * Input effect * Output effect * Re-exports
module Facet.Effect.Readline Input(..) , getInputLine , withInterrupt , handleInterrupt , Output(..) , outputStr , outputStrLn , outputText , outputTextLn , outputDoc , outputDocLn , Algebra , Has , run ) where import Control.Algebra import Data.Kind (Type) import Data.Text import Facet.Pretty import Facet.Style imp...
6d11cece31ab5f485a40e8fd153168fd28b98793f78970f9433c410cfe88d938
qkrgud55/ocamlmulti
typedecl.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/typedecl.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : typedecl.mli 12521 2012 - 05 ...
60cf9050c73f48239d9a9191e503b435f3291c9ae2ff91985daf9d1b86944ed6
jawline/c8hardcaml
fetch.ml
open! Core open! Hardcaml open! Signal open Global module I = struct type 'a t = { clock : 'a [@bits 1] ; clear : 'a [@bits 1] ; program_counter : 'a [@bits 12] ; in_fetch : 'a [@bits 1] ; memory : 'a Main_memory.In_circuit.I.t } [@@deriving sexp_of, hardcaml] end module O = struct type ...
null
https://raw.githubusercontent.com/jawline/c8hardcaml/03f848c71e334edb212e0694b32491fb3ba54156/src/fetch.ml
ocaml
open! Core open! Hardcaml open! Signal open Global module I = struct type 'a t = { clock : 'a [@bits 1] ; clear : 'a [@bits 1] ; program_counter : 'a [@bits 12] ; in_fetch : 'a [@bits 1] ; memory : 'a Main_memory.In_circuit.I.t } [@@deriving sexp_of, hardcaml] end module O = struct type ...
65f441ce3b8eb7195a10607e1902c34ada8852067f4b51525f9273773e9ac3dc
haskell-distributed/distributed-process
Test.hs
module Network.Transport.Test where import qualified Network.Transport as NT import Data.Typeable (Typeable) -- | Extra operations required of transports for the purposes of testing. data TestTransport = TestTransport { -- | The transport to use for testing. testTransport :: NT.Transport -- | IO action to p...
null
https://raw.githubusercontent.com/haskell-distributed/distributed-process/ccc002c928d29335b5eb73be1d876007adaa0b53/distributed-process-tests/src/Network/Transport/Test.hs
haskell
| Extra operations required of transports for the purposes of testing. | The transport to use for testing. | IO action to perform to simulate losing a connection.
module Network.Transport.Test where import qualified Network.Transport as NT import Data.Typeable (Typeable) data TestTransport = TestTransport testTransport :: NT.Transport , testBreakConnection :: NT.EndPointAddress -> NT.EndPointAddress -> IO () } deriving (Typeable)
a3620dd2d9e686df0d0930e23bc7e4ade16895e5b943b164e9506e6aab3c6f1e
walkie/Hagl
Crisis.hs
# LANGUAGE NoMonomorphismRestriction # | A simplistic model of the Cuban Missile Crisis . From GHCi , print the game tree : > > > crisis Or run a simulation : > > > evalGame crisis [ khrushchev , ] ( finish > > printTranscript ) > > > evalGame crisis [ khrushchev , ] ( step > > step > > printTrans...
null
https://raw.githubusercontent.com/walkie/Hagl/ac1edda51c53d2b683c4ada3f1c3d4d14a285d38/src/Hagl/Example/Crisis.hs
haskell
* Representation | The Cuban Missle Crisis, as a game tree. * Players | Nikita Khrushchev
# LANGUAGE NoMonomorphismRestriction # | A simplistic model of the Cuban Missile Crisis . From GHCi , print the game tree : > > > crisis Or run a simulation : > > > evalGame crisis [ khrushchev , ] ( finish > > printTranscript ) > > > evalGame crisis [ khrushchev , ] ( step > > step > > printTrans...
1ea4f46b57f402b23f7d23543890702adc609b01e82f3930effc330f2d5406fe
exercism/racket
accumulate.rkt
#lang racket (provide accumulate) (define (accumulate sequence operation) (error "Not implemented yet"))
null
https://raw.githubusercontent.com/exercism/racket/2ec0e750e5e8cde8d07542201e75c90625e222ea/exercises/practice/accumulate/accumulate.rkt
racket
#lang racket (provide accumulate) (define (accumulate sequence operation) (error "Not implemented yet"))
637cec5b887ae2510adecd07a2e2329b4f6bf1e92448aa6c84c947fc7f479b2d
xh4/web-toolkit
decode.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*- $ Header : /usr / local / cvsrep / flexi - streams / decode.lisp , v 1.35 2008/08/26 10:59:22 edi Exp $ Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with o...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/flexi-streams-20190107-git/decode.lisp
lisp
Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*- 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 list of conditions a...
$ Header : /usr / local / cvsrep / flexi - streams / decode.lisp , v 1.35 2008/08/26 10:59:22 edi Exp $ Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-p...
d342398af3d0ef5496f5adc071dab4ab1eedcde228a27c3ed3e89150f9425373
rlepigre/pml
utf8.ml
let next s pos = let cc = Char.code s.[pos] in if cc lsr 7 = 0 then pos + 1 else if (cc lsr 6) land 1 = 0 then invalid_arg "utf8_next" else if (cc lsr 5) land 1 = 0 then pos + 2 else if (cc lsr 4) land 1 = 0 then pos + 3 else if (cc lsr 3) land 1 = 0 then pos + 4 else invalid_arg "Utf8.next" let len s = ...
null
https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/src/util/utf8.ml
ocaml
let next s pos = let cc = Char.code s.[pos] in if cc lsr 7 = 0 then pos + 1 else if (cc lsr 6) land 1 = 0 then invalid_arg "utf8_next" else if (cc lsr 5) land 1 = 0 then pos + 2 else if (cc lsr 4) land 1 = 0 then pos + 3 else if (cc lsr 3) land 1 = 0 then pos + 4 else invalid_arg "Utf8.next" let len s = ...
1119b3350b600f57ebe1e6d8f6f3cd9d9d20c7d8212cf1e8dc7257039277279e
wojtekmach/hello_beam
hello_lfe_test.erl
-module(hello_lfe_test). -include_lib("eunit/include/eunit.hrl"). hello_test() -> <<"Hello from LFE!">> = hello_lfe:hello().
null
https://raw.githubusercontent.com/wojtekmach/hello_beam/aa60ca297113514a877d9061ccbcdbd31bd7cd80/apps/hello_lfe/test/hello_lfe_test.erl
erlang
-module(hello_lfe_test). -include_lib("eunit/include/eunit.hrl"). hello_test() -> <<"Hello from LFE!">> = hello_lfe:hello().
1948f2fec306ddad1b95aa490ed1367b10f973701245f19d93d459438e229877
geneweb/geneweb
gwdiff.ml
Copyright ( c ) 2001 open Def open Gwdb (*= TODO ===================================================================== - Improve the way not to check several time the same persons. =========================================================================== *) let in_file1 = ref "" let in_file2 = ref "" let htm...
null
https://raw.githubusercontent.com/geneweb/geneweb/7b71f8f2f75e0e847818f821a0267938f38c9cf5/bin/gwdiff/gwdiff.ml
ocaml
= TODO ===================================================================== - Improve the way not to check several time the same persons. =========================================================================== * [person_string base iper] Returns the string associated to the person with id `iper` in the base...
Copyright ( c ) 2001 open Def open Gwdb let in_file1 = ref "" let in_file2 = ref "" let html = ref false let root = ref "" let cr = ref "" * Messages are printed when there is a difference between a person present in the two bases explored . present in the two bases explored. *) type messages = | Ms...
e720d821ea02048b24dd8eaba26be5e859a6576b8d82899e9e5511a21d999295
ondrap/json-stream
doctests.hs
module Main where import Test.DocTest main :: IO () main = doctest [ "-idist/build", "dist/build/doctest/doctest-tmp/c_lib/lexer.o", "dist/build/doctest/doctest-tmp/c_lib/unescape_string.o", "Data/JsonStream/Parser.hs"]
null
https://raw.githubusercontent.com/ondrap/json-stream/d97da63181255bbc4b8c81b1411b14d769b104e6/test/doctests.hs
haskell
module Main where import Test.DocTest main :: IO () main = doctest [ "-idist/build", "dist/build/doctest/doctest-tmp/c_lib/lexer.o", "dist/build/doctest/doctest-tmp/c_lib/unescape_string.o", "Data/JsonStream/Parser.hs"]
a255156a40dd2a9590ed550b5e69fc2d97d5b77c1f34c8aee5060e9a725e10de
alura-cursos/clojure-introducao-a-testes
logic_test.clj
(ns hospital.logic-test (:require [clojure.test :refer :all] [hospital.logic :refer :all])) (deftest cabe-na-fila?-test ; boundary tests exatamente na off . -1 , +1 . < = , > = , = . checklist na . poderia ser um checklist no papel borda do zero (testing "Que cabe numa fila vazia" (...
null
https://raw.githubusercontent.com/alura-cursos/clojure-introducao-a-testes/40c6875480e31d7635ae74494cc0658d8c664bb4/aula3.2/hospital/test/hospital/logic_test.clj
clojure
boundary tests borda do limite é de simples leitura pois é sequencial (is (not (cabe-na-fila? {:espera [1 2 3 4 5]}, :espera))) teste não sequencial teste não sequencial (is (thrown? IllegalStateException (is (try false )))
(ns hospital.logic-test (:require [clojure.test :refer :all] [hospital.logic :refer :all])) (deftest cabe-na-fila?-test exatamente na off . -1 , +1 . < = , > = , = . checklist na . poderia ser um checklist no papel borda do zero (testing "Que cabe numa fila vazia" (is (cabe-na-fila? {...