_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
058a0821ffb8a1a549f2bb9ec62508bcd79c351c5fb648046d2adb095ef970dc
clj-commons/seesaw
config.clj
Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/config.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) , 2011 . All rights reserved . (ns seesaw.test.config (:use [seesaw.config :only [config config!]]) (:use [lazytest.describe :only (describe it testing)] [lazytest.expect :only (expect)]))
58f1864fd256df16957987316a58a71b12847a4412df7bfaf6a1bc17182c791a
arttuka/reagent-material-ui
lightbulb_circle_outlined.cljs
(ns reagent-mui.icons.lightbulb-circle-outlined "Imports @mui/icons-material/LightbulbCircleOutlined as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def lightbu...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/lightbulb_circle_outlined.cljs
clojure
(ns reagent-mui.icons.lightbulb-circle-outlined "Imports @mui/icons-material/LightbulbCircleOutlined as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def lightbu...
408c5278a68e9fa7e14c45d88eed839c94fd80608b1c9a8b38ea18a94c511b8c
abdulapopoola/SICPBook
4.64.scm
#lang racket (rule (outranked-by ?staff-person ?boss) (or (supervisor ?staff-person ?boss) (and (outranked-by ?middle-manager ?boss) (supervisor ?staff-person ?middle-manager)))) (outranked-by (Bitdiddle Ben) ?who) ; On unification with rule, this be...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%204/4.4/4.64.scm
scheme
On unification with rule, this becomes: in the 'or' half of the rule, this turns to (outranked-by ?middle-manager ?boss) And this triggers another round since boss and middle-manager are not defined. The outranked-by would always fail because it would get called filtered down as before. scenario however now, it...
#lang racket (rule (outranked-by ?staff-person ?boss) (or (supervisor ?staff-person ?boss) (and (outranked-by ?middle-manager ?boss) (supervisor ?staff-person ?middle-manager)))) (outranked-by (Bitdiddle Ben) ?who) - > ( outranked - by ( ) ? boss...
f75fa1752a9a04753a2ca1e7ac6f4f361bc54c8cae7d01354a9d3aa85cd2cd20
gregnwosu/haskellbook
ChapterExamples.hs
module ChapterExamples where import Control.Applicative import Data.Char hurr : : a = > a - > a hurr = (*2) : : a = > a - > a durr = (+10) m :: Integer -> Integer m = hurr . durr m2 :: Integer -> Integer m2 = (+) <$> hurr <*> durr m3 :: Integer -> Integer m3 = liftA2 (+) hurr durr cap :: [Char] -> [Char] cap...
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter22/src/ChapterExamples.hs
haskell
module ChapterExamples where import Control.Applicative import Data.Char hurr : : a = > a - > a hurr = (*2) : : a = > a - > a durr = (+10) m :: Integer -> Integer m = hurr . durr m2 :: Integer -> Integer m2 = (+) <$> hurr <*> durr m3 :: Integer -> Integer m3 = liftA2 (+) hurr durr cap :: [Char] -> [Char] cap...
384825410f0b9fbc1836dfc56b61267e67db132012c575ef2b98adcb95f228b7
PeterDWhite/Osker
RealTimeSignal.hs
Copyright ( C ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module RealTimeSignal ( -- Real time signal data structures , SigEvent (..) , SignalMechanism (..) , SigevValue (..) , sigRtMin , sigRtMax ) where ----------------------------------------------------------...
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/RealTimeSignal.hs
haskell
Real time signal data structures -------------------------------------------------------------------- The real time signals are POSIX.4, they extend the POSIX.1 signal functionality. -------------------------------------------------------------------- Use signals for asynchronous notification No asynchronous notif...
Copyright ( C ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module RealTimeSignal , SigEvent (..) , SignalMechanism (..) , SigevValue (..) , sigRtMin , sigRtMax ) where data SignalMechanism deriving (Eq, Ord, Enum, Show) sigRtMin :: Int sigRtMin = error "Need to ...
408e590d93ff292e716d6ee7935f01407645d2e89bbfe23c52380f92c77a4d64
jandot/machine-learning-in-action
knn.clj
(ns knn) (use '[leiningen.exec :only (deps)]) (deps '[[org.clojure/math.numeric-tower "0.0.1"]]) (load-file "machinelearninginaction/Ch02/trainingDigits/training-set.clj") (load-file "machinelearninginaction/Ch02/testDigits/test-set.clj") (defn calculate-distance [v1 v2] "Calculates distance between 2 vectors. The h...
null
https://raw.githubusercontent.com/jandot/machine-learning-in-action/c2e239e43fcf3e79b7680aa10bef4660aa01f62a/knn.clj
clojure
(ns knn) (use '[leiningen.exec :only (deps)]) (deps '[[org.clojure/math.numeric-tower "0.0.1"]]) (load-file "machinelearninginaction/Ch02/trainingDigits/training-set.clj") (load-file "machinelearninginaction/Ch02/testDigits/test-set.clj") (defn calculate-distance [v1 v2] "Calculates distance between 2 vectors. The h...
63294c8b91bcebebfb5479f5a8a9de0bbf6efcc1e19ed748d196bb6d48bd67dc
ndmitchell/supero
State.hs
module Compiler.State where import Compiler.Expr import Control.Monad.State data S e = S {names :: [(e,Name)], history :: [e], result :: Prog e} s0 = S [] [] [] type SS e a = State (S e) a getName :: Eq e => Name -> e -> SS e Name getName hint e = do names <- gets names case lookup e names of Just...
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero2/Compiler/State.hs
haskell
module Compiler.State where import Compiler.Expr import Control.Monad.State data S e = S {names :: [(e,Name)], history :: [e], result :: Prog e} s0 = S [] [] [] type SS e a = State (S e) a getName :: Eq e => Name -> e -> SS e Name getName hint e = do names <- gets names case lookup e names of Just...
650246d099c18abd974ab6cd02b6d085007655ec6151b60d5fcbfcd2f2e0f85b
cl-unix-cybernetics/cl-unix-cybernetics
darwin.lisp
;; cl-unix-cybernetics Copyright 2013 - 2022 < > ;; ;; Permission is hereby granted to use this software granted ;; the above copyright notice and this permission paragraph ;; are included in all copies and substantial portions of this ;; software. ;; ;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF ...
null
https://raw.githubusercontent.com/cl-unix-cybernetics/cl-unix-cybernetics/63e4862274e170bda7540b4caec6c94ed850a31c/unix/darwin.lisp
lisp
cl-unix-cybernetics Permission is hereby granted to use this software granted the above copyright notice and this permission paragraph are included in all copies and substantial portions of this software. THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER...
Copyright 2013 - 2022 < > (in-package :cl-unix-cybernetics) (in-re-readtable) (defmethod echo-command ((host t) (os os-darwin)) "printf %s ") (defmethod probe-hostname ((host host) (os os-darwin)) (list :hostname (run-1 "hostname -s"))) (define-resource-class brew-pkg (pkg) () ((probe-brew-pkg :prope...
3e97d2c7a3a95123721ad51a412fb3325a644aff2b4ed977dd4b69bfbeb1f789
mirage/irmin-server
irmin_server_internal.ml
module Error = Error module Command = Command module Cli = Cli module Conn = Conn module Tree = Tree module Conf = Conf
null
https://raw.githubusercontent.com/mirage/irmin-server/ffda6269663bfe8e0dd0ce1c7053d6e57f1f2deb/src/irmin-server-internal/irmin_server_internal.ml
ocaml
module Error = Error module Command = Command module Cli = Cli module Conn = Conn module Tree = Tree module Conf = Conf
cdb83d5c2f1d2df8b89934986df0d6806a9dc5ae397e8c324f32a23f73aeb4c2
BinaryAnalysisPlatform/bap
bap_disasm_source.ml
open Core_kernel[@@warning "-D"] open Bap_types.Std open Bap_image_std open Bap_core_theory module Context = struct open KB.Syntax type t = { bias : Bitvec.t option; path : string option; size : int; } let is_applicable ctxt path = match path, ctxt.path with | None,_ -> true | Some _,...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_disasm/bap_disasm_source.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap_types.Std open Bap_image_std open Bap_core_theory module Context = struct open KB.Syntax type t = { bias : Bitvec.t option; path : string option; size : int; } let is_applicable ctxt path = match path, ctxt.path with | None,_ -> true | Some _,...
0dff793298e583a8829575e5e8d1ab9f5cffc9f803427d0d271407af0d2f9827
arlencox/mlbdd
MLBDD.ml
(* Binary decision diagrams *) module type WHS = sig type key type 'a t val create : int -> 'a t val replace : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val clear : 'a t -> un...
null
https://raw.githubusercontent.com/arlencox/mlbdd/ce57dc69dc7ab1a40582b5dca6c5c4c6a87e63c1/lib/MLBDD.ml
ocaml
Binary decision diagrams Low-level implementation of BDDs 0 edge variable code always even node inverted hash structure for code * var * code raw, internal mkif function ids are the same, don't produce a node ids are different, produce a node if such a node already exists, use that if, not crea...
module type WHS = sig type key type 'a t val create : int -> 'a t val replace : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val clear : 'a t -> unit val length : 'a t -> int e...
11537ea884413ed3f31e173726c19db4435122c261bcfd1bb1bc4400d83b0be9
realworldocaml/book
sub_system_intf.ml
open Import module type Info = Sub_system_info.S module type S = sig module Info : Info (** Instantiated representation of the sub-system. I.e. with names resolved using a library database. *) type t (** Create an instance of the sub-system *) val instantiate : resolve:(Loc.t * Lib_name.t -> ...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/sub_system_intf.ml
ocaml
* Instantiated representation of the sub-system. I.e. with names resolved using a library database. * Create an instance of the sub-system * A backend, for implementors of the sub-system * Description of a backend, such as "inline tests framework" or "ppx driver". * "a" or "an" * Library the backend is...
open Import module type Info = Sub_system_info.S module type S = sig module Info : Info type t val instantiate : resolve:(Loc.t * Lib_name.t -> Lib.t Resolve.Memo.t) -> get:(loc:Loc.t -> Lib.t -> t option Memo.t) -> Lib.t -> Info.t -> t Memo.t end module type Backend = sig include S ...
1b4b1b9357addc478ed72bd8ca39c96e2b67c8126da2672725ce13ef13f2c93d
kazu-yamamoto/http2
Encode.hs
# LANGUAGE RecordWildCards # module Network.HTTP2.Frame.Encode ( encodeFrame , encodeFrameChunks , encodeFrameHeader , encodeFrameHeaderBuf , encodeFramePayload , EncodeInfo(..) , encodeInfo ) where import qualified Data.ByteString as BS import Data.ByteString.Internal (unsafeCreate) import Foreign....
null
https://raw.githubusercontent.com/kazu-yamamoto/http2/88b3c192c251c15fa4dc426aa0372841dc3fee49/Network/HTTP2/Frame/Encode.hs
haskell
-------------------------------------------------------------- | Auxiliary information for frame encoding. | Flags to be set in a frame header | Stream id to be set in a frame header | Padding if any. In the case where this value is set but the priority flag is not set, this value gets preference over the priority ...
# LANGUAGE RecordWildCards # module Network.HTTP2.Frame.Encode ( encodeFrame , encodeFrameChunks , encodeFrameHeader , encodeFrameHeaderBuf , encodeFramePayload , EncodeInfo(..) , encodeInfo ) where import qualified Data.ByteString as BS import Data.ByteString.Internal (unsafeCreate) import Foreign....
eaa9a99187e5d1fad96e5e5e7d3bb5c2746e0595f144aca3be41777db2d7db7c
onyx-platform/onyx
barrier_encoder.clj
(ns ^{:no-doc true} onyx.messaging.serializers.barrier-encoder (:require [onyx.messaging.serializers.helpers :refer [type->byte]]) (:import [org.agrona.concurrent UnsafeBuffer])) (defprotocol PEncoder (set-epoch [this epoch]) (set-opts-map-bytes [this bs]) (offset [this]) (length [this]) (wrap-impl [thi...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/messaging/serializers/barrier_encoder.clj
clojure
(ns ^{:no-doc true} onyx.messaging.serializers.barrier-encoder (:require [onyx.messaging.serializers.helpers :refer [type->byte]]) (:import [org.agrona.concurrent UnsafeBuffer])) (defprotocol PEncoder (set-epoch [this epoch]) (set-opts-map-bytes [this bs]) (offset [this]) (length [this]) (wrap-impl [thi...
39bee79cc9b7efbbdb5853312cc8ea7b8d8625d94702e4d7a71e9340731cbea4
crategus/cl-cffi-gtk
gtk.flow-box.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.flow-box.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.flow-box.lisp
lisp
---------------------------------------------------------------------------- gtk.flow-box.lisp The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of ...
Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2019 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for use GNU Lesser General Public Li...
ba003ec560e5288e2c108a45efd455547a12d9e5efd16a2fe0534431538c9393
Mikolaj/enummapset
Strict.hs
# LANGUAGE CPP # -- | -- Module : $Header$ Description : Data . IntMap . Strict with keys . Copyright : ( c ) 2011 - 2019 ( c ) 2019 - 2022 and others ( see git history ) -- License : BSD3 -- Maintainer : -- Stability : alpha Portability : uses DeriveDataTypeable an...
null
https://raw.githubusercontent.com/Mikolaj/enummapset/30790c54d87ba685efda3a8c18020543b9e3754f/Data/EnumMap/Strict.hs
haskell
| Module : $Header$ License : BSD3 Maintainer : Stability : alpha This is a simple wrapper for 'Data.IntMap.Strict' that works with any type of * Wrapping/unwrapping * Operators * Query * Construction ** Insertion ** Delete\/Update * Combine ** Union ** Difference ** Intersection ** Un...
# LANGUAGE CPP # Description : Data . IntMap . Strict with keys . Copyright : ( c ) 2011 - 2019 ( c ) 2019 - 2022 and others ( see git history ) Portability : uses DeriveDataTypeable and keys that are instances of ' ' type class . For documentation please see the one for ' ...
2a657a6614fb3ed4f2c8b0c784a5c8af079ffce31ff829e8827558250a8806b0
ocsigen/js_of_ocaml
properties.ml
let table : (string, string) Hashtbl.t = Hashtbl.create 17 let set k v = Hashtbl.add table k v let get k = try Some (Hashtbl.find table k) with Not_found -> None
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/compiler/ppx/properties.ml
ocaml
let table : (string, string) Hashtbl.t = Hashtbl.create 17 let set k v = Hashtbl.add table k v let get k = try Some (Hashtbl.find table k) with Not_found -> None
f99c3003fb4821e42ff0ccbb782090d32a2ec4d6bf00060a0ac9817a4deb9b90
chessai/freq
Internal.hs
-------------------------------------------------------------------------------- # language BangPatterns # {-# language DeriveDataTypeable #-} {-# language ExplicitNamespaces #-} # language GeneralizedNewtypeDeriving # {-# language MagicHash #-} {-# language NoImplicitPr...
null
https://raw.githubusercontent.com/chessai/freq/cb92881f923f43c3caf69cfa9dd9c162ea1f321c/src/Freq/Internal.hs
haskell
------------------------------------------------------------------------------ # language DeriveDataTypeable # # language ExplicitNamespaces # # language MagicHash # # language NoImplicitPrelude # # language ScopedTypeVariables # -----------------------------------------...
# language BangPatterns # # language GeneralizedNewtypeDeriving # # language UnboxedTuples # # language TypeFamilies # | This is the internal module to ' Freq ' . The primary differences are that this module exports the ' Freaky ' , as well as the data c...
3f33608fb22897bd3aa4d3b897f38de02736fa584c8d2f6438385fc7122c2d11
CSCfi/rems
github.clj
(ns rems.github (:require [clj-http.client :as http] [medley.core :refer [find-first]])) (defn- fetch-latest [repository] (:body (http/get (str "/" repository "/releases/latest") {:accept :json :as :json}))) (defn fetch-releases-latest "Fetches the latest relea...
null
https://raw.githubusercontent.com/CSCfi/rems/4651c758b99d83995b0b73d660d1058e3dedd733/src/clj/rems/github.clj
clojure
(ns rems.github (:require [clj-http.client :as http] [medley.core :refer [find-first]])) (defn- fetch-latest [repository] (:body (http/get (str "/" repository "/releases/latest") {:accept :json :as :json}))) (defn fetch-releases-latest "Fetches the latest relea...
58ac9b8c4f6ad23359da597c870724163c23c2c121702627ad4ecf796c83ee17
jubnzv/moonsmith
config.ml
open Core_kernel (** User-defined options for generating random programs. *) type t = { c_indent: string; (** Indentation symbols used in generated Lua code. *) c_lib_path: string option; * Path to external Lua module used in runtime . c_min_toplevel_datums: int; (** Minimum number of datums defined on the...
null
https://raw.githubusercontent.com/jubnzv/moonsmith/c76a433ac399d381db3b2a46e6639c5fabe9231e/src/config.ml
ocaml
* User-defined options for generating random programs. * Indentation symbols used in generated Lua code. * Minimum number of datums defined on the top-level. * Maximum number of datums defined on the top-level. * Minimum number of functions and methods defined on the top-level. * Maximum number of functions and me...
open Core_kernel type t = { c_indent: string; c_lib_path: string option; * Path to external Lua module used in runtime . c_min_toplevel_datums: int; c_max_toplevel_datums: int; c_min_toplevel_funcdefs: int; c_max_toplevel_funcdefs: int; c_stdout: bool; c_seed: int option; c_gen_oop_methods: b...
e7b8212888f430afd4f2df42589b9496c6de2edfca109a045d79b5987a982149
byteally/dbrecord
Types.hs
{-# OPTIONS_GHC -Wno-redundant-constraints #-} # LANGUAGE DataKinds , KindSignatures , PolyKinds , TypeOperators , GADTs , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses , CPP , , DeriveFunctor , TypeFamilies , UndecidableInstances , UndecidableSuperClasses , ScopedTypeVariables , FunctionalDependencies , A...
null
https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord/src/DBRecord/Internal/Types.hs
haskell
# OPTIONS_GHC -Wno-redundant-constraints # float(24 ) | DBFloat8 -- float(53) NOTE: Non SQL 92 NOTE: Non standard ^ Aliases for datacons ^ Aliases for datacons ^ Aliases for flattened field names | Json newtype Only a = Only { fromOnly :: a } - | Function to get and set a field in a record.
# LANGUAGE DataKinds , KindSignatures , PolyKinds , TypeOperators , GADTs , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses , CPP , , DeriveFunctor , TypeFamilies , UndecidableInstances , UndecidableSuperClasses , ScopedTypeVariables , FunctionalDependencies , AllowAmbiguousTypes , RankNTypes , FlexibleConte...
6a9d9795ff9defb38e2c6468e9fbd117a1993b5ef04c8e655ac3750d195bf575
WorksHub/client
attract_card.cljc
(ns wh.styles.attract-card) (def attract-card "attract_card__attract-card--3GQdd") (def intro "attract_card__intro--2ezbQ") (def intro__branding "attract_card__intro__branding--CMhp_") (def intro__icon "attract_card__intro__icon--2s5N_") (def intro__description "attract_card__intro__description--2Snok") (def intro__ver...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/styles/attract_card.cljc
clojure
(ns wh.styles.attract-card) (def attract-card "attract_card__attract-card--3GQdd") (def intro "attract_card__intro--2ezbQ") (def intro__branding "attract_card__intro__branding--CMhp_") (def intro__icon "attract_card__intro__icon--2s5N_") (def intro__description "attract_card__intro__description--2Snok") (def intro__ver...
2fd6d0b5690dac424d272909766fce36298dfd986fad02041a5c129cf5cf35f1
GaloisInc/macaw
Disassemble.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE UndecidableInstan...
null
https://raw.githubusercontent.com/GaloisInc/macaw/ff894f9286f976d0ab131325bea902ef6275aad2/macaw-ppc/src/Data/Macaw/PPC/Disassemble.hs
haskell
# LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # Returns the instruction and number of bytes consumed /or/ an error. This code assumes that the 'MM.ByteRegion' is maximal; that is, that there are no byte regions that could be coalesced. FIXME: Having to wrap the bytestring in a lazy wrapper is unpleasant. W...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module Data.Macaw.PPC.Disassemble ( disassembleFn )...
5c6a0998512f902de57525713ef1b3ab1144c2f41b4c6861e3be6aa494080dcc
racket/web-server
clear.rkt
#lang racket/base (require web-server/servlet) (provide (all-defined-out)) (define interface-version 'v1) (define timeout +inf.0) (define (start initial-request) (parameterize ([current-servlet-continuation-expiration-handler (lambda _ (response/xexpr `(html ...
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/servlets/examples/clear.rkt
racket
#lang racket/base (require web-server/servlet) (provide (all-defined-out)) (define interface-version 'v1) (define timeout +inf.0) (define (start initial-request) (parameterize ([current-servlet-continuation-expiration-handler (lambda _ (response/xexpr `(html ...
3f7fee1288e4223c60f47cfeaf153b8278768d2cd64522bbb45c8c3705e7eb8a
lasp-lang/partisan
partisan_vclock.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except...
null
https://raw.githubusercontent.com/lasp-lang/partisan/fd048fc1b34309d9fa41450434a7e7b3b2fa1fb8/src/partisan_vclock.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application 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 sp...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
b3ef9d82fdd709142141e0740f901c79de968bb771332819b86e9f12415c9858
c-cube/ocabot
load_dump.ml
#!/usr/bin/env ocaml #use "topfind";; #require "lwt.unix";; #require "irc-client.lwt";; #require "str";; #require "yojson";; #require "containers";; #directory "_build/src";; #load "ocaobtlib.cma";; let s = CCIO.with_in "old_dump" CCIO.read_lines_l;; let l = CCList.filter_map Factoids.parse_op s;; let fs = List.fold_...
null
https://raw.githubusercontent.com/c-cube/ocabot/62be610a1cd55d0991300b314227b1904fdfa03e/tools/load_dump.ml
ocaml
#!/usr/bin/env ocaml #use "topfind";; #require "lwt.unix";; #require "irc-client.lwt";; #require "str";; #require "yojson";; #require "containers";; #directory "_build/src";; #load "ocaobtlib.cma";; let s = CCIO.with_in "old_dump" CCIO.read_lines_l;; let l = CCList.filter_map Factoids.parse_op s;; let fs = List.fold_...
e41ed590fe9b8458b2051538327505b62bbb48d089e20961bdc093f03a883f61
ocaml/ocaml
predef.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/9453a903c818dfef161e0534cbef441b1950625c/typing/predef.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Types val type_int: type_expr val type_char: type_expr val type_string: type_expr val type_bytes: ...
69fbfb6b9244048ced8cbd7be23c8ad9df77feb24903892306d93bda41f9a378
unnohideyuki/bunny
sample234.hs
main = print $ fmap (*2) (Just 200)
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample234.hs
haskell
main = print $ fmap (*2) (Just 200)
fd46daba0a5e8d11588df39b2d533c3e3c2ad389741ebf382301395cefd4cc0e
expipiplus1/orbits
Setup.hs
module Main where import Distribution.Extra.Doctest (defaultMainWithDoctests) main :: IO () main = defaultMainWithDoctests "doctests"
null
https://raw.githubusercontent.com/expipiplus1/orbits/6cc5c43f50aadc7517a6677ca04363b492474a6a/Setup.hs
haskell
module Main where import Distribution.Extra.Doctest (defaultMainWithDoctests) main :: IO () main = defaultMainWithDoctests "doctests"
8979301696aa9bb798625633a0d2066e74c22b02839c4689c07f5c3678b49484
mirage/mirage-tcpip
udpv4v6_socket.ml
* Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * ...
null
https://raw.githubusercontent.com/mirage/mirage-tcpip/665d9b0e5753f38fdb64de51fb2d7f6ec955a71e/src/stack-unix/udpv4v6_socket.ml
ocaml
source ip to bind to keep trying FIXME: we should not ignore the result Use Cstruct.sub_copy once it exists in a reasonably mature cstruct release
* Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * ...
cf80facb85646a0af02b62b882892b8be9a1b1d6dce9048e9266232cb0c9bd31
robert-strandh/Cluster
instruction-set.lisp
(cl:in-package #:cluster) (defgeneric instruction-descriptor-predicate (modifier-prefix) (:documentation "Return the symbol-name naming a predicate that can be called on an instruction-descriptor for the prescence of the prefix.")) (defgeneric prefix-name (modifier-prefix)) (defclass prefix () ()) (defclass interpr...
null
https://raw.githubusercontent.com/robert-strandh/Cluster/370410b1c685f2afd77f959a46ba49923a31a33c/instruction-set.lisp
lisp
Technically this is something the decoder/interpreter uses and should annotate these instances with, not really sure if it matters that they're here though. We may also need some way to validate the modifier prefix can be used with a given instruction.
(cl:in-package #:cluster) (defgeneric instruction-descriptor-predicate (modifier-prefix) (:documentation "Return the symbol-name naming a predicate that can be called on an instruction-descriptor for the prescence of the prefix.")) (defgeneric prefix-name (modifier-prefix)) (defclass prefix () ()) (defclass interpr...
45e045696eb5fc87f2127054948ea11de169a8d6699fc9002a0ad9060710bdcc
glagoly/glagoly
vote_core_test.erl
-module(vote_core_test). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). number_result_test() -> ?assertEqual( [{[b, d], 1}, {[a], 0}, {[c], -1}], vote_core:number_result([[b, d], [sq, a], [c]]) ). add_alt_test() -> P = vote_core:new(), P2 = vote_core:add_alt(1, P), ...
null
https://raw.githubusercontent.com/glagoly/glagoly/bd3754599ebb456fbcb1ee5864d87d85d9584ad3/test/vote_core_test.erl
erlang
-module(vote_core_test). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). number_result_test() -> ?assertEqual( [{[b, d], 1}, {[a], 0}, {[c], -1}], vote_core:number_result([[b, d], [sq, a], [c]]) ). add_alt_test() -> P = vote_core:new(), P2 = vote_core:add_alt(1, P), ...
0e1f778a6975160b35924e1058025746ac0c79e693f52d7b20a0cca0afe3b9fc
alexandergunnarson/quantum
core.cljc
(ns quantum.test.core.analyze.clojure.core (:require [quantum.core.analyze.clojure.core :as ns] [quantum.core.test :refer [deftest is testing]])) #?(:clj (deftest test:jvm-typeof (is (= Long/TYPE (ns/jvm-typeof '(let [a 1 b 4] (+ a b))))) ; something which `typeof*` has trouble with (is ...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/analyze/clojure/core.cljc
clojure
something which `typeof*` has trouble with
(ns quantum.test.core.analyze.clojure.core (:require [quantum.core.analyze.clojure.core :as ns] [quantum.core.test :refer [deftest is testing]])) #?(:clj (deftest test:jvm-typeof (is (= Long/TYPE (ns/jvm-typeof '(let [a 1 b 4] (+ a b))))) (is (= (Class/forName "[B") (ns/jvm-typeof...
ed1c5b21743471a27f02e7601d238d03f9c8908f0ef5c262581ec04b3ac076d3
binghe/PCL
defs.lisp
-*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of d...
null
https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/pcl/defs.lisp
lisp
Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export control law...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( o...
779b2b28014567eb0de7b6746495fbf3d38ba6763c2d0bda9b3e55a1ae8b4a89
SquidDev/illuaminate
lsp_rename.ml
open Lsp_test open Lsp.Types let prepare = Omnomnom.Tests.group "Prepare" [ test ~name:"Allows renaming variables" (fun t -> let uri = open_file t "vars.lua" in request t (TextDocumentPrepareRename { textDocument = { uri }; position = pos 0 6 }) |> Check.ok_response |> Tes...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/test/lsp_rename.ml
ocaml
open Lsp_test open Lsp.Types let prepare = Omnomnom.Tests.group "Prepare" [ test ~name:"Allows renaming variables" (fun t -> let uri = open_file t "vars.lua" in request t (TextDocumentPrepareRename { textDocument = { uri }; position = pos 0 6 }) |> Check.ok_response |> Tes...
9705c8b9bab8a5e6d4253d8600a3b0314b6fac270385c19f3a977f50d0b1e663
conormcd/clj-honeycomb
map.clj
(ns ^:no-doc clj-honeycomb.util.map "Some semi-generic map operations. We can't use clojure.walk for these operations since it consumes seqs like doall. These map operations work on maps *only*." (:refer-clojure :exclude [flatten]) (:use [clojure.future]) (:require [clojure.spec.alpha :as s] [...
null
https://raw.githubusercontent.com/conormcd/clj-honeycomb/f309bf3b85af2239f4172189fcd934076306240b/src/clj_honeycomb/util/map.clj
clojure
(ns ^:no-doc clj-honeycomb.util.map "Some semi-generic map operations. We can't use clojure.walk for these operations since it consumes seqs like doall. These map operations work on maps *only*." (:refer-clojure :exclude [flatten]) (:use [clojure.future]) (:require [clojure.spec.alpha :as s] [...
9ed10f324429e803f3ead0650a71b0d28a2c267387945ee662e15d947803f766
CSCfi/rems
project.clj
(defproject rems "2.31" :description "Resource Entitlement Management System is a tool for managing access rights to resources, such as research datasets." :url "" :dependencies [[buddy/buddy-auth "3.0.323"] [buddy/buddy-sign "3.4.333"] [ch.qos.logback/logback-classic "1.4.5"] ...
null
https://raw.githubusercontent.com/CSCfi/rems/77090739c90c831ad043fea7004e941dcc6e3b61/project.clj
clojure
0.8.5 switches to next.jdbc, which breaks stuff and requires proper testing in production doesn't work with "2.0.0-beta.5", error serving the file latest before 5.x series icons don't work with "6.2.0" also run tests from src files too many changes for now, probably not desirable
(defproject rems "2.31" :description "Resource Entitlement Management System is a tool for managing access rights to resources, such as research datasets." :url "" :dependencies [[buddy/buddy-auth "3.0.323"] [buddy/buddy-sign "3.4.333"] [ch.qos.logback/logback-classic "1.4.5"] ...
bbb744abb32a21cd415d6fe1a55ca7df1347e94ffa5e4e55b21af9cb40766279
gorillalabs/sparkling
conf.clj
Functions for creating and modifying ` SparkConf ` objects ;; ;; The functions are designed to be used with the threading macro `->` for building ;; objects to pass into `spark-context`. ;; ;; (-> (spark-conf) ;; (app-name "aname") ;; (master "local[2]")) ;; (ns sparkling.conf (:import [org.apache.spark S...
null
https://raw.githubusercontent.com/gorillalabs/sparkling/ffedcc70fd46bf1b48405be8b1f5a1e1c4f9f578/src/clojure/sparkling/conf.clj
clojure
The functions are designed to be used with the threading macro `->` for building objects to pass into `spark-context`. (-> (spark-conf) (app-name "aname") (master "local[2]")) (.setRegistrationRequired kryo true)
Functions for creating and modifying ` SparkConf ` objects (ns sparkling.conf (:import [org.apache.spark SparkConf]) (:refer-clojure :exclude (set get contains remove))) (defn master ([conf] (master conf "local[*]")) ([conf master] (.setMaster conf master))) (defn app-name [conf name] (.setAppNam...
cf5938a71fd20b9b04439a95842dd9bda84f3bce61acf6557304e666f9dfcacd
hipsleek/hipsleek
cpgraph.ml
#include "xdebug.cppo" open VarGen open Globals open Gen open Exc.GTable open Cpure let get_frame_b_form (b: b_formula) = let (pf,_) = b in match pf with | Frm (sv,_) -> [sv] | _ -> [] let get_frame_x p0= let rec helper p= match p with | BForm (b,_) -> get_frame_b_form b | And (b1,b2,_) -> (he...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/cpgraph.ml
ocaml
intersect_svl (helper b1) (helper b2) ls1,svl0@svl1 ) ([],[]) b in intersect_svl (helper b1) (helper b2) shold be merged with prune_irr_neq ls1,svl0@svl1 ) ([],[]) b in intersect_svl (helper b1) (helper b2) ************************NEW********************************** ls1,svl0@svl1 ) ([],[]...
#include "xdebug.cppo" open VarGen open Globals open Gen open Exc.GTable open Cpure let get_frame_b_form (b: b_formula) = let (pf,_) = b in match pf with | Frm (sv,_) -> [sv] | _ -> [] let get_frame_x p0= let rec helper p= match p with | BForm (b,_) -> get_frame_b_form b | And (b1,b2,_) -> (he...
8cc33f783a3d2d97941ce2819436b9311f70efe99ddd38885697845c2ae2f5cb
bitonic/anapo
VDOM.hs
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} module Anapo.VDOM ( Node , NodeBody(..) , node , setNodeMark , addNodeCallback , AddCallback(..) , NormalChildren , normalChildren , pushNormalChild , normalChildrenLength , KeyedChildren ...
null
https://raw.githubusercontent.com/bitonic/anapo/8f3c020973d16cecb5ee83a03d91fb00294d34c7/anapo/src/Anapo/VDOM.hs
haskell
# LANGUAGE DeriveTraversable # ^ tag crashes if we do not have an element inside.
# LANGUAGE CPP # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # module Anapo.VDOM ( Node , NodeBody(..) , node , setNodeMark , addNodeCallback , AddCallback(..) , NormalChildren , normalChildren , pushNormalChild , normalChildrenLength , KeyedChildren , keyedChildren , pushKeyedChild ...
0ba44f9e3887504f67c0a24c243256b54b42e5a06ff3dc7a0f2aa7bf58ceb4be
jjtolton/rocinante
main.cljs
(ns {{base}}.views.main (:require [{{base}}.events :as events] [{{base}}.reactions :as rx] [{{base}}.data :as data] [{{base}}.lib.utils :as utils] [{{base}}.lib.data.ds :as ds])) (defn todo-table [items] [:table {:style {:flex-grow 3}} [:thead [:tr [:...
null
https://raw.githubusercontent.com/jjtolton/rocinante/625b1c5309b7f01d9f48af8d4df8f55b1ee97158/src/clj/new/rocinante/src/cljs/base/views/main.cljs
clojure
(ns {{base}}.views.main (:require [{{base}}.events :as events] [{{base}}.reactions :as rx] [{{base}}.data :as data] [{{base}}.lib.utils :as utils] [{{base}}.lib.data.ds :as ds])) (defn todo-table [items] [:table {:style {:flex-grow 3}} [:thead [:tr [:...
41003663c07e27f00c317e670abda642f7477bafd34752d5bb049af3b5af5040
nickzuber/lets-make-a-compiler
typecheck.ml
open Ast open Ast.Standard exception Type_error of string exception Program_error of string exception Incorrect_step of string exception Attempted_to_typecheck_macro let hashtbl_find_with_error tbl key ?(error="") = try Hashtbl.find tbl key with | Not_found -> raise (Type_error error) let typed_cmp_of_stan...
null
https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/src/transformers/typecheck.ml
ocaml
Derive the type from a Standard expression. Create a new env for the function which includes all of the previous scope and its parameters as variables. Confirm that argument types match parameter signature. Confirm that return type matches body expression. Env is a mapping from variable name to type. Since...
open Ast open Ast.Standard exception Type_error of string exception Program_error of string exception Incorrect_step of string exception Attempted_to_typecheck_macro let hashtbl_find_with_error tbl key ?(error="") = try Hashtbl.find tbl key with | Not_found -> raise (Type_error error) let typed_cmp_of_stan...
f7148a0dac7fd1a032f867d6c408e1e4234cd273c8cb4f62837d3c9f663cf40c
jguhlin/ODG
uniprot.clj
(ns odg.uniprot (:require [clojure.data.xml :as xml] [clojure.java.io :as io] [clojure.data.zip :as zip] [clojure.data.zip.xml :as zipx] [clojure.zip :as czip] [clojure.core.reducers :as r])) ; in development #_(defn- species-filter [x] (cond (= ...
null
https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/src/odg/uniprot.clj
clojure
in development [config opts args] (if (species-filter organism)
(ns odg.uniprot (:require [clojure.data.xml :as xml] [clojure.java.io :as io] [clojure.data.zip :as zip] [clojure.data.zip.xml :as zipx] [clojure.zip :as czip] [clojure.core.reducers :as r])) #_(defn- species-filter [x] (cond (= x "Medicago trunc...
b6748ee4a9b47f18792d4eeabf941220b2b95a8cce1efa67a611a551fbdc0deb
Frama-C/Frama-C-snapshot
sparecode_params.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/sparecode/sparecode_params.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
70a22d6e04d84052f40129550219a4d44252fc7917729f5901bd1485ab64c1da
racket/typed-racket
any-wrap.rkt
#lang racket/base (require racket/match racket/contract/combinator racket/class racket/unit racket/fixnum racket/flonum racket/extflonum racket/set racket/undefined (only-in racket/async-channel async-channel?) (only-in ffi/unsafe cpointer-predicate-procedure?) ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/utils/any-wrap.rkt
racket
Base since they can only store strings Bounded polymorphism would again make these not flat, but would be unsound since the external OS can change them Base values because you can only store flonums/fixnums in these and not any higher-order values. This isn't sound if we ever TODO: async-channel and special-comme...
#lang racket/base (require racket/match racket/contract/combinator racket/class racket/unit racket/fixnum racket/flonum racket/extflonum racket/set racket/undefined (only-in racket/async-channel async-channel?) (only-in ffi/unsafe cpointer-predicate-procedure?) ...
25442489ae1079297703e7fbb5c8a056f5d93a1b3adb7edeb64686227df8ef96
monadbobo/ocaml-core
linebuf.ml
(** A module for reading files. *) open Core.Std Integer we use for file positions in this module . Makes it easier to switch between regular native integers and 64 bit integers . regular native integers and 64 bit integers. *) module Pos_int = Int64 let max_null_retries = 20 type lnum = Known of int |...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/linebuf.ml
ocaml
* A module for reading files. * The type of a linebuf. * The channel we maintain. * Current file position. * Current line position, if known * Closed or open. * The inode number of the current file * File name. * close and reopen the file if it is deleted and rec...
open Core.Std Integer we use for file positions in this module . Makes it easier to switch between regular native integers and 64 bit integers . regular native integers and 64 bit integers. *) module Pos_int = Int64 let max_null_retries = 20 type lnum = Known of int | Unknown with sexp_of;; ...
d46780d8a0bc56d6994c415da5dfadf5a76bff156748ba495faab87775c7be2d
shirok/WiLiKi
auth.scm
;;; wiliki.auth ;;; Copyright ( c ) 2010 < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;;; including without limitation the rights to ...
null
https://raw.githubusercontent.com/shirok/WiLiKi/c910d5d936c833887f7c7bc99e0e681e262b5334/src/wiliki/auth.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of furnished to do so, subject to the following conditions: ...
wiliki.auth Copyright ( c ) 2010 < > files ( the " Software " ) , to deal in the Software without restriction , the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF A...
c5e1e82e2da584892c04df683740a6d9bc97e86e600a2eb24e098a56656e4716
LeventErkok/sbv
Quantifiers.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Basics.Quantifiers Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Various combinations of quantifiers -----------------------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/0d791d9f4d1de6bd915b6d7d3f9a550385cb27a5/SBVTestSuite/TestSuite/Basics/Quantifiers.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Basics.Quantifiers License : BSD3 Maintainer: Stability : experimental Various combinations of quantifiers --------------------------------------------------------------------------- # OPTIONS_GHC -Wall -Werror...
Copyright : ( c ) # LANGUAGE FlexibleContexts # module TestSuite.Basics.Quantifiers(tests) where import Control.Monad (void) import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Basics.Quantifiers" $ concatMap mkGoal goals ++ concatMap mkPred preds where mkGoal (g, nm) = [ goldenCapturedIO ("...
a5c8d341af62c0afcfb29e2192651df09bed433b6e03a4fafbd97a6e94d2e2b6
rmculpepper/crypto
pkey.rkt
Copyright 2012 - 2018 Copyright 2007 - 2009 < vyzo at media.mit.edu > ;; ;; This library is free software: you can redistribute it and/or modify ;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your optio...
null
https://raw.githubusercontent.com/rmculpepper/crypto/63e131c06d54756c3f36833ad0b700d56d6a75c8/crypto-lib/private/libcrypto/pkey.rkt
racket
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright 2012 - 2018 Copyright 2007 - 2009 < vyzo at media.mit.edu > by the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License #lang racket/base (require ffi/unsafe ...
e7d33c9caae2df8c0d080f62392817b4cd80c64c8a09eeddfae4b61658af81de
vikram/lisplibraries
rundemo.lisp
;(push #p"/usr/lib/sbcl/site/cl-weblocks/" asdf:*central-registry*) (push #p"/path/to/the/demo/root/dir/weblocks-demo-popover/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :weblocks-demo-popover) (weblocks-demo-popover:start-weblocks-demo-popover :debug t)
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/contrib/yarek/examples/weblocks-demo-popover/rundemo.lisp
lisp
(push #p"/usr/lib/sbcl/site/cl-weblocks/" asdf:*central-registry*)
(push #p"/path/to/the/demo/root/dir/weblocks-demo-popover/" asdf:*central-registry*) (asdf:operate 'asdf:load-op :weblocks-demo-popover) (weblocks-demo-popover:start-weblocks-demo-popover :debug t)
5a9e3577f201ab66538042ae7b2be4840b8da621b7c6d8359cb6a0e93b4df0f1
fyquah/hardcaml_zprize
ntt_competition_reference.mli
(** Port of the reference implementation provided by the competition organisers. *) open Base module Make (Gf : Hardcaml_ntt.Gf.S) : sig val ntt : Gf.t array -> unit end
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/ntt/hardcaml/test/ntt_competition_reference.mli
ocaml
* Port of the reference implementation provided by the competition organisers.
open Base module Make (Gf : Hardcaml_ntt.Gf.S) : sig val ntt : Gf.t array -> unit end
cc0b9591591a4ff82d8ef3064b231e6c37538b80ff9c72c59d1023d45e252111
pirapira/coq2rust
fileOps.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/ide/fileOps.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Ideutils let prefs = Pr...
e2a94b129cf4e9c23cecb188f909e5f12fc42d87b563048c776b768db18b0a3d
bennn/dissertation
utils.rkt
#lang typed/racket/base (provide hyphenate-quad quad-map split-quad add-vert-positions compute-line-height quad-attr-set group-quad-attr-set quad-attr-set* group-quad-attr-set* quad-attr-remove* group-quad-attr-remove* merge-attrs flatten-quad flatten-quadtree attr-change split-last f...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadT/typed/utils.rkt
racket
----------------------------------------------------------------------------- ============================================================================= does not resolve duplicates (see merge-attrs for that) merge uses join-attrs to concatenate attributes, but then resolves duplicates, with later ones overridin...
#lang typed/racket/base (provide hyphenate-quad quad-map split-quad add-vert-positions compute-line-height quad-attr-set group-quad-attr-set quad-attr-set* group-quad-attr-set* quad-attr-remove* group-quad-attr-remove* merge-attrs flatten-quad flatten-quadtree attr-change split-last f...
50ea83051a28bc759fc914df5aedb2ebd8e48969c900b0c9491e066d5174bd0c
facebook/duckling
Types.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE NoRebindab...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Duration/Types.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # | Convert a duration to the given grain, rounded to the
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE NoRebindableSyntax # # LANGUAGE TypeFamilies # module Duckling.Duration.Types where import Control.DeepSeq import Data.Aeson import Data.Hashable import Data.Semigroup import Data.Text (Text) import ...
1586885ab1c693e178bfeadf0786a7c182ca6e9182f6d6e38bc35db4a7604f96
dmwit/encoding
Tester.hs
# LANGUAGE ExistentialQuantification , ImplicitParams # module Test.Tester where import Data.Encoding import Data.Encoding.UTF8 import Test.HUnit import Data.Word import Data.Char import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import Test.QuickCheck hiding (Testable) import Prelude...
null
https://raw.githubusercontent.com/dmwit/encoding/e2878609af229368808f540809cb3e2dc8d00b6c/tests/Test/Tester.hs
haskell
bsrc @=? (encodeLazyByteString enc str_trg)
# LANGUAGE ExistentialQuantification , ImplicitParams # module Test.Tester where import Data.Encoding import Data.Encoding.UTF8 import Test.HUnit import Data.Word import Data.Char import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import Test.QuickCheck hiding (Testable) import Prelude...
a7a9e86c9a83cdc8f0496741cefa9832e14019d2d2ec5b381ae248f4e60199bf
lipas-liikuntapaikat/lipas
permissions.cljc
(ns lipas.permissions (:require [clojure.spec.alpha :as s] [lipas.schema.core])) (def default-permissions {:draft? true}) (def draft? "All users are allowed to make drafts of any sports-sites in any city." (constantly true)) (defn- access-to-sports-site? [{:keys [sports-sites]} sports-site] (let [lip...
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljc/lipas/permissions.cljc
clojure
Explicitly Implicitly
(ns lipas.permissions (:require [clojure.spec.alpha :as s] [lipas.schema.core])) (def default-permissions {:draft? true}) (def draft? "All users are allowed to make drafts of any sports-sites in any city." (constantly true)) (defn- access-to-sports-site? [{:keys [sports-sites]} sports-site] (let [lip...
41511c73b15f8c11c5e2eb09c17f9cc7506c539580940d1010d33051c5b1e630
gonzojive/sbcl
timer.impure.lisp
This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in the public domain and is provided with ;;;;...
null
https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/tests/timer.impure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. forever. running out of stack (due to repeating timers being rescheduled before they ran) ...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (in-package "CL-USER") (use-package :test-util) (with-test (:name :heap) (let* ((size 1000) (heap (make-array size :adjustable t :fill-pointer 0)) ...
1ac94cecc158ab14f86f76a96a7001aecbc8474906563508d7fc25ee6fa0ebf8
ygrek/mldonkey
gui_progress.ml
class progress () = let win = GWindow.window ~width:400 ~height:20 ~allow_shrink:true ~allow_grow:true ~auto_shrink:true ~modal:false () in let hbox = GPack.hbox ~homogeneous:false ~packing:(win#add) () in let wpb = GRange.progress_bar ~packing:(hbox#pack ~expand:true ~fill:true) () in let wb_...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/gui/gui_progress.ml
ocaml
class progress () = let win = GWindow.window ~width:400 ~height:20 ~allow_shrink:true ~allow_grow:true ~auto_shrink:true ~modal:false () in let hbox = GPack.hbox ~homogeneous:false ~packing:(win#add) () in let wpb = GRange.progress_bar ~packing:(hbox#pack ~expand:true ~fill:true) () in let wb_...
bc62374cb8ba9549020c227a43e6fe722d9acd3af711fe9d2fb3137760cd71d3
Kakadu/fp2022
ast.ml
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later type identifier = string type params = identifier list type modifier = | Local | Class type value = | Integer of int | Float of float | String of string | Bool of bool | Void type arith_op = | Add | Sub | Mul | ...
null
https://raw.githubusercontent.com/Kakadu/fp2022/27ec5cd84ad68b54bb1c7191bab59320684386ab/Python/lib/ast.ml
ocaml
* Copyright 2021 - 2022 , * SPDX - License - Identifier : LGPL-3.0 - or - later type identifier = string type params = identifier list type modifier = | Local | Class type value = | Integer of int | Float of float | String of string | Bool of bool | Void type arith_op = | Add | Sub | Mul | ...
9125f96268b923d156e1f79bcb2d1fe43ca9ec722350f78d66969ff7dad42384
verse-lab/ego
test_generic.ml
open Ego.Generic let sexp = (module struct type t = Sexplib.Sexp.t let pp = Sexplib.Sexp.pp_hum let equal = Sexplib.Sexp.equal end : Alcotest.TESTABLE with type t = Sexplib.Sexp.t) module L = struct type 'a shape = Add of 'a * 'a | Sub of 'a * 'a | Mul of 'a * 'a | Div of 'a * 'a | ...
null
https://raw.githubusercontent.com/verse-lab/ego/5daf312f8a444f9abcde5996c671b9282727a972/test/test_generic.ml
ocaml
only safe to do this rewrite if x isn't 0
open Ego.Generic let sexp = (module struct type t = Sexplib.Sexp.t let pp = Sexplib.Sexp.pp_hum let equal = Sexplib.Sexp.equal end : Alcotest.TESTABLE with type t = Sexplib.Sexp.t) module L = struct type 'a shape = Add of 'a * 'a | Sub of 'a * 'a | Mul of 'a * 'a | Div of 'a * 'a | ...
d71c303555a6f925365f676851b2ddd05524711d3fe7891be9f275ee9848a215
paurkedal/episql
update_builder.ml
Copyright ( C ) 2021 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/episql/79a6b6e65a0917292fdc02bcb5d7f972078dffa2/caqti-persist/lib/update_builder.ml
ocaml
Copyright ( C ) 2021 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
8f1e4dcade4d1ebde88b43254cc28ce5007f9401afc8a4cbfb91d9018b6085f5
fluree/db
fql.cljc
(ns fluree.db.query.fql (:require [clojure.core.async :as async :refer [<! go]] [fluree.db.util.core :as util] [fluree.db.util.log :as log :include-macros true] [fluree.db.util.core #?(:clj :refer :cljs :refer-macros) [try* catch*]] [fluree.db.query.subject-crawl.core :...
null
https://raw.githubusercontent.com/fluree/db/9e9718b11e954c47621ea2c4651105f6d0765535/src/fluree/db/query/fql.cljc
clojure
TODO - if a cache value exists, should max-fuel still be checked and throw if not enough? object cache takes (a) key and (b) fn to retrieve value if null allow caching of some functions when available
(ns fluree.db.query.fql (:require [clojure.core.async :as async :refer [<! go]] [fluree.db.util.core :as util] [fluree.db.util.log :as log :include-macros true] [fluree.db.util.core #?(:clj :refer :cljs :refer-macros) [try* catch*]] [fluree.db.query.subject-crawl.core :...
6a3813326593bf72f575d0d30acd8612fc6fac3e51c07857e1ad889a60674c71
Gizra/ihp-simple-seat-reservation
Events.hs
module Web.Controller.Events where import Web.Controller.Prelude import Web.View.Events.New import Web.View.Events.Edit import Web.View.Events.Show instance Controller EventsController where action NewEventAction { venueId } = do current <- getCurrentTime let event = newRecord |> s...
null
https://raw.githubusercontent.com/Gizra/ihp-simple-seat-reservation/a779754064ccbfc9c6fc23c8bb013764ab4a157d/Web/Controller/Events.hs
haskell
module Web.Controller.Events where import Web.Controller.Prelude import Web.View.Events.New import Web.View.Events.Edit import Web.View.Events.Show instance Controller EventsController where action NewEventAction { venueId } = do current <- getCurrentTime let event = newRecord |> s...
b78b4e0fe85890e11bf1cbdaf8bb0669eea17a279fbf7847b3d0d5239bf8a8dc
sebhoss/finj
share_price.clj
; Copyright © 2013 < > ; This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License , Version 2 , as published by . See / for more details . ; (ns finj.share-price "A share price is the price of a single share of a number of saleable stoc...
null
https://raw.githubusercontent.com/sebhoss/finj/7c27cb506528642a6e8a673be1b9a49d68e533e5/src/main/clojure/finj/share_price.clj
clojure
This work is free. You can redistribute it and/or modify it under the
Copyright © 2013 < > terms of the Do What The Fuck You Want To Public License , Version 2 , as published by . See / for more details . (ns finj.share-price "A share price is the price of a single share of a number of saleable stocks of a company, derivative or other financial asset. References: ...
8c2fdc7d51283a923305869743f99812b5125a046677d2e7f28613b34f282e6d
sicmutils/sicmutils
brent.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.numerical.unimin.brent "This namespace contains an implementation of Brent's method for finding the minimum of a real-valued function." (:require [sicmutils.generic :as g] [sicmutils.numbers] [sicmutils.numerical.unimin.bracket :as ub] ...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/src/sicmutils/numerical/unimin/brent.cljc
clojure
tiny delta? a and b bound the interval in which the minimizer is searching. `xx` is the current candidate point, and `fx` is its value. iteration and its candidate point. This value is used by `parabola-valid?` to decide whether or not it's appropriate to proceed with the parabolic step, or fall back to a golde...
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.numerical.unimin.brent "This namespace contains an implementation of Brent's method for finding the minimum of a real-valued function." (:require [sicmutils.generic :as g] [sicmutils.numbers] [sicmutils.numerical.unimin.bracket :as ub] ...
4283b11bab616b9ba570b1c40621e8197d1d2f46e23b579d3791a7dd27027ed2
walck/learn-physics
StateSpace.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE Safe #-} # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wall -fno - warn - orphans # -- | Module : Physics . Learn . StateSpace Copyright : ( c ) 2014 - 2019 --License : BSD3 (see LICENSE) Maintainer : < > --Stability : ...
null
https://raw.githubusercontent.com/walck/learn-physics/5f30d1de269c4b66bca996b0c0bdd0e7a3de56fd/src/Physics/Learn/StateSpace.hs
haskell
# LANGUAGE Safe # | License : BSD3 (see LICENSE) Stability : experimental has scalars that are instances of 'Fractional'. 'Diff' p is intended to represent the space of (time) derivatives of paths in p. variables for a differential equation. of the state. The associated vector space is a linearized ve...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wall -fno - warn - orphans # Module : Physics . Learn . StateSpace Copyright : ( c ) 2014 - 2019 Maintainer : < > A ' StateSpace ' is an affine space where the associated vector space If p is a...
4268e4ec06f1553955966bbd372922626b552c999c59cb16f54dbb5ca6425e75
OCamlPro/ocplib-i18n
ocplib_i18n.mli
Copyright ( c ) 2018 OCamlPro * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to deal * in the Software without restriction , including without limitation the rights * to use , copy , modify ...
null
https://raw.githubusercontent.com/OCamlPro/ocplib-i18n/1d6097c4eeda383f43b80441f53dc00fc26c77be/src/ocplib_i18n.mli
ocaml
* Lists all the supported languages * Gets the right index from the given array for the currently selected language (should be used by the preprocessor only)
Copyright ( c ) 2018 OCamlPro * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to deal * in the Software without restriction , including without limitation the rights * to use , copy , modify ...
83e08d466fe6f734065115189eae83c7abd789974c9c6c33fab1ee1adc68d0a2
mejgun/haskell-tdlib
UnpinChatMessage.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.UnpinChatMessage where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | -- Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @ch...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/UnpinChatMessage.hs
haskell
# LANGUAGE OverloadedStrings # | | Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id Identifier of the chat @message_id Identifier of the removed pinned message | |
module TD.Query.UnpinChatMessage where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U data UnpinChatMessage = UnpinChatMessage message_id :: Maybe Int, chat_id :: Maybe Int } deriving (Eq) instance Show UnpinChatMessage where show UnpinChatMessa...
fb1e7a21675132559b9471f264305e45c829fe50ca385196a708115a8342d024
williamleferrand/accretio
object_playbook.ml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/graph/object_playbook.ml
ocaml
* Accretio is an API , a sandbox and a runtime for social playbooks * * Copyright ( C ) 2015 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation , either version 3 o...
50d134bff25c3dadbe2cf91934e064a1caaf6657610904a7578444a62957c530
karimarttila/clojure
test_config.clj
(ns simpleserver.test-config (:require [clojure.tools.logging :as log] [clojure.pprint] [integrant.core :as ig] [clj-http.client :as http-client] [simpleserver.core :as core] NOTE : Now force load the multimethods . ;; NOTE: If you later add new data stores you have to add them here! *******...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/re-frame-demo/test/clj/simpleserver/test_config.clj
clojure
NOTE: If you later add new data stores you have to add them here! ************************** Overriding the port with random port, see TODO below. In Postgres test setup use simpleserver_test database. No nrepl needed in tests. If used, use other port than the main system. And you lose the reference to the web ser...
(ns simpleserver.test-config (:require [clojure.tools.logging :as log] [clojure.pprint] [integrant.core :as ig] [clj-http.client :as http-client] [simpleserver.core :as core] NOTE : Now force load the multimethods . [simpleserver.test-utils.csv-utils] [simpleserver.test-utils.dynamodb-ut...
b1a17b4f547762fb3b87b662d5d6cc3208f9099a25cb71d4ae6728f9eaa1b513
dfinity/motoko
source.mli
type pos = {file : string; line : int; column : int} type region = {left : pos; right : pos} type ('a, 'b) annotated_phrase = {at : region; it : 'a; mutable note: 'b} type 'a phrase = ('a, unit) annotated_phrase val no_pos : pos val no_region : region val string_of_pos : pos -> string val string_of_region : region ->...
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/lang_utils/source.mli
ocaml
type pos = {file : string; line : int; column : int} type region = {left : pos; right : pos} type ('a, 'b) annotated_phrase = {at : region; it : 'a; mutable note: 'b} type 'a phrase = ('a, unit) annotated_phrase val no_pos : pos val no_region : region val string_of_pos : pos -> string val string_of_region : region ->...
ab77958a9df33bce943ce8073cd3305ae908e26eb80df1860a73ede52854b357
ocaml-multicore/domainslib
task_throughput.ml
let n_domains = try int_of_string Sys.argv.(1) with _ -> 1 let n_iterations = try int_of_string Sys.argv.(2) with _ -> 1024 let n_tasks = try int_of_string Sys.argv.(3) with _ -> 1024 module T = Domainslib.Task module TimingHist = struct type t = { data: int array; min_n: int; max_n: int; mutable c...
null
https://raw.githubusercontent.com/ocaml-multicore/domainslib/94abdda583bbdd2a08b9dcef8689a315fb48afb8/test/task_throughput.ml
ocaml
let n_domains = try int_of_string Sys.argv.(1) with _ -> 1 let n_iterations = try int_of_string Sys.argv.(2) with _ -> 1024 let n_tasks = try int_of_string Sys.argv.(3) with _ -> 1024 module T = Domainslib.Task module TimingHist = struct type t = { data: int array; min_n: int; max_n: int; mutable c...
e1925c6c45efb5fc24251e32f61b245f0e4793beae1dcebac592794cf25e5c48
EveryTian/Haskell-Codewars
Triangle.hs
module Triangle (rows) where rows :: Int -> [[Integer]] rows = reverse . rows' where rows' n | n <= 0 = [] | n == 1 = [[1]] | otherwise = let row@(r0:_) = rows' (n - 1) in (1 : nextRowTail r0) : row nextRowTail [x] = [1] next...
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/pascals-triangle/src/Triangle.hs
haskell
module Triangle (rows) where rows :: Int -> [[Integer]] rows = reverse . rows' where rows' n | n <= 0 = [] | n == 1 = [[1]] | otherwise = let row@(r0:_) = rows' (n - 1) in (1 : nextRowTail r0) : row nextRowTail [x] = [1] next...
ebe3ab69cf370e3dec0e49d40d7633eaeb757a4d28e03d92f8b852f58402baa8
nickzuber/infrared
function_returns_refinement.ml
open InfraredParser.Ast open TypedInfraredAst exception Unexpected_compiler_phase of string exception Unexpected_function_data_type of string let get_type tbl key = try Hashtbl.find tbl key with _ -> Generic "unable-to-find-this-type-this-is-a-bug" let rec flatten_statement (statement : statement) : statement li...
null
https://raw.githubusercontent.com/nickzuber/infrared/904263ad9ee425c536937a48e0c70217e4298257/InfraredCompiler/transformers/function_returns_refinement.ml
ocaml
The environment is just mutated here and it doesn't actually conver this into a * typed program. This is important because this phase happens before we begin to * typify the program. Function declarations are statements, so they don't actually * have a "type" like an expression would, but rather defines an identifi...
open InfraredParser.Ast open TypedInfraredAst exception Unexpected_compiler_phase of string exception Unexpected_function_data_type of string let get_type tbl key = try Hashtbl.find tbl key with _ -> Generic "unable-to-find-this-type-this-is-a-bug" let rec flatten_statement (statement : statement) : statement li...
fd01a227ae4fd628e073ecd2fe8c7166fde5fcd2558d2fe1880fcddf9e3c5eb5
plow-technologies/ocaml-export
Decode.hs
| Module : OCaml . BuckleScript . Decode Description : Make a JSON decoder for an OCamlDatatype that matches Generic aeson FromJSON Copyright : Plow Technologies , 2017 License : : Stability : experimental Module : OCaml.BuckleScript.Decode Description : Make a JSON decoder for ...
null
https://raw.githubusercontent.com/plow-technologies/ocaml-export/752167f5df37d43534d27d9f63bb512eec1e750d/src/OCaml/BuckleScript/Decode.hs
haskell
# LANGUAGE OverloadedStrings # base aeson containers text wl-pprint ocaml-export | Convert a 'Proxy a' into OCaml type to decode JSON function source code with an interface file '.mli'. | Convert a 'Proxy a' into OCaml type to decode JSON function source code without an interface file '.mli'. | Render OCamlDat...
| Module : OCaml . BuckleScript . Decode Description : Make a JSON decoder for an OCamlDatatype that matches Generic aeson FromJSON Copyright : Plow Technologies , 2017 License : : Stability : experimental Module : OCaml.BuckleScript.Decode Description : Make a JSON decoder for ...
eecc572b72bcde479af701111cc8a6d62c18abf1bb30f382eaac2d916e3ac059
semiocast/pgsql
pgsql_connection.erl
%% @doc PostgreSQL connection (high level functions). -module(pgsql_connection). -vsn("9"). -behaviour(gen_server). -include("pgsql_internal.hrl"). -export([ % API open/1, open/2, open/3, open/4, open/5, close/1, % Native API simple_query/2, simple_query/3, simple_query/4,...
null
https://raw.githubusercontent.com/semiocast/pgsql/c7d98673459052b2c48526f16dab11ab34c23891/src/pgsql_connection.erl
erlang
@doc PostgreSQL connection (high level functions). API Native API Subscribe to notifications. Compatibility (deprecated) API supervisor API gen_server API url parser -------------------------------------------------------------------- Default settings -----------------------------------------------------------...
-module(pgsql_connection). -vsn("9"). -behaviour(gen_server). -include("pgsql_internal.hrl"). -export([ open/1, open/2, open/3, open/4, open/5, close/1, simple_query/2, simple_query/3, simple_query/4, extended_query/3, extended_query/4, extended_query/5, batch_qu...
c7794898ee1fc6347bb7c08cc0790c072ce8d15f110e25d2966d78fd36e9d83d
racket/typed-racket
safe-vector-untyped.rkt
#lang racket/base (require "safe-vector.rkt") (define len 50) (define (run-safe-ref-test) (define vec (make-vector len 0)) (collect-garbage) (collect-garbage) (collect-garbage) (time (for*/sum ([_ (in-range 10000)] [i (in-range len)]) (safe-vector-ref vec i)))) (define (run-s...
null
https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/safe-vector-untyped.rkt
racket
don't let the optimizer get too excited (try and hide exactly what the ref and set functions are) Example results Racket v6.10.1.1 vector-ref: safe-vector-ref: vector-set!: safe-vector-set!:
#lang racket/base (require "safe-vector.rkt") (define len 50) (define (run-safe-ref-test) (define vec (make-vector len 0)) (collect-garbage) (collect-garbage) (collect-garbage) (time (for*/sum ([_ (in-range 10000)] [i (in-range len)]) (safe-vector-ref vec i)))) (define (run-s...
3683fd0dfc55b1078adc2b3fbdb7bc561617b49d5355f9b3d9c18b9503408b4c
mirage/colombe
encoder.ml
type encoder = { payload : Bytes.t; mutable pos : int } let pp ppf _t = Fmt.string ppf "#encoder" type error = [ `Not_enough_space ] let pp_error ppf `Not_enough_space = Fmt.string ppf "No enough space" type 'err state = | Write of { buffer : string; off : int; len : int; continue : int ->...
null
https://raw.githubusercontent.com/mirage/colombe/bbecbb17b581fa1db70a61de14efb51a66f30451/src/encoder.ml
ocaml
type encoder = { payload : Bytes.t; mutable pos : int } let pp ppf _t = Fmt.string ppf "#encoder" type error = [ `Not_enough_space ] let pp_error ppf `Not_enough_space = Fmt.string ppf "No enough space" type 'err state = | Write of { buffer : string; off : int; len : int; continue : int ->...
aedc2289e6f14c6744a469ee57bc9db149b865fbc3e628403912b5fd54172bb7
rizo/snowflake-os
clambda.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/clambda.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Asttypes open Lambda ty...
3f7b7825456cb43d09e2cfbb43ed68730db993c94f7467a351c955cb583bde6d
AdRoll/rebar3_hank
not_included_behaviour.erl
-module(not_included_behaviour). -callback the_not_included() -> any(). -export([the_not_included/1]). the_not_included(M) -> M:the_not_included().
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/3d274bc20d0041907a2a6f37fb4d52cddc720ba0/test/files/unnecessary_function_arguments/not_included_behaviour.erl
erlang
-module(not_included_behaviour). -callback the_not_included() -> any(). -export([the_not_included/1]). the_not_included(M) -> M:the_not_included().
0462888d2279fd7562e7de2535d8284923f7e91a6c3c53646721ec5633a5b097
bugsbio/lein-tern
core.clj
(ns postgres-project.core)
null
https://raw.githubusercontent.com/bugsbio/lein-tern/1496cc11fb343393416cc62fd874cd2fb634b2f3/examples/postgres-project/src/postgres_project/core.clj
clojure
(ns postgres-project.core)
791bfbe42cf210a0396e1a14cb7938a2ff472ad50b9553c6f01bff2283c02aec
ceramic/ceramic
resource.lisp
(in-package :cl-user) (defpackage ceramic.resource (:use :cl) (:import-from :ceramic.error :no-such-tag) (:import-from :ceramic.runtime :*releasep* :executable-relative-pathname) (:export :define-resources :resource-directory :resource ...
null
https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/src/resource.lisp
lisp
Resources Define resources Find resources Find the pathname relative to the executable pathname Return the original pathname
(in-package :cl-user) (defpackage ceramic.resource (:use :cl) (:import-from :ceramic.error :no-such-tag) (:import-from :ceramic.runtime :*releasep* :executable-relative-pathname) (:export :define-resources :resource-directory :resource ...
41c96e60f884416c53475fd9efe3719ff2df3d9c3fde8b3504fe1a12da9430cc
racket/redex
wed-aft.rkt
#lang racket turn standard reduction into a 3 - register machine in three stages : ;; -- separate evaluation contexts from in-focus expresssion (CC) -- use a stack data structure instead of a context data structure ( CK ) ;; -- delay substitution and use environment instead ;; -----------------------------------...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-doc/redex/scribblings/long-tut/code/wed-aft.rkt
racket
-- separate evaluation contexts from in-focus expresssion (CC) -- delay substitution and use environment instead ------------------------------------------------------- ------------------------------------------------------- ======================================================= ================================...
#lang racket turn standard reduction into a 3 - register machine in three stages : -- use a stack data structure instead of a context data structure ( CK ) (require redex "common.rkt" "close.rkt") (define-extended-language Lambda/v Lambda (e ::= .... n +) (n ::= integer) (v ::= n + (lambda (x ...) e))) (d...
534c41cab1a875ebbafdb2a0851f3556b7ad33b7af26e097c7c87c2267f6f0ff
clj-easy/graalvm-clojure
project.clj
(defproject nippy "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.3"] [com.taoensso/nippy "2.14.0"]] :main simple.main :uberjar-name "simple-main.jar" :profiles {:uberjar {:aot :all} :dev {:plugins [[lein-shell "0.5.0"]]}} :aliases {"native" ["shell" "nat...
null
https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/nippy/project.clj
clojure
(defproject nippy "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.3"] [com.taoensso/nippy "2.14.0"]] :main simple.main :uberjar-name "simple-main.jar" :profiles {:uberjar {:aot :all} :dev {:plugins [[lein-shell "0.5.0"]]}} :aliases {"native" ["shell" "nat...
0d0fcf2d3b8479503f2545ed19f5f695312345d802f0e8ba9823fd60765be316
ucsd-progsys/nate
Camlp4AstLifter.ml
camlp4r (****************************************************************************) (* *) (* Objective Caml *) (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4Filters/Camlp4AstLifter.ml
ocaml
************************************************************************** Objective Caml ...
camlp4r Copyright 2006 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with the special Authors : * - : initial version * - Nicolas Pouillard: initial ...
26572dde87aa34caa2138b3f8c23626c31f00078802d7a54e27c714bcc9062c1
NelosG/fp-tests
T5Spec.hs
module T5Spec ( tests ) where import Data.List.NonEmpty (NonEmpty ((:|))) import Hedgehog (Gen, Property, forAll, property, (===)) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec (Spec, describe, it, shouldBe) import Test.Tasty (TestTree, testGroup) import Test.Tasty...
null
https://raw.githubusercontent.com/NelosG/fp-tests/7e2af5c3c3279c2045662faaff8e5f895af6af6a/hw1/test/T5/T5Spec.hs
haskell
module T5Spec ( tests ) where import Data.List.NonEmpty (NonEmpty ((:|))) import Hedgehog (Gen, Property, forAll, property, (===)) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec (Spec, describe, it, shouldBe) import Test.Tasty (TestTree, testGroup) import Test.Tasty...
a34f260fed5e3bb09bfd111313b92afbfa0248dc153ff61b51e4465166a0db22
AlacrisIO/legicash-facts
rlp.mli
A Datatype for items type rlp_item = RlpItem of string | RlpItems of rlp_item list [@@deriving show] val rlp_item_of_rlp_item : rlp_item -> rlp_item val rlp_item_to_rlp_item : rlp_item -> rlp_item (* An exception for unmarshalling errors *) exception Rlp_unmarshaling_error of string * int * string The three t...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/ppx_deriving_rlp/src/rlp.mli
ocaml
An exception for unmarshalling errors
A Datatype for items type rlp_item = RlpItem of string | RlpItems of rlp_item list [@@deriving show] val rlp_item_of_rlp_item : rlp_item -> rlp_item val rlp_item_to_rlp_item : rlp_item -> rlp_item exception Rlp_unmarshaling_error of string * int * string The three tuple values represent : * the message ...
74bcabbd95cf8144e64056c3c0c8719cafef35a4205b64054907b6d6afb58430
input-output-hk/cardano-ledger
Block.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Byron.Spec.Chain.STS.Block where import Byron.Spec.Ledger.C...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/chain/executable-spec/src/Byron/Spec/Chain/STS/Block.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # ^ Hash of the previous block header, or 'genesisHash' in case of ^ Absolute slot for which the block was generated. ^ Block issuer. ^ Part of the block header which must be signed. ^ UTxO hash ^ Delegation hash ^ Update payl...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # module Byron.Spec.Chain.STS.Block where import Byron.Spec.Ledger.Core (Hash (Hash), Sig (Sig), Slot, VKey, hash, owner) import Byron.Spec.Ledger.Delegation import Byro...
89fd18e8ce151a149709b70ae5466777c9cd5fcc7eab97b7ea1e67c5a6cf96f5
coord-e/mlml
list.ml
let rec length = function [] -> 0 | _ :: t -> 1 + length t let cons h t = h :: t let hd = function h :: _ -> h | [] -> failwith "hd" let tl = function _ :: t -> t | [] -> failwith "tl" let rec nth_opt l i = match l, i with h :: _, 0 -> Some h | _ :: t, i -> nth_opt t (i - 1) | _ -> None ;; let nth l i = match nth_o...
null
https://raw.githubusercontent.com/coord-e/mlml/ec34b1fe8766901fab6842b790267f32b77a2861/stdlib/list.ml
ocaml
quick sort
let rec length = function [] -> 0 | _ :: t -> 1 + length t let cons h t = h :: t let hd = function h :: _ -> h | [] -> failwith "hd" let tl = function _ :: t -> t | [] -> failwith "tl" let rec nth_opt l i = match l, i with h :: _, 0 -> Some h | _ :: t, i -> nth_opt t (i - 1) | _ -> None ;; let nth l i = match nth_o...
810c44030ee267cfda5088a03686a6f5afdb28a6e3d72692596c552c538cbf0f
BranchTaken/Hemlock
test_div_mod.ml
open! Basis.Rudiments open! Basis open U256 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin let quotient = x / y in let remainder = x % y in File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x |> Fmt...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u256/test_div_mod.ml
ocaml
open! Basis.Rudiments open! Basis open U256 let test () = let rec test_pairs = function | [] -> () | (x, y) :: pairs' -> begin let quotient = x / y in let remainder = x % y in File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x |> Fmt...
41bd79270264248b882021eb488e90d8ac005217fd87dbb8f8b04e5b80d27031
Feldspar/feldspar-language
FFT.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} -- Copyright ( c ) 2009 - 2011 , ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of ...
null
https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Algorithm/FFT.hs
haskell
# LANGUAGE GADTs # All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
# LANGUAGE FlexibleContexts # Copyright ( c ) 2009 - 2011 , ERICSSON AB * Neither the name of the ERICSSON AB nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCL...
1732d63b389de0896f2d7f9fa47206caf4a1d42a95d6394a0fc716fe5d546875
cpsc411/cpsc411-pub
v2.rkt
#lang at-exp racket/base (require cpsc411/compiler-lib cpsc411/info-lib scribble/bettergrammar racket/contract (for-label cpsc411/compiler-lib) (for-label cpsc411/info-lib) (for-label racket/contract) "redex-gen.rkt" "v1.rkt" (submod "base.rkt" interp)) (provide (all-defined-out)) @define-grammar/pred[asm-...
null
https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-lib/cpsc411/langs/v2.rkt
racket
#lang at-exp racket/base (require cpsc411/compiler-lib cpsc411/info-lib scribble/bettergrammar racket/contract (for-label cpsc411/compiler-lib) (for-label cpsc411/info-lib) (for-label racket/contract) "redex-gen.rkt" "v1.rkt" (submod "base.rkt" interp)) (provide (all-defined-out)) @define-grammar/pred[asm-...
6fdd16d5892a30f9020e72ded95a40f24be44899a74fef9e1de60f55bdb4625c
ghc/testsuite
tc117.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances # FlexibleInstances, UndecidableInstances #-} UndecidableInstances now needed because the Coverage Condition fails -- !!! Functional dependencies -- This one gave another fail in tcReadMut...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc117.hs
haskell
!!! Functional dependencies This one gave another fail in tcReadMutVar
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances # FlexibleInstances, UndecidableInstances #-} UndecidableInstances now needed because the Coverage Condition fails module M1 where class HasFoo a foo | a -> foo where foo :: a -> foo...
8328092aa0aca366876f36b5650e433d917217afc5812e081168cd331d1c5f13
gw000/wisp
Interpreter.hs
-- simple embedded wisp interpreters module Wisp.Interpreter ( interpreter , interpreter' ) where import Wisp.Types import Wisp.Core import Wisp.Primitives import Wisp.Reader import Control.Monad.ST import Control.Monad.Reader import Control.Monad.Writer import System.Random type Interpreter m = String -> m String ...
null
https://raw.githubusercontent.com/gw000/wisp/febc8dff209bf40aa2c6358f728278d66f235af6/Wisp/Interpreter.hs
haskell
simple embedded wisp interpreters
module Wisp.Interpreter ( interpreter , interpreter' ) where import Wisp.Types import Wisp.Core import Wisp.Primitives import Wisp.Reader import Control.Monad.ST import Control.Monad.Reader import Control.Monad.Writer import System.Random type Interpreter m = String -> m String interpreter :: IO (Interpreter IO) in...
f728b6ca5a68f2033a05c9d5224e31ce3a5437f1fec64abc79858d868d9737ac
keera-studios/keera-hails
Network.hs
-- | -- Copyright : ( C ) Keera Studios Ltd , 2013 -- License : BSD3 Maintainer : module Hails.Network where import Data.String (fromString) import Data.List import Data.ReactiveValue import Network.BSD import Network.Socket import Network.Socket.ByteString (sendTo) | Create a UDP sink (...
null
https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-reactive-network/src/Hails/Network.hs
haskell
| License : BSD3 Obtain server addr Send command
Copyright : ( C ) Keera Studios Ltd , 2013 Maintainer : module Hails.Network where import Data.String (fromString) import Data.List import Data.ReactiveValue import Network.BSD import Network.Socket import Network.Socket.ByteString (sendTo) | Create a UDP sink ( a write - only reactive value...
1999e01650425d1347ab28df9b90ed9cfc2add8aa09c3b48995244516174368d
kmi/irs
load.lisp
Mode : Lisp ; Package : The Open University (in-package "OCML") (eval-when (eval load) (ensure-ontology common-concepts domain "OCML:library;domains;common-concepts;load.lisp" ) ) (def-ontology generic-technologies :includes (common-concepts ) :type :domain :author "enrico" :allowed-editors ("jo...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/generic-technologies/load.lisp
lisp
Package :
The Open University (in-package "OCML") (eval-when (eval load) (ensure-ontology common-concepts domain "OCML:library;domains;common-concepts;load.lisp" ) ) (def-ontology generic-technologies :includes (common-concepts ) :type :domain :author "enrico" :allowed-editors ("john" ) :files ("generic-te...
deb1eb690367b5b30ad0c87d5e31c193a426f2a59546ac733741fa5185543748
eschulte/elf
package.lisp
Copyright ( C ) 2011 (defpackage #:elf (:use :common-lisp :alexandria :com.gigamonkeys.binary-data :metabang-bind :split-sequence #-ecl :trivial-shell :cl-ppcre :flexi-streams ) (:shadow :class :get :type :rotate) (:export ;; dynamic variables :*calculate-edits*...
null
https://raw.githubusercontent.com/eschulte/elf/795ca3352ad981e6773fac89b3884d0eda701cee/package.lisp
lisp
dynamic variables functions Modification functions disassembly functionality methods section class elf class
Copyright ( C ) 2011 (defpackage #:elf (:use :common-lisp :alexandria :com.gigamonkeys.binary-data :metabang-bind :split-sequence #-ecl :trivial-shell :cl-ppcre :flexi-streams ) (:shadow :class :get :type :rotate) (:export :*calculate-edits* :*endian* :*class* :...
f5719ee592fb703761104062e47176a7e83abd2f63f97ad7841b0dc3e57a015a
chaoxu/fancy-walks
B.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # {-# OPTIONS_GHC -O2 #-} import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/118/B.hs
haskell
# OPTIONS_GHC -O2 # -------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control . Monad . State import C...
490642b6f8b9d31600cf02a4d1e581045b6ad0ca56b9ac174befc612c1d3923e
jarohen/advent-of-code
day9.clj
(ns aoc2018.day9 (:require [clojure.test :as t] [sss.arrows :refer [->%]]) (:import [java.util LinkedList])) (defn play-game [{:keys [player-count max-marble]}] (let [marbles (LinkedList. [0])] (loop [next-player 0 next-marble 1 scores {}] (cond (> next-marble...
null
https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2018/src/aoc2018/day9.clj
clojure
(ns aoc2018.day9 (:require [clojure.test :as t] [sss.arrows :refer [->%]]) (:import [java.util LinkedList])) (defn play-game [{:keys [player-count max-marble]}] (let [marbles (LinkedList. [0])] (loop [next-player 0 next-marble 1 scores {}] (cond (> next-marble...
adcdbf4a0a1d856f3ae381a1471cb72017d08b80f46b789a7dbc05bbf022c3c9
mirage/ocaml-hvsock
flow.ml
* Copyright ( C ) 2016 Docker Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND TH...
null
https://raw.githubusercontent.com/mirage/ocaml-hvsock/f4f4ff02b90f2c12568140b30fb8fceeedd8e2f1/lwt_unix/flow.ml
ocaml
* Copyright ( C ) 2016 Docker Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND TH...