_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 |
|---|---|---|---|---|---|---|---|---|
3f4f89df316bc55abf1a43ea5743ffd12489e406c6b99db5d0b695504aeed3ee | RefactoringTools/wrangler | test_inline_variable.erl | @private
-module(test_inline_variable).
-export([test/0]).
f([]) -> 0;
f( [X | Xs] ) -> X + f(Xs).
test() ->
A = 1,
B = 2,
C = 3,
D = f(A),
1 + B + C + D.
| null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/tests/transformed/Test%20Inline%20Variables%20Possibilities/Possibility%203/test_inline_variable.erl | erlang | @private
-module(test_inline_variable).
-export([test/0]).
f([]) -> 0;
f( [X | Xs] ) -> X + f(Xs).
test() ->
A = 1,
B = 2,
C = 3,
D = f(A),
1 + B + C + D.
| |
af0f91f8750f992851a0fb941e604347f0bbf839d63404f5344ae2ed48c3a4ec | gren-lang/compiler | Suggest.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall #
module Reporting.Suggest
( distance,
sort,
rank,
)
where
import Data.Char qualified as Char
import Data.List qualified as List
import Text.EditDistance qualified as Dist
-- DISTANCE
distance :: String -> String -> Int
distance x y =
Dist.restric... | null | https://raw.githubusercontent.com/gren-lang/compiler/49d5e5c5994a846d82c9518dcee06112c7630664/compiler/src/Reporting/Suggest.hs | haskell | # LANGUAGE OverloadedStrings #
DISTANCE
SORT
RANK | # OPTIONS_GHC -Wall #
module Reporting.Suggest
( distance,
sort,
rank,
)
where
import Data.Char qualified as Char
import Data.List qualified as List
import Text.EditDistance qualified as Dist
distance :: String -> String -> Int
distance x y =
Dist.restrictedDamerauLevenshteinDistance Dist.defaultEditC... |
5159dbd8a2f761b05e8cccaf8e138660c91ccab9fe7b5b9c4bc1582d54e105ff | rtoy/cmucl | array.lisp | ;;; -*- Package: RT -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/assembly/rt/array.lisp $")
;;;
;;; ****... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/assembly/rt/array.lisp | lisp | -*- Package: RT -*-
**********************************************************************
**********************************************************************
$Header: src/assembly/rt/array.lisp $
This file contains the support routines for arrays and vectors.
Hash primitives
Get a stack slot to save t... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/assembly/rt/array.lisp $")
Written by .
(in-package "RT")
(define-assembly-routine (allocate-vector
(:policy :fast-safe)
(:transl... |
267f4fe3a68b643040b89defe6dbac827f964d9fc5a5d6b9349f292d6ec6c9b8 | olivo/redos-detector | RuleScanner.ml | type t = {mutable current_file : string; mutable next_regex : unit -> (int * string) option; mutable file_stack : string list};;
let make s = {current_file = s; next_regex = (fun () -> None); file_stack = [s]};;
let rule_file_filter = Str.regexp ".*[.]rules$";;
let pcre_regex_filter = Str.regexp ".*pcre[ \t]*:[ \t]*\... | null | https://raw.githubusercontent.com/olivo/redos-detector/470711a1103a2cb3d0805f8e7094bf83a04b8e08/regex_checker/rxxr/code/RuleScanner.ml | ocaml | type t = {mutable current_file : string; mutable next_regex : unit -> (int * string) option; mutable file_stack : string list};;
let make s = {current_file = s; next_regex = (fun () -> None); file_stack = [s]};;
let rule_file_filter = Str.regexp ".*[.]rules$";;
let pcre_regex_filter = Str.regexp ".*pcre[ \t]*:[ \t]*\... | |
4e4aa311badae3b59cfdb4d547bf900c613bf6be105a8f5b752c5078d019adb9 | qitab/ace.core | fx-test.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;;;
;;;; Tests for the fast ops fixnum package.
;;;; Note that most tests require both the optimized and unoptimized version.
;;;;
(ace.core.package:defpackage* #:ace.... | null | https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/fx-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
Tests for the fast ops fixnum package.
Note that most tests require both the optimized and unoptimized version.
| Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(ace.core.package:defpackage* #:ace.core.fx-test
(:use #:common-lisp
#:ace.test)
(:use-alias #:ace.core.fx))
(cl:in-package #:ace.core.fx-test)
FX operations
(deftest test-fx-unary ()
(expect (= 11 (fx:1+ 10)))
(e... |
7266315fe3acaa99c543bf75787c5a6774a27ceab3f26a7922bd08878bbfe1d4 | clojupyter/clojupyter | messages_specs.clj | (ns clojupyter.messages-specs
(:require [clojure.spec.alpha :as s]
[clojupyter.specs :as sp]
[clojupyter.util :as u]
[io.simplect.compose :refer [p P C]]))
;;; ------------------------------------------------------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/messages_specs.clj | clojure | ------------------------------------------------------------------------------------------------------------------------
SHARED
------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------... | (ns clojupyter.messages-specs
(:require [clojure.spec.alpha :as s]
[clojupyter.specs :as sp]
[clojupyter.util :as u]
[io.simplect.compose :refer [p P C]]))
(s/def ::nonneg-int (s/and integer? (complement neg?)))
(s/def ::uuid string?)
,,
(s/def ::code string?)
(s/def ::com... |
24e85ba494c06fbe5d9f74e0bfb2922998131868d3345ef7b66784b841334faf | ocamllabs/ocaml-modular-implicits | test_big_ints.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-num/test_big_ints.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Test;;
open Nat;;
open Big_int;;
open List;;... |
81e2078d215a3ce9d1431ce3859e388d6f5627b0baef9f73d239f82cfa24cdc6 | mulderr/haskell-wamp | Wamp.hs | -- |
-- Module : Network.Wamp
-- Description : Re-exports
Copyright : ( c ) , 2015
License : MIT
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- This module simply re-exports from other modules for convenience.
--
module Network.Wamp
( -- * Re-exports
module Net... | null | https://raw.githubusercontent.com/mulderr/haskell-wamp/951715cd0e796af30fc84146eb5b312a842cce99/wamp/Network/Wamp.hs | haskell | |
Module : Network.Wamp
Description : Re-exports
Maintainer :
Stability : experimental
Portability : portable
This module simply re-exports from other modules for convenience.
* Re-exports | Copyright : ( c ) , 2015
License : MIT
module Network.Wamp
module Network.Wamp.Types
, module Network.Wamp.Connection
, module Network.Wamp.Messages
, module Network.Wamp.Broker
, module Network.Wamp.Dealer
, module Network.Wamp.Router
)
where
import Network.Wamp.Types
import Network.Wam... |
c6b819e7d7951b688317e592e8a9e1dc228a33788cc6ca7de0acc8e40d5935d0 | fjvallarino/monomer | Main.hs | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Custom OpenGL ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : B... | null | https://raw.githubusercontent.com/fjvallarino/monomer/51ce06f613eeb5a7e1172ae1a17cf099e053c9cb/examples/opengl/Main.hs | haskell | # LANGUAGE OverloadedStrings # | |
Module : Main
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' Custom OpenGL ' example .
Module : Main
Copyright : (c) 2018 Francisco Vallarino
License : B... |
dc2727b0c5d3afd1f3a53d323f0928a9d7e577e07bca74df3673431291e00fd3 | 8c6794b6/haskell-sc-scratch | RenderString.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
-- Drawing letters.
--
module GLTut.RenderString where
import System.Exit
imp... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/GLTut/GLTut/RenderString.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
Drawing letters.
| CopyRight : ( c ) 8c6794b6
Maintainer :
module GLTut.RenderString where
import System.Exit
import Graphics.UI.GLUT
main :: IO ()
main = do
getArgsAndInitialize
initialDisplayMode $= [RGBAMode, DoubleBuffered]
initialWindowSize $= Size 640 480
createWindow "RenderString"
displayCallback $= display... |
934c20f2bb46079c5aa22f9ba9752f23b6e3a9d3a373037677f8880371a58a6b | exercism/haskell | Tests.hs | {-# LANGUAGE OverloadedStrings #-}
import Data.Foldable (for_)
import Data.Map (fromList)
import Data.Tree (Tree(Node))
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Sgf (parseSgf)
main :: IO ()
main = hspecWith... | null | https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/sgf-parsing/test/Tests.hs | haskell | # LANGUAGE OverloadedStrings #
error: tree with no nodes
error: node without tree
error: node without properties
single-node tree
multiple properties
error: properties without value
error: lowercase property identifier
error: mixed-case property identifier
multiple property values
within property values, whit... |
import Data.Foldable (for_)
import Data.Map (fromList)
import Data.Tree (Tree(Node))
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Sgf (parseSgf)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = Tr... |
91ac9d6c66c8cf02463240fe5151a4f79c16944f2ce05597681fad1da8e09712 | rixed/ramen | RamenConstsWorkerCommands.ml | let get_info = "1nf0"
let wants_to_run = "r34dy?"
let print_version = "version"
let dump_archive = "dump"
let convert_archive = "convert"
| null | https://raw.githubusercontent.com/rixed/ramen/11b1b34c3bf73ee6c69d7eb5c5fbf30e6dd2df4f/src/RamenConstsWorkerCommands.ml | ocaml | let get_info = "1nf0"
let wants_to_run = "r34dy?"
let print_version = "version"
let dump_archive = "dump"
let convert_archive = "convert"
| |
2605c1a67a9785670c80edeebd7d35b0fab5aa8ce3593ee2a98e385f5da297bc | rtaboada/challenge | core.clj | (ns challenge.core
"Problem specific functions are in this namespace."
(:require [clojure.string :as string]
[clojure.set :as set]
[challenge.graph :as graph]))
(defn factor
"Scaling factor applied to a vertex score,
`k` is the distance between the fraudulent vertex and the
vertex ... | null | https://raw.githubusercontent.com/rtaboada/challenge/992419c98d8375f3dd736fcaf6400662adda95d4/src/challenge/core.clj | clojure | (ns challenge.core
"Problem specific functions are in this namespace."
(:require [clojure.string :as string]
[clojure.set :as set]
[challenge.graph :as graph]))
(defn factor
"Scaling factor applied to a vertex score,
`k` is the distance between the fraudulent vertex and the
vertex ... | |
70ab8cd3921bd1a27680dcdb4119c60335514aa96902f4a423159c8273a19689 | elaforge/karya | Events.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# LANGUAGE CPP #
{- | The 'Events' type contains the events of a track.
This is the largest part of the score and also the part most often
modified, so there is a plethora of acc... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Ui/Events.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| The 'Events' type contains the events of a track.
This is the largest part of the score and also the part most often
modified, so there is a plethora of access functions.
* range
* events
** list... | Copyright 2013
# LANGUAGE CPP #
module Ui.Events (
Range(..)
, selection_range, event_range
, range_times, range_start, range_end, range_duration
, Events
, empty, null, length, time_begin, time_end
, singleton, from_list
, ascending, descending
, map_events, move, clip, clip_lis... |
e812dc48c43f8c62b6db9de67b42c723ddd146fc72379a52df22e8c1aaf07c16 | karlhof26/gimp-scheme | square.scm |
; Licence GNU/GPL
;;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later version.
;
; This program is distributed in the hope... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/791bcbb719d89ba3751d0555c61ee889b337384c/square.scm | scheme | Licence GNU/GPL
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; without even the implied warranty of
MERCHANTABILITY or FITN... |
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
License version 3 at the web site -3.0.html
Alternatively you can write to the Free Software Foundation , Inc. , 675 Mass
Ave , Cambridge , , USA .
(define (square image ... |
788193bf9186e7f2cc85936d0a4ae73c09f5bcfe716a35a284ce5a8b31481802 | brendanhay/terrafomo | Provider.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . . Provider
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer :... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-alicloud/gen/Terrafomo/AliCloud/Provider.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* AliCloud Configuration
^ @access_key@
- (Required)
Access key of alicloud
^ @account_id@
- (Optional)
^ @fc@
- (Optional)
Custom function compute endpoints
^ @log_endpoint@
- (Optional)
^ @region@
- (Required)
Region of alicloud
^ @secre... |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : . . Provider
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : n... |
d9d05c4b66c2e87b6d38fbd592ea3dbef480483e15b2aadcc30386c38eb232ca | mkoppmann/eselsohr | ArticleList.hs | module Test.Domain.ArticleList
( articleListSpec
) where
import qualified Data.Map.Strict as Map
import Data.Map.Strict ((!))
import Test.Hspec
( Spec
, describe
, it
, shouldBe
, shouldNotSatisfy
)
import qualified Lib.Domain.Article as Article
import qualified Lib.Domain.ArticleList... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/test/Test/Domain/ArticleList.hs | haskell | ----------------------------------------------------------------------
Util
---------------------------------------------------------------------- | module Test.Domain.ArticleList
( articleListSpec
) where
import qualified Data.Map.Strict as Map
import Data.Map.Strict ((!))
import Test.Hspec
( Spec
, describe
, it
, shouldBe
, shouldNotSatisfy
)
import qualified Lib.Domain.Article as Article
import qualified Lib.Domain.ArticleList... |
5d3df63cc332ed45e3c7bc7abf516eabfaf5f438986bd0ccc122e4c840e2e1dd | xh4/web-toolkit | connection.lisp | (in-package :http)
(defclass connection ()
((id
:initarg :id
:initform 0
:accessor connection-id)
(listener
:initarg :listener
:initform nil
:accessor connection-listener)
(socket
:initarg :socket
:initform nil
:accessor connection-socket)
(input-stream
:initarg :inpu... | null | https://raw.githubusercontent.com/xh4/web-toolkit/74bea58ead66dfe5a9a92c0ca16ecb6fa3f82efa/http/connection.lisp | lisp | TODO: handle errors here
TODO: handler error | (in-package :http)
(defclass connection ()
((id
:initarg :id
:initform 0
:accessor connection-id)
(listener
:initarg :listener
:initform nil
:accessor connection-listener)
(socket
:initarg :socket
:initform nil
:accessor connection-socket)
(input-stream
:initarg :inpu... |
edde4ca22674daf2216139e6d5fe99a96231e4397919a10353b5b07e5b1f972e | let-def/menhir | unionFind.ml | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/unionFind.ml | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
a09d751780b185b406887ffb4bd4741178a8957604ec994ce452ec481f4852bd | nextjournal/clojure-mode | selections.cljs | (ns nextjournal.clojure-mode.selections
(:refer-clojure :exclude [range])
(:require ["@codemirror/state" :refer [EditorSelection]]))
(defn range
([from to] (.range EditorSelection from to))
([^js range] (.range EditorSelection (.-from range) (.-to range))))
(defn cursor [from] (.cursor EditorSelection from))
(... | null | https://raw.githubusercontent.com/nextjournal/clojure-mode/ce2bdfb70793cb8daa63f27ae843fb2beb93b922/src/nextjournal/clojure_mode/selections.cljs | clojure | (ns nextjournal.clojure-mode.selections
(:refer-clojure :exclude [range])
(:require ["@codemirror/state" :refer [EditorSelection]]))
(defn range
([from to] (.range EditorSelection from to))
([^js range] (.range EditorSelection (.-from range) (.-to range))))
(defn cursor [from] (.cursor EditorSelection from))
(... | |
bdf8f68a68f184533fd45b3716da58ac70551332b28f4f6684c155cfd65ca501 | thattommyhall/offline-4clojure | p148.clj | The Big Divide - Medium
< p > Write a function which calculates the sum of all natural numbers under < i > n</i > ( first argument ) which are evenly divisible by at least one of < i > a</i > and < i > b</i > ( second and third argument ) . Numbers < i > a</i > and < i > b</i > are guaranteed to be < a href=" / wik... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p148.clj | clojure |
<p>Note: Some test cases have a very large <i>n</i>, so the most obvious solution will exceed the time limit.</p>
tags - math
restricted -
your solution here | The Big Divide - Medium
< p > Write a function which calculates the sum of all natural numbers under < i > n</i > ( first argument ) which are evenly divisible by at least one of < i > a</i > and < i > b</i > ( second and third argument ) . Numbers < i > a</i > and < i > b</i > are guaranteed to be < a href=" / wik... |
1004184d9772a0c35d45b33af5aed7a45ecca9176f2e49627ae7944ebb2f21a7 | ocaml-sf/learn-ocaml-corpus | gabriel.ml | (* Addition of requirements. *)
let (++) (req1 : req) (req2 : req) : req =
match req1, req2 with
| Infinite, _
| _, Infinite ->
Infinite
| Finite i1, Finite i2 ->
Finite (i1 + i2)
(* Comparison of requirements. *)
let (<==) (req1 : req) (req2 : req) : bool =
match req1, req2 with
| _, Infinit... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/pprint/wrong/gabriel.ml | ocaml | Addition of requirements.
Comparison of requirements.
Determining the space requirement of a document.
This function is expected to run in constant time.
Smart constructors.
Optional: treat [empty] as a neutral element for concatenation.
Gabriel's smart [ifflat]. This function must be ACCEPTED.
This test... |
let (++) (req1 : req) (req2 : req) : req =
match req1, req2 with
| Infinite, _
| _, Infinite ->
Infinite
| Finite i1, Finite i2 ->
Finite (i1 + i2)
let (<==) (req1 : req) (req2 : req) : bool =
match req1, req2 with
| _, Infinite ->
true
| Infinite, Finite _ ->
false
| Finite i... |
b6cff726c858e70db50d3b4f3521bf4d9d6874c673781c1258c8a4c6819db1fd | morpheusgraphql/morpheus-graphql | Variables.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Feature.Input.Variables
( api,
)
where
import Data.Kind (Type)
import Data.Morpheus.Server (interpreter)
import Data.Morpheus.Server.Resolvers (ResolverQ)
import Data.Morpheus.Server.Type... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/0d7ec120df4ea3b1e030f64ed9820a8a66de7d6a/morpheus-graphql-server/test/Feature/Input/Variables.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
module Feature.Input.Variables
( api,
)
where
import Data.Kind (Type)
import Data.Morpheus.Server (interpreter)
import Data.Morpheus.Server.Resolvers (ResolverQ)
import Data.Morpheus.Server.Types
( GQLRequest,
GQLResponse,
GQLType (..),
RootResolv... |
71cce7e97f383a265dabd416a9654c04b8979afd7d0555010c9e66f836dd3265 | facebook/pyre-check | unannotatedGlobalEnvironment.ml |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/b1f0406e7ba562dc2f85658983ec95d5f797bbd0/source/analysis/unannotatedGlobalEnvironment.ml | ocaml | If the module is not found:
* - first try to look up the more-specific module from including
* more of the reference we are looking up
* - this is necessary in order to do lazy module tracking which
* prevents us from fully supporting namespace modules.
... |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
250d9975339b7a43655cd870e6d8b43b3664a57afdad9f976b059db707b53ea5 | freckle/stackctl | TagOption.hs | module Stackctl.TagOption
( tagOption
) where
import Stackctl.Prelude
import qualified Data.Text as T
import Options.Applicative
import Stackctl.AWS.CloudFormation (Tag, newTag)
tagOption :: Parser Tag
tagOption = option (eitherReader readTag) $ mconcat
[ short 't'
, long "tag"
, metavar "KEY=[VALUE]"
, ... | null | https://raw.githubusercontent.com/freckle/stackctl/e8c9b520013cfd7b43c413bf16d325b971bb3871/src/Stackctl/TagOption.hs | haskell | module Stackctl.TagOption
( tagOption
) where
import Stackctl.Prelude
import qualified Data.Text as T
import Options.Applicative
import Stackctl.AWS.CloudFormation (Tag, newTag)
tagOption :: Parser Tag
tagOption = option (eitherReader readTag) $ mconcat
[ short 't'
, long "tag"
, metavar "KEY=[VALUE]"
, ... | |
acc5ca262f315e77fc66db0a80ce44982a06eed5f5f645a87098c324b7d8835c | wilbowma/cur | rewrite.rkt | #lang cur/metantac
;; Rewrite, using PM equality (the "standard" one)
(provide (for-syntax reflexivity
substR substL (rename-out [substL subst])
rewrite
apply-fn
by-apply
by-replace
by-rewrite... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-lib/cur/ntac/rewrite.rkt | racket | Rewrite, using PM equality (the "standard" one)
for False (see inversion), And (rewrite)
TODO: handle Π goals
when L and R are both id, rewrite L with R, ie prefer rewriteL
rewrite tactics ----------------------------------------------------------
surface rewrite tactics --------------------
internal rewrite tac... | #lang cur/metantac
(provide (for-syntax reflexivity
substR substL (rename-out [substL subst])
rewrite
apply-fn
by-apply
by-replace
by-rewrite
by-rewriteL
... |
2eeca78782f46043600ca4cc2d81e6dd9c2193cc1a06307b6f3cce366c2b71af | mirage/capnp-rpc | cap_proxy.mli | (** A local promise for a capability.
Queues messages locally. *)
module Make(C : S.CORE_TYPES) : sig
class type resolver_cap = object
inherit C.cap
method resolve : C.cap -> unit
method break : Exception.t -> unit
end
val local_promise : unit -> resolver_cap
(** A [local_promise ()] is a prom... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc/cap_proxy.mli | ocaml | * A local promise for a capability.
Queues messages locally.
* A [local_promise ()] is a promise that buffers calls until it is resolved. |
module Make(C : S.CORE_TYPES) : sig
class type resolver_cap = object
inherit C.cap
method resolve : C.cap -> unit
method break : Exception.t -> unit
end
val local_promise : unit -> resolver_cap
end
|
eddef96e445fda2fbf4bffe40173a43838d4d1f57c82bf6f81dd65170fe3a2ca | arrayfire/arrayfire-haskell | DataSpec.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module ArrayFire.DataSpec where
import Control.Exception
import Data.Complex
import Data.Word
import Foreign.C.Types
import GHC.Int
import Test.Hspec
import ArrayFire
spec :: Spec
spec =
describe "Data tests" $ do
it "Should create constant Arr... | null | https://raw.githubusercontent.com/arrayfire/arrayfire-haskell/5d621602bb925ce5122a66011003498cbe638e2b/test/ArrayFire/DataSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module ArrayFire.DataSpec where
import Control.Exception
import Data.Complex
import Data.Word
import Foreign.C.Types
import GHC.Int
import Test.Hspec
import ArrayFire
spec :: Spec
spec =
describe "Data tests" $ do
it "Should create constant Arr... | |
8568ff98909935961aa0fbae27716d050cea595b551b021601de702d6743f8aa | haskell-opengl/GLUT | TexProx.hs |
TexProx.hs ( adapted from texprox.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
The brief program illustrates use of texture proxies . This program o... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/TexProx.hs | haskell | Note: We use a larger texture size here to demonstrate failure,
modern graphic cards can handle the original size.
we have to do this *after* createWindow, otherwise we have no OpenGL context |
TexProx.hs ( adapted from texprox.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
The brief program illustrates use of texture proxies . This program o... |
6aea5cdc95fb1881729af206f3601b15be75305e721985ad8497037622f30177 | Kappa-Dev/KappaTools | int_storage.mli | *
* int_storage.mli
*
* Creation : < 2016 - 03 - 14 feret >
* Last modification : Time - stamp : < Apr 13 2018 >
*
* openkappa
* , projet Abstraction , INRIA Paris - Rocquencourt
*
*
* This library provides primitives to deal with storage functio... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/more_datastructures/int_storage.mli | ocaml | * also record the list of key, for more efficient fold/iter
* simple array implementation
* expandable arrays (the size is still limited by max_int | *
* int_storage.mli
*
* Creation : < 2016 - 03 - 14 feret >
* Last modification : Time - stamp : < Apr 13 2018 >
*
* openkappa
* , projet Abstraction , INRIA Paris - Rocquencourt
*
*
* This library provides primitives to deal with storage functio... |
1bce4b5f1a6ca4cfa6c2d528a4e87031e7a0382f44009bf808a241988f25877f | jeapostrophe/opencl | racket-list.rkt | #lang racket/base
(require racket/list)
(define TESTING #f)
(define HOW-MANY (if TESTING (* 10 1024 (expt 2 10)) (read)))
(define the-list
(if TESTING
(for/list ([i (in-range HOW-MANY)])
(random))
(let loop ()
(let ([c (read)])
(if (eof-object? c)
empty
... | null | https://raw.githubusercontent.com/jeapostrophe/opencl/f984050b0c02beb6df186d1d531c4a92a98df1a1/tests/opencl/examples/vmult/racket-list.rkt | racket | #lang racket/base
(require racket/list)
(define TESTING #f)
(define HOW-MANY (if TESTING (* 10 1024 (expt 2 10)) (read)))
(define the-list
(if TESTING
(for/list ([i (in-range HOW-MANY)])
(random))
(let loop ()
(let ([c (read)])
(if (eof-object? c)
empty
... | |
fab4ea3a24f12713696b28c2b17919a7a9f88a2c968fc4e0347076c73d5a8d19 | chrisdone/duet | Parser.hs | # LANGUAGE TupleSections #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
-- |
module Duet.Parser where
import Control.Monad
import Control.Monad.Catch
impo... | null | https://raw.githubusercontent.com/chrisdone/duet/959d40db68f4c2df04cabb7677724900d4f71db4/src/Duet/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| | # LANGUAGE TupleSections #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
module Duet.Parser where
import Control.Monad
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.List
impor... |
2d5dc2f267dee4f6e6a91f23cb049b4b41eada2a004535579d64b058fdd74d07 | shriphani/tree-edit-distance | enlive_core.clj | (ns tree-edit-distance.enlive-core
"A version of RTDM that operates on a tree produced by
enlive."
(:require [clj-http.client :as client]
[net.cgrand.enlive-html :as html]))
(defn init
"Perform the correct initialization"
[m n c1 c2 del-cost ins-cost]
(let [M (make-array Integer/TYPE (inc m) (... | null | https://raw.githubusercontent.com/shriphani/tree-edit-distance/c26df4b0c7dc0a1c88f4dc71137889a649b6105f/src/tree_edit_distance/enlive_core.clj | clojure | pick out the tree and not the docstring | (ns tree-edit-distance.enlive-core
"A version of RTDM that operates on a tree produced by
enlive."
(:require [clj-http.client :as client]
[net.cgrand.enlive-html :as html]))
(defn init
"Perform the correct initialization"
[m n c1 c2 del-cost ins-cost]
(let [M (make-array Integer/TYPE (inc m) (... |
6b7de0c70804025b36a4d07d6c6e4618af8f105cc4ba22d5a8872bdce6c2fe1c | buntine/Haskell--Craft-of-FP | Chapter5.hs | -------------------------------------------------------------------------
Haskell : The Craft of Functional Programming
( c ) Addison - Wesley , 1999 .
--
Chapter 5
-------------------------------------------------------------------------
module Chapter5 where
import Prelude hiding (id)
-- Data types:... | null | https://raw.githubusercontent.com/buntine/Haskell--Craft-of-FP/a1a8cd70eb9d1609fd384e608b7fe26b2a878803/Chapter5.hs | haskell | -----------------------------------------------------------------------
-----------------------------------------------------------------------
Data types: tuples and lists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Introducing tuples, lists and strings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tuple types
Adding a pair of intge... | Haskell : The Craft of Functional Programming
( c ) Addison - Wesley , 1999 .
Chapter 5
module Chapter5 where
import Prelude hiding (id)
type ShopItem = (String,Int)
type Basket = [ShopItem]
basket1 :: Basket
basket1 = [ ("Salt: 1kg",139) , ("Plain crisps",25) , ("Gin: 1lt",1099) ]
basket2 :: Bas... |
fb5c709cf5353023c23723aca72ce385a2888161154a252e6b12c2c4a230d330 | vouch-opensource/vouch-load-tests | executor.clj | (ns io.vouch.load-tests.executor
(:require
[clojure.core.async :refer [<! >! chan close! go]]
[clojure.set :refer [subset?]]
[clojure.tools.logging :as log]))
(def stop-event ::stop)
(def ^:private accepts-keys-behavior :accepts-keys)
(defn add-listener
[executor event listener]
(swap! (:state exec... | null | https://raw.githubusercontent.com/vouch-opensource/vouch-load-tests/ca0f81097e0b1952f34e1bc7902de4123306c175/src/io/vouch/load_tests/executor.clj | clojure | (ns io.vouch.load-tests.executor
(:require
[clojure.core.async :refer [<! >! chan close! go]]
[clojure.set :refer [subset?]]
[clojure.tools.logging :as log]))
(def stop-event ::stop)
(def ^:private accepts-keys-behavior :accepts-keys)
(defn add-listener
[executor event listener]
(swap! (:state exec... | |
714331be6c7b39183da8425a826f1e0f265d4b20093b23bafec610c4e96ffb9a | jozefg/blott | domain.mli | type env = t list
and clos =
Clos of {term : Syntax.t; env : env}
| ConstClos of t
and clos2 = Clos2 of {term : Syntax.t; env : env}
and clos3 = Clos3 of {term : Syntax.t; env : env}
and t =
| Lam of clos
| Neutral of {tp : t; term : ne}
| Nat
| Zero
| Suc of t
| Pi of t * clos
| Sg of t * clos
| ... | null | https://raw.githubusercontent.com/jozefg/blott/9eadd6f1eb3ecb28fd66a25bc56c19041d98f722/src/lib/domain.mli | ocaml | DeBruijn levels for variables | type env = t list
and clos =
Clos of {term : Syntax.t; env : env}
| ConstClos of t
and clos2 = Clos2 of {term : Syntax.t; env : env}
and clos3 = Clos3 of {term : Syntax.t; env : env}
and t =
| Lam of clos
| Neutral of {tp : t; term : ne}
| Nat
| Zero
| Suc of t
| Pi of t * clos
| Sg of t * clos
| ... |
99d2e3425afee8389869ca19cf99a253c88f2c42a0637566eb58a33183b6f3e8 | ajtulloch/haskell-ml | LossFunction.hs | # LANGUAGE BangPatterns , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module MachineLearning.Protobufs.LossFunction (LossFunction(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
import q... | null | https://raw.githubusercontent.com/ajtulloch/haskell-ml/593ab6d9e3cf70ae5576cfa7883a12e05cd6fdf4/MachineLearning/Protobufs/LossFunction.hs | haskell | # LANGUAGE BangPatterns , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module MachineLearning.Protobufs.LossFunction (LossFunction(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
import q... | |
745537134bdc0ad516d93829d998b2cabc13a77a59ffc6fe6d91081450fd9997 | HunterYIboHu/htdp2-solution | 5.6-red-dot.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 5.6-red-dot) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univer... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/5.6-red-dot.rkt | racket | about the language level of this file in a form that our tools can easily process.
visual constants
The state of the world is represented by a Posn.
Posn -> Posn
Posn -> Image
examples:
Posn Number -> Posn
examples:
Posn -> Posn
examples:
Posn Number Number MouseEvt -> Posn
otherwise p
examples: | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 5.6-red-dot) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t none ... |
a2157b246288ee68fb1ed5d087250b4113c007a50dfe9d5090f13313c3437247 | davazp/cl-icalendar | folding.lisp | ;; folding.lisp
;;
Copyrigth ( C ) 2009 , 2010 < marioxcc >
Copyrigth ( C ) 2009 , 2010
;;
This file is part of cl - icalendar .
;;
;; cl-icalendar 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 , e... | null | https://raw.githubusercontent.com/davazp/cl-icalendar/b5295ac245f5d333fa593352039ca4fd6a52a058/folding.lisp | lisp | folding.lisp
cl-icalendar is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-icalendar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | Copyrigth ( C ) 2009 , 2010 < marioxcc >
Copyrigth ( C ) 2009 , 2010
This file is part of cl - icalendar .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public L... |
d225a1de71e05c44fa8cf846c33044b79c8c3b7be10d35ac4606f47a9b46da12 | chebert/schemeish | code-transformer.lisp | (in-package #:schemeish.backend)
(install-syntax!)
(export-definition
(define-struct transformer
(transform-special-form-table
transform-proper-list
transform-dotted-list
transform-cyclic-list
transform-atom)
:documentation
"A set of functions to transform expressions.
... | null | https://raw.githubusercontent.com/chebert/schemeish/872ea3dc3f2ea8438388b5e7660acd9446c49948/src/code-transformer.lisp | lisp | Special form parsers: all assume that the given expr is well-formed. | (in-package #:schemeish.backend)
(install-syntax!)
(export-definition
(define-struct transformer
(transform-special-form-table
transform-proper-list
transform-dotted-list
transform-cyclic-list
transform-atom)
:documentation
"A set of functions to transform expressions.
... |
8b918f5d96d41ae62d12d12d11e01cb9dfe5cf15944a4305162b605149d3b287 | input-output-hk/plutus-apps | SimpleEscrow.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-}
module Spec.SimpleEscrow(tests) where
import Control.Lens
import Control.Monad (void)
import Cardano.Node.Emulator.Generators (someTokenValue)
import C... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/e8688b8f86a92b285e7d93eb418ccc314ad41bf9/plutus-use-cases/test/Spec/SimpleEscrow.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
module Spec.SimpleEscrow(tests) where
import Control.Lens
import Control.Monad (void)
import Cardano.Node.Emulator.Generators (someTokenValue)
import Cardano.Node.Emulator.TimeSlot qualified as TimeSlot
import Ledger qual... |
a49b76e3dc1cc3b5b52ae51668899a9ec8f763a914efe9c5680f31cd570e76c5 | BinaryAnalysisPlatform/bap | microx_conqueror.mli | open Core_kernel[@@warning "-D"]
open Bap.Std
[@@@warning "-D"]
(** execution context.
The context defines the state of execution.
@param max_steps the maximum number of steps, that should be taken
in a single path.
@param max_loop the maximum number of loop iterations (note only
loops inner to ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/microx/microx_conqueror.mli | ocaml | * execution context.
The context defines the state of execution.
@param max_steps the maximum number of steps, that should be taken
in a single path.
@param max_loop the maximum number of loop iterations (note only
loops inner to a function are detected, so recursive loops may
stall the inter... | open Core_kernel[@@warning "-D"]
open Bap.Std
[@@@warning "-D"]
class context :
?max_steps:int ->
?max_loop:int ->
program term -> object('s)
[@@@warning "-D"]
inherit Biri.context
method visited : int Tid.Map.t
method add_checkpoint : tid -> 's
method checkpoints : 's Tid.Map.t Tid.Map.t
... |
b76c3a22edbd60bc6050788772c99fb95c79a89a9062852f6c9311fa3ad3300f | cl-axon/cl-paip | compile2.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
Copyright ( c ) 1991
;;;; File compile2.lisp: Scheme compiler with tail recursion
;;;; and some optimizations and primitive instructions.
(requires "interp1") ; Uses the Scheme macro facility
(defun comp (... | null | https://raw.githubusercontent.com/cl-axon/cl-paip/5922be8e3aae00197779bad4a05afa8ea1f6b8c9/compile2.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; -*-
Code from Paradigms of Artificial Intelligence Programming
File compile2.lisp: Scheme compiler with tail recursion
and some optimizations and primitive instructions.
Uses the Scheme macro facility
==============================
==============================
============... | Copyright ( c ) 1991
(defun comp (x env val? more?)
"Compile the expression x into a list of instructions"
(cond
((member x '(t nil)) (comp-const x val? more?))
((symbolp x) (comp-var x env val? more?))
((atom x) (comp-const x val? more?))
((scheme-macro (first x)) (comp (scheme-mac... |
95bc7151f0f142b098a6a443375664f7176f646294aa51c6f95a100f06ee5e1f | OdonataResearchLLC/weyl | bigfloat.lisp | -*- Mode : Lisp ; Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*-
bigfloat.lisp , v 1.3 1994/10/21 18:16:34 rz Exp
;; Arbitrary Precision Real Arithmetic System
by Tateaki Sasaki
The UNIVERSITY OF UTAH , MARCH 1979
For design philosophy and characteristics of this system , see ,
;; ``An ... | null | https://raw.githubusercontent.com/OdonataResearchLLC/weyl/299898c075795a7fb0b06907e6db13158e06b686/numbers/bigfloat.lisp | lisp | Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*-
Arbitrary Precision Real Arithmetic System
``An Arbitrary Precision Real Arithmetic Package In Reduce,''
``Manual For Arbitrary Precision Real Arithmetic System in Reduce,'
machine-dependently.
This function constructs an internal representation of a nu... |
bigfloat.lisp , v 1.3 1994/10/21 18:16:34 rz Exp
by Tateaki Sasaki
The UNIVERSITY OF UTAH , MARCH 1979
For design philosophy and characteristics of this system , see ,
Proceedings of Eurosam ' 79 , Marseille ( FRANCE ) , June 1979 .
For Implementation notes and using this system , see ,
Ope... |
d1699588db01f53f2601f89407a81b9d2cd43a70f42b390e362c3f73650ba54c | diagrams/diagrams-canvas | Text.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Canvas.CmdLine
pt = circle 0.1 # fc red # lw none
t1 = pt <> topLeftText "top left" # fontSizeL 1 <> rect 8 1 # lwO 1
t2 = pt <> baselineText "baseline" # fontSizeO 20 <> rect 8 1 # lwO 1
t3 = pt <> alignedText 0.76 0.5 "(0.7, 0... | null | https://raw.githubusercontent.com/diagrams/diagrams-canvas/7c5f133becebfd30e8a5d04c5371424b6dbaef8f/examples/Text.hs | haskell | example :: Diagram B R2 | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Canvas.CmdLine
pt = circle 0.1 # fc red # lw none
t1 = pt <> topLeftText "top left" # fontSizeL 1 <> rect 8 1 # lwO 1
t2 = pt <> baselineText "baseline" # fontSizeO 20 <> rect 8 1 # lwO 1
t3 = pt <> alignedText 0.76 0.5 "(0.7, 0... |
205408c4d046e7af6cc1ef998b97e28e7b1ef5e21ff89657ce6a090cc6c45f97 | vlaaad/reveal | canvas.clj | (ns vlaaad.reveal.canvas
(:require [cljfx.composite :as fx.composite]
[cljfx.fx.canvas :as fx.canvas]
[cljfx.mutator :as fx.mutator]
[cljfx.lifecycle :as fx.lifecycle])
(:import [javafx.scene.canvas Canvas]))
(set! *warn-on-reflection* true)
(defn- make-resizable-canvas []
(p... | null | https://raw.githubusercontent.com/vlaaad/reveal/61c157b557c767aa34feb29e1e1aea197b1eed08/src/vlaaad/reveal/canvas.clj | clojure | (ns vlaaad.reveal.canvas
(:require [cljfx.composite :as fx.composite]
[cljfx.fx.canvas :as fx.canvas]
[cljfx.mutator :as fx.mutator]
[cljfx.lifecycle :as fx.lifecycle])
(:import [javafx.scene.canvas Canvas]))
(set! *warn-on-reflection* true)
(defn- make-resizable-canvas []
(p... | |
400d5d2fee87cbf94763a9261e6f1e44fadc71e71140906cea7ee021b757ee99 | alanz/ghc-exactprint | ExplicitSpecificity4.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE ScopedTypeVariables #
module ExplicitSpecificity4 where
class C a where
f :: forall {z}. z -> a -> a
default f :: forall {z}. z -> a -> a
f _ x = x
g :: forall z. z -> a -> a
g _ x = x
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc90/ExplicitSpecificity4.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE ScopedTypeVariables #
module ExplicitSpecificity4 where
class C a where
f :: forall {z}. z -> a -> a
default f :: forall {z}. z -> a -> a
f _ x = x
g :: forall z. z -> a -> a
g _ x = x
| |
da6f4fee91e89c25eead0f162f88ec6110f2054492b0b198c0d4d6993ea2ce9d | klangner/timeseries | PlotSeries.hs | import System.Environment (getArgs)
import Control.Arrow (first)
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
import Data.Time
import System.Process
import Data.Text.Time (parseISODateTime)
import qualified Data.TimeSeries as TS
signal :: Num a => TS.Series a -> [(LocalTime, ... | null | https://raw.githubusercontent.com/klangner/timeseries/7fae74b8b42074f2b7c6e714111f954b9f4253d0/examples/PlotSeries.hs | haskell | import System.Environment (getArgs)
import Control.Arrow (first)
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
import Data.Time
import System.Process
import Data.Text.Time (parseISODateTime)
import qualified Data.TimeSeries as TS
signal :: Num a => TS.Series a -> [(LocalTime, ... | |
6dd7e1f6c583b468d531d32ea7a4b8e127aab360a651823d31f3010686b94b9c | theangelperalta/cl-objc | untyped.lisp | ;; Test suite for untyped-objc-msg-send
(in-package "CL-OBJC-TEST")
(in-suite :untyped-objc-msg-send)
(test untyped-instantiation "Test instantiation of ObjC object"
(is (eq (class-of (untyped-objc-msg-send (objc-get-class "NSObject") "alloc"))
(find-class 'objc-object)))
(is
(string-equal... | null | https://raw.githubusercontent.com/theangelperalta/cl-objc/6daf2edf6d922e7ee1acaf259ea5510b16580379/t/untyped.lisp | lisp | Test suite for untyped-objc-msg-send | (in-package "CL-OBJC-TEST")
(in-suite :untyped-objc-msg-send)
(test untyped-instantiation "Test instantiation of ObjC object"
(is (eq (class-of (untyped-objc-msg-send (objc-get-class "NSObject") "alloc"))
(find-class 'objc-object)))
(is
(string-equal (objc-cffi::class-name
(objc-c... |
4ebc6463ef016e1ba010f574c240744b74f158b715bbf9249323bbd089c9f654 | racket/racket7 | bootstrap.rkt | #lang racket/base
(require "linklet.rkt"
(prefix-in host: '#%linklet)
"linklet-operation.rkt"
"../common/reflect-hash.rkt")
;; Run this module before "../host/linklet.rkt" to substitute the
;; implementation in "linklet.rkt"
(define bootstrap-linklet-instance
(host:primitive-table '#%boot... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/run/bootstrap.rkt | racket | Run this module before "../host/linklet.rkt" to substitute the
implementation in "linklet.rkt" | #lang racket/base
(require "linklet.rkt"
(prefix-in host: '#%linklet)
"linklet-operation.rkt"
"../common/reflect-hash.rkt")
(define bootstrap-linklet-instance
(host:primitive-table '#%bootstrap-linklet
(linklet-operations=> reflect-hash)))
|
980fc002014e2ad2a090500b00710f96720a0c9f68290cd6fe376aaf487baa1e | mkawalec/emailparse | FormatDecoders.hs | module Network.Mail.Parse.Decoders.FormatDecoders (qpDec, decodeB64) where
Copyright : ( c ) , 2012
License : BSD3 , found in the LICENSE file
Copied from the library
import Foreign
import Foreign.C.Types
import System.IO.Unsafe as U
import qualified Data.ByteString as BS
import qualified Data.ByteString.Uns... | null | https://raw.githubusercontent.com/mkawalec/emailparse/c5533707c7339bcebd616e1f7cdb442ca2d16626/src/Network/Mail/Parse/Decoders/FormatDecoders.hs | haskell | module Network.Mail.Parse.Decoders.FormatDecoders (qpDec, decodeB64) where
Copyright : ( c ) , 2012
License : BSD3 , found in the LICENSE file
Copied from the library
import Foreign
import Foreign.C.Types
import System.IO.Unsafe as U
import qualified Data.ByteString as BS
import qualified Data.ByteString.Uns... | |
74ce27572b012aa217e6909fe57260792c5d77d2e4846be4b9bd02e666ba4776 | clojure/core.match | match.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/core.match/1a57329c01507d3eb479a4f5461e012edaa6e4de/src/main/clojure/cljs/core/match.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 ) . All rights reserved .
(ns cljs.core.match
(:refer-clojure :exclude [compile])
(:use [clojure.core.match :exclude [match matchv match-let matchm]]))
(defmacro asets [a vs]
`(do
~@(map (fn [a b c] (concat a (list b c)))
(repeat `(aset ~a)) (range (count vs)) vs)
~a))
(d... |
b9cb6b2321d4e89682a0dcd9b853378ebe9086abbcea6bfd5435592903ef348e | CompSciCabal/SMRTYPRTY | dann-2.2.rkt | #lang racket
;;; Reading Notes
133.6 : " closure " ( losing battle )
; [can everything in a language be closed?]
137.10 : nil wars
142.11 : It seems a little strange that ( define g ( lambda w w ) )
; captures its arguments as a list...
144 : what are some other common abstraction barriers like... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v1/chapter-2.2/dann-2.2.rkt | racket | Reading Notes
[can everything in a language be closed?]
captures its arguments as a list...
how do the different ways of decomposing abstraction effect
our ability to effectively reason about different problem types?
PRELUDE
Order is unimportant in the denomination list: at each step we
... | #lang racket
133.6 : " closure " ( losing battle )
137.10 : nil wars
142.11 : It seems a little strange that ( define g ( lambda w w ) )
144 : what are some other common abstraction barriers like map ?
(define nil '())
(define (filter predicate sequence)
(cond ((null? sequence) '())
((predicate ... |
7a68f5f4221c006c61600df0aa48b6c6604a82da618959efbd4e39cf15502f7b | rtoy/cmucl | boot-2014-06-1.lisp | ;; Define source-location/class info type so that code/error.lisp can
;; be compiled.
(in-package c)
(define-info-type source-location class (or form-numbers null) nil)
| null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/20e/boot-2014-06-1.lisp | lisp | Define source-location/class info type so that code/error.lisp can
be compiled. | (in-package c)
(define-info-type source-location class (or form-numbers null) nil)
|
4deb41d82aabf97c3ba5095dad4d0ab9307b9eb5a5eb688946acecab829831a7 | ocaml-flambda/ocaml-jst | makedepend.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/driver/makedepend.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Parsetree
module String = Misc.Stdlib.String
let ppf = Format.err_formatter
type file_kind = ML | ... |
520181522afe81d3584f9051a13ef53213acee2a42cfaa841a94812f9de333ca | eareese/htdp-exercises | 240.rkt | ;;---------------------------------------------------------------------------------------------------
#lang htdp/isl
Exercise 240 . Here are two strange but similar data definitions :
; A LStr is one of :
;; ; – String
; – ( make - layer LStr )
; A LNum is one of :
;; ; – Number
; – ( make - layer LNum )
;;... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part03-abstraction/240.rkt | racket | ---------------------------------------------------------------------------------------------------
A LStr is one of :
; – String
– ( make - layer LStr )
A LNum is one of :
; – Number
– ( make - layer LNum )
Both data definitions rely on this structure type definition:
(define-struct layer [stuff])
originals.
... | #lang htdp/isl
Exercise 240 . Here are two strange but similar data definitions :
Both define nested forms of data : one is about numbers and the other about strings . Make examples
for both . Abstract over the two . Then instantiate the abstract definition to get back the
LStr
(define some-lstr "hello")
(d... |
26f9dc8dbffd22aeb004ceffbe772d417dad0c724fc6d7e7c8ee1d790eaf539b | Twinside/asciidiagram | SvgRender.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Text.AsciiDiagram.SvgRender
( GridSize( .. )
, defaultGridSize
, svgOfDiagram
, svgOfDiagramAtSize
, defaultLibrary
) where
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid( mempty )
import Control.Applicative... | null | https://raw.githubusercontent.com/Twinside/asciidiagram/7974d93d794b32b4f5ddb72f0cfaf4c89ff3d7d2/src/Text/AsciiDiagram/SvgRender.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
import Debug.Trace
import Text.Groom
| Simple type describing the grid size used during render.
^ Width of a cell (in pixel)
^ Height of a cell (in pixel)
if you want to remove space between them.
| Default grid size used in the simple render functions
>
> ... | # LANGUAGE CPP #
module Text.AsciiDiagram.SvgRender
( GridSize( .. )
, defaultGridSize
, svgOfDiagram
, svgOfDiagramAtSize
, defaultLibrary
) where
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid( mempty )
import Control.Applicative( (<$>) )
#endif
import Data.Monoid( (<>) )
import Control.Mon... |
81cb2fc49c7119dfc029f358860e6709d7c2d6b4ebc6f46ce7ae550038ff17b3 | circuithub/haskell-gerber | Command.hs | {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use camelCase" #-}
module Gerber.Command where
import qualified Data.Text as StrictText
import Gerber.ApertureDefinition ( ApertureDefinition )
import Gerber.MacroDefinition ( Definition, Modifier )
import Gerber.DCodeNumber ( DCodeNumber )
import Gerber... | null | https://raw.githubusercontent.com/circuithub/haskell-gerber/ee7c8b529c3b21d6ae1ea19dbd7fd884b1d88bbb/gerber/lib/Gerber/Command.hs | haskell | # OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Use camelCase" # | module Gerber.Command where
import qualified Data.Text as StrictText
import Gerber.ApertureDefinition ( ApertureDefinition )
import Gerber.MacroDefinition ( Definition, Modifier )
import Gerber.DCodeNumber ( DCodeNumber )
import Gerber.Format ( Format )
import Gerber.Mirroring ( Mirroring )
import Gerber.Movement ( M... |
b705da1b3905f4eda2fc2dcce061489d530d6ba95dd244ef9a84bfaf55a2e5f5 | ocaml-flambda/flambda-backend | closure_conversion.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/7bb309fe367f1d7b183900fb3d50e46b27c726e8/middle_end/flambda2/from_lambda/closure_conversion.mli | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2019 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
* Introduce closures into CPS code , producing Flambda .
module IR ... |
be906b5c0f2f1d34a10be338017317179b6844d1f8309b8e0f6254fbcdc4fc88 | jtza8/interact | painter.lisp | ; Use of this source code is governed by a BSD-style
license that can be found in the license.txt file
; in the root directory of this project.
(in-package :interact)
(defclass painter (widget)
((sprite :initarg :sprite
:initform (error "sprite must be specified"))))
(defmethod initialize-instance :af... | null | https://raw.githubusercontent.com/jtza8/interact/ea2121d7e900dac4fe2a085bd5f2783a640e71f8/src/painter.lisp | lisp | Use of this source code is governed by a BSD-style
in the root directory of this project. | license that can be found in the license.txt file
(in-package :interact)
(defclass painter (widget)
((sprite :initarg :sprite
:initform (error "sprite must be specified"))))
(defmethod initialize-instance :after ((widget painter) &key)
(with-slots (sprite width height) widget
(when (zerop width)... |
8cb36d04ac4d07f3b05b4f3c7a2047c9425a02e11e7233f0a7df57f750e73aa6 | kappamodeler/kappa | array_ext.mli | module type Content = sig type t val default : t end
module Make :
functor (T : Content) ->
sig
type content = T.t
type 'a t
val copy : 'a t -> 'a t
val size : 'a t -> int
val create : int -> 'a t
val remove : 'a -> 'a t -> 'a t
val remove_index: int -> 'a t -> 'a t
... | null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/simplx_rep/src/data_structures/array_ext.mli | ocaml | module type Content = sig type t val default : t end
module Make :
functor (T : Content) ->
sig
type content = T.t
type 'a t
val copy : 'a t -> 'a t
val size : 'a t -> int
val create : int -> 'a t
val remove : 'a -> 'a t -> 'a t
val remove_index: int -> 'a t -> 'a t
... | |
48b5210157fc708591597efd9a1aa1b0f7b247dd8181286c4be00fc29bb87d6a | webyrd/mediKanren | test-dataflow.rkt | #lang racket/base
(require
"../dbk.rkt"
"../dbk/data.rkt"
"../dbk/enumerator.rkt"
racket/pretty
racket/runtime-path
racket/set)
(define-relation/table (cprop curie key value) 'path "rtx2/20210204/cprop")
(define-relation/table (edge id subject object) 'path "rtx2/20210204/edge")
(define-relation/table (... | null | https://raw.githubusercontent.com/webyrd/mediKanren/1dec275a2dd859ac9dde71e5b1b02ca443fc0373/medikanren2/dbk/test/test-dataflow.rkt | racket | Some nausea timings
Some nausea timings | #lang racket/base
(require
"../dbk.rkt"
"../dbk/data.rkt"
"../dbk/enumerator.rkt"
racket/pretty
racket/runtime-path
racket/set)
(define-relation/table (cprop curie key value) 'path "rtx2/20210204/cprop")
(define-relation/table (edge id subject object) 'path "rtx2/20210204/edge")
(define-relation/table (... |
6556be176b0eedc002ed9d427fad745ad426bcb3127c359f2f6ab888757f9baf | TravisWhitaker/objc-runtime | NSObject.hs | # LANGUAGE DataKinds
, FlexibleContexts
, KindSignatures
, ScopedTypeVariables
, TemplateHaskell
, TypeFamilies
#
, FlexibleContexts
, KindSignatures
, ScopedTypeVariables
, TemplateHaskell
... | null | https://raw.githubusercontent.com/TravisWhitaker/objc-runtime/4c1024458fb231968ffa619a6a5df40e029fe668/src/Language/ObjC/NSObject.hs | haskell | | Class for all Objective-C objects. Only the 'ClassName' type family must be
defined for an instance of this class. Most Objective-C classes may be
an instance of this class).
| Allocates an object without 'init'.
| Perform type-specific object initialization.
| Allocate and perform type-specific object init... | # LANGUAGE DataKinds
, FlexibleContexts
, KindSignatures
, ScopedTypeVariables
, TemplateHaskell
, TypeFamilies
#
, FlexibleContexts
, KindSignatures
, ScopedTypeVariables
, TemplateHaskell
... |
cfacc2a8fd5c425f798862d681b24cc1b618441a796e10ad619a8f118954a60f | ygmpkk/house | StdIOCommon.hs | -----------------------------------------------------------------------------
-- |
Module : StdIOCommon
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
StdIOCommon defines common types and access functions for the... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/StdIOCommon.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
@1 == Able
@1 == Able
Able <-> Unable
^ ASCII character input... | Module : StdIOCommon
Copyright : ( c ) 2002
StdIOCommon defines common types and access functions for the I\/O library .
module Graphics.UI.ObjectIO.StdIOCommon
( module Graphics.UI.ObjectIO.StdIOCommon
, module Graphics.UI.ObjectIO.StdIOBasic
, module Gr... |
abca851e669a16c46ab957253ffcd7c5f74535d97462111788bbbbb7996a686a | wireless-net/erlang-nommu | error_logger_file_h.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/error_logger_file_h.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(error_logger_file_h).
-behaviour(g... |
cd291cfb1350198773e4f9b25470a76ea46c8ce26204f15d498dac7354c032d5 | plum-umd/c-strider | dataflow.ml |
module IH = Inthash
module E = Errormsg
open Cil
open Pretty
(** A framework for data flow analysis for CIL code. Before using
this framework, you must initialize the Control-flow Graph for your
program, e.g using {!Cfg.computeFileCFG} *)
type 't action =
Default (** The default action *)
| Done of... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/ext/dataflow.ml | ocaml | * A framework for data flow analysis for CIL code. Before using
this framework, you must initialize the Control-flow Graph for your
program, e.g using {!Cfg.computeFileCFG}
* The default action
* Do not do the default action. Use this result
* The default action, followed by the given
... |
module IH = Inthash
module E = Errormsg
open Cil
open Pretty
type 't action =
type 't stmtaction =
* Visit the instructions and successors of this statement
as usual , but use the specified state instead of the
one that was passed to doStmt
as usual, but ... |
bc055d7149c21ed185292be6f65d51dbfe62814ae3b45d730fd1eaa54a1c2111 | kelamg/HtDP2e-workthrough | ex316.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex316) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex316.rkt | racket | about the language level of this file in a form that our tools can easily process.
An Atom is one of:
– Number
– String
– Symbol
– '()
Any -> Boolean
produces true if x is of atomic | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex316) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
An S - expr is one of :
– Atom
– SL
An SL is... |
20b30a6dc364db062725200f12a680981ec2f5c514316684c48781fa2de47bbb | marick/structural-typing | f_combining_condensed_descriptions.clj | (ns structural-typing.use.condensed-type-descriptions.f-combining-condensed-descriptions
(:require [structural-typing.preds :as pred])
(:use midje.sweet
structural-typing.type
structural-typing.global-type
structural-typing.clojure.core
structural-typing.assist.testutil)
(:refer-cl... | null | https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/condensed_type_descriptions/f_combining_condensed_descriptions.clj | clojure | (ns structural-typing.use.condensed-type-descriptions.f-combining-condensed-descriptions
(:require [structural-typing.preds :as pred])
(:use midje.sweet
structural-typing.type
structural-typing.global-type
structural-typing.clojure.core
structural-typing.assist.testutil)
(:refer-cl... | |
77a28cdb109e2296df21a4ad664a48f7de110c4d4bf78ba8f7e6509740aeacc8 | fragnix/fragnix | Network.Wai.Handler.Warp.Buffer.hs | # LANGUAGE Haskell98 #
# LINE 1 " Network / Wai / Handler / Warp / Buffer.hs " #
# LANGUAGE BangPatterns , OverloadedStrings #
module Network.Wai.Handler.Warp.Buffer (
bufferSize
, allocateBuffer
, freeBuffer
, mallocBS
, newBufferPool
, withBufferPool
, toBuilderBuffer
, copy
, bufferIO
) where
... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Network.Wai.Handler.Warp.Buffer.hs | haskell | --------------------------------------------------------------
This is also the maximum size of HTTP/2 frame payload
(excluding frame header).
| Allocating a buffer with malloc().
| Releasing a buffer with free().
--------------------------------------------------------------
# INLINE withBufferPool #
---------... | # LANGUAGE Haskell98 #
# LINE 1 " Network / Wai / Handler / Warp / Buffer.hs " #
# LANGUAGE BangPatterns , OverloadedStrings #
module Network.Wai.Handler.Warp.Buffer (
bufferSize
, allocateBuffer
, freeBuffer
, mallocBS
, newBufferPool
, withBufferPool
, toBuilderBuffer
, copy
, bufferIO
) where
... |
760b0cba061f68a8682496520a79da2f1e300dbcb38754aff9e7dd4515b26425 | semerdzhiev/fp-2020-21 | 05-list-ref.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
; Искаме да вземем i-тия елемент от списъка lst, като броим от 0.
(define (list-ref lst i)
(void)
)
(define tests
(test-suite "List ref tests"
(check-equal? (list-ref '(5 9 2) 0) 5)
(check-equal? (list-ref '(1 8 6 2 3) 4) 3)
)
)
(run-tests tes... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-b/exercises/04.lists/05-list-ref.rkt | racket | Искаме да вземем i-тия елемент от списъка lst, като броим от 0. | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define (list-ref lst i)
(void)
)
(define tests
(test-suite "List ref tests"
(check-equal? (list-ref '(5 9 2) 0) 5)
(check-equal? (list-ref '(1 8 6 2 3) 4) 3)
)
)
(run-tests tests 'verbose)
|
0735b3a5450eafd256cd65387ce25068d1aef924022df09e2d71795ff788e55e | ecraven/r7rs-benchmarks | gcbench.scm | This is adapted from a benchmark written by and
of Post Communications .
It was modified by of Silicon Graphics .
It was translated into Scheme by of Northeastern Univ .
Last modified 24 November 2007 ( translated into R6RS Scheme ) .
;;
;; This is no substitute for real applications. No ... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/3f154cfd20c153f0512577fd826dd0f584feb3e7/src/gcbench.scm | scheme |
This is no substitute for real applications. No actual application
is likely to behave in exactly this way. However, this benchmark was
designed to be more representative of real applications than other
It attempts to model those properties of allocation requests that
It is designe... | This is adapted from a benchmark written by and
of Post Communications .
It was modified by of Silicon Graphics .
It was translated into Scheme by of Northeastern Univ .
Last modified 24 November 2007 ( translated into R6RS Scheme ) .
Java GC benchmarks of which we are aware .
ar... |
4d8789b2c024b3a6441ffc0aa7564f92bd72863aad499a61d31aa7a14e293e53 | quil-lang/quilc | discrete-common.lisp | ;;;; src/discrete/discrete-chip.lisp
;;;;
Author :
(in-package #:cl-quil.discrete)
(defvar *tolerance* cl-quil.frontend::+double-comparison-threshold-loose+
"Holds the value of the TOLERANCE pragma.")
(deftype tolerance-type ()
'(double-float (0d0) (1.0d0)))
(cl-quil.frontend::define-pragma "TOLERANCE" prag... | null | https://raw.githubusercontent.com/quil-lang/quilc/e04c4d3fb9b7b1028ab7faaff1a3bf692dcb3d44/src/discrete/discrete-common.lisp | lisp | src/discrete/discrete-chip.lisp
XXX: It would be nice to not have this be a global variable | Author :
(in-package #:cl-quil.discrete)
(defvar *tolerance* cl-quil.frontend::+double-comparison-threshold-loose+
"Holds the value of the TOLERANCE pragma.")
(deftype tolerance-type ()
'(double-float (0d0) (1.0d0)))
(cl-quil.frontend::define-pragma "TOLERANCE" pragma-tolerance
(:documentation "PRAGMA den... |
7b931c950dc1b2989164754b84f5e38448034b719a3a1b2570cc6bad5b8df8dc | gedge-platform/gedge-platform | cuttlefish_conf.erl | %% -------------------------------------------------------------------
%%
%% cuttlefish_conf: handles the reading and generation of .conf files
%%
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/cuttlefish/src/cuttlefish_conf.erl | erlang | -------------------------------------------------------------------
cuttlefish_conf: handles the reading and generation of .conf files
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 imp... | Copyright ( c ) 2013 Basho Technologies , 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(... |
08ffc0647c28e7baea3132466e9452329f2735dcde9ff683aea4a1baeecce9cf | MLstate/opalang | pass_JavascriptCompilation.ml |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_JavascriptCompilation.ml | ocaml | depends
refactoring in progress
alias
shorthands
--
Compositionality.
Used to know what js files have already been registred, to avoid duplication
of js insertion.
*
Indexed by the name of the file.
*
Indexed by a plugin_id (module_name)
Translating options.
Serializatio... |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
792125042ddef70cd70fd2f669120a298ec29dde1753194f298df1bb855776f7 | awkward-squad/hasql-interpolate | TH.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE BlockArguments #
# LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Hasql.Interpolate.Internal.TH
( sql,
addParam,
parseS... | null | https://raw.githubusercontent.com/awkward-squad/hasql-interpolate/fef1787500a826f5db1d12f21d21ad04e3e4e314/lib/Hasql/Interpolate/Internal/TH.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
| QuasiQuoter that supports interpolation and splices. Produces a
@
example1 :: EncodeValue a => a -> Sql
example1 x = [sql| select \#{x} |]
@
@^{..}@ introduces a splice, which allows us to inject a sql
snippet along with the associated parameters into... | # LANGUAGE BlockArguments #
# LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Hasql.Interpolate.Internal.TH
( sql,
addParam,
parseSqlExpr,
compileSqlExpr,
SqlExpr (..),
SqlBuilderExp (... |
a248dc352f602f06ed5c86a85203c8086824c30a89d5e1c6fc8176834666d0b2 | endobson/racket-webkit | documentation-viewer.rkt | #!/usr/bin/env gracket
#lang racket/gui
(require
racket/cmdline
racket/async-channel
setup/xref
scribble/xref
net/url
"jscore/proxy.rkt"
"main.rkt")
(define port-number 40000)
(command-line #:once-each (("-p" "--port") port "Port number to listen on"
(let ((v (string->number... | null | https://raw.githubusercontent.com/endobson/racket-webkit/5bc5e0b3372d115311fc647e6f79b118eb176018/documentation-viewer.rkt | racket | #!/usr/bin/env gracket
#lang racket/gui
(require
racket/cmdline
racket/async-channel
setup/xref
scribble/xref
net/url
"jscore/proxy.rkt"
"main.rkt")
(define port-number 40000)
(command-line #:once-each (("-p" "--port") port "Port number to listen on"
(let ((v (string->number... | |
ea2fd950ff30169de6b22830592c12d48aa9a2ee58c4bea417ed31a92317ebac | yetanalytics/flint | prologue.cljc | (ns com.yetanalytics.flint.format.prologue
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(defmethod f/format-ast-node :base [_ [_ value]]
(str "BASE " value))
(defmethod f/format-ast-node :prologue/prefix [_ [_ [prefix iri... | null | https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/main/com/yetanalytics/flint/format/prologue.cljc | clojure | (ns com.yetanalytics.flint.format.prologue
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(defmethod f/format-ast-node :base [_ [_ value]]
(str "BASE " value))
(defmethod f/format-ast-node :prologue/prefix [_ [_ [prefix iri... | |
6bb47b0a065dee18f194d1b826b24dd7808e843c3d19e7000da59389829f1011 | nuvla/api-server | credential_infrastructure_service_minio.clj | (ns sixsq.nuvla.server.resources.credential-infrastructure-service-minio
"
Provides the credentials necessary to access a Minio S3 service.
"
(:require
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.credential :as p]
[sixsq.nuvla.server.resources.credential-template-infr... | null | https://raw.githubusercontent.com/nuvla/api-server/e4f0535e2e39e5042094fc20bfb811d2a9c75ad5/code/src/sixsq/nuvla/server/resources/credential_infrastructure_service_minio.clj | clojure |
convert template to credential
multimethods for validation
initialization
| (ns sixsq.nuvla.server.resources.credential-infrastructure-service-minio
"
Provides the credentials necessary to access a Minio S3 service.
"
(:require
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.credential :as p]
[sixsq.nuvla.server.resources.credential-template-infr... |
90aac6f2e5ab40fe07e270c5aad4cb45451aebc6690baf422ef2acbe1a76a9ac | codyrioux/REAPER | td_lambda.clj | (ns reaper.algorithms.td-lambda
"An implementation of tablular backwards TD(lambda) from Sutton and Barto's
Reinforcement Learning: An Introduction."
(:require [reaper.util :as util]))
(defn policy
"Applies the policy that would be defined by v to select an action.
Randomly selects between equivalent actio... | null | https://raw.githubusercontent.com/codyrioux/REAPER/79dd9c045f90e983c39bb8e5972f079dc7c92190/src/reaper/algorithms/td_lambda.clj | clojure | (ns reaper.algorithms.td-lambda
"An implementation of tablular backwards TD(lambda) from Sutton and Barto's
Reinforcement Learning: An Introduction."
(:require [reaper.util :as util]))
(defn policy
"Applies the policy that would be defined by v to select an action.
Randomly selects between equivalent actio... | |
bc03c78957edfb01afac8ad525c2f3131cfd87d76f04890496cccb3ba6bd8315 | xapi-project/xen-api-libs | date.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/date.ml | ocaml | These are ignored: |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
c8a811f6b06244195a62157f1033e80dd5393f73967b53fefc4fa23c7d8ddfbb | amperity/greenlight | runner_test.clj | (ns greenlight.runner-test
(:require
[clojure.java.io :as io]
[clojure.test :refer :all]
[greenlight.runner :as runner]
[greenlight.test :as test]
[greenlight.test-suite.blue :as blue]
[greenlight.test-suite.red :as red]))
(defn test-name
"Retrieve test name only from a Greenlight test"
... | null | https://raw.githubusercontent.com/amperity/greenlight/783e6fe747926b3f2edeb8d7b3d2f3cf08aa3a09/test/greenlight/runner_test.clj | clojure | Return all with no matcher
Match on metadata
Regular expression on test name
By test properties | (ns greenlight.runner-test
(:require
[clojure.java.io :as io]
[clojure.test :refer :all]
[greenlight.runner :as runner]
[greenlight.test :as test]
[greenlight.test-suite.blue :as blue]
[greenlight.test-suite.red :as red]))
(defn test-name
"Retrieve test name only from a Greenlight test"
... |
78a5d0a1f57b3a0f75e6e35a7b3344214da3b27b56c941d0b7edde33125005d1 | mokus0/junkbox | MkPass.hs | #!/usr/bin/env runhaskell
# LANGUAGE ParallelListComp #
module Main where
import Data.Random
import Data.Random.Distribution.Poisson
import Data.Random.Distribution.Bernoulli
import Data.Random.Source.DevRandom
import Control.Monad
import Data.Maybe
import qualified Data.Bimap as B
import qualified Data.Set as S
shi... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Odd%20little%20utilities/MkPass.hs | haskell | #!/usr/bin/env runhaskell
# LANGUAGE ParallelListComp #
module Main where
import Data.Random
import Data.Random.Distribution.Poisson
import Data.Random.Distribution.Bernoulli
import Data.Random.Source.DevRandom
import Control.Monad
import Data.Maybe
import qualified Data.Bimap as B
import qualified Data.Set as S
shi... | |
b732f2acb8cbeb5186024f98f3602fd71c27e59a4309dd632c98143a23c0b0e8 | BillHallahan/G2 | Poly18.hs | module Poly18 where
import Prelude hiding (length, replicate, foldr, foldr1, map, concat, zipWith, repeat)
data C a = Emp | C a (C a)
@ measure size : : C a - > Int
size Emp = 0
size ( C x xs ) = 1
@
size Emp = 0
size (C x xs) = 1
@-}
{-@ f :: { c:C a | size c == 0 } @-}
f :: C a
f = emp
... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/Polymorphism/Poly18.hs | haskell | @ f :: { c:C a | size c == 0 } @ | module Poly18 where
import Prelude hiding (length, replicate, foldr, foldr1, map, concat, zipWith, repeat)
data C a = Emp | C a (C a)
@ measure size : : C a - > Int
size Emp = 0
size ( C x xs ) = 1
@
size Emp = 0
size (C x xs) = 1
@-}
f :: C a
f = emp
emp :: C a
emp = Emp |
9335319b401406f61c0464b2bb03ebcb03a34144db6d2d3f225ae1cef4d5a143 | typedclojure/typedclojure | constant_type.clj | Copyright ( c ) , contributors .
;; 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
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/d6b1771bc0c7e7cd60f2a0323ed1174d12de6f10/typed/clj.checker/src/typed/clj/checker/constant_type.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 ) , contributors .
(ns typed.clj.checker.constant-type
(:require [typed.cljc.checker.type-rep :as r :refer [ret]]
[typed.cljc.checker.type-ctors :as c]
[typed.clojure :as t]
[clojure.core.typed.current-impl :as impl]
[typed.cljc.checker.hset-ut... |
6d80e160f43f86e43a1f71efb029a0b5c870c1c19f8c5bf762d9459ad222baa5 | roblaing/erlang-webapp-howto | logout_handler.erl | -module(logout_handler).
-behavior(cowboy_handler).
-export([init/2]).
init(Req0=#{method := <<"GET">>}, State) ->
{ok, Content} = file:read_file(code:priv_dir(unit6) ++ "/logout.html"),
Req = cowboy_req:reply(200,
#{<<"content-type">> => <<"text/html; charset=UTF-8">>},
Content,
Req0
),
{ok, Req,... | null | https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit6/apps/unit6/src/logout_handler.erl | erlang | io:format("~p~n", [Json]), | -module(logout_handler).
-behavior(cowboy_handler).
-export([init/2]).
init(Req0=#{method := <<"GET">>}, State) ->
{ok, Content} = file:read_file(code:priv_dir(unit6) ++ "/logout.html"),
Req = cowboy_req:reply(200,
#{<<"content-type">> => <<"text/html; charset=UTF-8">>},
Content,
Req0
),
{ok, Req,... |
18912e3cc2744c0e04ccfa73a148788f0d92f94e4f3f894389a0a4675a06f30f | lambdamikel/DLMAPS | class-browser.lisp | (in-package :TOOLS)
(defun make-postscript-file (application-frame filename)
(with-open-file (stream filename
:direction :output
:if-exists :supersede)
(clim:with-output-to-postscript-stream (ps-stream stream
... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/tools/class-browser.lisp | lisp | (in-package :TOOLS)
(defun make-postscript-file (application-frame filename)
(with-open-file (stream filename
:direction :output
:if-exists :supersede)
(clim:with-output-to-postscript-stream (ps-stream stream
... | |
a17b11fedc386199bafce61c2edf284100a2c57c2247bc70755c7e67561044d5 | CodyReichert/qi | examples.lisp | ;;;; defdata-examples.lisp
(in-package #:cl-algebraic-data-type)
;;; Maybe
(defdata maybe
(just t)
nothing)
(defun maybe-or-else (m else)
(match maybe m
((just x) x)
(nothing else)))
;;; Either
(defdata either
(left t)
(right t))
Point
(defdata (point :mutable t)
(rect float float))
(d... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-algebraic-data-type-master/examples.lisp | lisp | defdata-examples.lisp
Maybe
Either |
(in-package #:cl-algebraic-data-type)
(defdata maybe
(just t)
nothing)
(defun maybe-or-else (m else)
(match maybe m
((just x) x)
(nothing else)))
(defdata either
(left t)
(right t))
Point
(defdata (point :mutable t)
(rect float float))
(defvar *origin* (rect 0.0 0.0))
(defun mirror-po... |
e561fa0e7cf10205ee730c85ddbd8c7f63745a2f79b7e22be9e5d8677e8ae6f8 | startalkIM/ejabberd | http_dispatch.erl | -module(http_dispatch).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("ejabberd.hrl").
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Path, _} = cowboy_req:path_info(Req),
{ok, Req1} = handle_process(Path, Req),
{ok, Req1, ... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/http_dispatch.erl | erlang | -module(http_dispatch).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("ejabberd.hrl").
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Path, _} = cowboy_req:path_info(Req),
{ok, Req1} = handle_process(Path, Req),
{ok, Req1, ... | |
2cc170d699a191903b2bf0ae76db5c4fcaa8a4925a9e481e8deb5a390ab06dfc | khibino/haskell-tiny-intro | reverseWords.hs | import System.Environment
-- length :: [a] -> Int
-- 単語に区切る
-- words :: String -> [String]
-- 単語列を一つの文字列に
-- unwords :: [String] -> String
行に区切る
-- lines :: String -> [String]
-- 複数行を一つの文字列に
-- unlines :: [String] -> String
リストを逆順に
-- reverse :: [a] -> [a]
-- getArgs :: IO [String]
-- readFile :: FilePath -... | null | https://raw.githubusercontent.com/khibino/haskell-tiny-intro/bdd84d6b16876d8b909cd8d0a17d568346d6d63a/exercise/IO/ex/reverseWords.hs | haskell | length :: [a] -> Int
単語に区切る
words :: String -> [String]
単語列を一つの文字列に
unwords :: [String] -> String
lines :: String -> [String]
複数行を一つの文字列に
unlines :: [String] -> String
reverse :: [a] -> [a]
getArgs :: IO [String]
readFile :: FilePath -> IO String
putStrLn :: String -> IO ()
putStr :: String -> IO ()
map :... | import System.Environment
行に区切る
リストを逆順に
mapM _ : : = > ( a - > m b ) - > [ a ] - > IO ( )
let y = 2 * x
main :: IO ()
main = do
args <- getArgs
case args of
[] -> undefined
x:xs -> do
undefined
|
ab84e9cd227487fbeb3d2a9744eb81efdd4e022d87b6946bba49cc144f22ce54 | bufferswap/ViralityEngine | hashing-fast32-2.lisp | (in-package #:vumbra.hashing)
;;;; Hashing functions
;;;; FAST32_2
-Noise-Lib/blob/master/gpu_noise_lib.glsl
(defun fast32-2 ((grid-cell :vec2))
(let ((p (vec4 grid-cell (1+ grid-cell))))
(setf p (+ (* (- p (* (floor (* p (/ 69.0))) 69.0))
(.xyxy (vec2 2.009842 1.372549)))
... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vumbra/src/hashing-fast32-2.lisp | lisp | Hashing functions
FAST32_2 | (in-package #:vumbra.hashing)
-Noise-Lib/blob/master/gpu_noise_lib.glsl
(defun fast32-2 ((grid-cell :vec2))
(let ((p (vec4 grid-cell (1+ grid-cell))))
(setf p (+ (* (- p (* (floor (* p (/ 69.0))) 69.0))
(.xyxy (vec2 2.009842 1.372549)))
(.xyxy (vec2 403.83917 377.2427))))
... |
5ae114a992aded995ab90a8a4496e29338197f3b6b97db1bc8d8aafea86c6c1e | itchyny/vim-haskell-sort-import | qualified.out.hs | import AA
import qualified BA as BA
import CA
import qualified AB as AB
import qualified BB as BB
import CB
import qualified AC as AC
import BC
import qualified CC as CC
| null | https://raw.githubusercontent.com/itchyny/vim-haskell-sort-import/bfe4b6a5e212828ef14e611fa8c358b3960d4f9f/test/basic/qualified.out.hs | haskell | import AA
import qualified BA as BA
import CA
import qualified AB as AB
import qualified BB as BB
import CB
import qualified AC as AC
import BC
import qualified CC as CC
| |
79b0a2ae6a10ffa0411102396b9ead2410bb33bbab78eb0328a479ad877a43d4 | windorg/app-old | Prelude.hs | module Application.Script.Prelude (
module IHP.ControllerPrelude,
module Generated.Types,
module IHP.Prelude,
module IHP.ScriptSupport,
) where
import Generated.Types
import IHP.ControllerPrelude
import IHP.Prelude
import IHP.ScriptSupport
| null | https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Application/Script/Prelude.hs | haskell | module Application.Script.Prelude (
module IHP.ControllerPrelude,
module Generated.Types,
module IHP.Prelude,
module IHP.ScriptSupport,
) where
import Generated.Types
import IHP.ControllerPrelude
import IHP.Prelude
import IHP.ScriptSupport
| |
606ec39286c671babccb1b192cfbc78b4631626e4ef6f02c43f79878a414f38a | softwarelanguageslab/maf | R5RS_scp1_family-budget-3.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
* calls to i d fun : 2
(letrec ((familieboom (__toplevel_cons
'jan
(__toplevel_cons
(__toplevel_cons
'piet
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_family-budget-3.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
* calls to i d fun : 2
(letrec ((familieboom (__toplevel_cons
'jan
(__toplevel_cons
(__toplevel_cons
'piet
(__to... |
15dd25ea8d9191abdb2d2010297bd8487226be60bbc94e8534c3e92820f0800f | ekmett/coda | Parser.hs | # language GADTs #
module Syntax.Parser where
import Syntax.Dyck
data Parsed = Parsed
{ parsedNone :: ()
, parsedDo :: Bool
}
data Tag a where
None :: Tag ()
Do :: Tag Bool
parseNone :: Dyck -> ()
parseNone _ = ()
parseDo :: Dyck -> Bool
parseDo _ = False
parse :: Dyck -> Parsed
parse d = Parsed (par... | null | https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/src/parser/Syntax/Parser.hs | haskell | # language GADTs #
module Syntax.Parser where
import Syntax.Dyck
data Parsed = Parsed
{ parsedNone :: ()
, parsedDo :: Bool
}
data Tag a where
None :: Tag ()
Do :: Tag Bool
parseNone :: Dyck -> ()
parseNone _ = ()
parseDo :: Dyck -> Bool
parseDo _ = False
parse :: Dyck -> Parsed
parse d = Parsed (par... | |
8ecc5c16393e586e6406cd51804e5c55d44e81a5a7e7ada3be176f7b81b55e94 | pcalcado/rtfspec | should_spec.clj | (use 'rtfspec)
(spec "3. SHOULD This word, or the adjective 'RECOMMENDED', mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course."
(should "Not ... | null | https://raw.githubusercontent.com/pcalcado/rtfspec/c733f504031635316fdc401ec371e8f03c01f380/test/smoke/success/should_spec.clj | clojure | (use 'rtfspec)
(spec "3. SHOULD This word, or the adjective 'RECOMMENDED', mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course."
(should "Not ... | |
88901ba8a051b0c56227450ae764d47883e94b0cece6e0ba702ff7cc7d85adc5 | jeromesimeon/Galax | schema_validation.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/schema/schema_validation.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : schema_validation.mli , v 1.4 2007/02/01 22:08:53 simeon Exp $
Module : Schema_validation
Description :
This module implements XML Schema validation directly on a SAX
stream .
Description:
This module im... |
f923c6ef468221a7eec946a2644901165ea068e4a2f2a32e5f15a8546eb33497 | arttuka/reagent-material-ui | image_list.cljs | (ns reagent-mui.material.image-list
"Imports @mui/material/ImageList as a Reagent component.
Original documentation is at -ui/api/image-list/ ."
(:require [reagent.core :as r]
["@mui/material/ImageList" :as MuiImageList]))
(def image-list (r/adapt-react-class (.-default MuiImageList)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/image_list.cljs | clojure | (ns reagent-mui.material.image-list
"Imports @mui/material/ImageList as a Reagent component.
Original documentation is at -ui/api/image-list/ ."
(:require [reagent.core :as r]
["@mui/material/ImageList" :as MuiImageList]))
(def image-list (r/adapt-react-class (.-default MuiImageList)))
| |
48337821c779b8edda175cc13ebc5e11941596a2d88dc31f950161d459711b30 | ocaml/oasis | q.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestPluginOMake/complex/src/packedlib/q.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
78110708425a00bd89f5660bc3781e04e0646ad664196b410f94f1a4c3f61e5e | hvdthong/PatchNetTool | decomment.ml |
* This file is part of PatchNet , licensed under the terms of the GPL v2 .
* See copyright.txt in the PatchNet source code for more information .
* The PatchNet source code can be obtained at
*
* This file is part of PatchNet, licensed under the terms of the GPL v2.
* See copyright.txt in the PatchNet... | null | https://raw.githubusercontent.com/hvdthong/PatchNetTool/24a47115f89a0aab2c458758a89f129670c5de27/preprocessing/decomment.ml | ocaml | Hoping for no occurrences of /*/
empties strings, if possible
not supporting //, shouldn't occur in the kernel
hope for the best
bad string, but don't want to crash, so move on
let res = if String.trim res = "" then "" else res in
bad string, but don't want to crash, so move on
let res = if String.trim res ... |
* This file is part of PatchNet , licensed under the terms of the GPL v2 .
* See copyright.txt in the PatchNet source code for more information .
* The PatchNet source code can be obtained at
*
* This file is part of PatchNet, licensed under the terms of the GPL v2.
* See copyright.txt in the PatchNet... |
7ca9e98549aac4cc6729e8e4c81bd3b669376b3c6cac5aaf1c36536685c58267 | erlang-ls/erlang_ls | edoc_diagnostics.erl | -module(edoc_diagnostics).
-export([main/0]).
%% @mydoc Main function
main() ->
internal().
%% @docc internal
internal() ->
ok.
%% @doc `
unused() ->
ok.
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/0fc151d7fdfca478338777d83057ae1d32d68252/apps/els_lsp/priv/code_navigation/src/edoc_diagnostics.erl | erlang | @mydoc Main function
@docc internal
@doc ` | -module(edoc_diagnostics).
-export([main/0]).
main() ->
internal().
internal() ->
ok.
unused() ->
ok.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.