_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 |
|---|---|---|---|---|---|---|---|---|
d421b7c7efd11744a194f6de9d5f612c71fe18906985717c83f4b9884c172067 | ilitirit/manardb | tree.lisp | (in-package #:manardb.test)
(stefil:in-suite manardb-test)
(defmmclass tree ()
((numval :type (unsigned-byte 50) :initform 666 :initarg :numval)
(general-val :initform 'gen-val :initarg :general-val :accessor tree-general-val)
(id :initform (random (ash 1 40)) :type (unsigned-byte 40) :accessor tree-id)
(v... | null | https://raw.githubusercontent.com/ilitirit/manardb/6791f3569acd42b723ce82051cc8e2e3ee42a671/t/tree.lisp | lisp | (in-package #:manardb.test)
(stefil:in-suite manardb-test)
(defmmclass tree ()
((numval :type (unsigned-byte 50) :initform 666 :initarg :numval)
(general-val :initform 'gen-val :initarg :general-val :accessor tree-general-val)
(id :initform (random (ash 1 40)) :type (unsigned-byte 40) :accessor tree-id)
(v... | |
cf6d718ee13f7eb4263ac955a86983bf3d9441c83567cbc5fe5488ebfdffc996 | korya/efuns | makefile_mode.ml | (***********************************************************************)
(* *)
xlib for
(* *)
Fabrice Le Fessant , projet Para / SOR , INRIA Rocq... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/efuns/makefile_mode.ml | ocaml | *********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Options
open Text
open Keymap
open Efuns
open Simple
op... |
eeba57895d4da0260ef522f48b67f2757af0b5e6d076f6d3d6efb67a3f40b044 | edbutler/nonograms-rule-synthesis | cegis.rkt | #lang rosette/safe
(provide
(struct-out counter-example)
create-verifier
verifier-shutdown
verify-program
use-verifiers
find-program-unsound-example
find-program-uncovered-example
run-cegis
(struct-out synthesis-objective-function)
run-incremental-optimization)
(require
(only-in racket match-def... | null | https://raw.githubusercontent.com/edbutler/nonograms-rule-synthesis/16f8dacb17bd77c9d927ab9fa0b8c1678dc68088/src/learn/cegis.rkt | racket | definitely don't want to be serializing this thing
an input that breaks a particular program
input: line?
also definitely do not want to serialize this
name : symbol? - name of this objctive
do-assert: Program? -> void? - given last valid guess, assert (on the guesser) constraints to improve this objective
find-... | #lang rosette/safe
(provide
(struct-out counter-example)
create-verifier
verifier-shutdown
verify-program
use-verifiers
find-program-unsound-example
find-program-uncovered-example
run-cegis
(struct-out synthesis-objective-function)
run-incremental-optimization)
(require
(only-in racket match-def... |
dff335e3a19203469605b75967d28ac25455aca06ff8bc372cb57e48ec65af0e | jhidding/chez-glfw | GL_VERSION_1_0.scm | (library (glfw gl GL_VERSION_1_0)
(export
glAccum
glAlphaFunc
glBegin
glBitmap
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
... | null | https://raw.githubusercontent.com/jhidding/chez-glfw/fe53b5d8915c1c0b9f6a07446a0399a430d09851/glfw/gl/GL_VERSION_1_0.scm | scheme | (library (glfw gl GL_VERSION_1_0)
(export
glAccum
glAlphaFunc
glBegin
glBitmap
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
... | |
9f7d69681b1a4dde64abf7a500fed79d9f844fe102f20ee94bbaf55d76e93f4a | chetmurthy/typpx | options.mli | val compiler_libs_options : (string * Arg.spec * string) list
| null | https://raw.githubusercontent.com/chetmurthy/typpx/a740750b75739e686da49b46ded7db7d6874e108/src/options.mli | ocaml | val compiler_libs_options : (string * Arg.spec * string) list
| |
36003e7b65b2ca4d6266c7494e6f0d6a14ed2f0b5fa00297cfb5ac391b1f17ae | xvw/muhokama | lib_form.ml | open Lib_common
module VO = Validate.Applicative.Traversable (Preface.Option.Applicative)
module OV = Preface.Option.Applicative.Traversable (Validate.Applicative)
type 'a validated = 'a Validate.t
type ('a, 'b) validator = 'a -> 'b validated
let from_predicate = Validate.from_predicate
let unconvertible given_value... | null | https://raw.githubusercontent.com/xvw/muhokama/fc0879ec44e7bbb99f140950191e2a883fe60597/lib/form/lib_form.ml | ocaml | open Lib_common
module VO = Validate.Applicative.Traversable (Preface.Option.Applicative)
module OV = Preface.Option.Applicative.Traversable (Validate.Applicative)
type 'a validated = 'a Validate.t
type ('a, 'b) validator = 'a -> 'b validated
let from_predicate = Validate.from_predicate
let unconvertible given_value... | |
656ffeeb3e6bc3b0e9b55030cdc2c699bd086cb31bc29906505a12dc1ab0722c | lachenmayer/arrowsmith | Variable.hs | module AST.Variable where
import Control.Applicative ((<$>), (<*>))
import Data.Binary
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import Text.PrettyPrint as P
import qualified AST.Helpers as Help
import AST.PrettyPrint
-- VARIABLES
newtype Raw = Raw String
deriving (Eq,Ord,Show)
d... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/elm-compiler/src/AST/Variable.hs | haskell | VARIABLES
VARIABLE RECOGNIZERS
VARIABLE TO STRING
LISTINGS
| A listing of values. Something like (a,b,c) or (..) or (a,b,..)
| A value that can be imported or exported
CATEGORIZING VALUES
PRETTY VARIABLES
BINARY SERIALIZATION | module AST.Variable where
import Control.Applicative ((<$>), (<*>))
import Data.Binary
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import Text.PrettyPrint as P
import qualified AST.Helpers as Help
import AST.PrettyPrint
newtype Raw = Raw String
deriving (Eq,Ord,Show)
data Home
... |
030033792167acf3d358da89f9d7b3de01121468051be62376091dab47a1f31c | GaloisInc/pate | RegisterDomain.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE PolyKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE UndecidableInstances #
{-# LANGUAGE OverloadedSt... | null | https://raw.githubusercontent.com/GaloisInc/pate/a48c447156d95686c308a6d5ec696464120e0970/src/Pate/Equivalence/RegisterDomain.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
-------------------------------------------
Register domain
| The register domain of an equivalence problem: representing the registers that are either
assumed (in a pre-domain) or proven (in a post-domain) to be equivalent.
| Register doma... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE PolyKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
module Pate.Equ... |
cce72f7df3d8a4e6db5cead22a888a9815c0cb9245e87d876f38776b5bbd38bf | project-oak/hafnium-verification | loopInvariant.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/checkers/loopInvariant.mli | ocaml | * Map loop header node -> all nodes in the loop
* Map loop head -> invariant vars in loop |
* 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
... |
a6c316a14138386594afbccdc3a90adc6bc92399a01d82b6fd64ad698cf514d2 | chicken-mobile/chicken-sdl2-android-builder | window.scm | ;;
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
;;
Copyright © 2013 , 2015 - 2016 .
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; - Redistributions... | null | https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/enums/window.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributio... | chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2
Copyright © 2013 , 2015 - 2016 .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT N... |
38b4987c2ddb2386cf20c5cd81fc797bea6f6589b4f3f22a6fbea854220c46c2 | gergoerdi/hm-compo | Linear.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
# LANGUAGE RecordWildCards #
module Language.HM.Linear where
import Language.HM.Monad
import Language.HM.Syntax
import Language.HM.Meta
import Language.HM.Error
import Control.Monad.ST
import Control.Unification.Types
import Text.PrettyPrint.HughesPJClass (Doc, P... | null | https://raw.githubusercontent.com/gergoerdi/hm-compo/386826e570fc6b6a078927bde85f3941e9a77e87/src/Language/HM/Linear.hs | haskell | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
# LANGUAGE RecordWildCards #
module Language.HM.Linear where
import Language.HM.Monad
import Language.HM.Syntax
import Language.HM.Meta
import Language.HM.Error
import Control.Monad.ST
import Control.Unification.Types
import Text.PrettyPrint.HughesPJClass (Doc, P... | |
6761aec5ff41d536e2266b46228c6c360c6d93e709f8c8b7b009d2ce245d91aa | goosedb/InterpolatePlugin | PluginS.hs | module PluginS where
import InterpolatePlugin ( pluginSettingsShow, defaultParserSettings, plugin' )
import GhcPlugins ( Plugin )
plugin :: Plugin
plugin = plugin' $ pluginSettingsShow defaultParserSettings | null | https://raw.githubusercontent.com/goosedb/InterpolatePlugin/fc9eafbe68ae390135b05520d2dde2c3638c83a8/src/PluginS.hs | haskell | module PluginS where
import InterpolatePlugin ( pluginSettingsShow, defaultParserSettings, plugin' )
import GhcPlugins ( Plugin )
plugin :: Plugin
plugin = plugin' $ pluginSettingsShow defaultParserSettings | |
6836fe78133e4bed38fb6ed832a89fe43300a4ca8a1a337370f9d3f2cd4a0d26 | FlowForwarding/LINC-Switch | linc_us4_port_load_regulator_tests.erl | -module(linc_us4_port_load_regulator_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("of_protocol/include/of_protocol.hrl").
-include_lib("of_protocol/include/ofp_v4.hrl").
-include("linc_us4.hrl").
-include("linc_us4_port.hrl").
-define(SWITCH_ID, 0).
-define(PORT_NO, 1).
-define(ZERO_HOUR, {0,0,0}).
... | null | https://raw.githubusercontent.com/FlowForwarding/LINC-Switch/9c28e7c8677c03440a62023292dd700fef0c3420/apps/linc_us4/test/linc_us4_port_load_regulator_tests.erl | erlang | Test generators --------------------------------------------------------------
Tests ------------------------------------------------------------------------
GIVEN
and we assume that linc_us4_port_load_regulator:limit_load_if_necesseary/2
won't execute longer than acceptable delay (as defined in linc_us4_port
WHE... | -module(linc_us4_port_load_regulator_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("of_protocol/include/of_protocol.hrl").
-include_lib("of_protocol/include/ofp_v4.hrl").
-include("linc_us4.hrl").
-include("linc_us4_port.hrl").
-define(SWITCH_ID, 0).
-define(PORT_NO, 1).
-define(ZERO_HOUR, {0,0,0}).
... |
4ddbac00ac8d7401e5d42b54f2b75a6834b1380fea0960758b03b0ae5986ef11 | zmactep/hasbolt-sample-app | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.List
import Control.Monad.Except (MonadIO, MonadError, catchError, liftIO)
import Control.Applicative ((<$>))
import System.Environment (getEnv)
import Database.Bolt
import SimpleServer
-- |Default configuration for localhost neo4j server
defaultC... | null | https://raw.githubusercontent.com/zmactep/hasbolt-sample-app/bae5aae8ed21e6b8779fe8041a681b3fbb1e746d/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
|Default configuration for localhost neo4j server |
module Main where
import Data.List
import Control.Monad.Except (MonadIO, MonadError, catchError, liftIO)
import Control.Applicative ((<$>))
import System.Environment (getEnv)
import Database.Bolt
import SimpleServer
defaultConfig :: BoltCfg
defaultConfig = def {user = "neo4j", password = "neo4j"}
|Run as POR... |
888b2938046dfc815255d24e5e8de6ee850b711eb1b380ede78e79a82cfb5f1a | clj-kondo/clj-kondo | parser.clj | (ns ^{:no-doc true} clj-kondo.impl.rewrite-clj.parser
(:require [clj-kondo.impl.rewrite-clj.node :as node]
[clj-kondo.impl.rewrite-clj.parser.core :as p]
[clj-kondo.impl.rewrite-clj.reader :as reader]))
# # Parser Core
(defn parse
"Parse next form from the given reader."
[reader]
(p/... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/parser/clj_kondo/impl/rewrite_clj/parser.clj | clojure | (ns ^{:no-doc true} clj-kondo.impl.rewrite-clj.parser
(:require [clj-kondo.impl.rewrite-clj.node :as node]
[clj-kondo.impl.rewrite-clj.parser.core :as p]
[clj-kondo.impl.rewrite-clj.reader :as reader]))
# # Parser Core
(defn parse
"Parse next form from the given reader."
[reader]
(p/... | |
31dfa8ecd9ec5c3f98bf07375761ae41c4afc4038d5ec38bc88a087c0517088a | tristanstraub/garden-mower | emitter.clj | (ns garden-mower.impl.emitter
(:require [garden.stylesheet]
[clojure.string :as str]))
(defmulti emit :type)
(defmethod emit :style-rule
[{:keys [selector style]}]
[(str/replace (name selector) "/" "\\/")
(->> style
(map (fn [{:keys [name value priority]}]
[name (if priorit... | null | https://raw.githubusercontent.com/tristanstraub/garden-mower/4d3acd744d33ea281560c7e42713f9ca7c01376d/src/garden_mower/impl/emitter.clj | clojure | (ns garden-mower.impl.emitter
(:require [garden.stylesheet]
[clojure.string :as str]))
(defmulti emit :type)
(defmethod emit :style-rule
[{:keys [selector style]}]
[(str/replace (name selector) "/" "\\/")
(->> style
(map (fn [{:keys [name value priority]}]
[name (if priorit... | |
bd33e8272ca46f9db5f78903631047685330f3dd68f8b7e33463b6dd9eb4847f | bhauman/cljs-test-display | dev.cljs | (ns ^:figwheel-hooks cljs-test-display.dev
(:require
[cljs-test-display.core :as cljs-display]
[cljs-testing.core-test]
[cljs-testing.other-test]))
(defn ^:after-load run []
(cljs.test/run-tests (cljs-display/init! :apper)
'cljs-testing.core-test
'cljs-testing... | null | https://raw.githubusercontent.com/bhauman/cljs-test-display/727a08d298b1ce380de4c8f0145254b95eb957cd/dev/cljs_test_display/dev.cljs | clojure | (ns ^:figwheel-hooks cljs-test-display.dev
(:require
[cljs-test-display.core :as cljs-display]
[cljs-testing.core-test]
[cljs-testing.other-test]))
(defn ^:after-load run []
(cljs.test/run-tests (cljs-display/init! :apper)
'cljs-testing.core-test
'cljs-testing... | |
29578f3d6c6a06263661423f9a472efddb95ee83d265ad5c72261111e4fcac37 | tolitius/boot-check | helper.clj | (ns tolitius.boot.helper
(:require [boot.core :as core]
[boot.pod :as pod]))
(defn tmp-dir-paths [fs]
(mapv #(.getAbsolutePath %)
(core/input-dirs fs)))
(defn fileset->paths [fileset]
(->> fileset
core/user-files
(mapv (comp #(.getAbsolutePath %) core/tmp-file))))
(defn make-... | null | https://raw.githubusercontent.com/tolitius/boot-check/e9d766532e7e8d2a7c4e11ee016922789e35d6d2/src/tolitius/boot/helper.clj | clojure | (ns tolitius.boot.helper
(:require [boot.core :as core]
[boot.pod :as pod]))
(defn tmp-dir-paths [fs]
(mapv #(.getAbsolutePath %)
(core/input-dirs fs)))
(defn fileset->paths [fileset]
(->> fileset
core/user-files
(mapv (comp #(.getAbsolutePath %) core/tmp-file))))
(defn make-... | |
bf86cfa583ef40a44aaeec3aef9d68edd4bfebd41599211b2af6b87e55a49ce4 | dbuenzli/fut | cancel.ml |
open Fut.Op
let log f = Format.printf (f ^^ "@?")
let str = Format.sprintf
let () = Random.self_init ()
let string_of_file : string -> string Fut.t =
let count = ref 0 in
fun file -> incr count;
let count = !count in
let d = 1. +. Random.float 2. in
Printf.printf "Create %s: %d %gs\n%!" file count d;... | null | https://raw.githubusercontent.com/dbuenzli/fut/907de63df12815f2df2cb796baa7fa37ac2758d4/test/cancel.ml | ocaml | simulate taking time. |
open Fut.Op
let log f = Format.printf (f ^^ "@?")
let str = Format.sprintf
let () = Random.self_init ()
let string_of_file : string -> string Fut.t =
let count = ref 0 in
fun file -> incr count;
let count = !count in
let d = 1. +. Random.float 2. in
Printf.printf "Create %s: %d %gs\n%!" file count d;... |
e95e68cca0ba079ae65e809d48dcac89c120135871fc420cae1e8fc3515bcc88 | jserot/lascar | ltsa.mli | (**********************************************************************)
(* *)
LASCAr
(* *)
Copyright ( c ) 2017 - prese... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/ltsa.mli | ocaml | ********************************************************************
This source code is licensed under the lic... | LASCAr
Copyright ( c ) 2017 - present , . All rights reserved .
* { 2 Labeled Transition Systems with State Attributes }
A Labeled Transition System with Attributes on states ( LTSA ) is 6 - uple [ ( Q , L , A , I , a , R ) ] where
- ... |
3cef758dc8a1ad33e69d4a7f36fd090fd5ab473cbdfa5e040b2b075704f8baf3 | ttyerlsol/rockse | rockse_tbl.erl | -module(rockse_tbl).
-behaviour(gen_server).
%% API
-export([start_link/2]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {table, path, port}).
-define(TIMEOUT, 1000).
%%%=======================================================... | null | https://raw.githubusercontent.com/ttyerlsol/rockse/d3f800388ae87d82567b775d3a0d88ac61a71872/src/rockse_tbl.erl | erlang | API
gen_server callbacks
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Starts the server
@end
---------------------------------------------------... | -module(rockse_tbl).
-behaviour(gen_server).
-export([start_link/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {table, path, port}).
-define(TIMEOUT, 1000).
( ) - > { ok , Pid } | ignore | { error , Error }
start_link(Table, Dir) when is_ato... |
ef3f3cfa3f8927fcbfdd7c886a0fb3127c3d1718bc0407282a11799fb054947e | ChrisPenner/charter | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Charts
import Examples.Histogram
import Examples.Random
import Examples.LineChart
import Examples.Auto
import Examples.ScatterChart
import Examples.BarChart
import Examples.ColumnChart
import Examples.AreaChart
-- main :: IO ()
main = serveChart 8080 myAut... | null | https://raw.githubusercontent.com/ChrisPenner/charter/c2d8c0c6e6654b140e2837f2da76aa972d6ecf32/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
main :: IO ()
main = serveUpdatingRandomChart | module Main where
import Charts
import Examples.Histogram
import Examples.Random
import Examples.LineChart
import Examples.Auto
import Examples.ScatterChart
import Examples.BarChart
import Examples.ColumnChart
import Examples.AreaChart
main = serveChart 8080 myAutoChart
main :: IO ()
main = serveChart 8080 myAutoC... |
d1f2696de4545de2cf8e3ef5fcd7bb4ca949b2384c7a1ac81f1543e3e9b3507e | Bogdanp/racket-wasm | binary.rkt | #lang racket/base
(define-syntax-rule (reprovide mod ...)
(begin
(require mod ...)
(provide (all-from-out mod ...))))
(reprovide "binary-read.rkt")
| null | https://raw.githubusercontent.com/Bogdanp/racket-wasm/9d84041f8de1ad4d9c6ac6e80c381ee525a1d30a/wasm-lib/private/binary.rkt | racket | #lang racket/base
(define-syntax-rule (reprovide mod ...)
(begin
(require mod ...)
(provide (all-from-out mod ...))))
(reprovide "binary-read.rkt")
| |
17a6defc5c925157c82449361f09291c72134a520faa175c7981cc3ea6a8e45f | emina/rosette | alanon_arkansas_2.rkt | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/alanon_arkansas.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth ... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/websynth/test/alanon_arkansas_2.rkt | racket | Record 0 fields
Record 1 fields
Cross-record Mask
Record 0 zpath asserts
Record 1 zpath asserts
Record 0 Field Mask Generation
Record 1 Field Mask Generation
Record Mask
Solve
Record 0 zpaths
Record 1 zpaths | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/alanon_arkansas.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth ... |
0f2cdff8b3f52780141ce7b7331754bacf3a1ef7b496933588a1233ca4db094b | erlcloud/erlcloud | erlcloud_ec2_tests.erl | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_ec2_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud.hrl").
-include("erlcloud_ec2.hrl").
%% Unit tests for ec2.
These tests work by using to mock erlcloud_httpc . There are two classes of test : input... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/ab0b2111fca1b73b3e8e928ebf36f333c813c9d0/test/erlcloud_ec2_tests.erl | erlang | Unit tests for ec2.
Input tests verify that different function args produce the desired query parameters.
An input test list provides a list of funs and the parameters that are expected to result.
Output tests verify that the http response produces the correct return from the fun.
An output test lists provides a... | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_ec2_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud.hrl").
-include("erlcloud_ec2.hrl").
These tests work by using to mock erlcloud_httpc . There are two classes of test : input and output .
-define(... |
0e04258d4a32b72b7fed4144fe9d3e21478bf1819bea1c54d36b5b12813b3947 | tbsklg/advent-of-code-2022 | Day12Spec.hs | module Day12Spec where
import qualified Data.Map as M
import qualified Data.Set as S
import Day12
import Test.Hspec (Spec, describe, it, shouldBe)
testGrid :: [[Char]]
testGrid = ["Sabqponm", "abcryxxl", "accszExk", "acctuvwj", "abdefghi"]
spec :: Spec
spec = do
describe "Hill Climbing Algorithm" $ do
it "shou... | null | https://raw.githubusercontent.com/tbsklg/advent-of-code-2022/97953a051e4102a2daba9b213ce9489d9b512506/test/Day12Spec.hs | haskell | module Day12Spec where
import qualified Data.Map as M
import qualified Data.Set as S
import Day12
import Test.Hspec (Spec, describe, it, shouldBe)
testGrid :: [[Char]]
testGrid = ["Sabqponm", "abcryxxl", "accszExk", "acctuvwj", "abdefghi"]
spec :: Spec
spec = do
describe "Hill Climbing Algorithm" $ do
it "shou... | |
3bf7a9e54f49db2bb39d356b72586648139ea9f970d6e90f15e682f641c5c702 | vasilisp/inez | camlp4_maps.ml | open Camlp4.PreCast
let gensym =
let cnt = ref 0 in
fun ?(prefix = "_x") () ->
incr cnt;
Printf.sprintf "%s__%03i_" prefix !cnt
let uf_ast_fun _loc mid mid' (l, rtype) =
let fold l init =
let f y acc =
match y with
| `Int ->
<:expr< Type.Y_Int_Arrow $acc$ >>
| `Bool ->
... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/camlp4_maps.ml | ocaml | open Camlp4.PreCast
let gensym =
let cnt = ref 0 in
fun ?(prefix = "_x") () ->
incr cnt;
Printf.sprintf "%s__%03i_" prefix !cnt
let uf_ast_fun _loc mid mid' (l, rtype) =
let fold l init =
let f y acc =
match y with
| `Int ->
<:expr< Type.Y_Int_Arrow $acc$ >>
| `Bool ->
... | |
fa31efc23e6e6c18cb2086ec9f5725a193740903ec78dbf839a8bac07895d53b | libguestfs/virt-v2v | nbdkit.mli | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/9788b06765af335b054aba03f41d1b829ed13092/lib/nbdkit.mli | ocaml | * nbdkit as an abstract data type.
This "standalone" library can be used to examine nbdkit on
the system, probe for plugins and filters, and construct
and run nbdkit commands.
* Return true iff nbdkit is installed and passes some
rudimentary tests that it is working. Note this may
return true eve... | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
a4771225d796f4a384ff4d76895b19695f133842be4ffe048f9f970563de6b69 | BillHallahan/G2 | Where1.hs | module Where1 where
f :: Int -> Int
f x = g x
where
g :: Int -> Int
g 4 = 1
g y = g 4
| null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/Where1.hs | haskell | module Where1 where
f :: Int -> Int
f x = g x
where
g :: Int -> Int
g 4 = 1
g y = g 4
| |
f3397cc90dc4b2e62120bc39251817f402b2b2755c035087803086500ea3ea35 | jaspervdj/websockets | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (threadDelay)
import qualified Control.Concurrent.Async as Async
import qualified Control.Exception as E
import Control.Monad (forever)
import qualified Data.Text as T
import qualif... | null | https://raw.githubusercontent.com/jaspervdj/websockets/95dc7159322c8a60cbbbf0911571aef83673ec88/tests/issue-158/Main.hs | haskell | # LANGUAGE OverloadedStrings # | module Main where
import Control.Concurrent (threadDelay)
import qualified Control.Concurrent.Async as Async
import qualified Control.Exception as E
import Control.Monad (forever)
import qualified Data.Text as T
import qualified Network.WebSockets as WS
... |
12a549d535fbf7767dabf79eb47f325d33949f1cd4967a8a94775e4e83c0612a | manuel-serrano/hop | http_shoutcast.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/3.0.x / runtime / http_shoutcast.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/runtime/http_shoutcast.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The HTTP response */
*===========================... | * serrano / prgm / project / hop/3.0.x / runtime / http_shoutcast.scm * /
* Author : * /
* Creation : Thu Nov 25 14:15:42 2004 * /
* Last change : Tue Nov 18 09:47:31 2014 ( serrano ) * /
* Copyri... |
2ef28691de429196ea7ea11879f2f21d29d6ba67bba922c19195ee49fed74c5b | htmfilho/minimily | project.clj | (defproject minimily "0.1.0-SNAPSHOT"
:description "Minimily is an application designed to help you keeping your
life as simple as possible. We will help you to make decisions
taking into account the impact on your health, family, living
place, community and environment... | null | https://raw.githubusercontent.com/htmfilho/minimily/fc0fa176cc3fb83fd326cc5b3b8c31fa09169fc9/project.clj | clojure | Database dependencies
db driver
sql abstraction
connection pool (-cp)
migration
hikari-cp's dependency
Web dependencies
web security
routing library
html template library
template system used for email messages
web application library
web development facilities
email library
Extra dependencies
manage en... | (defproject minimily "0.1.0-SNAPSHOT"
:description "Minimily is an application designed to help you keeping your
life as simple as possible. We will help you to make decisions
taking into account the impact on your health, family, living
place, community and environment... |
83009878e3b69a78590a35fefcf83bf8a64c1037e0e2b9c36e36b9a56037c919 | joyofclojure/book-source | futures.clj | (ns joy.futures
"Examples for futures"
(:require (clojure [xml :as xml]))
(:require (clojure [zip :as zip]))
(:import (java.util.regex Pattern)))
(defn feed->zipper [uri-str]
(->> (xml/parse uri-str)
zip/xml-zip))
(defn normalize [feed]
(if (= :feed (:tag (first feed)))
feed
(zip/down feed... | null | https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/src/clj/joy/futures.clj | clojure | => 0 | (ns joy.futures
"Examples for futures"
(:require (clojure [xml :as xml]))
(:require (clojure [zip :as zip]))
(:import (java.util.regex Pattern)))
(defn feed->zipper [uri-str]
(->> (xml/parse uri-str)
zip/xml-zip))
(defn normalize [feed]
(if (= :feed (:tag (first feed)))
feed
(zip/down feed... |
81e6bad6221ea01a411f58cafd25cd8fb6c5e53a5fa891b560faab66a82b08f2 | Chris00/ocaml-dropbox | get_file.ml | open Lwt
module D = Dropbox_lwt_unix
let download t fn =
D.get_file t fn >>= function
| None -> Lwt_io.printlf "No file named %S." fn
| Some(m, stream) ->
(* Save stream to the disk *)
let fname = Filename.basename fn in
Lwt_unix.(openfile fname [O_WRONLY; O_CREAT; O_TRUNC] 0o664)
>>= fun fd ... | null | https://raw.githubusercontent.com/Chris00/ocaml-dropbox/36b222269e6bc7e5486cbb69738841d87a1212fb/tests/get_file.ml | ocaml | Save stream to the disk | open Lwt
module D = Dropbox_lwt_unix
let download t fn =
D.get_file t fn >>= function
| None -> Lwt_io.printlf "No file named %S." fn
| Some(m, stream) ->
let fname = Filename.basename fn in
Lwt_unix.(openfile fname [O_WRONLY; O_CREAT; O_TRUNC] 0o664)
>>= fun fd ->
let write s =
let s ... |
b4c44787139bc6aaf5f34cbd8473842bea3720ac05e189b430eb987f848c7952 | brendanhay/gogol | Product.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-cloudtrace/gen/Gogol/CloudTrace/Internal/Product.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Annotation
* Attributes
* Attributes_AttributeMap
* BatchWriteSpansRequest
* Empty
* Link
* Links
* MessageEvent
* Module
* Span
* StackFrame
* StackFrames
* Status
* Status_DetailsItem
| Text annotation with a set ... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
b39e0fca22720e74e922d54b7005b1c4d0cdeafaffac698b4dacb6e71b59a2b0 | hopbit/sonic-pi-snippets | dp_str_trk_d.sps | # key: dp str trk d
# point_line: 0
# point_index: 0
# --
class TrackD < Track
def initialize(sample_path)
@tempo = TempoDance.new(sample_path)
@vocal = VocalDNB.new(sample_path)
@bg = BackgroundDNB.new(sample_path)
@melody = MelodyDNB.new(sample_path)
@beat = BeatDance.new(sample_path)
end
end
| null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/dp/dp_str_trk_d.sps | scheme | # key: dp str trk d
# point_line: 0
# point_index: 0
# --
class TrackD < Track
def initialize(sample_path)
@tempo = TempoDance.new(sample_path)
@vocal = VocalDNB.new(sample_path)
@bg = BackgroundDNB.new(sample_path)
@melody = MelodyDNB.new(sample_path)
@beat = BeatDance.new(sample_path)
end
end
| |
e2a713a94ec80287d54f609aea2e1972706c1e35c8bccbf6dcda7c41f95a077a | bondy-io/bondy | bondy_rbac_wamp_api.erl | %% =============================================================================
%% bondy_rbac_wamp_api.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the Licen... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_rbac_wamp_api.erl | erlang | =============================================================================
bondy_rbac_wamp_api.erl -
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... | Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_rbac_wamp_api).
-behaviour(bondy_wamp_api).
-include_lib("wamp/include/wamp.hrl").
-include("b... |
3baf27c9f6cdc2070bb9bd607909df7eb7b42289f6d8a0c61568121ae771f1d3 | bakul/s9fes | standard-error.scm | Scheme 9 from Empty Space , Unix Function Library
By , 2010 - 2018
; In the public domain
;
; (standard-error-port) ==> #<output-port>
; (call-with-stderr procedure^1) ==> object
; (with-output-to-stderr procedure^0) ==> unspecific
;
; (load-from-library "standard-error.scm")
;
; STANDAR... | null | https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/ext/sys-unix/standard-error.scm | scheme | In the public domain
(standard-error-port) ==> #<output-port>
(call-with-stderr procedure^1) ==> object
(with-output-to-stderr procedure^0) ==> unspecific
(load-from-library "standard-error.scm")
STANDARD-ERROR-PORT returns an output-file for accessing the Unix
standard error file des... | Scheme 9 from Empty Space , Unix Function Library
By , 2010 - 2018
(require-extension sys-unix)
(define standard-error-port
(let ((stderr #f))
(lambda ()
(if (not stderr)
(set! stderr (sys:make-output-port 2)))
stderr)))
(define call-with-stderr
(let ((standard-error-port standar... |
7d26ed3e75e08c4cff3f54e6e49f3a8143744f6429d0ee8969b48ccf834b4c30 | input-output-hk/cardano-wallet | Registry.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Wallet.Registry
( -- * Worker Registry
WorkerRegistry
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/24b188ac2b2a183076a68ef41752cfebc9d3d324/lib/wallet/src/Cardano/Wallet/Registry.hs | haskell | # LANGUAGE ConstraintKinds #
* Worker Registry
* Worker
* Context
* Logging
------------------------------------------------------------------------------
Worker Context
------------------------------------------------------------------------------
| A class to link an existing cont... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Wallet.Registry
WorkerRegistry
, empty
, lookup
, register
, unregister
,... |
aff5d1945837f942b5f6cdd3dac316d1c333e7fe60d3b680f7e62e1ee71bf80a | chef/stats_hero | stats_hero_test.erl | Copyright 2014 - 2016 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicabl... | null | https://raw.githubusercontent.com/chef/stats_hero/0811d3045874f6c16b76c04ac9358322e029c4b7/test/stats_hero_test.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
add a call that won't be matc... | Copyright 2014 - 2016 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(stats... |
accc07fa2495d78f23352e3308e7c228e4d690f46fb0fe83c2f57d9bdce5d55e | aryx/xix | runtime.ml | open Common
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
(*****************************************************************************)
(* Types and globals *)
(***************************... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/shell/runtime.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Types and globals
**************************************************************... | open Common
can be anything : " foo " , but also " * " , " 1 " , " 2 " , etc
type varname = string
In rc the basic ( and only ) value is the list of strings .
* A single word is considered as a list with one element .
* A single word is considered as a list with one element.
*)
type value = string list
... |
4baa89bff82d478fe3d4a330a2a4f9200216dc88b70722217fc36baf7254e0bf | tommaisey/aeon | external.scm | ( define dust - r ( mk - oscillator - id " " ( lo hi ) 1 ) )
(define exp-rand-n (mk-specialized-n-id "ExpRandN" (l r) ir))
(define i-rand-n (mk-specialized-n-id "IRandN" (l r) ir))
(define lin-rand-n (mk-specialized-n-id "LinRandN" (l r bias) ir))
(define rand-n (mk-specialized-n-id "RandN" (l r) ir))
( define r - d... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/src/external.scm | scheme | ( define dust - r ( mk - oscillator - id " " ( lo hi ) 1 ) )
(define exp-rand-n (mk-specialized-n-id "ExpRandN" (l r) ir))
(define i-rand-n (mk-specialized-n-id "IRandN" (l r) ir))
(define lin-rand-n (mk-specialized-n-id "LinRandN" (l r bias) ir))
(define rand-n (mk-specialized-n-id "RandN" (l r) ir))
( define r - d... | |
9a3f60ec43652f9f9034e40f48c673eba017258134de532ba95de668a8d6a65e | processone/ejabberd | suite.erl | %%%-------------------------------------------------------------------
Author : < >
Created : 27 Jun 2013 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License ... | null | https://raw.githubusercontent.com/processone/ejabberd/5ca59807d9a16e858b23a4d96bb7225ef109919a/test/suite.erl | erlang | -------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | Author : < >
Created : 27 Jun 2013 by < >
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
12c59b5a624cec641855d86e8e3a5fe8be309ff8c25897dbb2c982ef51d75b71 | dyoo/ffi-tutorial | pre-installer.rkt | #lang racket
(provide pre-installer)
(require ffi/tutorial/utils)
(define pre-installer
(make-pre-installer "output-byte-parameter"
#:sources (list "src/output-byte-parameter.c")))
;; We can try building the library by hand by just calling the
pre - installer , but be sure to first cd int... | null | https://raw.githubusercontent.com/dyoo/ffi-tutorial/1efba84503adf4a062c4855225eabe992a06a34f/ffi/tutorial/examples/output-byte-parameter/pre-installer.rkt | racket | We can try building the library by hand by just calling the
before doing so. | #lang racket
(provide pre-installer)
(require ffi/tutorial/utils)
(define pre-installer
(make-pre-installer "output-byte-parameter"
#:sources (list "src/output-byte-parameter.c")))
pre - installer , but be sure to first cd into this source 's directory
(module+ main
(pre-installer))
|
20de61888f4491e23a453310067867d574327d4e0a3365d6b2b4ab65f926807d | rabbitmq/rabbitmq-amqp1.0 | rabbit_amqp1_0_link_util.erl | 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 /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_amqp1_0_link_util).
-include_lib(... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-amqp1.0/1477a5e03498fc5171c3949caa827ca31a90eb69/src/rabbit_amqp1_0_link_util.erl | erlang |
default: none
aren't". We choose to upgrade that. | 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 /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_amqp1_0_link_util).
-include_lib("amqp_... |
5bd2d64de62f42deb9c01d41248aeb2f5f0ad2b39e429a7735865f34eabd7572 | jepsen-io/jepsen | append.clj | (ns jepsen.tests.cycle.append
"Detects cycles in histories where operations are transactions over named
lists lists, and operations are either appends or reads. See elle.list-append
for docs."
(:refer-clojure :exclude [test])
(:require [elle.list-append :as la]
[jepsen [checker :as checker]
... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/88ce98d9639bd20b6842297350ded987ac4d1345/jepsen/src/jepsen/tests/cycle/append.clj | clojure | see their docs for full options." | (ns jepsen.tests.cycle.append
"Detects cycles in histories where operations are transactions over named
lists lists, and operations are either appends or reads. See elle.list-append
for docs."
(:refer-clojure :exclude [test])
(:require [elle.list-append :as la]
[jepsen [checker :as checker]
... |
1af192e2d7d34fa323f535c80a2cc373a02377ecfb37bfd192c4f881f93f9bc7 | Incubaid/baardskeerder | pack_test.ml | open OUnit
open Pack
let k = 1000
let m = k * k
let sample = [|
1;2;3;4;5;6;7;8;9;
12;13;15;42;
123;124;
160;200;255;256;257;300;
1000;1024;1234;1500;
4096;4100;5200;
12345;16 * k;
123456;1234567;2345678;
65537;m;
40 * m; 60 * m; 100 * m;
1000 * m;
|]
let measure f =
let a0 = Gc.... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/pack_test.ml | ocaml | OUnit.assert_equal ~printer:string_of_int v v';
OUnit.assert_equal ~printer:string_of_int v v'; | open OUnit
open Pack
let k = 1000
let m = k * k
let sample = [|
1;2;3;4;5;6;7;8;9;
12;13;15;42;
123;124;
160;200;255;256;257;300;
1000;1024;1234;1500;
4096;4100;5200;
12345;16 * k;
123456;1234567;2345678;
65537;m;
40 * m; 60 * m; 100 * m;
1000 * m;
|]
let measure f =
let a0 = Gc.... |
19bb55208f946a5163a4fb74b4e157ecbc095433c06852ca7bdfe197bf33c070 | realworldocaml/book | ppx_variants_conv.ml | (* Generated code should depend on the environment in scope as little as possible.
E.g. rather than [foo = []] do [match foo with [] ->], to eliminate the use of [=]. It
is especially important to not use polymorphic comparisons, since we are moving more
and more to code that doesn't have them in scope. *)
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_variants_conv/src/ppx_variants_conv.ml | ocaml | Generated code should depend on the environment in scope as little as possible.
E.g. rather than [foo = []] do [match foo with [] ->], to eliminate the use of [=]. It
is especially important to not use polymorphic comparisons, since we are moving more
and more to code that doesn't have them in scope. |
open Base
open Ppxlib
open Ast_builder.Default
let raise_unsupported loc =
Location.raise_errorf ~loc
"Unsupported use of variants (you can only use it on variant types)."
module Create = struct
let lambda loc xs body =
List.fold_right xs ~init:body ~f:(fun (label, p) e -> pexp_fun ~loc label None p e)
... |
1f133b2326e02369aecd9c58681e58e4970e45ec486441385359c49fbc0e45fb | ngorogiannis/cyclist | indrule.mli | (** Inductive rule type consisting of a symbolic heap and a predicate head. *)
open Lib
open Generic
include BasicType
val mk : Heap.t -> Pred.t -> t
val dest : t -> Heap.t * Pred.t
val vars : t -> Term.Set.t
val predsym : t -> Predsym.t
val arity : t -> int
val formals : t -> Term.t list
val body : t -> Heap.... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/seplog/indrule.mli | ocaml | * Inductive rule type consisting of a symbolic heap and a predicate head.
* Replace all variables in rule such that they are disjoint with the set
provided.
* [unfold (vs, ts) p r] returns the body of the inductive rule [r] with:
the formal parameters replaced by the arguments of [p];
the remaining ... |
open Lib
open Generic
include BasicType
val mk : Heap.t -> Pred.t -> t
val dest : t -> Heap.t * Pred.t
val vars : t -> Term.Set.t
val predsym : t -> Predsym.t
val arity : t -> int
val formals : t -> Term.t list
val body : t -> Heap.t
val freshen : Term.Set.t -> t -> t
val subst : Subst.t -> t -> t
val parse... |
1b1f319987ed6247173cfb210554b7ff15644301793cfc95fd7ee35563cb75b2 | no-defun-allowed/concurrent-hash-tables | bustle.lisp | (in-package :bustle)
;;; A port of #L281
(deftype percentage ()
'(integer 0 100))
(defstruct mix
(read 20 :type percentage)
(insert 20 :type percentage)
(remove 20 :type percentage)
(update 20 :type percentage)
(upsert 20 :type percentage))
(defstruct workload
(mix (error "Need a mix"))
(capacity-l... | null | https://raw.githubusercontent.com/no-defun-allowed/concurrent-hash-tables/1b9f0b5da54fece4f42296e1bdacfcec0c370a5a/Examples/Bustle-Test/bustle.lisp | lisp | A port of #L281
I can't convince myself that the tests should work.
They even crash sometimes in the original. | (in-package :bustle)
(deftype percentage ()
'(integer 0 100))
(defstruct mix
(read 20 :type percentage)
(insert 20 :type percentage)
(remove 20 :type percentage)
(update 20 :type percentage)
(upsert 20 :type percentage))
(defstruct workload
(mix (error "Need a mix"))
(capacity-lb 25 :type (mod 32))... |
2f73e11526bc9399fc4cf6a59a7fea3cdaf0237e1acea55553f51536842ee84d | appleshan/cl-http | stream-sequence.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : USER ; Base : 10 -*-
(in-package "USER")
Minimal update to .
Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved .
See copyright notice in CLIM;CLIM - SYS;MINIPROC file .
;;;
(defpackage "COMMON-LISP" (:use) (:export "READ-SEQUENCE" "WRITE-SEQ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/acl/obc/aclpc/stream-sequence.lisp | lisp | Syntax : ansi - common - lisp ; Package : USER ; Base : 10 -*-
CLIM - SYS;MINIPROC file .
Most efficient use is from character stream to character buffer!
Only method that does not hangs NT: can't write bytes one at a time.
|
(in-package "USER")
Minimal update to .
Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved .
(defpackage "COMMON-LISP" (:use) (:export "READ-SEQUENCE" "WRITE-SEQUENCE"))
(defmethod read-sequence ((sequence string) (stream stream) &key (start 0) (end (length sequence)))
(case (stream-element-type stream... |
c712ed2049204af56e876f0ad777fc94b39250d6b1556ff1ee6754b719fa1217 | exercism/haskell | Tests.hs | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import ArmstrongNumbers (armstrong)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs ... | null | https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/armstrong-numbers/test/Tests.hs | haskell | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import ArmstrongNumbers (armstrong)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs ... | |
f38bc1ac04a255645c62b83149c271840474938b55f6075f4985021f3aa4de5f | drathier/elm-offline | Binop.hs | # OPTIONS_GHC -Wall #
module AST.Utils.Binop
( Precedence(..)
, Associativity(..)
)
where
import Prelude hiding (Either(..))
import Control.Monad (liftM)
import Data.Binary
STUFF
newtype Precedence = Precedence Int
deriving (Eq, Ord)
data Associativity
= Left
| Non
| Right
deriving (Eq)
... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/AST/Utils/Binop.hs | haskell | BINARY | # OPTIONS_GHC -Wall #
module AST.Utils.Binop
( Precedence(..)
, Associativity(..)
)
where
import Prelude hiding (Either(..))
import Control.Monad (liftM)
import Data.Binary
STUFF
newtype Precedence = Precedence Int
deriving (Eq, Ord)
data Associativity
= Left
| Non
| Right
deriving (Eq)
... |
68fce6c05ad81658bd04b7e411886eb5313d53e8f4ac70d98f4132c9aecb6ac7 | obsidiansystems/rhyolite | Serializable.hs | {-# Language FlexibleInstances #-}
# Language GeneralizedNewtypeDeriving #
# Language MultiParamTypeClasses #
{-# Language QuantifiedConstraints #-}
{-# Language ScopedTypeVariables #-}
{-# Language RankNTypes #-}
module Database.PostgreSQL.Serializable
( Serializable
, unsafeMkSerializable
, unSerializable
, r... | null | https://raw.githubusercontent.com/obsidiansystems/rhyolite/511dd9a20bbc8afb224825d11b39060c99c25cbd/psql-extras/psql-serializable/src/Database/PostgreSQL/Serializable.hs | haskell | # Language FlexibleInstances #
# Language QuantifiedConstraints #
# Language ScopedTypeVariables #
# Language RankNTypes #
| A monad for database transactions with serializable isolation level.
Because this monad may retry execution of code automatically, it does not lawfully lift any effects other
than Reader, whi... | # Language GeneralizedNewtypeDeriving #
# Language MultiParamTypeClasses #
module Database.PostgreSQL.Serializable
( Serializable
, unsafeMkSerializable
, unSerializable
, runSerializable
, runSerializableInsideTransaction
, unsafeHoistCoerceFromReaderT
) where
import Control.Monad.Base (MonadBase (liftB... |
d8cc88cbbb87a0283fa3352aa7be626754d06ce29ee13b7fc76e257ae280ccac | arachne-framework/factui | user.clj | (ns user)
(alter-var-root #'*print-namespace-maps* (constantly false)) | null | https://raw.githubusercontent.com/arachne-framework/factui/818ea79d7f84dfe80ad23ade0b6b2ed5bb1c6287/dev/user.clj | clojure | (ns user)
(alter-var-root #'*print-namespace-maps* (constantly false)) | |
76a7eb4b0c67eeb02cbd4058acf242deb936e491e29ea2f502faa341b2a2b617 | tisnik/clojure-examples | core_test.clj | (ns testing2.core-test
(:require [clojure.test :refer :all]
[testing2.core :refer :all]))
(require '[clojure.java.jdbc :as jdbc])
(deftest test-read-changes-for-user
(testing "read-changes-for-user"
; use mock instead of jdbc/query
(with-redefs [jdbc/query (fn [db-spec query] (second... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/testing2/test/testing2/core_test.clj | clojure | use mock instead of jdbc/query
use mock instead of jdbc/query | (ns testing2.core-test
(:require [clojure.test :refer :all]
[testing2.core :refer :all]))
(require '[clojure.java.jdbc :as jdbc])
(deftest test-read-changes-for-user
(testing "read-changes-for-user"
(with-redefs [jdbc/query (fn [db-spec query] (second query))]
(is (= "Pavel" (rea... |
e772acbbf09b6aa543a3d85e176b548a6f0b9758d18014ed5edf7bb48ba398c6 | koka-lang/koka | Parse.hs | ------------------------------------------------------------------------------
Copyright 2012 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file at the... | null | https://raw.githubusercontent.com/koka-lang/koka/eba73ff26e3b8247a2956f7a48b48900eab354f8/src/Syntax/Parse.hs | haskell | ----------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
Parse concrete syntax.
-... | Copyright 2012 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
module Syntax.Parse( parseProgramFromFile
, parseValueDef
, parseTypeDef
, parseExpression
, parseType
... |
e1b580301a3ff43d5328c98eb4e6d0c474aa98fd614e8dbcf8600275df5c244e | zenspider/schemers | exercise.3.63.scm | #lang racket/base
Exercise 3.63
asks why the ` sqrt - stream ' procedure was not written
;; in the following more straightforward way, without the local
;; variable `guesses':
;;
;; (define (sqrt-stream x)
( stream - cons 1.0
;; (stream-map (lambda (guess)
;; ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_3/exercise.3.63.scm | scheme | in the following more straightforward way, without the local
variable `guesses':
(define (sqrt-stream x)
(stream-map (lambda (guess)
(sqrt-improve guess x))
(sqrt-stream x))))
considerably less efficient because it perfo... | #lang racket/base
Exercise 3.63
asks why the ` sqrt - stream ' procedure was not written
( stream - cons 1.0
replies that this version of the procedure is
computation . Explain 's answer . Would the two versions still
` memo - proc ' ( section * Note 3 - 5 - 1 : :) ?
A : is correct . By u... |
b08990b055fe9b9da85a587afb02c3ab65d25399902ff9c33db298cfd5975b14 | emil0r/reverie | server.clj | (ns reverie.server
"Handles the server instance starting and stopping"
(:require [clojure.edn :as edn]
[com.stuartsierra.component :as component]
[org.httpkit.server :as http-server :refer [run-server]]
[reverie.nsloader]
[reverie.admin :as admin]
[reverie... | null | https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-sql/src/reverie/server.clj | clojure | put the components into array-maps in order to keep
the order they've been put in
after that merge them in order for external to be able to override
internal components
filter out anything that is to be removed
it's an already existing component
get the component if it's a map
flatten so that it can be appli... | (ns reverie.server
"Handles the server instance starting and stopping"
(:require [clojure.edn :as edn]
[com.stuartsierra.component :as component]
[org.httpkit.server :as http-server :refer [run-server]]
[reverie.nsloader]
[reverie.admin :as admin]
[reverie... |
d2bfc6dc92b623019db34b534819d52c6540a4888352eeeb5b342eb5816b865c | nextjournal/clerk | viewer_test.clj | (ns nextjournal.clerk.viewer-test
(:require [babashka.fs :as fs]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[clojure.walk :as w]
[matcher-combinators.test :refer [match?]]
[nextjournal.clerk.builder :as builder]
[nextjour... | null | https://raw.githubusercontent.com/nextjournal/clerk/92cfcc59898c1aff24eef1b59ae07af8af0adac5/test/nextjournal/clerk/viewer_test.clj | clojure | `str/join` is needed here because elided strings get turned into vector of segments
TODO: fit table viewer into v/desc->values | (ns nextjournal.clerk.viewer-test
(:require [babashka.fs :as fs]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[clojure.walk :as w]
[matcher-combinators.test :refer [match?]]
[nextjournal.clerk.builder :as builder]
[nextjour... |
2bf5d3babbd0a5d526d6136727e3209c6a609be0d4637fb5c40ec8bce0c8969d | mu-chaco/ReWire | UpCounter.hs | data Tuple2 a b is Tuple2 a b end
data Unit is Unit end
data Bit is Zero | One end
data W8 is W8 Bit Bit Bit Bit Bit Bit Bit Bit end
vhdl plusOne :: W8 -> W8 is prim_plusOne
vhdl rotl :: W8 -> W8 is prim_rotl
tick :: <ReT Bit W8 (StT W8 I)><Bit>
is
bind n <- lift get
in signal n
end
main :: <ReT Bit W8 (StT ... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/cruft/test/UpCounter.hs | haskell | data Tuple2 a b is Tuple2 a b end
data Unit is Unit end
data Bit is Zero | One end
data W8 is W8 Bit Bit Bit Bit Bit Bit Bit Bit end
vhdl plusOne :: W8 -> W8 is prim_plusOne
vhdl rotl :: W8 -> W8 is prim_rotl
tick :: <ReT Bit W8 (StT W8 I)><Bit>
is
bind n <- lift get
in signal n
end
main :: <ReT Bit W8 (StT ... | |
840bec93ca3e12e6c0bf2e1df2dfb834a5c55544679b5d1b5521219250d5582c | nuvla/api-server | nuvlabox_status_1.cljc | (ns sixsq.nuvla.server.resources.spec.nuvlabox-status-1
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.resources.spec.nuvlabox-status :as nb-status]
[sixsq.nuvla.server.resources.spec.nuvlabox-status-0 :as nb-status-0]
[sixsq.nuvla.se... | null | https://raw.githubusercontent.com/nuvla/api-server/2fa2e2f06c4425aeb403414f8b7c46bdca952396/code/src/sixsq/nuvla/server/resources/spec/nuvlabox_status_1.cljc | clojure | This version of the schema is the same as the previous one (0),
except that the peripherals attribute has been removed. Use the
same attribute definitions to avoid repetition. | (ns sixsq.nuvla.server.resources.spec.nuvlabox-status-1
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.resources.spec.nuvlabox-status :as nb-status]
[sixsq.nuvla.server.resources.spec.nuvlabox-status-0 :as nb-status-0]
[sixsq.nuvla.se... |
b2606b62cf05494454ee8972c3c36bce7feefd658d1732c09b8a07215c6eb6f0 | bos/rwh | csv5.hs | -- ch17/csv5.hs
import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = many (noneOf ",\n\r")
{-- snippet eol --}
eol =
do char '\n'
char '\r' <|> return '\n'
{-- /snippet eol --}
parseCSV :: String -> Either ParseError [[String]]
parseCSV input = parse csvFile ... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch17/csv5.hs | haskell | ch17/csv5.hs
- snippet eol -
- /snippet eol - |
import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = many (noneOf ",\n\r")
eol =
do char '\n'
char '\r' <|> return '\n'
parseCSV :: String -> Either ParseError [[String]]
parseCSV input = parse csvFile "(unknown)" input
|
1279a7a683c655d690cd647260c7077d6563750066627de43e7c5a736506de5e | NorfairKing/validity | CanFail.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Test.Validity.Functions.CanFail
( succeedsOnGen,
succeeds,
succeedsOnArbitrary,
succeedsOnGens2,
succeeds2,
succeedsOnArbitrary2,
failsOnGen,
failsOnGens2,
validIfSucceedsOnGen,
validIfSucceedsOnArbitrary,
... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-property/src/Test/Validity/Functions/CanFail.hs | haskell | | The function succeeds if the input is generated by the given generator
| The function succeeds if the input is generated by @arbitrary@
| The function fails if the input is generated by the given generator
| The function produces output that satisfies @isValid@ if it is given input
that is generated by the given... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Test.Validity.Functions.CanFail
( succeedsOnGen,
succeeds,
succeedsOnArbitrary,
succeedsOnGens2,
succeeds2,
succeedsOnArbitrary2,
failsOnGen,
failsOnGens2,
validIfSucceedsOnGen,
validIfSucceedsOnArbitrary,
... |
c051a1a19bdcf97e9276eae801d5d506441f0b0af4150c7e85692dbfff6024fa | chapmanb/clj-blend | users.clj | (ns org.galaxyproject.clj-blend.users
"Retrieve information on Galaxy users."
(:require [clj-http.client :as client]
[clojure.data.json :as json]
[org.galaxyproject.clj-blend.util :as util]))
(defn get-users
[client]
(json/read-str
(:body (client/get (str (client :url) "users")
... | null | https://raw.githubusercontent.com/chapmanb/clj-blend/f11fc9b599eddc1127f5e1a5f2d3a57919752baf/src/org/galaxyproject/clj_blend/users.clj | clojure | (ns org.galaxyproject.clj-blend.users
"Retrieve information on Galaxy users."
(:require [clj-http.client :as client]
[clojure.data.json :as json]
[org.galaxyproject.clj-blend.util :as util]))
(defn get-users
[client]
(json/read-str
(:body (client/get (str (client :url) "users")
... | |
c8d46b2861d75f6703e3631fb8e1e24317245a87e40d12b1de1dbca7aabd2329 | dmiller/clr.core.async | bts.clj | (ns clojure.core.async.util.bts
(:import [System.Threading.Tasks TaskScheduler Task]
[System.Threading Monitor ThreadPool WaitCallback])
)
(set! *warn-on-reflection* true)
;; Thread-local flag indicating processing
(def
^{:private true
:doc "Whether the current thread is processing... | null | https://raw.githubusercontent.com/dmiller/clr.core.async/bb861242531cdd6ba727283bf3ddee73db1e1c2d/src/clojure/clojure/core/async/util/bts.clj | clojure | Thread-local flag indicating processing
Attempt to execute the specified task on the current thread.
Returns true if the task can be executed on the current thread
If this thread isn't already processing a task, we don't support inlining
If the task was previously queued, remove it from the queue
Try to run t... | (ns clojure.core.async.util.bts
(:import [System.Threading.Tasks TaskScheduler Task]
[System.Threading Monitor ThreadPool WaitCallback])
)
(set! *warn-on-reflection* true)
(def
^{:private true
:doc "Whether the current thread is processing work items. Type is ThreadLocal<Boolean>"}... |
0ee79a7b4f84724adb6fc981bcccfeb50ea3fea6faaecfd7cc2e99bd8f62115d | tomjridge/imp_fs | v1_config.ml |
* gid and perm for file creation
module S = struct
type config = { uid:int; gid:int } [@@deriving yojson]
let default_config = Some {
uid=Unix.getuid();
gid=Unix.getgid();
}
let filename="v1_config.json"
end
include Tjr_config.Make(S)
| null | https://raw.githubusercontent.com/tomjridge/imp_fs/ba86e8e9204c59b18f041bf21332a2a4846ae20b/src/v1/v1_config.ml | ocaml |
* gid and perm for file creation
module S = struct
type config = { uid:int; gid:int } [@@deriving yojson]
let default_config = Some {
uid=Unix.getuid();
gid=Unix.getgid();
}
let filename="v1_config.json"
end
include Tjr_config.Make(S)
| |
5b04022efa0305aeb4026d95153fd92e6294afdfae862281afc3a5b3a3f42846 | GNOME/gimp-tiny-fu | beveled-pattern-hrule.scm | ; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
; Beveled pattern hrule for web pages
Copyright ( C ) 1997
;
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ;... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/beveled-pattern-hrule.scm | scheme | GIMP - The GNU Image Manipulation Program
Beveled pattern hrule for web pages
This program is free software: you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY... | Copyright ( C ) 1995 and
Copyright ( C ) 1997
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define (script-fu-beveled-pattern-hrule width height pattern)
(let* (
(img (car (gimp-image-new width height RG... |
72b9ea98b020ee0df35dd200f17592037afaf160767da948fc0d90ffd5543625 | penpot/penpot | frame.cljs | 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 /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.shapes.frame
(:require
[app.common.data.macros :as dm]
[app.common.geom.shapes :as gsh... | null | https://raw.githubusercontent.com/penpot/penpot/c8360b19949a34a9b0878a3a6f2dd08529c9c4cb/frontend/src/app/main/ui/shapes/frame.cljs | clojure |
Copyright (c) KALEIDOS INC
Wrapper around the frame that will handle things such as strokes and other properties
we wrap the proper frames and also the thumbnails
DEBUG | 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 /.
(ns app.main.ui.shapes.frame
(:require
[app.common.data.macros :as dm]
[app.common.geom.shapes :as gsh]
[app.common.pages.helpers :a... |
405450a5f44b00bf67133f76d3b8655f0f6cfdf29fb06fb79f9a954d098567da | maxlapshin/stockdb | stockdb_format.erl | %%% @doc stockdb_format: module that codes and decodes
%%% actual data to/from binary representation.
Format version : 2
%%% Here "changed" flags for delta fields are aggregated at
%%% packet start to improve code/decode performance by
byte - aligning LEB128 parts
-module(stockdb_format).
-author({"Danil Zagoskin... | null | https://raw.githubusercontent.com/maxlapshin/stockdb/61610c09f700d8ffca546f67a490c06afcfbfbb3/src/stockdb_format.erl | erlang | @doc stockdb_format: module that codes and decodes
actual data to/from binary representation.
Here "changed" flags for delta fields are aggregated at
packet start to improve code/decode performance by
Utility: lists module does not have this
@doc Accept #md{} and scale for high-level encoding
@doc Alias for enc... | Format version : 2
byte - aligning LEB128 parts
-module(stockdb_format).
-author({"Danil Zagoskin", ''}).
-include_lib("eunit/include/eunit.hrl").
-include("../include/stockdb.hrl").
-on_load(init_nif/0).
-export([encode_full_md/2, encode_full_md/3, decode_full_md/2]).
-export([encode_delta_md/2, encode_delta_m... |
ffce2c66e38ac427cc19fb315aa94069f494cd850bb11af009af727acc64fc29 | tolysz/prepare-ghcjs | Sync.hs | # LANGUAGE Unsafe #
# LANGUAGE CPP
, NoImplicitPrelude
, BangPatterns
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
, StandaloneDeriving
, RankNTypes
#
, NoImplicitPrelude
, BangPatterns
, Ma... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/GHC/Conc/Sync.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.Conc.Sync
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Basic concurrency stuff.
---------------------------------------------------------------------------
No: #hide, because b... | # LANGUAGE Unsafe #
# LANGUAGE CPP
, NoImplicitPrelude
, BangPatterns
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
, StandaloneDeriving
, RankNTypes
#
, NoImplicitPrelude
, BangPatterns
, Ma... |
28e3daf23253dc8340f93d39ae138e24cbd5f56a302310c4157a3191c7c0f767 | sbcl/sbcl | tests.lisp | Tests for
(defpackage #:aclrepl-tests
(:import-from #:test-util #:deftest)
(:use #:sb-aclrepl #:cl))
(in-package #:aclrepl-tests)
(declaim (special sb-aclrepl::*skip-address-display*
sb-aclrepl::*inspect-unbound-object-marker*))
(deftest hook.1 (boundp 'sb-impl::*inspect-fun*) t)
(deftest ... | null | https://raw.githubusercontent.com/sbcl/sbcl/fbd46c52ea5ea4b3ba98a14ebdd4991d35989c6d/contrib/sb-aclrepl/tests.lisp | lisp | Inspector tests
Inspector traversal tests | Tests for
(defpackage #:aclrepl-tests
(:import-from #:test-util #:deftest)
(:use #:sb-aclrepl #:cl))
(in-package #:aclrepl-tests)
(declaim (special sb-aclrepl::*skip-address-display*
sb-aclrepl::*inspect-unbound-object-marker*))
(deftest hook.1 (boundp 'sb-impl::*inspect-fun*) t)
(deftest ... |
7beb6c39367abee5b16f176a4623899cf5247bfeb80bd750717d6bfdcc815199 | dcos/dcos-net | dcos_l4lb_lashup_publish.erl | %%%-------------------------------------------------------------------
@author sdhillon
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 12 . Feb 2016 3:14 PM
%%%-------------------------------------------------------------------
-module(dcos_l4lb_lashup_publish).
-author("sdhillon").
-behaviour(gen_ser... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_l4lb/src/dcos_l4lb_lashup_publish.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
@d... | @author sdhillon
( C ) 2016 , < COMPANY >
Created : 12 . Feb 2016 3:14 PM
-module(dcos_l4lb_lashup_publish).
-author("sdhillon").
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3,
handle_cast/2, handle_info/2]).
-define(SERVER, ?MODULE).
-record(state, {lashup_gm_monitor = e... |
f2cbf4501b80d8b4725edeb632e7876245a5b991bb3125f5b6732db1f4fde1c2 | helium/blockchain-core | blockchain_poc_event.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain POC Event ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_poc_event).
-behaviour(gen_event).
%% ------------------------------------------------------------------
%% API... | null | https://raw.githubusercontent.com/helium/blockchain-core/7acb41a15793cb0c1be76fad78c13adeb61a5e1f/src/blockchain_poc_event.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain POC Event ==
@end
-------------------------------------------------------------------
------------------------------------------------------------------
API Function Exports
-----------------------------------------------------... | -module(blockchain_poc_event).
-behaviour(gen_event).
-export([
start_link/1,
add_handler/1,
add_sync_handler/1,
acknowledge/1
]).
-export([
init/1,
handle_event/2,
handle_call/2,
handle_info/2,
code_change/3,
terminate/2
]).
-include("blockchain.hrl").
start_link(Args) ->
... |
70a36a3358fcbbdb16fa95acb508adda8c342037621ab33f8ab2016fd90c9592 | ocaml-flambda/flambda-backend | clflags.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/3bdcccae8391bb86e54d8116521e5fbe28e97d48/ocaml/utils/clflags.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Int_arg_helper = Arg_helper.Make (struct
module Key = struct
include Numbers.Int
let of... |
47b11c128a545f0b531d32e12b8f183643b76754a31e108b6ec9bd081a2807fc | static-analysis-engineering/codehawk | jCHDumpBasicTypes.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHDumpBasicTypes.ml | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
ae5a1aeb9ba653b74db46cd09142a8898c5c4a0a2428c938aaa3b0e23be610f9 | ghc/testsuite | tcrun041.hs | # LANGUAGE TupleSections , UnboxedTuples #
module Main where
a :: Int -> (Int, Bool)
a = ( , True)
b :: Bool -> (Int, Bool)
b = (1, )
c :: a -> (a, Bool)
c = (, True || False)
d = (,1,)
e = (# , True #)
f = (# 1, #)
g = (# , True || False #)
h = (# ,1, #)
unchanged :: a -> (# Int #)
unchanged _binding = (# 1... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/tcrun041.hs | haskell | # LANGUAGE TupleSections , UnboxedTuples #
module Main where
a :: Int -> (Int, Bool)
a = ( , True)
b :: Bool -> (Int, Bool)
b = (1, )
c :: a -> (a, Bool)
c = (, True || False)
d = (,1,)
e = (# , True #)
f = (# 1, #)
g = (# , True || False #)
h = (# ,1, #)
unchanged :: a -> (# Int #)
unchanged _binding = (# 1... | |
acc819f3c2b76cfbe1a2df18fcf21ffba7faa072fd8c316e12d48044d6eabc7f | 8c6794b6/guile-tjit | srfi-8.scm | ;;; srfi-8.scm --- receive
Copyright ( C ) 2000 , 2001 , 2002 , 2006 Free Software Foundation , Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the Lic... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-8.scm | scheme | srfi-8.scm --- receive
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A... |
Copyright ( C ) 2000 , 2001 , 2002 , 2006 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (srfi srfi-8... |
f9bfd5ffc660f73e222b8739acf18c4986b1e7a8537236c8c4b747859501ffbb | stevenvar/OMicroB | cwint.ml | open Pic32
let set_pin_analog pin =
match pin with
| PIN25 -> clear_bit_adc AD1PCFG PCFG0
| PIN24 -> clear_bit_adc AD1PCFG PCFG1
| PIN23 -> clear_bit_adc AD1PCFG PCFG2
| PIN22 -> clear_bit_adc AD1PCFG PCFG3
| PIN21 -> clear_bit_adc AD1PCFG PCFG4
| PIN20 -> clear_bit_adc AD1PCFG PCFG5
| P... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/targets/pic32/tests/lchip/comm_with_int/cwint.ml | ocaml | Initialisation du system et des interruptions
Configuration des pins régissant les LEDs | open Pic32
let set_pin_analog pin =
match pin with
| PIN25 -> clear_bit_adc AD1PCFG PCFG0
| PIN24 -> clear_bit_adc AD1PCFG PCFG1
| PIN23 -> clear_bit_adc AD1PCFG PCFG2
| PIN22 -> clear_bit_adc AD1PCFG PCFG3
| PIN21 -> clear_bit_adc AD1PCFG PCFG4
| PIN20 -> clear_bit_adc AD1PCFG PCFG5
| P... |
b947500f549bc29a50f57a2e5ce5a3b0381410875eb24999385e9d05da0af841 | ocaml-opam/opam-compiler | source.ml | open! Import
type t = Github_branch of Branch.t | Github_PR of Pull_request.t
let github_pr pr = Github_PR pr
let parse_as_branch s =
let branch_name = Re.rep1 Re.any in
let re_branch =
Re.compile
(Re.seq
[
Re.bos;
Re.group Pull_request.user_re;
Re.opt (Re.seq ... | null | https://raw.githubusercontent.com/ocaml-opam/opam-compiler/5fa28d623f06d8be6856ac167a11fbf347caef19/lib/source.ml | ocaml | open! Import
type t = Github_branch of Branch.t | Github_PR of Pull_request.t
let github_pr pr = Github_PR pr
let parse_as_branch s =
let branch_name = Re.rep1 Re.any in
let re_branch =
Re.compile
(Re.seq
[
Re.bos;
Re.group Pull_request.user_re;
Re.opt (Re.seq ... | |
4c15c4f28e8705fe3a7696730188120f1c5eac2169aac3b5da63ed647261b4be | janestreet/ocaml-probes | test_tracer.ml | (* Create more than one tracee and update their probes. *)
module T = Probes_lib_test
module P = Probes_lib
module PT = P.With_ptrace
type t =
{ prog : string
; pt : P.t
; pid : P.pid
; names : P.probe_name array
}
let trace prog actions =
let pt = P.create ~prog ~check_prog:false ~allow_gigatext:false ()... | null | https://raw.githubusercontent.com/janestreet/ocaml-probes/cc716bb80284371de5acf7be7460aedeb568578d/test/many_tracees/test_tracer.ml | ocaml | Create more than one tracee and update their probes.
remove pid from s
ignore failure caused by kill
Attach only to t1
check that it fails to attach again to the same process to get states
check that it fails to attach to a different process without detaching
check that it fails to detach from the process ... | module T = Probes_lib_test
module P = Probes_lib
module PT = P.With_ptrace
type t =
{ prog : string
; pt : P.t
; pid : P.pid
; names : P.probe_name array
}
let trace prog actions =
let pt = P.create ~prog ~check_prog:false ~allow_gigatext:false () in
let pid = P.trace_new_process pt ~args:[] ~actions in... |
f2d6fee1fece8f474860a8c8cde70760f27c48bff9fcab6161db34c7e8df7061 | rfkm/zou | routing_test.clj | (ns zou.web.routing-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[ring.mock.request :as mock]
[ring.util.request :as req]
[zou.web.routing :as sut]
[zou.web.routing.proto :as rproto]))
(t/deftest routing-test
(fact "routed?"
(sut/rout... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/test/zou/web/routing_test.clj | clojure | (ns zou.web.routing-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[ring.mock.request :as mock]
[ring.util.request :as req]
[zou.web.routing :as sut]
[zou.web.routing.proto :as rproto]))
(t/deftest routing-test
(fact "routed?"
(sut/rout... | |
4b2db2835a215ac693fbf6c2e0b2fadefc28ec35edd1ef9f6c66318b584ea66c | UnixJunkie/dokeysto | internal_camltc.ml |
module Bdb = Camltc.Bdb
type filename = string
type db = { fn: filename ;
bdb: Bdb.bdb }
let close db =
Bdb.close db.bdb
let mem db k =
Bdb.exists db.bdb k
let find db k =
Bdb.get db.bdb k
let iter f db =
if Bdb.get_key_count db.bdb > Int64.one then
try
let cur = Bdb.get_cursor db.b... | null | https://raw.githubusercontent.com/UnixJunkie/dokeysto/48b0486769d127f60d523cce89db001179ced92b/src/internal_camltc.ml | ocaml | end of db |
module Bdb = Camltc.Bdb
type filename = string
type db = { fn: filename ;
bdb: Bdb.bdb }
let close db =
Bdb.close db.bdb
let mem db k =
Bdb.exists db.bdb k
let find db k =
Bdb.get db.bdb k
let iter f db =
if Bdb.get_key_count db.bdb > Int64.one then
try
let cur = Bdb.get_cursor db.b... |
7e38a0993f6beaa681d882a8558bb714b3584442b5760bbd96485025482c3efd | owickstrom/pandoc-emphasize-code | Range.hs | # LANGUAGE CPP #
-- | Ranges that cannot be constructed with incorrect bounds.
module Text.Pandoc.Filter.EmphasizeCode.Range
( PosRange
, mkPosRange
, posRangeStart
, posRangeEnd
, posRangeToTuple
, LineRange
, mkLineRange
, lineRangeStart
, lineRangeEnd
, lineRangeToTuple
, Range(..)
, rangeTo... | null | https://raw.githubusercontent.com/owickstrom/pandoc-emphasize-code/8f2de8fd78206eb6583bb5a6beca492f250cc25e/src/Text/Pandoc/Filter/EmphasizeCode/Range.hs | haskell | | Ranges that cannot be constructed with incorrect bounds.
Flipping argument order doesn't affect whether the ranges are disjoint | # LANGUAGE CPP #
module Text.Pandoc.Filter.EmphasizeCode.Range
( PosRange
, mkPosRange
, posRangeStart
, posRangeEnd
, posRangeToTuple
, LineRange
, mkLineRange
, lineRangeStart
, lineRangeEnd
, lineRangeToTuple
, Range(..)
, rangeToTuples
, disjoint
, Ranges
, rangesToList
, RangesErro... |
11733d9c4894023fe68e7637b4d10421e3a95b7afd3afe7eae4e030b32d430d2 | jjmeyer0/gt | version.ml | let version = "1.0";;
| null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/src/version.ml | ocaml | let version = "1.0";;
| |
6fe0a4e1853b7075dc9768892d5ae7e3d0848bd5c973cbf81ed32da2b6b76426 | Clozure/ccl | x8664-arch.lisp | -*- Mode : Lisp ; Package : ( X8664 : use CL ) -*-
;;;
Copyright 2005 - 2009 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless r... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/compiler/X86/X8664/x8664-arch.lisp | lisp | Package : ( X8664 : use CL ) -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for ... | Copyright 2005 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(defpackage "X8664"
(:use "CL")
#+x8664-target
(:nicknames "TARGET"))
(in-package "X8664")
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "X86-ARCH")
(require "X86-LAP")
(de... |
7392549f3e3d9583cb01be34b47bf83b0359a7214b3146dfd2ed3447acf06d5e | dherman/c.rkt | main.rkt | #lang racket/base
(require "ast.rkt"
"parse.rkt"
"header.rkt"
"pc.rkt"
"eval.rkt")
(provide (all-from-out "ast.rkt"
"parse.rkt"
"header.rkt"
"pc.rkt"
"eval.rkt"))
| null | https://raw.githubusercontent.com/dherman/c.rkt/00b344eaa61276dfb9b06a8b2d558307d149023d/main.rkt | racket | #lang racket/base
(require "ast.rkt"
"parse.rkt"
"header.rkt"
"pc.rkt"
"eval.rkt")
(provide (all-from-out "ast.rkt"
"parse.rkt"
"header.rkt"
"pc.rkt"
"eval.rkt"))
| |
93acf3768fb2762131c71a57587202c7cbc05da797a281e72edcfafbf0655664 | Kappa-Dev/KappaTools | print_handler.ml | *
* print_handler.ml
* openkappa
* , projet Abstraction , INRIA Paris - Rocquencourt
*
* Creation : 2011 , the 17th of January
* Last modification : Time - stamp : < Jan 08 2020 >
* *
* Pretty printing of Ckappa handler
*
*
* Copyright 2010,2011 Institut National de Recherche en Infor... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/frontend/print_handler.ml | ocaml | *
* print_handler.ml
* openkappa
* , projet Abstraction , INRIA Paris - Rocquencourt
*
* Creation : 2011 , the 17th of January
* Last modification : Time - stamp : < Jan 08 2020 >
* *
* Pretty printing of Ckappa handler
*
*
* Copyright 2010,2011 Institut National de Recherche en Infor... | |
15629c8cf02b60bcb62968d0b8eb3fda7df47b7ebcd2f9b478bcf21119645817 | kafka4beam/kafka_protocol | kpro_fetch_tests.erl | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or a... | null | https://raw.githubusercontent.com/kafka4beam/kafka_protocol/293551fb6c1a2d0a6e06a19691eb60e96c75a5f5/test/kpro_fetch_tests.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kpro_fetch_tests).
-include_lib("eunit/include/eunit.hrl").
-include("kpro_private.hrl").
-define(TOPIC, ... |
261866a5f75dbf7a0fea2e341a2eb9852001327319b02deaf9b8f9465233a77f | racket/scribble | html-render.rkt | #lang racket/base
(require "core.rkt"
"private/render-utils.rkt"
"html-properties.rkt"
"private/literal-anchor.rkt"
racket/class
racket/path
racket/file
racket/port
racket/list
racket/string
file/convertible
mzlib/runtime... | null | https://raw.githubusercontent.com/racket/scribble/73c35eae5d72aac1f7a7fe7ab4d668abda4c6335/scribble-lib/scribble/html-render.rkt | racket | note: file-size can be bigger than the string, but
that's fine.
HTML anchors should be case-insensitively unique. To make them
distinct, add a "." in front of capital letters. Also clean up
characters that give browsers trouble (i.e., the ones that are not
encoding. (The idea is that the result is still read... | #lang racket/base
(require "core.rkt"
"private/render-utils.rkt"
"html-properties.rkt"
"private/literal-anchor.rkt"
racket/class
racket/path
racket/file
racket/port
racket/list
racket/string
file/convertible
mzlib/runtime... |
c027ecf7f2469df94c8216f15c08e5ed351f195063ab8c465317d126d6d32bfc | cbaggers/nineveh | primitives.lisp | (in-package :nineveh.mesh.data.primitives)
;;------------------------------------------------------------
(defmacro %c-array-internals ((index-type normals-p tex-coords-p)
&body call)
(assert (= (length call) 1))
(alexandria:with-gensyms (indx-type norms-p uvs-p)
`(dbind (data-pt... | null | https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/mesh/data/primitives.lisp | lisp | ------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
---------------... | (in-package :nineveh.mesh.data.primitives)
(defmacro %c-array-internals ((index-type normals-p tex-coords-p)
&body call)
(assert (= (length call) 1))
(alexandria:with-gensyms (indx-type norms-p uvs-p)
`(dbind (data-ptr data-len indices-ptr index-len) ,(first call)
(let* ((... |
9704526cc64ac446b1e982f26f78492420c8f9e653376833ee4c8b7fc81e7cb2 | walkie/Hagl | RPS.hs | # LANGUAGE NoMonomorphismRestriction #
|
An example zero - sum game : Rock - paper - scissors .
From GHCi , try some of the following .
> > > execGame rps [ rocky , randy ] ( times 10 > > printTranscripts > > )
> > > [ rocky , rotate , randy , rpsPavlov , frequency ] ( times 100 ) > > = printResults
... | null | https://raw.githubusercontent.com/walkie/Hagl/ac1edda51c53d2b683c4ada3f1c3d4d14a285d38/src/Hagl/Example/RPS.hs | haskell |
* Game representation
| Moves in rock-paper-scissors.
| Rock-papers-scissors game.
* Players
| Good ol' rock, nothing beats that.
| Plays rock, then paper, the scissors forever after.
| Plays randomly
| If last move resulted in a "big" payoff, do it again, otherwise play randomly
| Play the move that will ... | # LANGUAGE NoMonomorphismRestriction #
|
An example zero - sum game : Rock - paper - scissors .
From GHCi , try some of the following .
> > > execGame rps [ rocky , randy ] ( times 10 > > printTranscripts > > )
> > > [ rocky , rotate , randy , rpsPavlov , frequency ] ( times 100 ) > > = printResults
... |
82ae80bf43e4672b763c82d8a5ca0152221e299b9edfd96d582455e9a2c8d4b6 | pdincau/badalisk | badalisk_sup.erl | %%%-------------------------------------------------------------------
%%% File : badalisk_sup.erl
Author : < >
%%% Description :
%%%
Created : 16 Apr 2011 by < >
%%%-------------------------------------------------------------------
-module(badalisk_sup).
-behaviour(supervisor).
%% API
-export([start... | null | https://raw.githubusercontent.com/pdincau/badalisk/ba08c63f0e09294a1719c2af1610bc4e91f99436/src/badalisk_sup.erl | erlang | -------------------------------------------------------------------
File : badalisk_sup.erl
Description :
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
============================... | Author : < >
Created : 16 Apr 2011 by < >
-module(badalisk_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
Function : start_link ( ) - > { ok , Pid } | ignore | { error , Error }
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, [... |
432b40a4945d7aed6f10c6fc68ab559ae7232e89f6744c12aaa51bed2280458e | erlang/otp | http_chunk.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/inets/src/http_lib/http_chunk.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
3.6.1
-module(http_chunk).
-include("http_internal.hrl").
-export([decode/3, encode/1, encode_last/... |
d565d0adb5dac6c2f166ae0061f3d30cb1daaa42fad58084129ed7c1faf5c7bc | kpblc2000/KpblcLispLib | _kpblc-odbx-open-only.lsp | (defun _kpblc-odbx-open-only (file odbx / res obj tmp_file)
;|
* Îòêðûòèå ëþáîãî ôàéëà, äàæå â ðåæèìå "ReadOnly"
* Ïàðàìåòðû âûçîâà:
ïîëíîå èìÿ îòêðûâàåìîãî ôàéëà . Òîëüêî ñòðîêà , êîíòðîëÿ íå âûïîëíÿåòñÿ
ObjectDBX - èíòåðôåéñ , ñîçäàííûé ( ) .
* Âîçâðàùàåò ñïèñîê â... | null | https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/odbx/_kpblc-odbx-open-only.lsp | lisp | |
vla-óêàçàòåëü íà ãàðàíòèðîâàííî îòêðûòûé äîêóìåíò
äîïóñêàåòñÿ ëè çàêðûòèå ôàéëà
äîïóñêàåòñÿ ëè ñîõðàíåíèå ôàéëà
ñòðîêà èìåíè ôàéëà
_ end of mapcar
_ end of member
_ end of vl-remove-if-not
_ end of car
_ end of cons
_ end of list
_ end of setq
_ end of strcat
_ end of setq
_ end of vl-file-copy
_ ... | (defun _kpblc-odbx-open-only (file odbx / res obj tmp_file)
* Îòêðûòèå ëþáîãî ôàéëà, äàæå â ðåæèìå "ReadOnly"
* Ïàðàìåòðû âûçîâà:
ïîëíîå èìÿ îòêðûâàåìîãî ôàéëà . Òîëüêî ñòðîêà , êîíòðîëÿ íå âûïîëíÿåòñÿ
ObjectDBX - èíòåðôåéñ , ñîçäàííûé ( ) .
* Âîçâðàùàåò ñïèñîê âèäà:
äîïóñêàåòñÿ ëè çàïèñü â ô... |
f5f0fe9d761a8104a41488fbb7323f8768b0f3d3d7648b813156de1a732265ca | mikelevins/clotho | package.lisp | package.lisp
(defpackage #:clotho
(:use #:cl #:ps))
| null | https://raw.githubusercontent.com/mikelevins/clotho/5a16ff7a9db01155f8fd96c47412d8eec43de2fa/src/package.lisp | lisp | package.lisp
(defpackage #:clotho
(:use #:cl #:ps))
| |
00899bd94cf660068d919a7f624019d1396944e8efb6ea63e6512f816f95a3b6 | chrisdone/sandbox | origami.hs | -- | Fold over the input, folding left or right depending on the element.
origami :: (s -> l -> s) -> (r -> s -> s) -> s -> [Either l r] -> s
origami _ _ nil [] = nil
origami fl fr nil (x:xs) =
case x of
Left l -> origami fl fr (fl nil l) xs
Right r -> fr r (origami fl fr nil xs)
| null | https://raw.githubusercontent.com/chrisdone/sandbox/c43975a01119a7c70ffe83c49a629c45f7f2543a/origami.hs | haskell | | Fold over the input, folding left or right depending on the element. | origami :: (s -> l -> s) -> (r -> s -> s) -> s -> [Either l r] -> s
origami _ _ nil [] = nil
origami fl fr nil (x:xs) =
case x of
Left l -> origami fl fr (fl nil l) xs
Right r -> fr r (origami fl fr nil xs)
|
75a226e0d263e598bcbc13bd5100c82f17e2d0be0bae29517d3ac2757f2a31d2 | clojure/jvm.tools.analyzer | load_core.clj | Copyright ( c ) and contributors . 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 t... | null | https://raw.githubusercontent.com/clojure/jvm.tools.analyzer/15ca8ddc5f966c3cb964b17171803ec367fa5861/src/main/clojure/clojure/jvm/tools/analyzer/examples/load_core.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 ) and contributors . All rights reserved .
(ns clojure.jvm.tools.analyzer.examples.load-core
(:import [clojure.lang Compiler RT DynamicClassLoader])
(:require [clojure.jvm.tools.analyzer :as analyze]))
(comment
(defmacro deftesteval
[name args expr]
`(do
(fn ~name ~args ~expr)))
... |
765638b385f26d63ed0d464fffe47025722a9692a07544cda354012fe35ed00e | EligiusSantori/L2Apf | gesture.scm | (module system racket/base
(provide actions)
(define actions (list
(cons 0 'gesture/unknown)
(cons 1 'gesture/unknown)
(cons 2 'gesture/hello)
(cons 3 'gesture/victory)
(cons 4 'gesture/charge)
(cons 5 'gesture/no)
(cons 6 'gesture/yes)
(cons 7 'gesture/bow)
(cons 8 'gesture/unaware)
... | null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/gesture.scm | scheme | (module system racket/base
(provide actions)
(define actions (list
(cons 0 'gesture/unknown)
(cons 1 'gesture/unknown)
(cons 2 'gesture/hello)
(cons 3 'gesture/victory)
(cons 4 'gesture/charge)
(cons 5 'gesture/no)
(cons 6 'gesture/yes)
(cons 7 'gesture/bow)
(cons 8 'gesture/unaware)
... | |
4c82bc5d25fed5b975e07628dd6f3785b302668a3c8adb342dbb0e20a352ffdc | facebook/Haxl | AllTests.hs | Copyright ( c ) 2014 - present , Facebook , Inc.
-- All rights reserved.
--
This source code is distributed under the terms of a BSD license ,
-- found in the LICENSE file.
{-# LANGUAGE OverloadedStrings #-}
module AllTests (allTests) where
import TestExampleDataSource
import BatchTests
import CoreTests
import Da... | null | https://raw.githubusercontent.com/facebook/Haxl/8c645b0e20b0eab942111494e042a908ebbe5132/tests/AllTests.hs | haskell | All rights reserved.
found in the LICENSE file.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2014 - present , Facebook , Inc.
This source code is distributed under the terms of a BSD license ,
module AllTests (allTests) where
import TestExampleDataSource
import BatchTests
import CoreTests
import DataCacheTest
import ExceptionStackTests
import AdoTests
import OutgoneFetchesTests
import Pro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.