_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
233eb94a740f463d375d9cefed239d6c408e0f15479c42c68343d686796ed592
xu-hao/QueryArrow
Mapping.hs
# LANGUAGE TypeFamilies , TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , RankNTypes , GADTs # module QueryArrow.Cypher.Mapping where import QueryArrow.Syntax.Term import QueryArrow.Cypher.Neo4jConnection import QueryArrow.Cypher.Cypher import QueryArrow.Cypher.BuiltIn import Quer...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-db-cypher/src/QueryArrow/Cypher/Mapping.hs
haskell
# LANGUAGE TypeFamilies , TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , RankNTypes , GADTs # module QueryArrow.Cypher.Mapping where import QueryArrow.Syntax.Term import QueryArrow.Cypher.Neo4jConnection import QueryArrow.Cypher.Cypher import QueryArrow.Cypher.BuiltIn import Quer...
6d81751259acdf4e2b9db67c7989581d08da3ec72f5422298b5cf7074db0ca7b
ocaml-gospel/gospel
booleans.mli
val f : bool -> int @ r = f x ensures match x with | true | true | true - > r < > 1 | true - > true ensures match true with | _ - > true ensures match true with | x - > true ensures match x with | true | tr...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/patterns/negative/booleans.mli
ocaml
val f : bool -> int @ r = f x ensures match x with | true | true | true - > r < > 1 | true - > true ensures match true with | _ - > true ensures match true with | x - > true ensures match x with | true | tr...
2f90416195adcab24a9f207d6605cf01d3fda5693ef6bc247d60268fb9c7196c
leviroth/ocaml-reddit-api
stream.ml
open! Core open! Async module Backoff : sig type t val initial : t val increment : t -> t val after : t -> unit Deferred.t end = struct type t = Time_ns.Span.t let initial = Time_ns.Span.second let max_val = Time_ns.Span.of_int_sec 16 let increment t = Time_ns.Span.min max_val (Time_ns.Span.scale t 2...
null
https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/a6c0cb2a325a26aa7c117e77d18ba9cb7c4a1f4b/reddit_api_async/stream.ml
ocaml
open! Core open! Async module Backoff : sig type t val initial : t val increment : t -> t val after : t -> unit Deferred.t end = struct type t = Time_ns.Span.t let initial = Time_ns.Span.second let max_val = Time_ns.Span.of_int_sec 16 let increment t = Time_ns.Span.min max_val (Time_ns.Span.scale t 2...
76837b9dcbe330889f4aa6be3acf63b0dd5bcbd16661c53c200abfa54da0cc9c
andrejbauer/spartan-type-theory
ulexbuf.mli
(** Support for UTF8 lexer. *) (** The state of the parser: a stream, a beginning- and an end-position. *) type t = private { stream : Sedlexing.lexbuf ; mutable pos_start : Lexing.position ; mutable pos_end : Lexing.position ; mutable line_limit : int option ; mutable end_of_input : bool ; } type error = ...
null
https://raw.githubusercontent.com/andrejbauer/spartan-type-theory/3806830b2a52a630696b7d218f033fd92b148d2e/src/ulexbuf.mli
ocaml
* Support for UTF8 lexer. * The state of the parser: a stream, a beginning- and an end-position. * Update the start and end positions from the stream. * Register [n] new lines in the lexbuf's position. * Create a lex-buffer from a channel. Set filename to [fn] (default ["?"]) * Create a lex-buffer from a string. S...
type t = private { stream : Sedlexing.lexbuf ; mutable pos_start : Lexing.position ; mutable pos_end : Lexing.position ; mutable line_limit : int option ; mutable end_of_input : bool ; } type error = | SysError of string | Unexpected of string | MalformedUTF8 | BadNumeral of string | UnclosedComme...
e1c61751c4e95a14a8f07eb94b1f8699514fb2a262a18323d0ee34b69f1e9383
Gonzih/cljs-electron
core.cljs
(ns electron.core) (def electron (js/require "electron")) (def app (.-app electron)) (def browser-window (.-BrowserWindow electron)) (def crash-reporter (.-crashReporter electron)) (def main-window (atom nil)) (defn init-browser [] (reset! main-window (browser-window. (clj-...
null
https://raw.githubusercontent.com/Gonzih/cljs-electron/38702c3b08b8c4f0c9f8811f0fbb31e6c8c0c4bf/electron_src/electron/core.cljs
clojure
Path is relative to the compiled js file (main.js in our case)
(ns electron.core) (def electron (js/require "electron")) (def app (.-app electron)) (def browser-window (.-BrowserWindow electron)) (def crash-reporter (.-crashReporter electron)) (def main-window (atom nil)) (defn init-browser [] (reset! main-window (browser-window. (clj-...
15769407f6c889d6f2c0a298f70b3aa7c4eba90b3a35e7713807660885160574
gerritjvv/fun-utils
star_channel_tests.clj
(ns fun-utils.star-channel-tests (:require [fun-utils.core :refer [star-channel submit]]) (:import [java.io File] [java.util.concurrent Executors TimeUnit] (java.util.concurrent.atomic AtomicInteger)) (:use midje.sweet)) (facts "Test star channel" (comment (fact "Check that...
null
https://raw.githubusercontent.com/gerritjvv/fun-utils/72152ce4ca901af9a89bb21ca5817dbead773151/test/fun_utils/star_channel_tests.clj
clojure
star-channel [& {:keys [master-buff buff] :or {master-buff 100 buff 100}}] star-channel [& {:keys [master-buff buff] :or {master-buff 100 buff 100}}] we set wait-response to true, because we want the items to be written in order wait for threads check file contents
(ns fun-utils.star-channel-tests (:require [fun-utils.core :refer [star-channel submit]]) (:import [java.io File] [java.util.concurrent Executors TimeUnit] (java.util.concurrent.atomic AtomicInteger)) (:use midje.sweet)) (facts "Test star channel" (comment (fact "Check that...
78d106fdaf81bc573da0e8ebcf7a90f616fc6ff3839881cb859c0baf04b7a9a9
EdAyers/Robotone
TestData.hs
module TestData ( problems, library, printingData ) where import Prelude hiding ((/)) import Control.Arrow import Control.Applicative import qualified Data.Map as Map import Data.Map (Map) import Types import Expansion import TexBase import Parser import Tex import RobotM import Library import Writeup import Pri...
null
https://raw.githubusercontent.com/EdAyers/Robotone/1cdcde674a54a47c382fef2b060d50b35361f120/src/TestData.hs
haskell
"A composition of continuous functions is continuous." "A continuous function preserves limits." -------------------------------------------------------------------------------------------------- NB: the term rewriting code does not use renameFormula -- so DO NOT ever put quantifiers on RHS of the rewrite table....
module TestData ( problems, library, printingData ) where import Prelude hiding ((/)) import Control.Arrow import Control.Applicative import qualified Data.Map as Map import Data.Map (Map) import Types import Expansion import TexBase import Parser import Tex import RobotM import Library import Writeup import Pri...
06d3009d8ed41198f1cd9fcc15889c0f12ca9284c078999766be3af7c6e29205
vikram/lisplibraries
foreign-var.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: foreign-var ;;;; Purpose: Tests of foreign variables Authors : and Date Started : Aug 2003 ;;;; $ I...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/uffi-1.5.17/tests/foreign-var.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION Name: foreign-var Purpose: Tests of foreign variables *************************************************************************
Authors : and Date Started : Aug 2003 $ I d : foreign-var.lisp 10608 2005 - 07 - 01 00:39:48Z This file , part of UFFI , is Copyright ( c ) 2003 - 2005 by (in-package #:uffi-tests) (def-foreign-var "uchar_13" :unsigned-byte "uffi_tests") (def-foreign-var "schar_neg_120" :byte "uffi_tests") ...
2534d2e2727f7ca16bb83b805ec308616e30946a51407d398c225be188df23ef
MyDataFlow/ttalk-server
dynamic_compile.erl
Copyright ( c ) 2007 Mats < > < > < > %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without %% restriction, including without limitatio...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/dynamic_compile.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
Copyright ( c ) 2007 Mats < > < > < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT W...
7ce6f31a3d5e4f9a89bb55a52d983150fc218fc33c9e7a68a9ef0abcadffbbec
cojna/iota
Utils.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE MagicHash # module Data.Bits.Utils where import Data.Bits import Data.Word import GHC.Exts import Unsafe.Coerce infixl 8 .<<., .>>., .>>>. infixl 6 .^. (.<<.) :: (Bits i) => i -> Int -> i (.<<.) = unsafeShiftL {-# INLINE (.<<.) #-} (.>>.) :: (Bits i) => i -> Int -> i (.>>.)...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Data/Bits/Utils.hs
haskell
# LANGUAGE BangPatterns # # INLINE (.<<.) # # INLINE (.>>.) # # INLINE (.>>>.) # # INLINE (.^.) #
# LANGUAGE MagicHash # module Data.Bits.Utils where import Data.Bits import Data.Word import GHC.Exts import Unsafe.Coerce infixl 8 .<<., .>>., .>>>. infixl 6 .^. (.<<.) :: (Bits i) => i -> Int -> i (.<<.) = unsafeShiftL (.>>.) :: (Bits i) => i -> Int -> i (.>>.) = unsafeShiftR (.>>>.) :: Int -> Int -> Int (I# x#...
33b20e3c9c2c6509850050be6f53040328caeacc90590cf0e0298cfbb6b9b68a
mstksg/advent-of-code-2018
Day08.hs
-- | Module : AOC.Challenge . -- Copyright : (c) Justin Le 2018 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- Day 8 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day08 ( day08a , day08b ) where import ...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2018/fc76f763ece2db87dc5e30b8540559a539665f17/src/AOC/Challenge/Day08.hs
haskell
| Copyright : (c) Justin Le 2018 License : BSD3 Stability : experimental Portability : non-portable
Module : AOC.Challenge . Maintainer : Day 8 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day08 ( day08a , day08b ) where import AOC.Common (TokStream, parseTokStream_) import AOC.Solver ((:~>)(..)) import Control.Lens ...
3bf5ef0f695c60a7399156d31b2181a85c65ff4412bbbae40cb4134b5fcee3fb
Average-user/gozar
sgfparser.clj
(ns gozar.test.gozar.sgfparser (:require [clojure.test :refer [deftest testing is]] [gozar.sgfparser :as s])) (def game1 (slurp "resources/SGFs/example9x9.sgf")) (def game2 (slurp "resources/SGFs/example19x19.sgf")) (deftest parse-9x9 (is (= (s/parse-game game1) {:handicap '() ...
null
https://raw.githubusercontent.com/Average-user/gozar/102a184bfb41f44a5ee1bc2aa03a63d72290592e/test/clj/gozar/test/gozar/sgfparser.clj
clojure
(ns gozar.test.gozar.sgfparser (:require [clojure.test :refer [deftest testing is]] [gozar.sgfparser :as s])) (def game1 (slurp "resources/SGFs/example9x9.sgf")) (def game2 (slurp "resources/SGFs/example19x19.sgf")) (deftest parse-9x9 (is (= (s/parse-game game1) {:handicap '() ...
17f74cfd86f609fa71c5ffcdd9f14f2837084318350f5d9b135654e5ffe6ed65
census-instrumentation/opencensus-erlang
oc_stat_exporter_stdout.erl
-module(oc_stat_exporter_stdout). -export([export/2]). export(ViewData, _) -> [io:format("~s: ~p~n", [Name, Data]) || #{name := Name, data := Data} <- ViewData].
null
https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/src/oc_stat_exporter_stdout.erl
erlang
-module(oc_stat_exporter_stdout). -export([export/2]). export(ViewData, _) -> [io:format("~s: ~p~n", [Name, Data]) || #{name := Name, data := Data} <- ViewData].
35709d7cae513caee223813eda41374cb8cf22e0e01411baa18d7aae80a62834
mattmundell/nightshade
german-tutor.lisp
One line description of german - tutor . (defpackage "GERMAN-TUTOR" (:version 0) (:use "LISP" "EXT") (:documentation "FIX.")) (in-package "ED") /home / mattm/.kde / share / apps / klettres / de/ (defevar "Tutor Sound Dir" #p"/usr/share/apps/klettres/data/") (defun phrase-sound (language category phrase) (...
null
https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/packages/german-tutor.pkg/german-tutor.lisp
lisp
(message "~C" (key-event-char (aref key 0)))
One line description of german - tutor . (defpackage "GERMAN-TUTOR" (:version 0) (:use "LISP" "EXT") (:documentation "FIX.")) (in-package "ED") /home / mattm/.kde / share / apps / klettres / de/ (defevar "Tutor Sound Dir" #p"/usr/share/apps/klettres/data/") (defun phrase-sound (language category phrase) (...
f10680f89c3fa57772f69bc2cb84e7b98a72ac2f045a209281093984c4680bd4
hamler-lang/hamler
Monad.erl
%%--------------------------------------------------------------------------- %% | Module : Monad Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. %% License : BSD-style (see the LICENSE file) %% Maintainer : , , %% Stability : experimental %% Portability :...
null
https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Control/Monad.erl
erlang
--------------------------------------------------------------------------- | License : BSD-style (see the LICENSE file) Stability : experimental Portability : portable The Monad FFI module. ---------------------------------------------------------------------------
Module : Monad Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. Maintainer : , , -module('Monad'). -export([ applyListImpl/2 , listAppend/2 , bindImpl/2 , bindListImpl/2 , pureImpl/1 , seqio/1 , seqio_/1 , un...
610e9edd423b3c81bdc9f41a741430ddd7f5b77b1598bea537ce4abeec96874d
zellige/zellige
GeoJsonFeatures.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeFamilyDependencies # {-# LANGUAGE TypeOperators #-} # OPTIONS_GHC -fno - warn - orphans # module Data...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Types/GeoJsonFeatures.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # this is redundant starting with base-4.11 / GHC 8.4 Points Lines Foldr? Helpers Foldr?
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilyDependencies # # OPTIONS_GHC -fno - warn - orphans # module Data.Geometry.Types.GeoJsonFeatures where import qualified Data.Foldable as Foldable import qualified Data.Geospatial as Geospatial import qualified Da...
2cbe37c23fd237bf4356378fa2ba8e1777df46e38a78a14f4e1b8c1d3eb3bbbe
informatimago/lisp
token.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** ;;;;FILE: token.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; Defines cpp tokens. ;;;; < PJB > <...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/cpp/token.lisp
lisp
coding : utf-8 -*- ************************************************************************** FILE: token.lisp LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION Defines cpp tokens. LEGAL This program is free software: you can redistribute it and/or modify (at your...
USER - INTERFACE : < PJB > < > MODIFICATIONS 2015 - 06 - 28 < PJB > AGPL3 Copyright 2015 - 2016 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or GNU Affero General Public Lice...
b5dac38a6d1c8ee046be8669cd0dd87f3f267a9fa74151e2e918a83d05b90aaa
camllight/camllight
lexer.mli
#open "parser";; type lexical_error = Illegal_character | Unterminated_comment | Bad_char_constant | Unterminated_string;; exception Lexical_error of lexical_error * int * int;; value main: lexing__lexbuf -> token and add_infix: string -> unit and remove_infix: string -> unit ;;
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/compiler/lexer.mli
ocaml
#open "parser";; type lexical_error = Illegal_character | Unterminated_comment | Bad_char_constant | Unterminated_string;; exception Lexical_error of lexical_error * int * int;; value main: lexing__lexbuf -> token and add_infix: string -> unit and remove_infix: string -> unit ;;
70d00e2136b185c164530ab4907ab500d33414ea5222d3f4ce5c7d0b0f90b84f
synduce/Synduce
TermTypes.ml
open Base open Lexing module O = Option * Variables have unique integer ids but two variables can have the same name . Additional information can be added via variable attributes . For example , a variable can be a Terminal or a NonTerminal in the context of a pattern matching recursion scheme . ...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/lang/TermTypes.ml
ocaml
----------------------------------------------------- * Terms. * Set cardinality. * Set complement. * Set singleton * Simple patterns for function arguments: a fpattern is either a variable or a tuple of patterns. * More complex patterns are used in match-cases. In the current implementation, ...
open Base open Lexing module O = Option * Variables have unique integer ids but two variables can have the same name . Additional information can be added via variable attributes . For example , a variable can be a Terminal or a NonTerminal in the context of a pattern matching recursion scheme . ...
d4632d1438313db6b76e8d011d05d31c63d2ce394d1fc9968dfcead043039a23
BinRoot/Haskell-Data-Analysis-Cookbook
Main.hs
import qualified Data.Text as T import qualified Data.Text.IO as TIO import D3JS myChart nums numBars = do let dim = (300, 300) elem <- box (T.pack "#myChart") dim bars numBars 300 (Data1D nums) elem addFrame (300, 300) (250, 250) elem -- Rendering a bar graph in D3 main = do let nums = [10, 40, 100, 50, ...
null
https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch11/Code09_d3box/Main.hs
haskell
Rendering a bar graph in D3
import qualified Data.Text as T import qualified Data.Text.IO as TIO import D3JS myChart nums numBars = do let dim = (300, 300) elem <- box (T.pack "#myChart") dim bars numBars 300 (Data1D nums) elem addFrame (300, 300) (250, 250) elem main = do let nums = [10, 40, 100, 50, 55, 156, 80, 74, 40, 10] let nu...
561222052016c14cdca2bb1934db49867199293801dbdbf75723c588e0ca3d45
arcusfelis/xapian-erlang-bindings
xapian_sup.erl
-module(xapian_sup). -behaviour(supervisor). -export([start_link/0]). %% API. -export([init/1]). %% supervisor. -define(SUPERVISOR, ?MODULE). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). %% API. -spec start_link() -> {ok, Pid::pid()}. start_link() -> supervisor:start_link({loca...
null
https://raw.githubusercontent.com/arcusfelis/xapian-erlang-bindings/29871b3e64d658e74701c6ba68bf59e1a9b168f1/src/xapian_sup.erl
erlang
API. supervisor. API. supervisor.
-module(xapian_sup). -behaviour(supervisor). -define(SUPERVISOR, ?MODULE). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). -spec start_link() -> {ok, Pid::pid()}. start_link() -> supervisor:start_link({local, ?SUPERVISOR}, ?MODULE, []). init([]) -> PoolSup = ?CHILD(xapian_po...
2b173e51514bfb38d55124a0060c93c9f540721c7967c2297947ad07be84a680
PapenfussLab/bioshake
Strelka.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # # LANGUAGE TemplateHaskell # {-# LANGUAGE ViewPatterns #-} module Bioshake.Internal.Strelka where import Bioshake import Bioshake.TH import Control.Monad import Control.Monad.Trans ...
null
https://raw.githubusercontent.com/PapenfussLab/bioshake/afeb7219b171e242b6e9bb9e99e2f80c0a099aff/Bioshake/Internal/Strelka.hs
haskell
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # # LANGUAGE TemplateHaskell # module Bioshake.Internal.Strelka where import Bioshake import Bioshake.TH import Control.Monad import Control.Monad.Trans (lift) import Data...
abdb9b9c4c5d8f3532a6612e3bb67d604d64ae13fc2d0498dc07a2fd7b432681
clojure-interop/google-cloud-clients
InstanceId.clj
(ns com.google.cloud.spanner.InstanceId "Represents the resource name of a Cloud Spanner Instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner InstanceId])) (defn *of "Creates an InstanceId given project and instance IDs. project - `java.lang.String` instance - `ja...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/InstanceId.clj
clojure
(ns com.google.cloud.spanner.InstanceId "Represents the resource name of a Cloud Spanner Instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner InstanceId])) (defn *of "Creates an InstanceId given project and instance IDs. project - `java.lang.String` instance - `ja...
0a88d49ed09a8e559c6a4cdc300e9651b11b619ed6569cb426d15714d37418f5
dialohq/ocaml-grpc
grpc_lwt.ml
module Server = Server module Client = Client
null
https://raw.githubusercontent.com/dialohq/ocaml-grpc/79fa9373db069f7c8840b2f52b5df89499f75ba2/lib/grpc-lwt/grpc_lwt.ml
ocaml
module Server = Server module Client = Client
caa2aaa54253989ad0aa33a54d1190fcd261347edc9c06c0eaa5897a89a42dea
Elzair/nazghul
basic-time.scm
;; ---------------------------------------------------------------------------- ;; The diplomacy table. Each entry defines the attitude of the row to the ;; column. Note that attitudes are not necessarily symmetric. Negative values ;; are hostile, positive are friendly. ;; ----------------------------------------------...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/tests/basic-time.scm
scheme
---------------------------------------------------------------------------- The diplomacy table. Each entry defines the attitude of the row to the column. Note that attitudes are not necessarily symmetric. Negative values are hostile, positive are friendly. --------------------------------------------------------...
(kern-mk-dtable ) (define hour 12) (define minutes 45) (define time-in-minutes (+ (* hour 60) minutes)) (kern-set-clock ) (kern-mk-astral-body (list (list s_sun 255 "full") ) )
41f64ad42443c66c03e5c196b571e9501f8d843d73b9835c1a1e30aa1f2fe839
typeclasses/haskell-phrasebook
crypto-hashing.hs
import Crypto.Hash import Data.ByteString (ByteString) import qualified Data.ByteString.UTF8 as UTF8 import Data.ByteArray.Encoding sha256 :: String -> String sha256 input = result where bytes = UTF8.fromString input :: ByteString digest = hashWith SHA256 bytes :: Digest SHA256 hex = convertToBa...
null
https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/61ee6a7e63e4d6fc0e86c0cb9dc2c0d9f06b9537/crypto-hashing.hs
haskell
import Crypto.Hash import Data.ByteString (ByteString) import qualified Data.ByteString.UTF8 as UTF8 import Data.ByteArray.Encoding sha256 :: String -> String sha256 input = result where bytes = UTF8.fromString input :: ByteString digest = hashWith SHA256 bytes :: Digest SHA256 hex = convertToBa...
16ee5d7b0176e7a1bc7749c5d1daac0ba8fc8cacd841da9cb44f30ec67c5bf5f
LexiFi/menhir
InfiniteArray.mli
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/lib/InfiniteArray.mli
ocaml
**************************************************************************** special ex...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU Library General Public License versio...
aa4de42da8671278da19b3284395878d070205026b130ec23da2d8a37894d7f7
GrammaTech/sel
cpp-scan.lisp
cpp-scan.lisp --- Tests of CPP - SCAN (defpackage :software-evolution-library/test/cpp-scan (:nicknames :sel/test/cpp-scan) (:use :gt/full #+gt :testbot :software-evolution-library/test/util :stefil+ :software-evolution-library :software-evolution-library/software/clang) (:export :test-cpp-sca...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/cpp-scan.lisp
lisp
cpp-scan.lisp --- Tests of CPP - SCAN (defpackage :software-evolution-library/test/cpp-scan (:nicknames :sel/test/cpp-scan) (:use :gt/full #+gt :testbot :software-evolution-library/test/util :stefil+ :software-evolution-library :software-evolution-library/software/clang) (:export :test-cpp-sca...
5ffeb5e1c26ae9c3b8006cd63364b6af23c18376ea25d4db1bb64d9260a8410c
seckcoder/course-compiler
s6_3.rkt
(let ([v (inject (lambda: ([x : Any]) : Any (inject (+ (project x Integer) 2) Integer)) (Any -> Any))]) (let ([a (inject 40 Integer)]) (project ((project v (Any -> Any)) a) Integer)))
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s6_3.rkt
racket
(let ([v (inject (lambda: ([x : Any]) : Any (inject (+ (project x Integer) 2) Integer)) (Any -> Any))]) (let ([a (inject 40 Integer)]) (project ((project v (Any -> Any)) a) Integer)))
52261ac5eb4a23397a2f415407b60e47bd33a5db0473388554dbd7f8c3185877
CodyReichert/qi
util.lisp
(in-package :cl-user) (defpackage qi.util (:use :cl) (:export :asdf-system-path :download-strategy :is-gh-url? :is-git-url? :is-hg-url? :is-tar-url? :load-asdf-system :run-git-command :run-hg-command :sym->str ...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/src/util.lisp
lisp
Code: If `directory' is already a git repo, update it If a revision or branch is specified, do a hard reset; otherwise, rebase against upstream Adapted from #L37-L50; setting `upstream-ref' above requires this
(in-package :cl-user) (defpackage qi.util (:use :cl) (:export :asdf-system-path :download-strategy :is-gh-url? :is-git-url? :is-hg-url? :is-tar-url? :load-asdf-system :run-git-command :run-hg-command :sym->str ...
f1d4fd2bcccc0ed9a2259673a2570d4cd21d11dd25cdc696534fb4fb91633834
CRogers/obc
error.ml
* error.ml * * 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/error.ml
ocaml
fatal -- complain and die error -- complain and exit later warning -- express mild discontent
* error.ml * * 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...
2a7c9001504c213a4efe9fc8eb9b984b8c7c61ab7b8f64201400c9474fe9290e
serokell/qtah
QFormLayout.hs
This file is part of Qtah . -- Copyright 2015 - 2018 The Qtah Authors . -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) ...
null
https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFormLayout.hs
haskell
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 (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 MER...
This file is part of Qtah . Copyright 2015 - 2018 The Qtah Authors . the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License module Graphics.UI.Qtah.Generator.Interface.Wi...
ce8b3e2607b3887bfd325ceb7e17d03f2730046ccc9fbad18b48cc682e700e47
alaricsp/chicken-scheme
srfi-69.import.scm
srfi-69.import.scm - import library for " srfi-69 " module ; Copyright ( c ) 2008 - 2009 , The Chicken Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistributions of source code...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/srfi-69.import.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributio...
srfi-69.import.scm - import library for " srfi-69 " module Copyright ( c ) 2008 - 2009 , The Chicken Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES...
80aeabdb1e1911a9ad9cb3e84d9b864a100ab4bb11e75516bcb62cd519edf8d1
jochu/swank-clojure
swank.clj
(ns leiningen.swank "Launch swank server for Emacs to connect." (:use [leiningen.compile :only [eval-in-project]]) (:import [java.io File])) (defn swank-form [project port host opts] bootclasspath workaround : -673 (when (:eval-in-leiningen project) (require '[clojure walk template stacktrace])) `(do ...
null
https://raw.githubusercontent.com/jochu/swank-clojure/b08daf866488b449a44ba8df6e5ae17a3515ef57/src/leiningen/swank.clj
clojure
This exits immediately when using :eval-in-leiningen; must block
(ns leiningen.swank "Launch swank server for Emacs to connect." (:use [leiningen.compile :only [eval-in-project]]) (:import [java.io File])) (defn swank-form [project port host opts] bootclasspath workaround : -673 (when (:eval-in-leiningen project) (require '[clojure walk template stacktrace])) `(do ...
da087b7013282977e38308a2ea1f176b3e51b1b58c80fedf96a9d632bc8e1095
nineties-retro/sps
sps-char-map.scm
(define sps:char-map:illegal #b00000000000) (define sps:char-map:id #b00000000001) (define sps:char-map:digit #b00000000010) (define sps:char-map:str #b00000000100) (define sps:char-map:ws #b00000001000) (define sps:char-map:list-open #b00000010000) (define sps:char-map:list-...
null
https://raw.githubusercontent.com/nineties-retro/sps/bf15b415f4cdf5d6d69ae2f39c250db2090c0817/sps-char-map.scm
scheme
\t \n \v \f #\space #\! #\" #\# #\% #\& #\' #\( #\) #\* #\+ #\, #\- #\. #\0 #\3 #\4 #\5 #\6 #\8 #\9 #\: #\; #\< #\> #\? #\C #\E #\F #\Z #\[ #\\ #\] #\^ #\_ #\` #\c #\e #\f #\z #\{ #\| #\} #\~
(define sps:char-map:illegal #b00000000000) (define sps:char-map:id #b00000000001) (define sps:char-map:digit #b00000000010) (define sps:char-map:str #b00000000100) (define sps:char-map:ws #b00000001000) (define sps:char-map:list-open #b00000010000) (define sps:char-map:list-...
8a95eeb08cf0865a6bf9cefbbdbb7ed77c00f27f67131a32e81b008fa8d87c24
ucsd-progsys/liquidhaskell
PositivityCheck.hs
@ LIQUID " --expect - error - containing = Negative occurence of PositivityCheck . " @ {-@ LIQUID "--expect-error-containing=Negative occurence of PositivityCheck.Bad2" @-} {-@ LIQUID "--expect-error-containing=Negative occurence of PositivityCheck.Bad3" @-} @ LIQUID " --expect - error - containing = Negative occurenc...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/PositivityCheck.hs
haskell
@ LIQUID "--expect-error-containing=Negative occurence of PositivityCheck.Bad2" @ @ LIQUID "--expect-error-containing=Negative occurence of PositivityCheck.Bad3" @ @ LIQUID "--expect-error-containing=Negative occurence of PositivityCheck.BadRec1" @
@ LIQUID " --expect - error - containing = Negative occurence of PositivityCheck . " @ @ LIQUID " --expect - error - containing = Negative occurence of PositivityCheck . Bad4 " @ @ LIQUID " --expect - error - containing = Negative occurence of PositivityCheck . " @ module PositivityCheck where data Bad1 a = No11 (Ba...
37b456715813ac7eabe60b1e8e0c3ff462444f6dc7c1490bfcc386b468ba46fa
oakes/Nightcode
builders.clj
(ns nightcode.builders (:require [nightcode.shortcuts :as shortcuts] [nightcode.lein :as l] [nightcode.spec :as spec] [nightcode.utils :as u] [nightcode.process :as proc] [clojure.spec.alpha :as s :refer [fdef]] [clojure.set :as set] ...
null
https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/src/clj/nightcode/builders.clj
clojure
prevent application thread from being flooded prevent bridge from being GC'ed for certain custom tasks, add tooltips add/remove tooltips select/disable build tabs init the tabs
(ns nightcode.builders (:require [nightcode.shortcuts :as shortcuts] [nightcode.lein :as l] [nightcode.spec :as spec] [nightcode.utils :as u] [nightcode.process :as proc] [clojure.spec.alpha :as s :refer [fdef]] [clojure.set :as set] ...
5b07dff8c9da86981516433ad2e1dd7d10c7238c75a474ca6e323a76a0eb9d67
mfikes/fifth-postulate
ns170.cljs
(ns fifth-postulate.ns170) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns170.cljs
clojure
(ns fifth-postulate.ns170) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
3f7da43a24656a3ceae4fd20569928e5b4958580b9afa27c0bfa2d207fcd408d
screenshotbot/screenshotbot-oss
capability.lisp
(in-package :bknr.utils) (defvar *capability-count* 0) (defun make-capability-string () "return new unique capabilty as a string" (md5-string (format nil "~a.~a" (get-universal-time) (incf *capability-count*))))
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/1faeba2a45c639354e1298eb8a75aa82805a9ad5/third-party/bknr.datastore/src/utils/capability.lisp
lisp
(in-package :bknr.utils) (defvar *capability-count* 0) (defun make-capability-string () "return new unique capabilty as a string" (md5-string (format nil "~a.~a" (get-universal-time) (incf *capability-count*))))
0b6ef7e46080ca74d96edbc6097fe125e4a407db35a029cb37b05e5254193221
agentm/project-m36
Term.hs
--writes Relation to a String suitable for terminal output module ProjectM36.Relation.Show.Term where import ProjectM36.Base import ProjectM36.Atom import ProjectM36.AtomType import ProjectM36.Tuple import ProjectM36.Relation import ProjectM36.Attribute hiding (null) import qualified Data.List as L import qualified Dat...
null
https://raw.githubusercontent.com/agentm/project-m36/3b0e43f37719b6052f8b47674b7a86105453400f/src/lib/ProjectM36/Relation/Show/Term.hs
haskell
writes Relation to a String suitable for terminal output guess the width that the character will appear as in the terminal represent a relation as a table similar to those drawn by Date header, body calculate maximum per-row and per-column sizes column size, row size the normal "lines" function returns an empty list fo...
module ProjectM36.Relation.Show.Term where import ProjectM36.Base import ProjectM36.Atom import ProjectM36.AtomType import ProjectM36.Tuple import ProjectM36.Relation import ProjectM36.Attribute hiding (null) import qualified Data.List as L import qualified Data.Text as T import Control.Arrow hiding (left) import Data....
6cca4f22e8eff6ecd437da58522178e8fe1bb8cff525560e8a5b79d7f3f226fb
ranjitjhala/haddock-annot
Doc.hs
module Haddock.Doc ( docAppend, docParagraph ) where import Haddock.Types import Data.Char (isSpace) -- used to make parsing easier; we group the list items later docAppend :: Doc id -> Doc id -> Doc id docAppend (DocUnorderedList ds1) (DocUnorderedList ds2) = DocUnorderedList (ds1++ds2) docAppend (DocUnord...
null
https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/haddock-2.9.3/src/Haddock/Doc.hs
haskell
used to make parsing easier; we group the list items later again to make parsing easier - we spot a paragraph whose only item Drop trailing whitespace from @..@ code blocks. Otherwise this: -- @ -- foo -- @ turns into (DocCodeBlock "\nfoo\n ") which when rendered in HTML gives an extra vertical spac...
module Haddock.Doc ( docAppend, docParagraph ) where import Haddock.Types import Data.Char (isSpace) docAppend :: Doc id -> Doc id -> Doc id docAppend (DocUnorderedList ds1) (DocUnorderedList ds2) = DocUnorderedList (ds1++ds2) docAppend (DocUnorderedList ds1) (DocAppend (DocUnorderedList ds2) d) = DocAppe...
94da2cc275ba53cf0319949fa53d1d8da0cbb4336447cac9996b7d0310ae9517
haskell-effectful/effectful
STM.hs
-- | Lifted "Control.Concurrent.STM". module Effectful.Concurrent.STM ( -- * Effect Concurrent -- ** Handlers , runConcurrent -- * Core , STM.STM , atomically , STM.retry , STM.orElse , STM.check , STM.throwSTM , STM.catchSTM * TVar , STM.TVar , newTVarIO , readTVarIO , STM.ne...
null
https://raw.githubusercontent.com/haskell-effectful/effectful/f7f82c149e7b4e67c3638e854a84d1c9695c0baa/effectful/src/Effectful/Concurrent/STM.hs
haskell
| Lifted "Control.Concurrent.STM". * Effect ** Handlers * Core * TMVar * TQueue * TBQueue | Lifted 'STM.atomically'. | Lifted 'STM.newTVarIO'. | Lifted 'STM.readTVarIO'. | Lifted 'STM.registerDelay'. | Lifted 'STM.mkWeakTVar'. The finalizer can run at any point and in any thread. | Lifted 'STM.newTMVarIO'...
module Effectful.Concurrent.STM Concurrent , runConcurrent , STM.STM , atomically , STM.retry , STM.orElse , STM.check , STM.throwSTM , STM.catchSTM * TVar , STM.TVar , newTVarIO , readTVarIO , STM.newTVar , STM.readTVar , STM.writeTVar , STM.modifyTVar , STM.modifyTVar' , STM...
3906e5fcc14303b9a205ab671b3cce758204a79411c37449f5b02a32d73a5b98
openmusic-project/OMChroma
specenv-data.lisp
;===================================================== ; CHROMA ;===================================================== part of the OMChroma library - > High - level control of sound synthesis in OM ;===================================================== ; ;This program is free software; you can redistribute it and/...
null
https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/chroma/models/specenv-data.lisp
lisp
===================================================== CHROMA ===================================================== ===================================================== This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. See file LIC...
part of the OMChroma library - > High - level control of sound synthesis in OM modify it under the terms of the GNU General Public License (in-package :chroma) (defclass specenv-data (analysis-data) () (:documentation "enveloppe spectrale calculŽe par estimate")) (defmethod initialize-instance :after ((x ...
ae2a933f3ac4267e413b40faefbd4b37b9065a8eb018483b92779b73214f21fe
SnootyMonkey/Falkland-CMS
browse.clj
(ns fcms.integration.rest-api.taxonomy.browse "Integration tests for browsing taxonomies with the REST API.")
null
https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/test/fcms/integration/rest_api/taxonomy/browse.clj
clojure
(ns fcms.integration.rest-api.taxonomy.browse "Integration tests for browsing taxonomies with the REST API.")
74b857f429ff1ffaf748c004b0c6c51ecbcf67c7500d760a5e8b0cefc48da362
yogthos/reagent-secretary-example
about.cljs
(ns reagent-secretary-example.about (:require [accountant.core :as accountant])) (defn about-page [] [:div [:p "This is the about page"] [:button {:on-click #(accountant/navigate! "/")} "home"]])
null
https://raw.githubusercontent.com/yogthos/reagent-secretary-example/73eda7712c2a93dc5069e864c2d4a14aa9f1f38e/src/reagent_secretary_example/about.cljs
clojure
(ns reagent-secretary-example.about (:require [accountant.core :as accountant])) (defn about-page [] [:div [:p "This is the about page"] [:button {:on-click #(accountant/navigate! "/")} "home"]])
2a4ee998c970af6c5ce0877c4b2af3a81c9cab494f25c0f1e1dde3ba650b7991
marcosh/existential-optics
Traversal.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Traversal where import Morph import Optics import PowerSeries import Vect -- fin import Data.Nat -- DATA TYPE type Traversal = Optic PowerSeries COMMON both :: Morph PowerSeries f => Optic f (a, a) (b, b) a b both = morph bothTraversal where bo...
null
https://raw.githubusercontent.com/marcosh/existential-optics/b4727e2ae6119d7039d7575d5eb64fc5ae74dc1f/src/Traversal.hs
haskell
fin DATA TYPE COMMON OPERATIONS
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Traversal where import Morph import Optics import PowerSeries import Vect import Data.Nat type Traversal = Optic PowerSeries COMMON both :: Morph PowerSeries f => Optic f (a, a) (b, b) a b both = morph bothTraversal where bothTraversal :: Trave...
4314f8313b3b9276536f0f2c27d403496514b20b45d11beff34ec7e49de14064
elaforge/karya
Import_test.hs
Copyright 2013 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Derive.C.Prelude.Import_test where import Util.Test import qualified Derive.DeriveTest as DeriveTest import qualified Derive.Score as Score test_import :: Test test_import = do ...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/C/Prelude/Import_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2013 module Derive.C.Prelude.Import_test where import Util.Test import qualified Derive.DeriveTest as DeriveTest import qualified Derive.Score as Score test_import :: Test test_import = do let run title = DeriveTest.extract Score.event_start $ DeriveTest.derive_tracks title [(">", [(0, ...
f6f17d74ad957100d4fd150fd94df24e56e512e39973406576743d512fe44a4b
ygmpkk/house
Test.hs
module Test where alltests = [ wraptest , boxtest , buttontest , bargraphtest , papertest , gridtest , rowtest , childtest , reltest , newwintest , doactiontest , radiotest ] wraptest :: Gadget wraptest = wrap (border 20) ((b1 <-> b2) <|> b3) where b1 = buttontest b2 = buttontest b...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Gadgets/lib/Test.hs
haskell
tx smrq SMVisible $ tx smrq SMVisible $
module Test where alltests = [ wraptest , boxtest , buttontest , bargraphtest , papertest , gridtest , rowtest , childtest , reltest , newwintest , doactiontest , radiotest ] wraptest :: Gadget wraptest = wrap (border 20) ((b1 <-> b2) <|> b3) where b1 = buttontest b2 = buttontest b...
026d92ac02b3b33efb9d8a5b1a579393ebf7af450ed5d16af0fd05eb9785e767
appleby/Lisp-In-Small-Pieces
chap10a.scm
$ I d : chap10a.scm , v 4.2 2006/11/25 17:44:38 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is derived from the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge Univ...
null
https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/src/chap10a.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is derived from the files that accompany the book: The original sources can be downloaded from the author's website at -systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html This file may have been altered from the original in order to...
$ I d : chap10a.scm , v 4.2 2006/11/25 17:44:38 LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge University Press ) . By Christian Queinnec < > This file converts a Sexp into a Program object . This object will (define-class Variable O...
afb939c3be1f8bbb7c2c053939d75300ab1f3b7c8ae8c10c0fb4cde5c2b2061b
mtgred/netrunner
purging.clj
(ns game.core.purging (:require [game.core.board :refer [all-installed]] [game.core.card :refer [get-counters has-subtype?]] [game.core.engine :refer [trigger-event]] [game.core.ice :refer [update-all-ice]] [game.core.props :refer [add-counter]])) (defn purge "Purges viruses." [state side] ...
null
https://raw.githubusercontent.com/mtgred/netrunner/65f56ad74b9334461a7115824d445210ef86bcca/src/clj/game/core/purging.clj
clojure
(ns game.core.purging (:require [game.core.board :refer [all-installed]] [game.core.card :refer [get-counters has-subtype?]] [game.core.engine :refer [trigger-event]] [game.core.ice :refer [update-all-ice]] [game.core.props :refer [add-counter]])) (defn purge "Purges viruses." [state side] ...
ab60c989de18daa9c54373b5c56f31ae1237d8d953abdf0417554cca431798a9
tweag/webauthn
Database.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Database ( Connection, Transaction (), -- Constructor deliberately not exposed. withTransaction, connect, initialize, -- * User insertUser, userExists, -- * Credential Entry insertCredentialEntry, queryCredent...
null
https://raw.githubusercontent.com/tweag/webauthn/e52ad571a8de7da2deb37a8bffbbc804742ae922/server/src/Database.hs
haskell
Constructor deliberately not exposed. * User * Credential Entry * Auth token | Opens the @users.sqlite3@ database | Creates the tables if they do not exist yet If exceptions occur within the transaciton, the transaction is aborted with `ROLLBACK TRANSACTION`. Otherwise, the transaction is committed using `COM...
# LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Database ( Connection, withTransaction, connect, initialize, insertUser, userExists, insertCredentialEntry, queryCredentialEntryByCredential, queryCredentialEntriesByUser, AuthToken (..), generateAuthToken, ...
cbdd705874875900cbea3f5b470c2539d458a231fa1421cf2c5a8c865e708b04
Asana/kraken
kraken_router_shard.erl
%% @doc Responsible for routing messages through a partition of the topic space %% for the kraken_router that manages it. -module(kraken_router_shard). -behavior(gen_server). %%%----------------------------------------------------------------- %%% Exports %%%----------------------------------------------------------...
null
https://raw.githubusercontent.com/Asana/kraken/51c7a2e334b6f40d7e3614b991dd3c877a07e6dc/src/kraken_router_shard.erl
erlang
@doc Responsible for routing messages through a partition of the topic space for the kraken_router that manages it. ----------------------------------------------------------------- Exports ----------------------------------------------------------------- Callbacks API ---------------------------------------------...
-module(kraken_router_shard). -behavior(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start_link/0, subscribe/3, unsubscribe/3, publish/4, topics/2, topic_status/1, waitress_pids/1, get_buffered_msgs/3, current_timestamp/0]). -de...
01d0d093204f5f413aafad776076e60625ea0b2ab7433a14152709b20bc416d0
tonsky/datascript
index.cljc
(ns datascript.test.index (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datascript.core :as d] [datascript.db :as db] [datascript.test.core :as tdc])) (deftest test-datoms (let [dvec #(vector...
null
https://raw.githubusercontent.com/tonsky/datascript/4f1af628d5650e0ca0ffd0b6b384941eef2c37fb/test/datascript/test/index.cljc
clojure
name non-indexed, excluded from avet no error
(ns datascript.test.index (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datascript.core :as d] [datascript.db :as db] [datascript.test.core :as tdc])) (deftest test-datoms (let [dvec #(vector...
131905ad1faf35c82ff2339fe193b769a28e03f2defd863e7fe1f6f330e60171
jfeser/castor
join_elim_tactics.ml
open Core open Castor open Ast open Schema open Collections module P = Pred.Infix module A = Abslayout open Match.Query module Config = struct module type S = sig include Ops.Config.S include Tactics_util.Config.S include Simplify_tactic.Config.S end end module Make (C : Config.S) = struct open C ...
null
https://raw.githubusercontent.com/jfeser/castor/e9f394e9c0984300f71dc77b5a457ae4e4faa226/eopt/join_elim_tactics.ml
ocaml
open Core open Castor open Ast open Schema open Collections module P = Pred.Infix module A = Abslayout open Match.Query module Config = struct module type S = sig include Ops.Config.S include Tactics_util.Config.S include Simplify_tactic.Config.S end end module Make (C : Config.S) = struct open C ...
4799b28a47f80b574caa8845c3c2a96439957428cd5c35b18748f3271113123c
mzp/scheme-abc
codegenClassTest.ml
open Base open Codegen open OUnit open AstUtil open Swflib open Swflib.MethodType open Swflib.Cpool let qname ns x = `QName ((`Namespace (String.concat "." ns)),x) let global name = AstUtil.qname [] name let expr inst = {MethodType.empty with method_name = qname [] ""; code= [ `GetLocal_0; `PushSco...
null
https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/codegen/codegenClassTest.ml
ocaml
open Base open Codegen open OUnit open AstUtil open Swflib open Swflib.MethodType open Swflib.Cpool let qname ns x = `QName ((`Namespace (String.concat "." ns)),x) let global name = AstUtil.qname [] name let expr inst = {MethodType.empty with method_name = qname [] ""; code= [ `GetLocal_0; `PushSco...
4a9976ac2b46678a0df664b9a4997210a080e655ded3f5a22cf2d5581ce2ec5b
hendriktews/proof-tree
proof_tree.mli
* prooftree --- proof tree display for Proof General * * Copyright ( C ) 2011 - 2019 * * This file is part of " prooftree " . * * " prooftree " 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 Softwar...
null
https://raw.githubusercontent.com/hendriktews/proof-tree/7b18f01a6a6b09547a25ed464c2deb7f8a2f5481/proof_tree.mli
ocaml
* Internal representation of proof trees with undo info * Switch to a different open goal. @param state state for undo @param proof_name name of proof @param new_current_id id of new current goal * Close the proof window for [proof_name]. @param proof_name name of the proof * For efficiency in proo...
* prooftree --- proof tree display for Proof General * * Copyright ( C ) 2011 - 2019 * * This file is part of " prooftree " . * * " prooftree " 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 Softwar...
b74d81c8744e2f6bde0dfadccf2a0d87b715fdb5b427d7d39ab6c01bddaf7cb0
bob-cd/bob
pipeline.clj
; Copyright 2018- Rahul De ; Use of this source code is governed by an MIT - style ; license that can be found in the LICENSE file or at ; . (ns runner.pipeline (:require [clojure.spec.alpha :as spec] [clojure.tools.logging :as log] [common.errors :as errors] [common.schemas] [failjure.core :as f] ...
null
https://raw.githubusercontent.com/bob-cd/bob/ce340eafd179aee7f20bdaf29e291916c94a7337/runner/src/runner/pipeline.clj
clojure
Copyright 2018- Rahul De license that can be found in the LICENSE file or at . Should be collected in reverse due to dependency Globally note the current container id, useful for stopping/pausing
Use of this source code is governed by an MIT - style (ns runner.pipeline (:require [clojure.spec.alpha :as spec] [clojure.tools.logging :as log] [common.errors :as errors] [common.schemas] [failjure.core :as f] [runner.artifact :as a] [runner.engine :as eng] [runner.resource :as r] [xtd...
3a9cd126bdb8d8a4e29eaa4fc63623e11812086ff47a2a5737bd23315738e080
sgbj/MaximaSharp
dbsi0e.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/dbsi0e.lisp
lisp
Compiled by f2cl version: "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $" Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing nil) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ " " macros.l , v fceac53...
9a1d1cbaab15258497b0b836017a2474ed3aa243c681bbabca4b8befb5a50c0a
w3ntao/programming-in-haskell
Exercise_15_9_6.hs
# OPTIONS_GHC -Wall # module Exercise_15_9_6 where approx :: Double approx = 1.0 delta :: Double delta = 0.00001 sqroot :: Double -> Double sqroot n = head . filter (\x -> abs (x*x - n) < delta) $ iterate next approx where next a = (a + n/a) / 2
null
https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-15/Exercise_15_9_6.hs
haskell
# OPTIONS_GHC -Wall # module Exercise_15_9_6 where approx :: Double approx = 1.0 delta :: Double delta = 0.00001 sqroot :: Double -> Double sqroot n = head . filter (\x -> abs (x*x - n) < delta) $ iterate next approx where next a = (a + n/a) / 2
320d58c97f32b8d6f7d38c342cb4cb98e0dc9898c97b691c46f15e66f215709c
ragkousism/Guix-on-Hurd
graph.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 , 2017 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/graph.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 , 2016 , 2017 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-graph) #:use-module (guix tests) #:use-module (guix graph) #:use-module (...
83c891493071148ea6e02a6737ff6b7cd7d968205cd7d20fd79b56823d7168b6
gregr/experiments
syntax-1-parsing.rkt
#lang racket (provide new-lam-apply-1 parse-1 penv-init-1 ) (require "parsing.rkt" "syntax-1-bootstrapping.rkt" "syntax-abstract.rkt" gregr-misc/either gregr-misc/monad ) (define (parse-1 pe form) (match form ('() (right uno-1)) ((? symbol?) (parse-bvar pe form)) ((cons op rest) (par...
null
https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/syntax-1-parsing.rkt
racket
TODO: syntax-lam? macros?
#lang racket (provide new-lam-apply-1 parse-1 penv-init-1 ) (require "parsing.rkt" "syntax-1-bootstrapping.rkt" "syntax-abstract.rkt" gregr-misc/either gregr-misc/monad ) (define (parse-1 pe form) (match form ('() (right uno-1)) ((? symbol?) (parse-bvar pe form)) ((cons op rest) (par...
0491e13328680ca7eace915e809fe9eb3019ad6a8d9906ecbb77c95f3cf6cfdb
mk270/archipelago
daemon.ml
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
null
https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/game/daemon.ml
ocaml
is the fun -> tick thing properly tail-recursive?
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
af3a61c0870c89222d294e56ae9aaf47de771cd0a13b04a2b0ef5157d0f170a3
VisionsGlobalEmpowerment/webchange
check_current_user.cljs
(ns webchange.login.check-current-user (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.auth.state :as auth] [webchange.state.warehouse :as warehouse])) (def path-to-db :utils/check-current-user) (re-frame/reg-sub path-to-db (fn [db] (get db path-to-db))) ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/2097ed3510b4060028232a85956a00c7efbfda68/src/cljs/webchange/login/check_current_user.cljs
clojure
(ns webchange.login.check-current-user (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.auth.state :as auth] [webchange.state.warehouse :as warehouse])) (def path-to-db :utils/check-current-user) (re-frame/reg-sub path-to-db (fn [db] (get db path-to-db))) ...
25a07e5f7d1a118e08ce454bd878a32f5ac0a2e9911ca0621ed8456a6dc5900c
sacerdot/CovidMonitoring
luoghi.erl
-module(luoghi). -export([start/0, luogo/0]). in N attori ( N = 10 ) start() -> io:format('Creo un luogo~n'), [spawn(fun luogo/0) || _ <- lists:seq(1,10)]. Creazione luogo e luogo()-> Server = global:whereis_name(server), link(Server), Server ! {new_place,self()}, visita([]). ...
null
https://raw.githubusercontent.com/sacerdot/CovidMonitoring/fe969cd51869bbe6479da509c9a6ab21d43e6d11/LamiDrusianiCalarota/luoghi.erl
erlang
di probabilità di probabilità
-module(luoghi). -export([start/0, luogo/0]). in N attori ( N = 10 ) start() -> io:format('Creo un luogo~n'), [spawn(fun luogo/0) || _ <- lists:seq(1,10)]. Creazione luogo e luogo()-> Server = global:whereis_name(server), link(Server), Server ! {new_place,self()}, visita([]). ...
6c2c1511f2cf84e1808cffdfebeebb276ef10f15639334ad432be6cf46932f80
97jaz/gregor
year.rkt
#lang racket/base (require racket/match "../../generics.rkt" "../../clock.rkt" "../ast.rkt" "../parse-state.rkt" "../l10n/l10n-week.rkt" "../l10n/numbers.rkt") (provide (struct-out Year) current-two-digit-year-resolver) (define (year-fmt ast t loc) (de...
null
https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/pattern/ast/year.rkt
racket
#lang racket/base (require racket/match "../../generics.rkt" "../../clock.rkt" "../ast.rkt" "../parse-state.rkt" "../l10n/l10n-week.rkt" "../l10n/numbers.rkt") (provide (struct-out Year) current-two-digit-year-resolver) (define (year-fmt ast t loc) (de...
788d1373855064500234628441435a6899be63557d9c426ad43bd80fd82d6557
Paczesiowa/hsenv
HsenvMonadUtils.hs
module HsenvMonadUtils (runInTmpDir) where import System.Directory import Util.IO import HsenvMonad runInTmpDir :: Hsenv a -> Hsenv a runInTmpDir m = do tmp <- liftIO getTemporaryDirectory tmpDir <- liftIO $ createTemporaryDirectory tmp "hsenv" oldCwd <- liftIO getCurrentDirectory liftIO $ setCurrentDirectory...
null
https://raw.githubusercontent.com/Paczesiowa/hsenv/b904436e10bde707a7838661a5ec30de430ca2b9/src/HsenvMonadUtils.hs
haskell
module HsenvMonadUtils (runInTmpDir) where import System.Directory import Util.IO import HsenvMonad runInTmpDir :: Hsenv a -> Hsenv a runInTmpDir m = do tmp <- liftIO getTemporaryDirectory tmpDir <- liftIO $ createTemporaryDirectory tmp "hsenv" oldCwd <- liftIO getCurrentDirectory liftIO $ setCurrentDirectory...
9bbce3a4a8a320f50fda217a04da547054e24211ef05faf4ffc295b7b8391409
mwand/eopl3
interp.scm
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of/k) (provide trace-apply-procedure) (define trace-apply-procedure (make-parameter #f)) ;;;;;;;;;;;;;;;; continuatio...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter5/exceptions/interp.scm
scheme
continuations ;;;;;;;;;;;;;;;; [] cont[(- [] (value-of e2 env))] cont[(apply-proc [] (value-of rand env))] the interpreter ;;;;;;;;;;;;;;;; value-of/k : Exp * Env * Cont -> FinalAnswer make let a macro, because I'm too lazy to add the extra continuation apply-cont : continuation * expval -> final-expval the b...
(module interp (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (require "lang.scm") (require "data-structures.scm") (require "environments.scm") (provide value-of-program value-of/k) (provide trace-apply-procedure) (define trace-apply-procedure (make-parameter #f)) (define-datatype continu...
d890cfd158e8376c97bdaf1566fa2aacd99066c79559f591d9012c3fdac5c865
sbcl/sbcl
x86-64-codegen.impure.lisp
This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in the public domain and is provided with ;;;;...
null
https://raw.githubusercontent.com/sbcl/sbcl/6239efbd569a79670ccc6964180965ac8990ad77/tests/x86-64-codegen.impure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. This tests a certain behavior that while "undefined" should at least not be fatal. This is ...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . #-x86-64 (invoke-restart 'run-tests::skip-file) (load "compiler-test-util.lisp") (import 'ctu:disassembly-lines) This trivial function failed to compile due to rev ...
31406968d6d33fcc997e157ab480676e093e259a6c0787f3929624a3687d2013
incoherentsoftware/defect-process
AttackDescriptions.hs
module Enemy.All.Spear.AttackDescriptions ( EnemyAttackDescriptions(..) , mkEnemyAttackDescs ) where import Control.Monad.IO.Class (MonadIO) import Attack import FileCache import Window.Graphics data EnemyAttackDescriptions = EnemyAttackDescriptions { _shove :: AttackDescription , _throw ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Spear/AttackDescriptions.hs
haskell
module Enemy.All.Spear.AttackDescriptions ( EnemyAttackDescriptions(..) , mkEnemyAttackDescs ) where import Control.Monad.IO.Class (MonadIO) import Attack import FileCache import Window.Graphics data EnemyAttackDescriptions = EnemyAttackDescriptions { _shove :: AttackDescription , _throw ...
ff5f3c7382e41e68a53127e9448a18ec135e0c11d49e1047a8c800211c1b5153
gafiatulin/codewars
HammingDistance.hs
-- Hamming Distance - Part 1: Binary codes -- / module Codewars.HammingDistance where hammingDistance :: String -> String -> Int hammingDistance = curry ( length . filter not . uncurry (zipWith (==)) )
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/HammingDistance.hs
haskell
Hamming Distance - Part 1: Binary codes /
module Codewars.HammingDistance where hammingDistance :: String -> String -> Int hammingDistance = curry ( length . filter not . uncurry (zipWith (==)) )
ce96fb1f1089c3e2340572da6b3ec0d4fb0d815c4a814841999002e012dd8971
mfoemmel/erlang-otp
wxGraphicsFont.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxGraphicsFont.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " < br />{@link wxGraphicsObject } -modul...
fa1ab1e8621aed22fa70af822f17591f377be7ed17ef5ac0aec450cd15ec4fae
wardle/pc4
rsdb.clj
(ns com.eldrix.pc4.rsdb "Integration with the rsdb backend. `rsdb` is the Apple WebObjects 'legacy' application that was PatientCare v1-3. Depending on real-life usage, we could pre-fetch relationships and therefore save multiple database round-trips, particularly for to-one relationships. Such a change woul...
null
https://raw.githubusercontent.com/wardle/pc4/f0defd8872ed2864e201317a6e9453887688ff69/pc4-server/src/clj/com/eldrix/pc4/rsdb.clj
clojure
this is misnamed, but belies the legacy system's origins. we flatten this to-one attribute the event type is a to-one relationship, so we flatten this and now just add a property to permit walking to SNOMED CT doesn't matter if nil TODO: should include child projects? TODO: should include child projects? TODO...
(ns com.eldrix.pc4.rsdb "Integration with the rsdb backend. `rsdb` is the Apple WebObjects 'legacy' application that was PatientCare v1-3. Depending on real-life usage, we could pre-fetch relationships and therefore save multiple database round-trips, particularly for to-one relationships. Such a change woul...
406272b944570178bdf863f8a7f830c4f7039340d0da89564a5f74852df51e0a
jonase/eastwood
wrongprepost.clj
(ns testcases.wrongprepost) (defn wrong1 [x] {:pre (pos? x)} x) (defn wrong1b ([x] x) ([x y] {:pre (> x y)} (- x y))) (defn ok2 [x] {:pre [(pos? x)]} x) (defn ok-pre-wrong-post-3 [x] {:pre [(number? x)] :post [number?]} (+ x 3)) (defn ok-pre-ok-post-4 [x] {:pre [(number? x)] ...
null
https://raw.githubusercontent.com/jonase/eastwood/01fb0b43b0bc10d578af667c5ee9708cbf6a97bc/cases/testcases/wrongprepost.clj
clojure
It would be good to give a different warning for the following case than for wrong-pre-7, because the following may actually be what the user intended, to assert that the argument y is neither nil nor false. If they intended to assert that y was not nil, we could recommend that they be explicit with (not (nil? y))...
(ns testcases.wrongprepost) (defn wrong1 [x] {:pre (pos? x)} x) (defn wrong1b ([x] x) ([x y] {:pre (> x y)} (- x y))) (defn ok2 [x] {:pre [(pos? x)]} x) (defn ok-pre-wrong-post-3 [x] {:pre [(number? x)] :post [number?]} (+ x 3)) (defn ok-pre-ok-post-4 [x] {:pre [(number? x)] ...
c5bd9e8a98c3106cc23c36f58b578f5ebf18e5de7f88b84e1542649583dc6adf
aigarashi/copl-tools
pp.ml
open Format open Core let g = "TypingMLii" let pr = fprintf (* generic functions to generate parens depending on precedence *) let with_paren lt ppf_e e_up ppf e = let (<) = lt in if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e (* precedence for expressions *) let rec is_last_longexp = function ...
null
https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/TypingML2/pp.ml
ocaml
generic functions to generate parens depending on precedence precedence for expressions if e is the left operand of e_up, do you need parentheses for e? mult associates stronger than plus or minus if e is the right operand of e_up, do you need parentheses for e? mult associates stronger than plus or minus, ...
open Format open Core let g = "TypingMLii" let pr = fprintf let with_paren lt ppf_e e_up ppf e = let (<) = lt in if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e let rec is_last_longexp = function BinOp(_,_,e) -> is_last_longexp e | If(_,_,_) | Let(_, _, _) -> true | _ -> false let (<) e ...
c60f92ff3c21ff4df92e1aa7ed91a2bc1417db637caa14f3654e46832c46e479
jeromesimeon/Galax
galax_url.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/base/galax_url.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . open Neturl open Error type decoded_url = | File of string | Http of (string * int * string) | ExternalSource of (string * string * string option * string) let registered_methods = ref [] let is_registered b = List.exists (fun x ->...
92855df340524185a987cded185fa117c4f4d8a20e6379268a3cafb45adaef18
goldfirere/singletons
SingletonsTestSuite.hs
-- | Currently, there is code to execute at runtime as a part of this test -- suite, as the only interesting part is making sure that the code typechecks. module Main (main) where main :: IO () main = pure ()
null
https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons/tests/SingletonsTestSuite.hs
haskell
| Currently, there is code to execute at runtime as a part of this test suite, as the only interesting part is making sure that the code typechecks.
module Main (main) where main :: IO () main = pure ()
845378c45da32589d23622fbaa5b961d1565497e5522a1c7bd1b3277c35f0647
shentufoundation/deepsea
Gen7.mli
open AST open Ascii open BinInt open BinNums open Cop open Ctypes open Datatypes open ExpCintptr open ExpStacked open FramesLabelsCintptr open Globalenvs open Integers open List0 open Maps0 open MemoryModel open Monad open Nat0 open OptErrMonad open Options open Semantics1 open StmtClinear open StmtStacked open String0...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Gen7.mli
ocaml
open AST open Ascii open BinInt open BinNums open Cop open Ctypes open Datatypes open ExpCintptr open ExpStacked open FramesLabelsCintptr open Globalenvs open Integers open List0 open Maps0 open MemoryModel open Monad open Nat0 open OptErrMonad open Options open Semantics1 open StmtClinear open StmtStacked open String0...
ab94456e93df881efa3cad68706919cb49cccf6e4ca01dca9d271ba86061db03
Eonblast/Scalaxis
rm_SUITE.erl
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/test/rm_SUITE.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc TODO : Add description to rm_SUITE -module(rm_SUITE). -author(''). -vsn('$Id$ '). -compile(export_all). ...
f41cacf14cff1a6902b14adff5c452e6de23a87f9e7b5e24a319c7c611a5e586
ghcjs/jsaddle
Concurrent.hs
{-# LANGUAGE DeriveDataTypeable #-} module GHCJS.Concurrent ( OnBlocked(..) , WouldBlockException(..) ) where import GHCJS.Prim import Data.Data | The runtime tries to run synchronous threads to completion . Sometimes it 's not poss...
null
https://raw.githubusercontent.com/ghcjs/jsaddle/97273656e28790ab6e35c827f8086cf47bfbedca/jsaddle/src-ghc/GHCJS/Concurrent.hs
haskell
# LANGUAGE DeriveDataTypeable # ^ continue the thread asynchronously if blocked ^ throw 'WouldBlockException' if blocked
module GHCJS.Concurrent ( OnBlocked(..) , WouldBlockException(..) ) where import GHCJS.Prim import Data.Data | The runtime tries to run synchronous threads to completion . Sometimes it 's not possible to continue running a thread , ...
c3ad4af77c8b5a912cfdbe18fcd9a0ca6f9945889fa19c033db479ebfdf0268c
esumii/min-caml
fib.ml
let rec fib n = if n < 2 then 1 else fib (n - 1) + fib (n - 2) in let rec loop n = if n = 0 then () else (print_int (fib 30); print_newline (); loop (n - 1)) in loop 100
null
https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/shootout/fib.ml
ocaml
let rec fib n = if n < 2 then 1 else fib (n - 1) + fib (n - 2) in let rec loop n = if n = 0 then () else (print_int (fib 30); print_newline (); loop (n - 1)) in loop 100
0e5c2db7c028fd17d32afe7395ae580242e44e1c096f20216625532ec1b06c40
clojure-emacs/refactor-nrepl
namespace_aliases_test.clj
(ns refactor-nrepl.ns.namespace-aliases-test (:require [clojure.test :refer [deftest is]] [refactor-nrepl.core :as core] [refactor-nrepl.ns.libspecs :as sut] [refactor-nrepl.unreadable-files :refer [ignore-errors?]] [refactor-nrepl.util :as util])) (defn finds [selector alias libspec] (let [aliases ...
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/41263c2b0890b6dc7da67b97da4cfe02a7775459/test/refactor_nrepl/ns/namespace_aliases_test.clj
clojure
(ns refactor-nrepl.ns.namespace-aliases-test (:require [clojure.test :refer [deftest is]] [refactor-nrepl.core :as core] [refactor-nrepl.ns.libspecs :as sut] [refactor-nrepl.unreadable-files :refer [ignore-errors?]] [refactor-nrepl.util :as util])) (defn finds [selector alias libspec] (let [aliases ...
eb754cf734a514633b22bf2aa51a3e36244345026616f03377a54339d6e379c2
racket/racket7
schedule.rkt
#lang racket/base (require (only-in '#%unsafe unsafe-poller unsafe-poll-ctx-fd-wakeup unsafe-poll-ctx-eventmask-wakeup unsafe-poll-ctx-milliseconds-wakeup unsafe-signal-received unsafe-set-sleep-in-thread!)) (pro...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/ffi/unsafe/schedule.rkt
racket
#lang racket/base (require (only-in '#%unsafe unsafe-poller unsafe-poll-ctx-fd-wakeup unsafe-poll-ctx-eventmask-wakeup unsafe-poll-ctx-milliseconds-wakeup unsafe-signal-received unsafe-set-sleep-in-thread!)) (pro...
00c30b92fa6b1ab979ca18969b9a623e52c1cd12f73fa94474b6414b7ab450bb
jaspervdj/advent-of-code
16.hs
{-# LANGUAGE BangPatterns #-} module Main where import Data.Char (digitToInt, isDigit) import qualified Data.Vector.Unboxed as VU ffft :: VU.Vector Int -> VU.Vector Int ffft input = VU.generate (VU.length input) $ \outidx -> abs $ go (outidx + 1) 0 0 `rem` 10 where go stride !acc i ...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2019/16.hs
haskell
# LANGUAGE BangPatterns #
module Main where import Data.Char (digitToInt, isDigit) import qualified Data.Vector.Unboxed as VU ffft :: VU.Vector Int -> VU.Vector Int ffft input = VU.generate (VU.length input) $ \outidx -> abs $ go (outidx + 1) 0 0 `rem` 10 where go stride !acc i | i >= VU.length input = ac...
cbb30ae851afc9edf0f53fe37cdc6867c61f797e0b683b867dca9ae2be987c14
dimitaruzunov/fp-2018
prime-in-each-column.scm
(require rackunit rackunit/text-ui) (define (prime? n) (define (count-divisors n) (define (divides? k n) (= (remainder n k) 0)) (define (divisors-up-to k) (cond ((= k 0) 0) ((divides? k n) (+ 1 (divisors-up-to (- k 1)))) (else (divisors-up-to (- k 1))))) ...
null
https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/06/prime-in-each-column.scm
scheme
(require rackunit rackunit/text-ui) (define (prime? n) (define (count-divisors n) (define (divides? k n) (= (remainder n k) 0)) (define (divisors-up-to k) (cond ((= k 0) 0) ((divides? k n) (+ 1 (divisors-up-to (- k 1)))) (else (divisors-up-to (- k 1))))) ...
57a6502baac082866ca27bd7df4eb964606320df9f0942b32a083b8ceb04664a
auser/hermes
pokemon_pb.erl
Copyright ( c ) 2009 < > < > %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without %% restriction, including without limitation the rights to use, %% copy, modify, mer...
null
https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/deps/erlang_protobuffs/src/pokemon_pb.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condit...
Copyright ( c ) 2009 < > < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , -module(pokemon_pb...
1d7cf364824e0b5195e4052330ca3fc8fc8754ac9296e3e2c504a2928d7445c0
lehins/RockAnts
LibSpec.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ViewPatterns # module LibSpec (spec) where import Common import Data.Massiv.Array as A import RockAnts.Grid import RockAnts.Types spec :: Spec spec = do describe "properties" $ do it "toFromDestination" $ property $ \(Positive i, Positive j) -> let ix = i :...
null
https://raw.githubusercontent.com/lehins/RockAnts/6b8cfcc476bb1230396ac18359cee578e5012154/tests/LibSpec.hs
haskell
# LANGUAGE BangPatterns # adjust for Double imprecision
# LANGUAGE ViewPatterns # module LibSpec (spec) where import Common import Data.Massiv.Array as A import RockAnts.Grid import RockAnts.Types spec :: Spec spec = do describe "properties" $ do it "toFromDestination" $ property $ \(Positive i, Positive j) -> let ix = i :. j dixGen = ...
fe9942b08f3560ef45ed965fdfbdf3dc85b886cbd73df0ea8e7862c29e420f09
racket/rhombus-prototype
annotation-string.rkt
#lang racket/base (provide annotation-any-string annotation-string-from-pattern annotation-string-to-pattern annotation-string-and annotation-string-or annotation-string-convert-pair) (define annotation-any-string "Any") (define annotation-complex-any-string "(_ :: Any)") ...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/45f2b0dc646dc768bfa54aebb3d155726199e2bb/rhombus/private/annotation-string.rkt
racket
s is comma-separated, but outside matching parentheses
#lang racket/base (provide annotation-any-string annotation-string-from-pattern annotation-string-to-pattern annotation-string-and annotation-string-or annotation-string-convert-pair) (define annotation-any-string "Any") (define annotation-complex-any-string "(_ :: Any)") ...
b132b49705d74630b27d8d7d3967e4bb1b541d7dc38a90ee720aeb8672f47b20
FPtje/GLuaFixer
Util.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # module GLuaFixer.Util where import GLua.AG.AST import qualified GLua.PSLexer as PSL import qualified GLua.PSParser as PSP import GLuaFixer.AG.LexLint import GLuaFixer.LintMessage import GLuaFixer.LintSettings import GLuaFixer.BadSequenceFinder import Control.DeepS...
null
https://raw.githubusercontent.com/FPtje/GLuaFixer/2564005fb8520b53cd96994ef08215bb41ff34e5/src/GLuaFixer/Util.hs
haskell
# LANGUAGE BangPatterns # | Indentation used for pretty printing code | Finds all Lua files in a folder Turn absolute path into relative path by stripping prefix | Read file in utf8_bom because that seems to work better | write file in utf8_bom mode Makes sure there's a trailing newline. The contents have 'deeps...
# LANGUAGE LambdaCase # module GLuaFixer.Util where import GLua.AG.AST import qualified GLua.PSLexer as PSL import qualified GLua.PSParser as PSP import GLuaFixer.AG.LexLint import GLuaFixer.LintMessage import GLuaFixer.LintSettings import GLuaFixer.BadSequenceFinder import Control.DeepSeq (deepseq, force) import Con...
145411830aa38be75ae0e37c0db13c3f576c083c8c5d0695c47b79c67f0a7193
aysylu/loom
network_simplex.cljc
(ns loom.test.network-simplex (:require [loom.network-simplex :refer [build-graph solve]] #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing run-tests]] :clj [clojure.test :as t :refer [is are deftest testing]]))) The majority of these tests are ported to cljc from 's python im...
null
https://raw.githubusercontent.com/aysylu/loom/bb9068c5c5f4c3cf66344bf1b966cfd730e92693/test/loom/test/network_simplex.cljc
clojure
admits multiple solutions, so I alter it a bit. PS.ex.7.1: testing main function Negative selfloops should cause an exception if uncapacitated and always be saturated otherwise.
(ns loom.test.network-simplex (:require [loom.network-simplex :refer [build-graph solve]] #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing run-tests]] :clj [clojure.test :as t :refer [is are deftest testing]]))) The majority of these tests are ported to cljc from 's python im...
f0d149f6771204c49a35d76eaa15cfaedd42e6ad6c5032c42f308b23ed1bf599
erlangonrails/devdb
ejabberd_http_poll.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_http_poll.erl Author : < > Purpose : HTTP Polling support ( XEP-0025 ) Created : 4 Mar 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you ca...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/web/ejabberd_http_poll.erl
erlang
---------------------------------------------------------------------- File : ejabberd_http_poll.erl This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
Author : < > Purpose : HTTP Polling support ( XEP-0025 ) Created : 4 Mar 2004 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a ...
07a83133994e637e813c42e628b67d9271444b48b8b82efb2daad6547c2e6449
nezt/hl72xml
hl72xml_socket.erl
%% ============================================================================== % % HL72XML SOCKET % Copyright ( c ) 2012 < > . % 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 . Redis...
null
https://raw.githubusercontent.com/nezt/hl72xml/4f15926f4efb0cf266bfee6b49c203385bcfbc2a/src/hl72xml_socket.erl
erlang
============================================================================== HL72XML SOCKET All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following...
Copyright ( c ) 2012 < > . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of copyright holders nor the names of its ` ` AS IS '' AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED...
d39162784d23e4ff383843d860fa32735803a2db5a5a54f2a683ca670758efab
jacekschae/learn-re-frame-course-files
publish_recipe.cljs
(ns app.recipes.views.publish-recipe (:require [reagent.core :as r] [re-frame.core :as rf] [app.components.modal :refer [modal]] [app.components.form-group :refer [form-group]] [app.helpers :as h] ["@smooth-ui/core-sc" :refer [Button Box]])) (defn publish-r...
null
https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/59-on-key-up/src/app/recipes/views/publish_recipe.cljs
clojure
(ns app.recipes.views.publish-recipe (:require [reagent.core :as r] [re-frame.core :as rf] [app.components.modal :refer [modal]] [app.components.form-group :refer [form-group]] [app.helpers :as h] ["@smooth-ui/core-sc" :refer [Button Box]])) (defn publish-r...
0017975ceac0a54a463e7d0fc3b180c91d9c092dc0e444ef2546041b7a57710e
patricoferris/ocaml-multihash
test.ml
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multihash/d59d9d4f4a8453ae81af18e040676710dcdf7fc3/test/multihash/test.ml
ocaml
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
72cd56655c5b275568e0c446240aa1c5a5bb82d60dc31dec9f95ff5062d3d790
HugoPeters1024/hs-sleuth
Fusion.hs
# LANGUAGE BangPatterns , MagicHash # -- | -- Module : Data.Text.Internal.Fusion Copyright : ( c ) 2008 - 2009 , ( c ) 2009 - 2010 , ( c ) 2009 -- -- License : BSD-style -- Maintainer : -- Stability : experimental Portability : GHC -- -- /Warning/: this is an i...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.4.0/Data/Text/Internal/Fusion.hs
haskell
| Module : Data.Text.Internal.Fusion License : BSD-style Maintainer : Stability : experimental /Warning/: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk! Text ma...
# LANGUAGE BangPatterns , MagicHash # Copyright : ( c ) 2008 - 2009 , ( c ) 2009 - 2010 , ( c ) 2009 Portability : GHC module Data.Text.Internal.Fusion ( Stream(..) , Step(..) , stream , unstream , reverseStream , length , reverse ,...
82615d1cab169e0b886ff5a0f666ef38e156dcf00534776f5a66ee80cd315e41
CryptoKami/cryptokami-core
ServerSpec.hs
-- | This module is testing the server api. # LANGUAGE TypeFamilies # module Test.Pos.Explorer.Web.ServerSpec ( spec ) where import Universum import Test.Hspec (Spec, describe, shouldBe) import Test.Hspec.QuickCheck (modifyMaxSuccess, prop) import Test.QuickChec...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/explorer/test/Test/Pos/Explorer/Web/ServerSpec.hs
haskell
| This module is testing the server api. -------------------------------------------------------------- -------------------------------------------------------------- stack test cryptokami-sl-explorer --fast --test-arguments "-m Pos.Explorer.Web.Server" | A spec with the following test invariant. If a block is gener...
# LANGUAGE TypeFamilies # module Test.Pos.Explorer.Web.ServerSpec ( spec ) where import Universum import Test.Hspec (Spec, describe, shouldBe) import Test.Hspec.QuickCheck (modifyMaxSuccess, prop) import Test.QuickCheck (arbitrary, counterexample, forAll, (==>))...
f141aab8ea39a6d3ae536193f0d43acff6798b6686e9ec043871cd10c07ad7f5
synduce/Synduce
max_in_um_pos.ml
* @synduce -NBl --no - lifting (* A data type representing lists in a tree format, where the list elements are kept where the list is "split" as opposed to concat-lists where all the elements are in the leaves. *) type ulist = | UNil | UElt of int | USplit of ulist * int * int * ulist (* The usual type of...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/unimodal_list/max_in_um_pos.ml
ocaml
A data type representing lists in a tree format, where the list elements are kept where the list is "split" as opposed to concat-lists where all the elements are in the leaves. The usual type of cons-lists Representation function from ulist -> list Invariant: unimodal list
* @synduce -NBl --no - lifting type ulist = | UNil | UElt of int | USplit of ulist * int * int * ulist type list = | Nil | Cons of int * list let rec repr = function | UNil -> Nil | UElt a -> Cons (a, Nil) | USplit (x, a, b, y) -> aux (Cons (a, Cons (b, repr y))) x and aux l = function | UNil -> ...
87b38a5dc06d6de9708f3d52e8c956b8eee2797dc4e95d56debbf150cbcae376
mzp/coq-ruby
heads.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/library/heads.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** $Id: heads.ml 11282 2008-07-28 11:5...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Nam...
75f03cb5c17c49858a4d8011dda03e4806f304bef43de02b741fa68227361270
roboli/clerk
project.clj
(defproject org.clojars.roboli/clerk "0.1.0-SNAPSHOT" :description "Syntatic sugar over Secretary router to make it Om ready." :url "" :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-2755"] [om "0.7.3"] [com.facebook/react "0.11.2"] ...
null
https://raw.githubusercontent.com/roboli/clerk/110c8f2477b4f32eae8ed26b04e9e56aef000ecf/project.clj
clojure
examples
(defproject org.clojars.roboli/clerk "0.1.0-SNAPSHOT" :description "Syntatic sugar over Secretary router to make it Om ready." :url "" :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-2755"] [om "0.7.3"] [com.facebook/react "0.11.2"] ...
e35b03449b5f7b170d377542f1e36d3d08566bcae0d9060fd287e3b741406acd
7theta/via
dev.cljs
(ns dev (:require [helix.experimental.refresh :as r])) (r/inject-hook!) (defn ^:dev/after-load refresh [] (r/refresh!))
null
https://raw.githubusercontent.com/7theta/via/8e13308e6859d2e13f3f324baa6bd04092891640/dev/dev.cljs
clojure
(ns dev (:require [helix.experimental.refresh :as r])) (r/inject-hook!) (defn ^:dev/after-load refresh [] (r/refresh!))
f4cbe73ee5577b5e853f0a3a892ee97930a056eb377520ac8cc750e484d32be9
penpot/penpot
notifications.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.notifications (:require [app.common.data :as d] [app.common.pages.changes-...
null
https://raw.githubusercontent.com/penpot/penpot/31661d5484760e158ef02e8237ab7a56bc8e4a06/frontend/src/app/main/data/workspace/notifications.cljs
clojure
Copyright (c) KALEIDOS INC Send the subscription message Subscribe to notifications of the subscription On reconnect, send again the subscription messages Emit presence event for current user; this is because websocket server don't emits this for the same user. Emit to all other connected users the current poi...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.notifications (:require [app.common.data :as d] [app.common.pages.changes-spec :as pcs] [app.common.spec...