_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 |
|---|---|---|---|---|---|---|---|---|
bf7a48e991794cd0b30e1ca753535844417725a09cbfdaf1627d0668bb1ba83c | zotonic/zotonic | z_fileuploader_recorddefs.erl | @author < >
2021
@doc All record definitions for the file uploader . Used by .
Copyright 2018
%%
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
%%
%% U... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_fileuploader/src/support/z_fileuploader_recorddefs.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | @author < >
2021
@doc All record definitions for the file uploader . Used by .
Copyright 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_fileuploader_recorddefs).
to be defined in jsxrecor... |
c2910dba3a6405f796ee11937160287a68bee766ba31e724d50e81e7eee82bf3 | archaelus/tsung | ts_os_mon_snmp.erl | %%%
Copyright 2008 ©
%%%
Author : < >
Created : 21 oct 2008 by < >
%%%
%%% 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 o... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung_controller/ts_os_mon_snmp.erl | erlang |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Genera... | Copyright 2008 ©
Author : < >
Created : 21 oct 2008 by < >
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... |
d8e307ed367f3d327a32f8383a9840bfd67202e30096b7db05c731629e737c19 | haskellfoundation/error-message-index | DerivingInt.hs | module DerivingInt where
data Example = Example
deriving Eq
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-11913/deriving-int/after/DerivingInt.hs | haskell | module DerivingInt where
data Example = Example
deriving Eq
| |
9cb85be5cab31728fdd43db5db7d05afd8fe240ce80851a7562c03d521a78a54 | Clozure/ccl-tests | subst-if-not.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 19 21:48:22 2003
Contains : Tests of SUBST - IF - NOT
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest subst-if-not.1
(check-subst-if-not '(x) 'consp '(1 (1 2) (1 2 3) (1 2 3 4)))
((x)
((x) (x) x)
((x) (x) (x) x)
((x) (x) (x... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/subst-if-not.lsp | lisp | -*- Mode: Lisp -*-
Keywords tests for subst-if-not
error cases | Author :
Created : Sat Apr 19 21:48:22 2003
Contains : Tests of SUBST - IF - NOT
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest subst-if-not.1
(check-subst-if-not '(x) 'consp '(1 (1 2) (1 2 3) (1 2 3 4)))
((x)
((x) (x) x)
((x) (x) (x) x)
((x) (x) (x) (x) x)
x))
(deftes... |
2199768357267c280678b34bba28c992ead8340faf188a246d658a3e20d57a0f | macourtney/drift | dynamic_config.clj | (ns config.dynamic-config
(use clojure.test))
(defn config []
{:init (fn [args]
(is (= args ["bloop" "blargh"]))
{:more-config 42})})
| null | https://raw.githubusercontent.com/macourtney/drift/b5cf735ab41ff2c95b0b1d9cf990faa342353171/test/config/dynamic_config.clj | clojure | (ns config.dynamic-config
(use clojure.test))
(defn config []
{:init (fn [args]
(is (= args ["bloop" "blargh"]))
{:more-config 42})})
| |
5380b9ba7ea02fef545bc1c1153bf7791b2be62842014284fc7aac9c13266dd2 | lem-project/lem | swank-arglists.lisp | ;;; swank-arglists.lisp --- arglist related code ??
;;
Authors : < >
< >
;; and others
;;
;; License: Public Domain
;;
(in-package :micros)
Utilities
(defun compose (&rest functions)
"Compose FUNCTIONS right-associatively, returning a function"
#'(lambda (x)
(reduce #'funca... | null | https://raw.githubusercontent.com/lem-project/lem/bace7e3307cc5f419f493c3a309d771b472d3155/lib/micros/contrib/swank-arglists.lisp | lisp | swank-arglists.lisp --- arglist related code ??
and others
License: Public Domain
Arglist Definition
list of the provided actual arguments
list of the required arguments
list of the optional arguments
whether &key appeared
list of the keywords
whether the rest argument is a &body
whether &allow-o... | Authors : < >
< >
(in-package :micros)
Utilities
(defun compose (&rest functions)
"Compose FUNCTIONS right-associatively, returning a function"
#'(lambda (x)
(reduce #'funcall functions :initial-value x :from-end t)))
(defun length= (seq n)
"Test for whether SEQ contains N number... |
b22ed5e83c66a48b67f01d89f1044a55e512fa2e992fd95aac95ce4666dc7028 | alakahakai/hackerrank | common-divisors.hs |
Common Divisors
-divisors
Author : < >
Date : June 8th , 2015
Common Divisors
-divisors
Author: Ray Qiu <>
Date: June 8th, 2015
-}
{-# OPTIONS -O2 #-}
import Control.Applicative (liftA)
import Control.Monad (forM_)
import qualified Data.Map as M
impor... | null | https://raw.githubusercontent.com/alakahakai/hackerrank/465d17107bbe402daf750651bb57cf092305acf9/fp/common-divisors.hs | haskell | # OPTIONS -O2 # |
Common Divisors
-divisors
Author : < >
Date : June 8th , 2015
Common Divisors
-divisors
Author: Ray Qiu <>
Date: June 8th, 2015
-}
import Control.Applicative (liftA)
import Control.Monad (forM_)
import qualified Data.Map as M
import qualified Data.Set... |
8e55056fe416ec48cabfc9d642825d70671f4a307ebb55eb6d96d38519d386bc | jeffshrager/biobike | special-slots.lisp | -*- Package : frames ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :frames)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Frames/special-slots.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :frames)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to... |
82c5ce6fcdc0a76d27084c12d41602dcdb35918032df44986d4e0298c24dff64 | angavrilov/cl-linux-debug | patches.lisp | (in-package :asdf)
(let ((cg (find-system :cffi-grovel)))
(unless (system-source-file cg)
(%set-system-source-file
(pathname (directory-namestring
(merge-pathnames #P"mk-runtime/"
(system-definition-pathname :cl-linux-debug))))
cg)))
(in-package :elf)
... | null | https://raw.githubusercontent.com/angavrilov/cl-linux-debug/879da2dcd14918bb8ffab003e934f4b01fba12ff/patches.lisp | lisp | Patch the ELF library. The original implementation of the
function is massively inefficient. | (in-package :asdf)
(let ((cg (find-system :cffi-grovel)))
(unless (system-source-file cg)
(%set-system-source-file
(pathname (directory-namestring
(merge-pathnames #P"mk-runtime/"
(system-definition-pathname :cl-linux-debug))))
cg)))
(in-package :elf)
... |
182cb2094b02547bfff1472fd7d88ae742cfa468bd359d6c8fac7c1c6a97c6eb | Clojure2D/clojure2d-examples | ray.clj | (ns rt4.the-next-week.ch07a.ray
(:require [fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol RayProto
(at [ray t]))
(defrecord Ray [origin direction ^double time]
RayProto
(at [_ t] (v/ad... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07a/ray.clj | clojure | (ns rt4.the-next-week.ch07a.ray
(:require [fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol RayProto
(at [ray t]))
(defrecord Ray [origin direction ^double time]
RayProto
(at [_ t] (v/ad... | |
937d94ffc31316ac22dc3683c7bb76f54aeb4f6a77263085ee612b05bfe5dcc7 | lichtblau/CommonQt | t5.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
;;; -t3.html
(defpackage :qt-tutorial-5
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-5)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass my-widget ()
()
(:metaclass qt-class)
(:qt-superclass "QWidget"))
(defmethod... | null | https://raw.githubusercontent.com/lichtblau/CommonQt/fa14472594b2b2b34695ec3fff6f858a03ec5813/tutorial/old/t5.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
-t3.html |
(defpackage :qt-tutorial-5
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-5)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass my-widget ()
()
(:metaclass qt-class)
(:qt-superclass "QWidget"))
(defmethod initialize-instance :after ((instance my-widget) &key parent)
(if parent
... |
09e14e10545b9411edb9c9332e04c179bd0d0c3242651a564aa6905d99a2dcf4 | gnuvince/ocaml-tiger | lexer.mli | exception LexerError of (Src_pos.t * string)
val lex_tiger : Lexing.lexbuf -> Parser.token
| null | https://raw.githubusercontent.com/gnuvince/ocaml-tiger/42e39cb0d48cf3100fbfb7e51aa88a71e04ec6a4/lexer.mli | ocaml | exception LexerError of (Src_pos.t * string)
val lex_tiger : Lexing.lexbuf -> Parser.token
| |
37f232407795d9912ff99c9eb7fc52021667949de51f24900f675056464553df | ocaml/merlin | path.ml | module A = struct
type a = int
end
open A
let x = (5 : a)
| null | https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/tests/test-dirs/outline.t/path.ml | ocaml | module A = struct
type a = int
end
open A
let x = (5 : a)
| |
89f13f4c195dcab36153960933c679df0761d42a09b40ac4a800ca40d22fe450 | reasonml/reason | knownMlIssues.ml | (* [x] fixed *)
type t2 =
int * int (* attributed to entire type not binding *)
type color =
| Red of int (* After red *)
| Black of int (* After black *)
| Green of int (* Does not remain here *)
let blahCurriedX x =
function
| Red 10
| Black 20
| Green 10 -> 1 (* After or pattern green *)
| Red x... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/formatTest/typeCheckedTests/input/knownMlIssues.ml | ocaml | [x] fixed
attributed to entire type not binding
After red
After black
Does not remain here
After or pattern green
After red
After black
On next line after blahCurriedX def
This example illustrates the above issue, but isn't een idempotent due to the issue.
type cfg = {
node_id : int ref;
}
... | type t2 =
type color =
let blahCurriedX x =
function
| Red 10
| Black 20
After second green
EOL comments wrap because other elements break first ( in this example
" mutable " causes breaks . We either need :
1 . To prevent wrapping of anything inside of eol comments attachments .
2 . eol... |
9464c1c4826d5dd98ad3ee03ac655f5f8143649dcb668b08d4f4e64014be55d9 | gas2serra/cldk | event-handler.lisp | (in-package :cldk-internals)
;;; event handler
(defclass event-handler (display-driver-callback-handler)
((cur-x :initform nil
:reader event-handler-cur-x)
(cur-y :initform nil
:reader event-handler-cur-y)
(cur-root-x :initform nil
:reader event-handler-cur-root-x)
(cur-... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/Core/mirror/event-handler.lisp | lisp | event handler
pretty print
log event handler
| (in-package :cldk-internals)
(defclass event-handler (display-driver-callback-handler)
((cur-x :initform nil
:reader event-handler-cur-x)
(cur-y :initform nil
:reader event-handler-cur-y)
(cur-root-x :initform nil
:reader event-handler-cur-root-x)
(cur-root-y :initform n... |
0270805fbdf73c26103b8b7bd886cea71e41f350992a948437a5c61817ca7171 | cram2/cram | ode.lisp | Regression test ODE for GSLL , automatically generated
;;
Copyright 2009
Distributed under the terms of the GNU General Public License
;;
;; 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... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/ode.lisp | lisp |
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... | Regression test ODE for GSLL , automatically generated
Copyright 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of t... |
566bb5dc9141fa24d31234e348f6e2822893eb3df7bf2649a1bb1ba3d0744fa1 | ocaml/ocaml | warning16.ml | (* TEST
* expect
*)
let foo ?x = ()
[%%expect{|
Line 1, characters 9-10:
1 | let foo ?x = ()
^
Warning 16 [unerasable-optional-argument]: this optional argument cannot be erased.
val foo : ?x:'a -> unit = <fun>
|}]
let foo ?x ~y = ()
[%%expect{|
Line 1, characters 9-10:
1 | let foo ?x ~y = ()
... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-warnings/warning16.ml | ocaml | TEST
* expect
| let foo ?x = ()
[%%expect{|
Line 1, characters 9-10:
1 | let foo ?x = ()
^
Warning 16 [unerasable-optional-argument]: this optional argument cannot be erased.
val foo : ?x:'a -> unit = <fun>
|}]
let foo ?x ~y = ()
[%%expect{|
Line 1, characters 9-10:
1 | let foo ?x ~y = ()
^
Warning 16 [uner... |
161434a00f2a7c4ebd3c5e11022ad18b2ca98dbef54e757eca5387fda3bae6f8 | ChicagoBoss/ChicagoBoss | boss_env.erl | %%-------------------------------------------------------------------
@author
ChicagoBoss Team and contributors , see file in root directory
%% @end
This file is part of ChicagoBoss project .
See file in root directory
%% for license information, see LICENSE file in root directory
%% @end
%... | null | https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/src/boss/boss_env.erl | erlang | -------------------------------------------------------------------
@end
for license information, see LICENSE file in root directory
@end
@doc
------------------------------------------------------------------- | @author
ChicagoBoss Team and contributors , see file in root directory
This file is part of ChicagoBoss project .
See file in root directory
-module(boss_env).
-export([boss_env/0, setup_boss_env/0, get_env/2, get_env/3]).
-export([master_node/0, is_master_node/0, is_developing_app/1]).
-expo... |
368c58821a6a4108e23a44aa634301a5e3f081d89102331102cb9f06454a6829 | lemonidas/Alan-Compiler | AlanString.ml | open Error
explode - implode functions
let explode s =
let rec expl i l =
if i < 0 then l else
expl (i - 1) (s.[i] :: l) in
expl (String.length s - 1) []
let implode l =
let result = String.create (List.length l) in
let rec imp i = function
| [] -> result
| c :: l -> result.[i] <- c; imp (i + ... | null | https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/AlanString.ml | ocaml | Functions for parsing hex characters
Takes a string and returns it without escape characters
Handle escape sequences for Final Code Creation | open Error
explode - implode functions
let explode s =
let rec expl i l =
if i < 0 then l else
expl (i - 1) (s.[i] :: l) in
expl (String.length s - 1) []
let implode l =
let result = String.create (List.length l) in
let rec imp i = function
| [] -> result
| c :: l -> result.[i] <- c; imp (i + ... |
e8b242ee84e577d2ea2d45f98d1a5f3e5466c0efa77628f0579370f4339cd9ea | abdulapopoola/SICPBook | 3.01.scm | #lang planet neil/sicp
(define (make-accumulator value)
(lambda (new-value)
(begin (set! value (+ value new-value))
value)))
(define A (make-accumulator 5))
(A 10)
(A 10)
(A -20)
(define x (A 0))
| null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%203/3.1/3.01.scm | scheme | #lang planet neil/sicp
(define (make-accumulator value)
(lambda (new-value)
(begin (set! value (+ value new-value))
value)))
(define A (make-accumulator 5))
(A 10)
(A 10)
(A -20)
(define x (A 0))
| |
141284ca46d9f4425d634f0fc8cf3415c732785252f353b2822eb1a471b09d37 | pa-ba/compdata | Matching.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
--------------------------------------------------------------------------------
-- |
-- Module : Data.Comp.Matching
Copyright : ( c ) 2010 - 2011
-- License : BSD3
Maintainer : < >... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/src/Data/Comp/Matching.hs | haskell | # LANGUAGE FlexibleContexts #
------------------------------------------------------------------------------
|
Module : Data.Comp.Matching
License : BSD3
Stability : experimental
This module implements matching of contexts or terms with variables againts terms
---------------------------------... | # LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) 2010 - 2011
Maintainer : < >
Portability : non - portable ( GHC Extensions )
module Data.Comp.Matching
(
matchCxt,
matchTerm,
module Data.Comp.Variables
) where
import Data.Comp.Equali... |
7683947781357df984f5663faeee8005b8b99c0e7f04f62ff1c1a476731c20d1 | mokus0/polynomial | NumInstance.hs | module Bench.NumInstance where
import Criterion
numInstanceTests :: [Benchmark]
numInstanceTests = []
| null | https://raw.githubusercontent.com/mokus0/polynomial/42fde2c9a72f449eeda4d534acfe64b8e92b5c27/bench/src/Bench/NumInstance.hs | haskell | module Bench.NumInstance where
import Criterion
numInstanceTests :: [Benchmark]
numInstanceTests = []
| |
4c2fb0c6808a0816f616c5d5857baa731a6372934491989e397b1b9dbb5c674c | ghc/ghc | Types.hs | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE Trustworthy #
{-# OPTIONS_GHC -Wno-unused-binds #-}
-- XXX -Wno-unused-binds stops us warning about unused constructors,
-- but really we should just remove them if we don't want them
----... | null | https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/libraries/base/Foreign/C/Types.hs | haskell | # OPTIONS_GHC -Wno-unused-binds #
XXX -Wno-unused-binds stops us warning about unused constructors,
but really we should just remove them if we don't want them
---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability :... | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE Trustworthy #
Module : Foreign . C.Types
Copyright : ( c ) The FFI task force 2001
Maintainer :
Mapping of C types to corresponding types .
#include <ghcplatfor... |
91547792d5e9ff62157d874e7b8ad83c0c4033a00dda4d2b1484c5c918cd6119 | bobzhang/ocaml-book | type_equal.ml | open Format
(** functor can only be modules
input is a type-constructor
output is a module type as well
*)
module type Equal = sig
type fst
type snd
module Coerce (S:sig type 'a f end) : sig
val f: fst S.f -> snd S.f
end
end
type ('a,'b)equal = (module Equal with type fst = 'a and type ... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/types/type_equal.ml | ocaml | * functor can only be modules
input is a type-constructor
output is a module type as well
* parameterize over type is fine
parameterize over (type constructor) requires functor
functor, functor also has a signature.
type declaration appears both in
module definition and module type definition... | open Format
module type Equal = sig
type fst
type snd
module Coerce (S:sig type 'a f end) : sig
val f: fst S.f -> snd S.f
end
end
type ('a,'b)equal = (module Equal with type fst = 'a and type snd = 'b)
module Refl : Equal = struct
type fst
type snd = fst
module Coerce (S:sig type 'a f end) =... |
5302d2f8c1e2842b4a074d2b7eb9ebda71eab86d73a62818fe8ea5406ba4a258 | arichiardi/replumb | load_test.cljs | (ns replumb.load-test
(:require [cljs.test :refer-macros [deftest is]]
[replumb.load :refer [file-paths-for-load-fn file-paths]]))
(deftest paths-without-ext
(is (empty? (file-paths-for-load-fn [] true "temp")) "If empty src-paths and :macros true, file-paths-for-load-fn should return empty vector")
... | null | https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/cljs/replumb/load_test.cljs | clojure | (ns replumb.load-test
(:require [cljs.test :refer-macros [deftest is]]
[replumb.load :refer [file-paths-for-load-fn file-paths]]))
(deftest paths-without-ext
(is (empty? (file-paths-for-load-fn [] true "temp")) "If empty src-paths and :macros true, file-paths-for-load-fn should return empty vector")
... | |
56ff3cedf53981d1367e9248c45ded87ff5d8dc602c2b41bee30404897b579a1 | kumarshantanu/calfpath | type.cljc | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/calfpath/e923ad59106661cd66389cf94954b47558799d00/src/calfpath/type.cljc | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns calfpath.type
"Type related arifacts.")
(defprotocol IRouteMatcher
(-parse-uri-template [this uri-template])
(-get-static-uri-template [this uri-pattern-tokens] "Return URI token(s) if static URI template, nil otherwise")
(-initialize-request ... |
70ef1e402e81b6839172747d3b348d67c38b5d8394cb4f27397869aba921d7f6 | clojure-interop/google-cloud-clients | core.clj | (ns com.google.cloud.scheduler.v1beta1.stub.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStub])
(require '[com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStubSettings$Builder])
(require '[com.google.cloud.scheduler.v1beta1... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.scheduler/src/com/google/cloud/scheduler/v1beta1/stub/core.clj | clojure | (ns com.google.cloud.scheduler.v1beta1.stub.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStub])
(require '[com.google.cloud.scheduler.v1beta1.stub.CloudSchedulerStubSettings$Builder])
(require '[com.google.cloud.scheduler.v1beta1... | |
40a729c59e6e7ad6bbee80e53cd155f9532c55bc422a8b29885b2f91d6efe34b | lread/test-doc-blocks | process.clj | (ns ^:no-doc lread.test-doc-blocks.impl.process
(:require [clojure.set :as cset]
[clojure.string :as string]
[lread.test-doc-blocks.impl.amalg-ns :as amalg-ns]
[lread.test-doc-blocks.impl.body-prep :as body-prep]
[lread.test-doc-blocks.impl.inline-ns :as inline-ns]
... | null | https://raw.githubusercontent.com/lread/test-doc-blocks/3ec9020c51e3b69408120a11df228e6416c453a9/src/lread/test_doc_blocks/impl/process.clj | clojure | (ns ^:no-doc lread.test-doc-blocks.impl.process
(:require [clojure.set :as cset]
[clojure.string :as string]
[lread.test-doc-blocks.impl.amalg-ns :as amalg-ns]
[lread.test-doc-blocks.impl.body-prep :as body-prep]
[lread.test-doc-blocks.impl.inline-ns :as inline-ns]
... | |
41f5897a57aba705af917c899b80da588f30ba132c0fadb5436ce5fb86d0234a | appleshan/cl-http | test.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : cl - user ; -*-
(in-package "CL-USER")
;;; simplest of tests, to load the parse and parse a document
#+(and mcl (not CL-HTTP))
(load "entwicklung@paz:sourceServer:lisp:xml:define-system.lisp")
#+(and (not mcl) (not cl-http))
(load "d:\\Source\... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/contrib/janderson/xml-2001-10-03/tests/test.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : cl - user ; -*-
simplest of tests, to load the parse and parse a document
minimum system
utils
(execute-system-operations :xutil '(:compile))
xml parser
(execute-system-operations :xqdm '(:load))
(execute-system-operations :xqdm '(:compile))
(execute-system-op... |
(in-package "CL-USER")
#+(and mcl (not CL-HTTP))
(load "entwicklung@paz:sourceServer:lisp:xml:define-system.lisp")
#+(and (not mcl) (not cl-http))
(load "d:\\Source\\Lisp\\Xml\\define-system.lisp")
#+mcl
(register-system-definition :xparser "entwicklung@paz:sourceServer:lisp:xml:sysdcl.lisp")
#-mcl
(register-system... |
63aa2099dbe156fcccf2f74fc197a94784ecba6f793ee4f7e7b0aef5f1ff6248 | darkleaf/publicator | types.clj | (ns publicator.persistence.types
(:require
[jdbc.proto])
(:import
[org.postgresql.jdbc PgArray]
[org.postgresql.util PGobject]
[java.sql Timestamp]
[java.time Instant]
[java.util Collection]))
(extend-protocol jdbc.proto/ISQLResultSetReadColumn
PGobject
(from-sql-type [this _conn _metadata _i... | null | https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/persistence/src/publicator/persistence/types.clj | clojure | (ns publicator.persistence.types
(:require
[jdbc.proto])
(:import
[org.postgresql.jdbc PgArray]
[org.postgresql.util PGobject]
[java.sql Timestamp]
[java.time Instant]
[java.util Collection]))
(extend-protocol jdbc.proto/ISQLResultSetReadColumn
PGobject
(from-sql-type [this _conn _metadata _i... | |
ee001bfafe25574eb8e6c73d253edbbe22db0a4c4713b9788e7c65ccc587551a | haskell-game/tiny-games-hs | hexescape.hs | #!/usr/bin/env stack
-- stack script --resolver lts-20 --package grid,random
import Import;c=putStrLn;n=4;u=pure;v z=randomRIO(0,z);main=do{let{gH=
hexHexGrid n};let{aC=indices gH\\[(0,0)]};e<-(aC!!)<$>v (length aC-1);(_,_,h)<-
g(gH,e)(head(centre gH),False,100);if h<=0then c"✝"else c"🪜"};m p=do{mapM_(c.(
\(k,r)->([k.... | null | https://raw.githubusercontent.com/haskell-game/tiny-games-hs/fe407ed6f920717ce3e725483b39a05596b1cf11/hackage/hexescape/hexescape.hs | haskell | stack script --resolver lts-20 --package grid,random
^10 ------------------------------------------------------------------ 80> -- | #!/usr/bin/env stack
import Import;c=putStrLn;n=4;u=pure;v z=randomRIO(0,z);main=do{let{gH=
hexHexGrid n};let{aC=indices gH\\[(0,0)]};e<-(aC!!)<$>v (length aC-1);(_,_,h)<-
g(gH,e)(head(centre gH),False,100);if h<=0then c"✝"else c"🪜"};m p=do{mapM_(c.(
\(k,r)->([k..n]>>" ")++((mC r p)=<<[2..n+k])))(zip([1..n-1]++[n, n-1... |
a98de1c5ad67972cce1b57d1aeb94cd560b2f5f58f9c0618c5e566b0b9cf5cb9 | yesodweb/yesod | Message.hs | {-# LANGUAGE OverloadedStrings #-}
module Yesod.Auth.Message
( AuthMessage (..)
, defaultMessage
-- * All languages
, englishMessage
, portugueseMessage
, swedishMessage
, germanMessage
, frenchMessage
, norwegianBokmålMessage
, japaneseMessage
, finnishMessage
, chine... | null | https://raw.githubusercontent.com/yesodweb/yesod/f30f96ee41feef9562b1880ed5a3dc9dfa81d0b1/yesod-auth/Yesod/Auth/Message.hs | haskell | # LANGUAGE OverloadedStrings #
* All languages
| Defaults to 'englishMessage'. | module Yesod.Auth.Message
( AuthMessage (..)
, defaultMessage
, englishMessage
, portugueseMessage
, swedishMessage
, germanMessage
, frenchMessage
, norwegianBokmålMessage
, japaneseMessage
, finnishMessage
, chineseMessage
, croatianMessage
, spanishMessage
, c... |
e13e7ba7e59e4567fb86a68eccfd0b35ce4cfa6f98a54df83fbb856e9f6b4fe0 | YoshikuniJujo/test_haskell | Shaderc.hs | # LANGUAGE BlockArguments #
# LANGUAGE TypeApplications , ScopedTypeVariables #
{-# LANGUAGE DataKinds, KindSignatures #-}
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Shaderc where
import Foreign.Storable
import Control.Monad.Cont
import Data.Strin... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/20de2cb05eff3b570b30fbdc4273cdd636f914be/themes/gui/vulkan/try-shaderc/src/Shaderc.hs | haskell | # LANGUAGE DataKinds, KindSignatures # | # LANGUAGE BlockArguments #
# LANGUAGE TypeApplications , ScopedTypeVariables #
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Shaderc where
import Foreign.Storable
import Control.Monad.Cont
import Data.String
import qualified Data.ByteString as BS
... |
9ecc6db04dbfa99e57a1841d8f4fdc10adc571d9212a27d3ffc304843a2c57a5 | xmonad/xmonad-contrib | Circle.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Circle
-- Description : An elliptical, overlapping layout.
Copyright : ( c )
-- License : BSD-style (see LICENSE)
--
Maintainer :... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Layout/Circle.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.Circle
Description : An elliptical, overlapping layout.
License : BSD-style (see LICENSE)
Stability : unstable
Portability : unportable
----------------------------------------------------------... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
Copyright : ( c )
Maintainer : < >
Circle is an elliptical , overlapping layout , by
module XMonad.Layout.Circle (
Circle (..)
import XMonad.Prelude
import XMonad
import XMonad.StackSet (integrate, peek)
>... |
62dbdc33608c469e0491eba3ef04b68e229b2cf8d0e7c2f2f34b62301abc5c7b | macchiato-framework/examples | middleware.cljs | (ns dirac-example.middleware
(:require
[macchiato.middleware.defaults :as defaults]))
(defn wrap-defaults [handler]
(defaults/wrap-defaults handler defaults/site-defaults))
| null | https://raw.githubusercontent.com/macchiato-framework/examples/946bdf1a04f5ef787fc83affdcbf6603bbf29b5c/dirac-example/src/dirac_example/middleware.cljs | clojure | (ns dirac-example.middleware
(:require
[macchiato.middleware.defaults :as defaults]))
(defn wrap-defaults [handler]
(defaults/wrap-defaults handler defaults/site-defaults))
| |
d0333e762d3205e0f78f8b06562ff6a306d42acbdfe965c6659e09de4f0ab73f | fare/fare-scripts | toggle-touchpad.lisp | ":" ; exec cl-launch -Q -sm fare-scripts/toggle-touchpad "$0" "$@"
;; -*- lisp -*-
;; Based on #Software_toggle
;; Use the UI preferences to add a keyboard shortcut that invokes this script.
;; To avoid the slow startup time of lisp as a script, better dump an image with:
;; cl-launch -o ~/bin/x64/toggle-touchpad -d ... | null | https://raw.githubusercontent.com/fare/fare-scripts/fee32edbbe4ca486e63922d94305027a8b5603a5/toggle-touchpad.lisp | lisp | exec cl-launch -Q -sm fare-scripts/toggle-touchpad "$0" "$@"
-*- lisp -*-
Based on #Software_toggle
Use the UI preferences to add a keyboard shortcut that invokes this script.
To avoid the slow startup time of lisp as a script, better dump an image with:
cl-launch -o ~/bin/x64/toggle-touchpad -d ! -l clisp \
... |
(uiop:define-package :fare-scripts/toggle-touchpad
(:use :cl :fare-utils :uiop :inferior-shell
:optima :optima.ppcre :cl-scripting)
(:export #:help #:get-touchpad-id #:device-enabled-p
#:toggle-device #:disable-device #:enable-device))
(in-package :fare-scripts/toggle-touchpad)
(defun get-touc... |
161f3c9757c9e2e2a537a3d9f620046d73aaedbcddeac0a1da689c75e8789dc1 | rizo/snowflake-os | printtyp.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Crist... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/typing/printtyp.ml | ocaml | *********************************************************************
Objective Caml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Ctype
open Format
open Longi... |
75614bb3495a50bec93193eb4915b86a0e6ca744b72945846888d932c42974f3 | ghc/ghc | IfaceToCore.hs |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Type checking of type signatures in interface files
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Type checking of type signatures in interface files
-}
# L... | null | https://raw.githubusercontent.com/ghc/ghc/3c0f0c6d99486502c72e6514a40e7264baaa6afc/compiler/GHC/IfaceToCore.hs | haskell | Desired by HERMIT (#7683)
needs to build types & coercions in a knot
For ( b ) consider : f = \$( ... h .... )
where h is imported , and calls f via an hi - boot file .
This is bad ! But it is not seen as a staging error , because h
is indeed imported . We do n't want the type - checker to black - hole
w... |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Type checking of type signatures in interface files
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Type checking of type signatures in interface files
-}
# L... |
a9d8a727f24f9914fdb621a33a61ba1ae2b57723732fb942026ac03d99bc9547 | bozsahin/cogs542 | tr.ccg.lisp | (DEFPARAMETER *CCG-GRAMMAR*
'(((KEY 1) (PHON COCUK) (MORPH N) (SYN ((BCAT NP) (FEATS NIL))) (SEM "CHILD")
(PARAM 1.0))
((KEY 2) (PHON COCUK) (MORPH N)
(SYN
(((BCAT S) (FEATS NIL)) (DIR FS) (MODAL ALL)
(((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL)
((BCAT NP) (FEATS ((CASE NOM)))))))
... | null | https://raw.githubusercontent.com/bozsahin/cogs542/3093fe6dc720405096af2e18d7ed9edd5f2ef47d/ccglab-examples/wo-turkish/tr.ccg.lisp | lisp | (DEFPARAMETER *CCG-GRAMMAR*
'(((KEY 1) (PHON COCUK) (MORPH N) (SYN ((BCAT NP) (FEATS NIL))) (SEM "CHILD")
(PARAM 1.0))
((KEY 2) (PHON COCUK) (MORPH N)
(SYN
(((BCAT S) (FEATS NIL)) (DIR FS) (MODAL ALL)
(((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL)
((BCAT NP) (FEATS ((CASE NOM)))))))
... | |
fbd1403aae07018ada6851424824c838a672fbfa03092c53fc6c553dd626c2da | haskell-distributed/distributed-process-platform | TestRegistry.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TemplateHaskell #
module Main where
import Control.Concurrent.MVar (newEmptyMVar, takeMVar)
import Control.Concurrent.Utils (Lock, Exclusive(..), Synchronised(..))
import Control.Distributed.Proc... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/tests/TestRegistry.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE BangPatterns #
fwibble is gone...
but fwobble is still registered
at this point, we know the child has grabbed the name k for itself
yes, using the lock here without exception handling is risky...
spawnSignalled to start it) and is waiting for us to unlock...
key... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Main where
import Control.Concurrent.MVar (newEmptyMVar, takeMVar)
import Control.Concurrent.Utils (Lock, Exclusive(..), Synchronised(..))
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Control.Distributed.Pro... |
589d5410e20f5a8cdf56951dc78aad3ef7749b7b1bea07784d89ff6bb66535a2 | ardumont/haskell-lab | CountingChange.hs | module CountingChange where
import Data.List
countchange :: Int -> [Int] -> Int
countchange m c = countChange m $ (reverse . sort) c
countChange :: Int -> [Int] -> Int
countChange _ [] = 0
countChange 0 _ = 1
countChange m c@(x:xs) = if m < 0
then 0
else... | null | https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/CountingChange.hs | haskell | 1022
1022
1022
1022
1022
1022 | module CountingChange where
import Data.List
countchange :: Int -> [Int] -> Int
countchange m c = countChange m $ (reverse . sort) c
countChange :: Int -> [Int] -> Int
countChange _ [] = 0
countChange 0 _ = 1
countChange m c@(x:xs) = if m < 0
then 0
else... |
9ffd35b54b49c7e76db7eab53da6e5be10131b81fcd62cc2be38da8ef4310d7c | flyspeck/flyspeck | itab.ml | (* ========================================================================= *)
(* Intuitionistic theorem prover (complete for propositional fragment). *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/azure/hol-light-nat/itab.ml | ocaml | =========================================================================
Intuitionistic theorem prover (complete for propositional fragment).
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
open Parser
include Tactics
let UNIFY_ACCEPT_TAC mvs th (asl,w) =
let insts = term_unify mvs (concl... |
def4bec8450e68017f640aabb43c7a4e7b367d6a4e67c93835d449be5aa83a63 | runtimeverification/haskell-backend | AssociativeCommutative.hs | # LANGUAGE UndecidableInstances #
|
Module : Kore . Builtin . AssociativeCommutative
Description : Handles built - in operations which are associative , commutative ,
with neutral elements , key - based , with unique keys , and which
return bottom when applied to unique keys... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/fae73ac06cc9bcf8e24b0bdd2f07069610277d58/kore/src/Kore/Builtin/AssociativeCommutative.hs | haskell | | Any @TermWrapper@ may be inside of an 'InternalAc'.
The term may become bottom if we had conflicts between elements that were
not detected before, e.g.
@
concat({1}, concat(X:Set, {1}))
concat(elem(Y:Int), concat({1}, elem(Y:Int)))
concat(X:Set, concat({1}, X:Set))
@
@matchBuilti... | # LANGUAGE UndecidableInstances #
|
Module : Kore . Builtin . AssociativeCommutative
Description : Handles built - in operations which are associative , commutative ,
with neutral elements , key - based , with unique keys , and which
return bottom when applied to unique keys... |
f9796195a4ab4419c2d242b92deb401a2a1bdc787aa358b907b935659755bd1a | proger/lxperf | connmatch.hs | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
-----------------------------------------------------------------------------
---- |
---- Module : Main
----
-- ` connmatch ' parses the file that maps local IPs to hostnames and
-- a directory of lsof outputs where files are named exactly as
---- hostnames. `... | null | https://raw.githubusercontent.com/proger/lxperf/46fdc9951ad759882af33378d569ba86d5f6af2f/connmatch/connmatch.hs | haskell | ---------------------------------------------------------------------------
-- |
-- Module : Main
--
` connmatch ' parses the file that maps local IPs to hostnames and
a directory of lsof outputs where files are named exactly as
-- hostnames. `lsof' outputs are connected into a list of connections
which are us... | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Main where
import System.Environment (getArgs)
import System.Directory (getDirectoryContents)
import Control.Monad (join)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C
import qualified Data.Map.Strict as M
import qualif... |
cdcbbca2826e6224ab044650c078e71891fde8001ebc6dbd12c2b62c702d473d | juspay/atlas | StartRide.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Product/RideAPI/Handlers/StartRide.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
bd9ff620e57e58d752bf446016a2c8b8447bddb369425be710f210f9e23c27aa | CrossRef/cayenne | transform.clj | (ns cayenne.api.transform
(:require [cayenne.util :as util]
[cayenne.conf :as conf]
[cayenne.formats.rdf :as rdf]
[cayenne.formats.ris :as ris]
[cayenne.formats.citation :as citation]
[cayenne.formats.bibtex :as bibtex]
[clojure.data.json :as jso... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/api/transform.clj | clojure | legacy formats
for now we retrieve original unixref and unixsd, but in future perhaps we | (ns cayenne.api.transform
(:require [cayenne.util :as util]
[cayenne.conf :as conf]
[cayenne.formats.rdf :as rdf]
[cayenne.formats.ris :as ris]
[cayenne.formats.citation :as citation]
[cayenne.formats.bibtex :as bibtex]
[clojure.data.json :as jso... |
8dae09fc9ab8a3ac0a4552ea4efe8d6019b3e9b0191edb73023ca323b9b7625a | haskell/zlib | gunzip.hs | module Main where
import qualified Data.ByteString.Lazy as B
import qualified Codec.Compression.GZip as GZip
main = B.interact GZip.decompress
| null | https://raw.githubusercontent.com/haskell/zlib/7fe9bd49c28be0b5b523e7e78a91638ecea4d28d/examples/gunzip.hs | haskell | module Main where
import qualified Data.ByteString.Lazy as B
import qualified Codec.Compression.GZip as GZip
main = B.interact GZip.decompress
| |
190e6b0cc2fad24c1f4b17224ecd8a933c382dc97256e1f6207e05a1c684550c | tweag/ormolu | inline-comment-1.hs | showPs env ((n, _, Let _ t v):bs)
= " " ++ show n ++ " : " ++
showEnv env ({- normalise ctxt env -} t) ++ " = " ++
showEnv env ({- normalise ctxt env -} v) ++
"\n" ++ showPs env bs
showPs env ((n, _, b):bs)
= " " ++ show n ++ " : " ++
showEnv env ({- normalise ctxt env -} (binderTy... | null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/inline-comment-1.hs | haskell | normalise ctxt env
normalise ctxt env
normalise ctxt env | showPs env ((n, _, Let _ t v):bs)
= " " ++ show n ++ " : " ++
"\n" ++ showPs env bs
showPs env ((n, _, b):bs)
= " " ++ show n ++ " : " ++
"\n" ++ showPs env bs
|
d5e96ac54c70c846dba161ccb65815be4a0ba24f9ee3c1162b685311feeba77d | velveteer/slacker | Section.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
module Slacker.Blocks.Section
( SectionBlock(..)
, SectionAccessory(..)
, SectionAccessoryTypes
, SectionFields(..)
, field
, asAccessory
, defaultSection
) where
import qualified Data.Aeson as Aeson
import Data.Text (Text)
import ... | null | https://raw.githubusercontent.com/velveteer/slacker/4770be507cef60df6ab76e8331efe683f67f0ef2/src/Slacker/Blocks/Section.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
module Slacker.Blocks.Section
( SectionBlock(..)
, SectionAccessory(..)
, SectionAccessoryTypes
, SectionFields(..)
, field
, asAccessory
, defaultSection
) where
import qualified Data.Aeson as Aeson
import Data.Text (Text)
import ... | |
3594010c6fa5d72881057d57ea2ef25c219d6f8c238cf46f5c02c6a7c6d5b4c4 | Swizec/random-coding | 3.clj |
The prime factors of 13195 are 5 , 7 , 13 and 29 .
What is the largest prime factor of the number 600851475143 ?
(defn any? [l]
(reduce #(or %1 %2) l))
(defn prime? [n known]
(loop [cnt (dec (count known)) acc []]
(if (< cnt 0) (not (any? acc))
(recur (dec cnt) (concat acc [(zero? (mod n (nth known cnt... | null | https://raw.githubusercontent.com/Swizec/random-coding/adeb72d35c52a7792a596ddc0a5241035ba9dda8/project-euler/3.clj | clojure |
The prime factors of 13195 are 5 , 7 , 13 and 29 .
What is the largest prime factor of the number 600851475143 ?
(defn any? [l]
(reduce #(or %1 %2) l))
(defn prime? [n known]
(loop [cnt (dec (count known)) acc []]
(if (< cnt 0) (not (any? acc))
(recur (dec cnt) (concat acc [(zero? (mod n (nth known cnt... | |
06e21d2a01f6f42b336d95310f3e6b31876c586292aaa43ed575151ff1d88a5c | RefactoringTools/HaRe | SimpPatMatchProp.hs | module SimpPatMatchProp where
import SimpPatMatch
import Recursive(struct)
import PropSyntaxRec(HsExpI)
import )
HasDef [ HsDeclI i ] ( HsDeclI i )
import PrettyPrint(PrintableOp)
instance (Eq i,PrintableOp i,
HasSrcLoc i,ValueId i,HasIdTy n i,HasOrig i,HasOrig n)
=> SimpPatMatch i (HsExpI i) where
... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/property/transforms/SimpPatMatchProp.hs | haskell | module SimpPatMatchProp where
import SimpPatMatch
import Recursive(struct)
import PropSyntaxRec(HsExpI)
import )
HasDef [ HsDeclI i ] ( HsDeclI i )
import PrettyPrint(PrintableOp)
instance (Eq i,PrintableOp i,
HasSrcLoc i,ValueId i,HasIdTy n i,HasOrig i,HasOrig n)
=> SimpPatMatch i (HsExpI i) where
... | |
0dfd5f532b8d6341237c0e992d3cc9e5122e7e14486958b7f3c47074d5e404b3 | philnguyen/soft-contract | map.rkt | #lang racket
(require soft-contract/fake-contract)
(define (map f xs)
(if (empty? xs) empty
(cons (f (car xs)) (map f (cdr xs)))))
(provide/contract
[map (->i ([_ (any/c . -> . any/c)] [l (listof any/c)])
(res (_ l)
(and/c (listof any/c)
(λ (r) (equal? (empty? l) (empty? r))))))])
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sym-exe/map.rkt | racket | #lang racket
(require soft-contract/fake-contract)
(define (map f xs)
(if (empty? xs) empty
(cons (f (car xs)) (map f (cdr xs)))))
(provide/contract
[map (->i ([_ (any/c . -> . any/c)] [l (listof any/c)])
(res (_ l)
(and/c (listof any/c)
(λ (r) (equal? (empty? l) (empty? r))))))])
| |
cc3812c4421197dda183e4e7aea4eb59cea79b019015853800027951bb4cd037 | fukamachi/datafly | util.lisp | (in-package :cl-user)
(defpackage datafly.util
(:use :cl))
(in-package :datafly.util)
(syntax:use-syntax :annot)
@export
(defun partition-if (pred sequence &key from-end (start 0) end (key #'identity))
(let ((yes nil)
(no nil)
(sequence (if (or (not (zerop start))
end)
... | null | https://raw.githubusercontent.com/fukamachi/datafly/adece27fcbc4b5ea39ad1a105048b6b7166e3b0d/src/util.lisp | lisp | (in-package :cl-user)
(defpackage datafly.util
(:use :cl))
(in-package :datafly.util)
(syntax:use-syntax :annot)
@export
(defun partition-if (pred sequence &key from-end (start 0) end (key #'identity))
(let ((yes nil)
(no nil)
(sequence (if (or (not (zerop start))
end)
... | |
6f3eea65152a8d34742c6f28466bbf6418dbcfc428d91f7870900f1ba70b7ddc | progman1/genprintlib | printval.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/progman1/genprintlib/acc1e5cc46b9ce6191d0306f51337581c93ffe94/debugger/4.07.1/printval.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
val max_printer_depth : int ref
val max_pri... |
46816fdd9c9479b2934f7e85df46a6ec7133f061eaf897c76db9e38a0650d838 | camllight/camllight | valeur.mli | type valeur =
Inconnue
| Ent of int
| Bool of bool
| Tableau of int * valeur vect;;
value ent_val: valeur -> int
and bool_val: valeur -> bool
and tableau_val: valeur -> int * valeur vect
and affiche_valeur: valeur -> unit
and lire_valeur: unit -> valeur;;
| null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/examples/pascal/valeur.mli | ocaml | type valeur =
Inconnue
| Ent of int
| Bool of bool
| Tableau of int * valeur vect;;
value ent_val: valeur -> int
and bool_val: valeur -> bool
and tableau_val: valeur -> int * valeur vect
and affiche_valeur: valeur -> unit
and lire_valeur: unit -> valeur;;
| |
97fcec4253acc646f11f78cf792b462d6654d25fd3554136cb048b9bc0225343 | MinaProtocol/mina | bulletproof_challenge.ml | [%%versioned
module Stable = struct
module V1 = struct
type 'challenge t =
'challenge Mina_wire_types.Pickles_bulletproof_challenge.V1.t =
{ prechallenge : 'challenge }
[@@deriving sexp, compare, yojson, hash, equal]
end
end]
let pack { prechallenge } = prechallenge
let unpack prechallenge... | null | https://raw.githubusercontent.com/MinaProtocol/mina/b19a220d87caa129ed5dcffc94f89204ae874661/src/lib/pickles/composition_types/bulletproof_challenge.ml | ocaml | [%%versioned
module Stable = struct
module V1 = struct
type 'challenge t =
'challenge Mina_wire_types.Pickles_bulletproof_challenge.V1.t =
{ prechallenge : 'challenge }
[@@deriving sexp, compare, yojson, hash, equal]
end
end]
let pack { prechallenge } = prechallenge
let unpack prechallenge... | |
d74a19d7199af0eea32544eda7a1c1e993e7552385252b0c5c62658393c91d9a | grwlf/htvm | Main.hs | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NondecreasingIndentation #
# LANGUAGE TypeApplications #
module Main where
import qualified Data.Text.IO as Text
import Control.Monad(when)
import Control.Monad.Trans(liftIO)
import Con... | null | https://raw.githubusercontent.com/grwlf/htvm/90cff0ebde0bdff3e8048a82a5b1b0d46fc7d66e/app/demo/Main.hs | haskell | # LANGUAGE OverloadedStrings #
f2_c = 5
f3_units = 16
f2_c = 5
f3_units = 16 | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NondecreasingIndentation #
# LANGUAGE TypeApplications #
module Main where
import qualified Data.Text.IO as Text
import Control.Monad(when)
import Control.Monad.Trans(liftIO)
import Control.Concurrent(forkIO)
import Data... |
971ea73c14704049bdfafc09eaac7ab28f244728dc8a15cbd4ac77a3629a096c | blindglobe/clocc | scroller.lisp | -*- Mode : Lisp ; Package : CLIO - OPEN ; ; Lowercase : T ; Fonts:(CPTFONT ) ; Syntax : Common - Lisp -*-
;;;----------------------------------------------------------------------------------+
;;; |
;;; TEXAS ... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/clio/scroller.lisp | lisp | Package : CLIO - OPEN ; ; Lowercase : T ; Fonts:(CPTFONT ) ; Syntax : Common - Lisp -*-
----------------------------------------------------------------------------------+
|
TEXAS INSTRUMENTS INCORPORATED ... |
, TEXAS 78714 |
Copyright ( C ) 1989 , 1990 Texas Instruments Incorporated . |
Texas Instruments Incorporated provides this software " as is " without express or |
(in-package "CLIO-OPEN")
(export '(
make-scroller
... |
1ba1a218afec91cbf5efb172abda44cb6a23bc22e78ecdcfd802ff19b9379f38 | EgorDm/fp-pacman | Loading.hs | module Engine.Graphics.Loading (
loadStaticSprite,
loadAnimatedSprite,
loadStaticSpriteFile
) where
import Text.Printf
import Graphics.Gloss.Game
import Graphics.Gloss (Picture(..))
import Engine.Graphics.Sprite
import Engine.Graphics.Animation
import Constants
-- | Loads creates filenames for given resou... | null | https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Engine/Graphics/Loading.hs | haskell | | Loads creates filenames for given resource by identifier and amount of sprites
| Loads an image from file. If failed, then throws errors
| Load Sprites | module Engine.Graphics.Loading (
loadStaticSprite,
loadAnimatedSprite,
loadStaticSpriteFile
) where
import Text.Printf
import Graphics.Gloss.Game
import Graphics.Gloss (Picture(..))
import Engine.Graphics.Sprite
import Engine.Graphics.Animation
import Constants
spriteFileNames :: String -> Int -> [String]... |
c564ae7bbd975515e5da48d6c802fd8832e873a34bf22bd7401e206536ba77ed | darrenldl/ProVerif-ATP | reduction_interact.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/reduction_interact.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
2b43767d4da711128e85e23501e83a1eb8e655f7a40037156e09cd819c5f187a | NoRedInk/haskell-libraries | NriPrelude.hs | # OPTIONS_HADDOCK not - home #
| These are functions and types that in Elm are in scope by default , without
needing to import anything . In we refer to such imports as a
" Prelude " .
module NriPrelude
* Elm - like Prelude
Platform.Internal.Task,
module Basics,
module Internal.Shortcut,
List.... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-prelude/src/NriPrelude.hs | haskell | * Other essentials | # OPTIONS_HADDOCK not - home #
| These are functions and types that in Elm are in scope by default , without
needing to import anything . In we refer to such imports as a
" Prelude " .
module NriPrelude
* Elm - like Prelude
Platform.Internal.Task,
module Basics,
module Internal.Shortcut,
List.... |
06bbd62e96933381ad00cbc50ed84f7d0ac77f65d804c7b3f12f7eefb0af290f | haskell-tools/haskell-tools | PolymorphSub_res.hs | module Refactor.GenerateTypeSignature.PolymorphSub where
f :: Num a => a -> a
f a = g a where
g :: Num a => a -> a
g a = a + 1
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/GenerateTypeSignature/PolymorphSub_res.hs | haskell | module Refactor.GenerateTypeSignature.PolymorphSub where
f :: Num a => a -> a
f a = g a where
g :: Num a => a -> a
g a = a + 1
| |
c159f1e40fb7debb084e8d213ddf8951f18eac6e03ee91e871f762ee2c76267f | hgoes/vvt | MkMake.hs | import Data.List
data Result = Inserted
| Found
| Full
| Or Result Result
deriving (Eq,Ord,Show)
data TestCase = TestCase { name :: String
, table :: [Int]
, probeMax :: Int
, threads :: [(Int,Re... | null | https://raw.githubusercontent.com/hgoes/vvt/dd2809753d7e5059d9103ea578f36afa8294cd84/test/parallel/hashtable/MkMake.hs | haskell | import Data.List
data Result = Inserted
| Found
| Full
| Or Result Result
deriving (Eq,Ord,Show)
data TestCase = TestCase { name :: String
, table :: [Int]
, probeMax :: Int
, threads :: [(Int,Re... | |
6a71bf6903c6a3afb1d74cd955459b78e3863b126ce1702892ca64927473d6ed | untangled-web/untangled-ui | parser.clj | (ns untangled.ui.server.image-library.parser
(:require
[untangled.ui.server.image-library.storage :as storage])
(:import
(java.util Base64)))
(defn decode-base64 [data]
(.decode (Base64/getDecoder) data))
(defn build-mutate [{:keys [owner-fn auth-fn] :as this}]
(fn [env k params]
(case k
'un... | null | https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/main/untangled/ui/server/image_library/parser.clj | clojure | (ns untangled.ui.server.image-library.parser
(:require
[untangled.ui.server.image-library.storage :as storage])
(:import
(java.util Base64)))
(defn decode-base64 [data]
(.decode (Base64/getDecoder) data))
(defn build-mutate [{:keys [owner-fn auth-fn] :as this}]
(fn [env k params]
(case k
'un... | |
1b83c7f8f553748cf3df1718fff3e5744fe2af02a0ee3ecc58fc99843f20bd7e | hyperfiddle/electric | missionary.clj | (ns dustin.missionary.missionary
(:require
[missionary.core :as m]
[hyperfiddle.rcf :refer [tests tap %]]))
(tests
(def hello-task (m/sp (println "Hello")))
(hello-task #(print ::success %) #(print ::failure %))
(def sleep-task (m/sleep 1000))
(def async-hello-task
(m/sp ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/missionary/missionary.clj | clojure | async Sequential Process
?
flow
(? input)
fork in a way that will emit asap, out of order | (ns dustin.missionary.missionary
(:require
[missionary.core :as m]
[hyperfiddle.rcf :refer [tests tap %]]))
(tests
(def hello-task (m/sp (println "Hello")))
(hello-task #(print ::success %) #(print ::failure %))
(def sleep-task (m/sleep 1000))
(def async-hello-task
(m/? hello-task)
... |
941f88f8236ed2cfa82aeb4075c76fe6023049444e4954d7e148220e0d3a5e81 | nextjournal/freerange | fx_test.cljs | (ns re-frame.fx-test
(:require
[cljs.test :refer-macros [is deftest async use-fixtures]]
[re-frame.core :as re-frame]
[re-frame.fx]
[re-frame.interop :refer [set-timeout!]]
[re-frame.loggers :as log]
[clojure.string :as str]))
---- ----------------------------------------------------------... | null | https://raw.githubusercontent.com/nextjournal/freerange/c43e848758d1e7cf259ed8ac06a0a9089317a6a6/test/re_frame/fx_test.cljs | clojure | This fixture uses the re-frame.core/make-restore-fn to checkpoint and reset
to cleanup any dynamically registered handlers from our tests.
---- TESTS ------------------------------------------------------------------
Setup and exercise effects handler with :dispatch-later.
kick off main handler | (ns re-frame.fx-test
(:require
[cljs.test :refer-macros [is deftest async use-fixtures]]
[re-frame.core :as re-frame]
[re-frame.fx]
[re-frame.interop :refer [set-timeout!]]
[re-frame.loggers :as log]
[clojure.string :as str]))
---- ----------------------------------------------------------... |
c9e941bb5f467f1904bb881f8cab21ce7f90dfead01cb2d9a47c377963c18c75 | prg-titech/Kani-CUDA | diffusion3d-experiment.rkt | #lang rosette
(require "diffusion3d-baseline.rkt"
"../../lang.rkt"
(rename-in rosette/lib/synthax [choose ?])
racket/hash)
(current-bitwidth #f)
(define switch 0)
(define switch-seq #f)
(define switch-w #t);(or (eq? switch 0) (eq? switch-seq #f)))
( or ( eq ? switch 1 ) ( eq ? switch - se... | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Diffusion3d/diffusion3d-experiment.rkt | racket | (or (eq? switch 0) (eq? switch-seq #f)))
(or (eq? switch 8) (eq? switch-seq #f)))
Shared memory
Index of a element to be updated on a global memory
Index of a element to be updated on a shared memory
Variables for register blocking
(? (syncthreads) (void))
(? (syncthreads) (void))
(define w
(if switch-w
... | #lang rosette
(require "diffusion3d-baseline.rkt"
"../../lang.rkt"
(rename-in rosette/lib/synthax [choose ?])
racket/hash)
(current-bitwidth #f)
(define switch 0)
(define switch-seq #f)
( or ( eq ? switch 1 ) ( eq ? switch - seq # f ) ) )
( or ( eq ? switch 2 ) ( eq ? switch - seq # f ) )... |
0a2e3457919378c6350dd987abfa6a418d0a8c7c806e4cfb931f199c5b40e0a3 | scalaris-team/scalaris | optorset.erl | 2008 - 2018 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/crdt/types/optorset.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2008 - 2018 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Implementation of an optimized OR - Set state - based CRDT
as specified by
-module(optorset).
-author('')... |
3d314ef2aec06630c2633bd9a9082e89ad4dc9871aec3e039a23d56f0d6ad4c8 | patricoferris/ocaml-multicore-monorepo | test.ml | let pp_chr =
Fmt.using (function '\032' .. '\126' as x -> x | _ -> '.') Fmt.char
let pp_scalar : type buffer.
get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t =
fun ~get ~length ppf b ->
let l = length b in
for i = 0 to l / 16 do
Fmt.pf ppf "%08x: " (i * 16) ;
let j = ref 0 in
... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/pecu/test/test.ml | ocaml | let pp_chr =
Fmt.using (function '\032' .. '\126' as x -> x | _ -> '.') Fmt.char
let pp_scalar : type buffer.
get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t =
fun ~get ~length ppf b ->
let l = length b in
for i = 0 to l / 16 do
Fmt.pf ppf "%08x: " (i * 16) ;
let j = ref 0 in
... | |
cf5f5c81025d5d55db210a6d4363f7c6e075697f5f5b1226c47a4e7ad8c62133 | ocaml-ppx/ppx | history.mli | * Represents the history of AST grammars in the OCaml compiler .
type t
(** Produces an association list of grammars, paired with their version numbers. *)
val versioned_grammars : t -> (Version.t * Grammar.t) list
(** Produces the grammar corresponding to a given version number. Raises if there is no
such versio... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/astlib/history.mli | ocaml | * Produces an association list of grammars, paired with their version numbers.
* Produces the grammar corresponding to a given version number. Raises if there is no
such version in the history.
* Converts the given AST from [src_version]'s grammar to [dst_version]'s grammar, using
the conversion functions sto... | * Represents the history of AST grammars in the OCaml compiler .
type t
val versioned_grammars : t -> (Version.t * Grammar.t) list
val find_grammar : t -> version:Version.t -> Grammar.t
val convert
: t
-> 'node Ast.t
-> src_version:Version.t
-> dst_version:Version.t
-> unwrap:(version:Version.t -> 'node -... |
21069af0975abd3f99bdbec01bac242e46468c46f230a90cefecd80c712d1385 | Clozure/ccl | rubix.lisp | (in-package :cl-user)
(defparameter light0 nil)
(defparameter light0-pos (make-array 3 :initial-contents '(5.0 3.0 0.0) ;; default to distant light source
:element-type 'single-float))
(defparameter diffuse0 (make-array 4 :initial-contents '(0.0 0.0 0.0 1.0)
... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/rubix/rubix.lisp | lisp | default to distant light source
really really dim grey light
source
destination
byte offset in destination
number of bytes to copy
<- coersion issue
drawing callback
want to be able to send keystrokes to the rubix cube
want to be able to click and start dragging (without moving the window)
degrees
this make... | (in-package :cl-user)
(defparameter light0 nil)
:element-type 'single-float))
(defparameter diffuse0 (make-array 4 :initial-contents '(0.0 0.0 0.0 1.0)
:element-type 'single-float))
(defparameter ambient0 (make-array 4 :initial-contents '(1.0 1.0... |
36c676fe5c809d12e329d30d3bfaa0a72c60044e9ff571ca806b8baec5b51fab | ocramz/xeno | CPS.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE GADTs #-}
| SAX parser and API for XML .
module Xeno.SAX.CPS
( cps
) where
import Co... | null | https://raw.githubusercontent.com/ocramz/xeno/5a2607b6769f9e004a94348cabb4718e4c949747/src/Xeno/SAX/CPS.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns #
# LANGUAGE GADTs #
initial processor
mutable processor
assign next processor
wrap2 :: (t -> a -> b -> ST s c) -> a -> b -> ST s c | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
| SAX parser and API for XML .
module Xeno.SAX.CPS
( cps
) where
import Control.Exception
import Control.Monad.State.Strict
import Control.Monad.ST.Strict
import Control.Spork
im... |
9d515b2fe306cb521359832411fdc90b8eb8a11a21ac5da45f45ace38f4731cd | haskell-repa/repa | Binary.hs | # LANGUAGE FlexibleInstances , ScopedTypeVariables #
{-# OPTIONS -fno-warn-orphans #-}
| Reading and writing arrays as binary files .
module Data.Array.Repa.IO.Binary
( readArrayFromStorableFile
, writeArrayToStorableFile)
where
import Foreign.Storable
import Foreign.Ptr
import Foreign.ForeignPtr
im... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-io/Data/Array/Repa/IO/Binary.hs | haskell | # OPTIONS -fno-warn-orphans #
| Read an array from a file.
If the file size does match the provided shape then `error`.
Determine number of bytes per element.
Determine how many elements the whole file will give us.
Converting the foreign ptr like this means that the array
elements are used directly from the bu... | # LANGUAGE FlexibleInstances , ScopedTypeVariables #
| Reading and writing arrays as binary files .
module Data.Array.Repa.IO.Binary
( readArrayFromStorableFile
, writeArrayToStorableFile)
where
import Foreign.Storable
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.Marshal.Alloc
import ... |
bea795736bbc29bf4f0ea5e8f09c1586caff9babbd31ac4dc414f187bf424146 | duct-framework/scheduler.simple | simple.clj | (ns duct.scheduler.simple
(:require [integrant.core :as ig])
(:import [java.util.concurrent Executors ExecutorService TimeUnit]))
(defmethod ig/init-key :duct.scheduler/simple
[_ {:keys [thread-pool-size jobs] :or {thread-pool-size 32}}]
(let [executor (Executors/newScheduledThreadPool thread-pool-size)]
(... | null | https://raw.githubusercontent.com/duct-framework/scheduler.simple/44e2f9c9b90fa1177158ed9fca11f55a220025db/src/duct/scheduler/simple.clj | clojure | (ns duct.scheduler.simple
(:require [integrant.core :as ig])
(:import [java.util.concurrent Executors ExecutorService TimeUnit]))
(defmethod ig/init-key :duct.scheduler/simple
[_ {:keys [thread-pool-size jobs] :or {thread-pool-size 32}}]
(let [executor (Executors/newScheduledThreadPool thread-pool-size)]
(... | |
262e24e3748ee25cd5f53b945fa0d9b188fbe265f414ab2fef1f3ca7ffe57ff7 | opencog/opencog | filter-#2.scm | ;; antecedent is "pronoun"
;; Example:
;; "He is good at math. She is good at math as well."
;; "She" cannot refer to "He".
(define filter-#2
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(TypeNode "WordInstanceNode")
... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/filters/filter-%232.scm | scheme | antecedent is "pronoun"
Example:
"He is good at math. She is good at math as well."
"She" cannot refer to "He".
filter |
(define filter-#2
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(TypeNode "WordInstanceNode")
)
(TypedVariableLink
(VariableNode "$word-inst-anaphor")
(TypeNode "WordIns... |
175ef44af55d433cacb77075058d3f2e45714a3014debb05c39aec86375c04d7 | clash-lang/clash-prelude | ROM.hs | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2017 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
ROMs
Copyright : (C) 2015-2016, University of Twente,
2017 , Google Inc.
License : BSD2 (see the file LICENS... | null | https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/Explicit/ROM.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_HADDOCK show-extensions #
* Synchronous ROM synchronised to an arbitrary clock
* Internal
* __NB__: Initial output value is 'undefined'
Additional helpful information:
for ideas on how to use ROMs and RAMs
^ 'Clock' to synchronize to
^ ROM content
__NB:__ must be a const... | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2017 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
ROMs
Copyright : (C) 2015-2016, University of Twente,
2017 , Google Inc.
License : BSD2 (see the file LICENS... |
0270ba2dc90190f7f4d47c850cd1fc7899d38a219b633ae14e5c7e0abf7ad0c4 | alanz/ghc-exactprint | Test10312.hs | {-# LANGUAGE ParallelListComp,
TransformListComp,
RecordWildCards #-}
module Test10312 where
-- From
-- -posts/2014-12-07-list-comprehensions.html
import GHC.Exts
import qualified Data.Map as M
import Data.Ord (comparing)
import Data.List (sortBy)
-- Let’s look at a simple, normal list compr... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/Test10312.hs | haskell | # LANGUAGE ParallelListComp,
TransformListComp,
RecordWildCards #
From
-posts/2014-12-07-list-comprehensions.html
Let’s look at a simple, normal list comprehension to start:
TransformListComp | module Test10312 where
import GHC.Exts
import qualified Data.Map as M
import Data.Ord (comparing)
import Data.List (sortBy)
regularListComp :: [Int]
regularListComp = [ x + y * z
| x <- [0..10]
, y <- [10..20]
, z <- [20..30]
]
parallelListComp... |
f24f402cf059413b03c7d20b705855aaabbaf604d5e4804d3a467985f7cde843 | input-output-hk/cardano-sl | Communication.hs | -- | Re-exports of Pos.Communication.*
module Pos.Communication
( module M
) where
import Pos.Communication.Limits as M
import Pos.Communication.Server as M
import Pos.Communication.Types as M
import Pos.Infra.Communication.BiP as M
import Pos.Infra.Comm... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Communication.hs | haskell | | Re-exports of Pos.Communication.* |
module Pos.Communication
( module M
) where
import Pos.Communication.Limits as M
import Pos.Communication.Server as M
import Pos.Communication.Types as M
import Pos.Infra.Communication.BiP as M
import Pos.Infra.Communication.Listener as M
import ... |
d81d1e13b3982de3f3a1a5277b39b91d5a7c3879832582ce3d845cf4d9ec2c16 | VisionsGlobalEmpowerment/webchange | icon_duplicate.cljs | (ns webchange.ui.components.icon.system.icon-duplicate)
(def data
[:svg {:xmlns ""
:width "24" :height "24" :viewBox "0 0 24 24"
:class-name "stroke-colored"
:fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-linecap "round" :stroke-linejoin "round"}
[:path {:d "M1... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui/components/icon/system/icon_duplicate.cljs | clojure | (ns webchange.ui.components.icon.system.icon-duplicate)
(def data
[:svg {:xmlns ""
:width "24" :height "24" :viewBox "0 0 24 24"
:class-name "stroke-colored"
:fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-linecap "round" :stroke-linejoin "round"}
[:path {:d "M1... | |
7ec6902d45ebf5a71cc7c5bd7c4011c6e416306bd028d306174d8d2da3f665db | cubicle-model-checker/cubicle | hstring.mli | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/common/hstring.mli | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2014
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
ee30264fc027f719cf87d3649dfe0e0e1b39485ae9aa56c2026084f4d27dfcee | jimcrayne/jhc | Eta.hs | module E.Eta(
ArityType(ATop,ABottom),
etaExpandAp,
annotateArity,
deleteArity,
etaExpandDef,
etaExpandDef',
etaExpandProgram,
getArityInfo,
etaAnnotateProgram,
etaReduce
) where
import Control.Monad.Identity
import Control.Monad.State
import Control.Monad.Writer
import Data... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/E/Eta.hs | haskell | delety any arity information
this annotates, but only expands top-level definitions
etaExpandProgram prog = runNameMT (programMapDs f (etaAnnotateProgram prog)) where
this annotates a program with its arity information, iterating until a fixpoint is reached.
| eta reduce as much as possible
| only reduce if all la... | module E.Eta(
ArityType(ATop,ABottom),
etaExpandAp,
annotateArity,
deleteArity,
etaExpandDef,
etaExpandDef',
etaExpandProgram,
getArityInfo,
etaAnnotateProgram,
etaReduce
) where
import Control.Monad.Identity
import Control.Monad.State
import Control.Monad.Writer
import Data... |
0576f9310c8fee88d9306c95bea858fa3abfebe721ad4d9b47edbcf429298e1f | poroh/ersip | ersip_hdr_via.erl | %%%
Copyright ( c ) 2018 , 2020 Dmitry Poroh
%%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%%
SIP Via header
%%%
-module(ersip_hdr_via).
-export([new/3,
new/4,
topmost_via/1,
take_topmost/1,
sent_protocol/1,
branch/... | null | https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/src/message/ersip_hdr_via.erl | erlang |
All rights reserved.
===================================================================
Types
===================================================================
===================================================================
API
===================================================================
@doc Get t... | Copyright ( c ) 2018 , 2020 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
SIP Via header
-module(ersip_hdr_via).
-export([new/3,
new/4,
topmost_via/1,
take_topmost/1,
sent_protocol/1,
branch/1,
set_branch/2,
re... |
a6b41c7690804be961966c67d583d4766ddff9a51d0d80bb2dccf735d427f93a | jellelicht/guix | pv.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/pv.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages pv)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (gui... |
3216f1a775f870de0fb43c05868f6792776c44d35357293946f5cc3211d03ba1 | ocaml/oasis2debian | Main.ml | (******************************************************************************)
oasis2debian : Create and maintain Debian package for an OASIS package
(* *)
Copyright ( C ) 2013 ,
(* ... | null | https://raw.githubusercontent.com/ocaml/oasis2debian/41d268cada4afdac8c906ac99277d7c685bc15ae/src/Main.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | oasis2debian : Create and maintain Debian package for an OASIS package
Copyright ( C ) 2013 ,
the Free Software Foundation ; either version 2.1 of the License , or ( at
You should have received a copy of the GNU Lesser General Public License
along with t... |
0477137edcbe169aa42ad8c8f13e0231c237644eb349d9dd84efff7e962d47b6 | exercism/babashka | space_age.clj | (ns space-age)
(def year-seconds (* 365.25 24 60 60))
(defmacro defperiod
[planet ratio]
`(defn ~(symbol (str "on-" planet))
[seconds#]
(/ seconds# (* ~ratio year-seconds))))
(defperiod "earth" 1.0)
(defperiod "mercury" 0.2408467)
(defperiod "venus" 0.61519726)
(defperiod "mars" 1.8808158)
(defp... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/space-age/src/space_age.clj | clojure | (ns space-age)
(def year-seconds (* 365.25 24 60 60))
(defmacro defperiod
[planet ratio]
`(defn ~(symbol (str "on-" planet))
[seconds#]
(/ seconds# (* ~ratio year-seconds))))
(defperiod "earth" 1.0)
(defperiod "mercury" 0.2408467)
(defperiod "venus" 0.61519726)
(defperiod "mars" 1.8808158)
(defp... | |
b58c5e8931bc2591305f2442339b1cedfbbdbd55f3e755f8c6d99a7d149fa7c5 | sol/tinc | Run.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Run where
import Control.Exception
import Control.Monad
import System.Environment
import System.FileLock
import System.FilePath
import System.Process
import Data.Version (showVersion)
... | null | https://raw.githubusercontent.com/sol/tinc/427df659df20d548bbe4c7bd0ea76cc13de40238/src/Run.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Run where
import Control.Exception
import Control.Monad
import System.Environment
import System.FileLock
import System.FilePath
import System.Process
import Data.Version (showVersion)
... | |
b69d3d3c6ae2e03858bbb9e096b55bc927c8b1f0d440cb9edc4a4177ef7d7746 | zehnpaard/secd-ocaml | secd.ml | type t =
| Int of int
| Cons of int * int
let cells = Array.make 100000 (Int 0)
let s = ref 0;
let e = ref 0;
let c = ref 0;
let d = ref 0;
let f = ref 1;
let makeInt i =
let n = !f in
(cells.(n) <- Int i; f := n + 1; n)
let makeCons i j =
let n = !f in
(cells.(n) <- Cons (i, j); f := n + 1; n)
let get... | null | https://raw.githubusercontent.com/zehnpaard/secd-ocaml/6a8086ed3a34a07b29fce18839e0ab30bde89eda/secd.ml | ocaml | STOP
LDC
LD
CAR
CDR
ATOM
CONS
ADD
SUB
MUL
REM
JOIN
RTN
((f.(nil.e)) v.s) (nil.e) (RAP.c) d ->
nil rplaca((nil.e),v) f (s e c.d) | type t =
| Int of int
| Cons of int * int
let cells = Array.make 100000 (Int 0)
let s = ref 0;
let e = ref 0;
let c = ref 0;
let d = ref 0;
let f = ref 1;
let makeInt i =
let n = !f in
(cells.(n) <- Int i; f := n + 1; n)
let makeCons i j =
let n = !f in
(cells.(n) <- Cons (i, j); f := n + 1; n)
let get... |
e6da56621573c3cfbdd0b2132efb365cad9867fd62148f45f2308fe666469926 | input-output-hk/ouroboros-network | Codec.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Ouroboros.Network.Protocol.LocalStateQuery.Codec
( codecLocalSta... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
failures per protocol state
| An identity 'Codec' for the 'LocalStateQuery' protocol. It does not do
| # LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Network.Protocol.LocalStateQuery.Codec
( codecLocalStateQuery
, codecLocalStateQueryId
, Some (..)
) where
import Control.Monad.Class.MonadST
impor... |
2d6b8920de8eaf8abd39660b2061dba6b3ffd051d89484bac96973ef80ddaf06 | dyoo/whalesong | printing.rkt | #lang whalesong
(current-print-mode "constructor")
'(1 2 3)
(list "hello" "world")
(list 'hello 'world)
(cons 1 2)
(cons 1 (cons 2 (cons 3 empty)))
(cons 1 (cons 2 (cons 3 4)))
'()
'hello
(box 'hello)
(vector 'hello 'world)
(define-struct person (name age))
(person 'danny 32)
(person "jerry" 32)
This is slight... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/printing.rkt | racket | notation. | #lang whalesong
(current-print-mode "constructor")
'(1 2 3)
(list "hello" "world")
(list 'hello 'world)
(cons 1 2)
(cons 1 (cons 2 (cons 3 empty)))
(cons 1 (cons 2 (cons 3 4)))
'()
'hello
(box 'hello)
(vector 'hello 'world)
(define-struct person (name age))
(person 'danny 32)
(person "jerry" 32)
This is slight... |
149b0950e8c7c9ac22a0a99c8b6499a718265497749aa2c84c39742840a73941 | bschwind/earthquakes | db.cljs | (ns earthquakes.db
(:require [clojure.spec :as s]))
;; spec of app-db
(s/def ::magnitude number?)
(s/def ::longitude number?)
(s/def ::latitude number?)
(s/def ::depth number?)
(s/def ::quake-description string?)
(s/def ::earthquake (s/keys
:req-un [::magnitude ::longitude ::latitude ::depth ... | null | https://raw.githubusercontent.com/bschwind/earthquakes/265d2e27504ee50f1a815a89a85601e9715af1d7/src/earthquakes/db.cljs | clojure | spec of app-db
initial state of app-db | (ns earthquakes.db
(:require [clojure.spec :as s]))
(s/def ::magnitude number?)
(s/def ::longitude number?)
(s/def ::latitude number?)
(s/def ::depth number?)
(s/def ::quake-description string?)
(s/def ::earthquake (s/keys
:req-un [::magnitude ::longitude ::latitude ::depth ::quake-descriptio... |
0ad510983433412d6d98131c67a9c03ced04525cf4ece80c3f1849c1200ee921 | tsloughter/kuberl | kuberl_v1_volume_attachment_list.erl | -module(kuberl_v1_volume_attachment_list).
-export([encode/1]).
-export_type([kuberl_v1_volume_attachment_list/0]).
-type kuberl_v1_volume_attachment_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_volume_attachment_list.erl | erlang | -module(kuberl_v1_volume_attachment_list).
-export([encode/1]).
-export_type([kuberl_v1_volume_attachment_list/0]).
-type kuberl_v1_volume_attachment_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
... | |
4a77113d10576d7759080cd580af1820069db37af67c1525a221f905c4c53f65 | ocaml-multicore/tezos | script_set.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/helpers/script_set.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " ,... |
bc9bcfd80439272f63148258bb5190bc448487bc06ac3db3349c53c874107f6f | EligiusSantori/L2Apf | ask_be_friends.scm | (module system racket/base
(require racket/string "../../packet.scm")
(provide game-server-packet/ask-be-friends)
(define (game-server-packet/ask-be-friends buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'name (string-trim (read-utf16 s)))
)
)
)
)
| null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/server/ask_be_friends.scm | scheme | (module system racket/base
(require racket/string "../../packet.scm")
(provide game-server-packet/ask-be-friends)
(define (game-server-packet/ask-be-friends buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'name (string-trim (read-utf16 s)))
)
)
)
)
| |
bf0b35282e9dc626b84c9db606d9b7d21182f3a3b899fa8d8bd12c045e39ef42 | liquidz/cuma | layout.clj | (ns cuma.extension.layout
(:require
[clojure.java.io :as io]
[filemodc.core :as fm])
(:import
[java.io FileNotFoundException]))
(def ^:private tmpl-cache (fm/init))
(defn- slurp-template
[^java.io.File f & [default-value]]
(try
(slurp f)
(catch FileNotFoundException e
default-value))... | null | https://raw.githubusercontent.com/liquidz/cuma/120ff58a8601e0911591696622ad385e0616f1ff/src/cuma/extension/layout.clj | clojure | (ns cuma.extension.layout
(:require
[clojure.java.io :as io]
[filemodc.core :as fm])
(:import
[java.io FileNotFoundException]))
(def ^:private tmpl-cache (fm/init))
(defn- slurp-template
[^java.io.File f & [default-value]]
(try
(slurp f)
(catch FileNotFoundException e
default-value))... | |
f15d105e745a9a1f08aa7aa404a651108a5c3e650de7cf210c83e44d0fedc000 | ghc/packages-dph | Test.hs |
module Test
( module Data.Array.Parallel.Unlifted.Distributed
, module Data.Array.Parallel.Unlifted.Parallel
, module Data.Array.Parallel.Pretty
, module Data.Array.Parallel.Unlifted.Distributed.Types
, usegd
, upssegd
, pdatas
, results)
where
import Da... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/examples/Test.hs | haskell |
module Test
( module Data.Array.Parallel.Unlifted.Distributed
, module Data.Array.Parallel.Unlifted.Parallel
, module Data.Array.Parallel.Pretty
, module Data.Array.Parallel.Unlifted.Distributed.Types
, usegd
, upssegd
, pdatas
, results)
where
import Da... | |
5b1e36ca7b0b126e5041b521797b87446e7ddcd802c42c3c88a39e30efd5b1a6 | herd/herdtools7 | log_test.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/27263ad58cf5248d60010ce9b1202bbdacf05a4d/internal/lib/tests/log_test.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
53034ee8907e1c41e5202574753d5a37e5998e9065745e9209ecc79a72dc5e0e | rabbitmq/erlando | error_t.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/rabbitmq/erlando/1c1ef25a9bc228671b32b4a6ee30c7525314b1fd/src/error_t.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.
This is the equ... | 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 Erlando .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved .
-module(error_... |
a3ad8d8524333600d3c461adae139c2de73f69ac77717b3f0d8207fc73d762ad | fishcakez/sbroker | sregulator_statem2_valve.erl | %%-------------------------------------------------------------------
%%
Copyright ( c ) 2016 , < >
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the License at
%%
%% -2.0
... | null | https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/test/sregulator_statem2_valve.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the Lic... | Copyright ( c ) 2016 , < >
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(sregulator_statem2_valve).
-behaviour(sregulator_valve).
-export([init/3]).
-export([handle_ask/4... |
c05c39158bb21473d19ba9b66b03d850c3d7210f6f5f0e696c1bcfd1fee7d54b | VisionsGlobalEmpowerment/webchange | index.cljs | (ns webchange.student.pages.index
(:require
[webchange.student.pages.sign-in.views :as sign-in]))
(def pages
{:sign-in sign-in/page})
| null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/6107ca500496df6cf7179f621d48d06fd8c4de2b/src/cljs/webchange/student/pages/index.cljs | clojure | (ns webchange.student.pages.index
(:require
[webchange.student.pages.sign-in.views :as sign-in]))
(def pages
{:sign-in sign-in/page})
| |
07ef3eea46b2027b875d241b55269ea95ba9bc1e83514ef152b44a238871c36e | proglang/ldgv | Generate.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-... | null | https://raw.githubusercontent.com/proglang/ldgv/cabb502b81e831eece1c80ee70d520ac85e908c7/src/C/Generate.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Type level tag for values.
@
union LDST_val {
int val_int;
LDST_t *val_pair;
LDST_chan_t *val_chan;
const char *val_label;
};
@
| Type level tag for lambdas.
@
struct LDST_... | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.