_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
abf6d61bcb5d64646ebe667da8b7e4505c0715ac08fe4eff3f5b15c4d67532db
amnh/poy5
matrix.mli
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/matrix.mli
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
11f2adf33e98eaede3139362997fc2b8fdbd0db7543897e3c58ec6d1adfda23f
haskell/haskell-language-server
MultiLinePragma.expected.hs
# OPTIONS_GHC -Wall # #   LANGUAGE OverloadedStrings # #   LANGUAGE RecordWildCards , OverloadedStrings # OverloadedStrings #-} {-# OPTIONS_GHC -Wall, -Wno-unused-imports #-} import Data.Monoid -- some comment class Semigroup a => SomeData a instance SomeData All
null
https://raw.githubusercontent.com/haskell/haskell-language-server/fdbc555a9245cb3761c2bf7335f3d18b8cf7673c/plugins/hls-refactor-plugin/test/data/import-placement/MultiLinePragma.expected.hs
haskell
# OPTIONS_GHC -Wall, -Wno-unused-imports # some comment
# OPTIONS_GHC -Wall # #   LANGUAGE OverloadedStrings # #   LANGUAGE RecordWildCards , OverloadedStrings # OverloadedStrings #-} import Data.Monoid class Semigroup a => SomeData a instance SomeData All
579bda3dfebbd77b69f68b35aa6df54d457bf740bdf14af545538b7109828071
BSeppke/vigracket
imgproc.rkt
#lang racket (require vigracket/config) (require vigracket/helpers) (require scheme/foreign) (unsafe!) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Resize ima...
null
https://raw.githubusercontent.com/BSeppke/vigracket/077734ab5376e6bbf5600eb813225428d02838c0/imgproc.rkt
racket
#lang racket (require vigracket/config) (require vigracket/helpers) (require scheme/foreign) (unsafe!) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Resize ima...
d368e3eea63a24d5b3ea8d7330bf4fc19c1b263e7973073b37a7ae00b3c17c54
tonyvanriet/lunch-bot
restaurant.clj
(ns lunch-bot.restaurant (:require [lunch-bot.store :as store])) (def restaurants-filename "restaurants.edn") (def ^:private restaurants (atom [])) (defn initialize-restaurants [] (reset! restaurants (vec (store/read-restaurants restaurants-filename)))) (defn get-restaurants [] @restaurants)
null
https://raw.githubusercontent.com/tonyvanriet/lunch-bot/14e9ab3eb3d6ab913e27df7967a470a594e1b5c3/src/lunch_bot/restaurant.clj
clojure
(ns lunch-bot.restaurant (:require [lunch-bot.store :as store])) (def restaurants-filename "restaurants.edn") (def ^:private restaurants (atom [])) (defn initialize-restaurants [] (reset! restaurants (vec (store/read-restaurants restaurants-filename)))) (defn get-restaurants [] @restaurants)
12c5379d4cea8f6dfadb44484041f11b589e647dcfd742022c9249244f1284c5
kutyel/haskell-book
Chapter22.hs
# LANGUAGE InstanceSigs # module Chapter22 where import Control.Monad (join) import Data.Char (toUpper) import Data.Maybe (fromMaybe) newtype Reader r a = Reader { runReader :: r -> a } -- warming up! cap :: String -> String cap = map toUpper rev :: String -> String rev = reverse composed :: String -> String ...
null
https://raw.githubusercontent.com/kutyel/haskell-book/fd4dc0332b67575cfaf5e3fb0e26687dc01772a0/src/Chapter22.hs
haskell
warming up! monads, monads everywhere! Ask Reading Comprehension Reader Monad Chapter Exercises exercises
# LANGUAGE InstanceSigs # module Chapter22 where import Control.Monad (join) import Data.Char (toUpper) import Data.Maybe (fromMaybe) newtype Reader r a = Reader { runReader :: r -> a } cap :: String -> String cap = map toUpper rev :: String -> String rev = reverse composed :: String -> String composed = rev ...
bab89837ca2c31610b1291a4f79b1cc689b4b7978afb9ea76397c89084e6d176
Mainframe-Archive/switchboard
imap_tests.erl
-module(imap_tests). -include("switchboard.hrl"). -export([start_dispatch/0]). -define(FETCH, {'*',[37,<<"FETCH">>, [<<"UID">>,37,<<"BODY">>, [[{string,<<"TEXT">>}, {string,<<"PLAIN">>}, [{string,<<"CHARSET">>},{string,<<"utf-8"...
null
https://raw.githubusercontent.com/Mainframe-Archive/switchboard/37b66a53265e1a51b10aa76fcc3e622b8c2c261c/src/test/eunit/imap_tests.erl
erlang
@doc Start the dispatch user -- useful for testing. ============================================================================== Clean tests. ============================================================================== Commands decode_line testing. 21:46:48.403 [info] Result: [<<"*">>,12,<<"FETCH">>,[<<"UID">>...
-module(imap_tests). -include("switchboard.hrl"). -export([start_dispatch/0]). -define(FETCH, {'*',[37,<<"FETCH">>, [<<"UID">>,37,<<"BODY">>, [[{string,<<"TEXT">>}, {string,<<"PLAIN">>}, [{string,<<"CHARSET">>},{string,<<"utf-8"...
68cfa6534da3d8fe46750be5f2523d64b5ce37d3ffc4a3e46787aa82683b1bee
MinaProtocol/mina
block_sink.ml
open Network_peer open Core_kernel open Async open Pipe_lib.Strict_pipe open Mina_base open Mina_state type stream_msg = [ `Transition of Mina_block.t Envelope.Incoming.t ] * [ `Time_received of Block_time.t ] * [ `Valid_cb of Mina_net2.Validation_callback.t ] type block_sink_config = { logger : Logger.t ; ...
null
https://raw.githubusercontent.com/MinaProtocol/mina/7877ce811143889aaebfa0f20c20af871e01fe3b/src/lib/transition_handler/block_sink.ml
ocaml
open Network_peer open Core_kernel open Async open Pipe_lib.Strict_pipe open Mina_base open Mina_state type stream_msg = [ `Transition of Mina_block.t Envelope.Incoming.t ] * [ `Time_received of Block_time.t ] * [ `Valid_cb of Mina_net2.Validation_callback.t ] type block_sink_config = { logger : Logger.t ; ...
7d9863a8e87cf727f5e291dc5443576bfbf9ba3e518b81afc8fbd2b92a964c74
tfausak/evoke
Field.hs
module Evoke.Type.Field ( Field (..), make, isOptional, ) where import qualified Evoke.Hsc as Hsc import qualified GHC.Hs as Ghc import qualified GHC.Plugins as Ghc data Field = Field { name :: Ghc.OccName, type_ :: Ghc.HsType Ghc.GhcPs } make :: Ghc.SrcSpan -> Ghc.LHsType Ghc.GhcPs -> Ghc....
null
https://raw.githubusercontent.com/tfausak/evoke/0d9bd6114e091417caa40dc13b743507b7d7fd36/source/library/Evoke/Type/Field.hs
haskell
module Evoke.Type.Field ( Field (..), make, isOptional, ) where import qualified Evoke.Hsc as Hsc import qualified GHC.Hs as Ghc import qualified GHC.Plugins as Ghc data Field = Field { name :: Ghc.OccName, type_ :: Ghc.HsType Ghc.GhcPs } make :: Ghc.SrcSpan -> Ghc.LHsType Ghc.GhcPs -> Ghc....
73af7409fdce75df9c5602d9157987630636c0cb9dd2f8e3734e312b6ce228d3
hipsleek/hipsleek
token.ml
#include "xdebug.cppo" open Camlp4.PreCast type lemma_kind_t = TLEM_TEST | TLEM_PROP | TLEM_SPLIT | TLEM_TEST_NEW | TLEM | TLEM_UNSAFE | TLEM_INFER | TLEM_INFER_PRED | TLEM_SAFE type sleek_token = | IDENTIFIER of string | INT_LITER of int * string | FLOAT_LIT of float * string | FRAC_LIT of Frac....
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/token.ml
ocaml
| COMMENT of string keywords [4/10/2011] An Hoa An Hoa [22/08/2011] : inline keyword for inline field declaration in structures | REQUIRESC | TREL_INFER change to INFER_AT_TERM operators | VAL | REC | PREF | SKIP - should be an identifier! | IN_RFLOW | OUT_RFLOW (* For HO resource reasoning | COMM...
#include "xdebug.cppo" open Camlp4.PreCast type lemma_kind_t = TLEM_TEST | TLEM_PROP | TLEM_SPLIT | TLEM_TEST_NEW | TLEM | TLEM_UNSAFE | TLEM_INFER | TLEM_INFER_PRED | TLEM_SAFE type sleek_token = | IDENTIFIER of string | INT_LITER of int * string | FLOAT_LIT of float * string | FRAC_LIT of Frac....
e502fc19be0c6628fb8b00b6ca7a6717368ccfbdc662c12d87dcf6851aa86cb3
ymyzk/lambda-dti
stdlib.ml
open Syntax open Syntax.CC exception Stdlib_bug of string exception Stdlib_exit of int let env, tyenv = Environment.empty, Environment.empty let is_some_type = tysc_of_ty @@ TyFun (TyDyn, TyBool) let is_some u = FunV (fun _ -> function | Tagged (t, _) when u = tag_to_ty t -> BoolV true | Tagged _ -> BoolV fa...
null
https://raw.githubusercontent.com/ymyzk/lambda-dti/f476c0094832cbaaa336dc1bc86babfb8b652f14/lib/stdlib.ml
ocaml
open Syntax open Syntax.CC exception Stdlib_bug of string exception Stdlib_exit of int let env, tyenv = Environment.empty, Environment.empty let is_some_type = tysc_of_ty @@ TyFun (TyDyn, TyBool) let is_some u = FunV (fun _ -> function | Tagged (t, _) when u = tag_to_ty t -> BoolV true | Tagged _ -> BoolV fa...
b4e1ac5565273e2683660933c6a2e3a0c100220cd2123f8abde97886383c85c7
mhuebert/maria
views.cljs
(ns maria.editor.code-blocks.views (:require ["react" :as react] [applied-science.js-interop :as j] [cells.async] [maria.editor.code-blocks.show-values :refer [show]] [sci.lang] [shadow.cljs.modern :refer [defclass]] [shapes.core :as shapes] ...
null
https://raw.githubusercontent.com/mhuebert/maria/9fc2e26ed7df16e82841e0127a56ae36fafa4e63/editor2/src/main/maria/editor/code_blocks/views.cljs
clojure
(ns maria.editor.code-blocks.views (:require ["react" :as react] [applied-science.js-interop :as j] [cells.async] [maria.editor.code-blocks.show-values :refer [show]] [sci.lang] [shadow.cljs.modern :refer [defclass]] [shapes.core :as shapes] ...
ddcd7b2cda84faa44f9fad27329501be961c6b8d1de81688d3af4eb9ba2f8db9
appleby/Lisp-In-Small-Pieces
chap8k.scm
$ I d : chap8k.scm , v 4.0 1995/07/10 06:52:13 queinnec Exp $ ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is derived from the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cam...
null
https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/src/chap8k.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is derived from the files that accompany the book: The original sources can be downloaded from the author's website at -systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html This file may have been altered from the original in order to...
$ I d : chap8k.scm , v 4.0 1995/07/10 06:52:13 queinnec Exp $ LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge University Press ) . By Christian Queinnec < > Adaptation of the reflective interpreter to Scheme->C , or SCM . This is very...
98dcf93497f5f770990ca5883872b85af24de4d6d09ee3c8d71ff9c51fe6da1f
wavewave/hoodle
Event.hs
module Event where data Event = Message String | Open | Close | Render | Sound String | Start | Finished | Init Int | Finish Int deriving (Show, Eq)
null
https://raw.githubusercontent.com/wavewave/hoodle/1acd7a713697b6146bda13a38591cf868cea6685/coroutine-object/example/Event.hs
haskell
module Event where data Event = Message String | Open | Close | Render | Sound String | Start | Finished | Init Int | Finish Int deriving (Show, Eq)
c73741ed41fca243f5aa6a0773f5fc6854b79d157d753545f8643743d579cc1d
monadbobo/ocaml-core
linux_ext.ml
open Unix open Std_internal module Sysinfo0 = struct type t = { uptime : Span.t; load1 : int; load5 : int; load15 : int; total_ram : int; free_ram : int; shared_ram : int; buffer_ram : int; total_swap : int; free_swap : int; procs : int; totalhigh...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/linux_ext.ml
ocaml
If you update this type, you also must update linux_tcpopt_bool, in the C stubs. (And do make sure you get the order correct) Raw result of sysinfo syscall
open Unix open Std_internal module Sysinfo0 = struct type t = { uptime : Span.t; load1 : int; load5 : int; load15 : int; total_ram : int; free_ram : int; shared_ram : int; buffer_ram : int; total_swap : int; free_swap : int; procs : int; totalhigh...
85af0877184107cdaf5cec303b2c0c73791c3b6963b7d4a6316f466f2239b136
MLstate/opalang
serverLib.mli
Copyright © 2011 MLstate This file is part of . 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 , co...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/lib/plugins/opabsl/serverLib.mli
ocaml
Copyright © 2011 MLstate This file is part of . 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 , co...
e3164d524784b673bef744896bfa29c832907dbbbfcfb72a363d83a9a1bce39f
jimcrayne/jhc
read023.hs
module ShouldCompile where -- M.<keyword> isn't a qualified identifier f = Just.let x=id in x -- --------------------------------------------------------------------------- we changed the behaviour of this one in GHC , but the following test is strictly speaking legal : f ' = Just.\1 where ( .\ ) = ( $ ) --...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/ghc/read023.hs
haskell
M.<keyword> isn't a qualified identifier --------------------------------------------------------------------------- ----------------------------------------------------- M.{as,hiding,qualified} *are* qualified identifiers: --------------------------------------------------------------------------- special symbol...
module ShouldCompile where f = Just.let x=id in x we changed the behaviour of this one in GHC , but the following test is strictly speaking legal : f ' = Just.\1 where ( .\ ) = ( $ ) g = ShouldCompile.as g' = (ShouldCompile.!) as x = x (!) x = x
e114276e6da8bcab036c2ce9ecf5695c73e6b9927bb6e845e4ee54577f08ca34
Octachron/codept
solver.ml
module With_deps = With_deps open Debug type 'a i = { input: Unit.s; code: 'a} let make initial (input:Unit.s) = let open_namespace = List.map (fun name -> Loc.nowhere @@ M2l.Open (Ident [name])) input.path.namespace in { input; code = initial (open_namespace @ input.code) } module Mp = Namespaced.Map modu...
null
https://raw.githubusercontent.com/Octachron/codept/e73da7b42b54ad94574ecb1d7d939686424d8425/lib/solver.ml
ocaml
* Common functions something bad happened but we are already parsing problematic input shortcut ε expansion when not needed Invariant name ∈ state.pending, except when looking at a new seed first, we update the work-in-progress map we failed to eval the m2l code due to something are we cycling? ...
module With_deps = With_deps open Debug type 'a i = { input: Unit.s; code: 'a} let make initial (input:Unit.s) = let open_namespace = List.map (fun name -> Loc.nowhere @@ M2l.Open (Ident [name])) input.path.namespace in { input; code = initial (open_namespace @ input.code) } module Mp = Namespaced.Map modu...
3a12dd0b74b750180849897ced127901e3ba4abdd2e10ade0817a32ab2215580
privet-kitty/cl-competitive
monotone-minima.lisp
(defpackage :cp/monotone-minima (:use :cl) (:export #:monotone-minima)) (in-package :cp/monotone-minima) ;; not tested (declaim (inline monotone-minima)) (defun monotone-minima (function x1 y1 x2 y2 &key (order #'<)) "Takes a monotone matrix as a two-variable function and returns a vector such that for all x in...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/b6b3057d8ea34b1cb32aa5546677dfed9d897347/module/monotone-minima.lisp
lisp
not tested
(defpackage :cp/monotone-minima (:use :cl) (:export #:monotone-minima)) (in-package :cp/monotone-minima) (declaim (inline monotone-minima)) (defun monotone-minima (function x1 y1 x2 y2 &key (order #'<)) "Takes a monotone matrix as a two-variable function and returns a vector such that for all x in [x1, x2) f(x,...
6af4a91b34fd25f78acc7d7e4dec3d7b907076d01a9c27cd3daa139be3a648ae
DavidAlphaFox/ailib
ailib_gc.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/ailib/b77cdaf353fd5ed8b5f8060db427997a48e471b2/src/process/ailib_gc.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. RabbitMQ做为一个消息队...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . 频繁的FUL...
275623cb6d840fe1a6f7933578de7bb3fd2dbca9c75e1856d78c6711572c315f
nvim-treesitter/nvim-treesitter
folds.scm
(block_statement) @fold
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/c2c454c29a92e2d0db955fc1d6841566c28e3ecd/queries/d/folds.scm
scheme
(block_statement) @fold
2e22264f976bf60ac597989e5d61795c60b2817224b2602f1dae997180414b9e
diffusionkinetics/open
Connect.hs
# LANGUAGE OverloadedStrings , ScopedTypeVariables , DeriveGeneric , TypeApplications # module Database.PostgreSQL.Simple.Connect where import System.Exit (die) import GHC.Generics import GHC.Conc import Data.Aeson import qualified Data.ByteString.Lazy as BSL import Control.Exception import System.Environment impor...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/postgresql-simple-expr/lib/Database/PostgreSQL/Simple/Connect.hs
haskell
# LANGUAGE OverloadedStrings , ScopedTypeVariables , DeriveGeneric , TypeApplications # module Database.PostgreSQL.Simple.Connect where import System.Exit (die) import GHC.Generics import GHC.Conc import Data.Aeson import qualified Data.ByteString.Lazy as BSL import Control.Exception import System.Environment impor...
753f97a499eec313862ebdf870f78db7dfcc7a7e6406929da4d54349ea3b8409
jakemcc/sicp-study
ex4_16.clj
Exercise 4.16 ; Solved in section4.clj and section4_test.clj ; I ended up doing part c (installing scan-out-defines) in interpreter by adding ; it to make-procedure instead of procedure-body. I did this so that ; the transformation would only have to happen once instead of everytime ; a procedure body is invoked.
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section4.1/src/ex4_16.clj
clojure
Solved in section4.clj and section4_test.clj I ended up doing part c (installing scan-out-defines) in interpreter by adding it to make-procedure instead of procedure-body. I did this so that the transformation would only have to happen once instead of everytime a procedure body is invoked.
Exercise 4.16
bd4e494293b4f399e2a11b8dc05732af9207fbf29a58e5f7adc91056883c58a3
jeffshrager/biobike
randomization.lisp
(in-package :com.gigamonkeys.utilities) (defun nshuffle-vector (vector) "Shuffle a vector in place using Fisher-Yates algorithm." (loop for idx downfrom (1- (length vector)) to 1 for other = (random (1+ idx)) do (unless (= idx other) (rotatef (aref vector idx) (aref vector other)))) ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/utilities/randomization.lisp
lisp
(in-package :com.gigamonkeys.utilities) (defun nshuffle-vector (vector) "Shuffle a vector in place using Fisher-Yates algorithm." (loop for idx downfrom (1- (length vector)) to 1 for other = (random (1+ idx)) do (unless (= idx other) (rotatef (aref vector idx) (aref vector other)))) ...
fbc09deae31defb167096aacf706f51abe677e2a9f8c168540b93625ea552061
TaylanUB/scheme-bytestructures
utils.scm
(define-module (bytestructures guile utils)) (include-from-path "bytestructures/body/utils.scm") (export if-syntax-case define-syntax-case-stubs )
null
https://raw.githubusercontent.com/TaylanUB/scheme-bytestructures/27cadba6b69a01b38b33bb39b9766d713eb90c1b/bytestructures/guile/utils.scm
scheme
(define-module (bytestructures guile utils)) (include-from-path "bytestructures/body/utils.scm") (export if-syntax-case define-syntax-case-stubs )
12de07d6a73d705f2c1c23ece050a8096f4fed260aadaaf2879f3b95ff735f74
ghc/packages-dph
Joint.hs
# LANGUAGE FlexibleInstances , UndecidableInstances # -- | Generation of nested arrays with identical structure. module DPH.Arbitrary.Joint where import Data.Array.Parallel.Pretty import Test.QuickCheck hiding (NonEmpty) import Data.Array.Parallel.Array as A import qualified Data.Vector.U...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/framework/DPH/Arbitrary/Joint.hs
haskell
| Generation of nested arrays with identical structure. Joint21 --------------------------------------------------------------------- Joint2 --------------------------------------------------------------------- levels. Also adjust the length of the inner elements, so the the total number of elements is proport...
# LANGUAGE FlexibleInstances , UndecidableInstances # module DPH.Arbitrary.Joint where import Data.Array.Parallel.Pretty import Test.QuickCheck hiding (NonEmpty) import Data.Array.Parallel.Array as A import qualified Data.Vector.Unboxed as U import qualified Data.Vector ...
64c2779adf4b3f453d08a8edaf3e783a706b1dfbfe33ebd9cdb1fe742cc8340b
flyingmachine/arenaverse
sessions.clj
(ns arenaverse.views.sessions (:require [arenaverse.views.common :as common] [noir.session :as session] [noir.response :as res] [cemerick.friend :as friend]) (:use noir.core hiccup.core hiccup.form-helpers arenaverse.views.routes) (:import [org.bson....
null
https://raw.githubusercontent.com/flyingmachine/arenaverse/6742c4112f6ec83fb272b1b352868394a8879a07/src/arenaverse/views/sessions.clj
clojure
(ns arenaverse.views.sessions (:require [arenaverse.views.common :as common] [noir.session :as session] [noir.response :as res] [cemerick.friend :as friend]) (:use noir.core hiccup.core hiccup.form-helpers arenaverse.views.routes) (:import [org.bson....
5b2aa0630bdd9de200969049f66a23bdee24b244def81cf9dcffd2a2a6125e4c
returntocorp/semgrep
dependencies_matrix_code.mli
(* dependency structure matrix *) type dm = { matrix : int array array; i_to_name : Graph_code.node array; name_to_i : (Graph_code.node, int) Hashtbl.t; config : config; } and config = tree and tree = Node of Graph_code.node * tree list type partition_constraints = (string, string list) Hashtbl.t type cell_co...
null
https://raw.githubusercontent.com/returntocorp/semgrep/855abad9ada6ea5fd72d437fd69ff2e5fa42c1f1/libs/graph_code/dependencies_matrix_code.mli
ocaml
dependency structure matrix just the expanded root tree config manipulation matrix analysis exclude list exclude list APIs useful for other to use should be used only by test code poor's man DSM visualizer (use codegraph for real visualization)
type dm = { matrix : int array array; i_to_name : Graph_code.node array; name_to_i : (Graph_code.node, int) Hashtbl.t; config : config; } and config = tree and tree = Node of Graph_code.node * tree list type partition_constraints = (string, string list) Hashtbl.t type cell_coord = int * int val verbose : boo...
c037e2f07361850da96a3c184c2e2f0433de2ada8f49b2bd33ce7f2d124d63ae
acieroid/scala-am
bchain.scm
;; Adapted from /@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54 (define (block index prev-hash timestamp data hash) (list 'block index prev-hash timestamp data hash)) (define (range a b) (letrec ((loop (lambda (i acc) (if (< i a) acc (loop ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/bchain.scm
scheme
Adapted from /@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54 (sha1 (bytes-append (string->bytes/utf-8 (number->string index)) prev-hash (string->bytes/utf-8 (number->string timestamp)) (string->bytes/utf-8 data))
(define (block index prev-hash timestamp data hash) (list 'block index prev-hash timestamp data hash)) (define (range a b) (letrec ((loop (lambda (i acc) (if (< i a) acc (loop (- i 1) (cons i acc)))))) (loop (- b 1) '()))) (define (block-index b...
ca7ada83eb399db2e38599ccca6dce9603e426a8882b03bb2a86e4f6e922a4f7
axelarge/advent-of-code
day07.clj
(ns advent-of-code.y2015.day07 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2015 07)) (defn parse-line [line] (let [op (keyword (re-find #"[A-Z]+" line)) params (->> (re-seq #"[a-z\d]+" line) (map #(try (parse-int %) ...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/ef8cc4e279e6fc17512bdca5005037b4f842a0c2/src/advent_of_code/y2015/day07.clj
clojure
(ns advent-of-code.y2015.day07 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2015 07)) (defn parse-line [line] (let [op (keyword (re-find #"[A-Z]+" line)) params (->> (re-seq #"[a-z\d]+" line) (map #(try (parse-int %) ...
1cd28b5338e9ef5edde2a2f3c3433e29894c0a6b9d3421fdb4b04258a48fb839
bmeurer/ocamljit2
hamming.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ,...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/misc/hamming.ml
ocaml
********************************************************************* Objective Caml ...
, projet , INRIA Rocquencourt Copyright 2002 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$ We can not use bignums because we do ...
edd5d0dca16ab76edcd83580812dcf220ef06b403004f0a783b19c634a4717d3
zikajk/pg_copycat
import.clj
(ns pg-copycat.import (:require [pg-copycat.utils :as u] [clojure.java.shell :as shell] [babashka.fs :as fs] [clojure.term.colors :as c])) (def temp-folder (fs/temp-dir)) (defn import-mode [mode filename] (case mode :execute ["-f" filename] :copy ["-c" (format "\\COPY %s FROM '%s' USING DEL...
null
https://raw.githubusercontent.com/zikajk/pg_copycat/6a6eb2ca8ef8b510de73636611a74691bc239755/src/pg_copycat/import.clj
clojure
(ns pg-copycat.import (:require [pg-copycat.utils :as u] [clojure.java.shell :as shell] [babashka.fs :as fs] [clojure.term.colors :as c])) (def temp-folder (fs/temp-dir)) (defn import-mode [mode filename] (case mode :execute ["-f" filename] :copy ["-c" (format "\\COPY %s FROM '%s' USING DEL...
bc746a8237c11cf2fa98e0d8564212cc44bd9a98f06e33cba3781aa061e2906a
purescript/purescript
Hierarchy.hs
----------------------------------------------------------------------------- -- -- Module : Main Copyright : ( c ) Hardy Jones 2014 License : MIT ( ) -- Maintainer : < > -- Stability : experimental -- Portability : -- -- | Generate Directed Graphs of PureScript TypeClasses -- -----...
null
https://raw.githubusercontent.com/purescript/purescript/f9f75f43bd1bdbc1e866fdba876582385e3f4c65/app/Command/Hierarchy.hs
haskell
--------------------------------------------------------------------------- Module : Main Stability : experimental Portability : | ---------------------------------------------------------------------------
Copyright : ( c ) Hardy Jones 2014 License : MIT ( ) Maintainer : < > Generate Directed Graphs of PureScript TypeClasses module Command.Hierarchy (command) where import Prelude import Protolude (catMaybes) import Control.Applicative (optional) import ...
9bfd215fea0e6d16b1305f5b31f367fe24b3f9195a128faac1c432328a13d96a
haskell-works/hw-dsv
BroadwordSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module HaskellWorks.Data.Dsv.BroadwordSpec (spec) where import Data.Maybe (fromJust) import Data.Word import HaskellWorks.Data.Bits.BitRead import HaskellWorks.Data.Bits.BitShow import HaskellWorks.Data.Dsv.Internal.Br...
null
https://raw.githubusercontent.com/haskell-works/hw-dsv/4f1274af383281589165232186f99219479d7898/test/HaskellWorks/Data/Dsv/BroadwordSpec.hs
haskell
# LANGUAGE OverloadedStrings # --------- --------- --------- ---------
# LANGUAGE ScopedTypeVariables # module HaskellWorks.Data.Dsv.BroadwordSpec (spec) where import Data.Maybe (fromJust) import Data.Word import HaskellWorks.Data.Bits.BitRead import HaskellWorks.Data.Bits.BitShow import HaskellWorks.Data.Dsv.Internal.Broadword import HaskellWorks.Hspec.Hed...
420797b90118dc8ba6832038c951335a1fd29d5b1f890b9e9fe8de8c5ab20780
racket/plot
13709.rkt
#lang racket (require plot rackunit) (check-exn exn:fail:contract? (λ () (lines '((1))))) (check-exn exn:fail:contract? (λ () (rectangles (list (list (ivl 1 2)))))) (check-exn exn:fail:contract? (λ () (points '((1))))) (check-exn exn:fail:contract? (λ () (error-bars '((1))))) (check-exn exn:fail:contract? (λ () (erro...
null
https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-test/plot/tests/PRs/13709.rkt
racket
#lang racket (require plot rackunit) (check-exn exn:fail:contract? (λ () (lines '((1))))) (check-exn exn:fail:contract? (λ () (rectangles (list (list (ivl 1 2)))))) (check-exn exn:fail:contract? (λ () (points '((1))))) (check-exn exn:fail:contract? (λ () (error-bars '((1))))) (check-exn exn:fail:contract? (λ () (erro...
33bd80625f7edbf68a59c2ca58cc2fa273f413432574dd51403e844fc3ab1974
programaker-project/Programaker-Core
automate_rest_api_app.erl
%%%------------------------------------------------------------------- %% @doc automate_rest_api public API %% @end %%%------------------------------------------------------------------- -module(automate_rest_api_app). -behaviour(application). %% Application callbacks -export([start/0, start/2, stop/1]). %%========...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_app.erl
erlang
------------------------------------------------------------------- @doc automate_rest_api public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API ==============================================...
-module(automate_rest_api_app). -behaviour(application). -export([start/0, start/2, stop/1]). start() -> {ok, _} = application:ensure_all_started(inets), {ok, _} = application:ensure_all_started(cowboy), Initialize process automate_rest_api_sup:start_link(). start(_StartType, _StartArgs) -> sta...
89f043777b1bb9cbf1c30c13ac246445b87067f4109809f6a1f319a79bd8f5e7
functionally/mantis-oracle
Controller.hs
----------------------------------------------------------------------------- -- -- Module : $Headers Copyright : ( c ) 2021 License : MIT -- Maintainer : < > -- Stability : Experimental Portability : Portable -- -- | Poll data and post it to the oracle. -- --------------------...
null
https://raw.githubusercontent.com/functionally/mantis-oracle/10331c6720d8413fd9a01b8c7fb6dc0ef0f20f31/src/Mantra/Oracle/PAB/Controller.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental | Poll data and post it to the oracle. --------------------------------------------------------------------------- # LANGUAGE OverloadedStrings # * Entry point | Poll for new oracle ...
Copyright : ( c ) 2021 License : MIT Maintainer : < > Portability : Portable module Mantra.Oracle.PAB.Controller ( runOraclePAB ) where import Control.Concurrent (threadDelay) import Control.Monad (when) import Control.Monad.IO.Class (liftIO) import Data.Proxy...
efa6bdbd4777f1ea974104abb6b23bb0d2b2a7901fce8edea46951957c842757
screenshotbot/screenshotbot-oss
single.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :util/single (:use #:cl) (:import-from #:bknr.datastore ...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/a80bbf0bff1d64f165d38eafe0937dced0d3cc7e/src/util/single.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc. version
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :util/single (:use #:cl) (:import-from #:bknr.datastore #:%encode-symbol) (:import-from #:bknr.datastore ...
351bdae7a14501187ff8c8cde9e22168a8eface6aaae919cc0735d6072550345
awakesecurity/language-ninja
Command.hs
-*- coding : utf-8 ; mode : ; -*- -- File: library/Language/Ninja/Misc/Command.hs -- -- License: -- Copyright 2017 Awake Security -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of...
null
https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/library/Language/Ninja/Misc/Command.hs
haskell
File: library/Language/Ninja/Misc/Command.hs License: Copyright 2017 Awake Security you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES O...
-*- coding : utf-8 ; mode : ; -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUA...
e708c3600839f4149f9bfea3c9753e069682eaf0d1f85d43481a32ac36e83516
AccelerateHS/accelerate-examples
Naive1.hs
module Solver.Naive1 where import Common.Type import Common.Body import Data.Array.Accelerate as A -- | Calculate accelerations on these particles in a naïve O(n^2) way. -- -- Replicate the bodies out by rows and columns, zip them together to get all -- interactions, and then perform a par...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/n-body/Solver/Naive1.hs
haskell
| Calculate accelerations on these particles in a naïve O(n^2) way. Replicate the bodies out by rows and columns, zip them together to get all interactions, and then perform a parallel reduce along innermost dimension to get the total contribution for each particle. This relies on array fusion to combine...
module Solver.Naive1 where import Common.Type import Common.Body import Data.Array.Accelerate as A calcAccels :: Exp R -> Acc (Vector PointMass) -> Acc (Vector Accel) calcAccels epsilon bodies = let n = A.size bodies cols = A.replicate (lift $ Z :. n :. All) bodies ...
a80bf6fdbb87bc0e27ca4f0a2d9a197eabd39cb37f529f7c53739cfdd7109a0b
owlbarn/light_actor
test0.ml
* Light Actor - Parallel & Distributed Engine of Owl System * Copyright ( c ) 2016 - 2019 < > * Light Actor - Parallel & Distributed Engine of Owl System * Copyright (c) 2016-2019 Liang Wang <> *) module Make_Impl (KV: Mirage_kv_lwt.RO) (R: Mirage_random.C) = struct let stored_kv_handler : KV.t optio...
null
https://raw.githubusercontent.com/owlbarn/light_actor/d5ca76db0a58c61cd0ba019be458dada3ce9c36a/test/mirage/test0.ml
ocaml
do nothing
* Light Actor - Parallel & Distributed Engine of Owl System * Copyright ( c ) 2016 - 2019 < > * Light Actor - Parallel & Distributed Engine of Owl System * Copyright (c) 2016-2019 Liang Wang <> *) module Make_Impl (KV: Mirage_kv_lwt.RO) (R: Mirage_random.C) = struct let stored_kv_handler : KV.t optio...
cb8b2b67fa5062b8c2d04660cae40e2bf6e1ca8a090948aef55c04f82e3a7896
syntheorem/thexa
CharSet.hs
module Thexa.CharSet ( CharSet -- * Construction , empty , full , singleton , range -- * Queries , null , member , lookupMin , isSubsetOf -- * Insertion , insert , insertRange -- * Deletion , delete , deleteRange -- * Set operations , union , difference , intersection , complement -- * Splits , splitLE -- * List...
null
https://raw.githubusercontent.com/syntheorem/thexa/e599efd97c0cb49dc3acb9a5da911e20608a210b/src/Thexa/CharSet.hs
haskell
* Construction * Queries * Insertion * Deletion * Set operations * Splits * List conversion | A set of characters represented using an ordered list of non-overlapping ranges. # UNPACK # lower bound (inclusive) # UNPACK # upper bound (inclusive) Invariants: ranges, so for @Cons l1 u1 (Cons l2 u2 _)@, @l2 ...
module Thexa.CharSet ( CharSet , empty , full , singleton , range , null , member , lookupMin , isSubsetOf , insert , insertRange , delete , deleteRange , union , difference , intersection , complement , splitLE , toString , toList , fromList , unsafeFromList ) where import Prelude hiding (empty, null, toList) ...
b2aeeaa6cce6ed8d52118babd01b549306494b199089ad3587958d1f919c223a
Beluga-lang/Beluga
hash.ml
module type HASH = sig type t val hash : t -> int end module Make (T : sig type t end) : HASH with type t = T.t = struct include T let hash = Hashtbl.hash end let contramap (type t s) (hash : (module HASH with type t = s)) (f : t -> s) = (module struct type nonrec t = t let hash = let...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/a79833e99cf40befc56a5f09a64c82ee65c81ab0/src/support/hash.ml
ocaml
module type HASH = sig type t val hash : t -> int end module Make (T : sig type t end) : HASH with type t = T.t = struct include T let hash = Hashtbl.hash end let contramap (type t s) (hash : (module HASH with type t = s)) (f : t -> s) = (module struct type nonrec t = t let hash = let...
3d6be226900899a570aef76fd3012343bda12507a84407ed81d132b9d8402f89
haskell/ghcup-hs
Posix.hs
module GHCup.Prelude.Posix where -- | Enables ANSI support on windows, does nothing on unix. -- -- Returns 'Left str' on errors and 'Right bool' on success, where -- 'bool' markes whether ansi support was already enabled. -- -- This function never crashes. -- -- Rip-off of -pc-windows-msvc/src/ansi_term/windows.rs.ht...
null
https://raw.githubusercontent.com/haskell/ghcup-hs/e1d86c77d05c3720edcbbba9e5e4cba331ce9204/lib/GHCup/Prelude/Posix.hs
haskell
| Enables ANSI support on windows, does nothing on unix. Returns 'Left str' on errors and 'Right bool' on success, where 'bool' markes whether ansi support was already enabled. This function never crashes. Rip-off of -pc-windows-msvc/src/ansi_term/windows.rs.html#10-61
module GHCup.Prelude.Posix where enableAnsiSupport :: IO (Either String Bool) enableAnsiSupport = pure (Right True) isWindows, isNotWindows :: Bool isWindows = False isNotWindows = not isWindows
4b53d1f1a4f1a9d8a421c440739d4cf92e60404b64696490e9a5349cb066906e
vii/dysfunkycom
generics.lisp
;;;; lispbuilder-sdl The OO wrapper for the lispbuilder - sdl package ( C)2006 < > (in-package #:lispbuilder-sdl) (defgeneric r (color)) (defgeneric g (color)) (defgeneric b (color)) (defgeneric a (color)) (defgeneric (setf r) (value color) (:documentation "Sets/Returns the red color component of the object...
null
https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/sdl/generics.lisp
lisp
lispbuilder-sdl the per-pixel alpha is always used if available."))
The OO wrapper for the lispbuilder - sdl package ( C)2006 < > (in-package #:lispbuilder-sdl) (defgeneric r (color)) (defgeneric g (color)) (defgeneric b (color)) (defgeneric a (color)) (defgeneric (setf r) (value color) (:documentation "Sets/Returns the red color component of the object.")) (defgeneric (set...
b36335bfa4f512d24371b8d3c66544b7b7c1beedad379b7208ae0bf329296585
theodormoroianu/SecondYearCourses
LambdaChurch_20210415165430.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165430.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
eb9dde045edb487995375ceda453b73315705cd549c9241a002974e51190203d
NorfairKing/exchangerates
Gen.hs
# OPTIONS_GHC -fno - warn - orphans # module ExchangeRates.Cache.Gen where import TestImport import ExchangeRates.Types.Gen () import ExchangeRates.Cache instance GenUnchecked ExchangeRatesCache instance GenValid ExchangeRatesCache where genValid = ExchangeRatesCache <$> genValid <*> genValid instance GenUnc...
null
https://raw.githubusercontent.com/NorfairKing/exchangerates/6ee3ee31ed479259900ae728e6c4caa968e0dcda/test/ExchangeRates/Cache/Gen.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module ExchangeRates.Cache.Gen where import TestImport import ExchangeRates.Types.Gen () import ExchangeRates.Cache instance GenUnchecked ExchangeRatesCache instance GenValid ExchangeRatesCache where genValid = ExchangeRatesCache <$> genValid <*> genValid instance GenUnc...
70b2df371967ec02cc5e11cfbb0d323c2ee536f3618ce492ade4a5787b1b8ea4
racket/rhombus-prototype
class-field.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre "class-parse.rkt") "parse.rkt" (only-in "binding.rkt" raise-binding-failure)) (provide (for-syntax build-added-field-arg-definitions)) (define-for-syntax (build-added-field-arg-definitions a...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/dcf7fb9b002c0957fc0adbf9bd3475c26a8b2c01/rhombus/private/class-field.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/parse/pre "class-parse.rkt") "parse.rkt" (only-in "binding.rkt" raise-binding-failure)) (provide (for-syntax build-added-field-arg-definitions)) (define-for-syntax (build-added-field-arg-definitions a...
c0d1b668c9235de0329ea8a4adaac90917257f6c425adc1e61015ffb222fb081
stackbuilders/tutorials
Main.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - orphans # module Main (main) where...
null
https://raw.githubusercontent.com/stackbuilders/tutorials/c6100b5bf7a00a3669444313159dfc2ca0cf8eb7/tutorials/haskell/servant-auth/code/src/Main.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # -------------------------------------------------------------------------- General | The handler monad, to work with cookies we need to have access to place to put some values that ...
# LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - orphans # module Main (main) where import Control.Monad.Catch (try) import Control.Monad.Except import Control.Monad.Reader import Crypto.Cipher.AES (AES256) import Crypto.Cipher.Types ...
a2eee00012a7a8963283aaedb169d4e8dba99731029a61b856b4946a46bf50bc
awgn/cgrep
Semantic.hs
-- Copyright ( c ) 2013 - 2022 < > -- -- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or -- (at your option) any later version. -- -- This program is dis...
null
https://raw.githubusercontent.com/awgn/cgrep/304d7092cd4b961022abb06103c2bf7bb932ff4a/src/CGrep/Strategy/Semantic.hs
haskell
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Copyright ( c ) 2013 - 2022 < > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 13...
de7c4d27db0d0f7b786d48f2068dd16a32dbb84525442ee18ad3e28ee90343ac
Frama-C/Frama-C-snapshot
check_compliance.ml
open Cil_types let add_headers tbl id headers = try let old_headers = Hashtbl.find tbl id in Hashtbl.replace tbl id (old_headers @ headers) with Not_found -> Hashtbl.replace tbl id headers class stdlib_visitor = object inherit Visitor.frama_c_inplace val in_stdlib = ref false val idents : (strin...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/libc/check_compliance.ml
ocaml
open Cil_types let add_headers tbl id headers = try let old_headers = Hashtbl.find tbl id in Hashtbl.replace tbl id (old_headers @ headers) with Not_found -> Hashtbl.replace tbl id headers class stdlib_visitor = object inherit Visitor.frama_c_inplace val in_stdlib = ref false val idents : (strin...
fc9e1f4fd2fd52df4a73a7937289be4449bc2906a4cf96970f81e5d6f5032ea8
haskell-github/github
RepoComments.hs
module RepoComments where import qualified Github.Repos.Commits as Github import Data.List import Data.Maybe (maybe) main = do possibleComments <- Github.commentsFor "thoughtbot" "paperclip" case possibleComments of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right comments) -> putStrLn $ int...
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/Commits/RepoComments.hs
haskell
module RepoComments where import qualified Github.Repos.Commits as Github import Data.List import Data.Maybe (maybe) main = do possibleComments <- Github.commentsFor "thoughtbot" "paperclip" case possibleComments of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right comments) -> putStrLn $ int...
7aaf897e4589cd5bddd986a999c89f2a7f6e60a583f2bd2bcb07bcb3443c23f5
inaka/elvis_core
fail_numeric_format.erl
-module(fail_numeric_format). -export([for_test/0]). for_test() -> { 0_0 , 1 , 2 , 1_0 , 100 , 1_000 , 1_2_3_4 , 2#10_10_10_1 , 16#FA_CE , 1.10_10_10_1 , 0.3_4e1_2 , -0_1 , -0_10 , -10_00 , -0_2#1_01_0101 , -1_6#FA_CE , -1_2.1_010_101_00 , -0_0.3...
null
https://raw.githubusercontent.com/inaka/elvis_core/468bd3498f1782fd74ef3d8eb1b36217b0b76c11/test/examples/fail_numeric_format.erl
erlang
-module(fail_numeric_format). -export([for_test/0]). for_test() -> { 0_0 , 1 , 2 , 1_0 , 100 , 1_000 , 1_2_3_4 , 2#10_10_10_1 , 16#FA_CE , 1.10_10_10_1 , 0.3_4e1_2 , -0_1 , -0_10 , -10_00 , -0_2#1_01_0101 , -1_6#FA_CE , -1_2.1_010_101_00 , -0_0.3...
5b9b25418d881e9ee59e5503f199eee2f939aa7fd63c78d67ff92532906152fa
msempere/markhor
markhor_router.erl
-module(markhor_router). -compile([{parse_transform, lager_transform}]). -author("msempere"). -export([init/0]). init() -> lager:info("Started Router"), loop([]). loop(Agents) -> receive {From, Ref, bid_request, Json} -> Imp = proplists:get_value(<<"imp">>, Json), Height =...
null
https://raw.githubusercontent.com/msempere/markhor/37fd4d8fdc316dfb36b91068e30641c507478e24/src/markhor_router.erl
erlang
-module(markhor_router). -compile([{parse_transform, lager_transform}]). -author("msempere"). -export([init/0]). init() -> lager:info("Started Router"), loop([]). loop(Agents) -> receive {From, Ref, bid_request, Json} -> Imp = proplists:get_value(<<"imp">>, Json), Height =...
1e0cf1cf08514ae83f30cd6d750beebc85e5cc4b2b13ce7c362dd4c3919229ba
mirage/ocaml-cohttp
cohttp_lwt_unix.ml
{ { { Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " A...
null
https://raw.githubusercontent.com/mirage/ocaml-cohttp/628d8716b22bb7933863dd584673745c974707be/cohttp-lwt-unix/src/cohttp_lwt_unix.ml
ocaml
: Mirage_time.S
{ { { Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " A...
15414895504fc8ae63f9a38564d02123a0e301fe79404e7095e24c4c67c006b9
static-analysis-engineering/codehawk
jCHCostBoundsDomainNoArrays.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchcost/jCHCostBoundsDomainNoArrays.ml
ocaml
jchlib jchsys jchcost
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
9bad3b9d42e9caa5a5616aee2f9c15df778cc3106b196ff4f4b5f286714088a1
haskell-lisp/yale-haskell
printers.scm
;;; printers.scm -- compilation unit definition for structure printers ;;; author : date : 3 Jan 1992 ;;; ;;; (define-compilation-unit printer-support (source-filename "$Y2/printers/") (require global) (unit util (source-filename "util.scm"))) (define-compilation-unit printers (source-filename "...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/printers/printers.scm
scheme
printers.scm -- compilation unit definition for structure printers
author : date : 3 Jan 1992 (define-compilation-unit printer-support (source-filename "$Y2/printers/") (require global) (unit util (source-filename "util.scm"))) (define-compilation-unit printers (source-filename "$Y2/printers/") (require printer-support) (unit print-exps (source-filename "p...
9f6b463ef0d11af6ee5d52e7055aff7ac72fc72a238beee71502b7e3bc25d636
Opetushallitus/ataru
input_field_component.cljs
(ns ataru.virkailija.editor.components.input-field-component (:require [re-frame.core :refer [subscribe]] [reagent.core :as r] [reagent.ratom :refer-macros [reaction]])) (defn- prevent-default [event] (.preventDefault event)) (defn input-field [{:keys [class da...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/editor/components/input_field_component.cljs
clojure
(ns ataru.virkailija.editor.components.input-field-component (:require [re-frame.core :refer [subscribe]] [reagent.core :as r] [reagent.ratom :refer-macros [reaction]])) (defn- prevent-default [event] (.preventDefault event)) (defn input-field [{:keys [class da...
08e0b59100bbac937036573e24fe2c621de99456a81f85a2cfcad8a54ff749e1
joearms/ezwebframe
ezwebframe_app.erl
-module(ezwebframe_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> ezwebfram...
null
https://raw.githubusercontent.com/joearms/ezwebframe/9eb320ff61d4dc7b0885f700414e56b7554788bf/src/ezwebframe_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(ezwebframe_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> ezwebframe_sup:start_link(). stop(_State) -> ok.
af3ce3195ed1b9ce21f7fe3c74599ed006d6c4f252a6f560ada91f0e42413c52
kronkltd/jiksnu
group_filters.clj
(ns jiksnu.modules.web.filters.group-filters (:require [ciste.filters :refer [deffilter]] [jiksnu.modules.core.actions.group-actions :as actions.group] [jiksnu.modules.core.model.group :as model.group] [jiksnu.modules.core.model.user :as model.user])) (deffilter #'actions.group/ad...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/web/filters/group_filters.clj
clojure
(deffilter #'actions.group/user-list :http [action request] (-> request :params :id model.user/fetch-by-id action))
(ns jiksnu.modules.web.filters.group-filters (:require [ciste.filters :refer [deffilter]] [jiksnu.modules.core.actions.group-actions :as actions.group] [jiksnu.modules.core.model.group :as model.group] [jiksnu.modules.core.model.user :as model.user])) (deffilter #'actions.group/ad...
0f2c1bc0abde9296b89a7c04108470869d65c5d56bd7776cad814ca9a6f4b962
rvirding/chat_demo
chat_ws_handler.erl
Copyright ( c ) 2011 - 2014 . All rights reserved . %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: %% 1 . Redistributions of source code must retain the above copyright %% notice, this list of conditions...
null
https://raw.githubusercontent.com/rvirding/chat_demo/2979bdac2f7064244cbf86aaaf84b79ae891aeaa/src/chat_ws_handler.erl
erlang
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documentation and/or other mat...
Copyright ( c ) 2011 - 2014 . All rights reserved . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDERS OR FOR ANY DIRECT , INDIRECT...
bdf0b39f08f5fab1f9d0244220908b5290aa4f624c088445c919f2239ef86947
hopv/MoCHi
lift.mli
(** [lift t] returns lambda-lifting of [t]. the definitions of let expressions must be side-effect free *) val lift : ?args:Syntax.id list -> Syntax.term -> ((Syntax.typ Id.t * (Syntax.id list * Syntax.term)) list * Syntax.term) * (Syntax.typ Id.t -> Ref_type.t -> Ref_type.t) (* lambda lifting for preprocess...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/lift.mli
ocaml
* [lift t] returns lambda-lifting of [t]. the definitions of let expressions must be side-effect free lambda lifting for preprocess of termination mode
val lift : ?args:Syntax.id list -> Syntax.term -> ((Syntax.typ Id.t * (Syntax.id list * Syntax.term)) list * Syntax.term) * (Syntax.typ Id.t -> Ref_type.t -> Ref_type.t) val lift' : ?args:Syntax.id list -> Syntax.term -> ((Syntax.typ Id.t * (Syntax.id list * Syntax.term)) list * Syntax.term) * (Syntax.typ ...
017ed7664f8d0306b0138d3d6ff3c632945c5a1de89557590199ca1628b04a02
guildhall/guile-sly
mines.scm
;;; Mines Copyright ( C ) 2014 < > ;;; ;;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the ;;; License, or (at your option) any later version. ;;; ;;; This program is...
null
https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/examples/mines/mines.scm
scheme
Mines This program is free software: you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Ge...
Copyright ( C ) 2014 < > modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the You should have received a copy of the GNU General Public License (use-modules (srfi srfi-1) (srfi srfi-9) (srfi srfi-26) ...
cf2f783dd6d30ea056a4a9985cfa82ac6359a1ba8c1a310a0f7c811666fc13d3
pablo-meier/ScrabbleCheat
string_utils.erl
-module(string_utils). -import(re, [replace/4]). -export([format_string_for_gaddag/1]). %% format_string_for_gaddag :: String -> String %% %% Tests the line for a newline, strips it and all whitespace. %% Converts to uppercase. format_string_for_gaddag(Line) -> No_Newline = replace(Line, "\\s+", "", [global, {...
null
https://raw.githubusercontent.com/pablo-meier/ScrabbleCheat/718cb768a910f2ba7ca6cd1d2aae0e342849bf0a/code/server/src/string_utils.erl
erlang
format_string_for_gaddag :: String -> String Tests the line for a newline, strips it and all whitespace. Converts to uppercase.
-module(string_utils). -import(re, [replace/4]). -export([format_string_for_gaddag/1]). format_string_for_gaddag(Line) -> No_Newline = replace(Line, "\\s+", "", [global, {return, list}]), string:to_upper(No_Newline).
a0ae97d0f6a1657e3290b5cf0b8a31436d3ff57eff0daa8c1b79898fa3997107
stylewarning/hypergeometrica
binary-splitting.lisp
binary-splitting.lisp ;;;; Copyright ( c ) 2012 - 2019 , 2022 ;;; Canonical reference: (in-package #:hypergeometrica) ;;; Representation of a hypergeometric series (defun one (n) (declare (type integer n) (ignore n)) (integer-mpz 1 'mpz/ram)) (defun int (n) (integer-mpz n 'mpz/ram)) (defst...
null
https://raw.githubusercontent.com/stylewarning/hypergeometrica/66f70fb97ca4647ac8db94307c5c01800c20a0ec/src/binary-splitting.lisp
lisp
Canonical reference: Representation of a hypergeometric series Partial sums for debugging Binary splitting Examples ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Exponential eˣ way over-estimate intermediate steps: compute G' such that G = --- G' + --- log(2 + √3)
binary-splitting.lisp Copyright ( c ) 2012 - 2019 , 2022 (in-package #:hypergeometrica) (defun one (n) (declare (type integer n) (ignore n)) (integer-mpz 1 'mpz/ram)) (defun int (n) (integer-mpz n 'mpz/ram)) (defstruct (series (:predicate series?)) "A representation of the series ...
c9c4d95a621dbd0f4f2c9772581a830e6545b37262b80c15b6b5446d7a5ec347
kazzmir/master-of-magic
extString.ml
* ExtString - Additional functions for string manipulations . * Copyright ( C ) 2003 * * 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 2.1...
null
https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/extlib-1.5/extString.ml
ocaml
explode and implode from the OCaml Expert FAQ.
* ExtString - Additional functions for string manipulations . * Copyright ( C ) 2003 * * 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 2.1...
cbf819dc952834cebae6f17127c4aad1ef5de2a9d02f4d6d185be992a6a8a234
heroku/cowboyku
cowboyku_sup.erl
Copyright ( c ) 2011 - 2013 , < > %% %% Permission to use, copy, modify, and/or 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 THE AUTHOR DISC...
null
https://raw.githubusercontent.com/heroku/cowboyku/ba7120bdb119ac676909e51f0738bde1d4fdd4ee/src/cowboyku_sup.erl
erlang
Permission to use, copy, modify, and/or 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. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 - 2013 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN @private -module(cowboyku_sup). -behaviour(supervis...
dd4b1151c8d6d1aa037aa6b71b6ba55fc746e2b25fd1518b18e4a7b0296d7982
janestreet/learn-ocaml-workshop
problem.ml
open! Base (* Another non-basic type in OCaml is a tuple. A tuple is an ordered collection of values that can each be of a different type. The signature for a tuple is written by separating all the types within the tuple by a [*]. *) type string_and_int = string * int type int_and_string_and_char = int * string...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/16-tuples/problem.ml
ocaml
Another non-basic type in OCaml is a tuple. A tuple is an ordered collection of values that can each be of a different type. The signature for a tuple is written by separating all the types within the tuple by a [*]. Tuples are created by joining values with a comma. You can also extract the components of a...
open! Base type string_and_int = string * int type int_and_string_and_char = int * string * char let example : int_and_string_and_char = 5, "hello", 'A' let i, s, c = example let () = assert (i = 5); assert (String.( = ) s "hello"); assert (Char.( = ) c 'A') ;; Consider a coordinate type containing the x a...
217193b2b8aef9cd29b7699fb857deb9fca76b0d2fdcdd96b45b431da64f7990
typelead/intellij-eta
SpaceRequirements.hs
module FFI.Com.IntelliJ.Lang.ParserDefinition.SpaceRequirements where import P # CLASS " com.intellij.lang . ParserDefinition . SpaceRequirements " # SpaceRequirements = SpaceRequirements (Object# SpaceRequirements) deriving Class type instance Inherits SpaceRequirements = '[JavaEnum SpaceRequirements] foreign ...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Lang/ParserDefinition/SpaceRequirements.hs
haskell
module FFI.Com.IntelliJ.Lang.ParserDefinition.SpaceRequirements where import P # CLASS " com.intellij.lang . ParserDefinition . SpaceRequirements " # SpaceRequirements = SpaceRequirements (Object# SpaceRequirements) deriving Class type instance Inherits SpaceRequirements = '[JavaEnum SpaceRequirements] foreign ...
b565968e80693a1e168630d67fb05b2da569b46c7ec5d7fd307112478cf96c4f
yetibot/core
status.clj
(ns yetibot.core.models.status (:require [taoensso.timbre :refer [info warn error]] [yetibot.core.db.status :refer :all] [clj-time [coerce :refer [from-date to-sql-time]] [format :refer [formatter unparse]] [core :refer [day year month to-time-zone after? ...
null
https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/models/status.clj
clojure
write helpers read
(ns yetibot.core.models.status (:require [taoensso.timbre :refer [info warn error]] [yetibot.core.db.status :refer :all] [clj-time [coerce :refer [from-date to-sql-time]] [format :refer [formatter unparse]] [core :refer [day year month to-time-zone after? ...
00398919d388f1a49bf1c7030a0a8d84117a7d19468f199924a220dfdb9fbfd3
issuu/sure-deploy
swarm_types.ml
open Core module SSLConfig = Conduit_async.V2.Ssl.Config module Client = Cohttp_async.Client module type Identifier = sig type t val of_string : string -> t val to_string : t -> string val pp : unit -> t -> string end module Stack : Identifier = struct type t = string let of_string = Fn.id let to_s...
null
https://raw.githubusercontent.com/issuu/sure-deploy/3df4298fd698dbdf221a8929e0c2b309728481f9/src/lib/swarm_types.ml
ocaml
Default Docker Registry Maybe a Custom Registry Custom registry could use a custom port
open Core module SSLConfig = Conduit_async.V2.Ssl.Config module Client = Cohttp_async.Client module type Identifier = sig type t val of_string : string -> t val to_string : t -> string val pp : unit -> t -> string end module Stack : Identifier = struct type t = string let of_string = Fn.id let to_s...
c6df4a9a4b963e32e0580498cce6a43b104b6ddf5351998bbdeec587dbe52e44
lispnik/cl-http
unix.lisp
-*- Syntax : ansi - common - lisp ; Base : 10 ; Package : http ; Mode : LISP -*- ( C ) Copyright 1995 , . ;;; All Rights Reserved. ;;; ;;;------------------------------------------------------------------- ;;; MAC HTTP CLIENT NETWORK INTERFACE ;;; (in-package :http) (require :sock) (declaim (inline de...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/acl501/client/unix.lisp
lisp
Base : 10 ; Package : http ; Mode : LISP -*- All Rights Reserved. ------------------------------------------------------------------- this is the function used by the portable client code.
( C ) Copyright 1995 , . MAC HTTP CLIENT NETWORK INTERFACE (in-package :http) (require :sock) (declaim (inline deallocate-client-http-stream)) noop present for implementations that resource their TCP streams , e.g. . (defun deallocate-client-http-stream (stream) (declare (ignore stream))) give up af...
3f552a6f552f289a460cae5b4c12659c54a1d7d7e0beb145c77d5d8f1a9d8e38
oden-lang/oden
EnvironmentConversion.hs
module Oden.EnvironmentConversion where import qualified Oden.Core as Core import Oden.Environment import Oden.Compiler.Environment as Compiler import Oden.Infer.Environment as Infer import qualified Data.Map as Map asTypingEnvironment :: CompileEnvironment -> TypingEnvironment asTypingEnvironment (Environment m) = ...
null
https://raw.githubusercontent.com/oden-lang/oden/10c99b59c8b77c4db51ade9a4d8f9573db7f4d14/src/Oden/EnvironmentConversion.hs
haskell
module Oden.EnvironmentConversion where import qualified Oden.Core as Core import Oden.Environment import Oden.Compiler.Environment as Compiler import Oden.Infer.Environment as Infer import qualified Data.Map as Map asTypingEnvironment :: CompileEnvironment -> TypingEnvironment asTypingEnvironment (Environment m) = ...
df14b560d36db0f79fb9583a8a5d024e80b0e604d9acbbb80fd02491824a7cfb
fizruk/lxc
AttachOptions.hs
# OPTIONS_HADDOCK not - home # ----------------------------------------------------------------------------- -- | -- Module : System.LXC.Internal.AttachOptions Copyright : ( c ) 2014 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- Internal module to support options and struc...
null
https://raw.githubusercontent.com/fizruk/lxc/9ba6e29c59bb78ef2b3b94a338c0b7a6776e53bb/src/System/LXC/Internal/AttachOptions.hs
haskell
--------------------------------------------------------------------------- | Module : System.LXC.Internal.AttachOptions License : BSD-style (see the file LICENSE) Maintainer : commands inside LXC containers. Normally you should import @System.LXC@ module only. -----------------------------------...
# OPTIONS_HADDOCK not - home # Copyright : ( c ) 2014 Internal module to support options and structures to run module System.LXC.Internal.AttachOptions where import Bindings.LXC.AttachOptions import Data.Int import Data.Maybe import Foreign import Foreign.C import System.LXC.Internal.Utils import System...
7f443c8a7960f6e7c3d4a0bef54e708b9ee9f3bfc24658138c00d97e977542de
skinkade/uniformity
test_util.cljc
(ns uniformity.test-util (:require #?(:clj [clojure.core.async :refer [<!!]] :cljs [cljs.core.async :refer [take!]]) #?(:cljs [cljs.test :refer [async]]))) (defn test-async "Asynchronous test awaiting ch to produce a value or close." [ch] #?(:clj (<!! ch) :cljs (async ...
null
https://raw.githubusercontent.com/skinkade/uniformity/e9d007a7be833e70b4358c02700fd81866de775a/test/uniformity/test_util.cljc
clojure
(ns uniformity.test-util (:require #?(:clj [clojure.core.async :refer [<!!]] :cljs [cljs.core.async :refer [take!]]) #?(:cljs [cljs.test :refer [async]]))) (defn test-async "Asynchronous test awaiting ch to produce a value or close." [ch] #?(:clj (<!! ch) :cljs (async ...
b9b02d551f9e3d6fa0796ca301eab9c11d6bdedec65880e340fa0c103423ff02
ZHaskell/stdio
UnalignedAccessSpec.hs
# LANGUAGE TypeApplications # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # module Std.Data.PrimArray.UnalignedAccessSpec where import qualified Data.List as L import Data.Int import GHC.Float import Data.Word import Std.Data.PrimArray.UnalignedAccess i...
null
https://raw.githubusercontent.com/ZHaskell/stdio/7887b9413dc9feb957ddcbea96184f904cf37c12/std-data/test/Std/Data/PrimArray/UnalignedAccessSpec.hs
haskell
------------------------------------------------------------------------------
# LANGUAGE TypeApplications # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # module Std.Data.PrimArray.UnalignedAccessSpec where import qualified Data.List as L import Data.Int import GHC.Float import Data.Word import Std.Data.PrimArray.UnalignedAccess i...
676054881e617292410759ec27cbfa56a07e481bdef3c07e5d129203ee2afe85
harpocrates/inline-rust
Struct.hs
# LANGUAGE TemplateHaskell , QuasiQuotes # module Main where import Language.Rust.Quote ( ty ) import Language.Rust.Inline import Foreign.Marshal.Unsafe ( unsafeLocalState ) import Foreign.Ptr ( Ptr ) import Foreign.Storable ( peek ) import Foreign.Marshal ( with ) import Data.Complex ...
null
https://raw.githubusercontent.com/harpocrates/inline-rust/5ecff8c92526000e5fc358a2dfede9b60ef59a1a/examples/Struct.hs
haskell
# LANGUAGE TemplateHaskell , QuasiQuotes # module Main where import Language.Rust.Quote ( ty ) import Language.Rust.Inline import Foreign.Marshal.Unsafe ( unsafeLocalState ) import Foreign.Ptr ( Ptr ) import Foreign.Storable ( peek ) import Foreign.Marshal ( with ) import Data.Complex ...
b1b8ab8348757922d73ee873747ff2c1ef84e82c93d17726ecfd2d18daa8b1d0
flipstone/haskell-for-beginners
7_typeclasses_102.hs
data Actor = DeNiro | Ferell | Stewart deriving (Eq, Show) Define an instance of for Actor that will -- sort the Actors by how cool they are. Using your Complex type from earlier , explicitly define an instance of for it -- -- Define a Container typeclass that defines an interface -- for unpacking a single...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_08/7_typeclasses_102.hs
haskell
sort the Actors by how cool they are. Define a Container typeclass that defines an interface for unpacking a single item from any container type.
data Actor = DeNiro | Ferell | Stewart deriving (Eq, Show) Define an instance of for Actor that will Using your Complex type from earlier , explicitly define an instance of for it Define instances of Container for Maybe , [ ] , Box , and .
f94c5f46fa4228eba8a3c465779ebeddd8100de1d643c589242480ff599af9f6
gigasquid/chemical-computing
core.cljs
(ns ^:figwheel-always gamma.core (:require [cljs.core.async :refer [timeout chan alts! >! <!]] [enfocus.core :as ef] [enfocus.events :as ev]) (:require-macros [cljs.core.async.macros :refer [go go-loop]])) (enable-console-print!) (def canvas (-> js/document (.getElementById "canvas"))) (de...
null
https://raw.githubusercontent.com/gigasquid/chemical-computing/cfaa62a8b706e89e581018f7f375a15975f1d9cb/gamma/src/gamma/core.cljs
clojure
Experiments Button event handling
(ns ^:figwheel-always gamma.core (:require [cljs.core.async :refer [timeout chan alts! >! <!]] [enfocus.core :as ef] [enfocus.events :as ev]) (:require-macros [cljs.core.async.macros :refer [go go-loop]])) (enable-console-print!) (def canvas (-> js/document (.getElementById "canvas"))) (de...
9b938009ebf105b66df5dbd46c3716b8888c9b626d46eacbdb57a481d5996739
camllight/camllight
format.ml
#open "exc";; #open "ref";; #open "int";; #open "fstring";; #open "eq";; #open "bool";; #open "io";; (* Tokens are one of the following : *) type pp_token = | Pp_text of string (* normal text *) | Pp_break of int * int (* complete break *) | Pp_tbreak of int * int (* go to next tab *) | Pp_st...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/format.ml
ocaml
Tokens are one of the following : normal text complete break go to next tab set a tabulation beginning of a block end of a block Beginning of a tabulation block end of a tabulation block to force a newline inside a block to do something only if this very line has b...
#open "exc";; #open "ref";; #open "int";; #open "fstring";; #open "eq";; #open "bool";; #open "io";; type pp_token = and block_type = Horizontal block no line breaking Horizontal - vertical block : same as vbox , except if this block is small enough to fit on a single line is sma...
463ce7b1cd2114e83a3c8a510ee9210685a98966e7b977c9ae2e206aba1e2172
imalooney/t3tr0s
routes.cljs
(ns client.routes (:require [client.pages.lobby :as lobby-page] [client.pages.login :as login-page] [client.pages.menu :as menu-page] [client.pages.mc :as mc-page] [client.pages.play :as play-page] [client.pages.spectate :as spectate-page] [client.util :as util])) (def function? js/goog.i...
null
https://raw.githubusercontent.com/imalooney/t3tr0s/2f9529e7138a0bc3a8578aa89c9661fc89e81cc0/src/client/routes.cljs
clojure
------------------------------------------------------------------------------ Routes ------------------------------------------------------------------------------ initial page + login solo play screen the "game loop" screens spectate MC / admin redirects - where is my HTTP 301? :) run cleanup function from th...
(ns client.routes (:require [client.pages.lobby :as lobby-page] [client.pages.login :as login-page] [client.pages.menu :as menu-page] [client.pages.mc :as mc-page] [client.pages.play :as play-page] [client.pages.spectate :as spectate-page] [client.util :as util])) (def function? js/goog.i...
c9bd9bf72d00b195e4ca4ccd00186a35d92d0cd014af536c9fd209e78cb3a35a
janestreet/async_websocket
websocket.mli
open! Core open Async module Opcode = Opcode module Connection_close_reason = Connection_close_reason module Frame_reader = Frame.Frame_reader module Frame = Frame module Iobuf_writer = Frame.Iobuf_writer module Content_reassembler = Content_reassembler type t val sec_websocket_accept_header_value : sec_websocket_key...
null
https://raw.githubusercontent.com/janestreet/async_websocket/4300992c15f5cbc7b6eac64a04b74ffec7009593/src/websocket.mli
ocaml
* Listen for pongs frames, and report when it has been too long since the last pong frame. Since pong frames don't typically arrive unsolicited (though it is legal if they do), we send ping frames at the specified interval.
open! Core open Async module Opcode = Opcode module Connection_close_reason = Connection_close_reason module Frame_reader = Frame.Frame_reader module Frame = Frame module Iobuf_writer = Frame.Iobuf_writer module Content_reassembler = Content_reassembler type t val sec_websocket_accept_header_value : sec_websocket_key...
9c1620537ffb5c0964912cecdb36a913e15ca9b6c381b91d3cbbabd4cf381e4a
jeromesimeon/Galax
namespace_names.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/namespace/namespace_names.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : namespace_names.ml , v 1.13 2007/10/25 00:08:42 mff Exp $ Module : Namespace_names Description : This module implements basic operations on XML names . Description: This module implements basic operations on XM...
ce50e400fa4b52d61222543c8ab25e07e7ee8a6a8880f5b20124c7f4f694621c
simmone/racket-simple-xlsx
plotArea-head-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../xlsx/xlsx.rkt") (require "../../../../sheet/sheet.rkt") (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/charts.rkt") (require racket/runtime-path) (define-runtime-path plotArea_head_file "plotArea_head.xm...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/plotArea-head/plotArea-head-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../xlsx/xlsx.rkt") (require "../../../../sheet/sheet.rkt") (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/charts.rkt") (require racket/runtime-path) (define-runtime-path plotArea_head_file "plotArea_head.xm...
63fdca921042278974359a64a95542b167dab2569cb375a8abf1db17c7a9dc05
DimaSamoz/mezzo
Score.hs
{-# LANGUAGE RecordWildCards, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Mezzo.Render.Score -- Description : Score building Copyright : ( c ) License : MIT -- -- Maintainer : -- Stability : experimental -- Portabil...
null
https://raw.githubusercontent.com/DimaSamoz/mezzo/13365da8907a714e34540f7a1d99898b67816cc9/src/Mezzo/Render/Score.hs
haskell
# LANGUAGE RecordWildCards, NoImplicitPrelude # --------------------------------------------------------------------------- | Module : Mezzo.Render.Score Description : Score building Maintainer : Stability : experimental Portability : portable Combinators for building scores: 'Music' values with ...
Copyright : ( c ) License : MIT module Mezzo.Render.Score Attributes (..) , defAttributes , getTimeSig , getKeySig , score , section , setTempo , setTimeSig , setKeySig , setRuleSet , free , classical , strict ) where import Mezzo.Model ...
a517edf98255721a0b0556b2dcd40cc3b42ccfcca6fa3907916213f0ff739a02
mariachris/Concuerror
pidigits.erl
The Great Computer Language Shootout %% / %% Contributed by : Created : 10 Oct 2010 -module(pidigits). -compile([native, {hipe, [o3]}]). -export([main/1]). main(N) when is_integer(N) -> Pid = spawn_link(fun() -> io_worker() end), register(io_worker, Pid), stream({1, 0, 1}, 1, 0, N); main...
null
https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/resources/src/shootout/pidigits.erl
erlang
/
The Great Computer Language Shootout Contributed by : Created : 10 Oct 2010 -module(pidigits). -compile([native, {hipe, [o3]}]). -export([main/1]). main(N) when is_integer(N) -> Pid = spawn_link(fun() -> io_worker() end), register(io_worker, Pid), stream({1, 0, 1}, 1, 0, N); main([N]) ->...
76034f7cfb7072e01fc9e5c34380775b325ccb64e752cbac3d26d880201789f2
inria-parkas/sundialsml
cvsRoberts_FSA_dns_Switch.ml
* ----------------------------------------------------------------- * $ Revision : 1.2 $ * $ Date : 2010/12/01 22:58:00 $ * ----------------------------------------------------------------- * Programmers : and , and @ LLNL * ----------------------------------------------------------------- * ...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/cvodes/serial/cvsRoberts_FSA_dns_Switch.ml
ocaml
Problem Constants output time factor number of equations initial time first output time turn on (T) or off (F) sensitivity analysis full (T) or partial error control (F) user provided r.h.s sensitivity analysis (T/F) sensitivity method f routine. Compute f(t,y). Print c...
* ----------------------------------------------------------------- * $ Revision : 1.2 $ * $ Date : 2010/12/01 22:58:00 $ * ----------------------------------------------------------------- * Programmers : and , and @ LLNL * ----------------------------------------------------------------- * ...
7ab59085909731ae9c22eda0fc5eb2ce141bf62456dcdb3ea779e640ad5c81fd
privet-kitty/cl-competitive
slope-trick.lisp
(defpackage :cp/slope-trick (:use :cl :cp/binary-heap) (:export #:make-slope-trick #:strick-add+ #:strick-add- #:strick-add #:strick-shift #:strick-min #:strick-argmin #:strick-left-cum #:strick-right-cum #:strick-merge #:strick-calc) (:documentation "Reference: -trick-1-%e8%a7%a3%e8%aa%a...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/386636a26bd91efb212c97d86ae0a71b9687e2d2/module/slope-trick.lisp
lisp
TODO: add test pop: +offset; push: -offset
(defpackage :cp/slope-trick (:use :cl :cp/binary-heap) (:export #:make-slope-trick #:strick-add+ #:strick-add- #:strick-add #:strick-shift #:strick-min #:strick-argmin #:strick-left-cum #:strick-right-cum #:strick-merge #:strick-calc) (:documentation "Reference: -trick-1-%e8%a7%a3%e8%aa%a...
8b771102191b9ce4d38b472ae5096fbb442ac646e2a9a08cff611a27b45ce72c
janestreet/bonsai
grammar_helper.mli
open! Core module Tags : sig type t val strip_tags : 'a Sexp_grammar.with_tag_list -> 'a val collect_and_strip_tags : 'a Sexp_grammar.with_tag_list -> 'a * t val find_doc_tag : t -> string option end
null
https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/web_ui/auto_generated/src/grammar_helper.mli
ocaml
open! Core module Tags : sig type t val strip_tags : 'a Sexp_grammar.with_tag_list -> 'a val collect_and_strip_tags : 'a Sexp_grammar.with_tag_list -> 'a * t val find_doc_tag : t -> string option end
9ad7e468025d89bc887411743c18e65c90d0090ce41b09894a6d9103aff07f59
cse-bristol/110-thermos-ui
finance.cljc
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-util.finance (:require [thermos-specs.document :as document] [thermos-util :refer [safe-div] ...
null
https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_util/finance.cljc
clojure
these things are not capexes so we account for them the other way
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-util.finance (:require [thermos-specs.document :as document] [thermos-util :refer [safe-div] ...
48aa8a1e380620096c351b696546cfa4012c2007fba97abd5ca91b0625cfbae6
ndmitchell/hlint
Util.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # module GHC.Util ( module GHC.Util.View , module GHC.Util.FreeVars , module GHC.Util.ApiAnnotation , module GHC.Util.HsDecl , module GHC.Util.HsExpr , module GHC.Util.SrcLoc , module GHC.Util.DynFlags , module GHC.Util.Scope , module GHC.Util.Un...
null
https://raw.githubusercontent.com/ndmitchell/hlint/792514dc9a92e7bacac1fd336372731dbd0c038f/src/GHC/Util.hs
haskell
# COMPLETE SrcSpan # | The \"Line'\" thing is because there is already e.g. 'SrcLoc.srcSpanStartLine' TODO: the bad locations are all (-1) right now # COMPLETE SrcLoc #
# LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # module GHC.Util ( module GHC.Util.View , module GHC.Util.FreeVars , module GHC.Util.ApiAnnotation , module GHC.Util.HsDecl , module GHC.Util.HsExpr , module GHC.Util.SrcLoc , module GHC.Util.DynFlags , module GHC.Util.Scope , module GHC.Util.Un...
1411c2e7a1006379b0ff418f3719716921ddf573ea327e62552745fe28e3ae3e
ijvcms/chuanqi_dev
scene_skill_lib2.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 09 . 十一月 2015 下午3:04 %%%------------------------------------------------------------------- -module(scene_skill_lib2). -include("common.hrl"). -include("record.hrl"...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/scene/scene_skill_lib2.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API callbacks ==================================================================== ==================================================================== 检查施法者,技能和受击者信息...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 09 . 十一月 2015 下午3:04 -module(scene_skill_lib2). -include("common.hrl"). -include("record.hrl"). -include("config.hrl"). -include("proto.hrl"). -include("cache.hrl"). -include("language_config.hrl"). -export([ ]). -export([ check_skill/3, do_check_skill/...
059db2072ac2a1b2b7f9b1154792b83c2f879a227d9b10e4ab3c98e46edc9f7c
bsansouci/bsb-native
compile.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/driver/compile.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 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 . open Misc open Format open Typedtree o...
84968fe5d6b1bbf44b6241710c19d7df0d6dc307da46f54f5fbee408ec048b77
spawnfest/eep49ers
wxPreviewCanvas.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxPreviewCanvas.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxPreviewCanvas). -include("wxe.hrl"). -export([]). -export([cacheBestSize/2,calcScrolledPosition/2,calcScr...
a8ffc45772daf569a81e841a6e3f4d28d6a84bb783d09fb9e800632bb18a1dc4
vito/atomo
Character.hs
# LANGUAGE QuasiQuotes # module Atomo.Kernel.Character where import Data.Char import Atomo load :: VM () load = do [p|(c: Character) control?|] =: liftM Boolean (onCharacter isControl) [p|(c: Character) space?|] =: liftM Boolean (onCharacter isSpace) [p|(c: Character) lower?|] =: liftM Boolean (onCharac...
null
https://raw.githubusercontent.com/vito/atomo/df22fcb3fbe80abb30b9ab3c6f5d50d3b8477f90/src/Atomo/Kernel/Character.hs
haskell
# LANGUAGE QuasiQuotes # module Atomo.Kernel.Character where import Data.Char import Atomo load :: VM () load = do [p|(c: Character) control?|] =: liftM Boolean (onCharacter isControl) [p|(c: Character) space?|] =: liftM Boolean (onCharacter isSpace) [p|(c: Character) lower?|] =: liftM Boolean (onCharac...
f7bb9ddcd365d57fe03766bb751c303d8e0b3b3a3854d03a9594b1b6b98cab83
billstclair/trubanc-lisp
package.lisp
(in-package :trivial-gray-streams-system) #+cmu (eval-when (:compile-toplevel :load-toplevel :execute) (require :gray-streams)) #+allegro (eval-when (:compile-toplevel :load-toplevel :execute) (unless (fboundp 'stream:stream-write-string) (require "streamc.fasl"))) #+ecl (eval-when (:compile-toplevel :load-t...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/trivial-gray-streams-2008-11-02/package.lisp
lisp
(in-package :trivial-gray-streams-system) #+cmu (eval-when (:compile-toplevel :load-toplevel :execute) (require :gray-streams)) #+allegro (eval-when (:compile-toplevel :load-toplevel :execute) (unless (fboundp 'stream:stream-write-string) (require "streamc.fasl"))) #+ecl (eval-when (:compile-toplevel :load-t...
4cc95266438ce44621fbc87c57d5c30b6cab147ecf224bd8ad409be9a7d7b621
Mikolaj/horde-ad
TestGradientSimple.hs
# LANGUAGE ConstraintKinds , DataKinds , FlexibleInstances , RankNTypes , TypeFamilies # TypeFamilies #-} module TestGradientSimple ( testTrees, finalCounter , sumElementsV, altSumElementsV, sinKonst, powKonst ) where import Prelude import Control.Arrow (first) import quali...
null
https://raw.githubusercontent.com/Mikolaj/horde-ad/19c9c24a4224ccc774b54e9a48684a57ea627ada/test/common/TestGradientSimple.hs
haskell
hlint would complain about spurious @id@, so we need to define our own. The formula for comparing derivative and gradient is due to @awf at -ad/issues/15#issuecomment-1063251319 A function that goes from `R^3` to `R^2`, with a representation of the input and the output tuple that is convenient for interfacing wit...
# LANGUAGE ConstraintKinds , DataKinds , FlexibleInstances , RankNTypes , TypeFamilies # TypeFamilies #-} module TestGradientSimple ( testTrees, finalCounter , sumElementsV, altSumElementsV, sinKonst, powKonst ) where import Prelude import Control.Arrow (first) import quali...
7ff9e40eba6154091492fc8c6bdb77dcb41f5c7e94581d9895c1994c13196d53
PacktWorkshops/The-Clojure-Workshop
core.clj
(ns hello-leiningen.core (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter08/Exercise8.09/hello-leiningen/src/hello_leiningen/core.clj
clojure
(ns hello-leiningen.core (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
83fc842e04a4760f728a66d0dd420af87e6d9ee7c0022b5e545d4650e017f58c
kit-clj/modules
pages.clj
(ns <<ns-name>>.web.routes.pages (:require [<<ns-name>>.web.middleware.exception :as exception] [<<ns-name>>.web.pages.layout :as layout] [integrant.core :as ig] [reitit.ring.middleware.muuntaja :as muuntaja] [reitit.ring.middleware.parameters :as parameters] [ring.middleware.anti-forgery :ref...
null
https://raw.githubusercontent.com/kit-clj/modules/aef9c925d2f106ea6c5b772d6642b4211a2a7087/html/assets/src/pages.clj
clojure
Routes Default middleware for pages query-params & form-params encoding response body exception handling
(ns <<ns-name>>.web.routes.pages (:require [<<ns-name>>.web.middleware.exception :as exception] [<<ns-name>>.web.pages.layout :as layout] [integrant.core :as ig] [reitit.ring.middleware.muuntaja :as muuntaja] [reitit.ring.middleware.parameters :as parameters] [ring.middleware.anti-forgery :ref...
b423ada2c93c28abe78ebe443e25e52452437e6ffdd938d2605af1fbb86554b8
AdRoll/rebar3_format
operator_indentation.erl
-module(operator_indentation). a_large_predicate(PredOne, PredTwo, AValue) -> something:very_long(based, on, PredOne, "1231231231231231313123123132sfsafsasfasdfasdfasdfsdf") andalso PredTwo andalso AValue =:= someth...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/operator_indentation.erl
erlang
-module(operator_indentation). a_large_predicate(PredOne, PredTwo, AValue) -> something:very_long(based, on, PredOne, "1231231231231231313123123132sfsafsasfasdfasdfasdfsdf") andalso PredTwo andalso AValue =:= someth...
ead7d4e30c6002de4fb21ed819b3eb6067d3c3ec1d9968e706e9494abaf42552
deadpendency/deadpendency
Main.hs
{-# LANGUAGE BangPatterns #-} module Main ( main, ) where import Common.Model.Dependency.Basic.BasicDependency import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Ecosystem.ProgrammingLanguage import DF.Effect.FetchDependencies.Model.FetchDependenc...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/bench/Main.hs
haskell
# LANGUAGE BangPatterns #
module Main ( main, ) where import Common.Model.Dependency.Basic.BasicDependency import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Ecosystem.ProgrammingLanguage import DF.Effect.FetchDependencies.Model.FetchDependenciesError import DF.Effect.Fetc...