_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 |
|---|---|---|---|---|---|---|---|---|
5294df8a2bdbd75a008e83728853a5e9d6bcc867ddac6099ec8552b8d7e19752 | chicken-mobile/chicken-sdl2-android-builder | surface.scm | ;;
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
;;
Copyright © 2013 , 2015 - 2016 .
;; 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... | null | https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/functions/surface.scm | scheme |
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 list of conditions and the following disclaimer.
- Redistributio... | chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
Copyright © 2013 , 2015 - 2016 .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT N... |
7994c10aa82e5a38dbd89a5b4f618744fbf9e2e07117291cee86939a9e29b1ce | BrownCS1260/class-compiler | constant_folding.ml | open Ast
open Util
( add1 ( add1 ( sub1 6 ) ) )
(add1 (add1 (sub1 6)))
*)
let rec fold : expr -> expr = function
| Num n -> Num n
| Prim1 (Add1, e) -> (
match fold e with
| Num n -> Num (n+1)
| e -> Prim1 (Add1, e))
| Prim1 (Sub1, e) -> (
match fold e with
| Num n -> Num (n-1)
... | null | https://raw.githubusercontent.com/BrownCS1260/class-compiler/31450320bfb3fd7da0e6473e29d001248ee087cf/lib/constant_folding.ml | ocaml | open Ast
open Util
( add1 ( add1 ( sub1 6 ) ) )
(add1 (add1 (sub1 6)))
*)
let rec fold : expr -> expr = function
| Num n -> Num n
| Prim1 (Add1, e) -> (
match fold e with
| Num n -> Num (n+1)
| e -> Prim1 (Add1, e))
| Prim1 (Sub1, e) -> (
match fold e with
| Num n -> Num (n-1)
... | |
822eb521073203cc67b609fa8b3904f59ef0e480d6eccd43e84e9f3d8153bc9a | mirage/orm | appengine_cache.ml |
* Copyright ( c ) 2009 - 2010
* < >
*
* 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 SOFTWARE IS PROVIDED " A... | null | https://raw.githubusercontent.com/mirage/orm/24c2e0e3157853b2328d09feacdbe637e34d354c/lib/appengine_cache.ml | ocaml | custom function needs to be registred for each connection
trigger needs to be registred once per pair (database * type) |
* Copyright ( c ) 2009 - 2010
* < >
*
* 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 SOFTWARE IS PROVIDED " A... |
0e2e5d44e706b94bf9013cfd4608138f16425fe9090d846bd845ef9adfc55170 | apinf/proxy42 | timeout_handler.erl | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
%%% 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,... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/vegur/test/timeout_handler.erl | erlang | 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 list of conditions and the following disclaimer.
* Redistributions... | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
... |
733a0a0e18d15ac22e2edb1768c28556d1923a069730c10c24a36f89f9bc4d6b | axelarge/advent-of-code | day24.clj | (ns advent-of-code.y2017.day24
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2017 24))
(defn parse-line [line]
(set (find-ints line)))
(defn parse [input]
(let [pieces (map parse-line (str/split-lines input))]
{:index (->> pieces
... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2017/day24.clj | clojure | handle a = b | (ns advent-of-code.y2017.day24
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2017 24))
(defn parse-line [line]
(set (find-ints line)))
(defn parse [input]
(let [pieces (map parse-line (str/split-lines input))]
{:index (->> pieces
... |
8654d80491195ad8a1ec7e19840b802d945cfc84d86b4e290ed1d718b21477d6 | logicmoo/wam_common_lisp | make-test.lisp | (in-package :pcl)
(defun top-level-form-form (form)
#+cmu
(if (and (consp form) (eq (car form) 'eval-when))
(third form)
form)
#+kcl
(fourth (third form))
#+lcl3.0
(third (third form)))
(defun make-test ()
(let ((table (make-hash-table :test 'eq))
(count 0))
(labels ((fixup (form)
... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/make-test.lisp | lisp | (in-package :pcl)
(defun top-level-form-form (form)
#+cmu
(if (and (consp form) (eq (car form) 'eval-when))
(third form)
form)
#+kcl
(fourth (third form))
#+lcl3.0
(third (third form)))
(defun make-test ()
(let ((table (make-hash-table :test 'eq))
(count 0))
(labels ((fixup (form)
... | |
5b8c809937b248d75135deedfd174fb1bf8831ddbedaa3dd0d996cb3302e9fcf | peerdrive/peerdrive | peerdrive_crypt_store_imp.erl | PeerDrive
Copyright ( C ) 2012 < jan DOT kloetzke AT freenet DOT de >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any la... | null | https://raw.githubusercontent.com/peerdrive/peerdrive/94389e2536cc9b1a0c168ec56ba3912910eb0c35/server/apps/peerdrive/src/peerdrive_crypt_store_imp.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 General Public... | PeerDrive
Copyright ( C ) 2012 < jan DOT kloetzke AT freenet DOT de >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(peerdrive_crypt_store_im... |
5af50493789a850f087c3acf6f81b786322687a4ba480097933069e3d0534057 | aveltras/sessionula | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Sessionula.Backend.Spec where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (replicateConcurrently,
replicateCon... | null | https://raw.githubusercontent.com/aveltras/sessionula/9b25861f93f2c673d56447eb4292eb4ca1677d53/sessionula/src/Sessionula/Backend/Spec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Sessionula.Backend.Spec where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (replicateConcurrently,
replicateConcurrently_)
import Control.... |
75025e21b1e5253d0bd42d8f80e691a68b0225fcb0924950d172d5ef1c16fab7 | kendroe/CoqRewriter | renv.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* env.mli
*
* This module defines the data structure for maintaining all information
* ne... | null | https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/renv.mli | ocaml | require "exp.sml" ;
require "type.sml" ;
require "disc.sml" ;
require "subst.sml" ;
require "pp.sml" ;
* Constructors
val stripVarTypes: env -> (int list) -> env ;;
* Environment retrieval operations
val getAC: env -> (string list)
* Misc.
* Pretty printer routines
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* env.mli
*
* This module defines the data structure for maintaining all information
* ne... |
83c3d6ee74fcbcc0b58ab55316f1fd7c3f864662525a77dc281a904b79423c44 | nikodemus/raylisp | canvas-pane.lisp | by Nikodemus Siivola < > , 2009 .
;;;;
;;;; 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, m... | null | https://raw.githubusercontent.com/nikodemus/raylisp/f79f61c6df283baad265dfdc207d798b63ca19a9/gui/canvas-pane.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
IN NO EVEN... | by Nikodemus Siivola < > , 2009 .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ... |
8ec2ecb2bca4167a064fddbd550ae56c685ad529ef85df1e211f1b01397e730a | esl/MongooseIM | mod_vcard.erl | %%%----------------------------------------------------------------------
%%% File : mod_vcard.erl
Author : < >
Purpose : Vcard management in
Created : 2 Jan 2003 by < >
%%%
%%% Store vCards in mnesia to provide "XEP-0054: vcard-temp"
and " XEP-0055 : Jabber Search "
%%%
Most of this is now usin... | null | https://raw.githubusercontent.com/esl/MongooseIM/7b91117c0ec1018e3f847da9cfabdd89c50d358b/src/vcard/mod_vcard.erl | erlang | ----------------------------------------------------------------------
File : mod_vcard.erl
Store vCards in mnesia to provide "XEP-0054: vcard-temp"
are still stored as lists to allow string prefix search using the match
spec with a trailing element String ++ '_'.
---------------------------------------------... | Author : < >
Purpose : Vcard management in
Created : 2 Jan 2003 by < >
and " XEP-0055 : Jabber Search "
Most of this is now using binaries . The search fields l * in vcard_search
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
modify it under the terms of the GNU General Public License as
... |
bace08676f187a31b13aacfbb03da14901a8e58f6c733ca6700d907b916f58e3 | asr/apia | CheckTPTP.hs |
-- | Check the generated TPTP file using the tptp4X program.
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE UnicodeSyntax #
module Apia.CheckTPTP ( checkTPTP ) where
-----------------------------------------------------------------------------
import Apia.Prelude
import Apia.Monad.Base
( askTOpt
, T
, t... | null | https://raw.githubusercontent.com/asr/apia/a66c5ddca2ab470539fd68c42c4fbd45f720d682/src/Apia/CheckTPTP.hs | haskell | | Check the generated TPTP file using the tptp4X program.
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
--------------------------------------------------------------------------- |
# LANGUAGE UnicodeSyntax #
module Apia.CheckTPTP ( checkTPTP ) where
import Apia.Prelude
import Apia.Monad.Base
( askTOpt
, T
, tErr
, TErr(MissingTPTP4XCommand, TPTP4XErrorWarning)
)
import Apia.Monad.Utils ( findExecutableErr )
import Apia.Options ( Options(optWithtptp4X) )
import Syste... |
c53af985c766c2a6a0012ea756444d587f1148301e5844535e3c1a2a14eaf376 | GlideAngle/flare-timing | Sphere.hs | # OPTIONS_GHC -fno - warn - partial - type - signatures #
module Published.Sphere (units, unitsR) where
import Test.Tasty (TestTree, testGroup)
import Data.UnitsOfMeasure (u, convert)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import Flight.Units.DegMinSec (DMS(..), absDiffDMS, absDiff... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite/published/Published/Sphere.hs | haskell | TODO: Investigate why the Geodetic Survey inverse results often disagree
TODO: Investigate why the Geodetic Survey inverse results often disagree | # OPTIONS_GHC -fno - warn - partial - type - signatures #
module Published.Sphere (units, unitsR) where
import Test.Tasty (TestTree, testGroup)
import Data.UnitsOfMeasure (u, convert)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units ()
import Flight.Units.DegMinSec (DMS(..), absDiffDMS, absDiff... |
e03bc812751055ef9d2becaf4bf32910474c297b21fecc0aa64fd34e48987f76 | simonmar/parconc-examples | fwsparse1.hs | # OPTIONS_GHC -Wall -fno - warn - name - shadowing #
module Main ( main, runtest ) where
import Control.Monad.Par.Scheds.Trace
gives slightly better results than Control . . Par with monad - par-0.3.4
import System.Environment
import qualified MapCompat as Map
import MapCompat (IntMap)
import System.Random
import ... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/fwsparse/fwsparse1.hs | haskell | -----------------------------------------------------------------------------
shortestPaths
<<update
>>
-----------------------------------------------------------------------------
Testing
correct result: | # OPTIONS_GHC -Wall -fno - warn - name - shadowing #
module Main ( main, runtest ) where
import Control.Monad.Par.Scheds.Trace
gives slightly better results than Control . . Par with monad - par-0.3.4
import System.Environment
import qualified MapCompat as Map
import MapCompat (IntMap)
import System.Random
import ... |
26e140287915f63eacb0182318113072413a145625df2ca65ab973970c95c8c6 | spechub/Hets | Print_AS.hs | |
Module : ./COL / Print_AS.hs
Description : Pretty printing for COL
Copyright : ( c ) , , Uni Bremen 2004 - 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
pretty printing
Module : ./COL/Print... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/COL/Print_AS.hs | haskell | |
Module : ./COL / Print_AS.hs
Description : Pretty printing for COL
Copyright : ( c ) , , Uni Bremen 2004 - 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
pretty printing
Module : ./COL/Print... | |
9a94c98a0f3616e607b6c5b79634c62099c73a11ea543cc44ed290c89533376b | andrenth/routemachine | rtm_msg.erl | -module(rtm_msg).
-export([send_open/1, send_updates/5, send_updates/3,
send_notification/2, send_keepalive/1]).
-export([build_notification/1]).
-include_lib("bgp.hrl").
-include_lib("route.hrl").
-include_lib("session.hrl").
%
% Message sending.
%
-spec send_open(#session{}) -> ok.
send_open(#session{serv... | null | https://raw.githubusercontent.com/andrenth/routemachine/97fbc4997ac9bbe7d14c2b174aa84bc4a2fd5d20/src/rtm_msg.erl | erlang |
Message sending.
Message building.
Split a prefix list in sublists that fit in an UPDATE message.
ORIGIN: always keep
AS_PATH: update if propagating to external peer or when originating
NEXT_HOP: update if propagating to external peer
LOCAL_PREF: propagate only to internal peers
ATOMIC_AGGREGATE: always p... | -module(rtm_msg).
-export([send_open/1, send_updates/5, send_updates/3,
send_notification/2, send_keepalive/1]).
-export([build_notification/1]).
-include_lib("bgp.hrl").
-include_lib("route.hrl").
-include_lib("session.hrl").
-spec send_open(#session{}) -> ok.
send_open(#session{server = Server,
... |
ae7f916afc2ee9119333c15a4c1c92ba2ead221d4b4a4b91a552cfd1954fe7ff | UU-ComputerScience/uhc | IO2.hs | ----------------------------------------------------------------------------------------
what : IO
expected : error , attempt to read beyond EOF
constraints : exclude - if - js
----------------------------------------------------------------------------------------
what : IO
expected: er... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/IO2.hs | haskell | --------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------- -} | what : IO
expected : error , attempt to read beyond EOF
constraints : exclude - if - js
what : IO
expected: error, attempt to read beyond EOF
constraints: exclude-if-js
module Main where
main :: IO ()
main
= do h1 <- openFile "filesForIOTesting/empty" ReadMode
l1 <- hGetLine h1... |
0b60bad7784891e65b173de920e7dfb9ca8f769fc4caf170750c0ad2ac14b38b | NorfairKing/smos | TH.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveLift #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Docs.Site.Static.TH where
import CMarkGFM as M... | null | https://raw.githubusercontent.com/NorfairKing/smos/3bb953f467d83aacec1ce1dd59b687c87258559e/smos-docs-site/src/Smos/Docs/Site/Static/TH.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Docs.Site.Static.TH where
import CMarkGFM as MD
import Data.Data
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
import... |
b23bf5c8e458ef1240320939a0ba6610245c81deea30b591521732c4c4947fa2 | kupl/LearnML | patch.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec comp (va : string) (exorg : lambda) : bool =
match exorg with
| V va1 -> false
| P (va1, ex1) -> if va = va1 then true else comp va ex1
| C (ex1, ex2) -> comp va ex1 || comp va ex2
let rec find (ex : lambda) (exor... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub73/patch.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec comp (va : string) (exorg : lambda) : bool =
match exorg with
| V va1 -> false
| P (va1, ex1) -> if va = va1 then true else comp va ex1
| C (ex1, ex2) -> comp va ex1 || comp va ex2
let rec find (ex : lambda) (exor... | |
7732d26531ebac6534cc61591c587e41693538533ef6959170989b04156a3056 | input-output-hk/cardano-addresses | InspectSpec.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Command.Address.InspectSpec
( spec
) where
import Prelude
import Control.Monad
( forM_ )
import Test.Hspec
( Spec, SpecWith, expectationFailure, it, shouldBe, shouldContain )
import Test.Utils
( Schema... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/829682eecdf0f5c4bfbf0a3d2d28b4f6ee78d605/command-line/test/Command/Address/InspectSpec.hs | haskell | # LANGUAGE OverloadedStrings #
reward account: scripthash28
testnet - magic 42 addresses
cardano-cli generated --mainnet addresses
Payment address from script hash
size 15 > phrase.prv
$ cardano-address key from-recovery-phrase Shared < phrase.prv > root_shared.xsk
without - chain - code > addr_shared.vk
without - ... | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Command.Address.InspectSpec
( spec
) where
import Prelude
import Control.Monad
( forM_ )
import Test.Hspec
( Spec, SpecWith, expectationFailure, it, shouldBe, shouldContain )
import Test.Utils
( SchemaRef, cli, describeCmd, validateJSON... |
f6412b06bd394539a91444c0e6b1961671d4c9066cdea85d0a4abd7f4a8f14a1 | mstksg/advent-of-code-2022 | Day06.hs | -- |
Module : AOC.Challenge .
-- License : BSD3
--
-- Stability : experimental
-- Portability : non-portable
--
Day 6 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day06
( day06a
, day06b
)
where
import AOC.Common (charFinite, firstRepeatedFinitary, slidingWindo... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2022/de9ceee002d3a62746468492c746b8d7ca3fc8a0/src/AOC/Challenge/Day06.hs | haskell | |
License : BSD3
Stability : experimental
Portability : non-portable
| Module : AOC.Challenge .
Day 6 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day06
( day06a
, day06b
)
where
import AOC.Common (charFinite, firstRepeatedFinitary, slidingWindows)
import AOC.Solver ((:~>) (..))
import Data.Finite (Finite)
import Data.Foldable (toList)
... |
db3c1b0bf2c3b514280b616a6650d66fac94290f37e08e8d26f2db9c8254b359 | otto-de/leinsync | tests_test.clj | (ns leiningen.leinsync.tests-test
(:require [clojure.test :refer :all]
[leiningen.leinsync.tests :as t]
[leiningen.leinsync.utils :as u]))
(deftest ^:unit test-cmd
(is (= t/standard-test-cmd (t/test-cmd {})))
(is (= [["test" "command"]]
(t/test-cmd {:sync {:test-cmd [["test" "com... | null | https://raw.githubusercontent.com/otto-de/leinsync/744bab6d59cf2a17a2c9f613f75410a9bc6d7152/test/leiningen/leinsync/tests_test.clj | clojure | (ns leiningen.leinsync.tests-test
(:require [clojure.test :refer :all]
[leiningen.leinsync.tests :as t]
[leiningen.leinsync.utils :as u]))
(deftest ^:unit test-cmd
(is (= t/standard-test-cmd (t/test-cmd {})))
(is (= [["test" "command"]]
(t/test-cmd {:sync {:test-cmd [["test" "com... | |
e379d656354cf1b2482d93a6d1d4c216842e0f76fe1a0afa92b638d0c2a8e962 | robx/puzzle-draw | Parsec.hs | | Parsec helper for puzzle file parsing .
module Parse.Parsec
( toParser,
toStringParser,
fraction,
)
where
import Control.Applicative
import Data.Elements
import qualified Data.Text as T
import qualified Data.Yaml as Yaml
import Text.ParserCombinators.Parsec hiding
( (<|>),
)
toParser :: GenParser ... | null | https://raw.githubusercontent.com/robx/puzzle-draw/936f4c9bf8ff576fb657b7c05067504734adae14/src/Parse/Parsec.hs | haskell | | Parsec helper for puzzle file parsing .
module Parse.Parsec
( toParser,
toStringParser,
fraction,
)
where
import Control.Applicative
import Data.Elements
import qualified Data.Text as T
import qualified Data.Yaml as Yaml
import Text.ParserCombinators.Parsec hiding
( (<|>),
)
toParser :: GenParser ... | |
9c0c06c7d4cda32892d8ffe0d03eb7ab6f3ba1d9aac4f3647f2e2949fcbe6a21 | icicle-lang/icicle-ambiata | Jack.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Icicle.Test.Sorbet.Lexical.Jack (
jToken
, jInteger
, jRational
, jString
, jDate
, jYearMonthDay
, jVarId
, jConId
, jVarIdHead
, jConIdHead
, jIdTail
, jVarOp
, jConOp
, jVarOpH... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Sorbet/Lexical/Jack.hs | haskell | # LANGUAGE OverloadedStrings #
operators can't start with comment | # LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
module Icicle.Test.Sorbet.Lexical.Jack (
jToken
, jInteger
, jRational
, jString
, jDate
, jYearMonthDay
, jVarId
, jConId
, jVarIdHead
, jConIdHead
, jIdTail
, jVarOp
, jConOp
, jVarOpHead
, jConOpHead
, jOpTail
, ... |
225e5d818beb9b026c14a4a8cd36a58c789a0ac8e0c36c909ae71fdb15b04719 | sky-big/RabbitMQ | rabbit_vm.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/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/rabbit_vm.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... |
8c6288ad237c17a017e6232c9289b6ab2122f6392b22f8580f4509f92fa72876 | con-kitty/categorifier-c | ArrayVec.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | Higher-kinded wrappers.
module Categorifier.C.Prim.ArrayVec
( -- * Storing vectors of elem... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/Prim/ArrayVec.hs | haskell | # LANGUAGE ConstraintKinds #
| Higher-kinded wrappers.
* Storing vectors of elements
** Constraint synonyms | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Categorifier.C.Prim.ArrayVec
ArrayMVec (..),
* * ' Control . Lens . '
_ArrayMVec,
PolyPrimVector,
Poly... |
37988fe15efd6307bacb15077c90abc81eea0d72026476fe7bb778c3f9bb7281 | macchiato-framework/macchiato-core | mime_type.cljs | (ns macchiato.test.util.mime-type
(:require [macchiato.util.mime-type :as mt]
[cljs.test :refer-macros [is are deftest testing use-fixtures]]))
(deftest ext-mime-type-test
(testing "default mime types"
(are [f m] (= (mt/ext-mime-type f) m)
"foo.txt" "text/plain"
"foo.h... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/test/macchiato/test/util/mime_type.cljs | clojure | (ns macchiato.test.util.mime-type
(:require [macchiato.util.mime-type :as mt]
[cljs.test :refer-macros [is are deftest testing use-fixtures]]))
(deftest ext-mime-type-test
(testing "default mime types"
(are [f m] (= (mt/ext-mime-type f) m)
"foo.txt" "text/plain"
"foo.h... | |
b2ff9db4c80f1cbfe5a8fa9265d6b3244b9900b196b70ba4873064b0fb8d6856 | Firobe/6502-ml | instruction.ml | open Stdint
module Make (M : Cpu0.MemoryMap) = struct
module CPU = Cpu0.Make (M)
module Location = struct
type t =
| None
| Immediate of uint8
| Register of Register.register
| Address of uint16
let get (st : CPU.t) = function
| Register r -> Register.get st.reg r
| Im... | null | https://raw.githubusercontent.com/Firobe/6502-ml/871a38c655e9dbe8eac316f15468f20e49f80e4a/lib/instruction.ml | ocaml | Load/Store
Register transfers
Logical
Arithmetic
Addition : binary or decimal
Subtraction : binary or decimal
probably a +1 or -1 here ?
Shifts
Jump and calls
Branches
Interpret as signed
Add as signed operation
Back to unsigned
Status Flag Changes
System functions
Unofficial instructions ... | open Stdint
module Make (M : Cpu0.MemoryMap) = struct
module CPU = Cpu0.Make (M)
module Location = struct
type t =
| None
| Immediate of uint8
| Register of Register.register
| Address of uint16
let get (st : CPU.t) = function
| Register r -> Register.get st.reg r
| Im... |
815136e5c2876525ebf9b07d7d9fb2ea1316888690f29426790553a99ce74141 | helvm/helma | Expression.hs | module HelVM.HelMA.Automata.FALSE.Expression where
import HelVM.HelMA.Automaton.Instruction
type ExpressionList = [Expression]
data Expression =
Inst Instruction
| Lambda ExpressionList
| Exec
| Cond
| While
| Ref Natural
| Store
| Fetch
| Str String
| Comment String
| Flush
derivi... | null | https://raw.githubusercontent.com/helvm/helma/3dc4e01f7f020397e34f4a8313f54b08b27f33e9/hs/src/HelVM/HelMA/Automata/FALSE/Expression.hs | haskell | module HelVM.HelMA.Automata.FALSE.Expression where
import HelVM.HelMA.Automaton.Instruction
type ExpressionList = [Expression]
data Expression =
Inst Instruction
| Lambda ExpressionList
| Exec
| Cond
| While
| Ref Natural
| Store
| Fetch
| Str String
| Comment String
| Flush
derivi... | |
5eb4fd2656faafdeee46530971a70496d97283602ccfc9e9af6456622aef4c47 | nammayatri/beckn-gateway | Subscriber.hs |
Copyright 2022 - 23 , Juspay India Pvt Ltd
This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ... | null | https://raw.githubusercontent.com/nammayatri/beckn-gateway/90891b73e2c007953e463921744a87bdbd026c58/app/mock-registry/src/Storage/Queries/Subscriber.hs | haskell |
Copyright 2022 - 23 , Juspay India Pvt Ltd
This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program ... | |
0774e0120f3efc550b364f46f3e9ce38c4782d75bc1f31fb9f5c2889a9d1cb5c | heraldry/heraldicon | label.cljs | (ns heraldicon.heraldry.ordinary.type.label
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.fimbriation :as fimbriation]
[heraldicon.heraldry.option.position :as position]
[heraldicon... | null | https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/ordinary/type/label.cljs | clojure | (ns heraldicon.heraldry.ordinary.type.label
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.cottising :as cottising]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.heraldry.line.fimbriation :as fimbriation]
[heraldicon.heraldry.option.position :as position]
[heraldicon... | |
caeb9818c34275e93df822b7276bd6c0b9d3322f53a10be934782f39a8815a02 | byulparan/common-cv | utils.lisp | (in-package #:cv)
(defmacro define-cfun ((c-name name) return-type &body body)
`(progn
(defun ,name ,(loop for p in body
with optional = nil
with a = () with b = ()
do (if (= (length p) 2) (progn
(when optional (error "why not optional?"))
(push (car p) a))
(progn
(set... | null | https://raw.githubusercontent.com/byulparan/common-cv/c9422353fdb465840225d8e4c1135b7b92d29a2a/utils.lisp | lisp | (in-package #:cv)
(defmacro define-cfun ((c-name name) return-type &body body)
`(progn
(defun ,name ,(loop for p in body
with optional = nil
with a = () with b = ()
do (if (= (length p) 2) (progn
(when optional (error "why not optional?"))
(push (car p) a))
(progn
(set... | |
1d60587ecfefcf1f1c1128d1b4be077a8c4b965e6cdbf22612e2c9ce9097966f | Helium4Haskell/helium | TwoLetterChar.hs | module TwoLetterChar where
main = (f '\'', g '\t')
f '\'' = 3
g '\t' = 4
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/TwoLetterChar.hs | haskell | module TwoLetterChar where
main = (f '\'', g '\t')
f '\'' = 3
g '\t' = 4
| |
40a7f4a059857c8ea292dacf69e1ab1c1acf45d610119c1260014f6c2e26e729 | realworldocaml/book | test_lwt_event.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test
open Lwt
let suite = suite "lwt_event" [
test "to_stream"
(fun () ->
let event, push = React.E.create () in
let stream = Lwt_react.E.to_stream event in
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/lwt/test/react/test_lwt_event.ml | ocaml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test
open Lwt
let suite = suite "lwt_event" [
test "to_stream"
(fun () ->
let event, push = React.E.create () in
let stream = Lwt_react.E.to_stream event in
... | |
b7ffacfe7e46a5b4ed1f80d0835b396e9bd506537d6b78f1c96e54b63c4a17f5 | Quid2/zm | InfoSHA.hs | # LANGUAGE NoMonomorphismRestriction #
module Info where
import Data.Int
import ZM
import Data.Word
import Test.Data hiding (Unit)
import Test.Data.Flat hiding (Unit)
import Test.Data.Model
import qualified Test.Data2 as Data2
import qualified Tes... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/InfoSHA.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
module Info where
import Data.Int
import ZM
import Data.Word
import Test.Data hiding (Unit)
import Test.Data.Flat hiding (Unit)
import Test.Data.Model
import qualified Test.Data2 as Data2
import qualified Tes... | |
d083bb009761ec71c4d92147a03bbe313980b7fd93a0810d259d52cb774c5a87 | melange-re/melange | lam_analysis.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/core/lam_analysis.ml | ocaml | used in effect analysis, it is sound but not-complete
we record side effect in the global level,
this expression itself is side effect free
more safe to check if arguments are constant
non-observable side effect
should be fine
we can not mark it pure
only when we guarantee this exc... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... |
59d6dad4cd88c46e198fa89268b45fa128d7a09a352c309032612e57e590035a | cedlemo/OCaml-GI-ctypes-bindings-generator | Message_dialog.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let get_image =
foreign "gtk_message_dialog_get_image" (t_typ @-> returning (ptr Widget.t_typ))
let get_message_area =
foreign "gtk_message_dialog_get_message_area" (t_typ @-> returning (ptr Widget.t_typ))
let set_image =
foreign "gtk_messa... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Message_dialog.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let get_image =
foreign "gtk_message_dialog_get_image" (t_typ @-> returning (ptr Widget.t_typ))
let get_message_area =
foreign "gtk_message_dialog_get_message_area" (t_typ @-> returning (ptr Widget.t_typ))
let set_image =
foreign "gtk_messa... | |
c8f76b7f456fcd52486e77667ba77c98cd097c80051d05fd80b05b835442c800 | ofmooseandmen/jord | Triangle.hs | -- |
Module : Data . Geo . . Triangle
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working with triangles at the surface of a __spherical__ celestial body.
--
-- In order to use this module you sh... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/src/Data/Geo/Jord/Triangle.hs | haskell | |
Stability: experimental
Portability: portable
Types and functions for working with triangles at the surface of a __spherical__ celestial body.
In order to use this module you should start with the following imports:
@
@
| A triangle whose vertices are horizontal geodetic positions.
| Second vertex of gi... | Module : Data . Geo . . Triangle
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
import qualified Data . Geo . . Geodetic as Geodetic
import qualified Data . Geo . . Triangle as Triangle
module Data.Geo.Jord.Triangle
( Triangle
, vertex0
, vertex1
, vertex2
... |
d3ec359807eb325a4e5b840782318a1d2af3d427d08b42eb1612db2e26969904 | xvw/muhokama | category_test.ml | open Lib_common
open Lib_test
open Alcotest
let test_ensure_there_is_no_category_at_starting =
integration_test
~about:"count"
~desc:"when there is no category, it should return 0"
(fun _env db -> Models.Category.count db)
(fun computed ->
let expected = Ok 0 in
same (Testable.try_ int) ~... | null | https://raw.githubusercontent.com/xvw/muhokama/d628d05e2fc5af3fbf86d2177458336b647ece08/test/integration/category_test.ml | ocaml | open Lib_common
open Lib_test
open Alcotest
let test_ensure_there_is_no_category_at_starting =
integration_test
~about:"count"
~desc:"when there is no category, it should return 0"
(fun _env db -> Models.Category.count db)
(fun computed ->
let expected = Ok 0 in
same (Testable.try_ int) ~... | |
21109406dd5dc3c5d3a60bb4b0b07a3e0d6cbf19eba5bb8d5f3a681e1c1d5367 | MyDataFlow/ttalk-server | mod_vcard_riak.erl | %%==============================================================================
Copyright 2015 Erlang Solutions Ltd.
%%
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
%%
... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_vcard_riak.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2015 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_vcard_riak).
-behaviour(mod_vcard).
-export([init/2, remove_user/2, set_vcard/4, get_vcard/2, search/4, search_fields/1]).
-... |
71a168d662e74a850bbd5c2a2b1969214ce602e9e952a6e44abd7e83cf243660 | openmusic-project/OMChroma | csound-synthesis.lisp | ; OMChroma
High - level control of sound synthesis in OM
;
;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.
;
;See file LICE... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/8a608740938eacbf9af4c9e2d6d73d1e46bc5de2/sources/omsharp/cs-events/csound-synthesis.lisp | lisp | OMChroma
This program is free software; you can redistribute it and/or
either version 2
of the License, or (at your option) any later version.
See file LICENSE for further informations on licensing terms.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the imp... | High - level control of sound synthesis in OM
modify it under the terms of the GNU General Public License
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307,10 USA .
( c ) Ircam 2000 - 2017
Authors : , , ,
(in-packa... |
f2d1cae295d590907e622dc2e9a21ab0c7ecaef255f333e1dae6fee82ca94310 | hyperfiddle/electric | hfql_renderquery3.clj | (ns dustin.hfql.hfql-renderquery3
(:require [clojure.pprint :as pprint]
[hfdl.impl.trace :refer [system debug]]
[hfdl.lang :refer [dataflow]]
[hyperfiddle.api :as hf]
[minitest :refer [tests]]
[datascript.core :as d]
[missionary.core :as m]))
... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/hfql/hfql_renderquery3.clj | clojure | a -> m b – clojure effects, e.g. (async (d/q … x))
m a -> m b – DAGs – dynamic or differential operations
if :: m bool -> m a -> m a -> m a
for :: m [a] -> (a -> m b) -> m [b]
something that takes a reactive task and returns reactive result of running the task
a -> m b
pretty much definline - instead of definin... | (ns dustin.hfql.hfql-renderquery3
(:require [clojure.pprint :as pprint]
[hfdl.impl.trace :refer [system debug]]
[hfdl.lang :refer [dataflow]]
[hyperfiddle.api :as hf]
[minitest :refer [tests]]
[datascript.core :as d]
[missionary.core :as m]))
... |
4adf5832ec7d06e5baee4c6d42709204624bc8af3458206639528e5d24266e36 | rmculpepper/crypto | chain.rkt | Copyright 2020
SPDX - License - Identifier : Apache-2.0
#lang racket/base
(require racket/class
racket/match
racket/list
racket/hash
racket/serialize
scramble/result
crypto
"interfaces.rkt"
"asn1.rkt"
(submod "asn1.rkt" verify)
... | null | https://raw.githubusercontent.com/rmculpepper/crypto/75138461a74d6b4bc26c65e981ccfba6b60719de/x509-lib/private/chain.rkt | racket | References:
- RFC 5280 ()
- RFC 6818 (general updates) ()
- RFC 8398 and 8399 (Internationalization) (,
)
- CA/Browser Forum Baseline Recommendations (v1.7.3)
============================================================
A CertificateChain is an instance of certificate-chain% (or its subclass
certificate-anch... | Copyright 2020
SPDX - License - Identifier : Apache-2.0
#lang racket/base
(require racket/class
racket/match
racket/list
racket/hash
racket/serialize
scramble/result
crypto
"interfaces.rkt"
"asn1.rkt"
(submod "asn1.rkt" verify)
... |
2ac491c84a9ac53b608d781806d4be8a14b360cf0b5adbc2b9479b3368cca8fb | bobbae/gosling-emacs | srccom.ml | ; srccom: compare text in two windows
; To begin the comparison, place the dot at the beginning of one of the
; two pieces of text to be compared, switch to the other window, and place
; the dot at the beginning of the other piece of text. (If there are more
; than two windows, the two windows to be compared must be ... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/std/srccom.ml | ocaml | ; srccom: compare text in two windows
; To begin the comparison, place the dot at the beginning of one of the
; two pieces of text to be compared, switch to the other window, and place
; the dot at the beginning of the other piece of text. (If there are more
; than two windows, the two windows to be compared must be ... | |
eaf14945716f5430cd0c053159ef0f5549ef9ad526a54e48c98527020ab75a44 | gerritjvv/tcp-driver | retry_test.clj | (ns tcp-driver.routing.retry-test
(:require [tcp-driver.routing.retry :as retry])
(:use clojure.test))
(deftest test-retry []
(let [rpolicy (retry/retry-policy 3)
f (fn [] (prn "try-function and throw ex") (throw (Exception. "test")))]
(try
... | null | https://raw.githubusercontent.com/gerritjvv/tcp-driver/2a9373cda20d176bfb5b00e63f4816fa83c88591/test/tcp_driver/routing/retry_test.clj | clojure | should not be run | (ns tcp-driver.routing.retry-test
(:require [tcp-driver.routing.retry :as retry])
(:use clojure.test))
(deftest test-retry []
(let [rpolicy (retry/retry-policy 3)
f (fn [] (prn "try-function and throw ex") (throw (Exception. "test")))]
(try
... |
7fc136bce48fa687bd2571d1f8d9594b93b1f82ec52a64d1c86c9786c9b6cf77 | sbcl/sbcl | float.lisp | ;;;; floating point support for the ARM
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 in the public domain a... | null | https://raw.githubusercontent.com/sbcl/sbcl/22177cb2e0f0737f301ca5afc10e8f20fcbc9389/src/compiler/arm64/float.lisp | lisp | floating point support for the ARM
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.
Move functions:
Move VOPs:
Complex float move functions
Complex float register to register moves.
Mo... |
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-move-fun (load-single 1) (vop x y)
((single-stack) (single-reg))
(loadw y ... |
dcbcd454bb64e80cc2936db842742c662fabad3a89d979733db22d254dbe1785 | AndrewMagerman/wizard-book-study | test-obj.rkt | #lang racket
(require "obj.rkt" rackunit)
(define-class (counter count)
(class-vars (num-counters 0) (bloo 'grah))
(initialize (set! num-counters (add1 num-counters))
(set! bloo 'bloo))
(instance-vars (loc-count 0))
(method (increment incr)
(set! count (+ incr count))
(set! l... | null | https://raw.githubusercontent.com/AndrewMagerman/wizard-book-study/779854631f17164cbddecf3fde102504df1a83f0/reference/cs61as_library/test-obj.rkt | racket | (define-class (weird-counter)
(method (reset)
(set! num-counters 0)
(set! count 0)
(set! loc-count 0))
(method (increment incr)
(usual 'increment (- incr)))
)
(define-class (weird-weird-counter blah)
(instance-vars (x (+ 2 9)) (y (- 9 2)))
(class-vars (w (+ 4... | #lang racket
(require "obj.rkt" rackunit)
(define-class (counter count)
(class-vars (num-counters 0) (bloo 'grah))
(initialize (set! num-counters (add1 num-counters))
(set! bloo 'bloo))
(instance-vars (loc-count 0))
(method (increment incr)
(set! count (+ incr count))
(set! l... |
b0e742c1dd1f0cbb6f7d76fd9d145ab1cb448c7afb65c598bb57400c48968de7 | rleonid/oml | oml_solvers.ml |
Copyright 2015 :
< >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
... | null | https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src/unc/oml_solvers.ml | ocaml | printf "i %d: x %f\n" i x;
use exact comparison to detect when rounding is dropping precision
Are we lucky?
if the user does not provide an interval
where the function has an intersection.
go left!
go right! |
Copyright 2015 :
< >
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
... |
7fffdc547bd6cd9bf8b363dd270e69daef7dc2da0bac19529e979a4816e38d3d | Engelberg/instaparse | combinators.cljc | (ns instaparse.combinators
"The combinator public API for instaparse"
(:refer-clojure :exclude [cat])
#?(:clj (:use instaparse.macros)
:cljs (:require-macros
[instaparse.macros :refer [defclone]]))
(:require [instaparse.combinators-source :as c]
[instaparse.cfg :as cfg]
... | null | https://raw.githubusercontent.com/Engelberg/instaparse/4d1903b059e77dc0049dfbc75af9dce995756148/src/instaparse/combinators.cljc | clojure | The actual source is in combinators-source.
This was necessary to avoid a cyclical dependency in the namespaces. | (ns instaparse.combinators
"The combinator public API for instaparse"
(:refer-clojure :exclude [cat])
#?(:clj (:use instaparse.macros)
:cljs (:require-macros
[instaparse.macros :refer [defclone]]))
(:require [instaparse.combinators-source :as c]
[instaparse.cfg :as cfg]
... |
ee02093ef6816219ddda912774e825666c029e253061dd3ba94273b237349413 | realworldocaml/mdx | cli.ml | open Cmdliner
let named wrapper = Term.(app (const wrapper))
let non_deterministic =
let doc = "Run non-deterministic tests." in
let env = Cmd.Env.info ~doc "MDX_RUN_NON_DETERMINISTIC" in
named
(fun x -> `Non_deterministic x)
Arg.(value & flag & info [ "non-deterministic"; "n" ] ~env ~doc)
let syntax =... | null | https://raw.githubusercontent.com/realworldocaml/mdx/ea30f77f40d4f77aadb581fa65013abc1b26aac2/bin/cli.ml | ocaml | open Cmdliner
let named wrapper = Term.(app (const wrapper))
let non_deterministic =
let doc = "Run non-deterministic tests." in
let env = Cmd.Env.info ~doc "MDX_RUN_NON_DETERMINISTIC" in
named
(fun x -> `Non_deterministic x)
Arg.(value & flag & info [ "non-deterministic"; "n" ] ~env ~doc)
let syntax =... | |
bb34b036bcb989a49a40eb2459e7a60dc4e8bd08eee018d26481a6b6697ab5c4 | commercialhaskell/curator | Types.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Curator.Types
( Constraints (..)
, PackageConstraints (..)
, PackageSource (..)
, HackageSource (..)
, Maintainer
, Revisions (..)
, ComponentAction (..)
, Component (..)
, Target (..)
) where
import... | null | https://raw.githubusercontent.com/commercialhaskell/curator/62d4bce549af5fccb5089b8aa319891dbe032ccb/src/Curator/Types.hs | haskell | # LANGUAGE OverloadedStrings #
^ required latest version, for tell-me-when-its-released
the only sane default, of course | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
module Curator.Types
( Constraints (..)
, PackageConstraints (..)
, PackageSource (..)
, HackageSource (..)
, Maintainer
, Revisions (..)
, ComponentAction (..)
, Component (..)
, Target (..)
) where
import RIO
import Pantry
import Distribut... |
ae45a75191ad694d02887316617e666bc4cd15778c8ed116ba2e86eb25db9807 | mpenet/alia | enum.clj | (ns qbits.alia.enum
(:require
[qbits.commons.enum :as enum])
(:import
[com.datastax.oss.driver.api.core DefaultConsistencyLevel]
[com.datastax.oss.driver.api.core.loadbalancing NodeDistance]
[com.datastax.oss.driver.api.core.servererrors DefaultWriteType]
[com.datastax.oss.driver.api.core.cql Default... | null | https://raw.githubusercontent.com/mpenet/alia/480d461d46426179f4e41b7a89a91c3ac1a74a9c/modules/alia/src/qbits/alia/enum.clj | clojure | (def compression (enum/enum->fn ProtocolOptions$Compression)) | (ns qbits.alia.enum
(:require
[qbits.commons.enum :as enum])
(:import
[com.datastax.oss.driver.api.core DefaultConsistencyLevel]
[com.datastax.oss.driver.api.core.loadbalancing NodeDistance]
[com.datastax.oss.driver.api.core.servererrors DefaultWriteType]
[com.datastax.oss.driver.api.core.cql Default... |
2b1442758975f89b8ae738bc0b427d1ba78eac6f54fd86d4f27d5eb44ab6f006 | wireless-net/erlang-nommu | wxButton.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxButton.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 limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxButton).
-include("wxe.hrl").
-... |
0b5cb45299654128b1861ea238f6468e8c7521110148542e315ce8a12bf06bc9 | mstksg/conduino | Combinators.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
-- |
-- Module : Data.Conduino.Combinators
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- A basic collection of base 'Pipe's that serve as... | null | https://raw.githubusercontent.com/mstksg/conduino/c8c9c72722408c0d14dca1f72342bd5b0eb658a2/src/Data/Conduino/Combinators.hs | haskell | # LANGUAGE BangPatterns #
|
Module : Data.Conduino.Combinators
License : BSD3
Stability : experimental
Portability : non-portable
A basic collection of base 'Pipe's that serve as a "prelude" for the
package. This module is meant to be imported qualified.
> import qualified Data.Conduino.Combinato... | # LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
Copyright : ( c ) 2019
Maintainer :
module Data.Conduino.Combinators (
unfold
, iterate
, repeat
, unfoldMaybe
, unfoldEither
, iterateMaybe
, iterateEither
, sourceList
, replicate
* *
, repeatM
, repeatMaybeM
, repeatEithe... |
d36667440312a9d22c91a4d3a11ce4783a07b6f3efb379c584b5c98ed4c60668 | bnoordhuis/chicken-core | srfi-14.import.scm | srfi-14.import.scm - import library for " srfi-14 " module
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
; 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... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/srfi-14.import.scm | scheme |
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 list of conditions and the following
disclaimer.
Redistributio... | srfi-14.import.scm - import library for " srfi-14 " module
Copyright ( c ) 2008 - 2013 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES... |
068741f3fd2cd38268aed8395030819d427cdfb01520d0e14307b0b7e2229f20 | fission-codes/fission | Types.hs | module Network.IPFS.Client.DAG.Types (API) where
import Servant.API
import qualified Network.IPFS.Client.DAG.Put.Types as Put
type API
= "put"
:> Put.API
| null | https://raw.githubusercontent.com/fission-codes/fission/fb76d255f06ea73187c9b787bd207c3778e1b559/ipfs/library/Network/IPFS/Client/DAG/Types.hs | haskell | module Network.IPFS.Client.DAG.Types (API) where
import Servant.API
import qualified Network.IPFS.Client.DAG.Put.Types as Put
type API
= "put"
:> Put.API
| |
1bea8670fc74631240bed3d5f3a10291be7342856f548c6faec8aaf9e4d25aa8 | fragnix/fragnix | Data.Array.Storable.hs | {-# LANGUAGE Haskell2010 #-}
# LINE 1 " Data / Array / Storable.hs " #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.Storable
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Array.Storable.hs | haskell | # LANGUAGE Haskell2010 #
---------------------------------------------------------------------------
|
Module : Data.Array.Storable
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (uses Data.Array.MArray)
A storable ar... | # LINE 1 " Data / Array / Storable.hs " #
Copyright : ( c ) The University of Glasgow 2001
module Data.Array.Storable (
data StorableArray index element
+ index type must be in class Ix
+ element type must be in class
module Data.Array.MArray,
) where
import Data.Array.MArray
import Data.Arra... |
b8348b010b40ea50054fdbb2610e8d409c320a5d6d3e4492abe82529c9e2c9c1 | serokell/fift-asm-dsl | Types.hs | SPDX - FileCopyrightText : 2019 >
--
SPDX - License - Identifier : MPL-2.0
module FiftAsm.Types
( T (..)
) where
data T
= IntT
| CellT
| TupleT [T]
| SliceT
| BuilderT
| NullT
| MaybeT [T] -- represented as either True : x : y : z ... or False
| DictT
| null | https://raw.githubusercontent.com/serokell/fift-asm-dsl/d710e076d4212aa2cce4aa8bb15277d3b09c48af/src/FiftAsm/Types.hs | haskell |
represented as either True : x : y : z ... or False | SPDX - FileCopyrightText : 2019 >
SPDX - License - Identifier : MPL-2.0
module FiftAsm.Types
( T (..)
) where
data T
= IntT
| CellT
| TupleT [T]
| SliceT
| BuilderT
| NullT
| DictT
|
468a08e0d2932f2dff451bd1f5026d03e71aeae55af37d641fa0977a41afde3e | christian-oudard/mamkait | Phonology.hs | module Mamkait.Phonology where
import Data.Tuple.Select (sel1, sel2, sel3)
import Data.Maybe (mapMaybe, fromJust)
import Data.Either (isRight, rights)
import Data.List (groupBy)
import qualified Data.Bimap as BM
import qualified Data.Text as T
import Data.Text.ICU
-- Section 1: Phonology
-- Phonemic inventory
type... | null | https://raw.githubusercontent.com/christian-oudard/mamkait/efe5cd945ee7cc309e39e7eb9d0fcbe460d8e943/src/Mamkait/Phonology.hs | haskell | Section 1: Phonology
Phonemic inventory
Combining accents
Consonant
The glottal stop is part of vowel clusters.
Conjuncts and stress markers
Count the stress marker as a vowel for splitting purposes.
Remove glottal stop.
Remove stress.
Remove stress.
Remove glottal stop.
vowel index 0 is the ultimate syllab... | module Mamkait.Phonology where
import Data.Tuple.Select (sel1, sel2, sel3)
import Data.Maybe (mapMaybe, fromJust)
import Data.Either (isRight, rights)
import Data.List (groupBy)
import qualified Data.Bimap as BM
import qualified Data.Text as T
import Data.Text.ICU
type PString = [Phoneme]
data Phoneme
= C CVoic... |
40212e068d2895c21b79ecdcc741b064fcf38271dd17a5145190a43d1fe51974 | huangz1990/SICP-answers | 69-generate-huffman-tree.scm | ;;; 69-generate-huffman-tree.scm
(load "p113-adjoin-set.scm")
(load "p114-make-leaf-set.scm")
(define (generate-huffman-tree pairs)
(successive-merge (make-leaf-set pairs)))
(define (successive-merge ordered-set)
(cond ((= 0 (length ordered-set))
'())
((= 1 (length ordered-set))
... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/69-generate-huffman-tree.scm | scheme | 69-generate-huffman-tree.scm |
(load "p113-adjoin-set.scm")
(load "p114-make-leaf-set.scm")
(define (generate-huffman-tree pairs)
(successive-merge (make-leaf-set pairs)))
(define (successive-merge ordered-set)
(cond ((= 0 (length ordered-set))
'())
((= 1 (length ordered-set))
(car ordered-set))
... |
c97ad24353a772d78978e2493b3c5b033813582e6d850c19784b46975326e644 | janestreet/hardcaml_of_verilog | synthesize.ml | open Base
open Stdio
module V = Verilog_design
module M = V.Module
let default_passes =
Pass.
[ Proc
; Flatten
; Memory { nomap = true }
; Opt { mux_undef = false }
; Clean
; Opt { mux_undef = true }
; Clean
]
;;
let get_parameters top =
match M.parameters top with
| [] -> None
... | null | https://raw.githubusercontent.com/janestreet/hardcaml_of_verilog/ee15881c2969b894b6219bf0e6b7aca3a2f2d99f/src/synthesize.ml | ocaml | It seems you must set all parameters at once, or otherwise it sets some, but not
others, in non-untuitive ways. | open Base
open Stdio
module V = Verilog_design
module M = V.Module
let default_passes =
Pass.
[ Proc
; Flatten
; Memory { nomap = true }
; Opt { mux_undef = false }
; Clean
; Opt { mux_undef = true }
; Clean
]
;;
let get_parameters top =
match M.parameters top with
| [] -> None
... |
8cc80f7e785e0102fc5f6ac852bb6ad41e693e869fac5cb33b91293fe0e42fec | Ekatereana/CommonLispWorks | having.lisp | (defstruct having-statement
func
col
operation
value)
(defun read-having (statement)
(make-having-statement
:func (nth 0 statement)
:col (car (get_args statement "(" ")"))
:operation (nth 4 statement)
:value (nth 5 statement)))
(defun having (table tnames statement)
(let ((query (read-having ... | null | https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/having.lisp | lisp | (defstruct having-statement
func
col
operation
value)
(defun read-having (statement)
(make-having-statement
:func (nth 0 statement)
:col (car (get_args statement "(" ")"))
:operation (nth 4 statement)
:value (nth 5 statement)))
(defun having (table tnames statement)
(let ((query (read-having ... | |
bc258d8233037780008359c371f1dd791bf517d3c2e1c7e8e3117670a54b089f | masaeedu/monoidal | Class.hs | module Data.Profunctor.Monoidal.Class where
import Data.Profunctor (Profunctor(..))
import Data.Profunctor.Strong.Class
import Data.Profunctor.ProcomposeVia
import Control.Category.Iso
import Control.Category.Tensor.Hask
class
( Associative l
, Associative r
, Associative o
, Profunctor p
) =>
Semigroupa... | null | https://raw.githubusercontent.com/masaeedu/monoidal/c48fa8745a08bad58e6d37041e59a0e88d10805d/src/Data/Profunctor/Monoidal/Class.hs | haskell | type ???? = OpSemigroupal (×) (+) (×)
Every profunctor has instances of the trivial semigroupal and monoidal constraints | module Data.Profunctor.Monoidal.Class where
import Data.Profunctor (Profunctor(..))
import Data.Profunctor.Strong.Class
import Data.Profunctor.ProcomposeVia
import Control.Category.Iso
import Control.Category.Tensor.Hask
class
( Associative l
, Associative r
, Associative o
, Profunctor p
) =>
Semigroupa... |
cf8236dfa29e755100764ff03722e23367903335efe105d035d09c2ab802c616 | clj-commons/seesaw | explorer.clj | Copyright ( c ) , 2011 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be ... | null | https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/examples/explorer.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) , 2011 . All rights reserved .
(ns seesaw.test.examples.explorer
(:use [seesaw core tree]
seesaw.test.examples.example)
(:import [java.io File]
[javax.swing.filechooser FileSystemView]))
(def tree-model
(simple-tree-model
#(.isDirectory %)
(fn [f] (filter #(.isDi... |
660c75ba0e566cd04e399befd3f3238acc1a9f566740ed0ce82101f1f4c6bf84 | restyled-io/restyled.io | Esqueleto.hs | module Restyled.Prelude.Esqueleto
( module X
, selectMap
, selectFoldMap
, aggregate
, unValue2
, unValue3
, unValue5
) where
import Restyled.Prelude as X hiding
( SqlEntity
, Value
, count
, delete
, exists
, isNothing
, on
, selectSource
, update
... | null | https://raw.githubusercontent.com/restyled-io/restyled.io/e3208b62dfea0916b9760cf8dd73abc7c5f080bb/src/Restyled/Prelude/Esqueleto.hs | haskell | module Restyled.Prelude.Esqueleto
( module X
, selectMap
, selectFoldMap
, aggregate
, unValue2
, unValue3
, unValue5
) where
import Restyled.Prelude as X hiding
( SqlEntity
, Value
, count
, delete
, exists
, isNothing
, on
, selectSource
, update
... | |
983e0b73a6f3872b81f546966e92b117549a657aac0a2e9b22258f4c402c3874 | reactiveml/rml | lco_ctrl_tree_thread_safe.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/interpreter/lco_ctrl_tree_thread_safe.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
This file is distributed under the terms of the GNU Library
General Public License , with the special exception on linking
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 200... |
1f39248c30c0d1b3e26c461afe8a49a8f7f9c254dc20f3e1cf30caa34453f7e6 | mini-monkey/mini-monkey | mm_support.erl | -module(mm_support).
-include("codes.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([binary_env_var/2,
correctly_formated/1]).
binary_env_var(Name, Default) when is_list(Default) ->
binary_env_var(Name, list_to_binary(Default));
binary_env_var(Name, Default) ->
case os:getenv(Name) of
false ->
... | null | https://raw.githubusercontent.com/mini-monkey/mini-monkey/4afa4385256c0f1d23db522c0725c3291a8c86c8/src/mm_support.erl | erlang | ------------------------------------------------------------------------------
Tests
------------------------------------------------------------------------------ | -module(mm_support).
-include("codes.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([binary_env_var/2,
correctly_formated/1]).
binary_env_var(Name, Default) when is_list(Default) ->
binary_env_var(Name, list_to_binary(Default));
binary_env_var(Name, Default) ->
case os:getenv(Name) of
false ->
... |
2b35027e9ee3ca2960c202c9bda122a2ec7135d8af929a1689be996c31c1c061 | juxt/apex | exception.clj | (ns juxt.apex.alpha2.middleware.exception)
(defn exception-handler-request
([request]
(exception-handler-request request {}))
([request options]
request))
(defn exception-handler-response
([response]
(exception-handler-response response {}))
([response options]
response))
(defn wrap-exception-han... | null | https://raw.githubusercontent.com/juxt/apex/cb4c0016d817ebb03d4f84e572ca71edd84ed79d/modules/deprecated/src/juxt/apex/alpha2/middleware/exception.clj | clojure | (ns juxt.apex.alpha2.middleware.exception)
(defn exception-handler-request
([request]
(exception-handler-request request {}))
([request options]
request))
(defn exception-handler-response
([response]
(exception-handler-response response {}))
([response options]
response))
(defn wrap-exception-han... | |
ce7b8c335c998d221ea5f6bbde7745260913dfe25614be2394bc1cab0fd6c931 | mojombo/yaws | yaws_jsonrpc.erl | Copyright ( C ) 2003 < > .
%% All rights reserved.
%%
Copyright ( C ) 2006 < >
< >
%% All rights reserved.
%%
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
1 . Redistrib... | null | https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/src/yaws_jsonrpc.erl | erlang | All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the foll... | Copyright ( C ) 2003 < > .
Copyright ( C ) 2006 < >
< >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS
DIRECT , INDIRECT , INCI... |
ed0a31cb1b9989817e8ff238030a350a932bc7eeb170c80c218933d895cc5b75 | coccinelle/coccinelle | gitgrep.ml |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/tools/gitgrep.ml | ocaml | adjust as convenient
The -grouped option means that all - and + code must appear in a
single contiguous block of - + code. This option has no effect on the
other kinds of patterns, ie Changelog (C) or Context (@)
Patterns can't use ^ and $
argument is true if match succeeds
mp = true in minus-plus region
ar... |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... |
690bd15d91692574bcf3592fd7a845caaadd3654ecc541f4ced118b5fc7674da | ocurrent/ocurrent | current_gitlab.mli | (** Integration with GitLab {{:}Webhooks}. *)
val webhook : webhook_secret:string -> Current_web.Resource.t
* GitLab webhook endpoint .
To trigger events this MUST be added to { ! Current_web.routes } . This webhook handles the events :
- Merge request
- Push
See { { : }webhook events } for
a full list ... | null | https://raw.githubusercontent.com/ocurrent/ocurrent/6c09b99c5e0ba43141454709aa73e2810721b8b2/plugins/gitlab/current_gitlab.mli | ocaml | * Integration with GitLab {{:}Webhooks}.
* Pretty print [t] as [owner/name/project_id].
* Cmdliner parser for reading a repo_id as a string.
The expected format is ["owner/name/project_id"].
* Access to the GitLab API.
* Reference information for the Repository.
* Status associated with a single [Commit.t]... |
val webhook : webhook_secret:string -> Current_web.Resource.t
* GitLab webhook endpoint .
To trigger events this MUST be added to { ! Current_web.routes } . This webhook handles the events :
- Merge request
- Push
See { { : }webhook events } for
a full list of possible events .
To trigger events this... |
954e2f0f70da11d6b9a52eeb845a58ec91e78e893c718a9a042a64a7320b0fa2 | robert-strandh/Second-Climacs | delete-table.lisp | (cl:in-package #:second-climacs-clim-base)
(clim:define-command-table delete-table)
(clim:define-command
(com-delete-item :name t :command-table delete-table)
()
(with-current-cursor (cursor)
(base:delete-item cursor)))
(esa:set-key `(com-delete-item)
'delete-table
'((#\d :con... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/9e8303592d824cfff03dcb0b737a1913a224506e/Code/GUI/McCLIM-ESA/Base/delete-table.lisp | lisp | (cl:in-package #:second-climacs-clim-base)
(clim:define-command-table delete-table)
(clim:define-command
(com-delete-item :name t :command-table delete-table)
()
(with-current-cursor (cursor)
(base:delete-item cursor)))
(esa:set-key `(com-delete-item)
'delete-table
'((#\d :con... | |
fce8e3968f487450e9731fbd434f682747f96848b5a3d57aaf749da88e474f0b | coco-team/lustrec | c_backend_lusic.ml | open Lusic
let print_lusic_to_h basename extension =
let module HeaderMod = C_backend_header.EmptyMod in
let module Header = C_backend_header.Main (HeaderMod) in
let lusic = read_lusic basename extension in
let header_name = basename ^ ".h" in
let h_out = open_out header_name in
let h_fmt = Format.formatter_of... | null | https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/backends/C/c_backend_lusic.ml | ocaml | open Lusic
let print_lusic_to_h basename extension =
let module HeaderMod = C_backend_header.EmptyMod in
let module Header = C_backend_header.Main (HeaderMod) in
let lusic = read_lusic basename extension in
let header_name = basename ^ ".h" in
let h_out = open_out header_name in
let h_fmt = Format.formatter_of... | |
f2a33fcf8ef012086db48d05ef889413b0ea1aae3bda26ea1b630db20e65ed6a | p2pcollab/ocaml-p2p | p2p_poldercast_lwt.ml |
Copyright ( C ) 2019 TG x
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License .
This program is distributed in the hope that it will be usef... | null | https://raw.githubusercontent.com/p2pcollab/ocaml-p2p/121e86efff0e6edd7c498d17bf4cab7787991888/lib/p2p-poldercast-lwt/p2p_poldercast_lwt.ml | ocaml | * data associated with a subscription
* Group_id.t -> sub
* Signatures |
Copyright ( C ) 2019 TG x
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License .
This program is distributed in the hope that it will be usef... |
83b1b3e4baaf95bfe87bc9a2ba312beb900ab596b0fc27df80456f7594dac9c2 | corecursive/sicp-study-group | graphics.scm | (#%require graphics/graphics)
(load "vector.scm")
(define canvas 'canvas)
(define viewport 'viewport)
(define (vect->posn v)
(make-posn (xcor v)
(- (posn-y canvas)
(ycor v))))
(define (drawline v1 v2)
((draw-line viewport) (vect->posn v1)
(vect->posn v2)))
(... | null | https://raw.githubusercontent.com/corecursive/sicp-study-group/578ebfc3d85f13a4b00cc2e49219906eba5b539d/wulab/lecture-3a/picture-language/graphics.scm | scheme | (#%require graphics/graphics)
(load "vector.scm")
(define canvas 'canvas)
(define viewport 'viewport)
(define (vect->posn v)
(make-posn (xcor v)
(- (posn-y canvas)
(ycor v))))
(define (drawline v1 v2)
((draw-line viewport) (vect->posn v1)
(vect->posn v2)))
(... | |
52bc538611795e1c263273134683f13580a65326c7b6b01ad639f4ab6fe1a5ce | borkdude/lein2deps | project.clj | (defproject io.github.borkdude/lein-lein2deps "0.1.0"
:description "A lein plugin to turn project.clj into deps.edn"
:url ""
:license {:name "MIT"
:url ""}
:eval-in-leiningen true
:dependencies [[org.clojure/clojure "1.11.1"]
[io.github.borkdude/lein2deps "0.1.0"]]
:deploy-repos... | null | https://raw.githubusercontent.com/borkdude/lein2deps/4f6d4a0140ddea10c5ac28cc24b49643660f42f6/lein-lein2deps/project.clj | clojure | (defproject io.github.borkdude/lein-lein2deps "0.1.0"
:description "A lein plugin to turn project.clj into deps.edn"
:url ""
:license {:name "MIT"
:url ""}
:eval-in-leiningen true
:dependencies [[org.clojure/clojure "1.11.1"]
[io.github.borkdude/lein2deps "0.1.0"]]
:deploy-repos... | |
8ed101097981225bf0a8659745ad3c1ecf963f01a508b62a03f91ca6eedde9a8 | GlideAngle/flare-timing | AreaStep.hs | module Flight.LeadArea.AreaStep
( readCompBestDistances
, readCompLeadingAreas
, writeCompLeadingAreas
) where
import System.Directory (createDirectoryIfMissing)
import System.FilePath ((</>))
import Data.Csv (EncodeOptions(..), encodeByNameWith, defaultEncodeOptions)
import qualified Data.ByteString.L... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/scribe/library/Flight/LeadArea/AreaStep.hs | haskell | module Flight.LeadArea.AreaStep
( readCompBestDistances
, readCompLeadingAreas
, writeCompLeadingAreas
) where
import System.Directory (createDirectoryIfMissing)
import System.FilePath ((</>))
import Data.Csv (EncodeOptions(..), encodeByNameWith, defaultEncodeOptions)
import qualified Data.ByteString.L... | |
eca48d1df1e1d894f59a9a15d8faaddc8ac7e9f7131d364ba31173ff38fa4618 | orbitz/scow | scow_server_candidate.ml | open Core.Std
open Async.Std
module Make =
functor (Statem : Scow_statem.S) ->
functor (Log : Scow_log.S) ->
functor (Store : Scow_store.S) ->
functor (Transport : Scow_transport.S with type Node.t = Store.node) ->
struct
type state = Scow_server_state.Make(Statem)(Log)(Store)(Transport).t
type... | null | https://raw.githubusercontent.com/orbitz/scow/feb633ef94824f44f0ffc679a548f97288c8ae48/lib/scow/scow_server_candidate.ml | ocaml |
* Turn self into leader and then kick off a
* heartbeat to tell the world
The +1 is because 'me' is not in [State.nodes] but it is in vote count
Unclear what to do in this case | open Core.Std
open Async.Std
module Make =
functor (Statem : Scow_statem.S) ->
functor (Log : Scow_log.S) ->
functor (Store : Scow_store.S) ->
functor (Transport : Scow_transport.S with type Node.t = Store.node) ->
struct
type state = Scow_server_state.Make(Statem)(Log)(Store)(Transport).t
type... |
8ae108ba81f0ec7a5f9c5ef30b0d98ce5d83b546bad91d153742552e960a7ae7 | ndmitchell/catch | Dictionary.hs |
module Hill.Dictionary(cmdsDictionary) where
import Hill.Type
import Data.List
import Data.Char
import Data.Maybe
import General.TextUtil
import General.General
cmdsDictionary = [hillCmdPure "remove-dict" (const removeDictionary)]
data TypeValue = TypeValue {typeValueModu :: String, val :: String}
... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Hill/Dictionary.hs | haskell | (replicate fre (TyCon "Type" []))
NOTE: If given a recursive type, this stops the specialiser from doing its job |
module Hill.Dictionary(cmdsDictionary) where
import Hill.Type
import Data.List
import Data.Char
import Data.Maybe
import General.TextUtil
import General.General
cmdsDictionary = [hillCmdPure "remove-dict" (const removeDictionary)]
data TypeValue = TypeValue {typeValueModu :: String, val :: String}
... |
db6d43753ad55721fe402f6bf87505f5cb59725a0160d11fdbcc12549739be65 | UnixJunkie/oranger | mol.ml |
module A = Array
module Buff = Buffer
module Fp = Molenc.Fingerprint
module Log = Dolog.Log
type t = { name: string;
value: float; (* regression target (like pIC50) *)
fp: Fp.t }
let get_name mol =
mol.name
let get_fp mol =
mol.fp
let get_value mol =
mol.value
let set_value mol v =
{... | null | https://raw.githubusercontent.com/UnixJunkie/oranger/58b40ab2db9589e29be20a998222fedad3370df0/src/mol.ml | ocaml | regression target (like pIC50)
first value on the line is the activity/pIC50
unit tests suite |
module A = Array
module Buff = Buffer
module Fp = Molenc.Fingerprint
module Log = Dolog.Log
type t = { name: string;
fp: Fp.t }
let get_name mol =
mol.name
let get_fp mol =
mol.fp
let get_value mol =
mol.value
let set_value mol v =
{ mol with value = v }
let of_string line =
try Scanf.sscanf... |
574312b3125e0870c3243bafa02df74ddd59d9028786e18a129a912a2dfe608d | inhabitedtype/ocaml-aws | createDocument.mli | open Types
type input = CreateDocumentRequest.t
type output = CreateDocumentResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/ssm/lib/createDocument.mli | ocaml | open Types
type input = CreateDocumentRequest.t
type output = CreateDocumentResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
43b4a745cab0bb4279db9ba4812ed2eb0a831b59d48c0722bbd2b1578e0eec53 | vmchale/command-line-tweeter | Internal.hs | -- | Helper functions for the command line tool.
module Web.Tweet.API.Internal where
import Data.Void
import Text.Megaparsec.Error
import Web.Tweet.API
import Web.Tweet.Types
import Web.Tweet.Utils
type Filter = Timeline -> Timeline
-- | Show a user profile given scr... | null | https://raw.githubusercontent.com/vmchale/command-line-tweeter/53314340c5bc7dda4de78072790c2c36e180c0ca/src/Web/Tweet/API/Internal.hs | haskell | | Helper functions for the command line tool.
| Show a user profile given screen name, how many tweets to return,
and whether to print them in color.
| Show the most successful tweets by a given user, given their screen name.
| Show the most successful tweets by a given user, given their screen name. Additionally ... | module Web.Tweet.API.Internal where
import Data.Void
import Text.Megaparsec.Error
import Web.Tweet.API
import Web.Tweet.Types
import Web.Tweet.Utils
type Filter = Timeline -> Timeline
showProfile :: String -> Int -> Bool -> FilePath -> IO String
showProfile sn count ... |
fe61c54718771109d567687e843eeec8cf60c6183b394536b8f33c68ff5a1ac0 | sbelak/huri | plot.clj | R interoperability code is based on
;;;;
(ns huri.plot
(:require [huri.core :refer [rollup derive-cols sum col extent cols size
col-oriented]]
[clojure.string :as s]
[plumbing.core :refer [map-vals for-map assoc-when]]
[clojure.java... | null | https://raw.githubusercontent.com/sbelak/huri/a242d9d044dfa1c03691b5362bb94fc6fba20f30/src/huri/plot.clj | clojure | R interoperability code is based on
(ns huri.plot
(:require [huri.core :refer [rollup derive-cols sum col extent cols size
col-oriented]]
[clojure.string :as s]
[plumbing.core :refer [map-vals for-map assoc-when]]
[clojure.java.shell... | |
3d5221ad21218a7d25fae0d3671ad61eb9866eb234a195020361349b4f6e35a2 | ocaml-doc/voodoo | main.ml | open Cmdliner
[@@@ocaml.warning "-3"]
let docs = "ARGUMENTS"
let convert_directory ?(create = false) () :
Odoc_odoc.Fs.Directory.t Arg.converter =
let dir_parser, dir_printer = Arg.string in
let odoc_dir_parser str =
let () = if create then Odoc_odoc.Fs.Directory.(mkdir_p (of_string str)) in
match di... | null | https://raw.githubusercontent.com/ocaml-doc/voodoo/c190a73e860bf6b5b33d414a83e5df1e81b7a622/src/voodoo-gen/bin/main.ml | ocaml | open Cmdliner
[@@@ocaml.warning "-3"]
let docs = "ARGUMENTS"
let convert_directory ?(create = false) () :
Odoc_odoc.Fs.Directory.t Arg.converter =
let dir_parser, dir_printer = Arg.string in
let odoc_dir_parser str =
let () = if create then Odoc_odoc.Fs.Directory.(mkdir_p (of_string str)) in
match di... | |
0e27b5d000e014e612af108d9300305eb3407a8393a1b148471d31e9e568112a | jvf/scalaris | yaws_cgi.erl | -module(yaws_cgi).
-author('').
-author(''). %% Added support for FastCGI
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include("../include/yaws.hrl").
%%% Returns Out (i.e. same return values as out/1).
%%%
-export([call_cgi/5, call_cgi/4, call_cgi/3, call_cgi/2]).
-export([call_fcgi_resp... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/yaws_cgi.erl | erlang | Added support for FastCGI
Returns Out (i.e. same return values as out/1).
Returns {allowed, Out} or {denied, Out}.
TODO: Implement FastCGI filter role.
=====================================================================
Code shared between CGI and FastCGI
======================================================... | -module(yaws_cgi).
-author('').
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include("../include/yaws.hrl").
-export([call_cgi/5, call_cgi/4, call_cgi/3, call_cgi/2]).
-export([call_fcgi_responder/2, call_fcgi_responder/1]).
-export([call_fcgi_authorizer/2, call_fcgi_authorizer/1]).
Returns [... |
9e925a9da40d75f9df77a653070f76ae294039f0af037019a38dbe7306371f86 | robert-strandh/SICL | nset-exclusive-or-defun.lisp | (cl:in-package #:sicl-cons)
;;; We take advantage of the fact that the standard doesn't require
;;; this function to have any side effects.
(defun nset-exclusive-or (list1 list2
&key key (test nil test-given) (test-not nil test-not-given))
(when (and test-given test-not-given)
(error '... | null | https://raw.githubusercontent.com/robert-strandh/SICL/32d995c4f8e7d228e9c0cda6f670b2fa53ad0287/Code/Cons/nset-exclusive-or-defun.lisp | lisp | We take advantage of the fact that the standard doesn't require
this function to have any side effects. | (cl:in-package #:sicl-cons)
(defun nset-exclusive-or (list1 list2
&key key (test nil test-given) (test-not nil test-not-given))
(when (and test-given test-not-given)
(error 'both-test-and-test-not-given))
(let ((use-hash (> (* (length list1) (length list2)) 1000)))
(if key
... |
344367391726c4fb90c749981eacdb2c9bc885a06c759d50c680829aa684df13 | lascar-pacagi/MiniJava | print_ast.ml | open LMJ
open Printf
let indentation = 2
(** UTF8 sequences for different symbols. *)
let lbrace = "\xe2\x9d\xb4"
let rbrace = "\xe2\x9d\xb5"
let lparen = "\xef\xbc\x88"
let rparen = "\xef\xbc\x89"
let branch = "\xe2\x94\x9c"
let branch_end = "\xe2\x94\x94"
let pipe = "\xe2\x94\x82"
let rtriangle = "\xe2\x96\xb8"
let... | null | https://raw.githubusercontent.com/lascar-pacagi/MiniJava/9ac4e851667421ea92e9924bc374b4b450387e56/print_ast.ml | ocaml | * UTF8 sequences for different symbols.
* If [show_location] is true then we print position informations associated with
identifiers and expressions.
* [print_position out pos] prints position informations using [pos] on the
output channel [out] iff [show_location] is true.
* [print_identifier out loc] print... | open LMJ
open Printf
let indentation = 2
let lbrace = "\xe2\x9d\xb4"
let rbrace = "\xe2\x9d\xb5"
let lparen = "\xef\xbc\x88"
let rparen = "\xef\xbc\x89"
let branch = "\xe2\x94\x9c"
let branch_end = "\xe2\x94\x94"
let pipe = "\xe2\x94\x82"
let rtriangle = "\xe2\x96\xb8"
let ltriangle = "\xe2\x97\x82"
let show_locatio... |
78e76b0d3bb47a66321b7c1f611960df0c89e9b02694ef1d9445de1b6a2a411c | mirage/irmin | store_properties.mli |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/store_properties.mli | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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 SOFTWARE IS PROVIDED " AS IS " AND... | |
bbad47ff622a64f9228123d4d06a40525b561137bc447c6f37f3ebe737c1f1cf | c-cube/ocaml-containers | CCOrd.mli | (** Order combinators *)
(* This file is free software, part of containers. See file "license" for more details. *)
* { 2 Comparisons }
type 'a t = 'a -> 'a -> int
* Comparison ( total ordering ) between two elements , that returns an int .
val poly : 'a t
* Polymorphic " magic " comparison . Use with care , as it ... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCOrd.mli | ocaml | * Order combinators
This file is free software, part of containers. See file "license" for more details.
* Infix equivalent of {!map}.
* Infix equivalent of {!map}. |
* { 2 Comparisons }
type 'a t = 'a -> 'a -> int
* Comparison ( total ordering ) between two elements , that returns an int .
val poly : 'a t
* Polymorphic " magic " comparison . Use with care , as it will fail on
some types .
@since 3.6
some types.
@since 3.6 *)
val compare : 'a t
[@@deprecat... |
724d09f283c2c22d5bd7402f69dc64cac9848eb8a46c94cf221a4b16d7fe2d08 | dbuenzli/rpng | pngtrip.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% version % % ---------------------------------------------------------------------------
Cop... | null | https://raw.githubusercontent.com/dbuenzli/rpng/f24f0bbbc9ca532c163104ca1b21212ff8de8fe9/test/pngtrip.ml | ocaml | Info
Trip
"-enc", Arg.Unit (set_cmd `Encode),
" Encode only (random), no decoding"; | ---------------------------------------------------------------------------
Copyright ( c ) 2012 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% version % % ---------------------------------------------------------------------------
Cop... |
688db59f1c744d60c6820e37fff08777f78581d0c86f390e6afaa89a14f695c6 | futurice/haskell-mega-repo | Exec.hs | {-# LANGUAGE OverloadedStrings #-}
module Futurice.App.MegaRepoTool.Exec (cmdExec) where
import Futurice.Prelude
import Prelude ()
import System.Environment (getEnvironment)
import System.Exit (ExitCode (..))
import qualified Data.Map as Map
import qualified System.Process as Process
import Futurice.App... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/mega-repo-tool/src/Futurice/App/MegaRepoTool/Exec.hs | haskell | # LANGUAGE OverloadedStrings #
make the environment
-----------------------------------------------------------------------------
Process extras
----------------------------------------------------------------------------- | module Futurice.App.MegaRepoTool.Exec (cmdExec) where
import Futurice.Prelude
import Prelude ()
import System.Environment (getEnvironment)
import System.Exit (ExitCode (..))
import qualified Data.Map as Map
import qualified System.Process as Process
import Futurice.App.MegaRepoTool.Config
import Futuric... |
3d1800f136cf7844a796919c294ca9be5d06b69d9ee9e1ff4719c1fed01bba2b | YoshikuniJujo/test_haskell | try-simple-parse-c.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import System.Environment
import Try
main :: IO ()
main = do
(fp : _) <- getArgs
pr <- parseCFile fp
print pr
print $ cTranslUnitToEnums <$> pr
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/30811a2229b0b2699f0f492c2a0470c4ba52fd7e/features/ffi/c_enum_structure/try-make-c-enum-structure/app/try-simple-parse-c.hs | haskell | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import System.Environment
import Try
main :: IO ()
main = do
(fp : _) <- getArgs
pr <- parseCFile fp
print pr
print $ cTranslUnitToEnums <$> pr
| |
253dc7341c18b1fa4117b5fbf9a823fe6c7a67122dd3129e53709c02da135131 | ThomasHintz/keep-the-records | lookup-port.scm | (define lookup-port "10000")
| null | https://raw.githubusercontent.com/ThomasHintz/keep-the-records/c20e648e831bed2ced3f2f74bfc590dc06b5f076/services/lookup-port.scm | scheme | (define lookup-port "10000")
| |
b3c204c6f6af97a88677556c8c3e74fd689b3cb3b64b927f85a256f843b440f1 | gaborcs/lambda-terminal | Diff.hs | module Diff where
import Control.Monad
import Data.Maybe
import qualified Data.List.NonEmpty as NonEmpty
import qualified Expr as E
import qualified Pattern as P
import qualified Type as T
type Path = [ChildIndex]
type ChildIndex = Int
getDiffPathBetweenDataConstructors :: Eq d => T.DataConstructor d -> T.DataConstr... | null | https://raw.githubusercontent.com/gaborcs/lambda-terminal/7f2638f2f3a562e0b60248da7652bda81be76adf/src/Diff.hs | haskell | module Diff where
import Control.Monad
import Data.Maybe
import qualified Data.List.NonEmpty as NonEmpty
import qualified Expr as E
import qualified Pattern as P
import qualified Type as T
type Path = [ChildIndex]
type ChildIndex = Int
getDiffPathBetweenDataConstructors :: Eq d => T.DataConstructor d -> T.DataConstr... | |
226ecdbc612a68acda5f87dc03f15745e92b36f99fc062532fb7a5b1270ec4f1 | input-output-hk/plutus | Pretty.hs | | A module alias for way too verbose " " .
module Text.Pretty
( module Export
) where
import Prettyprinter as Export
| null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/prettyprinter-configurable/src/Text/Pretty.hs | haskell | | A module alias for way too verbose " " .
module Text.Pretty
( module Export
) where
import Prettyprinter as Export
| |
ec9b64d0ad661a80e1d6c967c2357f01849d2e98e87a811ea77acb7ebc865456 | alsonkemp/turbinado-website | Index.hs | markup = <div>
<h1>Songs</h1>
<table>
<% do ss <- getViewDataValue_u "songs" :: View [String]
mapM genRow ss %>
</table>
</div>
genRow s = <tr>
<td>
<% show s %>
</td>
</tr>
| null | https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/App/Views/Test/Index.hs | haskell | markup = <div>
<h1>Songs</h1>
<table>
<% do ss <- getViewDataValue_u "songs" :: View [String]
mapM genRow ss %>
</table>
</div>
genRow s = <tr>
<td>
<% show s %>
</td>
</tr>
| |
77a3d1301f43faa3ee7815aaffe8e53d9ca7e00e48e67b1b073e77095f02730e | clojure-interop/java-jdk | MetalToggleButtonUI.clj | (ns javax.swing.plaf.metal.MetalToggleButtonUI
"MetalToggleButton implementation
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/MetalToggleButtonUI.clj | clojure | (ns javax.swing.plaf.metal.MetalToggleButtonUI
"MetalToggleButton implementation
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing... | |
4b05056bed6e4397a2c42b4adfd7b50386388089ea57dc3db20e156772903678 | Decentralized-Pictures/T4L3NT | baking.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/baking.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
2f4b84b0cc0effa7218498119bee9ead7c6a34c0b95cdb84ef0fb0b6f5f313a6 | dradtke/Lisp-Text-Editor | gobject.ffi.lisp | (in-package :gobject.ffi)
(defcfun (g-type-fundamental "g_type_fundamental") g-type-designator
"Returns the fundamental type which is the ancestor of @code{type}.
Example:
@pre{
\(g-type-fundamental \"GtkWindowType\")
=> \"GEnum\"
\(g-type-fundamental \"GtkLabel\")
=> \"GObject\"
}
@arg[type]{GType designator (see ... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/glib/gobject.ffi.lisp | lisp | (in-package :gobject.ffi)
(defcfun (g-type-fundamental "g_type_fundamental") g-type-designator
"Returns the fundamental type which is the ancestor of @code{type}.
Example:
@pre{
\(g-type-fundamental \"GtkWindowType\")
=> \"GEnum\"
\(g-type-fundamental \"GtkLabel\")
=> \"GObject\"
}
@arg[type]{GType designator (see ... | |
4554d3fd3be686ef49c6e645d866703d9207e8e6fdd7d4b396b225ddb90c7885 | mfikes/advent-of-code | day_23.cljc | (ns advent-2017.day-23
(:require
#?(:cljs [planck.core :refer [read]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.spec.alpha :as s])
#?(:clj (:import (java.io PushbackReader))))
(def input (->> "advent_2017/day_23/input" io/resource io/reader #?(:clj PushbackReader.)))
(s/def ::arg (s/or ... | null | https://raw.githubusercontent.com/mfikes/advent-of-code/72a015ac8fd9b1097efea69a0bb8acc26462665e/src/advent_2017/day_23.cljc | clojure | fetch
We could optimize code, or just calculate what it would do. Choose latter. | (ns advent-2017.day-23
(:require
#?(:cljs [planck.core :refer [read]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.spec.alpha :as s])
#?(:clj (:import (java.io PushbackReader))))
(def input (->> "advent_2017/day_23/input" io/resource io/reader #?(:clj PushbackReader.)))
(s/def ::arg (s/or ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.