_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
7b4a14da4b05bcd00d52da26330520d9702b9351036ba0f566090431b0e2ec6d
janegca/htdp2e
Exercise-022-StringDeleteFn.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-022-StringDeleteFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htd...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/Exercise-022-StringDeleteFn.rkt
racket
about the language level of this file in a form that our tools can easily process. Define the function string-delete, which consumes a string and a number i and which deletes the ith position from str. Assume i is a number between 0 (inclusive) and the length of the given string (exclusive)
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-022-StringDeleteFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeati...
f2baa1238822dbc96fcc6c44b36fcc5b70e3e1f32c55ab5b26a3aee067e6cb05
well-typed/ghc-events-analyze
Types.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE TemplateHaskell # module GHC.RTS.Events.Analyze.Types ( -- * Events EventId(..) , EventLabel , EventSubscript , isUserEvent , isThreadEvent , parseUserEvent , showEventI...
null
https://raw.githubusercontent.com/well-typed/ghc-events-analyze/f606fe6a427d5fb2fdf2d02d80153f3a1dc26944/src/GHC/RTS/Events/Analyze/Types.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # * Events * Options * Analysis state ** EventAnalysis lenses * Analysis result ------------------------------------------------------------------------------ Event identifiers ------------------------------------------------------------------------------ ...
# LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # # LANGUAGE TemplateHaskell # module GHC.RTS.Events.Analyze.Types ( EventId(..) , EventLabel , EventSubscript , isUserEvent , isThreadEvent , parseUserEvent , showEventId , TimelineGranularity(..) , Options(..) , RunningThreads , ThreadLabels ...
396f672f0468d786bd37225b139756ca94c3c6f829e6bbb7ccb3a866da121d4f
coq/bot
GraphQL_query.mli
val send_graphql_query : bot_info:Bot_info.t -> ?extra_headers:(string * string) list -> api:[`GitHub | `GitLab] -> query:string -> parse:(Yojson.Basic.t -> 'a) -> Yojson.Basic.t -> ('a, string) result Lwt.t
null
https://raw.githubusercontent.com/coq/bot/28fb867c11dec423e985c898306ae699b33feea9/bot-components/GraphQL_query.mli
ocaml
val send_graphql_query : bot_info:Bot_info.t -> ?extra_headers:(string * string) list -> api:[`GitHub | `GitLab] -> query:string -> parse:(Yojson.Basic.t -> 'a) -> Yojson.Basic.t -> ('a, string) result Lwt.t
68897418260913e53b666ec21c4b65409f3bb52b8b8ab6835d929d3cebcaa679
drewolson/aoc-hs
Day18.hs
module Aoc.Year2021.Day18 ( part1, part2, ) where import Aoc.Parser (Parser, intP, runParser') import Control.Applicative ((<|>)) import Control.Monad (guard) import Data.List (foldl1') import Text.Megaparsec (sepEndBy1) import Text.Megaparsec.Char (char, newline) data SnailFish = Reg Int | Pair SnailFish...
null
https://raw.githubusercontent.com/drewolson/aoc-hs/21dccabd4793518cde4ee76707d9aba4582feb30/aoc-year2021/src/Aoc/Year2021/Day18.hs
haskell
module Aoc.Year2021.Day18 ( part1, part2, ) where import Aoc.Parser (Parser, intP, runParser') import Control.Applicative ((<|>)) import Control.Monad (guard) import Data.List (foldl1') import Text.Megaparsec (sepEndBy1) import Text.Megaparsec.Char (char, newline) data SnailFish = Reg Int | Pair SnailFish...
b560dd1f776928d63db32865b2dda9311a67ceb2157c2e017ed95a4473734619
pdincau/badalisk
badalisk.erl
%%%------------------------------------------------------------------- %%% File : badalisk.erl Author : > %%% Description : %%% Created : 16 Apr 2011 by > %%%------------------------------------------------------------------- -module(badalisk). -behaviour(application). %% Application callbacks -expo...
null
https://raw.githubusercontent.com/pdincau/badalisk/ba08c63f0e09294a1719c2af1610bc4e91f99436/src/badalisk.erl
erlang
------------------------------------------------------------------- File : badalisk.erl Description : ------------------------------------------------------------------- Application callbacks ==================================================================== Application callbacks ============================...
Author : > Created : 16 Apr 2011 by > -module(badalisk). -behaviour(application). -export([start/2, stop/1]). Function : start(Type , ) - > { ok , Pid } | { ok , Pid , State } | OTP design principles as a supervision tree , this means starting the start(_Type,...
b8ed606b1be054b30eae683ea9625d7ccb8237a87947b88627939b5d64992c8a
borkdude/deps.clj
changelog.clj
#!/usr/bin/env bb (ns changelog (:require [clojure.string :as str])) (let [changelog (slurp "CHANGELOG.md") replaced (str/replace changelog #" #(\d+)" (fn [[_ issue after]] (format " [#%s]()%s" ...
null
https://raw.githubusercontent.com/borkdude/deps.clj/c8c4d79c5fd8cb1d6e8daec4eec7b0a4d739f36c/script/changelog.clj
clojure
#!/usr/bin/env bb (ns changelog (:require [clojure.string :as str])) (let [changelog (slurp "CHANGELOG.md") replaced (str/replace changelog #" #(\d+)" (fn [[_ issue after]] (format " [#%s]()%s" ...
64e35d52877c9b5f86083f6e47cb3d43882aa71f125ca2fa612e5edeef707248
soulomoon/SICP
Exercise4.32.scm
Exercise 4.32 : Give some examples that illustrate the difference between the streams of Chapter 3 and the “ lazier ” lazy lists described in this section . How can you take advantage of this extra laziness ? ; both car and cdr is delayed ; which means you can define somthing like this (define (test) (define a co...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.32.scm
scheme
both car and cdr is delayed which means you can define somthing like this easier for simultaneous
Exercise 4.32 : Give some examples that illustrate the difference between the streams of Chapter 3 and the “ lazier ” lazy lists described in this section . How can you take advantage of this extra laziness ? (define (test) (define a cons(c c)) (define c 2) a )
24424a93b708ac928234992f0ec6fd54b7111c7d0333c8b4d4f75d52bec0ecb2
adomokos/haskell-katas
Ex01_ListsExtractingSpec.hs
module Ex01_ListsExtractingSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Extracting Portion of List" $ do it "finds the first element in a list" $ do pending [ 1,2,3,4,5 ] ` shouldBe ` 1 it "finds the tail part of a list" $ do pendi...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex01_ListsExtractingSpec.hs
haskell
module Ex01_ListsExtractingSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Extracting Portion of List" $ do it "finds the first element in a list" $ do pending [ 1,2,3,4,5 ] ` shouldBe ` 1 it "finds the tail part of a list" $ do pendi...
77ea4d3c8451d38d135e01c08304fcb9a3f2124ebee08f19796e0df1982caf16
nponeccop/HNC
TypeParser.hs
module Test.TypeParser (tests, iotests) where import Test.HUnit import FFI.TypeParser import Utils import SPL.Types import FFI.Visualise import SPL.Top import Test.ParserTest (parserTest) t a b c d = st a b $ sp3 c d t1 name = t ("full-" ++ name ++ ": " ++ showType tt) (name, tt) decl $ name ++ " = " ++ showType tt...
null
https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/Test/TypeParser.hs
haskell
module Test.TypeParser (tests, iotests) where import Test.HUnit import FFI.TypeParser import Utils import SPL.Types import FFI.Visualise import SPL.Top import Test.ParserTest (parserTest) t a b c d = st a b $ sp3 c d t1 name = t ("full-" ++ name ++ ": " ++ showType tt) (name, tt) decl $ name ++ " = " ++ showType tt...
0df881a2622f24c33faca3c221bec71d55541220409c312bdee0116f15de45d9
tejasbubane/haskell-book-code
Main.hs
module Main where import DogsRule import Hello import System.IO main :: IO () main = do do not buffer(defer ) stdout(putStr ) hSetBuffering stdout NoBuffering putStr "Please input your name: " name <- getLine sayHello name dogs
null
https://raw.githubusercontent.com/tejasbubane/haskell-book-code/deaac8ab4db0ae8692d0278826528bb8a746ed82/ch-13/hello/exe/Main.hs
haskell
module Main where import DogsRule import Hello import System.IO main :: IO () main = do do not buffer(defer ) stdout(putStr ) hSetBuffering stdout NoBuffering putStr "Please input your name: " name <- getLine sayHello name dogs
731b103e04a8316d3ec614c7359ecaab629c4fc71a2ef04e818b07bdc0743546
dyoo/ragg
test-lexer.rkt
#lang racket/base (require ragg/rules/lexer rackunit parser-tools/lex) (define (l s) (define t (lex/1 (open-input-string s))) (list (token-name (position-token-token t)) (token-value (position-token-token t)) (position-offset (position-token-start-pos t)) (position-offset ...
null
https://raw.githubusercontent.com/dyoo/ragg/9cc648e045f7195702599b88e6b8db9364f88302/ragg/test/test-lexer.rkt
racket
WARNING: the offsets are not in terms of file positions. So they
#lang racket/base (require ragg/rules/lexer rackunit parser-tools/lex) (define (l s) (define t (lex/1 (open-input-string s))) (list (token-name (position-token-token t)) (token-value (position-token-token t)) (position-offset (position-token-start-pos t)) (position-offset ...
2ec068cd6cb07303db7ff68ff9cae4e49434857b73e1c1d12d12db00067c75f1
tomlokhorst/language-cil
07_ByRef.hs
module Example where import Language.Cil main = putStr (pr ass "") ass :: Assembly ass = Assembly [mscorlibRef] "Example" [hello] hello :: TypeDef hello = classDef [CaPublic] "Haskell.Ehc.Hello" noExtends noImplements [] [myMain, updateRef] [myClass] myMain :: MethodDef myMain = Method [MaStatic, ...
null
https://raw.githubusercontent.com/tomlokhorst/language-cil/9e8693a311d9ee66a4421224f1db82083c96b192/examples/07_ByRef.hs
haskell
module Example where import Language.Cil main = putStr (pr ass "") ass :: Assembly ass = Assembly [mscorlibRef] "Example" [hello] hello :: TypeDef hello = classDef [CaPublic] "Haskell.Ehc.Hello" noExtends noImplements [] [myMain, updateRef] [myClass] myMain :: MethodDef myMain = Method [MaStatic, ...
f9db9b03809b7a22caf912e787ab8a96bdfb8b2218b78d25052c30f08dcd4a2b
wdebeaum/step
unreachable.lisp
;;;; ;;;; W::unreachable ;;;; (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::unreachable (SENSES ((EXAMPLE "the server is unreachable") (meta-data :origin task-learning :entry-date 20050829 :change-date nil :wn ("unreachable%5:00:00:inaccessible:00") :comments nil) (lf-parent ont::...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/unreachable.lisp
lisp
W::unreachable
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::unreachable (SENSES ((EXAMPLE "the server is unreachable") (meta-data :origin task-learning :entry-date 20050829 :change-date nil :wn ("unreachable%5:00:00:inaccessible:00") :comments nil) (lf-parent ont::not-accessible-val) (TEMP...
b296670d71890731ccda3d975ed0ba3f1b265616a3f05846199622697485e45e
ghosthamlet/algorithm-data-structure
knuth_morris_pratt.clj
(ns algorithm-data-structure.algorithms.string.knuth-morris-pratt) (declare build-pattern-table) (defn run [text word] (let [pattern-table (build-pattern-table word)] (loop [text-index 0 word-index 0] (if (= text-index (count text)) -1 (cond (= (nth text text-index) (n...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/string/knuth_morris_pratt.clj
clojure
(ns algorithm-data-structure.algorithms.string.knuth-morris-pratt) (declare build-pattern-table) (defn run [text word] (let [pattern-table (build-pattern-table word)] (loop [text-index 0 word-index 0] (if (= text-index (count text)) -1 (cond (= (nth text text-index) (n...
221144e885a355fcf0abe813ce5bb48b79c7d0afc40af69f60c40a87775202d9
charlieg/Sparser
co+pers+title-pp.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*- copyright ( c ) 1990,1991 Content Technologies Inc. -- all rights reserved ;;; ;;; File: "co+pers+title-pp" Module : " model forms;sl : whos news : acts : arg str : " version : March 1991 ( v1.8.1 ) (in-package :C...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/sl/Who's-News/acts/arg%20str/co%2Bpers%2Btitle-pp.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*- File: "co+pers+title-pp" e.g. "confirm" ----------------------- category for the verb ----------------------- ------------------------------------------ passive -- promote the internal argument ------------------------------------------ -------...
copyright ( c ) 1990,1991 Content Technologies Inc. -- all rights reserved Module : " model forms;sl : whos news : acts : arg str : " version : March 1991 ( v1.8.1 ) (in-package :CTI-source) (def-category job-event/co!__!pers!title-pp :lattice-position :non-terminal) (def-cfr j...
ed3545b96af174e98f1b87612b2dcd9af02684ea1dc0f2862afd4f5d0442118a
mateuszb/tls1.3
record.lisp
(in-package :tls) (defvar *mode*) (defvar *version*) (declaim (optimize (debug 3) (speed 0))) (define-binary-class tls-record () ((content-type u8 :initform +RECORD-INVALID+) (protocol-version u16 :initform +TLS-1.2+) (size u16))) (defun tls-content->class (content-type) (ecase content-type (20 'change...
null
https://raw.githubusercontent.com/mateuszb/tls1.3/bb6310c581106acd3f9143e3e1b40ff31f0ddff8/record.lisp
lisp
TLS 1.2 ECC related classes
(in-package :tls) (defvar *mode*) (defvar *version*) (declaim (optimize (debug 3) (speed 0))) (define-binary-class tls-record () ((content-type u8 :initform +RECORD-INVALID+) (protocol-version u16 :initform +TLS-1.2+) (size u16))) (defun tls-content->class (content-type) (ecase content-type (20 'change...
16766e6dd9c7680e2bbe82eac405df59a9aa09ae84d5317c5292028d2b2667cf
bcrafton/processor
runner.ml
open Unix open Filename open Str open Compile open Printf open OUnit2 open ExtLib open Lexing open Types open Pretty let either_printer e = match e with | Left(v) -> sprintf "Error: %s\n" v | Right(v) -> v let string_of_position p = sprintf "%s:line %d, col %d" p.pos_fname p.pos_lnum (p.pos_cnum - p.po...
null
https://raw.githubusercontent.com/bcrafton/processor/4f8e7b853eab6ec6586e7208c42f675e696c431f/compiler/runner.ml
ocaml
Read a file into a string
open Unix open Filename open Str open Compile open Printf open OUnit2 open ExtLib open Lexing open Types open Pretty let either_printer e = match e with | Left(v) -> sprintf "Error: %s\n" v | Right(v) -> v let string_of_position p = sprintf "%s:line %d, col %d" p.pos_fname p.pos_lnum (p.pos_cnum - p.po...
f74b4f42e1564b7cc6c7ff5dcc05fe8d534237dcdcea75c603ea4b7a613c7770
liqula/react-hs
Intl.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUA...
null
https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs/src/React/Flux/Addons/Intl.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE EmptyDataDecls # # LANGUAGE OverloadedStrings # formatting of numbers, dates, times, relative times, pluralization, and translated messages. This library can be used for formatting and pluralization even if you intend to present your application in a single language and locale. ...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE S...
b667a47b127f8bb68b4ddf241f133be9e3c0fdb0dee46800d5ac6c7a54299ac1
emqx/emqx
emqx_quic_data_stream.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/a2762e5a378f5163f2d879dd7bb7acf2ba29da4b/apps/emqx/src/emqx_quic_data_stream.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_quic_data_stream). -ifndef(BUILD_WITHOUT_QUIC). -behaviour(quicer_remote_stream)....
c28276ae3270d629e5cc531dde4c13a57a0db4c68311a653d87f74c6202d15d3
whamtet/Excel-REPL
util.clj
(ns excel-repl.util) (import System.Windows.Forms.Clipboard) (defn comma-interpose [s] (apply str (interpose ", " s))) (defn line-interpose [s] (apply str (interpose "\r\n" s))) (defn to-clipboard [s] (Clipboard/SetText s))
null
https://raw.githubusercontent.com/whamtet/Excel-REPL/cae2ef8e423e2f2723c60e4758785973f06c6ba4/Excel-REPL/nrepl/excel_repl/util.clj
clojure
(ns excel-repl.util) (import System.Windows.Forms.Clipboard) (defn comma-interpose [s] (apply str (interpose ", " s))) (defn line-interpose [s] (apply str (interpose "\r\n" s))) (defn to-clipboard [s] (Clipboard/SetText s))
b42d4437eb90e245d8cd7d1c753ea428b6f11c4e2955d2f6b255ed8f2d10a7ea
tomatoes-app/tomatoes-repl
Tomatoes.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # module Tomatoes ( repl, getInitialState ) where import Control.Concurrent (threadDelay, forkIO) import Control.Concurrent.STM (TVar, newTVarIO, atomically, readTVar, modifyTVar) import Control.Exception (SomeException, try) import Control.Monad (v...
null
https://raw.githubusercontent.com/tomatoes-app/tomatoes-repl/e4217208820afad9faad165f21cfecc8ce770daf/src/Tomatoes.hs
haskell
# LANGUAGE OverloadedStrings # | The REPL state. define an explicit show instance because manager doesn't implement it | Returns a sound's filename | Returns a formatted pomodoro time. TODO: add completion function, see TODO: use getInputLineWithInitial, see /~ghc/8.2.1/docs/html/libraries/haskeline-0.7.4.0/Syst...
# LANGUAGE FlexibleContexts # module Tomatoes ( repl, getInitialState ) where import Control.Concurrent (threadDelay, forkIO) import Control.Concurrent.STM (TVar, newTVarIO, atomically, readTVar, modifyTVar) import Control.Exception (SomeException, try) import Control.Monad (void, when) import Control.Monad.Tra...
db296f23a64f7fe4baad8a3da122528225d840c1786049e940be320d9b17e984
input-output-hk/plutus
SatInt.hs
-- editorconfig-checker-disable-file | Adapted from ' Data . SafeInt ' to perform saturating arithmetic ( i.e. returning max or min bounds ) instead of throwing on overflow . This is not quite as fast as using ' Int ' or ' Int64 ' directly , but we need the safety . Adapted from 'Data.SafeInt' to perform satur...
null
https://raw.githubusercontent.com/input-output-hk/plutus/59aeb3e666d00be762d68d87f5e4803eedaf75d2/plutus-core/satint/src/Data/SatInt.hs
haskell
editorconfig-checker-disable-file # LANGUAGE BangPatterns # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # but putting it off for now. For reading cost model data from CSV input | In the `Num' instance, we plug in our own addition, multiplication and subtracti...
| Adapted from ' Data . SafeInt ' to perform saturating arithmetic ( i.e. returning max or min bounds ) instead of throwing on overflow . This is not quite as fast as using ' Int ' or ' Int64 ' directly , but we need the safety . Adapted from 'Data.SafeInt' to perform saturating arithmetic (i.e. returning max ...
f81293422e7e82643004c9f83b4dd97097da4d8f34ffb62d153818b6f5feb93a
exercism/scheme
difference-of-squares.scm
(import (rnrs)) (define (square-of-sum n) 'implement-me!) (define (sum-of-squares n) 'implement-me!) (define (difference-of-squares n) 'implement-me!)
null
https://raw.githubusercontent.com/exercism/scheme/bad074a0b46c05820c2a0397ff922499087d8ea0/exercises/practice/difference-of-squares/difference-of-squares.scm
scheme
(import (rnrs)) (define (square-of-sum n) 'implement-me!) (define (sum-of-squares n) 'implement-me!) (define (difference-of-squares n) 'implement-me!)
d6e72e7977bed00dad0a80fcbb0f4e7b30c5d27887788a7a186bf894935ed4cb
racket/frtime
graphics.rkt
#lang racket/base (require racket/unit "graphics-sig.rkt") (provide-signature-elements graphics:posn^ graphics:posn-less^) (require racket/gui/base "graphics-unit.rkt") (define-values/invoke-unit/infer graphics@)
null
https://raw.githubusercontent.com/racket/frtime/9b9db67581107f4d7b995541c70f2d08f03ae89e/animation/graphics.rkt
racket
#lang racket/base (require racket/unit "graphics-sig.rkt") (provide-signature-elements graphics:posn^ graphics:posn-less^) (require racket/gui/base "graphics-unit.rkt") (define-values/invoke-unit/infer graphics@)
d322392cacc8f073ce79edf86b3f5b600ffad9a884248414b4d6e8a9e3f449fd
Deewiant/glob
Utils.hs
# LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # File created : 2008 - 10 - 10 13:40:35 module System.FilePath.Glob.Utils ( isLeft, fromLeft , increasingSeq , addToRange, inRange, overlap , dropLeadingZeroes , pathParts , nubOrd , partitionDL, tailDL , getRecursiveContents , catchIO ...
null
https://raw.githubusercontent.com/Deewiant/glob/4521e278faaa7163cd661fc8987710db4f32e62a/System/FilePath/Glob/Utils.hs
haskell
returns Just (a range which covers both given ranges) or Nothing if they are disjoint. fst of result is in reverse order so that: If x = fst (increasingSeq (a:xs)), then x == reverse [a .. head x] Significantly speedier than System.Directory.doesDirectoryExist. This one allocates more memory since it has to do...
# LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # File created : 2008 - 10 - 10 13:40:35 module System.FilePath.Glob.Utils ( isLeft, fromLeft , increasingSeq , addToRange, inRange, overlap , dropLeadingZeroes , pathParts , nubOrd , partitionDL, tailDL , getRecursiveContents , catchIO ...
df73e45768a9a46e503d195697feb3f95e4590c9954338f1daa2964101a56667
OlafChitil/hat
Exit.hs
module Hat.System.Exit (ExitCode(ExitSuccess, ExitFailure), aExitSuccess, aExitFailure, gexitWith, aexitWith, hexitWith, gexitFailure, gexitSuccess) where import qualified Prelude import qualified Hat.Hat as T import qualified Hat.PreludeBasic import qualified Hat.PreludeBuiltinTypes impor...
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/System/Exit.hs
haskell
module Hat.System.Exit (ExitCode(ExitSuccess, ExitFailure), aExitSuccess, aExitFailure, gexitWith, aexitWith, hexitWith, gexitFailure, gexitSuccess) where import qualified Prelude import qualified Hat.Hat as T import qualified Hat.PreludeBasic import qualified Hat.PreludeBuiltinTypes impor...
971b9c58dea03e7b20ad66d66307c132e4dc037ddcec994a2000349646d7d6bd
auser/beehive
beehive_bee_object_test.erl
-module (beehive_bee_object_test). -include ("beehive.hrl"). -include_lib("eunit/include/eunit.hrl"). -define (DEBUG, false). -define (CLEANUP, fun() -> case ?DEBUG of false -> lists:map(fun(Dir) -> clean_up_dir(Dir) end, ["squashed", "run"]); true -> ok end end()). -define (DEBUG_PRINT (Str), fun()...
null
https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/test/beehive/beehive_bee_object_test.erl
erlang
Type tests ,fun git_clone_with_errors/0 Update the repos Pull one with a specific revision Do run it with an after command let it work Run it with a before Untar and ensure the file is there git_clone_with_errors() -> % Non-existing url ?DEBUG_PRINT({git_clone_with_errors}), Pid = spawn(fun() -> respo...
-module (beehive_bee_object_test). -include ("beehive.hrl"). -include_lib("eunit/include/eunit.hrl"). -define (DEBUG, false). -define (CLEANUP, fun() -> case ?DEBUG of false -> lists:map(fun(Dir) -> clean_up_dir(Dir) end, ["squashed", "run"]); true -> ok end end()). -define (DEBUG_PRINT (Str), fun()...
ded67ce735207af98cf6f3e523f18277e8268b182bfca4142c80a7bd2234eced
basho/riak_search
riak_search_repl_helper.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved . %% %% ------------------------------------------------------------------- -module(riak_search_repl_helper). -export([send_realtime/2, send/2, recv/1]). send_realtim...
null
https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/riak_search_repl_helper.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- is the search hook installed, or is this a proxy object if either is true, invoke the special search handling rules
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved . -module(riak_search_repl_helper). -export([send_realtime/2, send/2, recv/1]). send_realtime(Obj, _C) -> Bucket = riak_object:bucket(Obj), case Bucket of <<"_rsid_", B/binary>> -> SearchBucketProps = riak_core_b...
e4d03595e3a3371baaf6c5a0f2e107ba4bec859fb0cd179624a9da3589e8f943
diagrams/diagrams-lib
BBTest.hs
import Test.QuickCheck import Diagrams.BoundingBox instance Arbitrary (NonEmptyBoundingBox Q2) where arbitrary = do p <- arbitrary PosVec v <- arbitrary return $ NonEmptyBoundingBox p (p .+^ v)
null
https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/test/BBTest.hs
haskell
import Test.QuickCheck import Diagrams.BoundingBox instance Arbitrary (NonEmptyBoundingBox Q2) where arbitrary = do p <- arbitrary PosVec v <- arbitrary return $ NonEmptyBoundingBox p (p .+^ v)
343d34019ac80c06cb45e35fd40afccc84f4f2526bed5ab786285198b3eb9184
nasa/Common-Metadata-Repository
util.clj
(ns cmr.mission-control.components.util (:require [taoensso.timbre :as log])) (defn component->system "" [component type] (if (contains? component type) component {type component})) (defn pubsub-component->system [component] (component->system component :pubsub))
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/mission-control/src/cmr/mission_control/components/util.clj
clojure
(ns cmr.mission-control.components.util (:require [taoensso.timbre :as log])) (defn component->system "" [component type] (if (contains? component type) component {type component})) (defn pubsub-component->system [component] (component->system component :pubsub))
07229f8c6c56b9880a16708523f88a67a4420af3c2409af6e3f388bb372d3d83
JanAhrens/yesod-oauth-demo
TestImport.hs
{-# LANGUAGE OverloadedStrings #-} module TestImport ( module Yesod.Test , runDB , Specs , OAuthToken ) where import Yesod.Test import Database.Persist.GenericSql import OAuthToken type Specs = SpecsConn Connection runDB :: SqlPersist IO a -> OneSpec Connection a runDB = runDBRunner runSqlPool
null
https://raw.githubusercontent.com/JanAhrens/yesod-oauth-demo/0966dc7907c35ce483f4842752dd89e8da84c542/tests/TestImport.hs
haskell
# LANGUAGE OverloadedStrings #
module TestImport ( module Yesod.Test , runDB , Specs , OAuthToken ) where import Yesod.Test import Database.Persist.GenericSql import OAuthToken type Specs = SpecsConn Connection runDB :: SqlPersist IO a -> OneSpec Connection a runDB = runDBRunner runSqlPool
d73b359a90a4e1d020b0179840b191534fbf286a8e9989058823ddcd8536d8db
Rober-t/apxr_run
substrate_cep_test.erl
-module(substrate_cep_test). -include_lib("eunit/include/eunit.hrl"). %% runners substrate_cep_test_() -> {setup, fun setup/0, fun cleanup/1, [ fun substrate_cep_set_weight_subtest/0, fun substrate_cep_set_abcn_subtest/0, fun substrate_cep_delta_weight_subtest/0 ]}. %% tests substrate_cep...
null
https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/test/substrate_cep_test.erl
erlang
runners tests start/2 init_phase2/8 forward/3 start/2 init_phase2/8 forward/3 start/2 init_phase2/8 forward/3 helpers
-module(substrate_cep_test). -include_lib("eunit/include/eunit.hrl"). substrate_cep_test_() -> {setup, fun setup/0, fun cleanup/1, [ fun substrate_cep_set_weight_subtest/0, fun substrate_cep_set_abcn_subtest/0, fun substrate_cep_delta_weight_subtest/0 ]}. substrate_cep_set_weight_subtest(...
7f0706979fd116cdce961e52dee74c19cd4908c540329bd78836ccb7fb03e77d
DavidAlphaFox/egame
thrift_http_transport.erl
%% Licensed to the Apache Software Foundation ( ASF ) under one %% or more contributor license agreements. See the NOTICE file %% distributed with this work for additional information %% regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the %% "License"); you ...
null
https://raw.githubusercontent.com/DavidAlphaFox/egame/b00293964f309eb4f7458d9610a5ec8dd18ea062/src/thrift/thrift_http_transport.erl
erlang
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 require...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(thrift_http_transport). -behaviour(thrift_transport). -export([new/2, ...
3821afc7a3e1bb0b8decae38c7ef38f122c2508c5b19c827c5a4a9ff584cdc1c
ocurrent/ocurrent
process.mli
val pp_cmd : Format.formatter -> Lwt_process.command -> unit val exec : ?cwd:Fpath.t -> ?stdin:string -> ?pp_cmd:(Format.formatter -> Lwt_process.command -> unit) -> ?pp_error_command:(Format.formatter -> unit) -> cancellable:bool -> job:Job.t -> Lwt_process.command -> unit Current_term.S.or_error Lwt.t val...
null
https://raw.githubusercontent.com/ocurrent/ocurrent/72dc45330af37cd626a3f2a1cc87e198de343229/lib/process.mli
ocaml
val pp_cmd : Format.formatter -> Lwt_process.command -> unit val exec : ?cwd:Fpath.t -> ?stdin:string -> ?pp_cmd:(Format.formatter -> Lwt_process.command -> unit) -> ?pp_error_command:(Format.formatter -> unit) -> cancellable:bool -> job:Job.t -> Lwt_process.command -> unit Current_term.S.or_error Lwt.t val...
97053da2da4a27abc58432e067c4f3ce8c98529659092aa268d0747a390b1ef5
hercules-ci/hercules-ci-agent
Tasks.hs
# LANGUAGE DataKinds # module Hercules.API.Agent.Tasks where import Data.Aeson (Object) import Hercules.API.Prelude import qualified Hercules.API.Task as Task import Hercules.API.TaskStatus import Servant.API data TasksAPI auth f = TasksAPI { tasksReady :: f :- "tasks" :> auth :> ...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/3aaa80c8fe8cd252b656d40eeec2428afe884c07/hercules-ci-api-agent/src/Hercules/API/Agent/Tasks.hs
haskell
# LANGUAGE DataKinds # module Hercules.API.Agent.Tasks where import Data.Aeson (Object) import Hercules.API.Prelude import qualified Hercules.API.Task as Task import Hercules.API.TaskStatus import Servant.API data TasksAPI auth f = TasksAPI { tasksReady :: f :- "tasks" :> auth :> ...
42fbe9f0911a8dd6b86bece16d368a9e30297c5da023d62ae1db01d8a7efbb3f
clojure-interop/aws-api
AmazonWorkspacesClient.clj
(ns com.amazonaws.services.workspaces.AmazonWorkspacesClient "Client for accessing Amazon WorkSpaces. All service calls made using this client are blocking, and will not return until the service call completes. Amazon WorkSpaces Service Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workspaces/src/com/amazonaws/services/workspaces/AmazonWorkspacesClient.clj
clojure
(ns com.amazonaws.services.workspaces.AmazonWorkspacesClient "Client for accessing Amazon WorkSpaces. All service calls made using this client are blocking, and will not return until the service call completes. Amazon WorkSpaces Service Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft...
28731fd29d14179163b72de8f390d428ad72385c0ad2d33815efc99ebf8f7a52
Licenser/ecrdt
vgcounter.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2013 , Heinz Nikolaus Gies %%% @doc An implementation of the GCounter ( grow only counter ) CvRDT using %%% an known set of masters identified by a direct mapping to integer %%% id's (1...N). %%% @end Created : 1 Jun...
null
https://raw.githubusercontent.com/Licenser/ecrdt/2024b465f4fdf3fb3d2a16679f9aee6c06e62ea4/src/vgcounter.erl
erlang
------------------------------------------------------------------- @doc an known set of masters identified by a direct mapping to integer id's (1...N). @end ------------------------------------------------------------------- =================================================================== Implementation ======...
@author < > ( C ) 2013 , Heinz Nikolaus Gies An implementation of the GCounter ( grow only counter ) CvRDT using Created : 1 Jun 2013 by < > -module(vgcounter). -behaviour(ecrdt). -ifdef(TEST). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -endif. -export([is_...
77bb48fae4ba3b6ede84fb81091c9bb98832a724b5a3dd896e320a7cf023c177
kkd26/SiFun
utils.ml
let ( $ ) f g x = f (g x) let getPositionString (position : Lexing.position) = Printf.sprintf "File \"%s\", line %d, character %d:" position.pos_fname position.pos_lnum (position.pos_cnum - position.pos_bol) let lexerErrorMessage (line : Lexing.lexbuf) msg = let position = line.lex_curr_p in Printf.spri...
null
https://raw.githubusercontent.com/kkd26/SiFun/787f5842cb9f12d5f4686409be3ee27a8b8a1d22/lib/utils.ml
ocaml
* Parses a string into a list of AST * Prints formatted AST on the screen * Prints formatted AST after transforming it into the de Bruijn indices
let ( $ ) f g x = f (g x) let getPositionString (position : Lexing.position) = Printf.sprintf "File \"%s\", line %d, character %d:" position.pos_fname position.pos_lnum (position.pos_cnum - position.pos_bol) let lexerErrorMessage (line : Lexing.lexbuf) msg = let position = line.lex_curr_p in Printf.spri...
a7f5c7a270aae08b902afb3af53e87d8fc7af336eab5ca53502aa31c32a784a9
alt-romes/ghengin
Utils.hs
module Ghengin.Shader.Utils where import qualified FIR invLerp :: FIR.DivisionRing a => a -> a -> a -> a invLerp value from to = (value FIR.- from) FIR./ (to FIR.- from) lerp :: FIR.Ring a => a -> a -> a -> a lerp from to value = from FIR.+ (to FIR.- from) FIR.* value
null
https://raw.githubusercontent.com/alt-romes/ghengin/e19747bef4e3c7696702f4e660ed301c66143265/src/Ghengin/Shader/Utils.hs
haskell
module Ghengin.Shader.Utils where import qualified FIR invLerp :: FIR.DivisionRing a => a -> a -> a -> a invLerp value from to = (value FIR.- from) FIR./ (to FIR.- from) lerp :: FIR.Ring a => a -> a -> a -> a lerp from to value = from FIR.+ (to FIR.- from) FIR.* value
25a8334ab4b78cd23a330bbea7e700afd65ea1056c836b558063b371c3513795
chaoxu/fancy-walks
A.hs
{-# OPTIONS_GHC -O2 #-} import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control.Monad.State import Control.Monad import Control.Applicative import Data.ByteStri...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Practice%20Contests/Practice%20Contest/A.hs
haskell
# OPTIONS_GHC -O2 #
import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control.Monad.State import Control.Monad import Control.Applicative import Data.ByteString.Char8 (ByteString) im...
a603730d652296c4f6a0b1f7b5b4f996dcfc09f2eff52f99f9ea21241887b9e7
facebook/flow
autofix_unused_promise.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/121903ed0e5eb430c3248fb89ac3fa0f37002f1d/src/services/code_action/autofix_unused_promise.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
9f20e26d1d3cac6e70fb5455992e33eb8c6da16641bfa116918a9a4e0bac7b0b
noinia/hgeometry
IO.hs
# OPTIONS_GHC -fno - warn - orphans # -------------------------------------------------------------------------------- -- | Module : Data . PlaneGraph . IO Copyright : ( C ) -- License : see the LICENSE file Maintainer : -- -- Converting from/to Adjacency Representation of the plane grap...
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Data/PlaneGraph/IO.hs
haskell
------------------------------------------------------------------------------ | License : see the LICENSE file Converting from/to Adjacency Representation of the plane graph ------------------------------------------------------------------------------ $setup * Reading and Writing the Plane Graph to a fil...
# OPTIONS_GHC -fno - warn - orphans # Module : Data . PlaneGraph . IO Copyright : ( C ) Maintainer : module Data.PlaneGraph.IO readPlaneGraph , writePlaneGraph * Converting to and from Adjacency list representions , toAdjRep , fromAdjRep, fromAdjRep' , makeCCW ) where import ...
6f2df3bc2a07ba97e53a0ef96fdb689b5b49e716da8e5c2f7fd9c37fd9587088
mfikes/fifth-postulate
ns447.cljs
(ns fifth-postulate.ns447) (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/ns447.cljs
clojure
(ns fifth-postulate.ns447) (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...
c764f05d49d1fdf3eb938f7aaa5190031aac418bc6bbde13174295d630c9e9e5
rcherrueau/APE
sys11.rkt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Systems Programming with Racket ;; -lang.org/more/ ;; 11 . Continuations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang racket (require xml net/url) (require racket/control) ;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/sysProgInRacket/sys11.rkt
racket
Systems Programming with Racket -lang.org/more/ build-request-page: label next-url hidden -> xexpr The next-url argument is a destination for the form results. The hidden argument is a value to propagate throught the form as a hidden field. Hash Table for web dispatching Value is a lambda (list of (symbol ...
11 . Continuations #lang racket (require xml net/url) (require racket/control) Utils Consruct an HTML form . The label argument us a string to show the user . (define (build-request-page label next-url hidden) `(html (head (title "Enter a Number to Add")) (body (form ([action ,next-url] [method ...
bea9d89d20e106cff5e56ec2aaf4fd97fe09b14830f5230632fd4c4a7211b5a0
McCLIM/McCLIM
input-editing-drei.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) Copyright 2001 by < > ( c ) Copyright 2006 by < > ( c ) Copyright 2018 by ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/bc22a90d92d4f069eb6a12e38270fa687b9d907c/Core/clim/input-editing-drei.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Markers for noise strings i...
( c ) Copyright 2001 by < > ( c ) Copyright 2006 by < > ( c ) Copyright 2018 by < > Finalize input editing code by defining the stuff that actually needs a working loaded . (in-package #:clim-internals) (defclass standard-input-editing-stream (drei:drei-input-editing-mixin ...
baa7d7bec5463424b65be7267a01d21e008124eeedc3dec646506fe7c0cffb91
jeffshrager/biobike
packages.lisp
;; Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . ;; (in-package :cl-user) (defpackage :com.gigamonkeys.binary-data (:use :common-lisp :com.gigamonkeys.macro-utilities) (:export :define-binary-class :define-tagged-binary-class :define-binary-type :define-enumeratio...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/binary-data/packages.lisp
lisp
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . (in-package :cl-user) (defpackage :com.gigamonkeys.binary-data (:use :common-lisp :com.gigamonkeys.macro-utilities) (:export :define-binary-class :define-tagged-binary-class :define-binary-type :define-enumeration ...
9ad95b738d9343fcc87278973d83223866a91557afd38eb7c0be8926fd6d064a
cl-axon/cl-aima
perceptron.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; perceptron learning - single-layer neural networks make - perceptron returns a one - layer network with m units , n inputs each (defun make-perceptron (n m &optional (g #'(lambda (i) (step-function 0 i))) &aux (l nil)) (dotimes...
null
https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/learning/algorithms/perceptron.lisp
lisp
perceptron learning - single-layer neural networks perceptron-learning is the standard "induction algorithm" and interfaces to the learning-curve functions Perceptron updating - simple version without lower bound on delta
make - perceptron returns a one - layer network with m units , n inputs each (defun make-perceptron (n m &optional (g #'(lambda (i) (step-function 0 i))) &aux (l nil)) (dotimes (i m (list l)) (push (make-unit :parents (iota (1+ n)) :children nil :weights (random-weights (1+ n) -0.5 +0.5...
98d6cdce9b09f4ddea3e7d3cfee1d5f6565364c67c97476be807c9034d700c73
nunchaku-inria/nunchaku
Cardinal_encode.mli
(* This file is free software, part of nunchaku. See file "license" for more details. *) * { 1 Encode Cardinality Constraints into Formulas } * If we have some constraint [ max_card ty = 3 ] , we add an axiom [ exists a b c : ty . forall x : ty . ( x = a || x = b || x = c ) ] Similarly we can en...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/Cardinal_encode.mli
ocaml
This file is free software, part of nunchaku. See file "license" for more details.
* { 1 Encode Cardinality Constraints into Formulas } * If we have some constraint [ max_card ty = 3 ] , we add an axiom [ exists a b c : ty . forall x : ty . ( x = a || x = b || x = c ) ] Similarly we can encode minimum cardinality [ max_card ty = 3 ] into : [ exists a b c : ty . distinct(...
0cc372c31503220470de8523c9ae8bfac3081b0f53d45efaac917b87461a4853
kolmodin/spdy
Binary.hs
module Network.SPDY.Binary (streamInFrame, streamOutFrame) where -- haskell platform import Control.Monad.IO.Class (liftIO) import Data.Binary.Get import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L 3rd party import Data.Binary.Bits.Get import ...
null
https://raw.githubusercontent.com/kolmodin/spdy/e81cb708695e2f08426a2fe8f2dc30de89e7a6db/Network/SPDY/Binary.hs
haskell
haskell platform this library
module Network.SPDY.Binary (streamInFrame, streamOutFrame) where import Control.Monad.IO.Class (liftIO) import Data.Binary.Get import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L 3rd party import Data.Binary.Bits.Get import Data.Binary....
becf960c9e636d9ebc51e00e0a4610f4fee0b65d7fe8397a899216e4a455b93c
AndrasKovacs/setoidtt
Main.hs
module Main where main :: IO () main = pure ()
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/main/Main.hs
haskell
module Main where main :: IO () main = pure ()
a77bb60d4231790b3d48d9f3a21c3fe7f7f6260e99fa3914be171c533e7dddee
roman01la/minimax
source.clj
(ns minimax.audio.source (:require [minimax.audio.utils :as audio.utils] [minimax.mem :as mem] [minimax.util.fs :as util.fs]) (:import (java.io File) (java.nio IntBuffer ShortBuffer) (org.lwjgl.openal AL11) (org.lwjgl.stb STBVorbis STBVorbisInfo) (...
null
https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/minimax/audio/source.clj
clojure
Source
(ns minimax.audio.source (:require [minimax.audio.utils :as audio.utils] [minimax.mem :as mem] [minimax.util.fs :as util.fs]) (:import (java.io File) (java.nio IntBuffer ShortBuffer) (org.lwjgl.openal AL11) (org.lwjgl.stb STBVorbis STBVorbisInfo) (...
4daf3c611ba7257bff6b6b28917e20ee8ff01ddbf66a909b1a0518e3dc4dda75
jasonstolaruk/CurryMUD
Misc.hs
# LANGUAGE FlexibleContexts , LambdaCase , MultiWayIf , NamedFieldPuns , OverloadedStrings , TransformListComp , TupleSections , ViewPatterns # -- This module contains state-related functions used by multiple modules. module Mud.Data.State.Util.Misc ( addToInv , descMaybeId ...
null
https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Data/State/Util/Misc.hs
haskell
This module contains state-related functions used by multiple modules. ================================================== --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ...
# LANGUAGE FlexibleContexts , LambdaCase , MultiWayIf , NamedFieldPuns , OverloadedStrings , TransformListComp , TupleSections , ViewPatterns # module Mud.Data.State.Util.Misc ( addToInv , descMaybeId , descMaybeSingId , d...
e25dffb539fab62dba33e2084eb9499a7de8e4d5239b961e1f006306fcafb01c
walkable-server/realworld-fulcro
user.clj
(ns conduit.boundary.user (:require [buddy.hashers :as hashers] [clojure.java.jdbc :as jdbc] [duct.database.sql])) (defprotocol User (create-user [db user]) (find-login [db email password]) (update-user [db user-id user]) (follow [db follower-id followee-id]) (unfollow [db follower-...
null
https://raw.githubusercontent.com/walkable-server/realworld-fulcro/91c73e3a27621b528906d12bc22971caa9ea8d13/src/conduit/boundary/user.clj
clojure
(ns conduit.boundary.user (:require [buddy.hashers :as hashers] [clojure.java.jdbc :as jdbc] [duct.database.sql])) (defprotocol User (create-user [db user]) (find-login [db email password]) (update-user [db user-id user]) (follow [db follower-id followee-id]) (unfollow [db follower-...
082e0dc3f37ff61f49189ec70096e9a54b895e0acde4537ea5b598e103d0f4f1
quil-lang/cmu-infix
package.lisp
;;;; tests/package.lisp (fiasco:define-test-package #:cmu-infix-tests (:use #:cmu-infix) ;; tests.lisp (:export #:run-tests))
null
https://raw.githubusercontent.com/quil-lang/cmu-infix/da62fa3506e26e847239f54d4e58236565d3f259/tests/package.lisp
lisp
tests/package.lisp tests.lisp
(fiasco:define-test-package #:cmu-infix-tests (:use #:cmu-infix) (:export #:run-tests))
a2205f1060f9a052eb8f073b80ce78837f040fbbe2453f079bdd4c467ac5db56
reflectionalist/S9fES
c2html1.scm
#! /usr/local/bin/s9 -f ; c2html -- print C code to HTML By , 2009 - 2012 ; Placed in the Public Domain ; ; Usage: c2html [-dL] [file ...] ; ; Render C code contained in the given file. When no file is given , render stdin . Write output to stdout . ; ; Options: ; ; -d write a full HTML document (default: PRE ...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/prog/c2html1.scm
scheme
c2html -- print C code to HTML Placed in the Public Domain Usage: c2html [-dL] [file ...] Render C code contained in the given file. When no file Options: -d write a full HTML document (default: PRE block only) -L emit Lout output instead of HTML syntax highlighting. NOTE: This program handles only a s...
#! /usr/local/bin/s9 -f By , 2009 - 2012 is given , render stdin . Write output to stdout . The CSS2 style sheet " ccode.css " contains the default style for (load-from-library "c2html.scm") (load-from-library "parse-optionsb.scm") (define show-help (option #\h #f)) (define full-html (option #\d #f)...
14747091901fbb090ccf635e51d095e748e1b057a343d86da833116a5d8530ee
metabase/metabase
ldap.clj
(ns metabase-enterprise.enhancements.integrations.ldap "The Enterprise version of the LDAP integration is basically the same but also supports syncing user attributes." (:require [metabase.integrations.common :as integrations.common] [metabase.integrations.ldap.default-implementation :as default-impl] [met...
null
https://raw.githubusercontent.com/metabase/metabase/b1298421ac2d7b157bb3578ac1679a0da6ba8f9f/enterprise/backend/src/metabase_enterprise/enhancements/integrations/ldap.clj
clojure
TODO - maybe we want to add a csv setting type? Reload updated user
(ns metabase-enterprise.enhancements.integrations.ldap "The Enterprise version of the LDAP integration is basically the same but also supports syncing user attributes." (:require [metabase.integrations.common :as integrations.common] [metabase.integrations.ldap.default-implementation :as default-impl] [met...
499bc78e941869672f1f9b9b256311089982e3ccfba8c72a01b71205fbbc802f
oliyh/martian
test_runner.cljs
;; This test runner is intended to be run from the command line (ns martian.test-runner (:require [martian.vcr-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
null
https://raw.githubusercontent.com/oliyh/martian/c20d3fad47709ecfc0493e2fb607d5b56ea3193d/vcr/test/martian/test_runner.cljs
clojure
This test runner is intended to be run from the command line
(ns martian.test-runner (:require [martian.vcr-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
03e510b80977dfaef632ba37121530828cd02c9878a87f83b61c2125580827d8
expipiplus1/vulkan
VK_NV_glsl_shader.hs
{-# language CPP #-} -- | = Name -- VK_NV_glsl_shader - device extension -- -- == VK_NV_glsl_shader -- -- [__Name String__] -- @VK_NV_glsl_shader@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 13 -- -- [__Revision__] 1 -- -- [__Extension and Version Depende...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_NV_glsl_shader.hs
haskell
# language CPP # | = Name == VK_NV_glsl_shader [__Name String__] @VK_NV_glsl_shader@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] [__Deprecation state__] - /Deprecated/ without replacement [__Contact_...
VK_NV_glsl_shader - device extension 13 1 - Requires support for Vulkan 1.0 - < -Docs/issues/new?body=[VK_NV_glsl_shader ] @pdaniell - nv%0A*Here describe the issue or question you have about the VK_NV_glsl_shader extension * > 2016 - 02 - 14 - , NVIDIA Thi...
41805b86242fc8ddb6103b377b327300e7ad0d8b3ec931054291279e24cb9b53
lambdacube3d/lambdacube-edsl
HOAS.hs
module LambdaCube.Language.HOAS where import GHC.TypeLits import Data.ByteString.Char8 import Data.Int import LambdaCube.Core.Type hiding (FetchPrimitive, OutputPrimitive, Blending, RasterContext, Blend, TriangleCtx, Image, FragmentOperation, MipMap, TextureDataType, TextureType) import LambdaCube.Language.Type impo...
null
https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-edsl/src/lib/LambdaCube/Language/HOAS.hs
haskell
Common Exp, describes shader functions Needed for Let conversion environment size at defining occurrence -- function support Lam :: (GPU a, GPU b) => (Exp stage a -> Exp stage b) -> Exp stage (a -> b) App :: (GPU a, GPU b) => Exp stage a -> Exp st...
module LambdaCube.Language.HOAS where import GHC.TypeLits import Data.ByteString.Char8 import Data.Int import LambdaCube.Core.Type hiding (FetchPrimitive, OutputPrimitive, Blending, RasterContext, Blend, TriangleCtx, Image, FragmentOperation, MipMap, TextureDataType, TextureType) import LambdaCube.Language.Type impo...
bf28222f146f33bbfedbcb53b3af3d7ae9acb0cfea8501bbe45a841458a67176
madvas/catlantis
core.cljs
(ns catlantis.android.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [catlantis.handlers] [catlantis.subs])) (set! js/window.React (js/require "react-native")) (def app-registry (.-AppRegistry js/React)) (def text (r/ad...
null
https://raw.githubusercontent.com/madvas/catlantis/b8880ec2cab27ecfcb3c0ab30e2bbc7767db0d1c/src/catlantis/android/core.cljs
clojure
(ns catlantis.android.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [catlantis.handlers] [catlantis.subs])) (set! js/window.React (js/require "react-native")) (def app-registry (.-AppRegistry js/React)) (def text (r/ad...
427ccb3d5f149301ed359292f7f7670f6a49a858542ed95e942477a688d88a91
MyDataFlow/ttalk-server
mongoose_metrics_hooks.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2013 , Erlang Solutions Ltd. %%% @doc Ejabberd hooks for general metrics %%% %%% @end Created : 23 Apr 2013 by < > %%%------------------------------------------------------------------- -module(mongoose_metrics_hooks)....
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mongoose_metrics_hooks.erl
erlang
------------------------------------------------------------------- @doc Ejabberd hooks for general metrics @end ------------------------------------------------------------------- ------------------- Internal exports ------------------- ------------------- Implementation ------------------- @doc Here will be dec...
@author < > ( C ) 2013 , Erlang Solutions Ltd. Created : 23 Apr 2013 by < > -module(mongoose_metrics_hooks). -include("ejabberd.hrl"). -include("jlib.hrl"). -export([get_hooks/1]). -export([sm_register_connection_hook/3, sm_remove_connection_hook/4, auth_failed/2, user_send_pa...
8639bf5c4b46ffd3451907275baef05fb73b8b9144d109518db4e0594fb17caa
MyDataFlow/ttalk-server
exometer_admin.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . %% 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 obtai...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exometer_admin.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- @doc Sets a default definition for a metric type, possibly using wildcards. Names are lists of atoms, where '_' is a wildcard. For example, `[a, b, c]', whereas `[a, b, c, d]'...
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(exometer_admin). -behaviour(gen_server). -export( [...
63f1e0dd14a56bd3e6040f47cfd40ee378d8240aa0e74cfeb0a49319b4291539
LexiFi/lrt
lrt_path.ml
(******************************************************************************) Copyright ( C ) 2020 by LexiFi . (* *) This source file is released under the terms of the MIT license as part ...
null
https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/ppx/path/lrt_path.ml
ocaml
**************************************************************************** of the lrt package. Details can be found in the attached LICENSE file. **************************************************************************** */* Registe...
Copyright ( C ) 2020 by LexiFi . This source file is released under the terms of the MIT license as part * The [ \[%path ? .\ ] ] syntax extension . See { ! Lrt . Path } . open Ppxlib open Ast_builder.Default let raise_errorf ~loc = Format.ksprintf (Location.r...
ee37e88ba001e60103e454cc014e0bde37ab3232098e9968ff41ac1ecbec4bfc
juspay/atlas
Types.hs
| Copyright 2022 Juspay Technologies Pvt Ltd 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 dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/mock-sms/src/App/Types.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd 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 dis...
a9db2b34f64e97bd8cd51ac2d753c330907eccb6d9c3b20f5c4044da13943adb
samebchase/hash-set
hash-set.lisp
(in-package :hash-set) (defclass hash-set () ( #+sbcl (table :accessor table :initform (make-hash-table :test #'equal :synchronized t)) #+clozure (table :accessor table :initform (make-hash-table :test #'equal :shared t)) #-(or sbcl clozure) (table :accessor table :initform (make-hash-table :test #'equal)) ...
null
https://raw.githubusercontent.com/samebchase/hash-set/3a47ec6fb82aa3af7c39a09e46a50ce665170dcd/hash-set.lisp
lisp
(in-package :hash-set) (defclass hash-set () ( #+sbcl (table :accessor table :initform (make-hash-table :test #'equal :synchronized t)) #+clozure (table :accessor table :initform (make-hash-table :test #'equal :shared t)) #-(or sbcl clozure) (table :accessor table :initform (make-hash-table :test #'equal)) ...
da27e3132bbb621665ef638b5776dd5c2eca7d577ade6769aa066016a8dbe76d
Ericson2314/lighthouse
Gears.hs
Gears.hs ( adapted from gears.c which is ( c ) ) Copyright ( c ) 2004 < > Further hacked by < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE Command line options : -info print GL implementation infor...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/GLUT/examples/Misc/Gears.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here. Input: innerRadius - radius of ...
Gears.hs ( adapted from gears.c which is ( c ) ) Copyright ( c ) 2004 < > Further hacked by < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE Command line options : -info print GL implementation infor...
4a6224499b3280fafae5de7ea58cd47d47ed5a4c721f012bcd512cd2f5e5ac7c
flora-pm/flora-server
Categories.hs
module FloraWeb.Templates.Pages.Categories ( index , showCategory ) where import FloraWeb.Templates.Pages.Categories.Index (index) import FloraWeb.Templates.Pages.Categories.Show (showCategory)
null
https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/web/FloraWeb/Templates/Pages/Categories.hs
haskell
module FloraWeb.Templates.Pages.Categories ( index , showCategory ) where import FloraWeb.Templates.Pages.Categories.Index (index) import FloraWeb.Templates.Pages.Categories.Show (showCategory)
d0346133122c582df204b44b325ab2d1dfb7cfe648be4455f405469349f05eb9
alvatar/spheres
c-define-reader#.scm
;;!!! C Types: readers/writers generation ;;! Macros for defining readers and writers. .author ref : -list/2009-June/003671.html (define-macro (define-writer name vtype) `(define (,name x #!optional (port (current-output-port))) (let ((v (,vtype x))) (##subtype-set! v u8vector-subtype) (writ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/gambit/ffi/c-define-reader%23.scm
scheme
!!! C Types: readers/writers generation ! Macros for defining readers and writers.
.author ref : -list/2009-June/003671.html (define-macro (define-writer name vtype) `(define (,name x #!optional (port (current-output-port))) (let ((v (,vtype x))) (##subtype-set! v u8vector-subtype) (write-subu8vector v 0 (u8vector-length v) port)))) (define-macro (define-reader name vtype...
c00afa71c13b0850a7ab44bf438e6677a9124f8902965a68a0c6bd68ed82277e
mfoemmel/erlang-otp
wx_xtra_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 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 Public Lic...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/test/wx_xtra_SUITE.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 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 " Author : < > Created : 3 Nov 2008 by ...
66d5c7004820b78fc82df5b041753adb7c49d3b00c171de7efb599b0c00db8b3
ajhc/ajhc
tc131.hs
{-# OPTIONS -fglasgow-exts #-} -- !!! Typechecking of functional dependencies -- Showed up (another) bug in the newtype-squashing machinery module ShouldCompile where class Split2 a b | a -> b, b -> a where combine2 :: (b,b) -> a class Split4 a b | a -> b, b -> a where combine4 :: (b,b) -> a newtype Word1...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/1_typecheck/2_pass/ghc/tc131.hs
haskell
# OPTIONS -fglasgow-exts # !!! Typechecking of functional dependencies Showed up (another) bug in the newtype-squashing machinery
module ShouldCompile where class Split2 a b | a -> b, b -> a where combine2 :: (b,b) -> a class Split4 a b | a -> b, b -> a where combine4 :: (b,b) -> a newtype Word16 = Word16 Int newtype Word32 = Word32 Int newtype Word64 = Word64 Int instance Split2 Word32 Word16 where combine2 = undefined instan...
afbb55c50d2936fba5c5ee63207d4ac0f0ed90b73c23e126e4d5e70c1c00c41e
parapluu/Concuerror
ignore_error_3.erl
-module(ignore_error_3). -export([scenarios/0]). -export([test/0]). -concuerror_options_forced( [ {depth_bound, 10} , {ignore_error, depth_bound} , {ignore_error, deadlock} ]). scenarios() -> [{test, inf, dpor}]. test() -> P = self(), loop(10), spawn(fun() -> exit(boom) end), receive...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/ignore_error_3.erl
erlang
-module(ignore_error_3). -export([scenarios/0]). -export([test/0]). -concuerror_options_forced( [ {depth_bound, 10} , {ignore_error, depth_bound} , {ignore_error, deadlock} ]). scenarios() -> [{test, inf, dpor}]. test() -> P = self(), loop(10), spawn(fun() -> exit(boom) end), receive...
ed8e77cd333a0c1f98d8a5bd776276366623cbd1396b35fc88b9ca71851bedef
hyperfiddle/electric
m_task_in_cp.cljc
(ns dustin.y2022.m-task-in-cp (:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]] [missionary.core :as m])) (hyperfiddle.rcf/enable!) (comment "Thought experiment: can m/amb and m/? be defined sensibly in m/cp?" (def !x (atom 0)) (def <y (m/cp (m/amb 0 (m/? (m/sleep (m/?< (m/watch !x)) :...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/m/m_task_in_cp.cljc
clojure
% := ::notify -- sleep cannot begin until sampled, nothing to notify @!it := ::x
(ns dustin.y2022.m-task-in-cp (:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]] [missionary.core :as m])) (hyperfiddle.rcf/enable!) (comment "Thought experiment: can m/amb and m/? be defined sensibly in m/cp?" (def !x (atom 0)) (def <y (m/cp (m/amb 0 (m/? (m/sleep (m/?< (m/watch !x)) :...
6408306f6ecb978682908894d4dde365d30937e1b0f054aa59501a544374a5f2
int-index/slay
Cairo.hs
module Slay.Cairo ( module Slay.Core, module Slay.Cairo.Element, module Slay.Cairo.Prim, ) where import Slay.Core import Slay.Cairo.Element import Slay.Cairo.Prim
null
https://raw.githubusercontent.com/int-index/slay/1c9d39b8cb4f32f0b4778677c21ebb85cc1cddf7/cairo/src/Slay/Cairo.hs
haskell
module Slay.Cairo ( module Slay.Core, module Slay.Cairo.Element, module Slay.Cairo.Prim, ) where import Slay.Core import Slay.Cairo.Element import Slay.Cairo.Prim
e9f5cf272229eb5bc0f905fdb5649b824c7eac1d677a77ccb37ac7197c83c3aa
cljfx/cljfx
e37_web_view_local_content.clj
(ns e37-web-view-local-content (:require [cljfx.api :as fx] [cljfx.prop :as fx.prop] [cljfx.mutator :as fx.mutator] [cljfx.lifecycle :as fx.lifecycle]) (:import [javafx.scene.web WebView])) ;; Short snippet demonstrating how to display local content in a WebView ;; with a custom...
null
https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e37_web_view_local_content.clj
clojure
Short snippet demonstrating how to display local content in a WebView with a custom prop
(ns e37-web-view-local-content (:require [cljfx.api :as fx] [cljfx.prop :as fx.prop] [cljfx.mutator :as fx.mutator] [cljfx.lifecycle :as fx.lifecycle]) (:import [javafx.scene.web WebView])) (def ext-with-html (fx/make-ext-with-props {:html (fx.prop/make (fx.m...
4b59ee69dd4eb49ad93a2c7878092a8931f57b9ff4822df7735b1a4c2090f838
scalaris-team/scalaris
tx_tm_rtm.erl
2009 - 2015 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 ...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/transactions/tx_tm_rtm.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...
2009 - 2015 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 Part of a generic implementation of transactions using the roles of the ( replicated ) transaction...
9d3659d410fb052ef6691d75b57b5087148e8a3a81717bec0b4250c6e3bd2aa3
imitator-model-checker/imitator
AlgoAccLoopSynth.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : AccLoopSynth ...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoAccLoopSynth.ml
ocaml
********************************************************** ********************************************************** Modules ********************************************************** ********************************************************** ********************************************************** ***************...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : AccLoopSynth ...
d44b6a7e09ddf16eb81363471e95488df6661b051a0781a69113ae03af2dba86
heraldry/heraldicon
variant_test.cljs
(ns spec.heraldry.charge.variant-test (:require [cljs.test :refer-macros [are deftest]] [spec.heraldicon.test-util :as tu] [spec.heraldry.specs])) (deftest valid-variant (are [form] (tu/valid? :heraldry.charge/variant form) {:id "some-id" :version 5} {:id "some-id" :version nil})) (def...
null
https://raw.githubusercontent.com/heraldry/heraldicon/5b1ee92bdbeb8e4ad16fbdad3d7e83db3cda2ed7/test/spec/heraldry/charge/variant_test.cljs
clojure
(ns spec.heraldry.charge.variant-test (:require [cljs.test :refer-macros [are deftest]] [spec.heraldicon.test-util :as tu] [spec.heraldry.specs])) (deftest valid-variant (are [form] (tu/valid? :heraldry.charge/variant form) {:id "some-id" :version 5} {:id "some-id" :version nil})) (def...
669d66c793a6837df5be93a9d213dba9ed55112dd3e45d6a92094ae09ee7d5ff
pkrumins/the-little-mler
08-bows-and-arrows.ml
* * Chapter 8 of The Little MLer : * * and Arrows * * * * Code examples assembled by ( ) . * * His blog is at -- good coders code , great reuse . * * * * Get yourself this wonderful book at Amazon : ** Chapter 8 of The Little MLer: ** Bows and Arrows ** ** Code examples assembled by...
null
https://raw.githubusercontent.com/pkrumins/the-little-mler/369745c04daee42a52cf54f48f27cac8092b0f83/08-bows-and-arrows.ml
ocaml
'a lists Also oranges and apples. A comparsion function for oranges and apples It's type (orapl*orapl) -> bool eq_int helper Let's substitute some ints Try it out. What is its type? int*int*int list -> int list Now let's substitute some oranges Try it out. * What is its type? * o...
* * Chapter 8 of The Little MLer : * * and Arrows * * * * Code examples assembled by ( ) . * * His blog is at -- good coders code , great reuse . * * * * Get yourself this wonderful book at Amazon : ** Chapter 8 of The Little MLer: ** Bows and Arrows ** ** Code examples assembled by...
f16f19887a2b8b639af57c2ac1ba3227227412724151f24326dcf720af3957ad
corecursive/sicp-study-group
exercise-2.36.scm
Exercise 2.36 . ;; ;; The procedure accumulate-n is similar to accumulate except that it takes as its third argument a sequence of sequences , which are all ;; assumed to have the same number of elements. It applies the designated accumulation procedure to combine all the first elements of the sequences , all t...
null
https://raw.githubusercontent.com/corecursive/sicp-study-group/145b2d48ce0fd6108c4568b0c3d206fbea7a3fcf/wulab/exercises/exercise-2.36.scm
scheme
The procedure accumulate-n is similar to accumulate except that it assumed to have the same number of elements. It applies the on, and returns a sequence of the results. For instance, if s is a 12)), then the value of (accumulate-n + 0 s) should be the sequence definition of accumulate-n: nil (...
Exercise 2.36 . takes as its third argument a sequence of sequences , which are all designated accumulation procedure to combine all the first elements of the sequences , all the second elements of the sequences , and so sequence containing four sequences , ( ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 ) ( 10 11 ( 22 26 30...
f32785d4365c230f7ee9dfa2bc7c905a345d9717cd135c47c417e67bb5b1b08a
songyahui/AlgebraicEffect
recorder_continuation_take.ml
type fund_t = Found of int | NotFound effect: FoundIt : int let rec loop (li: int list) (n: int) : (fund_t * int list) = match li with | [] -> (NotFound, []) | first :: rest -> if n == 0 then (Found first, rest) else let (f, l) = loop rest (n-1) in (f, first :: l) let rec loop1 (li: i...
null
https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/sp_tests/recorder_continuation_take.ml
ocaml
type fund_t = Found of int | NotFound effect: FoundIt : int let rec loop (li: int list) (n: int) : (fund_t * int list) = match li with | [] -> (NotFound, []) | first :: rest -> if n == 0 then (Found first, rest) else let (f, l) = loop rest (n-1) in (f, first :: l) let rec loop1 (li: i...
d8c72e70e16c5af6da4822ead10397be2de092c1e3f6aff95ca56c88fa7eecda
leptonyu/guiguzi
Captcha.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances # module Data.Captcha where import Base.Redis import Boots hiding (name, version) import Boots.Web import Data.Aeson import qualified Data.ByteString.Base6...
null
https://raw.githubusercontent.com/leptonyu/guiguzi/9b3cb22f1b0c5387964c0097ef9a789125d2daee/captcha/src/Data/Captcha.hs
haskell
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric # # LANGUAGE UndecidableInstances # module Data.Captcha where import Base.Redis import Boots hiding (name, version) import Boots.Web import Data.Aeson import qualified Data.ByteString.Base64 as B64 import qualified Data.ByteS...
2e35014ec45e04f32fded152dda37d6d38e514ef28b0916273df60e1f13ba92e
gildor478/ocaml-gettext
OCamlGettext.ml
(**************************************************************************) (* ocaml-gettext: a library to translate messages *) (* *) Copyright ( C ) 2003 - 2008 < > (* ...
null
https://raw.githubusercontent.com/gildor478/ocaml-gettext/9b7afc702bccace9a544b8efa2a28bc2b13371ed/src/bin/ocaml-gettext/OCamlGettext.ml
ocaml
************************************************************************ ocaml-gettext: a library to translate messages This library is free softw...
Copyright ( C ) 2003 - 2008 < > License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version ; You should have received a copy of the GNU Lesser General Public License along with this library ; if not ,...
07d854b9a95f6c29e8d278af1dc0735f6b714f5c0c06efd80cd21775508e5a0d
WhatsApp/erlfmt
erlfmt_recomment.erl
Copyright ( c ) Facebook , Inc. and its affiliates . %% 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,...
null
https://raw.githubusercontent.com/WhatsApp/erlfmt/fa41b271db7127c7c078d8b7a1e808d556f50aae/src/erlfmt_recomment.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 governing perm...
Copyright ( c ) Facebook , Inc. and its affiliates . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erlfmt_recomment). -include("erlfmt_scan.hrl"). -export([recomment/2, put_pre_comments/2, put_post_comments/2, t...
e1483679edeaf623bd0a58741614a8e8964bf14895cf193b165c134f6fc1c50e
binaryage/clearcut
messages.clj
(ns clearcut.messages "A subsystem for printing compile-time warnings and errors. Piggybacks on cljs.analyzer." [ cljs.analyzer : as ] [clearcut.debug :refer [debug-assert]])) ; TODO: maybe this won't be needed after all (def ^:dynamic *clearcut-message-prefix* "Clearcut") ; -- helpers -----------------------...
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/src/lib/clearcut/messages.clj
clojure
TODO: maybe this won't be needed after all -- helpers ---------------------------------------------------------------------------------------------------------------- -- compile-time error/warning messages (in hooked cljs compiler) ---------------------------------------------------------- (debug-assert (some #{ty...
(ns clearcut.messages "A subsystem for printing compile-time warnings and errors. Piggybacks on cljs.analyzer." [ cljs.analyzer : as ] [clearcut.debug :refer [debug-assert]])) (def ^:dynamic *clearcut-message-prefix* "Clearcut") (def message-ids [:dynamic-selector-usage :static-nil-target-object :sta...
8b614e4b5ac018176dcc057c09c1f94c8186db73315e5276c55bce813849b547
tolitius/obiwan
build.clj
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as deploy] [tag.core :as t] [clojure.pprint :refer [pprint]])) ;; TODO: taking tools.build for a spin (defonce project (let [lib 'com.tolitius/obiwan version "0.1.4809" targe...
null
https://raw.githubusercontent.com/tolitius/obiwan/3db166e4bad83aa61307283cd28ce6fad4ae793d/build.clj
clojure
TODO: taking tools.build for a spin
(ns build (:require [clojure.tools.build.api :as b] [deps-deploy.deps-deploy :as deploy] [tag.core :as t] [clojure.pprint :refer [pprint]])) (defonce project (let [lib 'com.tolitius/obiwan version "0.1.4809" target-dir "target"] {:lib lib :des...
08ad2e139fd9b0699b8361ad74b28885dfec72524518f6ddec9ee6b371672287
johnridesabike/acutis
debugMatching.mli
(**************************************************************************) (* *) Copyright ( c ) 2022 . (* *) This Source Code For...
null
https://raw.githubusercontent.com/johnridesabike/acutis/dfdde9718c1f269e9660c666e5494394f3a77a0d/lib/debugMatching.mli
ocaml
************************************************************************ ****************************...
Copyright ( c ) 2022 . 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 /. type t = (Matching.leaf, int) Matching.tree val equa...
3cd39e6e1d6a1b26ac55754c979fda6b20e4777796170d04ba109492d0e95dde
alanb2718/wallingford
draw-binary-tree.rkt
#lang s-exp rosette (require racket/gui/base) (require "../core/wallingford.rkt") (require "../applications/geothings.rkt") (define picture (new thing%)) (define frame (new frame% [label "Binary Tree Example"] [width 800] [height 600])) (define canv (new canva...
null
https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/applications/draw-binary-tree.rkt
racket
Space between adjacent points from separate subtrees Space between adjacent points in same subtree Vertical space of a single tree "row" Left subtree Right Subtree Dirty Hack to make sure values are nice End Hack use top point from left child, if it exists use top point from right child, if it exists This sho...
#lang s-exp rosette (require racket/gui/base) (require "../core/wallingford.rkt") (require "../applications/geothings.rkt") (define picture (new thing%)) (define frame (new frame% [label "Binary Tree Example"] [width 800] [height 600])) (define canv (new canva...
8d1a00f6bf0fa8217c96c0a2305cba5cf3a2b6fdd807e14db734e10c080fda36
jellelicht/guix
wicd.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 > Copyright © 2015 < > ;;; ;;; 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 F...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/wicd.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 < > Copyright © 2015 > Copyright © 2015 < > 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 (gnu packages wicd) #:use-module (guix pack...
d39120bea0cefd2661db2d90f68b7ffd17753068230a4ecd18952c186b6c0b40
finnishtransportagency/harja
ilmoitus_sanoma.clj
(ns harja.palvelin.integraatiot.tloik.sanomat.ilmoitus-sanoma (:require [clojure.xml :refer [parse]] [clojure.zip :refer [xml-zip]] [clojure.data.zip.xml :as z] [taoensso.timbre :as log] [harja.tyokalut.xml :as xml]) (:import (java.text SimpleDateFormat ParseException...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/5f816d9f51a2d722eca874968f5d061556405621/src/clj/harja/palvelin/integraatiot/tloik/sanomat/ilmoitus_sanoma.clj
clojure
(ns harja.palvelin.integraatiot.tloik.sanomat.ilmoitus-sanoma (:require [clojure.xml :refer [parse]] [clojure.zip :refer [xml-zip]] [clojure.data.zip.xml :as z] [taoensso.timbre :as log] [harja.tyokalut.xml :as xml]) (:import (java.text SimpleDateFormat ParseException...
732cd1c782d3f21f927df5d9c2498282d17d1dd04c3b4d372cc4f5534148098d
hanshuebner/vlm
imaclist.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : ALPHA - AXP - INTERNALS ; Base : 10 ; Lowercase : T -*- (in-package "ALPHA-AXP-INTERNALS") Macros in support of list instructions . These are mostly in ifunlist.as reads car(tag / data ) into tag / data (defmacro car-internal (tag data opcode vma temp3 te...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/alpha-emulator/imaclist.lisp
lisp
Syntax : Common - Lisp ; Package : ALPHA - AXP - INTERNALS ; Base : 10 ; Lowercase : T -*- Allows arg-fetch to be signed Destructively reads cdr(tag/data) into tag/data. Allows arg-fetch to be signed (BR zero ,endcdr) Allows arg-fetch to be signed Save the CAR values re-fetched if forwarded) (BR zero ,end-carcd...
(in-package "ALPHA-AXP-INTERNALS") Macros in support of list instructions . These are mostly in ifunlist.as reads car(tag / data ) into tag / data (defmacro car-internal (tag data opcode vma temp3 temp4 temp5 temp6 &optional signedp) (assert (member signedp '(t nil)) () "Barf") (check-temporaries (tag dat...
b27ca2806aa931a8dc9ee3fa5985e3ad1ed6d6b4bf3b7fa7d3eff480c8b6a056
andrewthad/packed
Window.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE BinaryLiterals # # LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # {-# LANGUAGE MultiWayIf #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeInType #-} # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # {-# OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-wa...
null
https://raw.githubusercontent.com/andrewthad/packed/72437b5f99fbe745897a0a27cae72565c9727781/src/Packed/Bytes/Window.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE MultiWayIf # # LANGUAGE TypeInType # # OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-warn-implicit-prelude -O2 # * Folds * Hashing * Characters not Word8 elements. this call to go should always return Just Returns the index of the matching byte and the byte itself. not...
# LANGUAGE BinaryLiterals # # LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # module Packed.Bytes.Window ( findByte , findByte' , findAnyByte2 , foldl' , reverse , zipAnd , zipOr , zipXor , equality ...
2ba380dbe4172b9b47136fa4fead7d4d5c4386eadb101628f3b26fac247496df
helium/miner
miner_jsonrpc_handler.erl
-module(miner_jsonrpc_handler). -callback handle_rpc(Method :: binary(), Params :: term()) -> jsx:json_term(). -export([handle/2, handle_event/3]). -export([ jsonrpc_b58_to_bin/2, jsonrpc_b64_to_bin/2, jsonrpc_get_param/2, jsonrpc_get_param/3, jsonrpc_error/1, to_key/1, to_value/1, jso...
null
https://raw.githubusercontent.com/helium/miner/eea2f3780bdb6e413a81b139bec6da35c3b7a9e4/src/miner_jsonrpc_handler.erl
erlang
Delegate to our handler function @doc Handle request events, like request completed, exception thrown, client timeout, etc. Must return `ok'. Errors don't want these atoms stringified lightly format floats, but pass through integers as-is make sure we have valid representations of other types which may show ...
-module(miner_jsonrpc_handler). -callback handle_rpc(Method :: binary(), Params :: term()) -> jsx:json_term(). -export([handle/2, handle_event/3]). -export([ jsonrpc_b58_to_bin/2, jsonrpc_b64_to_bin/2, jsonrpc_get_param/2, jsonrpc_get_param/3, jsonrpc_error/1, to_key/1, to_value/1, jso...
1ede40b05f4405cc41c79816622bfc23ae9dc32c03b7bbae372b52996fa2a733
basho/riak-erlang-client
riakc_register.erl
%% ------------------------------------------------------------------- %% %% riakc_register: Eventually-consistent register type %% Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this f...
null
https://raw.githubusercontent.com/basho/riak-erlang-client/ea4fcd062f55a67e31c7294a1b8b8ccd957526c8/src/riakc_register.erl
erlang
------------------------------------------------------------------- riakc_register: Eventually-consistent register type Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the ...
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc...
b23da5cb8af03bda356ead049ad5f366a6974e68ca11b4900b8f33f1914da543
acgollapalli/dataworks
transformer.clj
(ns dataworks.transformer (:require [clojure.core.async :refer [close! chan tap]] [dataworks.utils.common :refer :all] [dataworks.db.app-db :refer :all] [dataworks.utils.stream :as stream] [dataworks.app-graph :refer [stream! ...
null
https://raw.githubusercontent.com/acgollapalli/dataworks/df8b48d66b762d1d5566306debe89081675913bd/src/dataworks/transformer.clj
clojure
TODO Add validation here.
(ns dataworks.transformer (:require [clojure.core.async :refer [close! chan tap]] [dataworks.utils.common :refer :all] [dataworks.db.app-db :refer :all] [dataworks.utils.stream :as stream] [dataworks.app-graph :refer [stream! ...
217d66d9306cd3dbc8179de65b83ba35de92ba7ca2d4571bd50125b3ae5f5c1f
bennn/iPoe
poetic-license.rkt
#lang racket/base (provide (struct-out quirk) ;; The standard error format poetic-license-apply ( - > License ( ) License ) ;; Apply a poetic license to a list of quirks poetic-license-init ;; (-> Natural License) ;; Create a new poetic license. ;; Assumes that all parameters in `parameters.rkt` ...
null
https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/ipoe/private/poem/poetic-license.rkt
racket
The standard error format Apply a poetic license to a list of quirks (-> Natural License) Create a new poetic license. Assumes that all parameters in `parameters.rkt` are accessible (-> License Void) Print a report of all quirks we applied the license to ---------------------------------------------------------...
#lang racket/base (provide (struct-out quirk) poetic-license-apply ( - > License ( ) License ) poetic-license-init poetic-license-report ) (require racket/match ) 2015 - 09 - 23 : They 're not errors , they 're quirks . (struct quirk ( >cost >string ) #:prefab ) (struct license ( credit...
ad484fbe24c69a098b962b7c048a23686cfb610bcffbc0565adc62648a25d937
bytekid/mkbtt
bootstrap.ml
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/ttt2/bootstrap.ml
ocaml
** OPEN ******************************************************************** ** FUNCTIONS ***************************************************************
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
3ebc79bd167de50671efa6946d6dbc7a3129bd745b551987824faef375b73cb4
owainlewis/semver
core.clj
(ns semver.core) (defrecord Version [major minor patch pre-release metadata]) (def ^{:private true} semver #"^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$") (defn valid? "Returns true if an input string is a valid semantic version string" [^...
null
https://raw.githubusercontent.com/owainlewis/semver/7fdcc71459a694db22d4ea36984b2c10c199c378/src/semver/core.clj
clojure
Comparing each dot separated identifier from left to right until a difference is found
(ns semver.core) (defrecord Version [major minor patch pre-release metadata]) (def ^{:private true} semver #"^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$") (defn valid? "Returns true if an input string is a valid semantic version string" [^...
7bc65160c956f957ebe1a03de4350b7d6a2f31517ceb58d66c1da6ab6e9d8dc3
Clojure2D/clojure2d-examples
M_1_3_02.clj
(ns GG.M.M-1-3-02 (:require [clojure2d.core :refer :all] [fastmath.random :as r] [clojure2d.pixels :as p] [clojure2d.color :as c])) (def ^:const wname "M_1_3_02") (def cnvs (canvas 512 512)) (def window (show-window {:canvas cnvs :window-name wname ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/M/M_1_3_02.clj
clojure
(ns GG.M.M-1-3-02 (:require [clojure2d.core :refer :all] [fastmath.random :as r] [clojure2d.pixels :as p] [clojure2d.color :as c])) (def ^:const wname "M_1_3_02") (def cnvs (canvas 512 512)) (def window (show-window {:canvas cnvs :window-name wname ...
539734967b0d67f8ce545adfcede3bcab527ead9105612b31bc97bdf97b8cb5b
donaldsonjw/bigloo
progn.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / runtime / Eval / progn.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Eval/progn.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * La normalisation des formes `begin' */ *===========================...
* serrano / prgm / project / bigloo / runtime / Eval / progn.scm * / * Author : * / * Creation : Thu Nov 3 10:07:31 1994 * / * Last change : Tue Apr 17 07:47:08 2012 ( serrano ) * / (module ...
085dc3276c96f8b707ccf5bf2e381c0f4c2061bcf171d9674f4211ba223edfd1
michaelklishin/monger
pagination_test.clj
(ns monger.test.internal.pagination-test (:require [clojure.test :refer :all] [monger.internal.pagination :refer :all])) (deftest test-pagination-offset (are [a b] (= a b) 0 (offset-for 1 20) 0 (offset-for 1 30) 10 (offset-for 2 10) 13 (offset-for 2 13) 20 (offset-for...
null
https://raw.githubusercontent.com/michaelklishin/monger/9f3d192dffb16da011f805355b87ae172c584a69/test/monger/test/internal/pagination_test.clj
clojure
(ns monger.test.internal.pagination-test (:require [clojure.test :refer :all] [monger.internal.pagination :refer :all])) (deftest test-pagination-offset (are [a b] (= a b) 0 (offset-for 1 20) 0 (offset-for 1 30) 10 (offset-for 2 10) 13 (offset-for 2 13) 20 (offset-for...