_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 |
|---|---|---|---|---|---|---|---|---|
669526c20994fad11731279d56525e5b5cead49a31f4a13cd040941b7cab0b67 | epiccastle/bbssh | config_repository.clj | (ns pod.epiccastle.bbssh.pod.config-repository
(:require [bbssh.impl.references :as references]
[bbssh.impl.utils :as utils]
[pod.epiccastle.bbssh.pod.callbacks :as callbacks]
[pod.epiccastle.bbssh.pod.cleaner :as cleaner])
(:import [com.jcraft.jsch ConfigRepository OpenSSHConfig... | null | https://raw.githubusercontent.com/epiccastle/bbssh/9e851095650d76c997f7fa73639b74bfb8043bad/src/clj/pod/epiccastle/bbssh/pod/config_repository.clj | clojure | pod.epiccastle.bbssh.pod.* are invoked on pod side. | (ns pod.epiccastle.bbssh.pod.config-repository
(:require [bbssh.impl.references :as references]
[bbssh.impl.utils :as utils]
[pod.epiccastle.bbssh.pod.callbacks :as callbacks]
[pod.epiccastle.bbssh.pod.cleaner :as cleaner])
(:import [com.jcraft.jsch ConfigRepository OpenSSHConfig... |
8014429be6b1b98de53038740ca30af10c1bfc826ea35d5d75a089fa8b904c58 | tschady/advent-of-code | d12_test.clj | (ns aoc.2021.d12-test
(:require [aoc.2021.d12 :as sut]
[clojure.test :refer :all]))
(def ex ["start-A"
"start-b"
"A-c"
"A-b"
"b-d"
"A-end"
"b-end"])
(deftest challenges
(is (= 4912 (sut/part-1 sut/input)))
(is (= 150004 (sut/part-2 sut/input))))
| null | https://raw.githubusercontent.com/tschady/advent-of-code/b5702e2635b8bfa1e69c74478e2200e0739f6ffd/test/aoc/2021/d12_test.clj | clojure | (ns aoc.2021.d12-test
(:require [aoc.2021.d12 :as sut]
[clojure.test :refer :all]))
(def ex ["start-A"
"start-b"
"A-c"
"A-b"
"b-d"
"A-end"
"b-end"])
(deftest challenges
(is (= 4912 (sut/part-1 sut/input)))
(is (= 150004 (sut/part-2 sut/input))))
| |
023aea2947e5c3d078d36e1b7163bcaebfec00573b91c53520afa8442be8e975 | brandonchinn178/advent-of-code | Utils.hs | # LANGUAGE TupleSections #
module Utils where
import Control.Monad (when)
import Data.List (tails)
-- Helpers to check/solve in main
part :: Int -> IO () -> IO ()
part partNum action = do
putStrLn $ "\n========== Part " ++ show partNum ++ " =========="
action
check :: (Show a, Show b, Eq b) => String -> (a -> ... | null | https://raw.githubusercontent.com/brandonchinn178/advent-of-code/a4b0616f8764620e28759276c333fe37d6685d57/2017/Utils.hs | haskell | Helpers to check/solve in main
Utility functions
| Get all pairs of items in the list. | # LANGUAGE TupleSections #
module Utils where
import Control.Monad (when)
import Data.List (tails)
part :: Int -> IO () -> IO ()
part partNum action = do
putStrLn $ "\n========== Part " ++ show partNum ++ " =========="
action
check :: (Show a, Show b, Eq b) => String -> (a -> b) -> [(a, b)] -> IO ()
check labe... |
3e3eb794a0d28071aaa0336fac03fd33587a945c5549140828803039e057bfbb | ocurrent/opam-repo-ci | common.ml | let status_sep = ','
| null | https://raw.githubusercontent.com/ocurrent/opam-repo-ci/58cd38ddcf8bb24db5c2a7d8c233770e3e1e08cf/api/common.ml | ocaml | let status_sep = ','
| |
bc7fa269bdfe749fc9a1b846e54f0d49fcca763ceebfb5ca498392daf7826810 | billstclair/trubanc-lisp | test.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FLEXI - STREAMS - TEST ; Base : 10 -*-
$ Header : /usr / local / cvsrep / flexi - streams / test / test.lisp , v 1.40 2008/07/25 09:56:12 edi Exp $
Copyright ( c ) 2006 - 2008 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary f... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/flexi-streams-1.0.7/test/test.lisp | lisp | Syntax : COMMON - LISP ; Package : FLEXI - STREAMS - TEST ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of condi... | $ Header : /usr / local / cvsrep / flexi - streams / test / test.lisp , v 1.40 2008/07/25 09:56:12 edi Exp $
Copyright ( c ) 2006 - 2008 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
... |
995b2d5aa125a8160d31b96f7d72e355604688dcb7420d985633a9e49a8b5b60 | metabase/metabase | segment.clj | (ns metabase.models.segment
"A Segment is a saved MBQL 'macro', expanding to a `:filter` subclause. It is passed in as a `:filter` subclause but is
replaced by the `expand-macros` middleware with the appropriate clauses."
(:require
[clojure.set :as set]
[medley.core :as m]
[metabase.models.interface :as ... | null | https://raw.githubusercontent.com/metabase/metabase/2d22d3af60fb2c225b60a950a96e21eb7376865d/src/metabase/models/segment.clj | clojure | --------------------------------------------------- Revisions ----------------------------------------------------
do our diff logic
------------------------------------------------ Serialization --------------------------------------------------- | (ns metabase.models.segment
"A Segment is a saved MBQL 'macro', expanding to a `:filter` subclause. It is passed in as a `:filter` subclause but is
replaced by the `expand-macros` middleware with the appropriate clauses."
(:require
[clojure.set :as set]
[medley.core :as m]
[metabase.models.interface :as ... |
8efaf714df4d75cbf70ad1cf18971f64e50765d096e8980616216e00d241af76 | LeiWangHoward/Common-Lisp-Playground | trie_ol.lisp | (defpackage "TRIVIAL-TRIE"
(:use "CL" "SB-EXT"))
(in-package "TRIVIAL-TRIE")
(defconstant +trie-fan-out+ 26)
(declaim (inline char-index))
(defun char-index (char)
(declare (type base-char char)
(optimize speed))
#+ (or) ; this is at the very least safe on erroneous input
(let ((idx (logand (- (... | null | https://raw.githubusercontent.com/LeiWangHoward/Common-Lisp-Playground/4130232954f1bbf8aa003d856ccb2ab382da0534/croosword-boggles/trie_ol.lisp | lisp | this is at the very least safe on erroneous input
less indirection
more idiomatic
T iff a word "finishes" here
this doesn't cons any garbage up.
if we run out of space, we're fscked anyway | (defpackage "TRIVIAL-TRIE"
(:use "CL" "SB-EXT"))
(in-package "TRIVIAL-TRIE")
(defconstant +trie-fan-out+ 26)
(declaim (inline char-index))
(defun char-index (char)
(declare (type base-char char)
(optimize speed))
(let ((idx (logand (- (char-code char) (char-code #\a))
#x255)))... |
b087ce23f054d06a5c6d78eeb5c6cdb3eff4d1d8caf70763cad6e8c2b6832166 | kupl/LearnML | patch.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec sub ((l : 'a list), a) : 'a list =
match l with
| [] -> []
| hd :: tl -> if hd = a then sub (tl, a) else hd :: sub (tl, a)
let rec concat ((a : 'b list), (b : 'b list)) : 'b list =
match a with [] -> b | hd :: tl ... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub11/patch.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec sub ((l : 'a list), a) : 'a list =
match l with
| [] -> []
| hd :: tl -> if hd = a then sub (tl, a) else hd :: sub (tl, a)
let rec concat ((a : 'b list), (b : 'b list)) : 'b list =
match a with [] -> b | hd :: tl ... | |
5c1a61b112e8a949f0213fbb3ca2f969b872f46642d2a67d572a3ebd01806ff7 | evolutics/haskell-formatter | Input.hs | predecessor = predecessor
{-^ {- inner -} outer -}
successor :: a
successor = successor
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/treats_nested_comments/Input.hs | haskell | ^ {- inner | predecessor = predecessor
successor :: a
successor = successor
|
8de78fa11dc867a86299c1157d8ada3b0eb818667f93a8b77bd14d9e5cf2b538 | ocaml-ppx/ppx | gen_viewer.mli | val print_viewer_ml : Astlib.Version.t -> unit
val print_viewer_mli : Astlib.Version.t -> unit
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ast/cinaps/gen_viewer.mli | ocaml | val print_viewer_ml : Astlib.Version.t -> unit
val print_viewer_mli : Astlib.Version.t -> unit
| |
37160c999c4656472ab6affbaa30fcb6cdb316e833df88e624899ab90e1a0464 | bitemyapp/bloodhound | Count.hs | {-# LANGUAGE OverloadedStrings #-}
module Database.Bloodhound.Internal.Count (CountQuery (..), CountResponse (..), CountShards (..)) where
import Data.Aeson
import Database.Bloodhound.Internal.Query
import Numeric.Natural
newtype CountQuery = CountQuery {countQuery :: Query}
deriving (Eq, Show)
instance ToJSON Co... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/c5a10dd2922e0a2debaeb8985e53112700a1998b/src/Database/Bloodhound/Internal/Count.hs | haskell | # LANGUAGE OverloadedStrings # |
module Database.Bloodhound.Internal.Count (CountQuery (..), CountResponse (..), CountShards (..)) where
import Data.Aeson
import Database.Bloodhound.Internal.Query
import Numeric.Natural
newtype CountQuery = CountQuery {countQuery :: Query}
deriving (Eq, Show)
instance ToJSON CountQuery where
toJSON (CountQuery... |
ae1d42d6068dab1c421519a7ed55fba04621f9564d373ba9eb1703e8a1d9b505 | solomon-b/titan | Main.hs | module Main where
import Control.Monad.Except
( MonadIO(liftIO), MonadError(throwError) )
import Control.Monad.Reader ( ReaderT(runReaderT) )
import Data.Proxy ( Proxy(..) )
import Data.Time
( Day,
TimeZone,
UTCTime(utctDay),
ZonedTime,
utcToZonedTime,
getCurrentTime )
import Data... | null | https://raw.githubusercontent.com/solomon-b/titan/881d3edd163d5ba50ba965406cf8ea341f58c2e9/app/Main.hs | haskell | --------------------
- Example routes ---
--------------------
----------
- Main ---
---------- | module Main where
import Control.Monad.Except
( MonadIO(liftIO), MonadError(throwError) )
import Control.Monad.Reader ( ReaderT(runReaderT) )
import Data.Proxy ( Proxy(..) )
import Data.Time
( Day,
TimeZone,
UTCTime(utctDay),
ZonedTime,
utcToZonedTime,
getCurrentTime )
import Data... |
a24f98c3e53780b98b71b045540a7eef13ed68638aa243fbc4662ac319ff37f4 | ocaml-omake/omake | omake_options.mli | (*
* Options for the omake program.
*
*)
(*
* When to print output.
*)
type eval_flag =
| EvalNever
| EvalLazy
| EvalEager
(*
* Diversion control.
*)
type output_flag =
| OutputNormal
| OutputPostponeSuccess
| OutputPostponeError
| OutputRepeatErrors
(*
* Make the default state explicit (the ac... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_options.mli | ocaml |
* Options for the omake program.
*
* When to print output.
* Diversion control.
* Make the default state explicit (the actual value may depend on the value of other settings).
Warnings
* Initial options.
* Argument specifier.
* Parallel build options
true when some --output-* diversions ... |
type eval_flag =
| EvalNever
| EvalLazy
| EvalEager
type output_flag =
| OutputNormal
| OutputPostponeSuccess
| OutputPostponeError
| OutputRepeatErrors
type setting
type t =
{ job_count : int;
remote_servers : (string * int) list;
terminate_on_error : setting;
dry_... |
744d9b312a4b41e09779243a5975313be73b28f228f5ee32bc48bc87e9e8b283 | richmit/mjrcalc | tst-const.lisp | ;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file tst-const.lisp
@author < >
;; @brief Unit t... | null | https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/tst-const.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
@file tst-const.lisp
@brief Unit tests.@EOL
@std Common Lisp
@see use-const.lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following con... | @author < >
@parblock
Copyright ( c ) 2015 , < > All rights reserved .
1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer .
2 . Redistributions in binary form must reproduce the above copyright notice , this list... |
f3b699931d4791eff65c4e90f60464e5c0916a47e606f7cd6ece8b283f14b77f | zfoh/haskell-beginners-projects | Main.hs | module Main where
import Memegen.Lib (memegenEntry)
main :: IO ()
main = memegenEntry
| null | https://raw.githubusercontent.com/zfoh/haskell-beginners-projects/84f3b828b898413e25afda2910289393c7b20994/memegen/app/Main.hs | haskell | module Main where
import Memegen.Lib (memegenEntry)
main :: IO ()
main = memegenEntry
| |
9a35ff6e8f748f2edea408450d71d6d96853dbff2a74b268a3f1d79604627997 | greglook/clj-multiformats | address_test.cljc | (ns multiformats.address-test
(:require
[alphabase.bytes :as b]
#?(:clj [clojure.test :refer [deftest are]]
:cljs [cljs.test :refer-macros [deftest are]])
[multiformats.address :as address]))
(deftest parse-test
(are [addr-str coll]
(= (seq (address/parse addr-str)) coll)
"/ip4/127.0... | null | https://raw.githubusercontent.com/greglook/clj-multiformats/51ebc08e03625fef323101b6f0e390d0c8e2244a/test/multiformats/address_test.cljc | clojure | (ns multiformats.address-test
(:require
[alphabase.bytes :as b]
#?(:clj [clojure.test :refer [deftest are]]
:cljs [cljs.test :refer-macros [deftest are]])
[multiformats.address :as address]))
(deftest parse-test
(are [addr-str coll]
(= (seq (address/parse addr-str)) coll)
"/ip4/127.0... | |
4a1ce28a5e89952dfb303e232d174ad637ad4f7a3307e802dc3a1f46538ac4ed | gigix/turing_machine | loader.clj | (ns turing_machine.loader
(:use [turing_machine.m_config])
(:use [turing_machine.core])
)
(defn to_m_config
[row]
(def cols (#'clojure.string/split row #"\|"))
(def items (map #(#'clojure.string/trim %) cols))
(def status (last (take 1 items)))
(def read_symbol (last (take 2 items)))
(def ops (last (take 3 i... | null | https://raw.githubusercontent.com/gigix/turing_machine/c1d2e4d81aecbe51a8c35fff7d1b4741b45bdce0/clojure/domain/src/turing_machine/loader.clj | clojure | (ns turing_machine.loader
(:use [turing_machine.m_config])
(:use [turing_machine.core])
)
(defn to_m_config
[row]
(def cols (#'clojure.string/split row #"\|"))
(def items (map #(#'clojure.string/trim %) cols))
(def status (last (take 1 items)))
(def read_symbol (last (take 2 items)))
(def ops (last (take 3 i... | |
f608a5964107a4a591d2d383dbb48e6cfd9620fd80a799fdfe66231398db0f87 | c4-project/c4f | stub.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/delitmus/src/stub.mli | ocaml | * [run input output] runs [make] over the auxiliary input incoming as
JSON over [input], dumping the stub to [output]. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
c4c1018935ed28a4a620c6859b85ffdb3b4102f7ca69c6caa4681d6b1ca5e39c | hiroshi-unno/coar | list_exists.ml | let rec exists f = function [] -> false | hd :: tl -> f hd || exists f tl
let gt0 i = i > 0
let main d l1 = if gt0 d then assert (exists gt0 (d :: l1))
[@@@assert "typeof(main) <: int -> (l1:{v: int list | true }) -> unit"]
let main d l1 = if not (gt0 d) then assert (exists gt0 (d :: l1))
[@@@assert "typeof(main) ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/simple/list_exists.ml | ocaml | let rec exists f = function [] -> false | hd :: tl -> f hd || exists f tl
let gt0 i = i > 0
let main d l1 = if gt0 d then assert (exists gt0 (d :: l1))
[@@@assert "typeof(main) <: int -> (l1:{v: int list | true }) -> unit"]
let main d l1 = if not (gt0 d) then assert (exists gt0 (d :: l1))
[@@@assert "typeof(main) ... | |
6a7f9e3131ad9137c1578366de1ecf64d4251270d5d92f3e81012d61ce0ab74f | nasa/Common-Metadata-Repository | routes.clj | (ns cmr.ingest.site.routes
"Defines the HTTP URL routes for the ingest web site."
(:require
[cmr.common-app.static :as static]
[cmr.common-app.site.data :as common-data]
[cmr.common-app.site.pages :as common-pages]
[cmr.ingest.site.pages :as pages]
[cmr.transmit.config :as config]
[compojure.core ... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/156c6c27911148eb424bfe1e0fa756e5a7146eab/ingest-app/src/cmr/ingest/site/routes.clj | clojure | The spacer function calculates the number of spaces used by headers
in the table of contents for generic documents specific by document type
Backwards comapatibility for old docs URLs
Access control docs context
Support better organization of documentation URLs and support old
URLs
Add routes for general API docu... | (ns cmr.ingest.site.routes
"Defines the HTTP URL routes for the ingest web site."
(:require
[cmr.common-app.static :as static]
[cmr.common-app.site.data :as common-data]
[cmr.common-app.site.pages :as common-pages]
[cmr.ingest.site.pages :as pages]
[cmr.transmit.config :as config]
[compojure.core ... |
1051b2e6c7733fa3f448167f07185f365372d40ed4f966ef7f45cd82facd9a27 | lispbuilder/lispbuilder | version.lisp |
(in-package #:lispbuilder-sdl-cffi)
(defconstant SDL-MAJOR-VERSION 1)
(defconstant SDL-MINOR-VERSION 2)
(defconstant SDL-PATCH-LEVEL 14)
(cffi:defcstruct SDL-version
(major :unsigned-char)
(minor :unsigned-char)
(patch :unsigned-char))
(cffi:defcfun ("SDL_Linked_Version" SDL-Linked-Version) :pointer)
(defun ... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/cffi/version.lisp | lisp |
(in-package #:lispbuilder-sdl-cffi)
(defconstant SDL-MAJOR-VERSION 1)
(defconstant SDL-MINOR-VERSION 2)
(defconstant SDL-PATCH-LEVEL 14)
(cffi:defcstruct SDL-version
(major :unsigned-char)
(minor :unsigned-char)
(patch :unsigned-char))
(cffi:defcfun ("SDL_Linked_Version" SDL-Linked-Version) :pointer)
(defun ... | |
d4a8402fa385f052ed69e4b7f6cdb45cba04f32294d7257d37bf180d5fe16c84 | jspahrsummers/RxHaskell | Scheduler.hs | {-# LANGUAGE Safe #-}
module Scheduler ( Scheduler(schedule)
, SchedulerIO
, getCurrentScheduler
, BackgroundScheduler
, newScheduler
) where
import Control.Applicative
import Control.Concurrent.STM
import Scheduler.Internal
-- | Cr... | null | https://raw.githubusercontent.com/jspahrsummers/RxHaskell/19550bb692a6a6e56314fe3aebb1303a22e577ed/Scheduler.hs | haskell | # LANGUAGE Safe #
| Creates a new background scheduler. |
module Scheduler ( Scheduler(schedule)
, SchedulerIO
, getCurrentScheduler
, BackgroundScheduler
, newScheduler
) where
import Control.Applicative
import Control.Concurrent.STM
import Scheduler.Internal
newScheduler :: IO Background... |
f8d7263899d96731d955f70a93344b653c1ee2b4773693862e991d4e5747d399 | joeyadams/haskell-iocp | close-without-shutdown.hs | {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing #-}
import Prelude hiding (log)
import Control.Concurrent
import Control.Monad
import Data.ByteString.Char8 ()
import Network (PortID(..))
import Network.Socket (Family(..), SocketType(..), Por... | null | https://raw.githubusercontent.com/joeyadams/haskell-iocp/67b65759b3d1473770533f782ca7a42131ae2ca7/testing/close-without-shutdown.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing # | import Prelude hiding (log)
import Control.Concurrent
import Control.Monad
import Data.ByteString.Char8 ()
import Network (PortID(..))
import Network.Socket (Family(..), SocketType(..), PortNumber, SockAddr(..),
defaultProtocol, inet_addr)
import System.IO
import Winsock... |
720f37943f6768a9c11de623cd8a1f365fbf7f4405c9efc1a70ae150b95cc4ce | aeternity/mnesia_rocksdb | mnesia_rocksdb_tuning.erl | -*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
%%----------------------------------------------------------------
Copyright ( c ) 2013 - 2016 Klarna AB
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in... | null | https://raw.githubusercontent.com/aeternity/mnesia_rocksdb/b0bf4b6b9c68b35e37df0fb56a8b5c6417d20e54/src/mnesia_rocksdb_tuning.erl | erlang | ----------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions an... | -*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
Copyright ( c ) 2013 - 2016 Klarna AB
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS ... |
edb599fe7dccb1e4cc8b0acb26cb737af92ff152b889bf7a3cb36ec31c733aea | sebsheep/elm2node | Main.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
module Reporting.Error.Main
( Error(..)
, toReport
)
where
import qualified Data.Name as Name
import qualified AST.Canonical as Can
import qualified Reporting.Annotation as A
import qualified Reporting.Doc as D
import qualified Reporting.Error.Canonica... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Reporting/Error/Main.hs | haskell | # LANGUAGE OverloadedStrings #
ERROR
TO REPORT | # OPTIONS_GHC -Wall #
module Reporting.Error.Main
( Error(..)
, toReport
)
where
import qualified Data.Name as Name
import qualified AST.Canonical as Can
import qualified Reporting.Annotation as A
import qualified Reporting.Doc as D
import qualified Reporting.Error.Canonicalize as E
import qualified Reportin... |
fc068d99279888c7037c4424e8c23b9bdacc5943268f17c9ec1c39c0b0ff54ab | IUCompilerCourse/public-student-support-code | interp-Cvar.rkt | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Lvar.rkt")
(provide interp-Cvar interp-Cvar-mixin)
(define (interp-Cvar-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/public (interp-stmt env)
(lambda (s)
... | null | https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/fe5f4a657f4622eba596454c14bc8f72765004d9/interp-Cvar.rkt | racket | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Lvar.rkt")
(provide interp-Cvar interp-Cvar-mixin)
(define (interp-Cvar-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/public (interp-stmt env)
(lambda (s)
... | |
c5e82ff93195f1d6f7a5d96c93227e046ad62ded922820c85c6b5a7acad4f337 | expipiplus1/vulkan | XR_VALVE_analog_threshold.hs | {-# language CPP #-}
-- | = Name
--
-- XR_VALVE_analog_threshold - instance extension
--
-- = Specification
--
-- See
-- <#XR_VALVE_analog_threshold XR_VALVE_analog_threshold>
-- in the main specification for complete information.
--
-- = Registered Extension Number
--
80
--
-- = Revision
--
1
--
-- = Extension an... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/openxr/src/OpenXR/Extensions/XR_VALVE_analog_threshold.hs | haskell | # language CPP #
| = Name
XR_VALVE_analog_threshold - instance extension
= Specification
See
<#XR_VALVE_analog_threshold XR_VALVE_analog_threshold>
in the main specification for complete information.
= Registered Extension Number
= Revision
= Extension and Version Dependencies
= See Also
= Docum... | 80
1
- Requires OpenXR 1.0
' InteractionProfileAnalogThresholdVALVE '
< #XR_VALVE_analog_threshold OpenXR Specification >
module OpenXR.Extensions.XR_VALVE_analog_threshold ( InteractionProfileAnalogThresholdVALVE(..)
, VALVE_analog_threshold_SPEC_VERSIO... |
cd70e2fba12cd7e8eaa2e7abe533b210d4156ae5e7e3aeb3c95daa9b9a780adf | xapi-project/xen-api-libs | xMLRPC.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/http-svr/xMLRPC.mli | ocaml | * Run time type errors are raised when XML of an unexpected structure is
encountered. This error conveys the expected "type" as a string and the
actual XML encountered.
* An XML-RPC response:
* normal result
* failure/ exception in high-level code
* Marshal a nil value
* Marshal a homogeneous array.
* Mar... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
a91ce1259082429589f0e3d82c2b487d9faf79442a81bcae23bc310d76a977e5 | lspector/gp | even3parity.clj | ( ) 20131115
(ns gp.even3parity)
;; This is a version of evolvefn.clj that was modified to solve a
;; different problem, of determining whether or not number of true
inputs out of three boolean inputs is even . See
;; for more extensive comments on the shared code. The changes made
;; here are:
;;
;; - dif... | null | https://raw.githubusercontent.com/lspector/gp/fcd1c10518380cf8ee7862b80c4516e820c4f097/src/gp/even3parity.clj | clojure | This is a version of evolvefn.clj that was modified to solve a
different problem, of determining whether or not number of true
for more extensive comments on the shared code. The changes made
here are:
- different data
- different error function
- changed genetic operator probabilities and tournament siz... | ( ) 20131115
(ns gp.even3parity)
inputs out of three boolean inputs is even . See
- changed functions and terminals ( note : 3 inputs )
standard GP algorithm .
[[false false false true]
[false false true false]
[false true false false]
[false true true true]
[true false false false]
[t... |
f230c11d7785a935abb286e5943f6524bc8786f5b0defb73a6f153ef2bcfe875 | brendanzab/language-garden | KochIsland.mli | * Quadratic { { : island }
(** Alphabet of symbols for this system *)
type symbol
include FractalGrowth.LSystem.Grammar
with type symbol := symbol
(** @open *)
(** {1 String interpretation} *)
(** Convert a symbol to a string *)
val string_of_symbol : symbol -> string
(** Convert a word to a string *)
val ... | null | https://raw.githubusercontent.com/brendanzab/language-garden/4d9c8b4c7a178f5001c5394bfd188baa72420db2/lang-fractal-growth/examples/KochIsland.mli | ocaml | * Alphabet of symbols for this system
* @open
* {1 String interpretation}
* Convert a symbol to a string
* Convert a word to a string | * Quadratic { { : island }
type symbol
include FractalGrowth.LSystem.Grammar
with type symbol := symbol
val string_of_symbol : symbol -> string
val string_of_word : symbol list -> string
|
362847e3494daa2cb00096c27ee7b8635d6f945ec04542ecfb11c09b2adf230d | dparis/gen-phzr | particles.cljs | (ns phzr.impl.accessors.particles)
(def particles-get-properties
{:emitters "emitters"
:game "game"
:id "ID"})
(def particles-set-properties
{:emitters "emitters"
:game "game"
:id "ID"}) | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/particles.cljs | clojure | (ns phzr.impl.accessors.particles)
(def particles-get-properties
{:emitters "emitters"
:game "game"
:id "ID"})
(def particles-set-properties
{:emitters "emitters"
:game "game"
:id "ID"}) | |
579a7aa6400e690434bd31696bc7c1662073c49ae4636b26ab0d67650405effc | scslab/hails | Frank.hs | # LANGUAGE Trustworthy #
|
Frank is a - inspired DSL ( see < > ) for creating
routes . It is composable with all ' ' types , but is designed to be used
with ' Network . Wai . Controller 's . Each verb ( ' get ' , ' post ' , ' put ' , etc ' ) takes a
URL pattern of the form \"\/dir\/:paramname\/dir\ " ( see... | null | https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/Hails/Web/Frank.hs | haskell | app = SimpleFrank
app=SimpleFrank
| Helper method
| Matches the GET method on the given URL pattern
| Matches the POST method on the given URL pattern
| Matches the DELETE method on the given URL pattern
| Matches the OPTIONS method on the given URL pattern | # LANGUAGE Trustworthy #
|
Frank is a - inspired DSL ( see < > ) for creating
routes . It is composable with all ' ' types , but is designed to be used
with ' Network . Wai . Controller 's . Each verb ( ' get ' , ' post ' , ' put ' , etc ' ) takes a
URL pattern of the form \"\/dir\/:paramname\/dir\ " ( see... |
e0e7f21460e2b25a7f46ae08060ede99f4004735945d6f0cbd60421ba5d08c01 | ucsd-progsys/dsolve | demo_mergesort_bug.ml | let ss = S.elts
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let rec halve xs =
match xs with
| [] -> ([], [])
| x::xs' ->
let (ys, zs) = halve xs' in
(x::zs, ys)
let rec merge xs ys =
match xs, ys with
| [],_ -> ys
| _ ,[] -> xs
| x::xs', y:... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/demo/demo_mergesort_bug.ml | ocaml | BUG: missing case | let ss = S.elts
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let rec halve xs =
match xs with
| [] -> ([], [])
| x::xs' ->
let (ys, zs) = halve xs' in
(x::zs, ys)
let rec merge xs ys =
match xs, ys with
| [],_ -> ys
| _ ,[] -> xs
| x::xs', y:... |
d36e8ff0327a639123492a29d23929093cc69e9f7d5bb9b3171b2bd9b78183dc | lspector/Clojush | args.clj | (ns clojush.args
(:require [clj-random.core :as random])
(:use [clojush globals random util pushstate]
[clojush.instructions.tag]
[clojush.pushgp report]))
(def push-argmap
(atom (sorted-map
;;----------------------------------------
Clojush system arguments
;;--------------... | null | https://raw.githubusercontent.com/lspector/Clojush/8f8c6dcb181e675a3f514e6c9e9fc92cf76ac566/src/clojush/args.clj | clojure | ----------------------------------------
----------------------------------------
The seed for the random number generator.
----------------------------------------
Standard GP arguments
----------------------------------------
Function that takes a program and returns a list of errors.
is <= error-threshold.
Numb... | (ns clojush.args
(:require [clj-random.core :as random])
(:use [clojush globals random util pushstate]
[clojush.instructions.tag]
[clojush.pushgp report]))
(def push-argmap
(atom (sorted-map
Clojush system arguments
:use-single-thread false
When true , Clojush will only use a single... |
e91084582663c33be103a8aec7a60abc9905ca28f91a8f470b3d3ade05ff61ce | avatar29A/hs-aitubots-api | MainSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module MainSpec
( spec
)
where
import Control.Monad.IO.Class
import Test.Hspec
import Data.Aeson
import Data.Text.Encoding
import Data.Either
import Data.Maybe
import qualified Data.ByteString as BS
... | null | https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/test/MainSpec.hs | haskell | # LANGUAGE OverloadedStrings #
debug: show http error if exists |
module MainSpec
( spec
)
where
import Control.Monad.IO.Class
import Test.Hspec
import Data.Aeson
import Data.Text.Encoding
import Data.Either
import Data.Maybe
import qualified Data.ByteString as BS
import qualified Data.UUID.V4 ... |
0f042b765c70004031f2fd1d25e71d8e76358f5ac2e625a87e23baef84ff1245 | objmagic/LR | genf1.ml | * unary number as Gadt list , with two potential return types
type (_, _, _, _) num =
| Z : ('ret, 'ret, 'ret2, 'ret2) num
| C : ('a, 'ret, 'a2, 'ret2) num -> ('b -> 'a, 'ret, 'b -> 'a2, 'ret2) num
(** Postpend Gadt list *)
type (_,_) tuple =
| Zero : ('ret, 'ret) tuple
| Cons : 'b code * ('a, 'b -> 'ret) tupl... | null | https://raw.githubusercontent.com/objmagic/LR/4bfc2ea57a4092f75c627ad6b58067e9822a43f0/genf1.ml | ocaml | * Postpend Gadt list
* apply a function to a (reversed) tuple.
* Shortcut, with the empty tuple as accumulator
* Example | * unary number as Gadt list , with two potential return types
type (_, _, _, _) num =
| Z : ('ret, 'ret, 'ret2, 'ret2) num
| C : ('a, 'ret, 'a2, 'ret2) num -> ('b -> 'a, 'ret, 'b -> 'a2, 'ret2) num
type (_,_) tuple =
| Zero : ('ret, 'ret) tuple
| Cons : 'b code * ('a, 'b -> 'ret) tuple -> ('a, 'ret) tuple
let... |
d5de285b7d2da7e5b3c0e4d040e7ac334096abd9795f5a5462a74c4d71e45f64 | lambe-lang/mitch | simplifier.ml | open Mitch_ir
let is_push =
let open Objcode in
function PUSH _ | LAMBDA _ -> true | _ -> false
let is_replace =
let open Objcode in
function CAR | CDR | LEFT | RIGHT -> true | _ -> false
let rec simplify_sequence =
let open Objcode in
function
| DIG (0, _) :: l -> l
| DIG (1, _) :: l -> SWAP :: l
... | null | https://raw.githubusercontent.com/lambe-lang/mitch/2c47f6627c3a219c31afd078836e9e7be3e26719/lib/mitch/system/s04_simplifier/simplifier.ml | ocaml | open Mitch_ir
let is_push =
let open Objcode in
function PUSH _ | LAMBDA _ -> true | _ -> false
let is_replace =
let open Objcode in
function CAR | CDR | LEFT | RIGHT -> true | _ -> false
let rec simplify_sequence =
let open Objcode in
function
| DIG (0, _) :: l -> l
| DIG (1, _) :: l -> SWAP :: l
... | |
d651a963d70ba4fff9a09202fb95f9ed9c4fa423aaff3c50e2a5d1689ac9f8df | bn-d/ppx_make | test_make_tuple.ml | open Tuple_types
let basic _ = OUnit2.assert_equal (32, 44) (make_b ~v0:32 ~v1:44 ())
let option_ _ =
OUnit2.assert_equal (None, None) (make_o ());
OUnit2.assert_equal (Some 2718, Some 2818) (make_o ~v0:2718 ~v1:2818 ())
let list_ _ =
OUnit2.assert_equal ([], []) (make_l ());
OUnit2.assert_equal
([ 1; 1;... | null | https://raw.githubusercontent.com/bn-d/ppx_make/1c18b0fe700da7eadbcddca8d9eb9b9746a0a47c/test/test_make_tuple.ml | ocaml | open Tuple_types
let basic _ = OUnit2.assert_equal (32, 44) (make_b ~v0:32 ~v1:44 ())
let option_ _ =
OUnit2.assert_equal (None, None) (make_o ());
OUnit2.assert_equal (Some 2718, Some 2818) (make_o ~v0:2718 ~v1:2818 ())
let list_ _ =
OUnit2.assert_equal ([], []) (make_l ());
OUnit2.assert_equal
([ 1; 1;... | |
4e34ba7a97dc5ba5633dbdd0081507038a6722faec1f0ab6a3e12ded09f80af0 | tfausak/patrol | EventTypeSpec.hs | # LANGUAGE QuasiQuotes #
module Patrol.Type.EventTypeSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.EventType as EventType
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.EventType" $ do
Hspec.de... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/EventTypeSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Patrol.Type.EventTypeSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.EventType as EventType
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.EventType" $ do
Hspec.de... | |
e169a646438398f5d03e52f4188f787e0fed8d7db622ecd6a53811d2d0dea31c | FranklinChen/hugs98-plus-Sep2006 | Pos.hs | -----------------------------------------------------------------------------
-- |
Module : Text . ParserCombinators . Parsec . Pos
Copyright : ( c ) 1999 - 2001
-- License : BSD-style (see the file libraries/parsec/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : ... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/parsec/Text/ParserCombinators/Parsec/Pos.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/parsec/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
Textual source positions.
-------------------------------------------------------------------------... | Module : Text . ParserCombinators . Parsec . Pos
Copyright : ( c ) 1999 - 2001
module Text.ParserCombinators.Parsec.Pos
( SourceName, Line, Column
, SourcePos
, sourceLine, sourceColumn, sourceName
, incSourceLi... |
6d33bee8c163e317ba1021a743d926d3cf4c253b8435ea06d323635abc7dfaa5 | robrix/isometry | Main.hs | {-# OPTIONS_GHC -O2 #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
module Isometry.Main
( main
, Lifts
) where
import Control.Algebra
import qualified Control.Carrier.Prof... | null | https://raw.githubusercontent.com/robrix/isometry/28543f998bbd8b1c3eea33db82fd5701c718b906/src/Isometry/Main.hs | haskell | # OPTIONS_GHC -O2 #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TypeOperators #
module Isometry.Main
( main
, Lifts
) where
import Control.Algebra
import qualified Control.Carrier.Profile.Identity as NoProfile
import qualified Control.Carrier.Profile.Tree as Profile
im... |
befb298516c4a104c2dee211d8fc8ca26e687ca7e4dd255890dd12353d7c28e4 | aeternity/aeternity | aecore_admin_cli_SUITE.erl | -module(aecore_admin_cli_SUITE).
%% Test cases for verifying maintenance mode, etc.
%% common_test exports
-export(
[
all/0, groups/0, suite/0,
init_per_suite/1, end_per_suite/1,
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2
]).
%% test case exports
-export(
[ p... | null | https://raw.githubusercontent.com/aeternity/aeternity/59e05a04ea9be29a65f8a2f65f36a9f2f984e1a4/apps/aecore/test/aecore_admin_cli_SUITE.erl | erlang | Test cases for verifying maintenance mode, etc.
common_test exports
test case exports
to be used as a peer
this is important so beneficiary can spend
because of, well, reasons I guess.
ensure it is there:
tokens in their account - this creates the account itself
delete again fails
check the attempts are count... | -module(aecore_admin_cli_SUITE).
-export(
[
all/0, groups/0, suite/0,
init_per_suite/1, end_per_suite/1,
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2
]).
-export(
[ push_tx/1
, inspect_tx/1
, miner_gas_price/1
, peer_lists/1
, invalid_peers/1
, b... |
4aa66fda89b6d232d623848f95ee443c77b6c0ffa42155b63898a27fed7ccb2d | weavejester/flupot | core.cljs | (ns flupot.core)
(defn push-child! [args child]
(if (seq? child)
(doseq [c child]
(push-child! args c))
(.push args child)))
| null | https://raw.githubusercontent.com/weavejester/flupot/59f96a563436589d1f41fe74192bbbb0f1d25a5e/src/flupot/core.cljs | clojure | (ns flupot.core)
(defn push-child! [args child]
(if (seq? child)
(doseq [c child]
(push-child! args c))
(.push args child)))
| |
d4efcb3308339cab09c45ce209aafa4e5fefd56b4dafab9a0e935c1f7d0c6a6e | kafka4beam/wolff | wolff_app.erl | Copyright ( c ) 2018 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agr... | null | https://raw.githubusercontent.com/kafka4beam/wolff/aa07ce58c0fba9d19904d8d715a9f383cc61677d/src/wolff_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2018 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wolff_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_, _) ->
wolff_sup:... |
2e73ea4094180f2cebb14b17521773bb309c7a6aac55bffef4e2f93d69afdab8 | flupe/achille | Task.hs | # LANGUAGE ViewPatterns , OverloadedStrings , PatternSynonyms #
module Achille.Task
( module Achille.Core.Task
, pattern (:*:)
, toURL
, log
, debug
, write
, copy
, (-<.>)
, readText
, -- * Operations over lists
--
-- $lists
map
, reverse
, sort
, sortOn
, take
, drop
, --... | null | https://raw.githubusercontent.com/flupe/achille/a1eb76f765a204f5f8cfb3c0661d90920351c8b5/achille/Achille/Task.hs | haskell | * Operations over lists
$lists
* Operations over maps
$maps
| Pattern for destructuring and constructing /tuples/ of tasks.
> {-# LANGUAGE QualifiedDo #-}
>
>
> rules = A.do
> x :*: y <- doStuff
$lists
Usual operations on lists, lifted to tasks returning lists.
Each of them was implemented so that in... | # LANGUAGE ViewPatterns , OverloadedStrings , PatternSynonyms #
module Achille.Task
( module Achille.Core.Task
, pattern (:*:)
, toURL
, log
, debug
, write
, copy
, (-<.>)
, readText
map
, reverse
, sort
, sortOn
, take
, drop
(!)
) where
import Prelude
hiding (log, fst, snd,... |
f1655d48c631307471e3e7f4fc72a502abcd007b89e168772d06ddcd759864d5 | clj-jgit/clj-jgit | internal.clj | (ns clj-jgit.internal
(:import
(clojure.lang Sequential)
(org.eclipse.jgit.api Git)
(org.eclipse.jgit.lib ObjectId ObjectIdRef Repository RefDatabase)
(org.eclipse.jgit.transport RefSpec)
(org.eclipse.jgit.revwalk RevWalk RevCommit)
(org.eclipse.jgit.treewalk TreeWalk)))
(defn ref-spec ^RefSp... | null | https://raw.githubusercontent.com/clj-jgit/clj-jgit/fe159662f34e738c083fb7f73a86eaecf5f8ceac/src/clj_jgit/internal.clj | clojure | (ns clj-jgit.internal
(:import
(clojure.lang Sequential)
(org.eclipse.jgit.api Git)
(org.eclipse.jgit.lib ObjectId ObjectIdRef Repository RefDatabase)
(org.eclipse.jgit.transport RefSpec)
(org.eclipse.jgit.revwalk RevWalk RevCommit)
(org.eclipse.jgit.treewalk TreeWalk)))
(defn ref-spec ^RefSp... | |
86f09c501c92e154d9ff955d20903b4f139fbfbcb6f310a2996f0cddc5eda905 | mhkoji/Senn | language-model.lisp | (defpackage :hachee.language-model
(:use :cl)
(:export :sentence
:sentence-tokens
:make-sentence))
(in-package :hachee.language-model)
(defstruct sentence tokens)
| null | https://raw.githubusercontent.com/mhkoji/Senn/9b07785038c95f4a5165a515c99901160bf48498/hachee/src/language-model/language-model.lisp | lisp | (defpackage :hachee.language-model
(:use :cl)
(:export :sentence
:sentence-tokens
:make-sentence))
(in-package :hachee.language-model)
(defstruct sentence tokens)
| |
819826604012b1292495d322133c2da594dd4d8205048c3a2f9b1904dce393ed | GU-CLASP/TypedFlow | Seq2Seq.hs | # LANGUAGE AllowAmbiguousTypes #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UnicodeSyntax #
module Main where
import TypedFl... | null | https://raw.githubusercontent.com/GU-CLASP/TypedFlow/f044193ce2688a3445da0c9d12baf7fc0f18f573/examples/seq2seq/Seq2Seq.hs | haskell | # LANGUAGE RankNTypes #
length
^ length
todo: consider a larger size for the output string
note: for an intra-language translation the embeddings can be shared easily.
NOTE: attention on the left-part of the input.
>>> main
embs: T [15,15] tf.float32
encembs: T [15,15] tf.float32
Local Variables:
dante-repl-c... | # LANGUAGE AllowAmbiguousTypes #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UnicodeSyntax #
module Main where
import TypedFlow
import TypedFlow.Python
... |
057698a7d4f785a0a1da82dd5754a665fe87e1d8205ef0e3c63890bfacb90230 | haskell-github/github | ShowPublicOrganization.hs | module ShowPublicOrganization where
import qualified Github.Organizations as Github
main = do
possibleOrganization <- Github.publicOrganization "thoughtbot"
case possibleOrganization of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right organization) ->
putStrLn $ formatOrganizati... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Organizations/ShowPublicOrganization.hs | haskell | module ShowPublicOrganization where
import qualified Github.Organizations as Github
main = do
possibleOrganization <- Github.publicOrganization "thoughtbot"
case possibleOrganization of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right organization) ->
putStrLn $ formatOrganizati... | |
31225662c97b7e4bdd03c746073934c1c85763683831844da79d4ea3d1ca8cc7 | plundering/plunder-reference | Logging.hs | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -Werror #
module Server.Types.Logging where
import PlunderPrelude
import Numeric.Natural (Natural)
import Plun (Fan)
import Servant (FromHttpApiData, ToHttpApiData)
import qualified Data.Aeson as A
-----------------------------------------------------------... | null | https://raw.githubusercontent.com/plundering/plunder-reference/4cac3717ed5baf7b0b5fd41837a504f6fd33eab2/lib/Server/Types/Logging.hs | haskell | ------------------------------------------------------------------------------
| A machine, a set of related processes, are given a human readable name.
| A positional index into the machine's Request vector.
| Receipt of a normal Eval that completed successfully. Since everything
is deterministic, the eval can jus... | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -Werror #
module Server.Types.Logging where
import PlunderPrelude
import Numeric.Natural (Natural)
import Plun (Fan)
import Servant (FromHttpApiData, ToHttpApiData)
import qualified Data.Aeson as A
newtype CogName = COG_NAME { txt :: Text }
deriving newt... |
59f075e6f9954a092cd127b5e4e3fed52a39255cde0ce8882fa05122a3d53087 | SonarQubeCommunity/sonar-erlang | complexity.erl | -module(statements).
sayHello(A) -> %+1 complexity (function clause)
lists:foreach(fun(Name) -> call(Name, stop) end, %+0 complexity fun expression --> do we need it?
checkpoints()),
Name = Cp#checkpoint_args.name,
if
LocalWriter == true -> %+1 complexity branch expression
{ok, node()}... | null | https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/erlang-squid/src/test/resources/metrics/complexity.erl | erlang | +1 complexity (function clause)
+0 complexity fun expression --> do we need it?
+1 complexity branch expression
+1 complexity branch expression
+1 complexity pattern statement
+1 complexity pattern statement
+1 complexity pattern statement
+1 complexity pattern statement
+1 complexity pattern statement
+1 complexity ca... | -module(statements).
checkpoints()),
Name = Cp#checkpoint_args.name,
if
{ok, node()};
{ok, hd(Writers)}
end,
case R#retainer.really_retain of
PendingTab = Cp#checkpoint_args.pending_tab,
case catch ?ets_lookup_element(PendingTab, Tid, 1) of
Store = R#retainer.store ... |
f80f6006ea9c7e9b7a2b062cdbc7f03ffae086630e631049656fc8dbedbcfcc7 | dterei/hackager | Parallel.hs | -- | Tools for running hackager on many cores.
module Parallel (
Child, forkChild, waitForChildren,
) where
import Control.Concurrent
import Control.Monad.State
import Control.Exception
import HackageMonad
-- | Children process signal
type Child = MVar ()
| Fork a child and return an MVar that signals... | null | https://raw.githubusercontent.com/dterei/hackager/89ae5d4e2dd88f003b0e5e90db7db6d8a57e4b55/src/Parallel.hs | haskell | | Tools for running hackager on many cores.
| Children process signal
| Wait on a list of children to finish processing | module Parallel (
Child, forkChild, waitForChildren,
) where
import Control.Concurrent
import Control.Monad.State
import Control.Exception
import HackageMonad
type Child = MVar ()
| Fork a child and return an MVar that signals when the child is done .
forkChild :: Hkg () -> Hkg Child
forkChild hkg = d... |
871ae0393259f09508f411f3821ce934ee745bd9ae536c5d7688ca1727e6a060 | tallaproject/talla | talla_dir_app.erl | %%%
Copyright ( c ) 2016 The Talla Authors . All rights reserved .
%%% Use of this source code is governed by a BSD-style
%%% license that can be found in the LICENSE file.
%%%
%%% -----------------------------------------------------------
@author < >
@doc The Talla Directory Application .
%%% @end
%%% ------... | null | https://raw.githubusercontent.com/tallaproject/talla/72cfbd8f48705a7a390cac2b8310ab7550c21c15/apps/talla_dir/src/talla_dir_app.erl | erlang |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-----------------------------------------------------------
@end
-----------------------------------------------------------
API.
Internal API. | Copyright ( c ) 2016 The Talla Authors . All rights reserved .
@author < >
@doc The Talla Directory Application .
-module(talla_dir_app).
-behaviour(application).
-export([start/2, stop/1]).
-export([start_dir_cache/0]).
-spec start(normal | {takeover, node()} | {failover, node()}, term()) -> {ok, pid()} | ... |
98689ff34de2318b3d77833a01984c948019694078e21dd586f742bbb5c7fc6a | waddlaw/TAPL | Ex22_5_7.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Language.Recon.Exercise.Ex22_5_7
( runTypingC,
example1,
example2,
example3,
)
where
import RIO
import qualified RIO.List as List
import qualified RIO.Text... | null | https://raw.githubusercontent.com/waddlaw/TAPL/94576e46821aaf7abce6d1d828fc3ce6d05a40b8/subs/recon/src/Language/Recon/Exercise/Ex22_5_7.hs | haskell | # LANGUAGE OverloadedStrings #
utils
>>> runTypingC example1
>>> runTypingC example2
TyArr
( TyArr
)
>>> runTypingC example3
TyArr ( TyArr TyBool TyBool ) TyBool | # LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Language.Recon.Exercise.Ex22_5_7
( runTypingC,
example1,
example2,
example3,
)
where
import RIO
import qualified RIO.List as List
import qualified RIO.Text as Text
data Ty
= TyBool
| Ty... |
63956d0fb9a3967248c5730e55b6bec1a9a73c50d1a9a0de94ce382e984d831d | Johni0702/guile-language-server | formatter.scm | Copyright ( C ) 2018 < >
;;;;
;;;; 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 later version.
;;;;
;;;; This program is dis... | null | https://raw.githubusercontent.com/Johni0702/guile-language-server/db134354e20720f1c198e213b340e90dcec710e0/language-server/guile/formatter.scm | scheme |
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... | Copyright ( C ) 2018 < >
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
(define-module (language-server guile formatter)
#:use-module (language-server... |
43baed292c6d4bc7566d7a128c18f30adc0a68e0eecca171b14e86b57d546b25 | appleshan/cl-http | netscape-3-0.lisp | -*- Mode : lisp ; Package : netscape3.0 ; BASE : 10 ; Syntax : ansi - common - lisp ; Default - Character - Style : ( : FIX : ROMAN : NORMAL);-*-
;;;
( c ) Copyright 1996 - 97 ,
;;; All Rights Reserved.
;;;
;;;-------------------------------------------------------------------
;;;
INTERFACE FOR AUTHO... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/server/netscape-3-0.lisp | lisp | Package : netscape3.0 ; BASE : 10 ; Syntax : ansi - common - lisp ; Default - Character - Style : ( : FIX : ROMAN : NORMAL);-*-
All Rights Reserved.
-------------------------------------------------------------------
from -3.0b5Gold.html#Layout
Items not implemented
* JavaScript evaluation for HTML attr... |
( c ) Copyright 1996 - 97 ,
INTERFACE FOR AUTHORING HTML USING NETSCAPE 3.0 EXTENSIONS
Implemented 7/13/96 -- JCMa .
(eval-when (load eval compile)
(let ((html-pkg (find-package :ns2.0))
(netscape-pkg (find-package :netscape3.0)))
(do-external-symbols (sym html-pkg)
(in-package :netscape... |
bfa865ee781141c225efb1cc903ad172b7696d00a31762d5d17cd052f8b4f7d1 | ozusrl/SubtypedQuotedML | syntax.ml | (*********************************************************************************************************************)
(* *)
... | null | https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/gromit/syntax.ml | ocaml | *******************************************************************************************************************
... |
, projet Cristal , INRIA Rocquencourt
Copyright 2000 Institut National de Recherche en Informatique et Automatique . Distributed only by per... |
34a8e2e90c9fa967379ac064a1d41e6f65ddc351cdf11d39e1c135bcd502c9e4 | mirage/alcotest | simple.ml |
This is free and unencumbered software released into the public domain .
Anyone is free to copy , modify , publish , use , compile , sell , or
distribute this software , either in source code form or as a compiled
binary , for any purpose , commercial or non - commercial , and by any
means .
In jurisdicti... | null | https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/examples/simple.ml | ocaml | A module with functions to test
The tests
Run it |
This is free and unencumbered software released into the public domain .
Anyone is free to copy , modify , publish , use , compile , sell , or
distribute this software , either in source code form or as a compiled
binary , for any purpose , commercial or non - commercial , and by any
means .
In jurisdicti... |
d840d694607cdb0383ad80bb03d9172e789a0f742ea56213b50b1e048cfa08eb | hurryabit/pukeko | BackEnd.hs | module Pukeko.BackEnd
( NASM
, run
) where
import Pukeko.Prelude hiding (run)
import qualified Pukeko.AST.NoLambda as Lambda
import qualified Pukeko.BackEnd.Compiler as Compiler
import qualified Pukeko.BackEnd.NASM as NASM
import qualified Pukeko.BackEnd.PeepHole as PeepHole
type NASM = String
run :: ... | null | https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Pukeko/BackEnd.hs | haskell | module Pukeko.BackEnd
( NASM
, run
) where
import Pukeko.Prelude hiding (run)
import qualified Pukeko.AST.NoLambda as Lambda
import qualified Pukeko.BackEnd.Compiler as Compiler
import qualified Pukeko.BackEnd.NASM as NASM
import qualified Pukeko.BackEnd.PeepHole as PeepHole
type NASM = String
run :: ... | |
af31d32d8761b9fdf68d771d21261b19b3fd3980e30f894cd51b6b81dbfa06f2 | eschulte/graph | matrix.lisp | ;;; graph-matrix.lisp --- build and manipulate matrix graph representations
Copyright ( C ) and 2013
;; Licensed under the Gnu Public License Version 3 or later
;;; Commentary
;; Functions for manipulating matrix graph representations.
;;; Code:
(defpackage #:graph/matrix
(:use :common-lisp
:alexan... | null | https://raw.githubusercontent.com/eschulte/graph/560abaa89cd916941e7569c4de0919e9248de591/matrix.lisp | lisp | graph-matrix.lisp --- build and manipulate matrix graph representations
Licensed under the Gnu Public License Version 3 or later
Commentary
Functions for manipulating matrix graph representations.
Code:
(loop :for i :from 0 :below rows :do
(loop :for j :from 0 :below cols :do
Adapted from
-exponentiation_op... |
Copyright ( C ) and 2013
(defpackage #:graph/matrix
(:use :common-lisp
:alexandria
:metabang-bind
:named-readtables
:curry-compose-reader-macros
:graph
:fl.matlisp)
shadow functions defined in alexandria , fl.matlisp , and graph
(:shadow :copy :factorial ... |
3b479029475bf7cb21939c21f94be45c20b18b3365ece7606ceaf9dcd1db47da | binsec/binsec | bbsse_types.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/bbsse/bbsse_types.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
582267a3ba8ed281b4dd6a101399f6f1b3174dffeb73c12a381fb0e5ba271c24 | lwhjp/rince | parse.rkt | #lang racket/base
(require (for-syntax racket/base)
(for-template (only-in "syntax.rkt" make-→))
racket/match
racket/string
racket/stxparam
racket/syntax
racket/trace
c/ast
c/parse
"cpp.rkt")
(provide c->racket)
(define DEBUG #f)
; TOD... | null | https://raw.githubusercontent.com/lwhjp/rince/b98d15fb8ba9c983c8930b36aba5619d94beadb9/lang/parse.rkt | racket | TODO: preprocessor directives (need to hack it until c-utils supports them)
Identifiers
Expressions
TODO: qualifiers
TODO: multi-char constants
TODO: compound
Statements
TODO: case, default
TODO: switch
Declarations
TODO: typedef
TODO: struct declarations can appear in other places too; we'll
probably need... | #lang racket/base
(require (for-syntax racket/base)
(for-template (only-in "syntax.rkt" make-→))
racket/match
racket/string
racket/stxparam
racket/syntax
racket/trace
c/ast
c/parse
"cpp.rkt")
(provide c->racket)
(define DEBUG #f)
(defi... |
3adc1afd8d02117ba5621746986611c2e9400dafbd4488f88014c835beedf236 | noinia/hgeometry | ICanvas.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TupleSections #
module Geometry.Web.ICanvas(
module Geometry.Web.StaticCanvas
, ICanvas(ICanvas), blankCanvas
, canvas, mousePosition, panStatus
, mouseCoordinates
, capabilities
, hasCapabilit... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-web/src/Geometry/Web/ICanvas.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
------------------------------------------------------------------------------
* Model
^ point from which we are panning
^ center point of the viewport at that time
^ point where we started panning from
| Createas an interactive lbank ... | # LANGUAGE TupleSections #
module Geometry.Web.ICanvas(
module Geometry.Web.StaticCanvas
, ICanvas(ICanvas), blankCanvas
, canvas, mousePosition, panStatus
, mouseCoordinates
, capabilities
, hasCapability
, CanvasAction(..)
, update
, view
, iCanvasSubs
, Capability(..)
) whe... |
63e1bd054b5e0cf85b2ee68e753e85d760b27d62f5ccb45f6d761c00a9edbe34 | ankushdas/Nomos | ErrorMsg.ml | module F = NomosFlags
(* Initial values of compiler state variables *)
let anyErrors = ref false;;
let reset () = ( anyErrors := false );;
type error_cat =
Lex
| Parse
| Type
| Link
| Pragma
| Runtime
| GasAcct
| File;;
let err_string cat = match cat with
Lex -> "lex"
| Parse -> "parse"
| ... | null | https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/nomos/nomos-lib/ErrorMsg.ml | ocaml | Initial values of compiler state variables
Print the given error message and then abort compilation | module F = NomosFlags
let anyErrors = ref false;;
let reset () = ( anyErrors := false );;
type error_cat =
Lex
| Parse
| Type
| Link
| Pragma
| Runtime
| GasAcct
| File;;
let err_string cat = match cat with
Lex -> "lex"
| Parse -> "parse"
| Type -> "type"
| Link -> "link"
| Pragma -> "... |
7f13b3440add7b5a1b78481763efef3b31f8d6bb6f68bd2fbe351e0f8511f227 | haskell/cabal | Message.hs | {-# LANGUAGE BangPatterns #-}
module Distribution.Solver.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Data.Map (Map)
import qualified Data.Map as M
import Data.Set (Set)
import qualified Data.Set as S
import Data.Maybe (catMaybes, mapMaybe)
import Prelude hiding... | null | https://raw.githubusercontent.com/haskell/cabal/00a2351789a460700a2567eb5ecc42cca0af913f/cabal-install/cabal-install-solver/src/Distribution/Solver/Modular/Message.hs | haskell | # LANGUAGE BangPatterns #
^ increase indentation level
^ decrease indentation level
| Transforms the structured message type to actual messages (strings).
The log contains level numbers, which are useful for any trace that involves
backtracking, because only the level numbers will allow to keep track of
'go' inc... |
module Distribution.Solver.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Data.Map (Map)
import qualified Data.Map as M
import Data.Set (Set)
import qualified Data.Set as S
import Data.Maybe (catMaybes, mapMaybe)
import Prelude hiding (pi)
from Cabal
import qu... |
a157a3d6a692f4879485cf0f246a953a7f81c2b4825e9d0c8d4351099b73c3c6 | haskell-webgear/webgear | Request.hs | {- |
Requests processed by handlers.
-}
module WebGear.Core.Request (
-- * WebGear Request
Request (..),
remoteHost,
httpVersion,
isSecure,
requestMethod,
pathInfo,
queryString,
requestHeader,
requestHeaders,
requestBodyLength,
getRequestBodyChunk,
) where
import Data.ByteString (ByteString)
i... | null | https://raw.githubusercontent.com/haskell-webgear/webgear/60e5547f9450aac36727e8d9980e0a8cbdb69660/webgear-core/src/WebGear/Core/Request.hs | haskell | |
Requests processed by handlers.
* WebGear Request
| A request processed by a handler
| Get the value of a request header
| See 'Wai.getRequestBodyChunk'
| See 'Wai.httpVersion'
| See 'Wai.isSecure'
| See 'Wai.pathInfo'
| See 'Wai.queryString'
| See 'Wai.remoteHost'
| See 'Wai.requestBodyLength'
| See 'W... | module WebGear.Core.Request (
Request (..),
remoteHost,
httpVersion,
isSecure,
requestMethod,
pathInfo,
queryString,
requestHeader,
requestHeaders,
requestBodyLength,
getRequestBodyChunk,
) where
import Data.ByteString (ByteString)
import Data.List (find)
import Data.Text (Text)
import qualified ... |
686eb84913dee11386e5861bf780bd617d61ca27234c074a36eaa4cf741216cf | votinginfoproject/data-processor | spatial_boundary_test.clj | (ns vip.data-processor.validation.v6.spatial-boundary-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :as xml]
[vip.data-processor.test-helpers :refer ... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v6/spatial_boundary_test.clj | clojure | Don't flag SpatialBoundary with empty ExternalGeospatialFeature
Don't flag SpatialBoundary valid ExternalGeospatialFeature | (ns vip.data-processor.validation.v6.spatial-boundary-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :as xml]
[vip.data-processor.test-helpers :refer ... |
f8d89805937958251ccd5bbd064fedbf8203ecb6a0f1b7aca454520faa3f2df3 | charlieg/Sparser | ops-loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993,1994 -- all rights reserved
;;;
;;; File: "ops-loader"
;;; Module: "objects;traces:"
Version : January 1994
initiated 9/13/92 v2.3 , broken out as own load file 8/18/93
;; 1/13/94 added [online hook]
(in-pack... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/traces/ops-loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "ops-loader"
Module: "objects;traces:"
1/13/94 added [online hook]
loaded in drivers segment of master-loader after the init-drivers
and source drivers | copyright ( c ) 1993,1994 -- all rights reserved
Version : January 1994
initiated 9/13/92 v2.3 , broken out as own load file 8/18/93
(in-package :sparser)
(lload "traces;trace function")
(lload "traces;globals")
( " hook " )
|
6d39be3301e769fac575093066c289dbdc379576a41609290d2f7fc278f14fea | melisgl/try | test-count.lisp | (in-package :try-test)
(deftest test-try/count ()
(test-count/all)
(test-count/replay)
(test-count/replay/categories-and-count))
(deftest test-count/all ()
(let ((*count* t))
(check-try-output ((named-lambda-test t0 ()
(with-test (t1)
(is t))))
... | null | https://raw.githubusercontent.com/melisgl/try/a37c61f8b81d4bdf38f559bca54eef3868bb87a1/test/test-count.lisp | lisp | (in-package :try-test)
(deftest test-try/count ()
(test-count/all)
(test-count/replay)
(test-count/replay/categories-and-count))
(deftest test-count/all ()
(let ((*count* t))
(check-try-output ((named-lambda-test t0 ()
(with-test (t1)
(is t))))
... | |
c922cff96d9b2c8c0b4141e1d0b554c346fe2379f8ffe2cf4af631acea4955f3 | funcool/promesa | util.cljc | (ns promesa.tests.util
(:require
[clojure.test :as t]
[promesa.core :as p]
[promesa.exec :as e]
#?(:cljs [cljs.reader :refer [read-string]])))
(defn promise-ok
[sleep value]
(p/create (fn [resolve reject]
(e/schedule! sleep #(resolve value)))))
(defn promise-ko
[sleep value]
(p/cr... | null | https://raw.githubusercontent.com/funcool/promesa/08a4e14b73cd6df8a8b5e2472d57561fd8636016/test/promesa/tests/util.cljc | clojure | (ns promesa.tests.util
(:require
[clojure.test :as t]
[promesa.core :as p]
[promesa.exec :as e]
#?(:cljs [cljs.reader :refer [read-string]])))
(defn promise-ok
[sleep value]
(p/create (fn [resolve reject]
(e/schedule! sleep #(resolve value)))))
(defn promise-ko
[sleep value]
(p/cr... | |
3633e4dfab8031551e99b7129e0268abffb7c123155b9327930bd2d24ad6a117 | fuchsto/drool | Main.hs | -----------------------------------------------------------------------------
--
-- Module : Main
-- Copyright :
-- License : GPL v3
--
Maintainer :
-- Stability : unstable
-- Portability : Win32, POSIX
--
-- |
--
-----------------------------------------------------------------------------
{-... | null | https://raw.githubusercontent.com/fuchsto/drool/d9318c641a6a94a8450b5118db7b3213a93209ea/src/Drool/Main.hs | haskell | ---------------------------------------------------------------------------
Module : Main
Copyright :
License : GPL v3
Stability : unstable
Portability : Win32, POSIX
|
---------------------------------------------------------------------------
# OPTIONS -O2 -Wall #
Hell yeah
Load a concret... | Maintainer :
module Main where
import Debug.Trace
import Data.IORef
import Data.Array.IO
import Graphics.Rendering.OpenGL ( ( $=!), GLfloat )
import qualified Graphics.UI.Gtk as Gtk
import qualified Graphics.UI.Gtk.Builder as GtkBuilder
import qualified Drool.Types as DT
import qualified Drool.Utils.SigG... |
520abcfa1cec7c093f35cc25444b60f41b1d89c1a37e4e22e047b74052d374d2 | kyleburton/sandbox | quartz.clj | (ns com.github.kyleburton.sandbox.quartz
(:import (org.quartz SchedulerFactory Scheduler TriggerUtils JobDetail SimpleTrigger)
(org.quartz.impl StdSchedulerFactory)
(com.github.kyleburton.sandbox.quartz ClojureJob)))
goals with my evaluation of Quartz are :
;;
;; * create a simple example of... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/clojure-utils/kburton-clojure-utils/src/main/clj/com/github/kyleburton/sandbox/quartz.clj | clojure |
* create a simple example of creating and scheduling
an in-process job (print the current time?)
* make a 'clojure' job?
* examples of all of the scheduling approaches
* exampls of using persistence for registered jobs
down during the schedule time - how does it deal
with this, does it re-execute pend... | (ns com.github.kyleburton.sandbox.quartz
(:import (org.quartz SchedulerFactory Scheduler TriggerUtils JobDetail SimpleTrigger)
(org.quartz.impl StdSchedulerFactory)
(com.github.kyleburton.sandbox.quartz ClojureJob)))
goals with my evaluation of Quartz are :
* ' in 10 minutes '
* repe... |
c9eeb90d39b2cd6919a25a6f47a34b8b2bf7e24a923243ef3cc456e863d4627c | mkremins/flense | clipboard.cljs | (ns flense.actions.clipboard
(:require [flense.model :as model]
[xyzzy.core :as z]))
(defn copy [loc]
(assoc loc :clipboard (z/node loc)))
(defn cut [loc]
(-> loc copy (z/replace model/placeholder)))
(defn paste [loc]
(when (model/placeholder? loc)
(z/replace loc (:clipboard loc))))
| null | https://raw.githubusercontent.com/mkremins/flense/e3fc84c7878583de1100959951e9d2611ea7339e/src/flense/actions/clipboard.cljs | clojure | (ns flense.actions.clipboard
(:require [flense.model :as model]
[xyzzy.core :as z]))
(defn copy [loc]
(assoc loc :clipboard (z/node loc)))
(defn cut [loc]
(-> loc copy (z/replace model/placeholder)))
(defn paste [loc]
(when (model/placeholder? loc)
(z/replace loc (:clipboard loc))))
| |
62b4b6e92eddc961cc308542dfe8920b716ba5c6e4cc3585cad5af7b7600f3a6 | dongcarl/guix | cook.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2018 < >
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the F... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/cook.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2018 < >
Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages cook)
#:use-module (guix pack... |
68862f76ae5489c01c58532a927e5e21cca1dba052fc53ec327456a5890e3af0 | Daniel-Diaz/processing | Types.hs |
-- | Collection of types (@Proc_*@ types and others), and
-- some functions on these types as well.
module Graphics.Web.Processing.Core.Types (
-- * Processing Script
ProcScript (..)
, emptyScript
-- ** Script rendering
, renderScript
, renderFile
-- ** Processing Code
, ProcCode
-- * Contexts
... | null | https://raw.githubusercontent.com/Daniel-Diaz/processing/f7e6661e533abf7a8d47abd273b0a8ab61eb47ad/Graphics/Web/Processing/Core/Types.hs | haskell | | Collection of types (@Proc_*@ types and others), and
some functions on these types as well.
* Processing Script
** Script rendering
** Processing Code
* Contexts
* @Proc_*@ types
** Int
** Float
** Text
** Image
* Processing classes
* Conditional values
| Render a script as a lazy 'Text'.
| Render a ... |
module Graphics.Web.Processing.Core.Types (
ProcScript (..)
, emptyScript
, renderScript
, renderFile
, ProcCode
, Preamble (..)
, Setup (..)
, Draw (..)
, MouseClicked (..)
, MouseReleased (..)
, KeyPressed (..)
, ProcType
* *
, Proc_Bool, true, false
, fromBool
, pnot, (#||), (#&&)... |
d9977e01f8f7de486b0daabff6bd6574c622690fc985a9e5f4d0403e601bd268 | synduce/Synduce | int_nat_twosum.ml | First representation of integers : positive or negative natural numbers .
type nat = Z | S of nat
type inat = P of nat | N of nat
type two_inats = TwoInats of inat * inat
Reference function : sum two inats .
let rec two_isum = function TwoInats (n1, n2) -> ival n1 + ival n2
and ival = function N n -> -(nval n ... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/numbers/int_nat_twosum.ml | ocaml | First representation of integers : positive or negative natural numbers .
type nat = Z | S of nat
type inat = P of nat | N of nat
type two_inats = TwoInats of inat * inat
Reference function : sum two inats .
let rec two_isum = function TwoInats (n1, n2) -> ival n1 + ival n2
and ival = function N n -> -(nval n ... | |
49a276bbd0a0e77782f32325880f0ba0b2a29369e8b8890bb56b2dcb59bdb7d3 | markbastian/partsbin | alpha.clj | (ns partsbin.jdbc.pool.c3p0.alpha
"Note - alpha namespace is subject to change."
(:require [integrant.core :as ig]
[jdbc.pool.c3p0 :as pool]
[taoensso.timbre :as timbre])
(:import (java.io Closeable)))
(defmethod ig/init-key ::datasource [_ opts]
(timbre/debug "Launching c3p0 connection... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/jdbc/pool/c3p0/alpha.clj | clojure | (ns partsbin.jdbc.pool.c3p0.alpha
"Note - alpha namespace is subject to change."
(:require [integrant.core :as ig]
[jdbc.pool.c3p0 :as pool]
[taoensso.timbre :as timbre])
(:import (java.io Closeable)))
(defmethod ig/init-key ::datasource [_ opts]
(timbre/debug "Launching c3p0 connection... | |
03db834475feb0903a38680d71665c1500822175fa262b78aa422855c64ee173 | serokell/haskell-crypto | Sign.hs | SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : MPL-2.0
# OPTIONS_HADDOCK not - home #
-- ! This module merely re-exports definitions from the corresponding
! module in NaCl and alters the to make it more specific
-- ! to crypto-sodium. So, the docs should be kept more-or-less in sync.
-- | ... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/27e67c4b54ac388cb5ab504ddaf7bbf5ab8df2ae/crypto-sodium/lib/Crypto/Sodium/Sign.hs | haskell |
! This module merely re-exports definitions from the corresponding
! to crypto-sodium. So, the docs should be kept more-or-less in sync.
| Public-key signatures.
It is best to import this module qualified:
@
import qualified Crypto.Sodium.Sign as Sign
signed = Sign.'create' sk message
verified = Sign.'open'... | SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : MPL-2.0
# OPTIONS_HADDOCK not - home #
! module in NaCl and alters the to make it more specific
module Crypto.Sodium.Sign
(
PublicKey
, toPublicKey
, SecretKey
, toSecretKey
, keypair
, Seed
, keypairFromSeed
, unsafeKeypairFr... |
99c961a37921db85931387b14f69ba8e7d29324f2fc03ead9dd7cd29e97b8b58 | HunterYIboHu/htdp2-solution | ex69-ballf.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex69-ballf) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/ex69-ballf.rkt | racket | about the language level of this file in a form that our tools can easily process.
struct constant
physics constants
问题在于其语义化程度低,虽然存储的内容与ball相同,但是不能直观地通过
实例的创建来理解每个参数的意义和作用
良好的语义,使得阅读者迅速理解:前两个参数是位置坐标,后两个参数
是向量坐标 | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex69-ballf) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t none #... |
81b75df54d8e479179ba31dc03257cc40bb7c3c66777d0047b79692bf8782832 | rtoy/cmucl | pred.lisp | ;;; -*- Package: MIPS -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/compiler/mips/pred.lisp $")
;;;
;;; *... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/mips/pred.lisp | lisp | -*- Package: MIPS -*-
**********************************************************************
**********************************************************************
The unconditional branch, emitted when we can't drop through to the desired
destination. Dest is the continuation we transfer control to.
Co... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/compiler/mips/pred.lisp $")
This file contains the VM definition of predicate VOPs for the MIPS .
Written by
Converted by .
(in-pack... |
e7a08b9b8ab78283b942c2424e44d41c1f33989a4937db857de1d1d5a7367d18 | ucsd-progsys/dsolve | warnings.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
Pierre Weis... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/utils/warnings.mli | ocaml | *********************************************************************
Objective Caml
... | Pierre Weis & & Damien Doligez , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : warnings.mli , v 1... |
c239033f449ba1a1e8303661927c08a433a04aea456bd05a471677f0f80a57f2 | exercism/babashka | project.clj | (defproject hamming "0.1.0-SNAPSHOT"
:description "hamming exercise."
:url ""
:dependencies [[org.clojure/clojure "1.10.0"]])
| null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/hamming/project.clj | clojure | (defproject hamming "0.1.0-SNAPSHOT"
:description "hamming exercise."
:url ""
:dependencies [[org.clojure/clojure "1.10.0"]])
| |
35667067bc5fa01b4e57362304d0bb3d6ea69a072bb67693491bb7811eaa3680 | baskeboler/cljs-karaoke-client | config.cljs | (ns cljs-karaoke.router.config
(:require [bidi.bidi :as bidi]
[pushy.core :as pushy]))
| null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/router/config.cljs | clojure | (ns cljs-karaoke.router.config
(:require [bidi.bidi :as bidi]
[pushy.core :as pushy]))
| |
765f9a821d427751d6910cf5a002cfa3e058072e013bcfac8c539e529cb1ace6 | acorrenson/modulus | enumerate.ml | open Lstream
open Logic
open Checker
let rec peek_n (n : int) (l : 'a t) : 'a t =
lazy begin
match n, Lazy.force l with
| 0, _ -> Nil
| _, Cons (x, xs) -> Cons (x, peek_n (n - 1) xs)
| _, Nil -> Nil
end
let pos_int_seq =
let rec from x = Cons (x, lazy (from (x + 1)))
in lazy (from 0)
let neg... | null | https://raw.githubusercontent.com/acorrenson/modulus/83fa4a863deecc9e806c97f26ed525746703ee64/src/solver/enumerate.ml | ocaml | open Lstream
open Logic
open Checker
let rec peek_n (n : int) (l : 'a t) : 'a t =
lazy begin
match n, Lazy.force l with
| 0, _ -> Nil
| _, Cons (x, xs) -> Cons (x, peek_n (n - 1) xs)
| _, Nil -> Nil
end
let pos_int_seq =
let rec from x = Cons (x, lazy (from (x + 1)))
in lazy (from 0)
let neg... | |
e03fbf79fefc0f3802761c4cc400f0317371e8acb8bfc8ff6a2f5b99ddafc391 | maximedenes/native-coq | dumpglob.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/interp/dumpglob.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Dump of globalization (to be used b... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let glob_file = ref Pervasi... |
f925c047bed93f16341a7c6b5bd2c25e25a26d3bb12ea061157f7b6d691825fe | MichaelBurge/yxdb-utils | Types.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Database.Alteryx.Types where
import Control.Lens
import qualified Control.Newtype as NT
import Data.Array.Unboxed
import Data.ByteString as BS
import Data.ByteString.Lazy as BSL
import Data.Decimal
import Data.Int
import Data.Text as T
im... | null | https://raw.githubusercontent.com/MichaelBurge/yxdb-utils/955995a95cf56b7cb3c45e0175e2b574411d1a18/src/Database/Alteryx/Types.hs | haskell | yyyy-mm-dd | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Database.Alteryx.Types where
import Control.Lens
import qualified Control.Newtype as NT
import Data.Array.Unboxed
import Data.ByteString as BS
import Data.ByteString.Lazy as BSL
import Data.Decimal
import Data.Int
import Data.Text as T
im... |
bf39bc48acbac1dbaf948625cd85b1c8b1c96009f8646592c023fa23e2e620a4 | simmone/racket-simple-xlsx | style.rkt | #lang racket
(require "../lib/dimension.rkt")
(require "lib.rkt")
(require "border-style.rkt")
(require "font-style.rkt")
(require "alignment-style.rkt")
(require "number-style.rkt")
(require "fill-style.rkt")
(provide (contract-out
[struct STYLES
(
(style->index_map (h... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/2077c014de9953062df04de8c2bcbc73f22feb33/simple-xlsx/style/style.rkt | racket | #lang racket
(require "../lib/dimension.rkt")
(require "lib.rkt")
(require "border-style.rkt")
(require "font-style.rkt")
(require "alignment-style.rkt")
(require "number-style.rkt")
(require "fill-style.rkt")
(provide (contract-out
[struct STYLES
(
(style->index_map (h... | |
7c208775480eb8955285ef84666c7f7f0cb9d65b796bed081e1d59d2f03b89c6 | qriollo/qriollo | Reader.hs |
-- Este archivo es parte de Qriollo.
Qriollo 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 later version.
--
Qriollo is distributed in the... | null | https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Reader.hs | haskell | Este archivo es parte de Qriollo.
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
|
Qriollo 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
Qriollo is distributed in the hope that it will be useful ,
You should have received a copy of the GNU Gen... |
a889b6229607dc22565c5bd3c9753016163fec34d6f89631940e5f582c40f564 | haskell-opengl/OpenGLRaw | F30.hs | {-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Functions.F30
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-- Raw functions from ... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/Functions/F30.hs | haskell | # OPTIONS_HADDOCK hide #
------------------------------------------------------------------------------
|
Module : Graphics.GL.Functions.F30
License : BSD3
Stability : stable
Portability : portable
Raw functions from the
</ OpenGL registry>.
-----------------------------------------------------... | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.Functions.F30 (
glVertexArrayVertexBindingDivisorEXT,
glVertexArrayVertexBuffer,
glVertexArrayVertexBuffers,
glVertexArrayVertexOffsetEXT,
glVertexAttrib1d,
glVertexAttrib1dARB,
glVertexAttrib1dNV,
glVertexAttrib1dv,
glVerte... |
4dae8b3354a629359add170afe7f357d25d5ea17fe41967852fdb7ee45fda15a | jdan/wordle.ml | util.ml | let explode s = String.to_seq s |> List.of_seq
let rec read_lines () =
let line = try
read_line ()
with End_of_file -> ""
in
if line = ""
then []
else line :: read_lines () | null | https://raw.githubusercontent.com/jdan/wordle.ml/0468f0169629bc5d74687d800d40b953d67c9281/lib/util.ml | ocaml | let explode s = String.to_seq s |> List.of_seq
let rec read_lines () =
let line = try
read_line ()
with End_of_file -> ""
in
if line = ""
then []
else line :: read_lines () | |
d8096aa57730793bc4592ebca55ecbd1f07ffe4fccc3f8f1bf143fe6aa175247 | blamario/grampa | Combined.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , RecordWildCards ,
TemplateHaskell , UndecidableInstances #
TemplateHaskell, UndecidableInstances #-}
# OPTIONS_GHC -Wno - simplifiable - class - constraints #
module Combined where
import Control.Applicative
import q... | null | https://raw.githubusercontent.com/blamario/grampa/cae7fc65d8d8ad2f54a070170896735c7518eed7/grammatical-parsers/examples/Combined.hs | haskell | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , RecordWildCards ,
TemplateHaskell , UndecidableInstances #
TemplateHaskell, UndecidableInstances #-}
# OPTIONS_GHC -Wno - simplifiable - class - constraints #
module Combined where
import Control.Applicative
import q... | |
e93e8e403983f020b86c2691dde338f6722fa29c0e3b19623ea6af45ee0def45 | SamB/coq | opname.mli | This module is extracted from Meta - Prl .
type token = string
and atom = string list
val opname_token : token
type opname = {
mutable opname_token : token;
mutable opname_name : string list;
}
val nil_opname : opname
val mk_opname : string -> opname -> opname
val make_opname : string list -> opname
val eq : op... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/jprover/opname.mli | ocaml | This module is extracted from Meta - Prl .
type token = string
and atom = string list
val opname_token : token
type opname = {
mutable opname_token : token;
mutable opname_name : string list;
}
val nil_opname : opname
val mk_opname : string -> opname -> opname
val make_opname : string list -> opname
val eq : op... | |
904bd7dc412f9d2de7fcd5f2f9840fa45a02c2e497436a0e9b8c861cd18be9d5 | oakes/Nightweb | actions.clj | (ns net.nightweb.actions
(:require [clojure.java.io :as java.io]
[neko.resource :as r]
[neko.threading :as thread]
[neko.notify :as notify]
[net.nightweb.utils :as utils]
[nightweb.actions :as a]
[nightweb.constants :as c]
[nightweb.i... | null | https://raw.githubusercontent.com/oakes/Nightweb/089c7a99a9a875fde33cc29d56e1faf54dc9de84/android/src/clojure/net/nightweb/actions.clj | clojure | creating a new activity
receiving data from activities
misc actions
if unzip succeeds, import user, otherwise show error | (ns net.nightweb.actions
(:require [clojure.java.io :as java.io]
[neko.resource :as r]
[neko.threading :as thread]
[neko.notify :as notify]
[net.nightweb.utils :as utils]
[nightweb.actions :as a]
[nightweb.constants :as c]
[nightweb.i... |
afd588e35ddf669c9b3907a693d5338367439d181ec801b701c83ff7396f566b | GlideAngle/flare-timing | DocTest.hs | module Main (main) where
import Test.DocTest (doctest)
arguments :: [String]
arguments =
[ "-isrc"
, "library/Data/Via/Scientific.hs"
]
main :: IO ()
main = doctest arguments
| null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/detour-via-sci/test-suite-doctest/DocTest.hs | haskell | module Main (main) where
import Test.DocTest (doctest)
arguments :: [String]
arguments =
[ "-isrc"
, "library/Data/Via/Scientific.hs"
]
main :: IO ()
main = doctest arguments
| |
e8ef933dd7c13453e32271eeee03d560531be6d18e8c2b0b4821f503462b619f | futurice/haskell-mega-repo | Main.hs | module Main (main) where
import Futurice.App.Proxy
main :: IO ()
main = defaultMain
| null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/proxy-app/srv/Main.hs | haskell | module Main (main) where
import Futurice.App.Proxy
main :: IO ()
main = defaultMain
| |
a514abc10c07eed7d925304a5d521613e0f4e5cd73c9f9b0e5138b3c7d649da0 | nuprl/gradual-typing-performance | main-sift.rkt | #lang typed/racket/base
(provide sift)
(require benchmark-util
"streams-struct-adapted.rkt")
(require/typed/check "streams-make-stream.rkt"
[make-stream (-> Natural (-> stream) stream)])
(require/typed/check "streams-stream-unfold.rkt"
[stream-unfold (-> stream (values Natural stream))])
;; ---
;; `sift... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/sieve/typed/main-sift.rkt | racket | ---
`sift n st` Filter all elements in `st` that are equal to `n`.
Return a new stream. | #lang typed/racket/base
(provide sift)
(require benchmark-util
"streams-struct-adapted.rkt")
(require/typed/check "streams-make-stream.rkt"
[make-stream (-> Natural (-> stream) stream)])
(require/typed/check "streams-stream-unfold.rkt"
[stream-unfold (-> stream (values Natural stream))])
(: sift (-> Nat... |
824574770c68737ccf9dae25892a442d123e8093c9a1f8bc2c9cf7b0ae3ed2a1 | dgtized/shimmers | negative_overlap.cljs | (ns shimmers.sketches.negative-overlap
(:require
[shimmers.algorithm.line-clipping :as clip]
[shimmers.algorithm.square-packing :as square]
[shimmers.common.palette :as palette]
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shim... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/negative_overlap.cljs | clojure | for now this is removing the clip each time
no intersection between pair causes g/clip-with to
b is contained by a
a is contained by b
FIXME: This is probably causing a bug if b also clips other
shapes? partial fix to ignore existing panes, but *should*
re-clip remainder of a?
partial overlap
:9500/#/sketches/... | (ns shimmers.sketches.negative-overlap
(:require
[shimmers.algorithm.line-clipping :as clip]
[shimmers.algorithm.square-packing :as square]
[shimmers.common.palette :as palette]
[shimmers.common.svg :as csvg]
[shimmers.common.ui.controls :as ctrl]
[shimmers.math.deterministic-random :as dr]
[shim... |
980d3cddd7bf5cf10de1debace403ebd3b98414515719208bff59190c90866f0 | marcoheisig/sb-simd | utilities.lisp | (in-package #:sb-simd-test-suite)
(defun shuffle (list)
(let ((result (copy-seq list)))
(loop for tail on result
for tail-length from (length result) downto 2
do (rotatef (first tail)
(nth (random tail-length) tail)))
result))
(defun simd-info (name)
"Returns, as ... | null | https://raw.githubusercontent.com/marcoheisig/sb-simd/6ce4f5aefa7be61f3575e7938c2a9ffae3b272ea/test-suite/utilities.lisp | lisp |
Argument Type Specifications
Generators | (in-package #:sb-simd-test-suite)
(defun shuffle (list)
(let ((result (copy-seq list)))
(loop for tail on result
for tail-length from (length result) downto 2
do (rotatef (first tail)
(nth (random tail-length) tail)))
result))
(defun simd-info (name)
"Returns, as ... |
db2c99ef73e23e493b34317001e19d94b890c2169a96e4e855e8c04c46d04ce1 | mondemand/mondemand-server | mondemand_server_fs_resource.erl | -module (mondemand_server_fs_resource).
-export ([ init/1 ]).
-export ([ allowed_methods/2,
resource_exists/2,
content_types_provided/2,
provide_content/2
]).
-record (state, {root, filepath, is_dir}).
-include_lib ("kernel/include/file.hrl").
-include_lib ("webmachine/inclu... | null | https://raw.githubusercontent.com/mondemand/mondemand-server/88e57ef8ece8a0069a747620f4585104cb560840/src/mondemand_server_fs_resource.erl | erlang | -module (mondemand_server_fs_resource).
-export ([ init/1 ]).
-export ([ allowed_methods/2,
resource_exists/2,
content_types_provided/2,
provide_content/2
]).
-record (state, {root, filepath, is_dir}).
-include_lib ("kernel/include/file.hrl").
-include_lib ("webmachine/inclu... | |
0fffa81a86c217c1affdf91e6c6176670e0a0505c626b6605d608517f64a4829 | OtpChatBot/Ybot | flowdock_client.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
chat client .
%%% @end
%%%-----------------------------------------------------------------------------
-module (flowdock_client).
-behaviour(gen_server).
-export([start_link/6]).
%% gen_server callbac... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/transport/flowdock/flowdock_client.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
@end
-----------------------------------------------------------------------------
gen_server callbacks
incoming message handler pid
request id
flow
flowdock login
reconnect timeout in microseconds
Start http st... | chat client .
-module (flowdock_client).
-behaviour(gen_server).
-export([start_link/6]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {
callback,
req_id,
flowdock organization
org,
flo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.