_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 |
|---|---|---|---|---|---|---|---|---|
b6b2d3085a54921e60f43bd195e36c9c5bd47c7110086276e32a1eeb2569cdde | chapmanb/bcbio.variation | grade.clj | (ns bcbio.variation.grade
"Support comparisons of variant calls to reference call sets, providing
detailed metrics about problematic discordant calls."
(:import [htsjdk.variant.vcf
VCFInfoHeaderLine VCFHeaderLineType]
[htsjdk.variant.variantcontext VariantContextBuilder])
(:require [cloj... | null | https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/grade.clj | clojure | ## Summarize grading results
## Identify grading references | (ns bcbio.variation.grade
"Support comparisons of variant calls to reference call sets, providing
detailed metrics about problematic discordant calls."
(:import [htsjdk.variant.vcf
VCFInfoHeaderLine VCFHeaderLineType]
[htsjdk.variant.variantcontext VariantContextBuilder])
(:require [cloj... |
2a1c61f3c39d5d37765fd5ad994d41508d03e50002e6e97a4c05f39d9a005dbb | ucsd-progsys/nate | Register.mli | (****************************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4/Register.mli | ocaml | **************************************************************************
Objective Caml
... | Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - Daniel de Rauglaudre : initial version
* - : refactoring
... |
8078eb47961eadc464fc43ee541a2f2a113aaea1248c997576f6a4153b30d024 | processone/tsung | ts_bosh.erl | %%%
Copyright 2010 © ProcessOne
%%%
Author : < >
%%%
%%% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
%%% (at your option) any later version.
... | null | https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/tsung/ts_bosh.erl | erlang |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Genera... | Copyright 2010 © ProcessOne
Author : < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place , Suite 330 , Bosto... |
a8af6bc666d782615ca9e77ccb55934b57ccee92a3ed94914d0dbe0548e7d624 | jeapostrophe/srpnt | nestration.rkt | #lang racket/base
(require racket/match
racket/list
racket/contract
racket/fixnum
data/enumerate/lib
srpnt/enumerate-lib
srpnt/music-theory
srpnt/nestration/instruments)
(define tone-names/e
(apply old-fin/e tone-names))
(define scales/e (apply fin/e sc... | null | https://raw.githubusercontent.com/jeapostrophe/srpnt/c26e74ce524bb988d6643273c96f4e94406b1746/srpnt/nestration.rkt | racket | (fin/e 2 3) (fin/e 1 2) (fin/e 0 2) (fin/e 1 2)
xxx contracts | #lang racket/base
(require racket/match
racket/list
racket/contract
racket/fixnum
data/enumerate/lib
srpnt/enumerate-lib
srpnt/music-theory
srpnt/nestration/instruments)
(define tone-names/e
(apply old-fin/e tone-names))
(define scales/e (apply fin/e sc... |
8cfa781ad70dd7392df91cbed0c0675b1f5abf49f84a0630913bb1d4001123dc | martijnbastiaan/doctest-parallel | Foo.hs | module Setup.Foo where
-- $setup
> > > let x = 23 : : Int
-- |
-- >>> x + foo
65
foo :: Int
foo = 42
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/integration/Setup/Foo.hs | haskell | $setup
|
>>> x + foo | module Setup.Foo where
> > > let x = 23 : : Int
65
foo :: Int
foo = 42
|
bf61ac05fc6b6462810548c231c407d65ef40155b2aaf4a191ec9d8c4f2e7667 | clojure/core.typed | swap_bang.clj | (ns clojure.core.typed.test.swap-bang
(:require [clojure.core.typed :as t]))
(t/ann foo (t/Atom1 (t/Map ':a Number)))
(def foo (atom {:a 1}))
(fn []
(swap! foo (t/inst assoc (t/Map ':a Number) ':a Number) :a 3))
;
;(swap! foo (fn [a] a))
;(swap! foo (fn [a] a))
( swap ! foo ( fn [ a b ] a ) 2 )
( swap ! foo ( fn... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/swap_bang.clj | clojure |
(swap! foo (fn [a] a))
(swap! foo (fn [a] a)) | (ns clojure.core.typed.test.swap-bang
(:require [clojure.core.typed :as t]))
(t/ann foo (t/Atom1 (t/Map ':a Number)))
(def foo (atom {:a 1}))
(fn []
(swap! foo (t/inst assoc (t/Map ':a Number) ':a Number) :a 3))
( swap ! foo ( fn [ a b ] a ) 2 )
( swap ! foo ( fn [ a b ] a ) 2 )
|
e39c0481aa68df190e6b8ef6193d6e03df03e04efd57fbc2b8ed6ab4dc598c22 | objecthub/swift-lispkit | SRFI-214.scm | SRFI 214 REGRESSION TEST SUITE
;;;
This is the test suite for SRFI 214 .
;;;
Copyright © 2020 - 2021 . All rights reserved .
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Softw... | null | https://raw.githubusercontent.com/objecthub/swift-lispkit/0ebd6226022d393eb0c427703c69a9f1eaeba4d0/Sources/LispKit/Resources/Tests/SRFI-214.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLI... | SRFI 214 REGRESSION TEST SUITE
This is the test suite for SRFI 214 .
Copyright © 2020 - 2021 . All rights reserved .
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Softwar... |
b862774ef3b92e7b74bab69459d80cf389c3a269c014285ecb7672cda0f1ffec | informatimago/lisp | felt-board.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : felt-board.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Example taken from
;;;;
;;;; This pr... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/pgl/examples/felt-board.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Example taken from
This program offers a simple example of the acm.graphics package
that draws a red rectangle and a green oval. The d... | FILE : felt-board.lisp
USER - INTERFACE :
the " golden ratio " thought by the Greeks to represent the most
< PJB > < >
MODIFICATIONS
2015 - 11 - 13 < PJB > Created .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as pub... |
a99162c77bc744cd9836c8dc12c5f88b9bdf80e5540001a5679119845a1a0a41 | RunOrg/RunOrg | setView.mli | (* © 2014 RunOrg *)
type 'key t
val make : Projection.t -> string -> int ->
(module Fmt.FMT with type t = 'key) ->
Projection.view * 'key t
val add : 'key t -> 'key list -> # Common.ctx Run.effect
val remove : 'key t -> 'key list -> # Common.ctx Run.effect
val exists : 'key t -> 'key -> (#Common.ctx, b... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/cqrsLib/setView.mli | ocaml | © 2014 RunOrg |
type 'key t
val make : Projection.t -> string -> int ->
(module Fmt.FMT with type t = 'key) ->
Projection.view * 'key t
val add : 'key t -> 'key list -> # Common.ctx Run.effect
val remove : 'key t -> 'key list -> # Common.ctx Run.effect
val exists : 'key t -> 'key -> (#Common.ctx, bool) Run.t
|
1e21be4f6a554c88c4a213896dca3774d4ad2de15157a5a437b8b0ca4f9f536e | aarkerio/ZentaurLMS | base_controller.clj | (ns zentaur.controllers.base-controller
(:require [clojure.string :as string]
[ring.util.codec :as c]
[ring.util.http-response :as response]
[zentaur.models.posts :as modposts]))
(def msg-erfolg "Veränderung wurden erfolgreich gespeichert")
(def msg-fehler "Etwas ging schief")
(d... | null | https://raw.githubusercontent.com/aarkerio/ZentaurLMS/adb43fb879b88d6a35f7f556cb225f7930d524f9/src/clj/zentaur/controllers/base_controller.clj | clojure | (ns zentaur.controllers.base-controller
(:require [clojure.string :as string]
[ring.util.codec :as c]
[ring.util.http-response :as response]
[zentaur.models.posts :as modposts]))
(def msg-erfolg "Veränderung wurden erfolgreich gespeichert")
(def msg-fehler "Etwas ging schief")
(d... | |
a3a2b21121273af9f3f73d49d3c83324127dc3c0aa121148551287c6ae759057 | picty/parsifal | test_basePTypes.ml | open Parsifal
open BasePTypes
open OUnit
Generic functions
(* TODO: Move those funs elsewhere *)
let random_string len () =
let res = Bytes.make len '\x00' in
for i = 0 to (len - 1) do
Bytes.set res i (char_of_int (Random.int 256))
done;
Bytes.to_string res (* TODO: Use unsafe_to_string *)
let ntimes ... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/core/unit/test_basePTypes.ml | ocaml | TODO: Move those funs elsewhere
TODO: Use unsafe_to_string
TODO: Move those funs elsewhere
TODO: Use modules when they exists?
TODO: tests, including parsingStop | open Parsifal
open BasePTypes
open OUnit
Generic functions
let random_string len () =
let res = Bytes.make len '\x00' in
for i = 0 to (len - 1) do
Bytes.set res i (char_of_int (Random.int 256))
done;
let ntimes n f () = for _i = 1 to n do f (); done
let str_wrap parse_fun s = exact_parse parse_fun (in... |
59291ce13b494820f9e3df9b4efeea96e19d1f4a61b2e625f752ac230fa1300d | rbuchmann/samak | helpers.cljc | (ns samak.helpers
#?@
(:clj
[(:refer-clojure :exclude [uuid])
(:require
[clojure.data.json :as json]
[clj-time.core :as time]
[clj-time.format :as time-format]
[clj-time.coerce :as time-coerce])]
:cljs
[(:refer-clojure :exclude [uuid])
(:require
[cljs-time.core :as time]
... | null | https://raw.githubusercontent.com/rbuchmann/samak/ab98d1a180ee02c6cd784962b3c03e473a6d481b/src/samak/helpers.cljc | clojure | (ns samak.helpers
#?@
(:clj
[(:refer-clojure :exclude [uuid])
(:require
[clojure.data.json :as json]
[clj-time.core :as time]
[clj-time.format :as time-format]
[clj-time.coerce :as time-coerce])]
:cljs
[(:refer-clojure :exclude [uuid])
(:require
[cljs-time.core :as time]
... | |
89cee7c3284a979656e807acabd0cdd83c792a09499de77180df2986fb3c9a96 | geophf/1HaskellADay | Exercise.hs | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2018.M04.D04.Exercise where
-
So you have the data from the last two day 's exercises , let 's start storing
those data into a PostgreSQL database . Today 's exercise is to store just
the authors .
But there 's a catch : you have to consider you 're doing ... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M04/D04/Exercise.hs | haskell | }
table state | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Y2018.M04.D04.Exercise where
-
So you have the data from the last two day 's exercises , let 's start storing
those data into a PostgreSQL database . Today 's exercise is to store just
the authors .
But there 's a catch : you have to consider you 're doing ... |
ed13e7246a52af3a92a740c8cd2efe8045fc958f6940bd96704ca3b6f5d7a55b | input-output-hk/cardano-ledger | QuickCheck.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Standa... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/small-steps-test/src/Control/State/Transition/Trace/Generator/QuickCheck.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
* Trace generator properties
* Trace classification
* Internal
| State transition systems for which traces can be generated, given a trace
generation environment.
The trace generation environment allows to pass relevant data to the trace
generation algorithm.
|... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# LANGUAGE TypeA... |
9d8fbb87630d5c269b7c1c6d2a78ccfa0a22c59c4333dd4a9efb38cda18ec2d3 | rabbitmq/rabbitmq-shovel | rabbit_shovel_status.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_shovel_status).
-behaviour(gen_ser... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-shovel/f9f4e95343a81aea093687b0fd610711bd3f70ac/src/rabbit_shovel_status.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_shovel_status).
-behaviour(gen_server).
... | |
cfe5dab0499be797f2530da4b8bcd2b00d729d0125841576bbb15a7c8d1ac709 | facebook/flow | export_search.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/flow/db16b8882569c6d87253ec173f5f9e4dcc1a3505/src/services/export/search/export_search.ml | ocaml | Merge_import |
* 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... |
62fb3c5ef733cb5e82e9659a3ab60df87ac6a0eea298ea17fcdc1a30186e7b68 | deech/fltkhs-demos | tile.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Graphics.UI.FLTK.LowLevel.FL as FL
import Graphics.UI.FLTK.LowLevel.FLTKHS
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
main :: IO ()
main = do
window <- doubleWindowNew (Size (Width 300) (Height 300)) Nothing Nothing
setBox window NoBox
_... | null | https://raw.githubusercontent.com/deech/fltkhs-demos/64ed6dfd281d309535ea94d6396c0260395b37d0/src/Examples/tile.hs | haskell | # LANGUAGE OverloadedStrings #
create the symmetrical resize box with dx and dy pixels distance, resp.
from the borders of the Fl_Tile widget | module Main where
import qualified Graphics.UI.FLTK.LowLevel.FL as FL
import Graphics.UI.FLTK.LowLevel.FLTKHS
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
main :: IO ()
main = do
window <- doubleWindowNew (Size (Width 300) (Height 300)) Nothing Nothing
setBox window NoBox
_ <- setResizable window (Just windo... |
6b3be88ea7c1676ed394a2ead4cd519f0762d7ef3e1871ed36a55f797b508300 | NetworkVerification/nv | Interp.ml | open Nv_lang
open Nv_datastructures
open Nv_utils
open Syntax
open Memoization
open Printing
open Collections
open InterpUtils
open Batteries
(* Interpreter Errors *)
(* Interpreter Environments *)
let update_values env venv = { env with value = Env.updates env.value venv }
let update_ty env x t = { env with ty = Env... | null | https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/interpreter/Interp.ml | ocaml | Interpreter Errors
Interpreter Environments
Compute the closure of the function applied over the leafs
Likewise for the predicate, and create a cache entry
Create closure for predicate
Compute the closure of the function applied over the leafs
Likewise for the predicate, and create a cache entry | open Nv_lang
open Nv_datastructures
open Nv_utils
open Syntax
open Memoization
open Printing
open Collections
open InterpUtils
open Batteries
let update_values env venv = { env with value = Env.updates env.value venv }
let update_ty env x t = { env with ty = Env.update env.ty x t }
let update_tys env tvs tys =
let... |
c38f8d33847da6ccfda6ef98c92f7305e907cc34fec6d4a664ab66f8050f481c | camfort/fortran-src | Common.hs | module Language.Fortran.Repr.Eval.Common where
import qualified Language.Fortran.AST as F
| Monads which provide functionality to evaluate some Fortran type or value .
We abstract over the evaluation target type in order to reuse this for both
value evaluation , and " type evaluation " , since there is ( a sma... | null | https://raw.githubusercontent.com/camfort/fortran-src/2efac302729a509c28ebe038d976681128e28804/src/Language/Fortran/Repr/Eval/Common.hs | haskell | | Target type that we evaluate to.
| Arbitrarily record some user-facing information concerning evaluation.
For example, potentially useful when making defaulting decisions. | module Language.Fortran.Repr.Eval.Common where
import qualified Language.Fortran.AST as F
| Monads which provide functionality to evaluate some Fortran type or value .
We abstract over the evaluation target type in order to reuse this for both
value evaluation , and " type evaluation " , since there is ( a sma... |
562437442334f66419af6513ded52725d2be64f468357eb4c44f2ca21cd88d7d | Perry961002/SICP | exe2.33-accumulate.scm | ;累积工作
(define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
重写map过程
(define (map p sequence)
(accumulate (lambda (x y) (cons (p x) y)) '() sequence))
;重写append过程
(define (append seq1 seq2)
(accumulate ... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.33-accumulate.scm | scheme | 累积工作
重写append过程
重写length过程 | (define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
重写map过程
(define (map p sequence)
(accumulate (lambda (x y) (cons (p x) y)) '() sequence))
(define (append seq1 seq2)
(accumulate cons seq2 seq1))
... |
a49539e3280827c79325b14e79c025687e36640fef2675923f791f028b5b1d53 | huangz1990/real-world-haskell-cn | exercise9,10.hs | data Direction = TurnLeft | TurnRight | Straight deriving (Show, Eq)
data Point = Point{
px :: Int,
py :: Int
} deriving (Show)
calcTurn :: Point -> Point -> Point -> Direction
calcTurn a b c =
if area == 0 then Straight
else if area > 0 then TurnLeft
else TurnRight
where
area... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/exercise/ch3/exercise9%2C10.hs | haskell | data Direction = TurnLeft | TurnRight | Straight deriving (Show, Eq)
data Point = Point{
px :: Int,
py :: Int
} deriving (Show)
calcTurn :: Point -> Point -> Point -> Direction
calcTurn a b c =
if area == 0 then Straight
else if area > 0 then TurnLeft
else TurnRight
where
area... | |
18eaa859a199af473e2fda1b240db907dec65dd5b71ec7d6e7e44d378d63b344 | karamaan/karamaan-opaleye | Manipulation.hs | {-# LANGUAGE Arrows #-}
module Manipulation () where
import Prelude hiding (or)
import Karamaan.Opaleye.Wire (Wire(Wire))
import Karamaan.Opaleye.ExprArr (ExprArr, Expr, eq, plus, mul, constant, or)
import Control.Arrow (returnA)
import Karamaan.Opaleye.Manipulation (arrangeDeleteSqlDef,
... | null | https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Examples/Manipulation.hs | haskell | # LANGUAGE Arrows # | module Manipulation () where
import Prelude hiding (or)
import Karamaan.Opaleye.Wire (Wire(Wire))
import Karamaan.Opaleye.ExprArr (ExprArr, Expr, eq, plus, mul, constant, or)
import Control.Arrow (returnA)
import Karamaan.Opaleye.Manipulation (arrangeDeleteSqlDef,
arrangeInsertSql... |
87e0cc5a4ba13d4db14b17d8c838fd48f2f953608d63b8c839c02924cdd2687c | Metaxal/rascas | color-printf.rkt | #lang racket/base
(require racket/dict
racket/string
racket/port
racket/system)
(provide (rename-out [color-printf printf]
[color-format format])
current-use-colors?)
;; Query how many colors are supported. Any way to avoid system*?
(define (n-supported-co... | null | https://raw.githubusercontent.com/Metaxal/rascas/540530c28689de50c526abf36079c07fd0436edb/color-printf.rkt | racket | Query how many colors are supported. Any way to avoid system*?
Check if the program is running in a terminal that supports colors. | #lang racket/base
(require racket/dict
racket/string
racket/port
racket/system)
(provide (rename-out [color-printf printf]
[color-format format])
current-use-colors?)
(define (n-supported-colors)
(define out (open-output-string))
(define res
(param... |
f190f9fc2b588d55e8aad4f0ccc1b4a11bb4bbb47f98bcbe3915c83428d16f77 | wandersoncferreira/mamulengo | pg_impl.clj | (ns mamulengo.durable.pg-impl
(:require [mamulengo.durability :refer [create-system-tables!
get-system-schema!
get-schema-at!
retrieve-all-facts!
setu... | null | https://raw.githubusercontent.com/wandersoncferreira/mamulengo/0c175e9b068b1dfbf3a544776db7bbe3e2af96a7/src/mamulengo/durable/pg_impl.clj | clojure | (ns mamulengo.durable.pg-impl
(:require [mamulengo.durability :refer [create-system-tables!
get-system-schema!
get-schema-at!
retrieve-all-facts!
setu... | |
f89dcb351e49dc9cc9c438ff7516490da0bd04b05d11a27ab9ba8a5cee767a9b | agentm/project-m36 | CSV.hs | # LANGUAGE CPP #
import ProjectM36.Base
import ProjectM36.Relation.Show.CSV
import ProjectM36.Relation.Parse.CSV
import qualified ProjectM36.Attribute as A
import ProjectM36.Relation
import ProjectM36.DataTypes.Basic
import ProjectM36.DataTypes.List
import ProjectM36.DataTypes.Interval
import System.Exit
import Test.... | null | https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/test/Relation/Export/CSV.hs | haskell | round-trip various atom types through CSV export/import
BS.writeFile "/tmp/csv" csvData | # LANGUAGE CPP #
import ProjectM36.Base
import ProjectM36.Relation.Show.CSV
import ProjectM36.Relation.Parse.CSV
import qualified ProjectM36.Attribute as A
import ProjectM36.Relation
import ProjectM36.DataTypes.Basic
import ProjectM36.DataTypes.List
import ProjectM36.DataTypes.Interval
import System.Exit
import Test.... |
835d9fe7c96bddbab5c3e92875d571cf5da56854d1db308effa0f9cdc013207d | ocaml-ppx/ppx | quoter.ml | open Import
open Current_ast
type t =
{ mutable next_id : int
; mutable bindings : value_binding list
}
let create () =
{ next_id = 0
; bindings = []
}
let sanitize t e =
match t.bindings with
| [] -> e
| bindings ->
pexp_let ~loc:(Expression.pexp_loc e) Rec_flag.recursive bindings e
let quote... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/src/quoter.ml | ocaml | open Import
open Current_ast
type t =
{ mutable next_id : int
; mutable bindings : value_binding list
}
let create () =
{ next_id = 0
; bindings = []
}
let sanitize t e =
match t.bindings with
| [] -> e
| bindings ->
pexp_let ~loc:(Expression.pexp_loc e) Rec_flag.recursive bindings e
let quote... | |
7a4692681935f85a514835e3a9dbe6d995300512ddea520b01612a0bbdc0b3e4 | pallix/lacij | nodeview.clj | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "Default 'factory' to create different types of nodes views
with default styles."}
lacij.view.nodeview
(:use lacij.utils.core
lacij.view.utils.style
(lacij.view rectnodeview circlenodeview rectnodeselectio... | null | https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/view/nodeview.clj | clojure | default | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "Default 'factory' to create different types of nodes views
with default styles."}
lacij.view.nodeview
(:use lacij.utils.core
lacij.view.utils.style
(lacij.view rectnodeview circlenodeview rectnodeselectio... |
d9d9ca3f09b1c00cc89fcda05a8098b07557a20aac41c0103d2c9dab3cba77a9 | census-instrumentation/opencensus-erlang | oc_stat_SUITE.erl | -module(oc_stat_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include("opencensus.hrl").
-define(VD, [#{name := "last_video_size",
description := "last processed video size",
ctags := #{ctag := value},
... | null | https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/test/oc_stat_SUITE.erl | erlang | ===================================================================
TESTS
===================================================================
can record measure without views | -module(oc_stat_SUITE).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include("opencensus.hrl").
-define(VD, [#{name := "last_video_size",
description := "last processed video size",
ctags := #{ctag := value},
... |
73a60b92b167fca29c57c3b3f3a0f6be38b05856593233f5f73b298967b5f2b2 | haskell-github/github | Users.hs | -----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
Maintainer : < >
--
The Github Users API , as described at
-- </>.
module GitHub.Endpoints.Users (
userInfoForR,
ownerInfoForR,
userInfoCurrentR,
module GitHub.Data,
) where
... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/src/GitHub/Endpoints/Users.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-3-Clause
</>.
| Query a single user.
See </#get-a-single-user>
or
| Query a single user or an organization.
See </#get-a-single-user>
| Query the authenticated user. | Maintainer : < >
The Github Users API , as described at
module GitHub.Endpoints.Users (
userInfoForR,
ownerInfoForR,
userInfoCurrentR,
module GitHub.Data,
) where
import GitHub.Data
import Prelude ()
> > > github ' userInfoForR " - burns "
> > > github userInfoForR ( OAuth " github... |
ae4d436199e2af41a5250f73ede4b1b9495f1c6001a75760b9b6c76fcd3c4a19 | CRogers/obc | lalr.mli |
* lalr.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributions o... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/yacc/lalr.mli | ocaml | do_lookahead -- perform LALR(1) lookahead computation |
* lalr.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributions o... |
7d01d0de6c2d6586cb6a6c05ec8672494842d37d877d9a3a3be88d8bb0f3e949 | xh4/web-toolkit | true.lisp | (in-package :json)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass true ()
((value
:initarg :value
:initform t
:accessor value))))
(defmethod print-object ((object true) stream)
(print-unreadable-object (object stream :type t)))
(eval-when (:compile-toplevel :load-toplevel ... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/json/true.lisp | lisp | (in-package :json)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass true ()
((value
:initarg :value
:initform t
:accessor value))))
(defmethod print-object ((object true) stream)
(print-unreadable-object (object stream :type t)))
(eval-when (:compile-toplevel :load-toplevel ... | |
b29d25514220c9aea6e32707d6c38cc782e9dcaf478ac96e6b68bfafa3a66158 | nikita-volkov/rerebase | Bitraversable.hs | module Data.Bitraversable
(
module Rebase.Data.Bitraversable
)
where
import Rebase.Data.Bitraversable
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Bitraversable.hs | haskell | module Data.Bitraversable
(
module Rebase.Data.Bitraversable
)
where
import Rebase.Data.Bitraversable
| |
f6eaf7a5d4ea5762799f10f006657f26db54224cddfeece20aa4e02836f0a48c | Hara-Laboratory/subleq-toolchain | IntMachine.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
module Language.Subleq.Model.Architecture.IntMachine (Word, IntMachine, IntSubleqState) where
import Prelude hiding (Word)
import Language.Subleq.Model.Prim
import Data.Map (Map)
type Word = Integer
type IntMachine = Machine Integer Intege... | null | https://raw.githubusercontent.com/Hara-Laboratory/subleq-toolchain/c79ab101c2c50f2975d6087b9727bf024df05195/Language/Subleq/Model/Architecture/IntMachine.hs | haskell | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
module Language.Subleq.Model.Architecture.IntMachine (Word, IntMachine, IntSubleqState) where
import Prelude hiding (Word)
import Language.Subleq.Model.Prim
import Data.Map (Map)
type Word = Integer
type IntMachine = Machine Integer Intege... | |
02bd4bf0f2fa45e106a8a90d50369c8a7f0994ca712cd23e091aed6ea5e643a4 | leafclick/pgmig | 20201106155531-programmatic-third.down.clj | (require '[next.jdbc :as jdbc]
'[common.util :refer [print-result]])
(println "Programmatic DOWN")
(print-result
(:next.jdbc/update-count (jdbc/execute-one! (get-connection) ["delete from bar"])))
| null | https://raw.githubusercontent.com/leafclick/pgmig/60dcbe719d83479cf8c4df39d3eeba28dcfad8f5/samples/db/migrations/20201106155531-programmatic-third.down.clj | clojure | (require '[next.jdbc :as jdbc]
'[common.util :refer [print-result]])
(println "Programmatic DOWN")
(print-result
(:next.jdbc/update-count (jdbc/execute-one! (get-connection) ["delete from bar"])))
| |
760ac5575aad8c4f4eed97e8b2cc292d66e35b6c4a7abe062fa4073a452c7682 | Lovesan/clave | utils.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2017 , < lovesan.ru at gmail.com >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, inclu... | null | https://raw.githubusercontent.com/Lovesan/clave/3b08ed4c4cb3fa885739355821f73bbfd75a2a7d/src/utils.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2017 , < lovesan.ru at gmail.com >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI... |
e3c9d5a23561c0f5e7fd587fa3768ea363432535170002d5c1c72fd01245e6ca | stchang/lazyprofile-tool | nqueens-streams.rkt | #lang racket
(require (prefix-in r: (only-in racket cons car cdr null?)))
nqueens with streams instead of eager lists - slower than all eager
;; - force every list primitive
(define-syntax-rule (cons x y) (r:cons x (lazy y)))
(define-syntax-rule (car x) (r:car (force x)))
(define-syntax-rule (cdr x) (r:cdr (force x... | null | https://raw.githubusercontent.com/stchang/lazyprofile-tool/f347cbe6e91f671320d025d9217dfe1795b8d0f0/examples-popl2014/nqueens/nqueens-streams.rkt | racket | - force every list primitive | #lang racket
(require (prefix-in r: (only-in racket cons car cdr null?)))
nqueens with streams instead of eager lists - slower than all eager
(define-syntax-rule (cons x y) (r:cons x (lazy y)))
(define-syntax-rule (car x) (r:car (force x)))
(define-syntax-rule (cdr x) (r:cdr (force x)))
(define-syntax-rule (null? x... |
3bbb5a77d10b8daebca97866eb74a10face7da2140d152b77341d8572d3fe6e6 | promesante/paip-racket | prologcp.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
;;;; File prologcp.lisp: Primitives for the prolog compiler
;;;; needed to actually run some functions.
Bug fix by , .
Trivia : Farquhar is 's cousin .
(requires "prologc")
(defun read/1 (exp cont)... | null | https://raw.githubusercontent.com/promesante/paip-racket/95d78fd2614a60a940400bf566085a15c8d2956f/prologcp.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
File prologcp.lisp: Primitives for the prolog compiler
needed to actually run some functions.
Either way, undo the bindings.
was deref - COPY
Example: (is ?x (+ 3 (* ?y (+ ?z 4)))) | Code from Paradigms of AI Programming
Copyright ( c ) 1991
Bug fix by , .
Trivia : Farquhar is 's cousin .
(requires "prologc")
(defun read/1 (exp cont)
(if (unify! exp (read))
(funcall cont)))
(defun write/1 (exp cont)
(write (deref-exp exp) :pretty t)
(funcall cont))
(defun nl/0 (cont)... |
84cb6038238fe7541f9cac0a97e118672e9a8eff267e3b636ac035563155ab4b | xsc/kithara | base_consumer.clj | (ns kithara.components.base-consumer
"Implementation of Consumer setup/teardown. Please use via `kithara.core`."
(:require [kithara.rabbitmq.consumer :as consumer]
[kithara.middlewares
[confirmation :refer [wrap-confirmation]]
[confirmation-defaults :refer [wrap-confirmation-de... | null | https://raw.githubusercontent.com/xsc/kithara/3394a9e9ef5e6e605637a74e070c7d24bfaf19cc/src/kithara/components/base_consumer.clj | clojure | (ns kithara.components.base-consumer
"Implementation of Consumer setup/teardown. Please use via `kithara.core`."
(:require [kithara.rabbitmq.consumer :as consumer]
[kithara.middlewares
[confirmation :refer [wrap-confirmation]]
[confirmation-defaults :refer [wrap-confirmation-de... | |
fbce2f77e3ef72b06237bb3c0c7ab6c75ddf2f9e7c3529c0fc552fadfa2857fd | mbutterick/aoc-racket | 13.rkt | #lang br
(require racket/file rackunit)
(define (string->ints str) (map string->number (string-split str #px",\\s*")))
(define (string->regs str) (list->vector (string->ints str)))
(define ((binarize proc) x y) (if (proc x y) 1 0))
(define (make-runner program [calling-thd (current-thread)])
(thread (λ ()
... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2019/13.rkt | racket | position
immediate
relative | #lang br
(require racket/file rackunit)
(define (string->ints str) (map string->number (string-split str #px",\\s*")))
(define (string->regs str) (list->vector (string->ints str)))
(define ((binarize proc) x y) (if (proc x y) 1 0))
(define (make-runner program [calling-thd (current-thread)])
(thread (λ ()
... |
73c1097b81160dccc38a36f7118be512201190759d6f569cd8b9781655a47997 | mirleft/tlstools | tlsvis.ml | open Lwt.Infix
open Visualisation
open Notty
type mode = [ `NoWire | `NoCrypt | `NoPlain | `NoParse | `NoKDF ]
type state = {
flname : string ;
traces : trace ;
active : int ;
filter : mode list ;
detail : int ;
dscrol : int ;
}
let filter state t =
let filterone = function
| `NoWire -> (function `... | null | https://raw.githubusercontent.com/mirleft/tlstools/273d0544ab01af8145a37280ac5a0904fb6829c3/bin/tlsvis.ml | ocaml | C-d | open Lwt.Infix
open Visualisation
open Notty
type mode = [ `NoWire | `NoCrypt | `NoPlain | `NoParse | `NoKDF ]
type state = {
flname : string ;
traces : trace ;
active : int ;
filter : mode list ;
detail : int ;
dscrol : int ;
}
let filter state t =
let filterone = function
| `NoWire -> (function `... |
4bc101cbf148a281bed0a7da3b50032beef41c635ee811d55f771ead70f72be4 | haskell-opengl/OpenGLRaw | VDPAUInterop2.hs | --------------------------------------------------------------------------------
-- |
Module : Graphics . GL.NV.VDPAUInterop2
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---------------------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/VDPAUInterop2.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Functions | Module : Graphics . GL.NV.VDPAUInterop2
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.VDPAUInterop2 (
glGetNVVDPAUInterop2,
gl_NV_vdpau_interop2,
glVDPAURegisterVideoSurfaceWithPictureStructureNV
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Functi... |
cb00d8dba93ffb34fd0f8c11f18970f5a09b1d4cec789dc39bb261be995501ab | votinginfoproject/data-processor | id_test.clj | (ns vip.data-processor.validation.v5.id-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :refer :all]
[vip.data-processor.test-helpers :refer :all]
... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/id_test.clj | clojure | (ns vip.data-processor.validation.v5.id-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :refer :all]
[vip.data-processor.test-helpers :refer :all]
... | |
f36cd0a6a6b6dc4842a7347ab15dad67c3bf3bd5261d09c8d143c57b6f23b017 | np/ling | Layout.hs | File generated by the BNF Converter ( bnfc 2.9.4.1 ) .
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - unused - matches -fno - warn - unused - binds #
module Ling.Fmt.Albert.Layout where
import Pr... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Fmt/Albert/Layout.hs | haskell | # LANGUAGE OverloadedStrings #
local parameters
^ Nothing for toplevel layout.
^ Nothing for toplevel layout.
layout separators
| Report an error during layout resolution.
^ Remaining tokens.
^ Error message.
| Replace layout syntax with explicit layout tokens.
^ Whether to use top-level layout.
^ Token strea... | File generated by the BNF Converter ( bnfc 2.9.4.1 ) .
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
# OPTIONS_GHC -fno - warn - unused - matches -fno - warn - unused - binds #
module Ling.Fmt.Albert.Layout where
import Prelude
import Data.Maybe ( fromMaybe... |
5ef93e281443f1d8e4015c0621e31bd2616e60adc50d825f1d090a302d3e4333 | gsakkas/rite | 0050.ml | BopG (AppG [EmptyG]) LitG
1.0 -. exp ((- 1.0) *. eval (a , x , y))
(2.71 ** ((sin (pi *. eval (a , x , y)) +. cos (pi *. eval (b , x , y))) -. 1.0)) -. 1.0
tan (pi *. eval (e , x , y)) /. 2.0
List.mem h seen = false
List.length l + 1
1 + additivePersistence num
List.length t < 2
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/clusters/0050.ml | ocaml | BopG (AppG [EmptyG]) LitG
1.0 -. exp ((- 1.0) *. eval (a , x , y))
(2.71 ** ((sin (pi *. eval (a , x , y)) +. cos (pi *. eval (b , x , y))) -. 1.0)) -. 1.0
tan (pi *. eval (e , x , y)) /. 2.0
List.mem h seen = false
List.length l + 1
1 + additivePersistence num
List.length t < 2
| |
f31ee880231bfec29b4482ce08651ec486253e210bc05e95c9fd26bd40114019 | ijvcms/chuanqi_dev | map_20014.erl | -module(map_20014).
-export([
range/0,
data/0
]).
range() -> {124, 96}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/map_data/map_20014.erl | erlang | -module(map_20014).
-export([
range/0,
data/0
]).
range() -> {124, 96}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,... | |
b505030e9aca5dc390fa852b987b71f5ae2b78197c4718deba10d8b90c6e2d5f | FPtje/GLuaFixer | ASTInstances.hs | # OPTIONS_GHC -fno - warn - orphans #
-- | Contains class instances and functions related to AST These are not put
in the AST.ag file as importing an AG file would copy the instance
-- declarations, causing duplicate instances errors.
module GLua.ASTInstances where
import GLua.AG.AST
import Data.Aeson
instance ToJ... | null | https://raw.githubusercontent.com/FPtje/GLuaFixer/ac62151ce99e6a9beed74487cd040da81a5da167/src/GLua/ASTInstances.hs | haskell | | Contains class instances and functions related to AST These are not put
declarations, causing duplicate instances errors. | # OPTIONS_GHC -fno - warn - orphans #
in the AST.ag file as importing an AG file would copy the instance
module GLua.ASTInstances where
import GLua.AG.AST
import Data.Aeson
instance ToJSON AST where
instance FromJSON AST where
instance ToJSON Block where
instance FromJSON Block where
instance ToJSON MStat where
... |
fc2ea638587717de1683df6319a013f4937566aacf0196db2127a193a6399e17 | blambo/accelerate-repa | 08_Permutations.hs | import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
main :: IO ()
main = do
-- permute
-- backpermute
| null | https://raw.githubusercontent.com/blambo/accelerate-repa/5ea4d40ebcca50d5b952e8783a56749cea4431a4/examples/operations/08_Permutations.hs | haskell | permute
backpermute | import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Repa as Repa
main :: IO ()
main = do
|
2736ac6d1cb6ffafea1e968a3ec4fa73149a2310be26cd62ef45ad735226c796 | cronburg/antlr-haskell | Main.hs | module Main where
import System.IO.Unsafe (unsafePerformIO)
import Data.Monoid
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit
import Test.QuickCheck (Property, quickCheck, (==>))
import qualified Test.QuickCheck.Monadic as TQM
main :: IO ()
ma... | null | https://raw.githubusercontent.com/cronburg/antlr-haskell/7a9367038eaa58f9764f2ff694269245fbebc155/test/template/Main.hs | haskell | module Main where
import System.IO.Unsafe (unsafePerformIO)
import Data.Monoid
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit
import Test.QuickCheck (Property, quickCheck, (==>))
import qualified Test.QuickCheck.Monadic as TQM
main :: IO ()
ma... | |
82b8b9d126f56d38b95587e3e090eb8646d1b2bff8881054877783e2e1322f86 | camlp5/camlp5 | 4.10.1.ml | (* camlp5r pa_macro.cmo *)
(* versdep.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
open Parsetree;;
open Longident;;
open Asttypes;;
type ('a, 'b) choice =
Left of 'a
| Right of 'b
;;
let option_map f x =
match x with
Some x -> Some (f x)
| None -> None
;;
let mustSome symbol =
function
Some x -> ... | null | https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/ocaml_src/lib/versdep/4.10.1.ml | ocaml | camlp5r pa_macro.cmo
versdep.ml,v
... [@@id1] [@@id2] | Copyright ( c ) INRIA 2007 - 2017
open Parsetree;;
open Longident;;
open Asttypes;;
type ('a, 'b) choice =
Left of 'a
| Right of 'b
;;
let option_map f x =
match x with
Some x -> Some (f x)
| None -> None
;;
let mustSome symbol =
function
Some x -> x
| None -> failwith ("Some: " ^ symbol)
;;
... |
2d4a1a2a09bdea9f445f59f2af9941ffafc1a00dde84bcdbb54f092294158bd6 | patricoferris/opam-github-workflow | changes.mli | val cmd : unit Cmdliner.Term.t * Cmdliner.Term.info
| null | https://raw.githubusercontent.com/patricoferris/opam-github-workflow/6fe36af331853152da5a78b9bbc9a9ecd48b5160/bin/changes.mli | ocaml | val cmd : unit Cmdliner.Term.t * Cmdliner.Term.info
| |
05d26ba3c45c5e7c60c492bda6b96e7446a4ea83fa3c4fc671dbf7f27897e823 | JacquesCarette/Drasil | ReferenceMaterial.hs | -- | Defines functions used in the Reference Material section.
module Drasil.Sections.ReferenceMaterial (intro) where
Depending where this is used , it might be worth combining it with other module(s ) ,
or simply moving it to Data . . Documentation since it 's highly reusable
If anything , this could be called ... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-docLang/lib/Drasil/Sections/ReferenceMaterial.hs | haskell | | Defines functions used in the Reference Material section.
| Default Reference Material section introduction. | module Drasil.Sections.ReferenceMaterial (intro) where
Depending where this is used , it might be worth combining it with other module(s ) ,
or simply moving it to Data . . Documentation since it 's highly reusable
If anything , this could be called by the recipes that need it
Depending where this is used, it ... |
3186961d34da76d5f7c1f0f42b652d9c9d02049d12977efe3e390a8843d0bd4f | dakk/yallo-lang | translate_pexpr.ml | open Ast
open Ast_ttype
open Ast_expr
open Helpers.Errors
open Parsing
open Translate_ptype
open Big_int
let show_ttype_got_expect t1 t2 = "got: '" ^ show_ttype t1 ^ "' expect '" ^ show_ttype t2 ^ "'"
let show_ttype_between_na t1 t2 = "between '" ^ show_ttype t1 ^ "' and '" ^ show_ttype t2 ^ "' is not allowed"
let sho... | null | https://raw.githubusercontent.com/dakk/yallo-lang/55a1b379306c9f113bd707e78b6e0c1be81bb7be/lib/passes/3_parse_tree_to_ast/translate_pexpr.ml | ocaml | transform an pexpr to (ttype * expr)
Option
Literals
Composed types
get keys and values type
PEApply(PETRef) tezos apis
PEApply(PECRef) crypto apis
PEDot on base
TODO: check for pack attribute
PEApply(PEDot) base type apis
List
Map
BigMap
Set
String
Tuple
contract instance call
PEDot ... | open Ast
open Ast_ttype
open Ast_expr
open Helpers.Errors
open Parsing
open Translate_ptype
open Big_int
let show_ttype_got_expect t1 t2 = "got: '" ^ show_ttype t1 ^ "' expect '" ^ show_ttype t2 ^ "'"
let show_ttype_between_na t1 t2 = "between '" ^ show_ttype t1 ^ "' and '" ^ show_ttype t2 ^ "' is not allowed"
let sho... |
7e63f8d1b83b10b4c26a4d9adf67108a02752975ed6c1978aef767ec1f4979dd | janestreet/learn-ocaml-workshop | problem.ml | open! Base
Functions can call other functions . They can call themselves too , but only
with a special keyword .
First , try to compile this directory . What is the error that you see ?
Now change [ let ] to [ let rec ] and recompile .
A function is only allowed to call itself if the [ rec ] f... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/07-simple_recursion/problem.ml | ocaml | Make sure we don't call this on negative numbers!
Now, let's write a function to take the product of every number up to [x]. | open! Base
Functions can call other functions . They can call themselves too , but only
with a special keyword .
First , try to compile this directory . What is the error that you see ?
Now change [ let ] to [ let rec ] and recompile .
A function is only allowed to call itself if the [ rec ] f... |
472ae5beb059f833245497a5dac33cfd1f79ce27c700999ee5f0c537d85c5a70 | JAremko/spacetools | test-util-project.clj | (defproject spacetools/test-util "0.1"
:description "A testing utility component."
:dependencies [[com.google.jimfs/jimfs "1.1"]
[environ "1.1.0"]
[nio2 "0.2.3"]
[orchestra "2020.07.12-1"]
[org.clojure/clojure "1.10.2-alpha2"]
[org... | null | https://raw.githubusercontent.com/JAremko/spacetools/2343810353da275bacb21cf49df43286df4bf9be/environments/development/project-files/components/test-util-project.clj | clojure | (defproject spacetools/test-util "0.1"
:description "A testing utility component."
:dependencies [[com.google.jimfs/jimfs "1.1"]
[environ "1.1.0"]
[nio2 "0.2.3"]
[orchestra "2020.07.12-1"]
[org.clojure/clojure "1.10.2-alpha2"]
[org... | |
b9fcf35671d418f52cb77b03af08ad74bdb82caa103f802cb7972ab0781eef5e | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Ordinal.ET.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Ordinal/ET/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.ET.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Ordinal.ET.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "ET Tests"
[ makeCorpusT... |
18f25ac8033c12c5dc464858af3c61de1caa9c60ab2d987bf276a3b3b31148ed | gigasquid/wonderland-clojure-katas | finder.clj | (ns wonderland-number.finder)
(defn wonderland-number []
;; calculate me
42)
| null | https://raw.githubusercontent.com/gigasquid/wonderland-clojure-katas/04af3c8600f779da6b61e0481fd1da16311a6d6d/wonderland-number/src/wonderland_number/finder.clj | clojure | calculate me | (ns wonderland-number.finder)
(defn wonderland-number []
42)
|
4bda72acdbefc3194032f03e4462760d5b600fa7bc7215ed3affd1b985d7a56f | nushio3/learn-haskell | with-string.hs | import System.IO
wordreverse :: [Char] -> [Char]
wordreverse xs
| length xs < 2 = xs
| otherwise = do
take 1 xs ++ (reverse $ drop 1 (take ((length xs) - 1) xs )) ++ drop (length xs -1) xs
main :: IO ()
main = do
strings <- getLine
putStrLn $unwords $map wordreverse $words strings
f<- isEOF
if ... | null | https://raw.githubusercontent.com/nushio3/learn-haskell/eda0fd0b33e9c4b7552afd24c6a25a105cca5f94/exercise-5-1-fast-reverse/with-string.hs | haskell | import System.IO
wordreverse :: [Char] -> [Char]
wordreverse xs
| length xs < 2 = xs
| otherwise = do
take 1 xs ++ (reverse $ drop 1 (take ((length xs) - 1) xs )) ++ drop (length xs -1) xs
main :: IO ()
main = do
strings <- getLine
putStrLn $unwords $map wordreverse $words strings
f<- isEOF
if ... | |
6f70785d97bbf0f75e8391f740eded542da8cd4b5b7be4485c707a599847167c | clj-commons/useful | debug.clj | (ns flatland.useful.debug)
leave out of ns so we can load with classlojure.io/resource-forms
(require '[clojure.pprint :as p])
(require '[clojure.stacktrace :as s])
(letfn [(interrogate-form [list-head form]
`(let [display# (fn [val#]
(let [form# (with-out-str
... | null | https://raw.githubusercontent.com/clj-commons/useful/dc5cdebf8983a2e2ea24ec8951fbb4dfb037da45/src/flatland/useful/debug.clj | clojure | (ns flatland.useful.debug)
leave out of ns so we can load with classlojure.io/resource-forms
(require '[clojure.pprint :as p])
(require '[clojure.stacktrace :as s])
(letfn [(interrogate-form [list-head form]
`(let [display# (fn [val#]
(let [form# (with-out-str
... | |
29d6a8b5dccada88d19fe4f8c7796ce3977bb469d6208f2dc0c4c7ce6bed762a | mariari/Misc-ML-Scripts | Parser.hs | module Mari.Library.Parser
( module Mari.Library.Parser.Internal,
module Mari.Library.Parser.Token,
module Mari.Library.Parser.Lexer,
)
where
import Mari.Library.Parser.Internal (Parser, ParserError)
import Mari.Library.Parser.Lexer
import Mari.Library.Parser.Token
| null | https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/376a7d55b565bf9205e697c5c3b78e1d6b6aedcd/Haskell/StandardLibrary/src/Mari/Library/Parser.hs | haskell | module Mari.Library.Parser
( module Mari.Library.Parser.Internal,
module Mari.Library.Parser.Token,
module Mari.Library.Parser.Lexer,
)
where
import Mari.Library.Parser.Internal (Parser, ParserError)
import Mari.Library.Parser.Lexer
import Mari.Library.Parser.Token
| |
b590191e29f5956e285e57b58187b7b77b96c37398b20df4a5be55d8583452c1 | Chris00/ocaml-cairo | matrix_set.ml | open Cairo
let () =
let cr = create (Image.create Image.ARGB32 ~w:100 ~h:100) in
let m = { xx = 1.; xy = 2.; yx = 3.; yy = 4.; x0 = 5.; y0 = 6. } in
set_matrix cr m;
assert(get_matrix cr = m)
(* Font *)
let () =
let m1 = Matrix.init_identity() in
let m2 = Matrix.init_translate 10. 20. in
let ff = Font_f... | null | https://raw.githubusercontent.com/Chris00/ocaml-cairo/202674a8d0c533b689ceacdb523ca167611e1b4c/tests/matrix_set.ml | ocaml | Font
Local Variables:
End: | open Cairo
let () =
let cr = create (Image.create Image.ARGB32 ~w:100 ~h:100) in
let m = { xx = 1.; xy = 2.; yx = 3.; yy = 4.; x0 = 5.; y0 = 6. } in
set_matrix cr m;
assert(get_matrix cr = m)
let () =
let m1 = Matrix.init_identity() in
let m2 = Matrix.init_translate 10. 20. in
let ff = Font_face.create ... |
663d0ea953fcd9ade5931ca0087b866dc7634086659e8373d0e76c411af4228e | kitlang/kit | GenerateMonomorphs.hs | module Kit.Compiler.Passes.GenerateMonomorphs
( generateMonomorphs
)
where
import Control.Monad
import Data.Either
import Data.Function
import Data.Mutable
import Data.List
import Data.Maybe
import Kit.Ast
import Kit.Compiler.Binding
i... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/Passes/GenerateMonomorphs.hs | haskell | don't try to generate a monomorph if the params contain unresolved
type variables; if we needed this monomorph and don't know its param
values, it'll blow up elsewhere | module Kit.Compiler.Passes.GenerateMonomorphs
( generateMonomorphs
)
where
import Control.Monad
import Data.Either
import Data.Function
import Data.Mutable
import Data.List
import Data.Maybe
import Kit.Ast
import Kit.Compiler.Binding
i... |
06a5b722f8ef276b3b854039d1f3fe88c915ad5d947c93003e1f4b517ec2e98d | onyx-platform/learn-onyx | challenge_3_4.clj | (ns workshop.challenge-3-4
(:require [workshop.workshop-utils :as u]
[clojure.string :as s]))
Workflows ; ; ;
(def workflow
[[:read-segments :capitalize-names]
[:capitalize-names :write-segments]])
;;; Catalogs ;;;
(defn build-catalog
([] (build-catalog 5 50))
([batch-size batch-timeout]
... | null | https://raw.githubusercontent.com/onyx-platform/learn-onyx/6bf1936f35d26e3c8cf171b5971e1bc95e82b3c8/src/workshop/challenge_3_4.clj | clojure | ; ;
Catalogs ;;;
Functions ;;;
; ; | (ns workshop.challenge-3-4
(:require [workshop.workshop-utils :as u]
[clojure.string :as s]))
(def workflow
[[:read-segments :capitalize-names]
[:capitalize-names :write-segments]])
(defn build-catalog
([] (build-catalog 5 50))
([batch-size batch-timeout]
[{:onyx/name :read-segments
... |
cbaddcaca2e4f77778fec98759c1566ea5093dafdec74065a8f24afbd6ff9cf1 | interstar/cardigan-bay | card_server.clj | (ns clj-ts.card-server
[:require
[clojure.string :as string]
[clojure.pprint :refer [pprint]]
[clj-ts.logic :as ldb]
[clj-ts.pagestore :as pagestore]
[clj-ts.common :as common]
[clj-ts.types :as types]
[clj-ts.embed :as embed]
[clj-ts.patterning :as patterning]
[com.walmartlabs.lacinia.ut... | null | https://raw.githubusercontent.com/interstar/cardigan-bay/9a0b0aec9ad23b52c44238cbcb3e53ad7a0d901d/src/clj_ts/card_server.clj | clojure | NOTHING mutable should be stored anywhere else but in the card-server-state atom.
Card Server state is just a defrecord.
deftypes in their own right.
page-store has all the file-system information that the wiki reads and writes.
page-exporter the other info for exporting flat files
convenience functions for updat... | (ns clj-ts.card-server
[:require
[clojure.string :as string]
[clojure.pprint :refer [pprint]]
[clj-ts.logic :as ldb]
[clj-ts.pagestore :as pagestore]
[clj-ts.common :as common]
[clj-ts.types :as types]
[clj-ts.embed :as embed]
[clj-ts.patterning :as patterning]
[com.walmartlabs.lacinia.ut... |
3a0f7ea466428516c4e225516749fb5a4794f4528994bd354d48f8877bb05120 | prg-titech/Kani-CUDA | control.rkt | #lang rosette
(require "operators.rkt" "work.rkt")
(provide if/LS while/LS while-with-bound/LS for/LS)
;; Denotation of if (b) {then-cl} {else-cl}
;; Execute each clause with additional masks by b
;; then-cl, else-cl :: M -> ()
;; b :: () -> (vector? boolean?)
(define (if/LS b then-cl else-cl)
(let ([bval (b)])
... | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/control.rkt | racket | Denotation of if (b) {then-cl} {else-cl}
Execute each clause with additional masks by b
then-cl, else-cl :: M -> ()
b :: () -> (vector? boolean?)
Denotation of while (b) {body}
Execute body with addtional mask by b until all threads are masked
b :: () -> boolean?
body :: M -> ()
check that whether there are a... | #lang rosette
(require "operators.rkt" "work.rkt")
(provide if/LS while/LS while-with-bound/LS for/LS)
(define (if/LS b then-cl else-cl)
(let ([bval (b)])
(parameterize ([mask (&&/LS bval (mask))]) (then-cl))
(parameterize ([mask (&&/LS (!/LS bval) (mask))]) (else-cl))))
(define (while/LS b body)
(let* ... |
39b85d6d8e2ecd3820eed0dedf798b45f5334c4c8a36355ae9b9450cdb95b912 | leonardb/mnesia_fdb | mnesia_fdb_indexes.erl | %%----------------------------------------------------------------
Copyright ( c ) 2013 - 2016 Klarna AB
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% ... | null | https://raw.githubusercontent.com/leonardb/mnesia_fdb/d94f89d67453cc2edb2053ae0799e424006d6e2f/mvd_tests/mnesia_fdb_indexes.erl | erlang | ----------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions an... | Copyright ( c ) 2013 - 2016 Klarna AB
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(mnesia_fdb_indexes).
-export([r... |
c5dd16b46c9ffb7327bdfc716187e993386cb8dc226585b4a97a027862f41f7d | SKA-ScienceDataProcessor/RC | Interpreter.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK hide #-}
-- | Module for interpreting
module DNA.Interpreter (
interpretDNA
, th... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS6/dna/core/DNA/Interpreter.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE TemplateHaskell #
# OPTIONS_HADDOCK hide #
| Module for interpreting
* CH
--------------------------------------------------------------
DNA language interpreter
---------------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
module DNA.Interpreter (
interpretDNA
, theInterpreter
, __remoteTable
, theInterpreter__static
) where
import Control.Monad
import Control.Monad.Reader
import Control.Monad.Operational
import Control.Concurrent.Async
import Contro... |
b7a20aeaaa6a25e13f45328ac7fb4e77cb4b8c64061f05f5689ac1e0424f739d | 8c6794b6/haskell-sc-scratch | Repl02.hs | {-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
Playing with Shellac package .
--
module R... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Repl/Repl02.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
main :: IO ()
main = do
n <- runShell (mkShellDescription cmds work) haskelineBackend 0
putStrLn $ "Yo... | CopyRight : ( c ) 8c6794b6
Maintainer :
Playing with Shellac package .
module Repl02 where
import Control.Concurrent (forkIO, throwTo, threadDelay, myThreadId)
import Control.Exception (bracket, IOException)
import Control.Monad (forever, forM_)
import Network (PortID(..), connectTo)
import Network.Socket ... |
5cba7d2d5ca1a971964213cdb747f4a3baf1534ada2fa89c54736a18167af41c | mobius-eng/lisp-spreadsheet | package.lisp | Create a phony MAXIMA package
;; (eval-when (:compile-toplevel :load-toplevel :execute)
( unless ( find - package " MAXIMA " )
( make - package " MAXIMA " ) ) )
(defpackage lisp-spreadsheet
(:use :cl+qt :qtools-ui)
(:export
#:cell
#:recalculate-spreadsheet
#:refresh-spreadsheet
#:save-sprea... | null | https://raw.githubusercontent.com/mobius-eng/lisp-spreadsheet/eb55749a2a2dfa1d617260baf4dbf3b5383d9a8b/src/package.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel :execute) | Create a phony MAXIMA package
( unless ( find - package " MAXIMA " )
( make - package " MAXIMA " ) ) )
(defpackage lisp-spreadsheet
(:use :cl+qt :qtools-ui)
(:export
#:cell
#:recalculate-spreadsheet
#:refresh-spreadsheet
#:save-spreadsheet
#:load-spreadsheet
#:read-in-spreadsheet
#... |
ea9320e56d1df2b7dcbe332512a94b361ce21f31ff59d94a862675d65f28f490 | alanz/ghc-exactprint | overloadedrecfldsfail03.hs | -- Test that a top-level definition with the same name as a record
-- field is rejected
# LANGUAGE DuplicateRecordFields #
foo = True
data T = MkT { foo :: Int }
main = print foo
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/overloadedrecfldsfail03.hs | haskell | Test that a top-level definition with the same name as a record
field is rejected |
# LANGUAGE DuplicateRecordFields #
foo = True
data T = MkT { foo :: Int }
main = print foo
|
547d3c906f3459787c6829eab45ed66823d7c9560764ecfeef95606963b3b0e2 | kupl/FixML | sub45.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec processtimelist : aexp * string -> aexp
= fun (l, var) ->
match l with
| Const i ->
Const i
| Var str->
if str=var then
Const 0
else
Var str
| Power (str, i) -... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub45.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec processtimelist : aexp * string -> aexp
= fun (l, var) ->
match l with
| Const i ->
Const i
| Var str->
if str=var then
Const 0
else
Var str
| Power (str, i) -... | |
8cacb39c3e71d73946c93e2001bf880e51205f64e0b35a998145d2ace2ff41b4 | ThatGeoGuy/chicken-graphs | graphs-derived.scm | Copyright ( c ) 2015 ,
;;;; All rights reserved.
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions are met:
;;;;
1 . Redistributions of source code must retain the above copyright notice ,
;;;; this list of conditio... | null | https://raw.githubusercontent.com/ThatGeoGuy/chicken-graphs/5642ad70e40c44b06a5efed6a0917096d4182d52/graphs-derived.scm | scheme | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation
and/or other materi... | Copyright ( c ) 2015 ,
1 . Redistributions of source code must retain the above copyright notice ,
2 . Redistributions in binary form must reproduce the above copyright notice ,
3 . Neither the name of the copyright holder nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUT... |
467b4d6b06a15935ce0505f99b5b1f313e11f5125604360bc1ed24a881bec641 | Workiva/eva | sizing_api.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/sizing_api.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.sizing-api)
(defprotocol SizeEstimable
(ram-size [o] "Estimate the size in ram of the object"))
|
670c54ff2faef0e3229c555ef94dc455569d577846a3055af3d84d7e83b8a5fe | thheller/shadow-arborist | protocols.cljs | (ns shadow.arborist.protocols)
(defprotocol IControlFragment
(fragment-build [this env vals] "returns fragment state, required for update")
(fragment-update [this env root nodes ovals nvals]))
(defprotocol IConstruct
(as-managed [this env]))
(defprotocol ITreeNode
;; perform all required node updates, call s... | null | https://raw.githubusercontent.com/thheller/shadow-arborist/39aef8d4361005f3217dc9bab1862aebc56d5990/src/main/shadow/arborist/protocols.cljs | clojure | perform all required node updates, call sync! on all managed nodes
FIXME: calling sync! recursively is bad as stack may get deep
should use different method of tree traversal, maybe something like react fiber
root user api | (ns shadow.arborist.protocols)
(defprotocol IControlFragment
(fragment-build [this env vals] "returns fragment state, required for update")
(fragment-update [this env root nodes ovals nvals]))
(defprotocol IConstruct
(as-managed [this env]))
(defprotocol ITreeNode
(sync! [this]))
(defprotocol IManageNodes
... |
e0d90431887e4b8c5b23a559ba48d923ad1b02b0c4c956fafe597c33dcace688 | fetburner/Coq2SML | proofview.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/proofs/proofview.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
The proofview datastructure is a pu... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Compat
Type of proof... |
32584e9e7079c0a97f0d9f2c4ec5a1a92996a8ec915fcab1cd8cba3340949cc9 | facebookarchive/pfff | array.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/array.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 GNU Library General Public License , with
$ I d : array.ml 12891 2012 - 08 - 28... |
9573725b6ef75bfab7a460aedbc9ee4ba49eea92e7cfca1358f0c36c03e2ca4f | DHSProgram/DHS-Indicators-SPSS | ML_NETS_source.sps | * Encoding: windows-1252.
*****************************************************************************************************
Program: ML_NETS_source.do
Purpose: Code indicators for source of nets
Data inputs: HR dataset
Data outputs: coded variables and the table Tables_Net_Source.xls for the tabulations fo... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap12_ML/ML_NETS_source.sps | scheme | * Encoding: windows-1252.
*****************************************************************************************************
Program: ML_NETS_source.do
Purpose: Code indicators for source of nets
Data inputs: HR dataset
Data outputs: coded variables and the table Tables_Net_Source.xls for the tabulations fo... | |
0e9aae8f73039e3c46a17b99a25500ca3428bb55eb0c9384641905487209bbe4 | kronkltd/jiksnu | service.clj | (ns jiksnu.modules.core.model.service
(:require [ciste.config :refer [config]]
[jiksnu.modules.core.db :as db]
[jiksnu.modules.core.model :as model]
[jiksnu.modules.core.templates.model :as templates.model]
[jiksnu.modules.core.validators :as vc]
[jiksnu.tra... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/model/service.clj | clojure | TODO: add the links to the list
TODO: This should push only if the link is not yet there | (ns jiksnu.modules.core.model.service
(:require [ciste.config :refer [config]]
[jiksnu.modules.core.db :as db]
[jiksnu.modules.core.model :as model]
[jiksnu.modules.core.templates.model :as templates.model]
[jiksnu.modules.core.validators :as vc]
[jiksnu.tra... |
36f83038a8af14b36b2fe71bcbbb9ec5b2ff4908815cb89cfe314c18ed6cb5c9 | spurious/sagittarius-scheme-mirror | trav2.scm | TRAV2 -- Benchmark which creates and traverses a tree structure .
(define (make-node)
(vector 'node '() '() (snb) #f #f #f #f #f #f #f))
(define (node-parents node) (vector-ref node 1))
(define (node-sons node) (vector-ref node 2))
(define (node-sn node) (vector-ref node 3))
(define (node-entry1 node) (vector-... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/bench/gambit-benchmarks/trav2.scm | scheme | to initialize, call: (init-traverse)
to run traverse, call: (run-traverse) | TRAV2 -- Benchmark which creates and traverses a tree structure .
(define (make-node)
(vector 'node '() '() (snb) #f #f #f #f #f #f #f))
(define (node-parents node) (vector-ref node 1))
(define (node-sons node) (vector-ref node 2))
(define (node-sn node) (vector-ref node 3))
(define (node-entry1 node) (vector-... |
df2884d23c589e48ab622bb944a0b41f157089f6348eaa081e6c641a6a4ab769 | RichiH/git-annex | CleanupActions.hs | Enumeration of cleanup actions
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Types.CleanupActions where
import Types.UUID
import Utility.Url
data CleanupAction
= Remo... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Types/CleanupActions.hs | haskell | Enumeration of cleanup actions
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Types.CleanupActions where
import Types.UUID
import Utility.Url
data CleanupAction
= Remo... | |
7de96b7078e6fa4a0c2d05d8d8da32e59d106bd0d16428acb845646209107573 | metaocaml/ber-metaocaml | records.ml | (* TEST
* expect
*)
(* undefined labels *)
type t = {x:int;y:int};;
{x=3;z=2};;
[%%expect{|
type t = { x : int; y : int; }
Line 2, characters 5-6:
2 | {x=3;z=2};;
^
Error: Unbound record field z
|}];;
fun {x=3;z=2} -> ();;
[%%expect{|
Line 1, characters 9-10:
1 | fun {x=3;z=2} -> ();;
^
Error:... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-misc/records.ml | ocaml | TEST
* expect
undefined labels
mixed labels
private types
Punning and abbreviations
messages
bugs
PR#5865
PR#7695
PR#7696 |
type t = {x:int;y:int};;
{x=3;z=2};;
[%%expect{|
type t = { x : int; y : int; }
Line 2, characters 5-6:
2 | {x=3;z=2};;
^
Error: Unbound record field z
|}];;
fun {x=3;z=2} -> ();;
[%%expect{|
Line 1, characters 9-10:
1 | fun {x=3;z=2} -> ();;
^
Error: Unbound record field z
|}];;
{x=3; contents=... |
15f28ac4f89d840cd99ad2a203b31a7ebbe76488799aa5841f77aa2aef10967a | bcc32/advent-of-code | b.ml | open! Core
let () =
let input =
In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_all
|> String.strip
|> Int.of_string
in
let pos = ref 0 in
let last_after_zero = ref 1 in
for next = 1 to 50_000_000 do
pos := (!pos + input) % next;
if !pos = 0 then last_after_zero := next;
... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/17/b.ml | ocaml | open! Core
let () =
let input =
In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_all
|> String.strip
|> Int.of_string
in
let pos = ref 0 in
let last_after_zero = ref 1 in
for next = 1 to 50_000_000 do
pos := (!pos + input) % next;
if !pos = 0 then last_after_zero := next;
... | |
9004bd8ae9505e1e0b2d6881efb3b295e48e08cd5746d0e4daef1895135338c9 | russell/cl-git | error.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*-
;; cl-git is a Common Lisp interface to git repositories.
Copyright ( C ) 2011 - 2022 < >
;;
;; 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 ... | null | https://raw.githubusercontent.com/russell/cl-git/ab58b1dcf34649899085e9df95962ef1c9d902c3/src/error.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 -*-
cl-git is a Common Lisp interface to git repositories.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;... |
Copyright ( C ) 2011 - 2022 < >
as published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
(in-package #:cl-git)
(eval-when (:compile-toplevel :execute :load-toplevel)
(defv... |
af54472b9d4f43fd2b48dc6226bc81d590b0565f70361a1838b1b2b55783a467 | shirok/Gauche | profiler.scm | ;;;
;;; Profiler - profiler interface
;;;
Copyright ( c ) 2005 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copy... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/gauche/vm/profiler.scm | scheme |
Profiler - profiler interface
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaim... | Copyright ( c ) 2005 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module gauche.vm.profiler
(use srf... |
1ba5025e9d4e6e0545aa9ff88d6882a7b970fe4207aaea44361e2d460a2481aa | tokenmill/beagle | lucene_alpha_test.clj | (ns beagle.lucene-alpha-test
(:require [clojure.test :refer [deftest is]]
[beagle.lucene-alpha :as lucene]))
(deftest smoke
(let [txt "some text this other that"
dictionary [{:text "this AND that" :id "1" :slop 1}]
annotator-fn (lucene/annotator dictionary)
[ann1 :as anns] (anno... | null | https://raw.githubusercontent.com/tokenmill/beagle/863ffa63364e9ae7e7a22a3c7e258fd02ace1632/test/beagle/lucene_alpha_test.clj | clojure | (ns beagle.lucene-alpha-test
(:require [clojure.test :refer [deftest is]]
[beagle.lucene-alpha :as lucene]))
(deftest smoke
(let [txt "some text this other that"
dictionary [{:text "this AND that" :id "1" :slop 1}]
annotator-fn (lucene/annotator dictionary)
[ann1 :as anns] (anno... | |
fcbe7191ef64acfbba1075ede339497c5b9ba6a9770d5bf18c1a5afab74c6f70 | pqwy/notty | notty_uucp.mli | Copyright ( c ) 2020 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
(* This is a local copy of the (very few) relevant [uucp] properties. *)
val tty_width_hint : Uchar.t -> int
[ Uucp . Break.tty_width_hint ] .
val grapheme_cluster_boundary : Uchar.t -> int
[ Uucp . Break . Low.grapheme... | null | https://raw.githubusercontent.com/pqwy/notty/67c602e3b32fdd6f4356c8e6b7537ff811ac14bf/src/no-uucp/notty_uucp.mli | ocaml | This is a local copy of the (very few) relevant [uucp] properties.
val check : unit -> unit | Copyright ( c ) 2020 . All rights reserved .
See LICENSE.md .
See LICENSE.md. *)
val tty_width_hint : Uchar.t -> int
[ Uucp . Break.tty_width_hint ] .
val grapheme_cluster_boundary : Uchar.t -> int
[ Uucp . Break . Low.grapheme_cluster ] .
|
f6855610b12ded4aa93e47e427df67c20071e62d2856d3fd75841d3ade3b644c | kelamg/HtDP2e-workthrough | ex98.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 ex98) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex98.rkt | racket | about the language level of this file in a form that our tools can easily process.
space invaders
Constants:
==========================
scenery
tank
ufo
missile
hit range
Definitions:
===========================
A UFO is a Posn.
interpretation (make-posn x y) is the UFO's location
(using the top-down, l... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex98) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(define WIDTH 200)
(define HEIGHT ... |
680f95245da0583d4e31f969f0d0fccd7511376686c3b71a564b2fdb6cd7c81d | pink-gorilla/notebook | goldly.cljs | (ns pinkgorilla.notebook-ui.app.pages.goldly
(:require
[webly.web.handler :refer [reagent-page]]
[goldly-server.pages.system-list :refer [systems-list-page]]
[goldly.system :refer [system-ext]]
[pinkgorilla.notebook-ui.app.site :refer [header]]))
(defmethod reagent-page :notebook/system-list [{:keys [rou... | null | https://raw.githubusercontent.com/pink-gorilla/notebook/e25bfb57a9ad4595e34175a57eb65a767206c260/src/pinkgorilla/notebook_ui/app/pages/goldly.cljs | clojure | tailwind containers are not centered by default; mx-auto does this
(info "loading system" route-params)
(info "loading system-ext" route-params) | (ns pinkgorilla.notebook-ui.app.pages.goldly
(:require
[webly.web.handler :refer [reagent-page]]
[goldly-server.pages.system-list :refer [systems-list-page]]
[goldly.system :refer [system-ext]]
[pinkgorilla.notebook-ui.app.site :refer [header]]))
(defmethod reagent-page :notebook/system-list [{:keys [rou... |
36a4ed407079eb6489d5bcb1ecf1c0bd2082c4b11eebafda90291c2a6718a184 | evilmartians/foundry | pass_manager.mli | open Unicode.Std
type t
module type FunctionPass =
sig
val name : string
val run_on_function : t -> Ssa.capsule -> Ssa.name -> unit
end
module type CapsulePass =
sig
val name : string
val run_on_capsule : t -> Ssa.capsule -> unit
end
val create : sequential:bool -> t
val ad... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/src/transforms/pass_manager.mli | ocaml | func | open Unicode.Std
type t
module type FunctionPass =
sig
val name : string
val run_on_function : t -> Ssa.capsule -> Ssa.name -> unit
end
module type CapsulePass =
sig
val name : string
val run_on_capsule : t -> Ssa.capsule -> unit
end
val create : sequential:bool -> t
val ad... |
ce8dac1b6fbd05fae32db63798af90fbf9c08062de9b81d03d008bbee1b94ac5 | johnwhitington/ocamli | secd.ml | type op = Add | Sub | Mul | Div
(* The main type is done with deBruijn indexes when read in. *)
type name = string
type prog =
Int of int
| Bool of bool
| VarAccess of name * int
| Eq of prog * prog
| Op of prog * op * prog
| Apply of prog * prog
| Lambda of name * prog
| Let of name * prog * prog
| If of prog * pr... | null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/secd/secd.ml | ocaml | The main type is done with deBruijn indexes when read in.
Print the stack and instruction list
[let x = a in b] has [a] at the top of the stack, and [b] as everything else
Do we need to distinguish between whole-program and partial-program decompilation? | type op = Add | Sub | Mul | Div
type name = string
type prog =
Int of int
| Bool of bool
| VarAccess of name * int
| Eq of prog * prog
| Op of prog * op * prog
| Apply of prog * prog
| Lambda of name * prog
| Let of name * prog * prog
| If of prog * prog * prog
| Underline of prog
type assoc = L | N | R
let rec a... |
7d61dcda314875a10aaa2512286192e26d24350a8413e8758c42f57d12307b7b | leftaroundabout/linearmap-family | Instances.hs | -- |
Module : Math . . Category . Instances
Copyright : ( c ) 2016 - 2019
-- License : GPL v3
--
-- Maintainer : (@) jsag $ hvl.no
-- Stability : experimental
-- Portability : portable
--
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE ConstraintKi... | null | https://raw.githubusercontent.com/leftaroundabout/linearmap-family/3a28b2793e4376f6d9258abb587be38bc5b61fa7/Math/LinearMap/Category/Instances.hs | haskell | |
License : GPL v3
Maintainer : (@) jsag $ hvl.no
Stability : experimental
Portability : portable
# LANGUAGE ConstraintKinds #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# INLI... | Module : Math . . Category . Instances
Copyright : ( c ) 2016 - 2019
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE FunctionalDependencies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE InstanceSigs ... |
d3dfad960d0ae9a5cffb7a84bea008d4bf7cc1a9e926289831aa13a5d8372834 | heyoka/dfs | test_helper.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 11 . Nov 2020 10:06
%%%-------------------------------------------------------------------
-module(test_helper).
-author("heyoka").
-compile(nowarn_export_all).
-compile(export... | null | https://raw.githubusercontent.com/heyoka/dfs/ad9e4abb857bd5535b37db1ec7acd7e2323bb105/test/test_helper.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author
( C ) 2020 , < COMPANY >
Created : 11 . Nov 2020 10:06
-module(test_helper).
-author("heyoka").
-compile(nowarn_export_all).
-compile(export_all).
-export([]).
string_data(ScriptFileName) ->
{ok, Data} = file:read_file(ScriptFileName),
binary_to_list(binary:replace(Data, <<"\\">>, <<>>, [global])).... |
1fc4b6a91f9ecfa37949fc6462b81bd621ed52c4bc899ab252c5f29c769c7187 | stumpwm/stumpwm | manual.lisp | Copyright ( C ) 2007 - 2008
;;
This file is part of stumpwm .
;;
stumpwm is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 , or ( at your option )
;; any later version.
stumpwm is ... | null | https://raw.githubusercontent.com/stumpwm/stumpwm/cfa528486756cb95ff32f5e36f1977f6014441f6/manual.lisp | lisp |
you can redistribute it and/or modify
either version 2 , or ( at your option )
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
along with this software; see the file COPY... | Copyright ( C ) 2007 - 2008
This file is part of stumpwm .
it under the terms of the GNU General Public License as published by
stumpwm is distributed in the hope that it will be useful ,
You should have received a copy of the GNU General Public License
Generate the texinfo manual from docstrings in t... |
4ba4fadb7c49943136b68b1a5ff371a6dce0abad6b14ce37a6872c9f6f41e7e9 | greghendershott/frog | verbosity.rkt | #lang reprovide
"private/verbosity.rkt"
| null | https://raw.githubusercontent.com/greghendershott/frog/93d8b442c2e619334612b7e2d091e4eb33995021/frog/verbosity.rkt | racket | #lang reprovide
"private/verbosity.rkt"
| |
cb45b76ff5554cf584ca9d83ffcbfc07e154792772fcc0d9cfd83db3cfa344d6 | wtetzner/exploding-fish | uri_test.clj | (ns org.bovinegenius.uri_test
(:use (org.bovinegenius exploding-fish)
(org.bovinegenius.exploding-fish query-string)
(clojure test))
(:require (org.bovinegenius.exploding-fish [parser :as parse]))
(:import (java.net URI URL)))
(deftest ensure-authority-test
(let [uritest (uri {:scheme "http" :h... | null | https://raw.githubusercontent.com/wtetzner/exploding-fish/108b7403178fd2b312c7ffa7a2c88391e48ebc19/test/org/bovinegenius/uri_test.clj | clojure | (ns org.bovinegenius.uri_test
(:use (org.bovinegenius exploding-fish)
(org.bovinegenius.exploding-fish query-string)
(clojure test))
(:require (org.bovinegenius.exploding-fish [parser :as parse]))
(:import (java.net URI URL)))
(deftest ensure-authority-test
(let [uritest (uri {:scheme "http" :h... | |
88b19ac99296a769fd647f240fba86debb3dfd7f9fb5ee029b967006c5ae6ccc | mikeplus64/aeson-flowtyped | Spec.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
import Data.Aeson ... | null | https://raw.githubusercontent.com/mikeplus64/aeson-flowtyped/fec00b8b86b895f67228a4cfb30ebab17b5d0d54/test/Spec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
import Data.Aeson ( Value )
import Data.Aeson.Flow as Flo... |
31aa572e15de484fdf81f72479ca17aeb07b192e59d4127c5aea8a8b801929a7 | mmottl/gsl-ocaml | rng_ex.ml | open Gsl
let _ =
Error.init () ;
Rng.env_setup ()
let rng = Rng.make (Rng.default ())
let _ =
Printf.printf "# generator type: %s\n"
(Rng.name rng) ;
Printf.printf "# seed = %nu\n"
(Rng.default_seed ()) ;
Printf.printf "# min value = %nu\n"
(Rng.min rng) ;
Printf.printf "# max value ... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/examples/rng_ex.ml | ocaml | Local Variables:
compile-command: "ocamlopt -o rng -I .. gsl.cmxa rng.ml"
End: | open Gsl
let _ =
Error.init () ;
Rng.env_setup ()
let rng = Rng.make (Rng.default ())
let _ =
Printf.printf "# generator type: %s\n"
(Rng.name rng) ;
Printf.printf "# seed = %nu\n"
(Rng.default_seed ()) ;
Printf.printf "# min value = %nu\n"
(Rng.min rng) ;
Printf.printf "# max value ... |
70e0771d6c471ecf30dc6885b8515f7193ce628f8f71c4ec851bd7095351db03 | erlang-ls/erlang_ls | els_workspace_symbol_provider.erl | -module(els_workspace_symbol_provider).
-behaviour(els_provider).
-export([
handle_request/1
]).
-include("els_lsp.hrl").
-define(LIMIT, 100).
%%==============================================================================
%% els_provider functions
%%===========================================================... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/9f70a427d8f18085918f9a3775eca671d11fbadc/apps/els_lsp/src/els_workspace_symbol_provider.erl | erlang | ==============================================================================
els_provider functions
==============================================================================
specifying queries, allowing clients to send the symbol kind.
=====================================================================... | -module(els_workspace_symbol_provider).
-behaviour(els_provider).
-export([
handle_request/1
]).
-include("els_lsp.hrl").
-define(LIMIT, 100).
-spec handle_request(any()) -> {response, any()}.
handle_request({symbol, Params}) ->
TODO : Version 3.15 of the protocol introduces a much nicer way of
#{<<"quer... |
a5df9d4bc2c3bce3d3f03763f8f5bf5381ee83ed1cea3a628f6a716e4ffbc3a6 | ayazhafiz/plts | ty_solve.ml | open Ast
exception Solve_err of string
let failsolve s = raise (Solve_err s)
module SymbolSet = struct
include Set.Make (struct
type t = Symbol.symbol
let compare = compare
end)
let concat ls = List.fold_left union empty ls
end
module SymbolMap = struct
include Map.Make (struct
type t = Symbol... | null | https://raw.githubusercontent.com/ayazhafiz/plts/7936eb0cd99ff742895d99b64e0b76f8b1a230d6/co_lc/ty_solve.ml | ocaml | open Ast
exception Solve_err of string
let failsolve s = raise (Solve_err s)
module SymbolSet = struct
include Set.Make (struct
type t = Symbol.symbol
let compare = compare
end)
let concat ls = List.fold_left union empty ls
end
module SymbolMap = struct
include Map.Make (struct
type t = Symbol... | |
f6ace5ae85a09d878a50d25e2eb3d506c4e2bbb17d6ad7d2dfd2af26154fec44 | cabol/gen_buffer | gen_buffer_ct.erl | -module(gen_buffer_ct).
-export([
wait_for_msg/0,
wait_for_msg/1,
messages/0,
messages/1,
create_buffer/4
]).
%%%===================================================================
%%% API
%%%===================================================================
wait_for_msg() ->
wait_for_msg(infinity).
wa... | null | https://raw.githubusercontent.com/cabol/gen_buffer/35dbe556f84bc84e10527ecb0c98228815064d9d/test/support/gen_buffer_ct.erl | erlang | ===================================================================
API
=================================================================== | -module(gen_buffer_ct).
-export([
wait_for_msg/0,
wait_for_msg/1,
messages/0,
messages/1,
create_buffer/4
]).
wait_for_msg() ->
wait_for_msg(infinity).
wait_for_msg(Timeout) ->
receive
Msg -> Msg
after
Timeout -> {error, timeout}
end.
messages() ->
messages(self()).
messages(Pid) ->
... |
db2e15c58b67a8d2774d5d70ec122f6d2b9273deafa450c4cd951f8112c90286 | franks42/naclj | uri_util.clj | (ns naclj.uri-util
(:import (java.net.URI)))
(defprotocol IUriIdentify
"Protocol to standardize the returning of a URI instance uniquely identifying the object."
(uri [this]
"Returns a URI instance uniquely identifying the object."))
(defprotocol IUrnParser
"Set of functions to facilitate the parsing and i... | null | https://raw.githubusercontent.com/franks42/naclj/0658915a860513340c5036fd759cc71510f91879/src/naclj/uri_util.clj | clojure |
(java.net.URI. (str "urn:hash:" (:algorithm this) ":base64url:" (=>base64url-str (=>bytes this)))) | (ns naclj.uri-util
(:import (java.net.URI)))
(defprotocol IUriIdentify
"Protocol to standardize the returning of a URI instance uniquely identifying the object."
(uri [this]
"Returns a URI instance uniquely identifying the object."))
(defprotocol IUrnParser
"Set of functions to facilitate the parsing and i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.