_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 |
|---|---|---|---|---|---|---|---|---|
18a359cfd8ed1843782de3227ee38406cee94e940abcc82b5d08c2ba0de09477 | zhuoyikang/spt_crate | spt_crate_app.erl | -module(spt_crate_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
spt_crate_... | null | https://raw.githubusercontent.com/zhuoyikang/spt_crate/3caa5adccdc9a489e9484ff94f76ca6c8d64d613/src/spt_crate_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(spt_crate_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
spt_crate_sup:start_link().
stop(_State) ->
ok.
|
2eaa03517d0980b7d244a90fbd8e1f379f54205450a4f644fcb369e52ea1146c | fukamachi/cl-dbi | error.lisp | (defpackage #:dbi.error
(:use #:cl
#:dbi.utils)
(:export #:dbi-error
#:dbi-warning
#:dbi-interface-error
#:dbi-unimplemented-error
#:dbi-database-error
#:dbi-data-error
#:dbi-operational-error
#:dbi-integrity-error
#:dbi... | null | https://raw.githubusercontent.com/fukamachi/cl-dbi/7ba050dea8d137c1f85b7e704d4fc945104bf283/src/error.lisp | lisp | (defpackage #:dbi.error
(:use #:cl
#:dbi.utils)
(:export #:dbi-error
#:dbi-warning
#:dbi-interface-error
#:dbi-unimplemented-error
#:dbi-database-error
#:dbi-data-error
#:dbi-operational-error
#:dbi-integrity-error
#:dbi... | |
f273442b3462c0a8ae193be61840461e9ab24b9890cbd0826d16d1a2ebd9437b | cpsc411/cpsc411-pub | v11.rkt | #lang at-exp racket/base
(require
cpsc411/compiler-lib
cpsc411/info-lib
scribble/bettergrammar
racket/contract
(for-label cpsc411/info-lib)
(for-label racket/contract)
(for-label cpsc411/compiler-lib)
(submod "base.rkt" interp)
"redex-gen.rkt"
#;"v10.rkt"
"v9.rkt"
(only-in racket/base [vector? host:vector?... | null | https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-lib/cpsc411/langs/v11.rkt | racket | "v10.rkt"
(define x value)
(define aloc value)
(unsyntax @racketvarfont{'s-expr})
#(value ...) | #lang at-exp racket/base
(require
cpsc411/compiler-lib
cpsc411/info-lib
scribble/bettergrammar
racket/contract
(for-label cpsc411/info-lib)
(for-label racket/contract)
(for-label cpsc411/compiler-lib)
(submod "base.rkt" interp)
"redex-gen.rkt"
"v9.rkt"
(only-in racket/base [vector? host:vector?])
(for-labe... |
ff658d43659629b08fb7514fa96daedb3552cd6ec716b4c32eba6ea97899be14 | philnguyen/soft-contract | foldl1.rkt | #lang racket
(require soft-contract/fake-contract)
(define (foldl1 f xs)
(let ([z (car xs)]
[zs (cdr xs)])
(if (empty? zs) z
(foldl1 f (cons (f z (car zs)) (cdr zs))))))
(provide/contract [foldl1 ((any/c any/c . -> . any/c) (cons/c any/c (listof any/c)) . -> . any/c)])
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sym-exe/foldl1.rkt | racket | #lang racket
(require soft-contract/fake-contract)
(define (foldl1 f xs)
(let ([z (car xs)]
[zs (cdr xs)])
(if (empty? zs) z
(foldl1 f (cons (f z (car zs)) (cdr zs))))))
(provide/contract [foldl1 ((any/c any/c . -> . any/c) (cons/c any/c (listof any/c)) . -> . any/c)])
| |
05a729685ddb6f6c183a71f91f61055ad0497170be04547e8802950069b6dd8c | cmoid/erlbutt | foldl_hacks.erl | SPDX - License - Identifier : GPL-2.0 - only
%%
Copyright ( C ) 2018 Dionne Associates , LLC .
-module(foldl_hacks).
-include("ssb.hrl").
-export([branch_root/1,
reply_root/1]).
branch_root(FeedId) ->
{ok, Pid} = ssb_feed:start_link(FeedId),
Fun = fun(Msg, {N, B, R, RY, NT}) ->
... | null | https://raw.githubusercontent.com/cmoid/erlbutt/eb6a06339a43772d07e57f1c4f84980937822c79/apps/ssb/src/foldl_hacks.erl | erlang | SPDX - License - Identifier : GPL-2.0 - only
Copyright ( C ) 2018 Dionne Associates , LLC .
-module(foldl_hacks).
-include("ssb.hrl").
-export([branch_root/1,
reply_root/1]).
branch_root(FeedId) ->
{ok, Pid} = ssb_feed:start_link(FeedId),
Fun = fun(Msg, {N, B, R, RY, NT}) ->
Roo... | |
591d47f81adf42e64be198d4ee71de365290414d77419969dbb188f5ae0c5dfd | fortytools/holumbus | PrefixSet.hs | {-# OPTIONS -XBangPatterns #-}
-- ----------------------------------------------------------------------------
|
Module : Holumbus . Data . PrefixTree . PrefixSet
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( )
Stability : experimental
Portability : not por... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Data/PrefixTree/PrefixSet.hs | haskell | # OPTIONS -XBangPatterns #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------
| Set of strings implemented as lazy prefix tree.
-------------------------------------------... |
|
Module : Holumbus . Data . PrefixTree . PrefixSet
Copyright : Copyright ( C ) 2010
License : MIT
Maintainer : ( )
Stability : experimental
Portability : not portable
A simplified version of PrefixTree for implementing sets .
There is one important difference to... |
fb70ab9d45a734f6d9e2335386fb864938c09b59e95fdfd007eb58dfab80f1f8 | ninenines/cowboy | default_h.erl | %% This module does not do anything.
-module(default_h).
-export([init/2]).
init(Req, Opts) ->
{ok, Req, Opts}.
| null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/default_h.erl | erlang | This module does not do anything. |
-module(default_h).
-export([init/2]).
init(Req, Opts) ->
{ok, Req, Opts}.
|
85e0286ea0f9b7cc4d68e4f483a2626fad3796eb82cbdb548034db8c1b8a1d53 | dyzsr/ocaml-selectml | t171-envacc.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = 5 in
let y = 2 in
let z = 1 in
let a = 4 in
let b = 3 in
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t171-envacc.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let x = 5 in
let y = 2 in
let z = 1 in
let a = 4 in
let b = 3 in
... | |
3b792b750ee02bf1722c247464ffe5a5afaa07cb52a7571da56c2ed5d36e4a2c | cicakhq/potato | common.lisp | (in-package :potato.common)
(declaim #.potato.common::*compile-decl*)
(defvar *solr-path-location* ":8983/solr/potato")
(defvar *potato-standalone* nil)
(alexandria:define-constant +BLANK-CHARS+ (map 'string #'identity '(#\Space #\Newline #\Return)) :test 'equal)
(potato.common.application:define-component solr
(... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/common/common.lisp | lisp | no period in the user name
ELSE: No period in the user name, simly return the user-id unchanged.
ELSE: Not debug mode, restart the thread after it stops
Some highlighted text was found
There is some unmatched text before the match
ELSE: The match is at the beginning of the string
ELSE: No match, copy the last ... | (in-package :potato.common)
(declaim #.potato.common::*compile-decl*)
(defvar *solr-path-location* ":8983/solr/potato")
(defvar *potato-standalone* nil)
(alexandria:define-constant +BLANK-CHARS+ (map 'string #'identity '(#\Space #\Newline #\Return)) :test 'equal)
(potato.common.application:define-component solr
(... |
cc258c99b087721b7fe868790ea7d52b691fc7e6b98aee9f2fd7d44101c865dd | machine-intelligence/Botworld | PrisonersDilemma.hs | module PrisonersDilemma where
import Botworld
import Botworld.Display
import Data.Map (Map, fromList)
cpu :: Processor
cpu = P 1048576
leftItem :: Item
leftItem = Cargo 0 1
rightItem :: Item
rightItem = Cargo 1 1
leftsValues :: Item -> Int
leftsValues item
| item == leftItem = 1
| item == rightItem = 3
| othe... | null | https://raw.githubusercontent.com/machine-intelligence/Botworld/f789cba55c49092fd0d0d24f0faad52a029e6eed/games/PrisonersDilemma.hs | haskell | module PrisonersDilemma where
import Botworld
import Botworld.Display
import Data.Map (Map, fromList)
cpu :: Processor
cpu = P 1048576
leftItem :: Item
leftItem = Cargo 0 1
rightItem :: Item
rightItem = Cargo 1 1
leftsValues :: Item -> Int
leftsValues item
| item == leftItem = 1
| item == rightItem = 3
| othe... | |
e7cd3cc2c766ebcc11fed0370f07217e2e116ac4b61a1e4e7ac2a4ce9bd47fab | ailisp/mcclim-graphic-forms | package.lisp | (in-package :common-lisp-user)
(defpackage :clim-graphic-forms
(:nicknames :clim-gf)
(:use :clim :clim-lisp :clim-backend)
(:import-from :clim-standard
:standard-full-mirrored-sheet-mixin
:sheet-mirror-region
:standard-graft
:standard-event-port-mixin
:standard-port
:pointer-grab-sheet))
| null | https://raw.githubusercontent.com/ailisp/mcclim-graphic-forms/a81cc6ad95a3ce07a41d3fe72e1f2d5369e45149/package.lisp | lisp | (in-package :common-lisp-user)
(defpackage :clim-graphic-forms
(:nicknames :clim-gf)
(:use :clim :clim-lisp :clim-backend)
(:import-from :clim-standard
:standard-full-mirrored-sheet-mixin
:sheet-mirror-region
:standard-graft
:standard-event-port-mixin
:standard-port
:pointer-grab-sheet))
| |
9a8b13eaa2eebd47bb2cb2f48f7ab505532953db97f94a6d419b41f81784fc58 | acieroid/scala-am | icp_3_leval_ex_5.scm | (define lazy? (<change> #f (lambda (v) (tagged-list? v 'lazy)))) ; <====================================================
(define memo? (<change> #f (lambda (v) (tagged-list? v 'lazy-memo)))) ; <===============================================
(define tagged-declaration? (<change> #f pair?)) ; <==========================... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changes/scheme/icp_3_leval_ex_5.scm | scheme | <====================================================
<===============================================
<====================================================================
<==========================
<===========================================================================
<===================================... |
(define true #t)
(define false #f)
(define delay-it
(lambda (exp env) (list 'thunk exp env))
(lambda (decl exp env)
(cond ((not (tagged-declaration? decl))
tag : ' ' applicative - order evaluatie
(eval exp env))
((lazy? decl)
(list 'thunk exp env))
(... |
2d54fcf95f2b1a20d0c4966da907b141d3cf5ad69328cacb3e0e3baf2e2c20b6 | gsakkas/rite | 0093.ml | TupleG [LitG,VarG]
(0 , acc)
(e , 0.0 , 0.0)
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0093.ml | ocaml | TupleG [LitG,VarG]
(0 , acc)
(e , 0.0 , 0.0)
| |
2aa77e7f916a8601bab28fd0d797a4bed429a1df7bcab65bbb22a360c21bc87d | ocurrent/opam-repo-ci | common.mli | val status_sep : char
(** Hierarchical statuses separator *)
| null | https://raw.githubusercontent.com/ocurrent/opam-repo-ci/58cd38ddcf8bb24db5c2a7d8c233770e3e1e08cf/api/common.mli | ocaml | * Hierarchical statuses separator | val status_sep : char
|
ac5db3a13b1e6038f4dc0df5942773805c451dc319fe9cf9bdab337a66e9b200 | mongodb-haskell/mongodb | Query.hs | -- | Query and update documents
# LANGUAGE OverloadedStrings , RecordWildCards , NamedFieldPuns , TupleSections , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , TypeFamilies , CPP , DeriveDataTypeable , ScopedTypeVariables , BangPatterns #
module Database.MongoDB.Query (
-- ... | null | https://raw.githubusercontent.com/mongodb-haskell/mongodb/fb0d140aa4180cd3b6c76c3f7eff26abc2e250e4/Database/MongoDB/Query.hs | haskell | | Query and update documents
* Monad
* Database
** Authentication
* Collection
** Selection
* Write
** Insert
** Update
** Delete
* Read
** Query
*** Cursor
** Aggregate
** Group
** MapReduce
* Command
* Monad
^ A monad on top of m (which must be a MonadIO) that may access the database and may fail w... |
# LANGUAGE OverloadedStrings , RecordWildCards , NamedFieldPuns , TupleSections , FlexibleContexts , FlexibleInstances , UndecidableInstances , MultiParamTypeClasses , TypeFamilies , CPP , DeriveDataTypeable , ScopedTypeVariables , BangPatterns #
module Database.MongoDB.Query (
Action, access, Failure(..), ErrorC... |
1d24ae1beb21b0195c4d6bc445d6d30e242302e4eeb239f158d529e0362ffbc8 | takikawa/racket-ppa | main.rkt | #lang racket/unit
(require string-constants
racket/contract
racket/class
racket/pretty
drracket/private/drsig
"frame-icon.rkt"
"local-member-names.rkt"
mred
framework
framework/private/srcloc-panel
racket/list
racket/pat... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/drracket/drracket/private/main.rkt | racket | call this 'multi-lib' because older versions of Racket didn't
allow (lib "a/b/x.rkt") in the teaching languages, but instead
insisted on (lib "x.rkt" "a" "b"). (We use the more compact
form now because that's what lower-level primitives return to us)
url-selected?, url string, file string
size is in editor positi... | #lang racket/unit
(require string-constants
racket/contract
racket/class
racket/pretty
drracket/private/drsig
"frame-icon.rkt"
"local-member-names.rkt"
mred
framework
framework/private/srcloc-panel
racket/list
racket/pat... |
a0ec5b70e07829f3206c2121dd2ee71610e6004169b4660b7b61d32963a9aec3 | dinosaure/carton | enc.ml | open Sigs
type 'uid entry =
{ uid : 'uid
; kind : kind
; length : int
; preferred : bool
; delta : 'uid delta }
and 'uid delta = From of 'uid | Zero
let make_entry ~kind ~length ?(preferred= false) ?(delta= Zero) uid =
{ uid; kind; length; preferred; delta; }
let length { length; _ } = length
module Uti... | null | https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/lib/enc.ml | ocaml | XXX(dinosaure): dragoon here!
Don't bother doing diffs between different types.
Let's not bust the allowed depth.
Now some size filtering heuristics.
Load data if not already done.
Load index if not already done (TODO: check it!).
TODO: check it!
XXX(dinosaure): [git] does something a bit complex between... | open Sigs
type 'uid entry =
{ uid : 'uid
; kind : kind
; length : int
; preferred : bool
; delta : 'uid delta }
and 'uid delta = From of 'uid | Zero
let make_entry ~kind ~length ?(preferred= false) ?(delta= Zero) uid =
{ uid; kind; length; preferred; delta; }
let length { length; _ } = length
module Uti... |
e50c7976c5d02508f1782d56cdfbb71993bc39bde3c71677f4971f3265c5386f | TheClimateCorporation/S3DistVersions | utils.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/TheClimateCorporation/S3DistVersions/10f0d4c6c0175b4498bd176ae5ebef1696263a5c/test/s3_dist_versions/test/utils.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns s3-dis... |
aed63019ec3ee80f552b6fd05dc522358f4008c2f46eab6df8488da5a3a8c5ff | JacquesCarette/Drasil | ConceptMatch.hs | -- | Contains functions related to the choice of concept matches.
module Language.Drasil.Code.Imperative.ConceptMatch (
chooseConcept, conceptToGOOL
) where
import Language.Drasil (UID, Sentence(S), (+:+), (+:+.))
import Language.Drasil.Choices (Choices(..), CodeConcept(..),
MatchedConceptMap, showChs, Maps(..... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/2d332606cb8ed1f37cb9db9b6d63f2e406d31a5b/code/drasil-code/lib/Language/Drasil/Code/Imperative/ConceptMatch.hs | haskell | | Contains functions related to the choice of concept matches.
| Concretizes the ConceptMatchMap in Choices to a 'MatchedConceptMap'.
The ConceptMatchMap from choices is passed to chooseConcept' internally, this way | module Language.Drasil.Code.Imperative.ConceptMatch (
chooseConcept, conceptToGOOL
) where
import Language.Drasil (UID, Sentence(S), (+:+), (+:+.))
import Language.Drasil.Choices (Choices(..), CodeConcept(..),
MatchedConceptMap, showChs, Maps(..))
import GOOL.Drasil (SValue, OOProg, MathConstant(..))
import ... |
bad80ba0c49138394a6a759ae9db35a0eaf1d78a0e7e75f584da536106dce3ea | nrnrnr/qc-- | one02TreesBuild.ml | module Build : One02Constructors.S with
type t = One02Trees.M.t
=
struct
type nativeint = Base.std_nativeint
type amode = One02Trees.M.amode
type t = One02Trees.M.t
let short () =
One02Trees.M.Short()
let hword () =
One02Trees.M.Hword()
let wo... | null | https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/tdpe/one02TreesBuild.ml | ocaml | module Build : One02Constructors.S with
type t = One02Trees.M.t
=
struct
type nativeint = Base.std_nativeint
type amode = One02Trees.M.amode
type t = One02Trees.M.t
let short () =
One02Trees.M.Short()
let hword () =
One02Trees.M.Hword()
let wo... | |
21df3df52516384dcc9e2441bbccbcd0956830e1418267b42148446944b03791 | williamleferrand/aws | dynamo.ml | module M = Dynamo_factory.Make (Ocsigen_HC)
include M
| null | https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/ocsigen/dynamo.ml | ocaml | module M = Dynamo_factory.Make (Ocsigen_HC)
include M
| |
10ca87a20c15af8e55eb33cda6de10ac85ad6d32d9a6caa006d209d54814ded5 | roburio/albatross | albatross_provision.ml | ( c ) 2017 , all rights reserved
let ( let* ) = Result.bind
let timestamps validity =
let now = Ptime_clock.now () in
match Ptime.add_span now (Ptime.Span.of_int_s (Duration.to_sec validity)) with
| None -> Error (`Msg "span too big - reached end of ptime")
| Some exp -> Ok (now, exp)
let rec safe f arg ... | null | https://raw.githubusercontent.com/roburio/albatross/ecf199416b0d0bcb43d7216df0ac522740115b99/provision/albatross_provision.ml | ocaml | TODO: is this useful elsewhere?
no DB! | ( c ) 2017 , all rights reserved
let ( let* ) = Result.bind
let timestamps validity =
let now = Ptime_clock.now () in
match Ptime.add_span now (Ptime.Span.of_int_s (Duration.to_sec validity)) with
| None -> Error (`Msg "span too big - reached end of ptime")
| Some exp -> Ok (now, exp)
let rec safe f arg ... |
f7a62cb1653d1f2ef2d7f3e9b047a6dce18c046ee75953cbdb3db548574ab554 | zadean/xqerl | op_divide_dayTimeDuration_SUITE.erl | -module('op_divide_dayTimeDuration_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-divide-dayTimeDuration2args-1'/1]).
-export(['op-divide-dayTimeDu... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/op/op_divide_dayTimeDuration_SUITE.erl | erlang | -module('op_divide_dayTimeDuration_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-divide-dayTimeDuration2args-1'/1]).
-export(['op-divide-dayTimeDu... | |
d4f853f03040177c4560c1af7b671130525a36c2081bfd982ba0331389bce88e | cedlemo/OCaml-GI-ctypes-bindings-generator | File_chooser_error.ml | open Ctypes
open Foreign
type t = Nonexistent | Bad_filename | Already_exists | Incomplete_hostname
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Nonexistent
else if v = Unsigned.UInt32.of_int 1 then Bad_filename
else if v = Unsigned.UInt32.of_int 2 then Already_exists
else if v = Unsigned.UInt32.of_i... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/File_chooser_error.ml | ocaml | open Ctypes
open Foreign
type t = Nonexistent | Bad_filename | Already_exists | Incomplete_hostname
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Nonexistent
else if v = Unsigned.UInt32.of_int 1 then Bad_filename
else if v = Unsigned.UInt32.of_int 2 then Already_exists
else if v = Unsigned.UInt32.of_i... | |
0a1ce24956f404bc3d10efa82b375401d0d3896fb9c8e15776377bd88953d223 | tokenmill/docx-utils | table.clj | (ns docx-utils.elements.table
(:require [clojure.tools.logging :as log]
[docx-utils.elements.run :refer [set-run]])
(:import (org.apache.poi.xwpf.usermodel XWPFTable XWPFTableRow XWPFTableCell XWPFRun)
(org.openxmlformats.schemas.wordprocessingml.x2006.main STTblWidth)))
(defn fix-width [^XW... | null | https://raw.githubusercontent.com/tokenmill/docx-utils/f9cb077df2360c11376e0f2d9c8daf8b5062179a/src/docx_utils/elements/table.clj | clojure | (ns docx-utils.elements.table
(:require [clojure.tools.logging :as log]
[docx-utils.elements.run :refer [set-run]])
(:import (org.apache.poi.xwpf.usermodel XWPFTable XWPFTableRow XWPFTableCell XWPFRun)
(org.openxmlformats.schemas.wordprocessingml.x2006.main STTblWidth)))
(defn fix-width [^XW... | |
66d623ac5db8efe0e47807b72eaea82142b0e8e8ac1c28eb3e52ae343dba8e60 | cubicle-model-checker/cubicle | muparser_globals.mli | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/muparser_globals.mli | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2015
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
f2c0e59478df54c6bd55d382f9ced745f449b84b7bb67e432e7277fd66b8162a | grisp/rebar3_grisp | rebar3_grisp_handler.erl | -module(rebar3_grisp_handler).
% API
-export([shell/3]).
-import(rebar3_grisp_util, [debug/2]).
%--- API -----------------------------------------------------------------------
shell(RawCommand, Opts, State) ->
Command = binary_to_list(iolist_to_binary(RawCommand)),
debug("sh command:~n~s", [Command]),
... | null | https://raw.githubusercontent.com/grisp/rebar3_grisp/b984690b56b6706ef102fa4ab422cb37bdad2fa5/src/rebar3_grisp_handler.erl | erlang | API
--- API ----------------------------------------------------------------------- | -module(rebar3_grisp_handler).
-export([shell/3]).
-import(rebar3_grisp_util, [debug/2]).
shell(RawCommand, Opts, State) ->
Command = binary_to_list(iolist_to_binary(RawCommand)),
debug("sh command:~n~s", [Command]),
Result = case lists:member(return_on_error, Opts) of
true -> rebar3_grisp_util:... |
c116525774a470191509de2a48b7d1984b82b25bdd39481bb5f23b96c85bfc55 | 2600hz/kazoo | kzd_call_recording.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_call_recording.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzd_call_recording).
-export([new/0]).
-export([any/1, any/2, set_any/2]).
-export([inbound/1, inbound/2,... |
cb5f077d4dd5e4234463f674026db4f5f095d0a73dcea2d88916701712cf4465 | appleshan/cl-http | server-patch.lisp |
Scieneer Common Lisp port :
( C ) Copyright 2006 , Scieneer Pty Ltd
;;; All Rights Reserved.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Patches to server/server.lisp
(in-package :http)
;;;
(defmethod record-response-times ((server basic-server-mixin) (url url:http-u... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/scl/server/server-patch.lisp | lisp | All Rights Reserved.
Patches to server/server.lisp
Patches to server/shtml.lisp
Patches to server/utils.lisp
Optimized version, but without the CRLF translation.
Optimized version.
Patches to w3p/w3p-system.lisp |
Scieneer Common Lisp port :
( C ) Copyright 2006 , Scieneer Pty Ltd
(in-package :http)
(defmethod record-response-times ((server basic-server-mixin) (url url:http-url))
(let ((cpu-time (cpu-time server))
(elapsed-time (elapsed-time server)))
(with-slots (plist) url
(kernel:with-atomic-getf-m... |
acea1ada8ab45b4e6acc60d60a2aca56bddf348a18d1a0955148035f1d7cdcba | fukamachi/mito | postgres-types.lisp | (in-package :cl-user)
(defpackage mito-test.postgres-types
(:use #:cl
#:prove
#:mito.dao
#:mito.connection
#:mito-test.util))
(in-package :mito-test.postgres-types)
(plan nil)
(subtest "retrieve-by-sql"
(setf *connection* (connect-to-testdb :postgres))
(is (mito:retrieve-by-sql "... | null | https://raw.githubusercontent.com/fukamachi/mito/2fbfc8aa6f9e3e8029bf09888c74b9af98dad341/t/postgres-types.lisp | lisp | (in-package :cl-user)
(defpackage mito-test.postgres-types
(:use #:cl
#:prove
#:mito.dao
#:mito.connection
#:mito-test.util))
(in-package :mito-test.postgres-types)
(plan nil)
(subtest "retrieve-by-sql"
(setf *connection* (connect-to-testdb :postgres))
(is (mito:retrieve-by-sql "... | |
4ca7a3c8a914ea162b0e525b2c7379683355f2cdcea415a676d3155792b9fd80 | openworkload/swm-core | wm_commit.erl | -module(wm_commit).
-behaviour(gen_fsm).
-export([start_link/1]).
-export([init/1, handle_event/3, handle_sync_event/4, handle_info/3, code_change/4, terminate/3]).
-export([phase1/2, phase2/2, phase3/2, recovering/2]).
-include("wm_log.hrl").
-include("wm_entity.hrl").
-record(mstate,
{tid :: integer(),
... | null | https://raw.githubusercontent.com/openworkload/swm-core/0ae7991d4914444e6120de8112d30f2433662bc5/src/lib/wm_commit.erl | erlang | ============================================================================
Module API
============================================================================
============================================================================
Server callbacks
=======================================================... | -module(wm_commit).
-behaviour(gen_fsm).
-export([start_link/1]).
-export([init/1, handle_event/3, handle_sync_event/4, handle_info/3, code_change/4, terminate/3]).
-export([phase1/2, phase2/2, phase3/2, recovering/2]).
-include("wm_log.hrl").
-include("wm_entity.hrl").
-record(mstate,
{tid :: integer(),
... |
35a0cf4f350c73f9149c1afcd656fcb94709c69bf17562cba9b2bc6d00e90b5b | debug-ito/wild-bind | FrontEnd.hs | -- |
-- Module: WildBind.X11.Internal.FrontEnd
-- Description: WildBind FrontEnd implementation for X11
Maintainer : < >
--
-- __This is an internal module. Package users should not rely on this.__
module WildBind.X11.Internal.FrontEnd
( -- * X11Front
X11Front (..)
, withFrontEnd
, withX11Front
... | null | https://raw.githubusercontent.com/debug-ito/wild-bind/ef65370ded4f9687fed554107df4cc58247943de/wild-bind-x11/src/WildBind/X11/Internal/FrontEnd.hs | haskell | |
Module: WildBind.X11.Internal.FrontEnd
Description: WildBind FrontEnd implementation for X11
__This is an internal module. Package users should not rely on this.__
* X11Front
This is the implementation of the 'FrontEnd' given by
'withFrontEnd' function. With this object, you can do more advanced
actions. Se... | Maintainer : < >
module WildBind.X11.Internal.FrontEnd
X11Front (..)
, withFrontEnd
, withX11Front
, makeFrontEnd
, defaultRootWindow
) where
import Control.Applicative (empty, (<$>))
import Control.Concurrent (rtsSupp... |
dbb03ae6621c1e15be13329a7c1c751b1e83ca06269d1fbbf0bddb6786ca5281 | Apress/practical-webdev-haskell | Common.hs | module Adapter.HTTP.Web.Common where
import ClassyPrelude
import Web.Scotty.Trans
import Domain.Auth.Types
import qualified Text.Digestive.View as DF
import Text.Blaze.Html5 ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import qualified Text.Blaze.Html.Renderer.Text as ... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/12/src/Adapter/HTTP/Web/Common.hs | haskell | * Views
* Sessions | module Adapter.HTTP.Web.Common where
import ClassyPrelude
import Web.Scotty.Trans
import Domain.Auth.Types
import qualified Text.Digestive.View as DF
import Text.Blaze.Html5 ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import qualified Text.Blaze.Html.Renderer.Text as ... |
61c7992077adc69669bb291aed9a2f6a2e53c718cc01714ff99de203d946016b | nuvla/api-server | data_record_key_lifecycle_test.clj | (ns sixsq.nuvla.server.resources.data-record-key-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest use-fixtures]]
[peridot.core :refer [content-type header request session]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.middleware.authn-info :refer [au... | null | https://raw.githubusercontent.com/nuvla/api-server/272c1b8f7a5cd306d01464cf801d6174df146f71/code/test/sixsq/nuvla/server/resources/data_record_key_lifecycle_test.clj | clojure | create namespace
anonymous create should fail
anonymous query should also fail
adding the same attribute twice should fail | (ns sixsq.nuvla.server.resources.data-record-key-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest use-fixtures]]
[peridot.core :refer [content-type header request session]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.middleware.authn-info :refer [au... |
6ac3126c7f8f9efb370274b5aaca02355f8b621639c8c271f9f206c0e4481f4a | clojure-emacs/cider-nrepl | middleware.clj | (ns cider.nrepl.middleware
"This namespace mostly exists, so that
it's easy to share the list of provided middleware.
Eventually the deferred middleware loading code will be probably moved here as well."
{:added "0.25"})
(def cider-middleware
'[cider.nrepl/wrap-apropos
cider.nrepl/wrap-classpath
cid... | null | https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/461cbc2e121b363fb6b675d34dd7d1bae0dd234b/src/cider/nrepl/middleware.clj | clojure | (ns cider.nrepl.middleware
"This namespace mostly exists, so that
it's easy to share the list of provided middleware.
Eventually the deferred middleware loading code will be probably moved here as well."
{:added "0.25"})
(def cider-middleware
'[cider.nrepl/wrap-apropos
cider.nrepl/wrap-classpath
cid... | |
34a656f6285c5df1880390dc7451247f0c7a33f8ab0b06ca674e47996bef0ec4 | serokell/importify | 08-Z03-HidingsUnusedButModuleUsed.hs | module HidingsUnusedButModuleUsed where
import Data.List hiding (sort, unionBy)
bar = subsequences
| null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/08-Z03-HidingsUnusedButModuleUsed.hs | haskell | module HidingsUnusedButModuleUsed where
import Data.List hiding (sort, unionBy)
bar = subsequences
| |
0d0262d0a7036d0324ce00a8d86071f34ab3519648d8bade01569dbe865d03f9 | wargrey/schema | row.rkt | #lang typed/racket/base
(require "../../../digitama/exchange/csv/reader/port.rkt")
(require "../../../digitama/exchange/csv/reader/line.rkt")
(require "../../../digitama/exchange/csv/reader/string.rkt")
(require "../../../digitama/exchange/csv/dialect.rkt")
(require racket/logging)
(define examples : (Listof String)... | null | https://raw.githubusercontent.com/wargrey/schema/4824a1fecea1dc557941b08f05a457da9f628f78/tamer/csv/reader/row.rkt | racket | #lang typed/racket/base
(require "../../../digitama/exchange/csv/reader/port.rkt")
(require "../../../digitama/exchange/csv/reader/line.rkt")
(require "../../../digitama/exchange/csv/reader/string.rkt")
(require "../../../digitama/exchange/csv/dialect.rkt")
(require racket/logging)
(define examples : (Listof String)... | |
b079ff779796b22727affd08b20505c99ec25940bbf7fc4860308dd9efcd0c9a | realworldocaml/book | test_comments.ml | * We have two kinds of tests :
1 . Handwritten tests showing the pretty strings for some known examples .
2 . Quickcheck tests which round - trip a sexp through pretty - printing and assert that
the comments are preserved up to some post - processing of whitespace .
The post - processing is a... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/sexp_pretty/test/test_comments.ml | ocaml | multiple internal whitespace
multiple lines
really long comment
comments nested in sexp comment
quoted newline
Doesn't strip sexp comments. Our comparison is on the [Plain_comment _] values,
including those nested inside sexp comments.
[Pretty_print] preserves non-whitespace characters
[Conservative_p... | * We have two kinds of tests :
1 . Handwritten tests showing the pretty strings for some known examples .
2 . Quickcheck tests which round - trip a sexp through pretty - printing and assert that
the comments are preserved up to some post - processing of whitespace .
The post - processing is a... |
645cdda95b11ef8b0e0fa6a6b3564b7d64e500d7fedce23e9f649ef991af7497 | chunsj/TH | file.lisp | (defpackage th.file-examples
(:use #:common-lisp
#:mu
#:th))
(in-package :th.file-examples)
(let ((f (file.disk "thfile.dat" "w"))
(s (storage.double '(1 2 3 4))))
($fwrite s f)
($fclose f))
(let ((f (file.disk "thfile.dat" "r"))
(s (storage.double)))
($fread s f)
($fclose f)
... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/intro/file.lisp | lisp | (defpackage th.file-examples
(:use #:common-lisp
#:mu
#:th))
(in-package :th.file-examples)
(let ((f (file.disk "thfile.dat" "w"))
(s (storage.double '(1 2 3 4))))
($fwrite s f)
($fclose f))
(let ((f (file.disk "thfile.dat" "r"))
(s (storage.double)))
($fread s f)
($fclose f)
... | |
50a2486a0c1b4163ac5420a1685c97b7079faaf822b480432e7ebc70ed571898 | zkincaid/duet | featureTree.mli | * A feature tree organizes a collection by vectors of integer features .
Each element of the universe from which the collection is drawn is
associated with a feature vector ; multiple elements may be associated with
the same feature vector . Queries on the collection are parameterized by a
bou... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/srk/src/featureTree.mli | ocaml | * Find an element with features <= the given feature vector, and which
satisfies the given predicate. Raises [Not_found] if there is no such
element.
* Find an element [elt] with features <= the given feature vector, and on
which the given partial function [f] is defined; return [f elt]. Raises
[Not_... | * A feature tree organizes a collection by vectors of integer features .
Each element of the universe from which the collection is drawn is
associated with a feature vector ; multiple elements may be associated with
the same feature vector . Queries on the collection are parameterized by a
bou... |
8864c8e509c3230bdb6918064f258754db384ed78db935f2aa94e50ac3247003 | emaphis/HtDP2e-solutions | ex057.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex057) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/04-Intervals/ex057.rkt | racket | about the language level of this file in a form that our tools can easily process.
Ex 57:
interpretation. Now that you have solved the exercises in this section,
Compare and contrast the solutions.
Constants Definitions
pixels
pixels
pixels per clock tick
RocketLaunch -> Image
Renders the state as a resting o... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex057) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Recall that the word “ height ” forced us to choose one of two p... |
0d1a4956271bf2576491214646bba6099388da58ca02745941051de7b716dfb7 | zack-bitcoin/amoveo | existence.erl | -module(existence).
-export([new/2,hash/1, %custom stuff
get/2,write/2,%update tree stuff
dict_get/2, dict_get/3, dict_write/2,%update dict stuff
verify_proof/4,make_leaf/3,key_to_int/1,serialize/1,test/0]).%common tree stuff
%for accessing the proof of existence tree
-record(exist, {hash, he... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_core/src/consensus/trees/existence.erl | erlang | custom stuff
update tree stuff
update dict stuff
common tree stuff
for accessing the proof of existence tree
Root0 = constants:root0(),
C = hash:doit(2), | -module(existence).
-record(exist, {hash, height}).
-define(name, existence).
-include("../../records.hrl").
hash(X) -> X#exist.hash.
new(Hash, Height) ->
HS = constants:hash_size(),
HS = size(Hash),
#exist{hash = Hash, height = Height}.
serialize(E) ->
HB = constants:height_bits(),
Hash = E#exist.h... |
e68517e0e67ee6c29a81d9100d071505c37257365795c0571ce097ac7bf6aaa3 | chenyukang/eopl | 12.scm | (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/12.scm | scheme | add private, protected, public property for method of a class
add pri-fields pro-fields pub-fields
won't do that now. | (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... |
f68e91e4e3342f79aacaa09ec8410ff9386a30079ef1b5b0b26baf3eadd361bd | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2018 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns cucumber+expect2.core
(:gen-... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/cucumber%2Bexpect2/src/cucumber%2Bexpect2/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2018 , 2020
-v10.html
(ns cucumber+expect2.core
(:gen-class))
funkce faktorial obsahuje i test na
(defn factorial
[n]
(if (neg? n)
(throw (IllegalArgumentException. "negative numbers are not supported!"))
(apply * (range 1M (inc n)))))
otestujeme f... |
a471bccf2bfadbda9a5e909440a2f963c19a1e522d0c53f3cc925b07561fb423 | TrustInSoft/tis-kernel | why3printer_realize.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/share/src/why3printer_realize.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2013 -- ... |
772149cbe2df690c7f44c5b80da2e0e64eabafd103a7c6ba363bb6f7457dc4df | simingwang/emqx-plugin-kafkav5 | emqx_plugin_kafka_schema.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/8743e7c6b52913b3b92178d79597b254db976eb2/_build/default/lib/emqx_plugin_kafka/src/emqx_plugin_kafka_schema.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_plugin_kafka_schema).
-include_lib("hocon/include/hoconsc.hrl").
-include_lib("type... |
36f56389ab0ee3457744c293c60893c60300240d23aed2ba662a2db7e1b58adb | FranklinChen/hugs98-plus-Sep2006 | SP.hs | ( c ) 2000 - 2005 by [ see file COPYRIGHT ]
module Data.Graph.Inductive.Query.SP(
spTree,spLength,sp,
dijkstra
) where
import qualified Data.Graph.Inductive.Internal.Heap as H
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Internal.RootPath
expand :: Real b => b -> LPath b -> Context a b ... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/fgl/Data/Graph/Inductive/Query/SP.hs | haskell | ( c ) 2000 - 2005 by [ see file COPYRIGHT ]
module Data.Graph.Inductive.Query.SP(
spTree,spLength,sp,
dijkstra
) where
import qualified Data.Graph.Inductive.Internal.Heap as H
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Internal.RootPath
expand :: Real b => b -> LPath b -> Context a b ... | |
4ef1d1a36318d89b8dd56dfc297ca62bb1017873121256c6a33485d4cf5ec516 | yrashk/erlang | snmpc_misc.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/snmp/src/compile/snmpc_misc.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpc_misc).
need definition of... |
accde25a15d4f6ffde940620fa5b5c1109c6d92649be62be61af3232f936eed3 | egao1980/tesseract-capi | library.lisp | (defpackage tesseract-capi/library
(:use :cl))
(in-package :tesseract-capi/library)
(cffi:define-foreign-library tesseract
(:darwin (:or
"libtesseract.5.dylib"
"libtesseract.4.dylib"
"libtesseract.3.dylib"
"libtesseract.dylib"))
(:linux (:or
"libtesserac... | null | https://raw.githubusercontent.com/egao1980/tesseract-capi/36ee8ae3aa1170c78ddc75af7368514a86b43f4f/src/library.lisp | lisp | (defpackage tesseract-capi/library
(:use :cl))
(in-package :tesseract-capi/library)
(cffi:define-foreign-library tesseract
(:darwin (:or
"libtesseract.5.dylib"
"libtesseract.4.dylib"
"libtesseract.3.dylib"
"libtesseract.dylib"))
(:linux (:or
"libtesserac... | |
50fc0bbf4d9d079bbc4e2f8b97d95ccf4bc24b1be4024a9a17c306302c2bc3f6 | babashka/babashka | hiccup.clj | (ns babashka.impl.hiccup
{:no-doc true}
(:require [hiccup.compiler :as compiler]
[hiccup.util :as util]
[sci.core :as sci :refer [copy-var]]))
(def hns (sci/create-ns 'hiccup.core nil))
(def hns2 (sci/create-ns 'hiccup2.core nil))
(def uns (sci/create-ns 'hiccup.util nil))
(def cns (sci/cre... | null | https://raw.githubusercontent.com/babashka/babashka/33bee0480db28a50d9b8da2d804e416748f09fc1/feature-hiccup/babashka/impl/hiccup.clj | clojure | {:deprecated "2.0"} | (ns babashka.impl.hiccup
{:no-doc true}
(:require [hiccup.compiler :as compiler]
[hiccup.util :as util]
[sci.core :as sci :refer [copy-var]]))
(def hns (sci/create-ns 'hiccup.core nil))
(def hns2 (sci/create-ns 'hiccup2.core nil))
(def uns (sci/create-ns 'hiccup.util nil))
(def cns (sci/cre... |
5a6e0b0692fee03900e712995ca4d2d38d3fa3a0f12c13c79a621274863786c1 | transient-haskell/transient-stack | Parameters.hs | # LANGUAGE ExistentialQuantification , ScopedTypeVariables , FlexibleInstances #
module Transient.Move.Parameters where
import Transient.Internals
import Transient.Move
import Transient.Move.Utils
import Data.Typeable
import Data.Map as M
import System.Random
import System.IO.Unsafe
import Data.IORef
import Control.Mo... | null | https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient-universe/tests/Parameters.hs | haskell | opcion reactiva= parameter= EVar o mailbox
TODO: associate parameters to the hierarchy of threads
optimize a branch, not the whole program
TODO: Not only Int values
| Parameters can be changed during the execution and are read by the application to modify his behaviour. `optimize`change the parameters in ord... | # LANGUAGE ExistentialQuantification , ScopedTypeVariables , FlexibleInstances #
module Transient.Move.Parameters where
import Transient.Internals
import Transient.Move
import Transient.Move.Utils
import Data.Typeable
import Data.Map as M
import System.Random
import System.IO.Unsafe
import Data.IORef
import Control.Mo... |
a4c044941f625e165df473dd6d9056b8840be476b56dd9587a8a956d48185e93 | REPROSEC/dolev-yao-star | Lib_NatMod.ml | open Prims
let (mk_nat_group : Prims.int Lib_Exponentiation.exp) =
{
Lib_Exponentiation.one = Prims.int_one;
Lib_Exponentiation.fmul = ( * );
Lib_Exponentiation.lemma_one = ();
Lib_Exponentiation.lemma_fmul_assoc = ();
Lib_Exponentiation.lemma_fmul_comm = ()
}
let rec (pow : Prims.int -> Prims.n... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Lib_NatMod.ml | ocaml | open Prims
let (mk_nat_group : Prims.int Lib_Exponentiation.exp) =
{
Lib_Exponentiation.one = Prims.int_one;
Lib_Exponentiation.fmul = ( * );
Lib_Exponentiation.lemma_one = ();
Lib_Exponentiation.lemma_fmul_assoc = ();
Lib_Exponentiation.lemma_fmul_comm = ()
}
let rec (pow : Prims.int -> Prims.n... | |
adad246d25a75ec969200ad594116bce1ab90fdbf58cc792bf9b03ef24ada6f6 | tiensonqin/clj-social | twitter.clj | (ns clj-social.twitter
(:import [com.github.scribejava.apis TwitterApi]))
(def spec {:user-url ""
:request-token true
:api (TwitterApi/instance)
:params {"access_token" :access-token}})
| null | https://raw.githubusercontent.com/tiensonqin/clj-social/3ade30d5252bbc94fd4170207f7ef209e8ca3f18/src/clj_social/twitter.clj | clojure | (ns clj-social.twitter
(:import [com.github.scribejava.apis TwitterApi]))
(def spec {:user-url ""
:request-token true
:api (TwitterApi/instance)
:params {"access_token" :access-token}})
| |
d2ea30b0ed96ceb21f3e379721a112fde02a6f9ee2ea244066855bc47344726e | qfpl/applied-fp-course | Conf.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - methods #
module Level06.Conf
( parseOptions
) where
import GHC.Word (Word16)
import Data.Bifunctor (first)
import Data.Monoid ((<>))
import Level06.AppM ... | null | https://raw.githubusercontent.com/qfpl/applied-fp-course/d5a94a9dcee677bc95a5184c2ed13329c9f07559/src/Level06/Conf.hs | haskell | # LANGUAGE OverloadedStrings #
| For the purposes of this application we will encode some default values to
ensure that our application continues to function in the event of missing
configuration values from either the file or command line inputs.
a complete ``Conf`` record. Also we need to highlight any missing va... | # OPTIONS_GHC -fno - warn - missing - methods #
module Level06.Conf
( parseOptions
) where
import GHC.Word (Word16)
import Data.Bifunctor (first)
import Data.Monoid ((<>))
import Level06.AppM (AppM)
import Le... |
6401066083feac0e3cd3dcb58a534eb412e099d58f316b965f6a342851e1a417 | aitorres/firelink | StringLiteralsSpec.hs | module StringLiteralsSpec where
import FireLink.FrontEnd.Tokens
import Test.Hspec
import Utils (scanToken)
spec :: Spec
spec = describe "Lexer" $ do
it "accepts `@@` as a valid string literal" $ do
let x = "@@"
let atok = scanToken x
atok `shouldBe` TkStr... | null | https://raw.githubusercontent.com/aitorres/firelink/075d7aad1c053a54e39a27d8db7c3c719d243225/test/Lexer/StringLiteralsSpec.hs | haskell | module StringLiteralsSpec where
import FireLink.FrontEnd.Tokens
import Test.Hspec
import Utils (scanToken)
spec :: Spec
spec = describe "Lexer" $ do
it "accepts `@@` as a valid string literal" $ do
let x = "@@"
let atok = scanToken x
atok `shouldBe` TkStr... | |
0ea8458692bbd1580dd7890c68edfd71f0a7cf8ea5027b590bb28096af88ea91 | mentat-collective/emmy | simpson.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.quadrature.simpson
(:require [emmy.numerical.quadrature.common :as qc]
[emmy.numerical.quadrature.trapezoid :as qt]
[emmy.polynomial.richardson :as pr]))
# # Simpson 's Rule
;;
This numerical integration method is a [ closed Newton ... | null | https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/src/emmy/numerical/quadrature/simpson.cljc | clojure |
formula](#Closed_Newton%E2%80%93Cotes_formulas);
midpoint and combines them into an area estimate for this slice using the
following formula:
$${{h} \over 3} (f_0 + 4f_1 + f_2)$$
Given a window of $[a, b]$ and a "step size" of $h = {{b - a} \over 2}$. The
point $f_i$ is the point $i$ steps into the window.
T... | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.quadrature.simpson
(:require [emmy.numerical.quadrature.common :as qc]
[emmy.numerical.quadrature.trapezoid :as qt]
[emmy.polynomial.richardson :as pr]))
# # Simpson 's Rule
This numerical integration method is a [ closed Newton - C... |
db793db67c7af4cf9665700e62c3f5784b83204bb9bdf8762e8625980e2e426b | commercialhaskell/stack | Main.hs | import StackTest
import Control.Monad
import System.Directory
import System.FilePath
{-# ANN module "HLint: ignore Use unless" #-}
main :: IO ()
main =
if isWindows
then logInfo "Disabled on Windows (see #issuecomment-166118678)"
else when isLinux $ do
safeNew "1234a-4b-b4-abc-12b34"
... | null | https://raw.githubusercontent.com/commercialhaskell/stack/fee62e7f283cd405e0aa27efdd42e466ebe78956/test/integration/tests/1336-1337-new-package-names/Main.hs | haskell | # ANN module "HLint: ignore Use unless" # | import StackTest
import Control.Monad
import System.Directory
import System.FilePath
main :: IO ()
main =
if isWindows
then logInfo "Disabled on Windows (see #issuecomment-166118678)"
else when isLinux $ do
safeNew "1234a-4b-b4-abc-12b34"
doesExist "./1234a-4b-b4-abc-12b34/s... |
34c432e34dcaaadb0519d0867c65c02c338243d6e8ef8dfed053be27bd8b264f | kaizhang/Taiji | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
Module : Bio . Data . Experiment .
Copyright : ( c ) 2016
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
-- The default serialization of most types are too verbose and not suitable for
-- direct use by human... | null | https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-experiments/src/Bio/Data/Experiment/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
|
Stability: experimental
Portability: portable
The default serialization of most types are too verbose and not suitable for
direct use by human beings. This module provids a more succint and
user-friendly way to write YAML files. Featuring:
--------------------------------------... |
Module : Bio . Data . Experiment .
Copyright : ( c ) 2016
License : BSD3
Maintainer : < >
1 . Most keywords have been renamed .
2 . Keywords are case - insensitive .
3 . Providing default values for some fields .
module Bio.Data.Experiment.Parser
( parseChIPSeq
, parseATACS... |
58104fe5be09690ff6784ae700f8c3029581d30874d34d836fcc17deab4749da | uw-unsat/leanette-popl22-artifact | synth.rkt | #lang s-exp rosette
(require "fs.rkt" "lang.rkt" "litmus.rkt" "nondet.rkt")
(provide (all-defined-out))
; Measure the synchronization cost of a program; i.e., the number
; of fsync operations that execute.
(define (sync-cost prog)
(apply + (for/list ([op prog])
(match op
[(efsync fd e... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/ferrite/lib/synth.rkt | racket | Measure the synchronization cost of a program; i.e., the number
of fsync operations that execute. | #lang s-exp rosette
(require "fs.rkt" "lang.rkt" "litmus.rkt" "nondet.rkt")
(provide (all-defined-out))
(define (sync-cost prog)
(apply + (for/list ([op prog])
(match op
[(efsync fd e) (if e 1 0)]
[_ 0]))))
Synthesize a program that makes the given litmus test valid ... |
dc069c9a1b726aba7216aff3a0a6a2beb20f629343a46231927607bfed452c49 | chenyukang/eopl | tests-book.scm | (module tests-book mzscheme
(provide tests-for-run tests-for-check tests-for-parse)
;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;;
(define the-test-suite
'(
(modules-dans-simplest "
module m1
interface
[a : int
b : int]
body
[a = 33
... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter8/full-system/tests-book.scm | scheme | tests ;;;;;;;;;;;;;;;;
(exercise-8.15 "
module tables
interface [opaque table
empty : table
add-to-table : (int -> (int -> (table -> table)))
lookup-in-table : (int -> (table -> int))]
body
[type table = (int... | (module tests-book mzscheme
(provide tests-for-run tests-for-check tests-for-parse)
(define the-test-suite
'(
(modules-dans-simplest "
module m1
interface
[a : int
b : int]
body
[a = 33
c = -(a,1)
b = -(c,a)]
... |
bbd9b7a887185330fff4541296912e5d99ec6b4d30a06e9ce27d199394b0179e | intolerable/stitch | Stitch.hs | -- | This module exports the 'Stitch' type, which is simply 'StitchT' parameterized over 'Identity', for computations which don't require any other monadic capabilities.
module Control.Monad.Stitch
( Stitch
, CSS
, runStitch ) where
import Control.Monad.Trans.Stitch
import Stitch.Types
import Data.Functor.Ident... | null | https://raw.githubusercontent.com/intolerable/stitch/316eaaafdacec5fe31256e7b14bf2291d6c24049/src/Control/Monad/Stitch.hs | haskell | | This module exports the 'Stitch' type, which is simply 'StitchT' parameterized over 'Identity', for computations which don't require any other monadic capabilities.
| The 'StitchT' monad transformer specialized to 'Identity'. This will typically be the Stitch variant used since it doesn't do anything special.
| Ev... | module Control.Monad.Stitch
( Stitch
, CSS
, runStitch ) where
import Control.Monad.Trans.Stitch
import Stitch.Types
import Data.Functor.Identity
type Stitch = StitchT Identity
| Abstract representation of a CSS document . This can be transformed to an actual CSS document with ' Stitch . ' .
type CSS = Sti... |
fd71f4e31f60cf2569daa6d867061f5285a3b48e52b4649aa46951c41311bbd1 | cognitect-labs/day-of-datomic-cloud | migration.clj | Copyright ( c ) Cognitect , Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be... | null | https://raw.githubusercontent.com/cognitect-labs/day-of-datomic-cloud/b1684c8d131942f0451185288ed65bc51ee2b81d/tutorial/migration.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Cognitect , Inc. All rights reserved .
(require '[datomic.client.api :as d]
'[datomic.samples.repl :as repl]
'[datomic.samples.schema :as schema])
(def client (d/client {:server-type :dev-local :system "day-of-datomic-cloud"}))
(d/create-database client {:db-name "migration"})
(d... |
d58f87a7c3707da4c4d2722b78b9741d7df3df4dde9710b013d10b86e2817141 | OCamlPro/typerex-lint | interface_missing.ml | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-files/interface_missing.ml | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
aa59098f8980e9fafad1492dfe4870800d0811c960bdbc0d242bc1aed8bf8081 | project-oak/hafnium-verification | accessPathTestUtils.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/unit/accessPathTestUtils.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
031f701f13ae164e9825cd23efacc20f7b7cfc5a9a50f18817784203f43459f0 | ertugrulcetin/herfi | mouse.cljs | (ns herfi.scene.entity.mouse
(:require
[applied-science.js-interop :as j]
[herfi.scene.api :as api]
[herfi.scene.db :as db]
[herfi.scene.ecs :as ecs]))
(defn create-mouse-movement []
(-> (ecs/create-entity :mouse-movement)
(ecs/add-component :script (let [page-x (atom nil)
... | null | https://raw.githubusercontent.com/ertugrulcetin/herfi/b5384d56c3e56c29ed82deafc4e56ad19ec12a60/src/cljs/herfi/scene/entity/mouse.cljs | clojure | (ns herfi.scene.entity.mouse
(:require
[applied-science.js-interop :as j]
[herfi.scene.api :as api]
[herfi.scene.db :as db]
[herfi.scene.ecs :as ecs]))
(defn create-mouse-movement []
(-> (ecs/create-entity :mouse-movement)
(ecs/add-component :script (let [page-x (atom nil)
... | |
b476146977ae63adffaa26876701839a8f897596b6ad8f41a65d5adf479a88e1 | jesperes/aoc_erlang | aoc2016_day20.erl | -module(aoc2016_day20).
-define(MAX_IP, 4294967295).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2016,
day = 20,
name = "Firewall R... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2016/aoc2016_day20.erl | erlang | N is blocked because it is in the range {Lower, Upper}.
N is not blocked.
there is no such range.
Return the number of IPs which are not blocked.
Find the next non-blocked IP.
continue with next. | -module(aoc2016_day20).
-define(MAX_IP, 4294967295).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2016,
day = 20,
name = "Firewall R... |
a6b143229f7bc69fbf87950606464b6b8e6ac4e6476d498f6bd246971a04a3b0 | msakai/ptq | URLEncoding.hs | -----------------------------------------------------------------------------
-- |
Module : URLEncoding
Copyright : Copyright ( c ) 2005,2006 Minero Aoki
-- License : LGPL (see COPYING)
--
-- Maintainer:
-- Stability : experimental
-- Portability : non-portable
# LANGUAGE CPP #
--
$ I ... | null | https://raw.githubusercontent.com/msakai/ptq/bd40c7ba90da5bf439626db00925707b5cff6d74/src/URLEncoding.hs | haskell | ---------------------------------------------------------------------------
|
License : LGPL (see COPYING)
Maintainer:
Stability : experimental
Portability : non-portable
This program is free software.
You can distribute/modify this program under the terms of
For details of the GNU LGPL, see t... | Module : URLEncoding
Copyright : Copyright ( c ) 2005,2006 Minero Aoki
# LANGUAGE CPP #
$ I d : URLEncoding.hs , v 1.2 2006/04/05 17:55:14 aamine Exp $
Copyright ( c ) 2005,2006 Minero Aoki
the GNU LGPL , Lesser General Public License version 2.1 .
module URLEncoding (urlencode, urldecode) wher... |
2d06829d5e3f6852c2306708b230ebf15949f75fa94692c086429eb2afaefd74 | mishadoff/project-euler | problem066.clj | (ns project-euler)
This Diophantine equation known as 's equation
;;
;;
;; Let h_i/k_i denote the sequence of convergents to the continued fraction sqrt(n)
Then the pair ( x , y ) solving 's equation and minimizing x ,
x = , y = k_i . Fundamental solution .
(defn square? [n]
(let [a (int (Math/sqrt n))]
... | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem066.clj | clojure |
Let h_i/k_i denote the sequence of convergents to the continued fraction sqrt(n) | (ns project-euler)
This Diophantine equation known as 's equation
Then the pair ( x , y ) solving 's equation and minimizing x ,
x = , y = k_i . Fundamental solution .
(defn square? [n]
(let [a (int (Math/sqrt n))]
(= n (* a a))))
(defn convergent [seq]
"Number of convergents, sequence"
(letfn [(p... |
9c6f47f2bb5daaea68b40572d0d4cfce75494cf68bee093e3da04a860fa3cc62 | monadbobo/ocaml-core | only_in_test.mli | * This module can be used to safely expose functions and values in signatures
that can only be used in unit tests .
Under the hood , [ ' a t = ( unit - > ' a ) ] and the only thing that ever forces them
is the [ run_tests_and_exit ] function below which actually runs the unit tests .
For examp... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/only_in_test.mli | ocaml | * This module can be used to safely expose functions and values in signatures
that can only be used in unit tests .
Under the hood , [ ' a t = ( unit - > ' a ) ] and the only thing that ever forces them
is the [ run_tests_and_exit ] function below which actually runs the unit tests .
For examp... | |
d7356e5333e3786a168da16d6db8e5e0a7d4ade391f5860e785c9e96181fc378 | dcos/dcos-net | dcos_dns_mesos.erl | -module(dcos_dns_mesos).
-behavior(gen_server).
-include("dcos_dns.hrl").
-include_lib("kernel/include/logger.hrl").
-include_lib("dns/include/dns.hrl").
%% API
-export([
start_link/0,
push_zone/2
]).
%% gen_server callbacks
-export([init/1, handle_call/3,
handle_cast/2, handle_info/2, handle_continue/2]... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_dns/src/dcos_dns_mesos.erl | erlang | API
gen_server callbacks
===================================================================
gen_server callbacks
===================================================================
===================================================================
===================================================================... | -module(dcos_dns_mesos).
-behavior(gen_server).
-include("dcos_dns.hrl").
-include_lib("kernel/include/logger.hrl").
-include_lib("dns/include/dns.hrl").
-export([
start_link/0,
push_zone/2
]).
-export([init/1, handle_call/3,
handle_cast/2, handle_info/2, handle_continue/2]).
-type task() :: dcos_net_me... |
3ce4879c86d6725b3bfaf2c5a92274719b8e1c5ed709fce13258c0e78e6aff86 | sbcl/sbcl | debug.lisp | ;;;; This file contains utilities for debugging the compiler --
;;;; currently only stuff for checking the consistency of the IR1.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon ... | null | https://raw.githubusercontent.com/sbcl/sbcl/c9d9d90d6b58147106652b87021b24a57069a80f/src/compiler/debug.lisp | lisp | This file contains utilities for debugging the compiler --
currently only stuff for checking the consistency of the IR1.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
A definite inconsist... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-C")
(declaim (ftype (function (string &rest t) (values)) barf))
(defun barf (string &rest args)
(apply #'b... |
e536bf8412f293b651b03484f40e003437ab31d7acc4846c4ad2e4e669eeb3f1 | xtdb/core2 | node_test.clj | (ns core2.node-test
(:require [clojure.test :as t]
[core2.api :as c2]
[core2.test-util :as tu]
[core2.util :as util]))
(t/use-fixtures :each tu/with-mock-clock tu/with-node)
(t/deftest test-multi-value-insert-423
(letfn [(expected [tt]
{[(util/->zdt #inst "2024-01-0... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/src/test/clojure/core2/node_test.clj | clojure | (ns core2.node-test
(:require [clojure.test :as t]
[core2.api :as c2]
[core2.test-util :as tu]
[core2.util :as util]))
(t/use-fixtures :each tu/with-mock-clock tu/with-node)
(t/deftest test-multi-value-insert-423
(letfn [(expected [tt]
{[(util/->zdt #inst "2024-01-0... | |
d627d6fd9b1efd705702023b8f3882229503231f066ac7a8b7d65c82eca0d512 | Frama-C/Frama-C-snapshot | VCS.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/VCS.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
3c72494c1fc88f561fd19ce8ad5807a22535d24741f75b3b5e5228253fd0c72f | cedlemo/OCaml-GObject-Introspection | bindings_c_gen_g_signal.ml | let c_headers = "#include <glib-object.h>"
let main () =
let stubs_out = open_out "bindings_stubs_gen_g_signal.c" in
let stubs_fmt = Format.formatter_of_out_channel stubs_out in
Format.fprintf stubs_fmt "%s@\n" c_headers;
Cstubs.Types.write_c stubs_fmt (module Bindings.GSignal.Flags);
Format.pp_print_flush s... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/stubgen/bindings_c_gen_g_signal.ml | ocaml | let c_headers = "#include <glib-object.h>"
let main () =
let stubs_out = open_out "bindings_stubs_gen_g_signal.c" in
let stubs_fmt = Format.formatter_of_out_channel stubs_out in
Format.fprintf stubs_fmt "%s@\n" c_headers;
Cstubs.Types.write_c stubs_fmt (module Bindings.GSignal.Flags);
Format.pp_print_flush s... | |
432719440587c943ad5d3154087fe2d14c5c86e20f5468a2d0c8c08597218281 | lemmaandrew/CodingBatHaskell | deFront.hs | From
Given a string , return a version without the first 2 chars . Except keep the first
char if it is ' a ' and keep the second char if it is ' b ' . The string may be any length .
Harder than it looks .
Given a string, return a version without the first 2 chars. Except keep the first
char if it is 'a' and... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/deFront.hs | haskell | From
Given a string , return a version without the first 2 chars . Except keep the first
char if it is ' a ' and keep the second char if it is ' b ' . The string may be any length .
Harder than it looks .
Given a string, return a version without the first 2 chars. Except keep the first
char if it is 'a' and... | |
3f438367ce296be0e3e49bda401ea06fcff7bbb1416c5ddd186cbe7f03f52f42 | jarcane/merkki | span.cljc | Merkki - a Clojure library for Markdown generation
;;;
Copyright ( c ) 2016
;;;
;;; This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details
(ns merkki.span
(:require [merkki.util :refer [wrap]]
[merkki.tags :refer [md-tag]]))
;;;
;;; Span elements
;;;
(def em
... | null | https://raw.githubusercontent.com/jarcane/merkki/49b6614a4a488a6455bdc8e501e938cab6abc9c3/src/merkki/span.cljc | clojure |
This file is licensed under the Eclipse Public License v1.0. See LICENSE for more details
Span elements
Methods for span elements
| Merkki - a Clojure library for Markdown generation
Copyright ( c ) 2016
(ns merkki.span
(:require [merkki.util :refer [wrap]]
[merkki.tags :refer [md-tag]]))
(def em
"Wraps string for emphasis"
(partial wrap "*"))
(def strong
"Wraps string for strong emphasis"
(partial wrap "**"))
(d... |
3bccc393288617606db25a2577cec6e182ea07193a098e2f16b00b816b303b76 | TempusMUD/cl-tempus | creature-io.lisp | (in-package #:tempus)
(define-condition invalid-creature-file (error)
())
(define-condition invalid-equipment-file (error)
())
(defun xml-attr (node name &key numeric default numeric-with-nil hex float)
(let ((val (assoc name (second node) :test #'string=)))
(cond
((null (second val))
default)
... | null | https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/persistence/creature-io.lisp | lisp | TODO: pay-rent
Update the amount of time played
Remove all spell affects | (in-package #:tempus)
(define-condition invalid-creature-file (error)
())
(define-condition invalid-equipment-file (error)
())
(defun xml-attr (node name &key numeric default numeric-with-nil hex float)
(let ((val (assoc name (second node) :test #'string=)))
(cond
((null (second val))
default)
... |
508ffefa980fe001a7a9d4ca7a9ed834c5f74abdb31f27374548996d5ab71084 | rtrusso/scp | register-operand.scm | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-register-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (reg (,symbol? register-name))
:rewrite (register-name)
(sasm-ast-node <register-reference>
(:register-name registe... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm/parse/register-operand.scm | scheme | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-register-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (reg (,symbol? register-name))
:rewrite (register-name)
(sasm-ast-node <register-reference>
(:register-name registe... | |
db3ae4b9fbfbe508c5922f033440adc85ed80f8ccd6e7ea09e2a4ada98ea0968 | zilch-lang/nstar | X64.hs | # LANGUAGE TupleSections #
# LANGUAGE BinaryLiterals #
module Language.NStar.CodeGen.Machine.X64 (compileX64) where
import Language.NStar.CodeGen.Compiler
import Language.NStar.Syntax.Core hiding (Label, Instruction(..))
import Language.NStar.Typechecker.Core
import Language.NStar.CodeGen.Machine.Internal.Intermediat... | null | https://raw.githubusercontent.com/zilch-lang/nstar/8a9d1d5aa19fe6493c556ae3606c758829683762/lib/nsc-codegen/src/Language/NStar/CodeGen/Machine/X64.hs | haskell | -------------------------------------------------------------------------------------------------------------------
extern function ??
------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------... | # LANGUAGE TupleSections #
# LANGUAGE BinaryLiterals #
module Language.NStar.CodeGen.Machine.X64 (compileX64) where
import Language.NStar.CodeGen.Compiler
import Language.NStar.Syntax.Core hiding (Label, Instruction(..))
import Language.NStar.Typechecker.Core
import Language.NStar.CodeGen.Machine.Internal.Intermediat... |
0822fc46a5876360e36c95dfadcfeab5d4c17a7a1d544bc7538bdbeba6765c8c | blockfrost/blockfrost-haskell | Quantity.hs | -- | Quantity wrapper
module Blockfrost.Types.Shared.Quantity
where
import Data.Aeson (FromJSON (..), ToJSON (..), withText)
import qualified Data.Text
import GHC.Generics
import Servant.API (FromHttpApiData (..), ToHttpApiData (..))
import Servant.Docs (ToSample (..), samples)
import qualified Text.Read
newtype Q... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/d9b9537b4e74f9eb0e94a061deec82638152d377/blockfrost-api/src/Blockfrost/Types/Shared/Quantity.hs | haskell | | Quantity wrapper |
module Blockfrost.Types.Shared.Quantity
where
import Data.Aeson (FromJSON (..), ToJSON (..), withText)
import qualified Data.Text
import GHC.Generics
import Servant.API (FromHttpApiData (..), ToHttpApiData (..))
import Servant.Docs (ToSample (..), samples)
import qualified Text.Read
newtype Quantity = Quantity Int... |
209bac35e753bbe6b22de61e8f40722a67c6dec4eb7fe219027af4f8d8ba233a | nedap/formatting-stack | eastwood_warning.clj | (ns eastwood-warning
(:require
[clojure.spec.alpha :as spec]))
(def x (def y ::z))
(def reflection-warning
(letfn [(get-path [x] (.getPath x))]
(get-path (java.io.File. "a.clj"))))
(def ^:dynamic *dynamic*)
(defn no-pre-post-warning--1
"This function should not return a prepost warning (because the pre... | null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test-resources/eastwood_warning.clj | clojure | This shouldn't raise any warnings. See
This shouldn't raise any warnings. See | (ns eastwood-warning
(:require
[clojure.spec.alpha :as spec]))
(def x (def y ::z))
(def reflection-warning
(letfn [(get-path [x] (.getPath x))]
(get-path (java.io.File. "a.clj"))))
(def ^:dynamic *dynamic*)
(defn no-pre-post-warning--1
"This function should not return a prepost warning (because the pre... |
12027c2b1cd552ab24cd520cc4510595219e8124c9fb23612a76ca288a6f34af | jgrodziski/keycloak-clojure | utils.clj | (ns keycloak.utils
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.pprint :as ppr]
[me.raynes.fs :as fs])
(:import [java.net Socket InetSocketAddress]))
(defn keycloak-running? [keycloak-client]
(try
(-> keycloak-client (.realm "master")... | null | https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/e5ba6a272233d83ae1debfa4c259af5088a07856/src/keycloak/utils.clj | clojure | use transient data structures for performance reason as user count can be large
dont close stdout.. | (ns keycloak.utils
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.pprint :as ppr]
[me.raynes.fs :as fs])
(:import [java.net Socket InetSocketAddress]))
(defn keycloak-running? [keycloak-client]
(try
(-> keycloak-client (.realm "master")... |
517eccc0c1ec8f8e65ec65dd3d1f3e6a032f2be0ce9a190a60b601e02e3e989e | ml4tp/tcoq | tokens.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tools/coqdoc/tokens.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type of dictionaries
Add a string... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type ttree
val empty_ttree ... |
970c9903ece5c9e03c8d4d229cad58df125d7349f0e390ca978a3987d1ce5239 | takikawa/racket-ppa | install.rkt | #lang racket/base
(require racket/path
racket/system
racket/format
racket/file
racket/pretty
racket/list
"cmdline.rkt")
(define sign-as #f)
(define only-meta? #f)
(define dest-dir
(build-command-line
#:once-each
[("--sign-as") id "Sign Mac OS X libraries"
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/native-libs/install.rkt | racket | (increment after "-" when library versions change)
list of strings for comments in the package "info.rkt" file
dynamic libraries (as opposed to shared files)
string or #f
extra parentheses to avoid reindenting everything
pkg name
pkg suffix (increment after "-" when library versions change)
dynamic libraries (a... | #lang racket/base
(require racket/path
racket/system
racket/format
racket/file
racket/pretty
racket/list
"cmdline.rkt")
(define sign-as #f)
(define only-meta? #f)
(define dest-dir
(build-command-line
#:once-each
[("--sign-as") id "Sign Mac OS X libraries"
... |
336a6a1bbb5ab8f8a523787c0e7776c7e48a5a2478e391c3328cd9e974502311 | anmonteiro/ocaml-quic | error.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2020
*
* 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... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-quic/d4ada690841481ebea744d08ff39f49bb7d8ae89/h3/lib/error.ml | ocaml | From RFC9114§8.1:
* H3_STREAM_CREATION_ERROR (0x103): The endpoint detected that its peer
* created a stream that it will not accept.
From RFC9114§8.1:
* H3_CLOSED_CRITICAL_STREAM (0x104): A stream required by the connection
* was closed or reset.
From RFC9114§8.1:
* H3... | ----------------------------------------------------------------------------
* Copyright ( c ) 2020
*
* 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... |
85852325780d1ad51418a2cb5b0fd1617c041c606f3b433c42ffa66f66ee1e58 | weyrick/roadsend-php | make-lib.scm | (module __make-phpstd-lib
(import
(re-extension-lib "re-extensions.scm")
(php-proc-lib "php-proc.scm")
(php-string-lib "php-strings.scm")
(php-math-lib "php-math.scm")
(php-files-lib "php-files.scm")
(php-time-lib "php-time.scm")
(php-core-lib "php-core.scm")
(php-array-lib "php-array... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/standard/make-lib.scm | scheme | (module __make-phpstd-lib
(import
(re-extension-lib "re-extensions.scm")
(php-proc-lib "php-proc.scm")
(php-string-lib "php-strings.scm")
(php-math-lib "php-math.scm")
(php-files-lib "php-files.scm")
(php-time-lib "php-time.scm")
(php-core-lib "php-core.scm")
(php-array-lib "php-array... | |
9817fd5b5a77edeff1ae299a3e5ee3a185414583fbe5e49c7595530e656f44e2 | janestreet/hardcaml | bits0.ml | open Base
module T = struct
open Bin_prot.Std
module For_sexp = struct
type t =
{ width : int
; data : bytes
}
[@@deriving sexp]
end
type t = bytes [@@deriving compare, bin_io]
let width t = Int64.to_int_trunc (Bytes.unsafe_get_int64 t 0)
let offset_for_data = 8
let sexp_of_... | null | https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/src/bits0.ml | ocaml | open Base
module T = struct
open Bin_prot.Std
module For_sexp = struct
type t =
{ width : int
; data : bytes
}
[@@deriving sexp]
end
type t = bytes [@@deriving compare, bin_io]
let width t = Int64.to_int_trunc (Bytes.unsafe_get_int64 t 0)
let offset_for_data = 8
let sexp_of_... | |
9fcaace41e8c7f3a96873cee39aff4f88ced90d812d3711ea71ed27ca3cf7324 | cchalmers/circuit-notation | Testing.hs |
█ █ █ █ █ █ ╗ █ █ ╗ █ █ █ █ █ █ ╗ █ █ █ █ █ █ ╗ █ █ ╗ █ █ ╗ █ █ ╗ █ █ █ █ █ █ █ █ ╗ █ █ █ █ █ █ █ ╗
█ █ ╔ ═ ═ ═ ═ ╝ █ █ ║ █ █ ╔ ═ ═ █ █ ╗ █ █ ╔ ═ ═ ═ ═ ╝ █ █ ║ █ █ ║ █ █ ║ ╚ ═ ═ █ █ ╔ ═ ═ ╝ █ █ ╔ ═ ═ ═ ═ ╝
█ █ ║ █ █ ║ █ █ █ █ █ █ ╔ ╝ █ █ ║ █ █ ║ █ █ ║ █ █ ║ █ █ ║ █ █ █ █ █ █ █ ╗
█ █ ... | null | https://raw.githubusercontent.com/cchalmers/circuit-notation/d8f691faea696248c4621a6bd7b8cbef1687b0b7/example/Testing.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE BlockArguments #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
For testing:
# LANGUAGE ScopedTypeVariables #
# OPTIONS -fplugin=CircuitNotation #
# OPTIONS -Wno-unused-local-binds #
# OPTIONS -Wno... |
█ █ █ █ █ █ ╗ █ █ ╗ █ █ █ █ █ █ ╗ █ █ █ █ █ █ ╗ █ █ ╗ █ █ ╗ █ █ ╗ █ █ █ █ █ █ █ █ ╗ █ █ █ █ █ █ █ ╗
█ █ ╔ ═ ═ ═ ═ ╝ █ █ ║ █ █ ╔ ═ ═ █ █ ╗ █ █ ╔ ═ ═ ═ ═ ╝ █ █ ║ █ █ ║ █ █ ║ ╚ ═ ═ █ █ ╔ ═ ═ ╝ █ █ ╔ ═ ═ ═ ═ ╝
█ █ ║ █ █ ║ █ █ █ █ █ █ ╔ ╝ █ █ ║ █ █ ║ █ █ ║ █ █ ║ █ █ ║ █ █ █ █ █ █ █ ╗
█ █ ... |
582720de614737351c01520d7d3e7bcad63d8ca2d6375d00b1c3f9d82feb4d9e | DrakeAxelrod/mrclean | MrCParser.hs | Lab 4
Date : 2022 - 12 - 14
Authors : ,
Lab group : 68
Date: 2022-12-14
Authors: Hugo Lom, Drake Axelrod
Lab group: 68
-}
module MrCParser (Expr (..), parseExpr, parseExpressions, parseFile, printExpr) where
import Data.Functor.Identity (Identity)
import ... | null | https://raw.githubusercontent.com/DrakeAxelrod/mrclean/1fe5d422e9eb88b03f034e792b8ebe97fdbe5fb5/src/MrCParser.hs | haskell | | The expressions data type
| Check if the given character is a valid identifier character
| Generate a valid identifier character
| Generate a valid identifier
| Generate an arbitrary expression, with a bounded depth
| Arbitrary instance of expression
| Generate a random expression keeping track
of the ... | Lab 4
Date : 2022 - 12 - 14
Authors : ,
Lab group : 68
Date: 2022-12-14
Authors: Hugo Lom, Drake Axelrod
Lab group: 68
-}
module MrCParser (Expr (..), parseExpr, parseExpressions, parseFile, printExpr) where
import Data.Functor.Identity (Identity)
import ... |
f8de385b9c28919f4daaee9cf731ad4b27c3e0c5695c7cef00f3079504f2b7f0 | alex-gutev/cl-environments | macro-util.lisp |
;;;;
Copyright 2017
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use,
;;;; copy, modify, merge, ... | null | https://raw.githubusercontent.com/alex-gutev/cl-environments/0b22154c5afefef23d1eba9a4fae11d73580ef41/src/common/macro-util.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... |
Copyright 2017
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :cl-environments.util)
... |
16a9337d958cb00cad3a61f091ea0889ac8519fdc59cd8ce7db747457bed2349 | FlowerWrong/mblog | see_test1.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/see/see_test1.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(see_test1).
-export([main/0]).
main() ->
see:write("HELLO WORLD\n"),
see:write(integer_to_list(see:modules_loaded()-8) ++ " modules loaded\n").
|
ed3a0ff3d418df61375528d4e853e515176840ebf1b78cda17d48632f0c94654 | bitc/omegagb | GuiTest02.hs | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
-----------------------------------------------------------------------------
-- |
-- Module : GuiTest02
Copyright : ( c ) Bit Connor 2007 < >
-- License : GPL
-- Maintainer :
-- Stability... | null | https://raw.githubusercontent.com/bitc/omegagb/5ab9c3a22f5fc283906b8af53717d81fef96db7f/src/GuiTest02.hs | haskell | ---------------------------------------------------------------------------
|
Module : GuiTest02
License : GPL
Maintainer :
Stability : in-progress
OmegaGB
Game Boy Emulator
---------------------------------------------------------------------------
for video capture, counts the current fram... | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
Copyright : ( c ) Bit Connor 2007 < >
This module runs a gtk+ application that emulates a ROM , including a
display and push buttons for joypad control .
module GuiTest02 where
import qualified Co... |
eb05e2452b7d128250f4c193ebc2a15249178fb2c67413a04b071bf10e51b6af | mathinstitut/goemaxima | trigrat.lisp | (in-package :maxima)
(defun $listofei (e )
(declare (special $d2% $lg% $lexp%))
(setq $d2% (copy-tree (car e)))
(setq $lg% ())
(setq $lexp% ())
(do ((lvar (caddr $d2%) (cdr lvar))
(lg% (cadddr $d2%) (cdr lg%))
(var))
((null lvar)(setq $lg% (cons '(mlist) $lg%))
... | null | https://raw.githubusercontent.com/mathinstitut/goemaxima/2850e0d6af503fc8602d80340a0557f6f14affd2/stack/2023010400/maxima/trigrat.lisp | lisp | Check that we have a factor of %i. This test includes
cases like %i, and %i*x/2, which we get for e.g.
sin(1) and sin(x/2). | (in-package :maxima)
(defun $listofei (e )
(declare (special $d2% $lg% $lexp%))
(setq $d2% (copy-tree (car e)))
(setq $lg% ())
(setq $lexp% ())
(do ((lvar (caddr $d2%) (cdr lvar))
(lg% (cadddr $d2%) (cdr lg%))
(var))
((null lvar)(setq $lg% (cons '(mlist) $lg%))
... |
058efb52885d5beb1083d31ce149c60bd5b910a8af85104cb7374162db35e656 | discus-lang/ddc | Ctx.hs |
module DDC.Core.Exp.Annot.Ctx
( Ctx (..)
, isTopLetCtx
, topOfCtx
, takeEnclosingCtx
, takeTopNameOfCtx
, takeTopLetEnvNamesOfCtx
, encodeCtx)
where
import DDC.Core.Exp.Annot.Exp
import DDC.Core.Env.EnvX (EnvX)
import Data.Set ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Exp/Annot/Ctx.hs | haskell | | The top-level context.
| Body of a type abstraction.
| Body of a value or witness abstraction.
| Left of an application.
| Right of an application.
| Body of a let-expression.
| In a non-recursive let-binding.
We store the binder and body of the let expression.
binder of current let-binding.
let body
| I... |
module DDC.Core.Exp.Annot.Ctx
( Ctx (..)
, isTopLetCtx
, topOfCtx
, takeEnclosingCtx
, takeTopNameOfCtx
, takeTopLetEnvNamesOfCtx
, encodeCtx)
where
import DDC.Core.Exp.Annot.Exp
import DDC.Core.Env.EnvX (EnvX)
import Data.Set ... |
d5e1e2e455eda316b2d1610e35b5a4839b147014eb410b6369a4d391bd985893 | Dasudian/DSDIN | dsdtx_sign_tests.erl | %%%-------------------------------------------------------------------
( C ) 2018 , Dasudian Technologies
%%%-------------------------------------------------------------------
-module(dsdintx_sign_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("apps/dsdcore/include/blocks.hrl").
-define(TEST_MODU... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdtx/test/dsdtx_sign_tests.erl | erlang | -------------------------------------------------------------------
------------------------------------------------------------------- | ( C ) 2018 , Dasudian Technologies
-module(dsdintx_sign_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("apps/dsdcore/include/blocks.hrl").
-define(TEST_MODULE, dsdintx_sign).
sign_txs_test_() ->
{setup,
fun() ->
dsdc_test_utils:dsdc_keys_setup()
end,
fun(TmpKeysDir... |
04bed7243a3e5d3aa8aed59dcddea754f78635ee05a79b51bb060876661fd862 | s-expressionists/Eclector | methods.lisp | (cl:in-package #:eclector.readtable.simple)
(defmethod eclector.readtable:readtablep ((readtable readtable))
t)
(defun parse-parameter-and-sub-char (stream)
(loop for parameter = 0 then (+ (* 10 parameter) value)
for parameter-given = nil then t
for char2 = (eclector.base:read-char stream t nil t)... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/ed4ebd3d03981d225004b5d969db766d49ca16b4/code/readtable/simple/methods.lisp | lisp | If there is no macro function for SUB-CHAR, signal an error
for variable *READ-SUPPRESS* says
Dispatching macro characters (including sharpsign)
Dispatching macro characters continue to parse an infix
numerical argument, and invoke the dispatch function. The
standardized sharpsign reader macros do not e... | (cl:in-package #:eclector.readtable.simple)
(defmethod eclector.readtable:readtablep ((readtable readtable))
t)
(defun parse-parameter-and-sub-char (stream)
(loop for parameter = 0 then (+ (* 10 parameter) value)
for parameter-given = nil then t
for char2 = (eclector.base:read-char stream t nil t)... |
26ed6e617d0527f97c9ce5a7815ce43ff5831ae07ae8d120aef02bcdee0572de | avsm/mirage-duniverse | set_ipv4_test.ml | open Tuntap
open OUnit2
open Ipaddr
let test_setipv4 ipv4 netmask _ctx =
let ipv4 = V4.of_string_exn ipv4 in
let netmask = V4.Prefix.make netmask ipv4 in
let fd, devname = opentap ~devname:"tap0" () in
set_ipv4 ~netmask devname ipv4;
let iface_addr = List.hd @@ v4_of_ifname devname in
assert_equal
~ms... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tuntap/test/set_ipv4_test.ml | ocaml | open Tuntap
open OUnit2
open Ipaddr
let test_setipv4 ipv4 netmask _ctx =
let ipv4 = V4.of_string_exn ipv4 in
let netmask = V4.Prefix.make netmask ipv4 in
let fd, devname = opentap ~devname:"tap0" () in
set_ipv4 ~netmask devname ipv4;
let iface_addr = List.hd @@ v4_of_ifname devname in
assert_equal
~ms... | |
edd21be699d6aa29a4c4f8dc8b5ac33579b2df7c2abf9fb490b57c4fd1db89f4 | input-output-hk/cardano-wallet | Blocks.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Integration.Scenario.API.Blocks
( spec
) where
import Prelude
import Cardano.Wallet.Api.Types.BlockHeader
( ApiBlockHeader )
import Test.Hspec
( SpecWith, describe )
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/integration/src/Test/Integration/Scenario/API/Blocks.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Integration.Scenario.API.Blocks
( spec
) where
import Prelude
import Cardano.Wallet.Api.Types.BlockHeader
( ApiBlockHeader )
import Test.Hspec
( SpecWith, describe )
import ... | |
2e3197ec0adb75aa579ad4e662ddf10e3c184e1e91504d54b56804b67d291b5b | typeable/octopod | Types.hs | -- |
--Module : Types
--Description : Backend types.
--
--This module contains backend types.
module Types
( module Common.Types,
parseDeploymentMetadata,
ServerPort (..),
DBPoolSize (..),
DBConnectionString (..),
ProjectName (..),
Domain (..),
Namespace (..),
Command (..),
Ti... | null | https://raw.githubusercontent.com/typeable/octopod/372f5dd63585f07fa36ab76b70a67d9c94636e6b/octopod-backend/src/Types.hs | haskell | |
Module : Types
Description : Backend types.
This module contains backend types.
| Parses deployment metadata.
| Server port.
| Database pool size.
| Database connection string.
| A Kubernetes namespace.
| Timeout.
| Path to a deployment control script.
| Control script arguments. | module Types
( module Common.Types,
parseDeploymentMetadata,
ServerPort (..),
DBPoolSize (..),
DBConnectionString (..),
ProjectName (..),
Domain (..),
Namespace (..),
Command (..),
Timeout (..),
ControlScriptArgs (..),
ControlScriptTimeout (..),
)
where
import Data.ByteS... |
94221917eeb4cb6f962cf18f81947bd8da78060b34ce94a05ff7faee7fc848da | bhb/expound | alpha.cljc | (ns expound.alpha
"Generates human-readable errors for `clojure.spec`"
(:require [expound.problems :as problems]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[clojure.set :as set]
[expound.printer :as printer]
[expound.util :as util]
... | null | https://raw.githubusercontent.com/bhb/expound/3cb45f445dac28f989142529f37f3d22b2693a42/src/expound/alpha.cljc | clojure | registry ;;;;;;
internal specs ;;;;;;
themes ;;;;;;
private ;;;;;;
FIXME: It's silly to reconstruct a fake "problem"
after I've deconstructed it, but I'm not yet ready
to break the API for value-in-context BUT
I do want to test that a problems-based API
is useful.
via is different when using asserts
Used in ... | (ns expound.alpha
"Generates human-readable errors for `clojure.spec`"
(:require [expound.problems :as problems]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[clojure.set :as set]
[expound.printer :as printer]
[expound.util :as util]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.