_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 |
|---|---|---|---|---|---|---|---|---|
4fa9f39cb6d726b255c013bc0c79cfceace9783eccfdbb936619372b8b2869cb | issuu/ppx_mysql | ppx_mysql.ml | open Ppxlib
open Ppx_mysql_runtime.Stdlib
(* So the unit tests have access to the Query module *)
module Query = Query
module Buildef = Ast_builder.Default
(* [split_n] has the same signature and semantics as its homonym in Base.
* [split_n xs n] is [(take xs n, drop xs n)].
*)
let split_n elems index =
let rec l... | null | https://raw.githubusercontent.com/issuu/ppx_mysql/bb9cc084c9b9422591fefefd7589255ae7d3b504/ppx/ppx_mysql.ml | ocaml | So the unit tests have access to the Query module
[split_n] has the same signature and semantics as its homonym in Base.
* [split_n xs n] is [(take xs n, drop xs n)].
| open Ppxlib
open Ppx_mysql_runtime.Stdlib
module Query = Query
module Buildef = Ast_builder.Default
let split_n elems index =
let rec loop accum leftovers index =
match leftovers, index with
| _, x when x <= 0 -> List.rev accum, leftovers
| [], _ -> List.rev accum, leftovers
| hd :: tl, i -> loop (h... |
a09c14d3d7dfdf6170d33775e5fc67dac5bc7c392a79e2ce1dbdaeef1d32ba17 | tobiasbehr/camunda-clojure | tasks.clj | (ns camunda-clojure.tasks
(:require [camunda-clojure.common :as common]))
(defn- task->clj [task]
{:id (.getId task)
:task-definition-key (.getTaskDefinitionKey task)
:assignee (.getAssignee task)
:name (.getName task)
:due-date (.getDueDate task)
:priority (.getPriority task)
:owner (.getOwner t... | null | https://raw.githubusercontent.com/tobiasbehr/camunda-clojure/8eae8b3aba2254bce2c54d5e3c9e050ab50157e4/src/camunda_clojure/tasks.clj | clojure | (ns camunda-clojure.tasks
(:require [camunda-clojure.common :as common]))
(defn- task->clj [task]
{:id (.getId task)
:task-definition-key (.getTaskDefinitionKey task)
:assignee (.getAssignee task)
:name (.getName task)
:due-date (.getDueDate task)
:priority (.getPriority task)
:owner (.getOwner t... | |
ba36685f07aa265d99485346751e725679b59ce7840b089f7a4a2efa5daf9686 | sbcl/sbcl | target-insts.lisp | (in-package "SB-ARM64-ASM")
(defun current-instruction (dstate &optional (offset 0))
(sap-ref-int (dstate-segment-sap dstate)
(+ (dstate-cur-offs dstate) offset)
n-word-bytes
(dstate-byte-order dstate)))
(defun 32-bit-register-p (dstate)
(not (logbitp 31 (current-instr... | null | https://raw.githubusercontent.com/sbcl/sbcl/f4ad55431f27407e12d204dc9ed23bea48d86d4d/src/compiler/arm64/target-insts.lisp | lisp | static symbols aren't in the code header
Should cover most offsets in sane code
MOVZ
special magic to support decoding internal-error and related traps
See EMIT-ERROR-BREAK for the scheme | (in-package "SB-ARM64-ASM")
(defun current-instruction (dstate &optional (offset 0))
(sap-ref-int (dstate-segment-sap dstate)
(+ (dstate-cur-offs dstate) offset)
n-word-bytes
(dstate-byte-order dstate)))
(defun 32-bit-register-p (dstate)
(not (logbitp 31 (current-instr... |
295c0e0eb8ed24b81327b0326a5ba3c95c7a4ff50b3d0e67b9e0835189317d63 | renatoalencar/ocaml-socks-client | socks4.ml | [%%cstruct
type header = {
version: uint8_t;
command: uint8_t;
port: uint16_t;
ip: uint32_t;
} [@@big_endian]]
type proxy = [ `SOCKS4 of (string * int)
| `SOCKS4a of (string * int)
| `NOPROXY ]
module Request = struct
type command = Connect | Bind
type addr = [ `IPv4 of Ipaddr.V... | null | https://raw.githubusercontent.com/renatoalencar/ocaml-socks-client/ff413ad0c0c8e7c2ea96c39c64b7e4a0101388d4/socks/socks4.ml | ocaml | [%%cstruct
type header = {
version: uint8_t;
command: uint8_t;
port: uint16_t;
ip: uint32_t;
} [@@big_endian]]
type proxy = [ `SOCKS4 of (string * int)
| `SOCKS4a of (string * int)
| `NOPROXY ]
module Request = struct
type command = Connect | Bind
type addr = [ `IPv4 of Ipaddr.V... | |
8d16ba65e59a68dc668937e55b2370577d5c427a21fedf886c894a31a3ed956b | takikawa/drracket-vim-tool | utils.rkt | #lang racket/base
Utilities for vim tool
(require racket/class)
(provide as-edit-sequence)
(define-syntax-rule (as-edit-sequence e ...)
(begin
(send this begin-edit-sequence)
e ...
(send this end-edit-sequence))) | null | https://raw.githubusercontent.com/takikawa/drracket-vim-tool/c347e8f8dcb0d89efd44755587b108e1f420912a/private/utils.rkt | racket | #lang racket/base
Utilities for vim tool
(require racket/class)
(provide as-edit-sequence)
(define-syntax-rule (as-edit-sequence e ...)
(begin
(send this begin-edit-sequence)
e ...
(send this end-edit-sequence))) | |
7017400b3186aff536752cefadb914f3ceb0c5d230a92d6aad80bdb18b0519e9 | ddmcdonald/sparser | bio-methods.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
Copyright ( c ) 2019 SIFT LLC . All Rights Reserved
;;;
;;; File: "bio-methods-processes"
;;; Module: "grammar/model/sl/biology/
version : May 2019
Broken out from terms 4/27/17
;;; Sections: bio-methods, bio-methods with IDs, knock-out... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/4bb59f0989152f059f7b008ca4bfd89501bae04c/Sparser/code/s/grammar/model/sl/biology/bio-methods.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
File: "bio-methods-processes"
Module: "grammar/model/sl/biology/
Sections: bio-methods, bio-methods with IDs, knock-out types,
experimental-conditions, miscellaneous
-------------
bio-methods
-------------
assessed X on <quality> or for <q... | Copyright ( c ) 2019 SIFT LLC . All Rights Reserved
version : May 2019
Broken out from terms 4/27/17
(in-package :sparser)
verbs moved from verbs.lisp
(define-category assess :specializes bio-method
:mixins (bio-thatcomp)
:realization
:noun "assessment"
:on quality
:for quality
:etf (svo-pas... |
d7d3fc5eef765d7aad7e5004ed9dd32177640243dccf85a25536979901bce759 | ghcjs/ghcjs | t5603.hs |
# LANGUAGE MagicHash #
module Main (main) where
import GHC.Base
import GHC.Integer.GMP.Internals
main :: IO ()
main = (encodeDouble 0 :: Double) `seq` return ()
# INLINE encodeDouble #
encodeDouble :: Integer -> Double
encodeDouble (S# _) = D# 3.0##
encodeDouble _ = D# 4.0##
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/simplCore/t5603.hs | haskell |
# LANGUAGE MagicHash #
module Main (main) where
import GHC.Base
import GHC.Integer.GMP.Internals
main :: IO ()
main = (encodeDouble 0 :: Double) `seq` return ()
# INLINE encodeDouble #
encodeDouble :: Integer -> Double
encodeDouble (S# _) = D# 3.0##
encodeDouble _ = D# 4.0##
| |
44f40ee538ae7cbb6ced7e8c18f4ab7e0ae824577dbd2890bfca83afab881cdd | gedge-platform/gedge-platform | health_pb.erl | -*- coding : utf-8 -*-
@private
%% Automatically generated, do not edit
Generated by gpb_compile version 4.10.5
-module(health_pb).
-export([encode_msg/2, encode_msg/3]).
-export([decode_msg/2, decode_msg/3]).
-export([merge_msgs/3, merge_msgs/4]).
-export([verify_msg/2, verify_msg/3]).
-export([get_msg_defs/0])... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/eetcd/src/protos/health_pb.erl | erlang | Automatically generated, do not edit
enumerated types
message types
Like skipping over fields, but record the total length,
Record the length because varints may be non-optimally encoded.
because group field numbers are shared with the rest of the fields
numbers. Thus we can search just for an group-end with th... | -*- coding : utf-8 -*-
@private
Generated by gpb_compile version 4.10.5
-module(health_pb).
-export([encode_msg/2, encode_msg/3]).
-export([decode_msg/2, decode_msg/3]).
-export([merge_msgs/3, merge_msgs/4]).
-export([verify_msg/2, verify_msg/3]).
-export([get_msg_defs/0]).
-export([get_msg_names/0]).
-export([g... |
7abba9f90583fb8d84ca2ceecb5a8b19a70e235c9cd20a4f1a374a28d79ef6bb | brownplt/cs173-python | python-monad.rkt | #lang plai-typed
(require "python-core-syntax.rkt")
(define-type (ROption 'a)
[RValue (value : 'a)]
[RReturn (value : CVal)]
[RError (value : CVal)])
(define-type-alias (PM 'b)
(Store -> (Store * (ROption 'b))))
(define (m-bind (m : (PM 'c)) (f : ('c -> (PM 'd)))) : (PM 'd)
(lambda (store)
(local [(de... | null | https://raw.githubusercontent.com/brownplt/cs173-python/d8ae026172f269282e54366f16ec42e037117cb4/design3/cs173-python/python-monad.rkt | racket | with body to return
body-less version
Special store locs:
-1 = next index to alloc
-2 = globals | #lang plai-typed
(require "python-core-syntax.rkt")
(define-type (ROption 'a)
[RValue (value : 'a)]
[RReturn (value : CVal)]
[RError (value : CVal)])
(define-type-alias (PM 'b)
(Store -> (Store * (ROption 'b))))
(define (m-bind (m : (PM 'c)) (f : ('c -> (PM 'd)))) : (PM 'd)
(lambda (store)
(local [(de... |
cc41351ea9190e6139f417088bc96a61405c5dcbbf474a5d3ad819778176b085 | cbaggers/cepl | docs.lisp | (in-package :cepl.types)
(docs:define-docs
(defmacro defstruct-g
"
`defstruct-g` defines a struct that can be used both gpu-side (in gpu functions,
`gpu-array`s, `ubos`, etc) and also cpu-side (in `c-array`s, other gstructs, etc)
You create these using defstruct-g so lets look at an example right now:
(d... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/types/docs.lisp | lisp | (in-package :cepl.types)
(docs:define-docs
(defmacro defstruct-g
"
`defstruct-g` defines a struct that can be used both gpu-side (in gpu functions,
`gpu-array`s, `ubos`, etc) and also cpu-side (in `c-array`s, other gstructs, etc)
You create these using defstruct-g so lets look at an example right now:
(d... | |
472670e361208be85a6a7fda4354fdde44a68f71631623e3316cfb51479ff178 | amnh/poy5 | test_grappa.ml | open Printf;;
let _ =
print_string " Enter the file name " ;
print_newline ( ) ;
let infile = read_line ( ) in
print_newline ();
let infile = read_line () in *)
(* let m = Grappa.c_read_input "../../Grappa/camp13_full" in *)
let infile = "2genomeorderofmedian" in
Gc.full_major ();
... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/grappa/test_grappa.ml | ocaml | let m = Grappa.c_read_input "../../Grappa/camp13_full" in | open Printf;;
let _ =
print_string " Enter the file name " ;
print_newline ( ) ;
let infile = read_line ( ) in
print_newline ();
let infile = read_line () in *)
let infile = "2genomeorderofmedian" in
Gc.full_major ();
print_newline ();
let num_genomes , num_genes = Grappa.c_cal... |
b527d2aafa1022d192f202a269f16473be46953646053205eb3f01a6ffaaa337 | hoelzl/Clicc | p1generic.lisp | ;;;-----------------------------------------------------------------------------
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
;;;-----------------------------------------------------------------------------
Projekt : APPLY - A Practicable And Portable Lisp Implementation
;;; ... | null | https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/compiler/p1generic.lisp | lisp | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------------------
$Log: p1generic.lisp,v $
Revision 1.90 1994/01/13 07:49:05 ft
extract-specializers versc... | Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
Projekt : APPLY - A Practicable And Portable Lisp Implementation
Funktion : Behandlung definierender Vorkommen und
Methoden , .
$ Revision : 1.91 $
Revision 1.91 1994/01/14 08:53:47 sma
extract - specialize... |
a1fec587a3228ecc133bc5c37921688a37b8d979eb02bb2bda71f9d65ea76309 | melange-re/melange | curry.ml | Copyright ( C ) 2015 - , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later v... | null | https://raw.githubusercontent.com/melange-re/melange/13edf6108d884e64cd510bce077ef2ce73de6a97/jscomp/runtime/curry.ml | ocaml | Public
arity fixing
f.apply (null,args)
TODO: could avoid copy by tracking the index
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public
Public | Copyright ( C ) 2015 - , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later v... |
b83fb7b71cdf85d3221266e353c628cde585ef02f76f4482a1e87615881a45fd | ocaml-ppx/ppx | ppx_metaquot.ml | open Stdppx
module Extensions = Ppx_metaquot_expander.Extensions (struct
let mark_attribute_as_handled_manually attribute =
Ppx.Attr.mark_as_handled_manually attribute
let assert_no_attributes attributes =
Ppx.assert_no_attributes attributes
end)
let extensions = List.map Extensions.extensions ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/metaquot/ppx_metaquot.ml | ocaml | open Stdppx
module Extensions = Ppx_metaquot_expander.Extensions (struct
let mark_attribute_as_handled_manually attribute =
Ppx.Attr.mark_as_handled_manually attribute
let assert_no_attributes attributes =
Ppx.assert_no_attributes attributes
end)
let extensions = List.map Extensions.extensions ... | |
a7010090260084ebfab697db27921b545f152229075df7df2e25f2b468a03da6 | barrucadu/dejafu | Refinement.hs | module Integration.Refinement where
import Control.Concurrent.Classy.MVar
import Control.Monad (void)
import Test.DejaFu.Refinement
import Test.Tasty.DejaFu (testProperty)
import Common hiding (testProperty)
tests... | null | https://raw.githubusercontent.com/barrucadu/dejafu/f805783398e2be60ebabb56fce9f23506b9d1879/dejafu-tests/lib/Integration/Refinement.hs | haskell | ----------------------------------------------------------------------------- | module Integration.Refinement where
import Control.Concurrent.Classy.MVar
import Control.Monad (void)
import Test.DejaFu.Refinement
import Test.Tasty.DejaFu (testProperty)
import Common hiding (testProperty)
tests... |
3a29cb04b607a7fc7eff204119eb5170c6bd431b9a290e80f741a72fce9953aa | sunshineclt/Racket-Helper | homework1-c.rkt | #lang racket
(define (outerloop i n numbers)
(define (my-list-ref list position)
(if (or (< position 0) (>= position (length list)))
0
(list-ref list position)))
(define (innerloop j newnumbers)
(if (= j i)
(begin (display #\newline) newnumbers)
(begin
(let ((newi... | null | https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week1/homework1-c.rkt | racket | #lang racket
(define (outerloop i n numbers)
(define (my-list-ref list position)
(if (or (< position 0) (>= position (length list)))
0
(list-ref list position)))
(define (innerloop j newnumbers)
(if (= j i)
(begin (display #\newline) newnumbers)
(begin
(let ((newi... | |
d208711ef89657dc870387093550fac542bbe2a8b59b20207242a980adb2c0bb | racehub/stripe-clj | customer_test.clj | (ns stripe.customer-test
(:use clojure.test
stripe.customer)
(:require [stripe.test-data :as td]))
(deftest customer-cycle-test
"Test of the create, update, delete cycle for customers."
(let [created (create-customer td/customer-data)
id (:id created)
retrieved (get-customer id)]
(i... | null | https://raw.githubusercontent.com/racehub/stripe-clj/f8199bceacbec9d15ac58f32508aa1e78aa1b491/test/clj/stripe/customer_test.clj | clojure | new | (ns stripe.customer-test
(:use clojure.test
stripe.customer)
(:require [stripe.test-data :as td]))
(deftest customer-cycle-test
"Test of the create, update, delete cycle for customers."
(let [created (create-customer td/customer-data)
id (:id created)
retrieved (get-customer id)]
(i... |
7d1fe5a4590fe3d63a8120f8d96c295c151043def785b8c718f713b3f9c706db | haskell-unordered-containers/unordered-containers | Internal.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE PatternGuards #
# LANGUAGE RoleAnnotations #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Stan... | null | https://raw.githubusercontent.com/haskell-unordered-containers/unordered-containers/27c37ce01e66432d2dfe13d3e4219d3724efad02/Data/HashMap/Internal.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveLift #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskellQuotes #
# LANGUAGE TypeInType #
| = WARNING
This module is considered... | # LANGUAGE BangPatterns #
# LANGUAGE PatternGuards #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedSums #
# LANGUAGE UnboxedTuples #
# OPTIONS_GHC -fno - full - laziness -funbox - strict - fields #
# OPTIONS_HADDOCK not - home #
The P... |
7b6aca2fcd49109355318a50ca11d1d6b4e03daf3c062c99c2d36a8bea5b6fa0 | DavidAlphaFox/RabbitMQ | ELDAPv3.erl | Generated by the Erlang - compiler version , utilizing bit - syntax:3.0.3
%% Purpose: encoder and decoder to the types in mod ELDAPv3
-module('ELDAPv3').
-compile(nowarn_unused_vars).
-include("ELDAPv3.hrl").
-asn1_info([{vsn,'3.0.3'},
{module,'ELDAPv3'},
{options,[warnings,ber,errors,
{cw... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/eldap-wrapper/eldap-git/generated/ELDAPv3.erl | erlang | Purpose: encoder and decoder to the types in mod ELDAPv3
================================
================================
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
attribute protocolOp(2) with type CHOICE
----... | Generated by the Erlang - compiler version , utilizing bit - syntax:3.0.3
-module('ELDAPv3').
-compile(nowarn_unused_vars).
-include("ELDAPv3.hrl").
-asn1_info([{vsn,'3.0.3'},
{module,'ELDAPv3'},
{options,[warnings,ber,errors,
{cwd,"/Users/david/Documents/workspace/rabbitmq-server-3.4.2/pl... |
0ec95520f13630a7b00c1cfb775380cf693eedf5ec3962ac18f7f892f33f3e2d | schell/steeloverseer | Exception.hs | module Sos.Exception
( SosException(..)
) where
import Sos.Utils
import Control.Exception (Exception)
import Data.ByteString (ByteString)
import Data.Typeable (Typeable)
data SosException
-- Error compiling the given regex.
= SosRegexException
ByteString -- pattern
String -- string reason for... | null | https://raw.githubusercontent.com/schell/steeloverseer/dcc694460ac9713b4a9a2462a3eecc8b38ca9fa3/src/Sos/Exception.hs | haskell | Error compiling the given regex.
pattern
string reason for failure
Error parsing a command template.
template
Error applying a list of captured variables to a command template.
template
captured variables
string reason for failure | module Sos.Exception
( SosException(..)
) where
import Sos.Utils
import Control.Exception (Exception)
import Data.ByteString (ByteString)
import Data.Typeable (Typeable)
data SosException
= SosRegexException
| SosCommandParseException
| SosCommandApplyException
deriving (Eq, Typeable)
instance Show SosE... |
41554747994e77016bf696ea7bff6882d6dc352464421ec9af85b91f472c38db | flipstone/orville | Explanation.hs | # LANGUAGE CPP #
module Database.Orville.PostgreSQL.Plan.Explanation
( Explanation
, noExplanation
, explainStep
, explanationSteps
) where
newtype Explanation =
Explanation ([String] -> [String])
#if MIN_VERSION_base(4,11,0)
instance Semigroup Explanation where
(<>) = appendExplanation
#endif
instance... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/src/Database/Orville/PostgreSQL/Plan/Explanation.hs | haskell | # LANGUAGE CPP #
module Database.Orville.PostgreSQL.Plan.Explanation
( Explanation
, noExplanation
, explainStep
, explanationSteps
) where
newtype Explanation =
Explanation ([String] -> [String])
#if MIN_VERSION_base(4,11,0)
instance Semigroup Explanation where
(<>) = appendExplanation
#endif
instance... | |
a5f309c9242432ea17d29947f81b903658dd7abe3ec34ab0f3c2b14c282f0751 | MLstate/opalang | identTable.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/compilerlib/identTable.ml | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
4e656f8de414022fbe8bb612ae529811bb9b72c0be6811ec31223ce192e55905 | abyala/advent-2022-clojure | day17_test.clj | (ns advent-2022-clojure.day17-test
(:require [clojure.test :refer :all]
[advent-2022-clojure.day17 :refer :all]))
(def test-data (slurp "resources/day17-test.txt"))
(def puzzle-data (slurp "resources/day17-puzzle.txt"))
(deftest part1-test
(are [expected input] (= expected (part1 input))
... | null | https://raw.githubusercontent.com/abyala/advent-2022-clojure/ec8e06a80aa875400f87530d5205976c053ac1f6/test/advent_2022_clojure/day17_test.clj | clojure | (ns advent-2022-clojure.day17-test
(:require [clojure.test :refer :all]
[advent-2022-clojure.day17 :refer :all]))
(def test-data (slurp "resources/day17-test.txt"))
(def puzzle-data (slurp "resources/day17-puzzle.txt"))
(deftest part1-test
(are [expected input] (= expected (part1 input))
... | |
ca6e6e2dd777111d01772ef00863ca64ca5899c9603920d315ae95b11e8da742 | gelisam/frp-zoo | Buttons.hs | module Buttons where
import Data.Monoid
import Graphics.Gloss
import Graphics.Gloss.Data.Extent
import Graphics.Gloss.Interface.Pure.Game
import Text.Printf
buttonC0, buttonT0, buttonC5, buttonT5, buttonC10, buttonT10 :: Extent
buttonC0 = makeExtent 35 5 (-60) (-140)
buttonT0 = makeExtent (-5) (-35) (-60) ... | null | https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/shared/Buttons.hs | haskell | Button rendering
vertically centered, random x offset :(
Button events | module Buttons where
import Data.Monoid
import Graphics.Gloss
import Graphics.Gloss.Data.Extent
import Graphics.Gloss.Interface.Pure.Game
import Text.Printf
buttonC0, buttonT0, buttonC5, buttonT5, buttonC10, buttonT10 :: Extent
buttonC0 = makeExtent 35 5 (-60) (-140)
buttonT0 = makeExtent (-5) (-35) (-60) ... |
78f926337b15ee59d7f6af0519c2349346684c3e2d7dc9970ba5a5f5d06bb5d4 | fjvallarino/monomer | SeparatorLineSpec.hs | |
Module : . Widgets . Singles . SeparatorLineSpec
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Unit tests for Separator Line widget .
Module : Monomer.Widgets.Singles.SeparatorLin... | null | https://raw.githubusercontent.com/fjvallarino/monomer/3b321ed0bd5c1458864c02696c43aa39b627640f/test/unit/Monomer/Widgets/Singles/SeparatorLineSpec.hs | haskell | |
Module : . Widgets . Singles . SeparatorLineSpec
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Unit tests for Separator Line widget .
Module : Monomer.Widgets.Singles.SeparatorLin... | |
bea961cf9e4ce05378b14e4806151c63880b7775ba8491d0f3a8e054e2d390d9 | RefactoringTools/HaRe | Do1.hs | module Layout.Do1 where
getCurrentModuleGraph = undefined
topSortModuleGraph = undefined
-- sortCurrentModuleGraph :: GHC.Ghc [GHC.SCC GHC.ModSummary]
sortCurrentModuleGraph :: IO [Int]
sortCurrentModuleGraph = do
-- g <- GHC.getModuleGraph
g <- getCurrentModuleGraph
let scc = topSortModuleGraph False g Nothing... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Layout/Do1.hs | haskell | sortCurrentModuleGraph :: GHC.Ghc [GHC.SCC GHC.ModSummary]
g <- GHC.getModuleGraph | module Layout.Do1 where
getCurrentModuleGraph = undefined
topSortModuleGraph = undefined
sortCurrentModuleGraph :: IO [Int]
sortCurrentModuleGraph = do
g <- getCurrentModuleGraph
let scc = topSortModuleGraph False g Nothing
return scc
|
e52aa2aecc32c12f3004bf91d26a4ee3458a51f1272723c6d17be8feb6557a51 | pitag-ha/cardio-crumble | event.ml | open Runtime_events
type t = Runtime_events.runtime_phase
let compare ~f e1 e2 = if e1 = e2 then 0 else if f e1 > f e2 then 1 else -1
let all =
[
EV_EXPLICIT_GC_SET;
EV_EXPLICIT_GC_STAT;
EV_EXPLICIT_GC_MINOR;
EV_EXPLICIT_GC_MAJOR;
EV_EXPLICIT_GC_FULL_MAJOR;
EV_EXPLICIT_GC_COMPACT;
EV_MA... | null | https://raw.githubusercontent.com/pitag-ha/cardio-crumble/2449624bf8d6307507765d6ecde0dada545f66d4/bin/event.ml | ocaml | open Runtime_events
type t = Runtime_events.runtime_phase
let compare ~f e1 e2 = if e1 = e2 then 0 else if f e1 > f e2 then 1 else -1
let all =
[
EV_EXPLICIT_GC_SET;
EV_EXPLICIT_GC_STAT;
EV_EXPLICIT_GC_MINOR;
EV_EXPLICIT_GC_MAJOR;
EV_EXPLICIT_GC_FULL_MAJOR;
EV_EXPLICIT_GC_COMPACT;
EV_MA... | |
5c787fda0bee753cdb74288d1344fb5509d4c3c3d6c9431663b9f6f41246a58f | antono/guix-debian | shishi.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
Copyright © 2012 < >
Copyright © 2014 < >
;;;
;;; 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
... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/shishi.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 © 2012 , 2013 < >
Copyright © 2012 < >
Copyright © 2014 < >
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 shishi)
#:use-module ((... |
8d3e89f0cc0265cf8275b82ec4dc7173a2dcc3334d2394f76f6be38931c8d55f | mhuebert/maria | hiccup.cljs | (ns chia.view.hiccup
(:require ["react" :as react]
[applied-science.js-interop :as j]
[chia.view.hiccup.impl :as hiccup]
[chia.util :as u]))
(def -react-element react/createElement)
(def -react-fragment react/Fragment)
(def -react-element? react/isValidElement)
(defprotocol IElem... | null | https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/editor/vendor/chia/view/hiccup.cljs | clojure | fast cases for small numbers of children
a single seq child should not create intermediate fragment | (ns chia.view.hiccup
(:require ["react" :as react]
[applied-science.js-interop :as j]
[chia.view.hiccup.impl :as hiccup]
[chia.util :as u]))
(def -react-element react/createElement)
(def -react-fragment react/Fragment)
(def -react-element? react/isValidElement)
(defprotocol IElem... |
31689a9debc04eb83cf1de95436fde54f196038e458bfe041272b98151fbb9d2 | Mushy-pea/Game-Dangerous | TransformModel.hs | Game : : Dangerous code by . You are free to use this software and view its source code .
-- If you wish to redistribute it or use it as part of your own work, this is permitted as long as you acknowledge the work is by the abovementioned author.
-- This is a development tool used to apply translations and rotat... | null | https://raw.githubusercontent.com/Mushy-pea/Game-Dangerous/f77bb6b9606dc326e89ab5b91abec978b0018898/app/TransformModel.hs | haskell | If you wish to redistribute it or use it as part of your own work, this is permitted as long as you acknowledge the work is by the abovementioned author.
This is a development tool used to apply translations and rotations to 3D models, which uses a modified form of the OBJ file format for input and output.
These fun... | Game : : Dangerous code by . You are free to use this software and view its source code .
module Main where
import System.IO
import System.IO.Unsafe
import System.Environment
import Data.List
import Data.List.Split
import Data.Matrix hiding ((!))
import Data.Array.IArray
import Data.Array.Unboxed
import Contro... |
726431f58c1c444bc5324ac132e5127b86de10e7a88679148b9c7e7dd0f506c1 | paypal/seazme-sources | common.clj | (ns seazme.scripts.common
(:require [clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.data.csv :as csv]))
(defn new-if-not-exists [m k fv] (if (m k) m (assoc m k (fv))))
(defn assoc-if-exists [m k v] (if (m k) (assoc m k v) m))
(comment
"test"
(def store (atom {:a 1}))
(swap... | null | https://raw.githubusercontent.com/paypal/seazme-sources/57e5b7579f5e475a908b2318a00549dd131f7745/src/main/clojure/seazme/scripts/common.clj | clojure |
common
| (ns seazme.scripts.common
(:require [clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.data.csv :as csv]))
(defn new-if-not-exists [m k fv] (if (m k) m (assoc m k (fv))))
(defn assoc-if-exists [m k v] (if (m k) (assoc m k v) m))
(comment
"test"
(def store (atom {:a 1}))
(swap... |
5e705a0152a3688114fbb4fe3bcc7e9037c6641531865b9e629a54fdae00f78f | aweber/rabbitmq-autocluster | autocluster_consul.erl | %%==============================================================================
@author < >
2015 - 2016 AWeber Communications
%% @end
%%==============================================================================
-module(autocluster_consul).
-behavior(autocluster_backend).
%% autocluster_backend methods
-... | null | https://raw.githubusercontent.com/aweber/rabbitmq-autocluster/31119506acb88b10355f3ab5bcc5291bfcf2cfe0/src/autocluster_consul.erl | erlang | ==============================================================================
@end
==============================================================================
autocluster_backend methods
For timer based health checking
Ignore this (is used so we can stub with meck in tests)
Export all for unit tests
----------... | @author < >
2015 - 2016 AWeber Communications
-module(autocluster_consul).
-behavior(autocluster_backend).
-export([nodelist/0,
register/0,
unregister/0]).
-export([init/0,
send_health_check_pass/0]).
-export([build_registration_body/0]).
-ifdef(TEST).
-compile(export_all).
-end... |
349abe1272178917136372f667b13753e2c775bbe39112118420b7697749c97b | bobzhang/fan | testdata.ml | 1234567
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/testdata.ml | ocaml | 1234567
| |
9c436a70640ef081010e609c890d7874ba8cf404cc9adf0a5f51db1fbb024c2f | grin-compiler/ghc-wpc-sample-programs | Shared.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . Writers . Shared
Copyright : Copyright ( C ) 2013 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portabi... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Writers/Shared.hs | haskell | # LANGUAGE OverloadedStrings #
of variables, specified at the command line or in the writer.
Variables overwrite metadata fields with the same names.
If multiple variables are set with the same name, a list is
assigned. Does nothing if 'writerTemplate' is Nothing.
| Like 'metaToContext, but does not include varia... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
|
Module : Text . Pandoc . Writers . Shared
Copyright : Copyright ( C ) 2013 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Shared utility f... |
6115fbdde119a28d18f61a4ff94acb1366d50056e8eba31db3385a666a1c49ab | SKA-ScienceDataProcessor/RC | ddp-in-memory.hs | # LANGUAGE TemplateHaskell #
module Main(main) where
import Data.Int
import DNA
import DDP
import DDP_Slice
----------------------------------------------------------------
-- Distributed dot product
----------------------------------------------------------------
-- | Actor for calculating dot product
ddpDotProd... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/dna-programs/ddp-in-memory.hs | haskell | --------------------------------------------------------------
Distributed dot product
--------------------------------------------------------------
| Actor for calculating dot product
Collect results
Vector size:
> 4 nodes
Run it | # LANGUAGE TemplateHaskell #
module Main(main) where
import Data.Int
import DNA
import DDP
import DDP_Slice
ddpDotProduct :: Actor Int64 Double
ddpDotProduct = actor $ \size -> do
Chunk & send out
shell <- startGroup (Frac 1) (NNodes 1) $ do
useLocal
return $(mkStaticClosure 'ddpProductSlice... |
16b9e69621ad987e3666cfea3d5f67206a1aa1d46093702b93354752d654efb6 | reljr/reljr | interpreter.cljc | (ns reljr.interpreter
(:require [reljr.table :as table]
[clojure.set :as set]
[reljr.aggregates :as agg]
[reljr.expression-utilities :as eutils]))
(def predicate-fns
{'not not
'and (fn [& vs] (every? identity vs))
'or (fn [& vs] (some identity vs))
'= =
'not= not=
... | null | https://raw.githubusercontent.com/reljr/reljr/6d7e8fcfad732f500e56812fa324863736a2b46e/src/reljr/interpreter.cljc | clojure | (ns reljr.interpreter
(:require [reljr.table :as table]
[clojure.set :as set]
[reljr.aggregates :as agg]
[reljr.expression-utilities :as eutils]))
(def predicate-fns
{'not not
'and (fn [& vs] (every? identity vs))
'or (fn [& vs] (some identity vs))
'= =
'not= not=
... | |
931f7ae48b50778b057036f4b658a9b3eaba39b06611ace770df0cdcc72bcb51 | jeapostrophe/srpnt | display.rkt | #lang at-exp racket/base
(require data/enumerate
data/enumerate/lib
racket/match
racket/promise
racket/system
racket/format
racket/list
srpnt/music-theory
srpnt/bithoven)
(define (display-bithoven n pth)
(define b/e (force p:bithoven/e))
(defi... | null | https://raw.githubusercontent.com/jeapostrophe/srpnt/c26e74ce524bb988d6643273c96f4e94406b1746/srpnt/display.rkt | racket | just errors, so I'm turning that off. | #lang at-exp racket/base
(require data/enumerate
data/enumerate/lib
racket/match
racket/promise
racket/system
racket/format
racket/list
srpnt/music-theory
srpnt/bithoven)
(define (display-bithoven n pth)
(define b/e (force p:bithoven/e))
(defi... |
d1eb768711339cce0d915bb7ebdec522d1f8a2b1414bab833a253585d58a2602 | reenberg/wobot | Properties.hs | Copyright ( c ) 2007 - 2008
The President and Fellows of Harvard College .
--
-- 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
-- not... | null | https://raw.githubusercontent.com/reenberg/wobot/ce7f112096ba1abd43b8d29da7e8944c2a004125/flask/language-nesc/Language/NesC/Properties.hs | haskell |
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 mate... | Copyright ( c ) 2007 - 2008
The President and Fellows of Harvard College .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the University nor the names of its contributors
THIS SOFTWARE ... |
e10c628c1d032e061488012e98a965cbe4ba464adc4f7b6459c217bf8da4c9d9 | coq/coq | heads.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/1d57f24c69d287f2b5847d2c135d500fd64eddaf/pretyping/heads.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
dc789d21a6476e0cba400236fd3f672b1e53d8bfab3147dbb9acb8ec31254fe0 | mwsundberg/2020-brickhack | spraypaint.cljs | (ns brickhack.spraypaint
(:require [brickhack.common :as c]
[quil.core :as q]
[quil.middleware :as middleware]))
(def body (.-body js/document))
(def w (.-clientWidth body))
(def h (.-clientHeight body))
; This-sketch custom code
(def palette (rand-nth c/... | null | https://raw.githubusercontent.com/mwsundberg/2020-brickhack/522855b897aa57c346d79d7a594cf99e7d381b76/src/brickhack/spraypaint.cljs | clojure | This-sketch custom code
Start of the sketch codes
(render-field w h)
(apply q/background (:background palette)) | (ns brickhack.spraypaint
(:require [brickhack.common :as c]
[quil.core :as q]
[quil.middleware :as middleware]))
(def body (.-body js/document))
(def w (.-clientWidth body))
(def h (.-clientHeight body))
(def palette (rand-nth c/palettes))
(defn particle [id] (assoc (c/particle id w h palette) ... |
2e8b67c254bf33ed079346b1243fc60a582848a68be115b763cf7c77e59fd8a0 | bsaleil/lc | print.scm | ;;---------------------------------------------------------------------------
;;
Copyright ( c ) 2015 , . 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 so... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/lib/print.scm | scheme | ---------------------------------------------------------------------------
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 ... | Copyright ( c ) 2015 , . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(define (print n)
(gambit$$print n))
(define (p... |
b64b75080e17c0c9aebff3abbb5c60e359a13019fd0c33827e4fc9009193ab89 | kupl/MicSE | prove.ml | (* Prove : Naïve prover for verification *)
exception PrvError of string
open! Core
(******************************************************************************)
(******************************************************************************)
Common
(*... | null | https://raw.githubusercontent.com/kupl/MicSE/e8f44309044c0308fe979f7dd82aa6bfbaa41091/lib/prove.ml | ocaml | Prove : Naïve prover for verification
****************************************************************************
****************************************************************************
****************************************************************************
*************************************************... |
exception PrvError of string
open! Core
Common
Set of Tz.r_mich_cut_info
module RMCISet = Set.Make (Tz.RMichCutInfo_cmp)
Map of Tz.r_mich_cut_info
module RMCIMap = Map.Make (Tz.RMichCutInfo_cmp)
module SSet = Set.Make (Tz.SymState_cmp)
let check_... |
e45754a553ecc133805556f52fa8ed3a0ea4473d255b18dba0bc84799929e279 | SamB/coq | fourierR.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/fourier/fourierR.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
La tactique Fo... |
a88bb3a62505939bd5b8175eab21bd3f93e2660ac971f39eacbcc2e24100ae6e | adamdoupe/find_ear_rails | cfg_suite.ml |
open OUnit
let suite = "CFG Suite" >:::
[
Printer_tests.suite;
Refactor_tests.suite;
Scope_cfg_tests.suite;
Cfg_locals_test.suite;
]
| null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/cfg/cfg_suite.ml | ocaml |
open OUnit
let suite = "CFG Suite" >:::
[
Printer_tests.suite;
Refactor_tests.suite;
Scope_cfg_tests.suite;
Cfg_locals_test.suite;
]
| |
ee2202f0754ccc507b2033579d2d6fabbd2073e21bb755aa5ba6fb6d71a15032 | manuel-serrano/bigloo | midi.scm | ;*=====================================================================*/
;* .../project/bigloo/bigloo/api/multimedia/src/Llib/midi.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : Thu Mar ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/0291d1a67b2478b02bb6d3d16b2f80297464e9df/api/multimedia/src/Llib/midi.scm | scheme | *=====================================================================*/
* .../project/bigloo/bigloo/api/multimedia/src/Llib/midi.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*===========================... | * Author : * /
* Creation : Thu Mar 7 17:33:01 2019 * /
* Last change : Fri Mar 11 19:18:58 2022 ( serrano ) * /
* Copyright : 2019 - 22 * /
* Midi support ( sequencer... |
48c7eee565684765b4365a468dd8d2b0a24f8761494d97a0d451b5c261da7a23 | flussonic/sqlapi | sql_ets_api.erl | -module(sql_ets_api).
-export([authorize/4, connect_db/2, database/1, databases/1, tables/1, columns/2, terminate/2]).
-export([select/3, insert/3, update/4, delete/3, fncall/3]).
-record(state, {
db
}).
authorize(Username, HashedPassword, Hash, _Env) ->
case <<"login">> == Username andalso sqlapi:password_hash... | null | https://raw.githubusercontent.com/flussonic/sqlapi/a8f51e3cb5827366a6224585ee52024720b9c3ef/src/sql_ets_api.erl | erlang | -module(sql_ets_api).
-export([authorize/4, connect_db/2, database/1, databases/1, tables/1, columns/2, terminate/2]).
-export([select/3, insert/3, update/4, delete/3, fncall/3]).
-record(state, {
db
}).
authorize(Username, HashedPassword, Hash, _Env) ->
case <<"login">> == Username andalso sqlapi:password_hash... | |
8b02de4e59a1fcc4b6239e3435bf828547e191eda9fbcc65d312ab6a31d002d3 | cachix/cachix | Client.hs | module Cachix.Client
( main,
)
where
import Cachix.Client.Commands as Commands
import qualified Cachix.Client.Config as Config
import Cachix.Client.Env (cachixoptions, mkEnv)
import Cachix.Client.OptionsParser (CachixCommand (..), getOpts)
import Cachix.Client.Version (cachixVersion)
import Cachix.Deploy.ActivateC... | null | https://raw.githubusercontent.com/cachix/cachix/0da6106c495474348a1a73a1a5fe16463eaa7fa5/cachix/src/Cachix/Client.hs | haskell | module Cachix.Client
( main,
)
where
import Cachix.Client.Commands as Commands
import qualified Cachix.Client.Config as Config
import Cachix.Client.Env (cachixoptions, mkEnv)
import Cachix.Client.OptionsParser (CachixCommand (..), getOpts)
import Cachix.Client.Version (cachixVersion)
import Cachix.Deploy.ActivateC... | |
7e79cbbba9d974f5012f2b89146fcc1ec373424cc3cddd111760aefa8771e427 | spechub/Hets | XMLstate.hs | |
Module : ./PGIP / XMLstate.hs
Description : after parsing XML message a list of XMLcommands is produced ,
containing commands that need to be executed
Copyright : uni - bremen and DFKI
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/PGIP/XMLstate.hs | haskell | empty line generates a whitespace element
comments start with #
| adds xml structure to unstructured code
- other types of mark ups :
- opengoal / closegoal
- openblock / closeblock
-
generates a pgipelem element that contains the input text
generates a normalresponse element that has a pgml element
con... | |
Module : ./PGIP / XMLstate.hs
Description : after parsing XML message a list of XMLcommands is produced ,
containing commands that need to be executed
Copyright : uni - bremen and DFKI
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
... |
63af9127dba929b68ad3210a28396674d10435de2def0cee39dda6e7771dc43a | haskell-opengl/OpenGLRaw | ClipControl.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.ClipControl
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/ClipControl.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.ClipControl
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.ClipControl (
glGetARBClipControl,
gl_ARB_clip_control,
pattern GL_CLIP_DEPTH_MODE,
pattern GL_CLIP_ORIGIN,
pattern GL_LOWER_LEFT,
pattern GL_NEGATIVE_ONE_TO_ONE,
pattern GL_UPPER_LEFT,
pattern... |
3d98c93b872ec4b5cf5ff1dfca3eeabfb6cdb96580b71031801518e25ae20c9e | mmontone/erudite | explicit-code.lisp | ;; Explicit code test
(defun this-code-does-not-appear ()
(print "error"))
;; This is the code:
;; @code
(defun hello-world ()
(print "hello world"))
;; @end code
| null | https://raw.githubusercontent.com/mmontone/erudite/d421f4ed27faa636d5d4d768c4b64274023d63b2/test/explicit-code.lisp | lisp | Explicit code test
This is the code:
@code
@end code | (defun this-code-does-not-appear ()
(print "error"))
(defun hello-world ()
(print "hello world"))
|
0e0d7894901f1d10522613b17841707e6a4bb95b1c4451557b5d4179ee853ed1 | chrisnc/tangaroa | Combinator.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE KindSignatures #
module Network.Tangaroa.Combinator
( (^$)
, (^=<<.)
) where
import Control.Lens
import Control.Monad.RWS
-- like $, but the function is a lens from the reader environment with a
-- pure function as its target
infixr 0 ^$
(^$) :: forall (m :: * -> *) b r a... | null | https://raw.githubusercontent.com/chrisnc/tangaroa/5dc68d9de0bdc23506e58f86357576f2c4a0c178/src/Network/Tangaroa/Combinator.hs | haskell | # LANGUAGE RankNTypes #
like $, but the function is a lens from the reader environment with a
pure function as its target | # LANGUAGE KindSignatures #
module Network.Tangaroa.Combinator
( (^$)
, (^=<<.)
) where
import Control.Lens
import Control.Monad.RWS
infixr 0 ^$
(^$) :: forall (m :: * -> *) b r a. MonadReader r m =>
Getting (a -> b) r (a -> b) -> a -> m b
lf ^$ a = fmap ($ a) (view lf)
infixr 0 ^=<<.
(^=<<.) :: forall a (m... |
ad1bdb3b66ae1dc071d10e200c149de3a4fc27adb19863b4700791634b1834df | konn/dl-first-principle-tutorial | VectorSpace.hs | {-# HLINT ignore "Redundant lambda" #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DefaultSignatures #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
... | null | https://raw.githubusercontent.com/konn/dl-first-principle-tutorial/5e9b5ab14b290b5e9a85f033692820771fc578f6/src/Numeric/VectorSpace.hs | haskell | # HLINT ignore "Redundant lambda" #
# LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveTraversable #
# OPTIONS_GHC -Wno-unrecognised-pragmas #
** Deriving modifiers
** Generic operations
# INLINE (.*) #
# INLINE (*.) #
# INLINE (.+) #
# INLINE (+.) #
# INLINE (.-) #
# INLINE (-.) #
# INLINE (/.... | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ... |
1eb13ae3df9652be3b765b49cba59ed1b0097b4420481f01e62623839531eb06 | exoscale/clojure-kubernetes-client | v1beta1_cron_job_spec.clj | (ns clojure-kubernetes-client.specs.v1beta1-cron-job-spec
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-job-template-spec :refer :all]
)
(:import (java.io File)))
(declare v1beta1-cron-job-spec-data v1beta1-cron-job-... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_cron_job_spec.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-cron-job-spec
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-job-template-spec :refer :all]
)
(:import (java.io File)))
(declare v1beta1-cron-job-spec-data v1beta1-cron-job-... | |
0083f21ba851626ff241c554b105185ed029dd7bf3a7e09b0cbe774cd50c54d3 | toyokumo/tarayo | mime_test.clj | (ns tarayo.mail.mime-test
(:require
[clojure.string :as str]
[clojure.test :as t]
[tarayo.mail.mime :as sut]
[tarayo.mail.mime.message :as message]
[tarayo.test-helper :as h])
(:import
(jakarta.mail.internet
InternetAddress
MimeMessage
MimeMultipart)))
(t/deftest make-message-test
(... | null | https://raw.githubusercontent.com/toyokumo/tarayo/f9b10b85b7bc1a188d808c3955e258916cd0b38a/test/tarayo/mail/mime_test.clj | clojure | (ns tarayo.mail.mime-test
(:require
[clojure.string :as str]
[clojure.test :as t]
[tarayo.mail.mime :as sut]
[tarayo.mail.mime.message :as message]
[tarayo.test-helper :as h])
(:import
(jakarta.mail.internet
InternetAddress
MimeMessage
MimeMultipart)))
(t/deftest make-message-test
(... | |
8201e872a5e9a801dcbf2b8c4a3721ec875c9e43e499daba02e51534b88ad202 | socrata-platform/ssync | PatchApplier.hs | # LANGUAGE LambdaCase , DeriveDataTypeable , ScopedTypeVariables #
module SSync.PatchApplier (patchApplier, PatchException(..)) where
import Conduit
import Control.Applicative ((<$>))
import Control.Exception (Exception)
import Control.Monad (when)
import Control.Monad.Except (ExceptT(..), withExceptT, throwError, ru... | null | https://raw.githubusercontent.com/socrata-platform/ssync/2bd47cb59e98249396b914bb3d9371d133bc5436/src/main/haskell/SSync/PatchApplier.hs | haskell | blocksize/number
we know it'll fit in an Int now | # LANGUAGE LambdaCase , DeriveDataTypeable , ScopedTypeVariables #
module SSync.PatchApplier (patchApplier, PatchException(..)) where
import Conduit
import Control.Applicative ((<$>))
import Control.Exception (Exception)
import Control.Monad (when)
import Control.Monad.Except (ExceptT(..), withExceptT, throwError, ru... |
876622142b9e095bd2b6c2281665346694a9c6ac64d82dc928731615efa3f438 | samrushing/irken-compiler | t_pem.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/codecs/base64.scm")
(include "lib/codecs/hex.scm")
(include "lib/asn1/ber.scm")
(include "lib/crypto/pem.scm")
(define (main)
(let ((g0 (file-char-generator
(file/open-read sys.argv[1]))))
(printf ";; path: " sys... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_pem.scm | scheme | -*- Mode: Irken -*- |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/codecs/base64.scm")
(include "lib/codecs/hex.scm")
(include "lib/asn1/ber.scm")
(include "lib/crypto/pem.scm")
(define (main)
(let ((g0 (file-char-generator
(file/open-read sys.argv[1]))))
(printf ";; path: " sys.argv[1] "\n")
(for... |
5d03d5eb39d532d3d4d9892b6fdf0a55412091ec7a0c8b1157d2a1d88dd59451 | ocaml-flambda/ocaml-jst | clambda.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/middle_end/clambda.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Lambda
type function_label = string
type arity = {
function_kind : Lambda.function... |
a5f2ea62a5645dccedc2adf574176ef35f4550903db0db8129e636c0f231e941 | input-output-hk/cardano-rest | Api.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Explorer.Web.Api
( ExplorerApi
, explorerApi
) where
import Data.Proxy (Proxy (..))
import Explorer.Web.Api.HttpBridge (HttpBridgeApi)
import Explorer.Web.Api.Legacy (ExplorerApiRecord)
import Servant.API ((:... | null | https://raw.githubusercontent.com/input-output-hk/cardano-rest/040b123b45af06060aae04479d92fada68820f12/explorer-api/src/Explorer/Web/Api.hs | haskell | | Servant API which provides access to explorer
This one needs to be last in the list because it does not start with
as static string.
| Helper Proxy | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Explorer.Web.Api
( ExplorerApi
, explorerApi
) where
import Data.Proxy (Proxy (..))
import Explorer.Web.Api.HttpBridge (HttpBridgeApi)
import Explorer.Web.Api.Legacy (ExplorerApiRecord)
import Servant.API ((:... |
67949929dd72381b7e239574e7cc91f5389386d6c4ede7b5f4c5c7111ce4708f | fulcrologic/semantic-ui-wrapper | ui_tab.cljc | (ns com.fulcrologic.semantic-ui.modules.tab.ui-tab
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$Tab" :as Tab])))
(def ui-tab
"A Tab is a hidden section of content activated by a Menu.
Props:
- activeIndex (number|string): Index of the currently active ... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/modules/tab/ui_tab.cljc | clojure | (ns com.fulcrologic.semantic-ui.modules.tab.ui-tab
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$Tab" :as Tab])))
(def ui-tab
"A Tab is a hidden section of content activated by a Menu.
Props:
- activeIndex (number|string): Index of the currently active ... | |
023b9c1ec96100704349ad21f095eab1fe3fa4dcab97ca4eef8e4d927b6b9a00 | spectrum-finance/cardano-dex-contracts | PValidators.hs | module ErgoDex.PValidators (
poolValidator,
swapValidator,
depositValidator,
redeemValidator,
validatorAddress,
wrapValidator,
) where
import PlutusLedgerApi.V1.Scripts (Validator (getValidator))
import PlutusLedgerApi.V1.Address
import qualified ErgoDex.PContracts.PDeposit as PD
import qualif... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-contracts/6d424fd6eb1a088d62a45a10153ba69abe3ce0b3/cardano-dex-contracts-onchain/ErgoDex/PValidators.hs | haskell | > rdmr :--> PScriptContext :--> PBool) ->
> PData :--> PScriptContext :--> POpaque) | module ErgoDex.PValidators (
poolValidator,
swapValidator,
depositValidator,
redeemValidator,
validatorAddress,
wrapValidator,
) where
import PlutusLedgerApi.V1.Scripts (Validator (getValidator))
import PlutusLedgerApi.V1.Address
import qualified ErgoDex.PContracts.PDeposit as PD
import qualif... |
4c215154a10531c7221f4af994b9551fa459fa45d71f92713745378f1bf85e12 | SahilKang/cl-avro | fixed.lisp | Copyright 2021 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro 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.
;... | null | https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/complex/fixed.lisp | lisp |
This file is part of cl-avro.
cl-avro is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-avro 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 t... | Copyright 2021 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:cl-avro/test/fixed
(:use #:cl #:1am)
(:lo... |
208553d584c0ed99b3bbe73c035c4daf8e90f0e301491aeb10967dc25b3f4f3b | cardmagic/lucash | rw.scm | ;;; Basic read and write
Copyright ( c ) 1993 by .
;;; Note: read ops should check to see if their string args are mutable.
(define (bogus-substring-spec? s start end)
(or (< start 0)
(< (string-length s) end)
(< end start)))
;;; Best-effort/forward-progress reading
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/rw.scm | scheme | Basic read and write
Note: read ops should check to see if their string args are mutable.
Best-effort/forward-progress reading
READ-BLOCK doesn't allow us to specify a
maximum number of characters to read/partial
but fills the buffer at most to the end.
Therefore we allocate a new buffer here:
Persistent read... | Copyright ( c ) 1993 by .
(define (bogus-substring-spec? s start end)
(or (< start 0)
(< (string-length s) end)
(< end start)))
(define (read-string!/partial s . args)
(let-optionals args ((fd/port (current-input-port))
(start 0)
(end (string-length s)))
(if (bogus-s... |
504100b5195c7e0c434f983ff6b200c8fdfdd9ea98dd9c4565bbd07a5bf9d8c5 | hexlet-codebattle/battle_asserts | move_zeros.clj | (ns battle-asserts.issues.move-zeros
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Moves all 0's to the end the array while maintaining
the relative order of the non-zero elements."
:ru "Переместите все 0 в конец массива сохраня... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/93c66170e54a189e38f5b10a9f1b01d364791df0/src/battle_asserts/issues/move_zeros.clj | clojure | (ns battle-asserts.issues.move-zeros
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Moves all 0's to the end the array while maintaining
the relative order of the non-zero elements."
:ru "Переместите все 0 в конец массива сохраня... | |
ea767665140e28bb11134e65d9755c709f33eb3cca43f37b696ccb831fd87829 | xapix-io/axel-f | reference_test.cljc | (ns axel-f.reference-test
(:require [axel-f.excel :as af]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest list-refs
(t/is (= '(1 2 3)
((af/compile "_.[*]") [1 2 3])))
(t/is (= 2
((af/compile "_.[1 + 0]") [1 2 3])))
(t/is... | null | https://raw.githubusercontent.com/xapix-io/axel-f/03233464af6d0963989e95f75a1859f5edff75bd/test/axel_f/reference_test.cljc | clojure | (ns axel-f.reference-test
(:require [axel-f.excel :as af]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest list-refs
(t/is (= '(1 2 3)
((af/compile "_.[*]") [1 2 3])))
(t/is (= 2
((af/compile "_.[1 + 0]") [1 2 3])))
(t/is... | |
eac70b9343b3c8898a47bdece0dbf90d6f2db1397dd00c4fe9e1b7f0a6134b35 | AdaCore/why3 | recompat.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/util/recompat.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
#13 "src/util/recompat.ml"
module Str = Str
|
d3d351fbe92cef6e77cf26c264727f8a6dd23488650e4c56340b39a2ed17d3f1 | kingcons/advent-of-code | day10.lisp | (mgl-pax:define-package :aoc.2022.10
(:nicknames :2022.10)
(:use :cl :mgl-pax :aoc.util :aoc.parsers :esrap)
(:import-from :alexandria
#:flatten
#:make-keyword)
(:import-from :serapeum
#:~>>
#:batches
#:concat
#:part... | null | https://raw.githubusercontent.com/kingcons/advent-of-code/ffd6569ce4dfaf80e7b29a6521202c07cb58a58d/src/2022/day10.lisp | lisp | (mgl-pax:define-package :aoc.2022.10
(:nicknames :2022.10)
(:use :cl :mgl-pax :aoc.util :aoc.parsers :esrap)
(:import-from :alexandria
#:flatten
#:make-keyword)
(:import-from :serapeum
#:~>>
#:batches
#:concat
#:part... | |
1596b4be9ebeb2b00e16c54d14642a77027e83f55ffc52f302a4e04d6033e88b | skanev/playground | 13-tests.scm | (require rackunit rackunit/text-ui)
(load "../13.scm")
(define (run exp)
(evaluate exp (setup-environment)))
(define sicp-4.13-tests
(test-suite
"Tests for SICP exercise 4.13"
(check-exn (regexp "Unbound variable x")
(lambda () (run '(begin (define x 10)
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/tests/13-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../13.scm")
(define (run exp)
(evaluate exp (setup-environment)))
(define sicp-4.13-tests
(test-suite
"Tests for SICP exercise 4.13"
(check-exn (regexp "Unbound variable x")
(lambda () (run '(begin (define x 10)
... | |
d5e39d692e17d1b9210af7d6d9840399759984b36e8e8411591535486e0a5bc0 | ocaml/obi | obi.mli | Copyright ( c ) 2018 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 " AS IS... | null | https://raw.githubusercontent.com/ocaml/obi/68a93c27a2076dfa0e1634a4da16826ddc47455d/src/lib/obi.mli | ocaml | * Data structures for accessing results of opam2 package build results
* [result] represents the exit result of an [opam] invocation. The raw exit
codes are parsed to look for special opam exit codes, which indicate
errors such as the internal solver failing to find a result.
* [pp_result ppf result] will... | Copyright ( c ) 2018 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 " AS IS... |
b9197a1bacab896eff346ee8dc83b71e806dfa6eb46562204317d33c5dac9b99 | monadbobo/ocaml-core | pa_type_conv.mli | (** Pa_type_conv: Preprocessing Module for Registering Type Conversions *)
open Camlp4.PreCast.Ast
* { 6 Generator registration }
val set_conv_path_if_not_set : Loc.t -> unit
(** [set_conv_path_if_not_set loc] sets the path to the file/module being
converted for improved error messages. *)
val get_conv_path : u... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/type_conv/lib/pa_type_conv.mli | ocaml | * Pa_type_conv: Preprocessing Module for Registering Type Conversions
* [set_conv_path_if_not_set loc] sets the path to the file/module being
converted for improved error messages.
* [get_conv_path ()] @return the name to module containing a type
as required for error messages.
* [add_generator ?is_exn name ... |
open Camlp4.PreCast.Ast
* { 6 Generator registration }
val set_conv_path_if_not_set : Loc.t -> unit
val get_conv_path : unit -> string
val add_generator : ?is_exn : bool -> string -> (ctyp -> str_item) -> unit
val add_generator_with_arg :
?is_exn : bool -> string -> 'a Camlp4.PreCast.Gram.Entry.t ->
('a optio... |
1bf3647f9c80f602c1d67c1e2eacd242e7b450fa080825000ef4ef9c78c38500 | daveliepmann/vdquil | figure5-8.clj | , Chapter 5 , figure 5 - 8
;; Sample ranking with date selector bar
Converted from Processing to Clojure as an exercise by
TODO use salary as a tiebreaker for rankings ( p127 )
TODO need a clojure / quil version of Interpolator to smoothly animate transitions
---- > two lerps per line for all lines , ... | null | https://raw.githubusercontent.com/daveliepmann/vdquil/f40788ff7634870a9a5f1dc4ca3df8543beaf00b/src/vdquil/chapter5/figure5-8.clj | clojure | Sample ranking with date selector bar
TODO It would make more sense to me if the stroke-weight
was proportional to the difference between salary and
ranking, rather than acting merely as another display of
salary ranking.
left arrow
right arrow | , Chapter 5 , figure 5 - 8
Converted from Processing to Clojure as an exercise by
TODO use salary as a tiebreaker for rankings ( p127 )
TODO need a clojure / quil version of Interpolator to smoothly animate transitions
---- > two lerps per line for all lines , x and y , loop through for some # of fram... |
b638a596768b0550d333d69d6ef807c2eb54d6c0ee4f393e2ed5a2ef5df44832 | iokasimov/pandora | Interface.hs | module Pandora.Paradigm.Structure.Interface (module Exports) where
import Pandora.Paradigm.Structure.Interface.Zipper as Exports
import Pandora.Paradigm.Structure.Interface.Stack as Exports
import Pandora.Paradigm.Structure.Interface.Dictionary as Exports
import Pandora.Paradigm.Structure.Interface.Set as Exports
| null | https://raw.githubusercontent.com/iokasimov/pandora/d8f47af0821f551515d51d62d2f8824e0719396f/Pandora/Paradigm/Structure/Interface.hs | haskell | module Pandora.Paradigm.Structure.Interface (module Exports) where
import Pandora.Paradigm.Structure.Interface.Zipper as Exports
import Pandora.Paradigm.Structure.Interface.Stack as Exports
import Pandora.Paradigm.Structure.Interface.Dictionary as Exports
import Pandora.Paradigm.Structure.Interface.Set as Exports
| |
7a31763538c383fd15862670a9d8247f63f99c71701c844ba53fe72e69807eaa | nandor/llir-ocaml | interval.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/nandor/llir-ocaml/9c019f15c444e30c825b1673cbe827e0497868fe/asmcomp/interval.ml | ocaml | ************************************************************************
OCaml
... | , University of Siegen
, University of Siegen
Copyright 2011 Compilerbau und Softwareanalyse ,
Universität Siegen .
the GNU Lesser General Public License version 2.1 , with t... |
c9597ebc933c7a0fc159bd20f876687cf54ea503205671597931226b117cdf97 | aryx/lfs | Fuse.ml |
This file is part of the " OCamlFuse " library .
OCamlFuse 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 ( version 2 of the License ) .
OCamlFuse is distributed in the hope that it will b... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/ocamlfuse/Fuse.ml | ocaml | Untested |
This file is part of the " OCamlFuse " library .
OCamlFuse 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 ( version 2 of the License ) .
OCamlFuse is distributed in the hope that it will b... |
4648a8442d3bc37ed7a6e982500a3d2f3b11d4542996871067f248c6dfad384c | ghc/nofib | Rsa.hs | module Rsa (encrypt, decrypt, makeKeys)
where
encrypt, decrypt :: Integer -> Integer -> String -> String
encrypt n e = unlines . map (show . power e n . code) . collect (size n)
decrypt n d = concat . map (decode . power d n . read) . lines
------ Converting between Strings and Integers -----------
code :: String ... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/rsa/Rsa.hs | haskell | ---- Converting between Strings and Integers -----------
log_128 10 = 0.4745
----- Constructing keys -------------------------
----- Fast exponentiation, mod m ----------------- | module Rsa (encrypt, decrypt, makeKeys)
where
encrypt, decrypt :: Integer -> Integer -> String -> String
encrypt n e = unlines . map (show . power e n . code) . collect (size n)
decrypt n d = concat . map (decode . power d n . read) . lines
code :: String -> Integer
code = foldl accum 0
where accum x y = (128 * ... |
42bd3a0ab66fac08c4101dbdf527f3f132fa535440c3076220600d1e4aa0b33a | redplanetlabs/specter | transients.cljc | (ns com.rpl.specter.transients
#?(:cljs
(:require-macros [com.rpl.specter
:refer
[defnav]]))
(:use #?(:clj
[com.rpl.specter :only
[defnav]]))
(:require [com.rpl.specter.navs :as n]
[com.rpl.specter :refer [subselect selected?]])... | null | https://raw.githubusercontent.com/redplanetlabs/specter/e8225f0e5883746c2fd17612c42334ccda6cc73d/src/clj/com/rpl/specter/transients.cljc | clojure | (ns com.rpl.specter.transients
#?(:cljs
(:require-macros [com.rpl.specter
:refer
[defnav]]))
(:use #?(:clj
[com.rpl.specter :only
[defnav]]))
(:require [com.rpl.specter.navs :as n]
[com.rpl.specter :refer [subselect selected?]])... | |
4f5b2d5232825313f7c26d7cc4a1146055854764171a7d0b5f556ae2be1fd47c | jeromesimeon/Galax | regexp.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/fsa/regexp.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : regexp.ml , v 1.10 2007/02/01 22:08:46 simeon Exp $
Module Regexp
Description :
This module implements basic regular expressions over an alphabet
of letters , and the construction for both NFA 's and
DFA '... |
239a09965d5a9002686b81857b6d0925d95e0d60a1f9d927c4a0f4ac37578129 | flipstone/haskell-for-beginners | 2_a_few_more_recursive_functions.hs | -- Define a function to remove all the elements of
one list from another . Given the lists [ 1,2,3 ]
and [ 5,6,1,7,2,8 ] it should return [ 5,6,7,8 ]
Define a function to perform the union of two
lists . Any elements from the second list that
are already in the first should not be duplicated
-- Given the li... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_05/2_a_few_more_recursive_functions.hs | haskell | Define a function to remove all the elements of
Given the lists [1,2,3]
zips them into triples, stopping at the end of the
shortest list.
Define a function to count the occurrences of
a given element in a list
(Hint: you may need a helper function to do the recursion) | one list from another . Given the lists [ 1,2,3 ]
and [ 5,6,1,7,2,8 ] it should return [ 5,6,7,8 ]
Define a function to perform the union of two
lists . Any elements from the second list that
are already in the first should not be duplicated
and [ 5,6,1,7,2,8,5 ] it should return [ 1,2,3,5,6,7,8 ]
Def... |
53413a638f7bc12830852b16bccc4265f4d2c8695d859c06cc60e9b33db3d0e9 | anlun/OperationalSemanticsC11 | rcuTests.rkt | #lang at-exp racket
(require redex/reduction-semantics)
;; (require redex)
(require "../core/syntax.rkt")
(require "../core/coreLang.rkt")
(require "../core/coreUtils.rkt")
(require "../core/parser.rkt")
(require "../core/pp.rkt")
(require "../steps/relAcqNaRlxPost.rkt")
(define term_RCU
@prog{cw_na := 0;
... | null | https://raw.githubusercontent.com/anlun/OperationalSemanticsC11/1196f3650ed3fc4f5eada5db4e086665e609b6ae/test/rcuTests.rkt | racket | (require redex)
;; r1 -> lhead
; r2 - > the second element
; r3 - > the third element
Starting working with the list.
Traversing the list.
Starting working with the list.
Traversing the list.
Starting working with the lis... | #lang at-exp racket
(require redex/reduction-semantics)
(require "../core/syntax.rkt")
(require "../core/coreLang.rkt")
(require "../core/coreUtils.rkt")
(require "../core/parser.rkt")
(require "../core/pp.rkt")
(require "../steps/relAcqNaRlxPost.rkt")
(define term_RCU
spw
Adds to list the first value ( 1 ) ... |
9985a869b59e041047e729f87c3864d19ed45d1a0fabe573d0f8afd60da15016 | aantron/luv | version.mli | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Version information for the vendored libuv .
See { { : } { i Version - checking
macros and functions } } in .
Luv currently vendors libuv
{ { : } 1.30.1... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/version.mli | ocaml | * libuv major version number. See
{{:#c.UV_VERSION_MAJOR}
[UV_VERSION_MAJOR]}.
* libuv minor version number. See
{{:#c.UV_VERSION_MINOR}
[UV_VERSION_MINOR]}.
* libuv patch number. See
{{:#c.UV_VERSION_PATCH}
[UV_VERSION_PATCH]}.
* libuv version suffix for development releases. See
{{:#c.U... | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Version information for the vendored libuv .
See { { : } { i Version - checking
macros and functions } } in .
Luv currently vendors libuv
{ { : } 1.30.1... |
63d17fcbbb1efc30b7467d3c9b2e0ae10f09345809007513ae48aaaedb8bd208 | ghc/testsuite | tcfail040.hs | -- !!! instances of functions
--
module ShouldFail where
data NUM = ONE | TWO
class EQ a where
(===) :: a -> a -> Bool
class ORD a where
(<<) :: a -> a -> Bool
a << b = True
instance EQ (a -> b) where
f === g = True
instance ORD (a -> b)
f = (<<) === (<<)
f : : ( EQ a , a ) = > a - > a - > Bool
instance ... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail040.hs | haskell | !!! instances of functions
a /= b = False
a /= b = False
a /= b = False
a /= b = False | module ShouldFail where
data NUM = ONE | TWO
class EQ a where
(===) :: a -> a -> Bool
class ORD a where
(<<) :: a -> a -> Bool
a << b = True
instance EQ (a -> b) where
f === g = True
instance ORD (a -> b)
f = (<<) === (<<)
f : : ( EQ a , a ) = > a - > a - > Bool
instance where
a = = = b = True
in... |
812eac1a792f2bf6030d6006b28994f195f087031d778c8d1d8c644bf4e8e948 | oakes/clojure-conj-2014 | 24-play-clj-docs.clj | (defscreen play-clj-docs-screen
:on-show
(fn [screen entities]
(update! screen :renderer (stage) :camera (orthographic))
(let [ui-skin (skin "skin/uiskin.json")
small-font (skin! ui-skin :get-font "small-font")
small-style (style :label small-font (color :black))]
(table [(image "i... | null | https://raw.githubusercontent.com/oakes/clojure-conj-2014/575e8eeced02d761f8d278b95906083f03ba9565/24-play-clj-docs.clj | clojure | (defscreen play-clj-docs-screen
:on-show
(fn [screen entities]
(update! screen :renderer (stage) :camera (orthographic))
(let [ui-skin (skin "skin/uiskin.json")
small-font (skin! ui-skin :get-font "small-font")
small-style (style :label small-font (color :black))]
(table [(image "i... | |
8195c110794618bcc887a9690600b86f5faed947f274d4b400e385b3d5a14a5d | clojure-interop/aws-api | project.clj | (defproject clojure-interop/com.amazonaws.services.neptune "1.0.0"
:description "Clojure to Java Interop Bindings for com.amazonaws.services.neptune"
:url "-interop/aws-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-paths ["src... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.neptune/project.clj | clojure | (defproject clojure-interop/com.amazonaws.services.neptune "1.0.0"
:description "Clojure to Java Interop Bindings for com.amazonaws.services.neptune"
:url "-interop/aws-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-paths ["src... | |
1ef35ee4dc208ce1fa43cbed5039abaca6e29edae68509893ecde8799e0a9647 | tnelson/Forge | soundBreakTests3.rkt | #lang forge
sig A { ab: B }
sig B { ba: A }
fact ab: bij
fact ba: bij
run {} for exactly 2 A, exactly 2 B
| null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/soundBreakTests3.rkt | racket | #lang forge
sig A { ab: B }
sig B { ba: A }
fact ab: bij
fact ba: bij
run {} for exactly 2 A, exactly 2 B
| |
3f5cda5da9d780cdfd6ed68ccf3789b10e3a70a3a24b025fc3bf0bcac3e9fd82 | Jarzka/stylefy | ssr_test.clj | (ns stylefy.tests.ssr-test
(:require [clojure.test :refer :all]
[hiccup.core :refer :all]
[garden.color :as gc]
[garden.units :as gu]
[garden.stylesheet :refer [at-media]]
[stylefy.core :as stylefy :refer [use-style]]
[clojure.string :as str])
... | null | https://raw.githubusercontent.com/Jarzka/stylefy/c4c3a9b1d230605e2d08a769d83d632e696d84a0/test/stylefy/tests/ssr_test.clj | clojure | Make CSS Grid responsive
HTML
Query
HTML document is rendered
Font-faces are rendered
Tags selectors are rendered
Transitions are rendered
Styles are rendered
Garden units are rendered
Placeholder is NOT rendered
Base style is rendered
Modes are rendered
Media query is rendered
Feature query is rendered
... | (ns stylefy.tests.ssr-test
(:require [clojure.test :refer :all]
[hiccup.core :refer :all]
[garden.color :as gc]
[garden.units :as gu]
[garden.stylesheet :refer [at-media]]
[stylefy.core :as stylefy :refer [use-style]]
[clojure.string :as str])
... |
b29e3c6fd36a8af147c6b5877c73d5d58dc5561a726ac8d7fe1d74a0a9cc847c | tjammer/raylib-ocaml | core_2d_camera_platformer.ml | (* Data structures *)
type player_t = { position : Raylib.Vector2.t; speed : float; can_jump : bool }
type env_item_t = {
box : Raylib.Rectangle.t;
blocking : bool;
color : Raylib.Color.t;
}
type camera_mode_t =
| Center
| CenterInsideMap
| SmoothFollow
| EvenOutOnLanding of bool * float
| PlayerBound... | null | https://raw.githubusercontent.com/tjammer/raylib-ocaml/76955c30d0a776138daeb93bfc73b104aefc6f6d/examples/core/core_2d_camera_platformer.ml | ocaml | Data structures
Constants
Helpers
Game functions
I am not too happy about this trick
if we overshoot we adjust and stop
else we keep moving the camera
Draw environment
Draw player | type player_t = { position : Raylib.Vector2.t; speed : float; can_jump : bool }
type env_item_t = {
box : Raylib.Rectangle.t;
blocking : bool;
color : Raylib.Color.t;
}
type camera_mode_t =
| Center
| CenterInsideMap
| SmoothFollow
| EvenOutOnLanding of bool * float
| PlayerBoundsPush
type state_t = ... |
9989cadd396e7326209a4df4afee440344915a6a01e81276625203c413755296 | rowangithub/DOrder | 280_ken-imp.ml | let rec loop x y (i:int) (j:int) =
if (x <> 0) then
loop (x-1) (y-1) i j
else if (i = j) then assert (y = 0)
else ()
let main i j =
let x = i in
let y = j in
if (x >= 0) then loop x y i j else () | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/280_ken-imp.ml | ocaml | let rec loop x y (i:int) (j:int) =
if (x <> 0) then
loop (x-1) (y-1) i j
else if (i = j) then assert (y = 0)
else ()
let main i j =
let x = i in
let y = j in
if (x >= 0) then loop x y i j else () | |
94f97c2737844bd28f6d5817de3977eb419b15facb8ea8f2d9d793334c5252bb | ryszard/Cl-Couch | document.lisp | (in-package :cl-couchdb-object-layer)
(export '(@ doc aget id-of rev-of get-doc-from-id make-doc save-doc))
(defun make-alist ()
'((nil)))
(defclass* doc ()
((attributes (make-alist) :documentation "Alist taken from couchdb")
(original-db nil))
(:documentation "A thin objectish wrapper over an alist returne... | null | https://raw.githubusercontent.com/ryszard/Cl-Couch/de6900e38395dac3ddce53876b05d5e24c8d8f52/object-layer/document.lisp | lisp | This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute i... | (in-package :cl-couchdb-object-layer)
(export '(@ doc aget id-of rev-of get-doc-from-id make-doc save-doc))
(defun make-alist ()
'((nil)))
(defclass* doc ()
((attributes (make-alist) :documentation "Alist taken from couchdb")
(original-db nil))
(:documentation "A thin objectish wrapper over an alist returne... |
a243172a320eb09540c068a35a90f09e61a95afe473644e1e7a075aba09892b4 | samply/blaze | util.clj | (ns blaze.fhir.operation.evaluate-measure.measure.util
(:require
[blaze.anomaly :as ba]
[blaze.db.impl.index.resource-handle :as rh]
[blaze.fhir.spec.type :as type]))
(defn expression [population-path-fn criteria]
(let [language (-> criteria :language type/value)
expression (-> criteria :expre... | null | https://raw.githubusercontent.com/samply/blaze/867d3e17ec8148f055324a1ab526d3727b41715b/modules/operation-measure-evaluate-measure/src/blaze/fhir/operation/evaluate_measure/measure/util.clj | clojure | (ns blaze.fhir.operation.evaluate-measure.measure.util
(:require
[blaze.anomaly :as ba]
[blaze.db.impl.index.resource-handle :as rh]
[blaze.fhir.spec.type :as type]))
(defn expression [population-path-fn criteria]
(let [language (-> criteria :language type/value)
expression (-> criteria :expre... | |
ee4f9b0782eeb4751c74d8de0e7facda4507020899ff089efd62f2d6a7c47dcd | processone/ejabberd | ejabberd_mnesia.erl | %%%----------------------------------------------------------------------
%%% File : mnesia_mnesia.erl
Author :
%%% Purpose : Handle configurable mnesia schema
Created : 17 Nov 2016 by
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redist... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_mnesia.erl | erlang | ----------------------------------------------------------------------
File : mnesia_mnesia.erl
Purpose : Handle configurable mnesia schema
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 us... | Author :
Created : 17 Nov 2016 by
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
with... |
c7c5b653c6ead4dee99092fc6dfc1af84e67bec5e4fd94eaf755d2e9a8e91976 | technomancy/leiningen | project.clj | (defproject project-with-resources "0.5.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.3.0"]
[janino "2.5.15"]]
:resource-paths ["resources"])
| null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/with-resources/project.clj | clojure | (defproject project-with-resources "0.5.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.3.0"]
[janino "2.5.15"]]
:resource-paths ["resources"])
| |
83f59ab8df5f929485070d03d80bea05c3bc330c3dca8597f28072158b4fc9ba | Shirakumo/kandria | module-v0.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass module-v0 (version) ())
(defclass module-v1 (version) ())
(defmethod supported-p ((_ module-v0)) T)
(defvar *module-class-name*)
(defvar *module-root* NIL)
(defun register-worlds (module)
(flet ((register (file)
(with-simple-restart (continue "Ignore ... | null | https://raw.githubusercontent.com/Shirakumo/kandria/91f9a425ab4311a0a7a258399c2018ddf114ea94/versions/module-v0.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass module-v0 (version) ())
(defclass module-v1 (version) ())
(defmethod supported-p ((_ module-v0)) T)
(defvar *module-class-name*)
(defvar *module-root* NIL)
(defun register-worlds (module)
(flet ((register (file)
(with-simple-restart (continue "Ignore ... | |
773996d2edf6e9df781ea9c213b96dabc48ea673a901cf01e73e99a6df8d000c | schwering/golog | ElevatorReactive.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving #
| A reactive Golog interpreter .
--
-- It reads exogenous actions from the standard input device. You may execute
the program and type one of " Smoke " , " TurnOn N " for some integer N between 1
and 10 , " Heat " or " Cold " to trigg... | null | https://raw.githubusercontent.com/schwering/golog/e5a0dba9598d616762271b5bef9fd51a53c1f829/golog-examples/elevator-reactive/ElevatorReactive.hs | haskell |
It reads exogenous actions from the standard input device. You may execute
enter, no exogenous action is executed.
The elevator reacts to smoke by giving the alarm, to heat and cold by turning
on/off the fan, and to turned on call-buttons by serving the floor.
Also see 'ElevatorBasic' for a simpler example with... | # LANGUAGE TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving #
| A reactive Golog interpreter .
the program and type one of " Smoke " , " TurnOn N " for some integer N between 1
and 10 , " Heat " or " Cold " to trigger respective events . If you just press
Very similar examples appear in a ConG... |
6df2b4ab069e1913a98bf048554ee2fd8ce16405ade999b1ec0283d73955cae1 | exoscale/clojure-kubernetes-client | v2beta1_external_metric_source.clj | (ns clojure-kubernetes-client.specs.v2beta1-external-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
)
(:import (java.io File)))
(declare v2beta1-external-metric-source-data v2beta1... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v2beta1_external_metric_source.clj | clojure | (ns clojure-kubernetes-client.specs.v2beta1-external-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
)
(:import (java.io File)))
(declare v2beta1-external-metric-source-data v2beta1... | |
50f6314c6887780cd3d0c03f127f8bc95b5639738fabda7f95c6edcd4564d844 | AndrasKovacs/elaboration-zoo | Evaluation.hs |
module Evaluation (($$), quote, eval, nf, force, lvl2Ix, vApp, vAppSp, vAppPruning) where
import Common
import Metacontext
import Syntax
import Value
import Cxt.Type
infixl 8 $$
($$) :: Dbg => Closure -> Val -> Val
($$) (Closure env t) ~u = eval (env :> u) t
vApp :: Val -> Val -> Icit -> Val
vApp t ~u i = case t of... | null | https://raw.githubusercontent.com/AndrasKovacs/elaboration-zoo/4686b2538477e19b439906abc8a1f7b6eceebda5/06-first-class-poly/Evaluation.hs | haskell | over. |
module Evaluation (($$), quote, eval, nf, force, lvl2Ix, vApp, vAppSp, vAppPruning) where
import Common
import Metacontext
import Syntax
import Value
import Cxt.Type
infixl 8 $$
($$) :: Dbg => Closure -> Val -> Val
($$) (Closure env t) ~u = eval (env :> u) t
vApp :: Val -> Val -> Icit -> Val
vApp t ~u i = case t of... |
fc1bc89fe029f7c0161c1a2b65141fecafe08bbc3a8e7ffc83a19457322686ff | bhuztez/shu | integer_tests.erl | -module(integer_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
integer_test_() ->
Symbols =
lists:foldl(
fun shu_symbols:add/2,
shu_symbols:new(),
[{file, "INTEGER.SYMBOLS"},
{file, "SYMBOLS"}]),
Rules =
lists:foldl(
fun shu_r... | null | https://raw.githubusercontent.com/bhuztez/shu/98125ae20b88d343cf3ef21e8956854f34a1aa14/test/shu_SUITE_data/integer_tests.erl | erlang | -module(integer_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
integer_test_() ->
Symbols =
lists:foldl(
fun shu_symbols:add/2,
shu_symbols:new(),
[{file, "INTEGER.SYMBOLS"},
{file, "SYMBOLS"}]),
Rules =
lists:foldl(
fun shu_r... | |
712c36f72078bb21614a11158855b8a370ac22e6d13cd1ecce29c4b74a80f35f | cedlemo/OCaml-GI-ctypes-bindings-generator | Container_accessible_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Container_accessible_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Container_accessible_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Container_accessible_private"
| |
c3ad88a6f19ddcc7ee95f9ff4f1451afd4298bf77f3954456e8661da7d3c5757 | google/hrepl | ExecutionRootTest.hs | {-# LANGUAGE OverloadedStrings #-}
module Main
( main,
)
where
import Test.Framework (defaultMain)
import RuleInfo.ExecutionRoot (fixFilePathFlags, fakeExecutionRoot)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit ((@?=))
main :: IO ()
main =
defaultMain
[ testCase "fixFilePathFlags" $ ... | null | https://raw.githubusercontent.com/google/hrepl/2648a55cc38407c5b60a3a086217e2d827ca6cb6/rule_info/RuleInfo/ExecutionRootTest.hs | haskell | # LANGUAGE OverloadedStrings #
not prefixed with -optP; should not be modified |
module Main
( main,
)
where
import Test.Framework (defaultMain)
import RuleInfo.ExecutionRoot (fixFilePathFlags, fakeExecutionRoot)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit ((@?=))
main :: IO ()
main =
defaultMain
[ testCase "fixFilePathFlags" $ do
let flags =
... |
c4b09234d6a0987a4c45d8c89bd2b065eafc1f78ca50bf5e966a89f503c14102 | fogfish/typhoon | aura.erl | %%
%% Copyright 2015 Zalando SE
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/aura/src/aura.erl | erlang |
Copyright 2015 Zalando SE
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 Licens... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(aura).
-export([start/0]).
-export([
fd/0
,adapter/0
,send/3
,clue/1
,stream/2
,lookup/1
]).
-define(PORT, 20100).
RnD node start
start() ->
ap... |
19708b17aec1e73dbe64b0247092f67ca33fe4088bc950b34c140ba525e5418c | davelambert/porky | testing.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
;;;; testing.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file except i... | null | https://raw.githubusercontent.com/davelambert/porky/44a4ff0e791de23f723bfd93072fcef5f8523c8a/src/goodies/testing.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
testing.lisp
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
WARRANTY... |
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved .
Cont... |
166120b67a46395c8ada04c23b892dba23844325136280cd1337f21924b4a1c5 | danmey/ocaml-gui | example.ml | open Widget
open Window
open Draw
open Blocks
let id a = a
let center_rect = Rect.lift4 id
open BatFloat
(* class sphere_view xw yw zw ww = object ( self : 'self ) *)
(* inherit graphics *)
(* method draw rect = *)
(* (\* Gl.disable `scissor_test; *\) *)
Gl.enable ` depth_test ;
(* (\* Gl.dis... | null | https://raw.githubusercontent.com/danmey/ocaml-gui/e446fae0af7e0e07414c7970514e2d02166b4293/example.ml | ocaml | class sphere_view xw yw zw ww = object ( self : 'self )
inherit graphics
method draw rect =
(\* Gl.disable `scissor_test; *\)
(\* Gl.disable `cull_face ; *\)
GlDraw.viewport ~x ~y ~w ~h;
GlMat.mode `projection;
GlMat.push ();
GlMat.load_identity ();
Glu... | open Widget
open Window
open Draw
open Blocks
let id a = a
let center_rect = Rect.lift4 id
open BatFloat
Gl.enable ` depth_test ;
let x , y , w , h = center_rect rect in
( \ * print_endline ( string_of_float ( float w/. float h ) ) ; * \ )
( \ * Gl.enable ` light0 ; * \ )
( \ * ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.