_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
090a24c2f6d39aab032d02335daaa77c24e7ab8dee236092d4dd65a6ad444020
fragnix/fragnix
GHC.Enum.hs
{-# LINE 1 "GHC.Enum.hs" #-} # LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash # {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | Module : Copyright : ( c ) Th...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/GHC.Enum.hs
haskell
# LINE 1 "GHC.Enum.hs" # # OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | License : see libraries/base/LICENSE Maintainer : Stability : internal --------------------------------------------------------------------------- Double isn't available yet...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash # Module : Copyright : ( c ) The University of Glasgow , 1992 - 2002 Portability : non - portable ( GHC extensions ) The ' ' and ' Bounded ' classes . ...
9556bf3c490eaa6cbbe8cf5276ed988ce2cd629aeab6b3d88ea20e3c9a17b358
97jaz/gregor
generics.rkt
#lang racket/base (require racket/dict racket/generic racket/match racket/math "core/structs.rkt" "core/math.rkt" "core/ymd.rkt" "core/hmsn.rkt" "difference.rkt" "date.rkt" "exn.rkt" "time.rkt" "datetime.rkt" ...
null
https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/generics.rkt
racket
#lang racket/base (require racket/dict racket/generic racket/match racket/math "core/structs.rkt" "core/math.rkt" "core/ymd.rkt" "core/hmsn.rkt" "difference.rkt" "date.rkt" "exn.rkt" "time.rkt" "datetime.rkt" ...
7f2454a6141c53ca14261568cb1f139630e93ccb4b9b8a4f35b333b4256822a3
josefs/Gradualizer
type_pattern.erl
%%% @doc Test cases for `add_type_pat/4' -module(type_pattern). -compile([export_all, nowarn_export_all]). -type mychar() :: char(). %% The user type `mychar()' inside a list is not normalized when %% `add_types_pats/4' is called, but postponed later within ` subtype(string ( ) , [ mychar ( ) ] , TEnv ) ' . There ...
null
https://raw.githubusercontent.com/josefs/Gradualizer/bd92da1e47a0fdb8bd22009da10bd73f0422e066/test/should_pass/type_pattern.erl
erlang
@doc Test cases for `add_type_pat/4' The user type `mychar()' inside a list is not normalized when `add_types_pats/4' is called, but postponed later within
-module(type_pattern). -compile([export_all, nowarn_export_all]). -type mychar() :: char(). ` subtype(string ( ) , [ mychar ( ) ] , TEnv ) ' . There was a typo that specifically in case of a string pattern VEnv was passed instead of TEnv . -spec f([mychar()]) -> any(). f("foo") -> ok; f(_) -> also_ok. -type o...
3c4fad6638c34a1f66f2177f125ac96b1ae873242a41f29e0169270235e0609c
Bogdanp/try-racket
all.rkt
#lang racket/base (define-syntax-rule (reprovide mod ...) (begin (require mod ...) (provide (all-from-out mod ...)))) (reprovide "common.rkt" "editor.rkt")
null
https://raw.githubusercontent.com/Bogdanp/try-racket/0b82259d60edb08a5158d60500e0104cf9dbaad6/try-racket/pages/all.rkt
racket
#lang racket/base (define-syntax-rule (reprovide mod ...) (begin (require mod ...) (provide (all-from-out mod ...)))) (reprovide "common.rkt" "editor.rkt")
c9ebe9c31fb75f14567bb1c1a5a3aa419e6610ece2dbc309b2e437488c3ad72c
zmyrgel/tursas
eval.clj
(ns tursas.state0x88.eval (:use (tursas state) (tursas.state0x88 common util))) (def pawn-value 10) (def bishop-value 30) (def knight-value 30) (def rook-value 50) (def queen-value 90) (def king-value 99999) ;; Score tables for each piece type ;; all tables are from white players point of view. (def pawn-sc...
null
https://raw.githubusercontent.com/zmyrgel/tursas/362551a1861be0728f21b561d8907d0ca04333f7/src/tursas/state0x88/eval.clj
clojure
Score tables for each piece type all tables are from white players point of view.
(ns tursas.state0x88.eval (:use (tursas state) (tursas.state0x88 common util))) (def pawn-value 10) (def bishop-value 30) (def knight-value 30) (def rook-value 50) (def queen-value 90) (def king-value 99999) (def pawn-scores [0 0 0 0 0 0 0 0 5 5 5 0 0 5 5 5 ...
931f39103583e87e1ea430a1f38a862931b98ed8123ca0e2bb9fb602dac42ddf
ArulselvanMadhavan/haskell-first-principles
MonoidTestUtils.hs
module MonoidTestUtils where import Data.Monoid import Test.QuickCheck monoidAssoc :: (Eq m, Monoid m) => m -> m -> m -> Bool monoidAssoc a b c = (a <> (b <> c)) == ((a <> b) <> c) monoidLeftIdentity :: (Eq m, Monoid m) => m -> Bool monoidLeftIdentity a = (mempty <> a) == a monoidRightIde...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter15/test/MonoidTestUtils.hs
haskell
module MonoidTestUtils where import Data.Monoid import Test.QuickCheck monoidAssoc :: (Eq m, Monoid m) => m -> m -> m -> Bool monoidAssoc a b c = (a <> (b <> c)) == ((a <> b) <> c) monoidLeftIdentity :: (Eq m, Monoid m) => m -> Bool monoidLeftIdentity a = (mempty <> a) == a monoidRightIde...
c715850ac6db25946d02eaf4be15e8a1925453db4846783560a473a8d6eb014b
alura-cursos/datomic-identidades-e-queries
db.clj
(ns ecommerce.db (:use clojure.pprint) (:require [datomic.api :as d])) (def db-uri "datomic:dev:4334/ecommerce") (defn abre-conexao! [] (d/create-database db-uri) (d/connect db-uri)) (defn apaga-banco! [] (d/delete-database db-uri)) ; Produtos ; id? nome String 1 = = > Computador Novo ; slug String 1 ==...
null
https://raw.githubusercontent.com/alura-cursos/datomic-identidades-e-queries/2c14e40f02ae3ac2ebd39d2a1d07fbdc87526052/aula4.1/ecommerce/src/ecommerce/db.clj
clojure
Produtos id? slug String 1 ==> /computador_novo id_entidade atributo valor Produtos pull explicito atributo a atributo :where [?entidade :produto/nome]] db)) String sql = "meu codigo sql"; conexao.query(sql) esse aqui eh similar ao String sql em clojure ) não estou usando notacao hungara e extract ...
(ns ecommerce.db (:use clojure.pprint) (:require [datomic.api :as d])) (def db-uri "datomic:dev:4334/ecommerce") (defn abre-conexao! [] (d/create-database db-uri) (d/connect db-uri)) (defn apaga-banco! [] (d/delete-database db-uri)) nome String 1 = = > Computador Novo preco ponto flutuante 1 = = > 350...
20de29d1cf7af1773a0b5f6ddcb1f11fe91cbfbb914525e90c563ed3b7ce5708
janestreet/memtrace_viewer_with_deps
test_config.ml
open! Core open! Import let%expect_test "default timing-wheel precision and level durations" = let module I = Incremental.Make () in let config = I.Clock.default_timing_wheel_config in let durations = Timing_wheel.Config.durations config in require [%here] (Time_ns.Span.( >= ) (List.last_exn durations) Time_ns...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incremental/test/test_config.ml
ocaml
open! Core open! Import let%expect_test "default timing-wheel precision and level durations" = let module I = Incremental.Make () in let config = I.Clock.default_timing_wheel_config in let durations = Timing_wheel.Config.durations config in require [%here] (Time_ns.Span.( >= ) (List.last_exn durations) Time_ns...
402959388f61800378881042a643d1258a7c748166c7f3fd490c195d599aa0ed
evdubs/renegade-way
analysis.rkt
#lang racket/base (require gregor racket/class racket/gui/base racket/match "../condor-analysis.rkt" "../price-analysis.rkt" "condor-analysis-box.rkt" "price-analysis-box.rkt" "rank-analysis.rkt" "vol-analysis.rkt" "position-anal...
null
https://raw.githubusercontent.com/evdubs/renegade-way/93b03d40e86c069d712ddd907fb932ebfad87457/gui/analysis.rkt
racket
init everything so we don't get errors when selecting elements to hide
#lang racket/base (require gregor racket/class racket/gui/base racket/match "../condor-analysis.rkt" "../price-analysis.rkt" "condor-analysis-box.rkt" "price-analysis-box.rkt" "rank-analysis.rkt" "vol-analysis.rkt" "position-anal...
ab292e2b2dc03fd56087943f90ff03140f14f229654170f4709501d2e0c0c368
simonmar/haxl-icfp14-sample-code
Fetch.hs
# LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving # module Fetch where import Types import MockData import DataCache import Data.IORef import Control.Applicative import Data.Traversable import Data.Sequence as Seq import Data.Monoid import Data.Foldable (toList) import Control.Exception hiding (throw,...
null
https://raw.githubusercontent.com/simonmar/haxl-icfp14-sample-code/31859f50e0548f3e581acd26944ceb00953f2c42/haxl-exceptions/Fetch.hs
haskell
<<Result >> <<Fetch >> >> >> <<Monad >> <<Applicative >> <<throw >> <<catch >> <<runFetch >>
# LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving # module Fetch where import Types import MockData import DataCache import Data.IORef import Control.Applicative import Data.Traversable import Data.Sequence as Seq import Data.Monoid import Data.Foldable (toList) import Control.Exception hiding (throw,...
9e3678d48e3893b1eb80c6174e8027f4d3b78102cccc58c293819085c7535024
poscat0x04/telegram-types
SetChatPhoto.hs
module Web.Telegram.Types.Internal.API.SetChatPhoto where import Common import Web.Telegram.Types.Internal.API.ChatId import Web.Telegram.Types.Internal.InputFile data SetChatPhoto = SetChatPhoto { chatId :: ChatId, photo :: InputFile 'Normal } deriving stock (Show, Eq, Generic) deriving (ToParts) ...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/SetChatPhoto.hs
haskell
module Web.Telegram.Types.Internal.API.SetChatPhoto where import Common import Web.Telegram.Types.Internal.API.ChatId import Web.Telegram.Types.Internal.InputFile data SetChatPhoto = SetChatPhoto { chatId :: ChatId, photo :: InputFile 'Normal } deriving stock (Show, Eq, Generic) deriving (ToParts) ...
55e3c45c38eaaf34ad259d2855c972d68b8593f22028664bc794f395654123d5
facebookarchive/pfff
lib_parsing_hs.ml
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_haskell/parsing/lib_parsing_hs.ml
ocaml
*************************************************************************** Wrappers *************************************************************************** *************************************************************************** Filemames *********************************************************************...
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
21f5131c84c01c68f514fc206c8dcae1aa8461cf55ad8ab6718571e0b943afd4
clj-commons/useful
deftype.clj
(ns flatland.useful.deftype (:use [flatland.useful.experimental.delegate :only [parse-deftype-specs emit-deftype-specs]] [flatland.useful.map :only [merge-in]]) (:require [clojure.string :as s]) (:import (clojure.lang IObj MapEntry IPersistentVector IPersistentMap APersistentMap M...
null
https://raw.githubusercontent.com/clj-commons/useful/dc5cdebf8983a2e2ea24ec8951fbb4dfb037da45/src/flatland/useful/deftype.clj
clojure
to define a new map type, you still must provide: - IPersistentMap: - (.count this) - (.valAt this k not-found) - (.empty this) - (.assoc this k v) - (.without this k) - (.seq this) - recommended but not required: (.entryAt this k) - IObj - (.meta this) - (.withMeta this m)
(ns flatland.useful.deftype (:use [flatland.useful.experimental.delegate :only [parse-deftype-specs emit-deftype-specs]] [flatland.useful.map :only [merge-in]]) (:require [clojure.string :as s]) (:import (clojure.lang IObj MapEntry IPersistentVector IPersistentMap APersistentMap M...
92653c0100328b8f4e7f530487e444428b5c83e4fe9b4e4edeaeae8e7aabec7a
input-output-hk/cardano-ledger
Gen.hs
module Test.Cardano.Chain.Update.Gen ( genCanonicalProtocolParameters, genApplicationName, genError, genProtocolVersion, genProtocolParameters, genProtocolParametersUpdate, genSoftforkRule, genSoftwareVersion, genSystemTag, genInstallerHash, genPayload, genProof, genProposal, genProposalBody...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/ledger/impl/test/Test/Cardano/Chain/Update/Gen.hs
haskell
module Test.Cardano.Chain.Update.Gen ( genCanonicalProtocolParameters, genApplicationName, genError, genProtocolVersion, genProtocolParameters, genProtocolParametersUpdate, genSoftforkRule, genSoftwareVersion, genSystemTag, genInstallerHash, genPayload, genProof, genProposal, genProposalBody...
3383b102d4fa2ddcfc9a0c701e317299d97ac3e00c442feaa07320c58e7b191e
jeapostrophe/exp
csv2org.rkt
#lang racket (require (planet neil/csv)) (match-define (list-rest header games) (csv->list (current-input-port))) (define (extend-l l) (append l (build-list (- (length header) (length l)) (λ (i) "")))) (define (mprintf fmt arg) (unless (string=? "" arg) (printf fmt arg))) (printf "* Game...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/csv2org.rkt
racket
#lang racket (require (planet neil/csv)) (match-define (list-rest header games) (csv->list (current-input-port))) (define (extend-l l) (append l (build-list (- (length header) (length l)) (λ (i) "")))) (define (mprintf fmt arg) (unless (string=? "" arg) (printf fmt arg))) (printf "* Game...
f641d9da3f668da6e8e8250d3315fae62d0995c928c04089ca75f9c6d297c962
CodyReichert/qi
tar.lisp
tar.lisp -- reading and writing tar files from Common Lisp ;;; Yes, perfectly good implementations of tar already exist. However, ;;; there are none for Common Lisp. :) Actually, the main motivation ;;; behind writing this was to eventually provide a TAR-OP or something ;;; similar for ASDF. This would make packa...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/archive-latest/tar.lisp
lisp
Yes, perfectly good implementations of tar already exist. However, there are none for Common Lisp. :) Actually, the main motivation behind writing this was to eventually provide a TAR-OP or something similar for ASDF. This would make packaging up systems very easy. Furthermore, something like asdf-install could...
tar.lisp -- reading and writing tar files from Common Lisp The implementation only handles ustar archives ( POSIX circa 1988 or so ) and does not handle pax archives ( POSIX circa 2001 or so ) . This biased towards handling tar files ( fixed records of 512 bytes ) . (in-package :archive) (defconstant +ta...
d0fd5c2238128441a6a2cf115eaa285c8aadf18821ea18707c4ee7062ec3025b
SimulaVR/godot-haskell
JavaScript.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.JavaScript (Godot.Core.JavaScript.eval) where import Data.C...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/JavaScript.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.JavaScript (Godot.Core.JavaScript.eval) where import Data.C...
72b530a2e7969c7a1a6585cf19e0d4180678acf05320dd8b3c6bbf80ab02c103
goblint/analyzer
observerAnalysis.ml
open Prelude.Ana open Analyses open MyCFG module type StepObserverAutomaton = ObserverAutomaton.S with type t = node * node (* TODO: instead of multiple observer analyses, use single list-domained observer analysis? *) let get_fresh_spec_id = let fresh_id = ref 0 in fun () -> let return_id = !fresh_id in ...
null
https://raw.githubusercontent.com/goblint/analyzer/3fc209f2b3bdcc44c40e3c30053a2fa64368ff2e/src/witness/observerAnalysis.ml
ocaml
TODO: instead of multiple observer analyses, use single list-domained observer analysis? TODO: relax q type let n = List.length Arg.path fully path-sensitive transfer functions ctx.local doesn't matter here? let path = [(23, 24); (24, 25)] path_nofun
open Prelude.Ana open Analyses open MyCFG module type StepObserverAutomaton = ObserverAutomaton.S with type t = node * node let get_fresh_spec_id = let fresh_id = ref 0 in fun () -> let return_id = !fresh_id in fresh_id := return_id + 1; return_id module MakeSpec (Automaton: StepObserverAutomaton wi...
31917ab2e6dc3ca8a5fe551532154ed313c73ca2fb0c15ff9371eaeb6cff19a7
qiao/sicp-solutions
3.72.scm
(define (weight pair) (+ (square (car pair)) (square (cadr pair)))) (define pairs (weighted-pairs integers integers weight)) (define numbers (stream-map weight pairs)) (define (filter-numbers s) (let* ((x (stream-car s)) (y (stream-car (stream-car s))) (z (stream-car (stream-car (stream-car...
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.72.scm
scheme
(define (weight pair) (+ (square (car pair)) (square (cadr pair)))) (define pairs (weighted-pairs integers integers weight)) (define numbers (stream-map weight pairs)) (define (filter-numbers s) (let* ((x (stream-car s)) (y (stream-car (stream-car s))) (z (stream-car (stream-car (stream-car...
4f62227b3d3199b15c26390c8d3f2825b0686438764f7fc5d2de64043a27e642
lexi-lambda/freer-simple
Loop.hs
module Tests.Loop (tests) where import Control.Concurrent (forkIO, killThread) import Control.Concurrent.QSemN (newQSemN, signalQSemN, waitQSemN) import Control.Monad (forever) import Data.Function (fix) import Test.Tasty (TestTree, localOption, mkTimeout, testGroup) import Test.Tasty.HUnit (testCase) import Control...
null
https://raw.githubusercontent.com/lexi-lambda/freer-simple/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/tests/Tests/Loop.hs
haskell
module Tests.Loop (tests) where import Control.Concurrent (forkIO, killThread) import Control.Concurrent.QSemN (newQSemN, signalQSemN, waitQSemN) import Control.Monad (forever) import Data.Function (fix) import Test.Tasty (TestTree, localOption, mkTimeout, testGroup) import Test.Tasty.HUnit (testCase) import Control...
ae4d427add28ff033438bac7af2814101783939e3248cdfe311685ddc2aeca8a
herd/herdtools7
interpreter.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/14b473b819601028afc0464f304a2cbed5ad26d9/lib/interpreter.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2013 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
f20ce96f7209b8531757d44a555c916474c79c49785d98eb3a4e8f5981b0561b
hopbit/sonic-pi-snippets
bg_sofll.sps
# key: bg sofll # point_line: 4 # point_index: 0 # -- live_loop :background do # stop # use_bpm: 96 # sync :melody use_synth :piano background.size.times do |n| play background[n][0], sustain: background[n][1] sleep background[n][2] end end
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/backgrounds/bg_sofll.sps
scheme
# key: bg sofll # point_line: 4 # point_index: 0 # -- live_loop :background do # stop # use_bpm: 96 # sync :melody use_synth :piano background.size.times do |n| play background[n][0], sustain: background[n][1] sleep background[n][2] end end
1dc3142ec3108048b1da056bef63965f7dc9440a0e9067ccfcbeb30693225ffb
umutisik/mathvas
Settings.hs
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. In addition , you can configure a number of different aspects of Yesod by overriding methods in the Yesod typeclass . That instance is declared in the Foundation.hs file ....
null
https://raw.githubusercontent.com/umutisik/mathvas/9f764cd4d54370262c70c7ec3eadae076a1eb489/Settings.hs
haskell
| Settings are centralized, as much as possible, into this file. This includes database connection settings, static file locations, etc. | Runtime settings to configure this application. These settings can be loaded from various sources: defaults, environment variables, config files, theoretically even a database....
In addition , you can configure a number of different aspects of Yesod by overriding methods in the Yesod typeclass . That instance is declared in the Foundation.hs file . module Settings where import ClassyPrelude.Yesod import Control.Exception (throw) import Data.Aeson (Result (..), ...
3767b560ca878561d96f3cc8122f8b3f9bdc8bd39a13bfeec59537bc1259626d
rroohhh/guix_packages
unrar.scm
(define-module (vup unrar)) (use-modules (guix packages)) (use-modules (guix build-system gnu)) (use-modules (guix download)) (use-modules ((guix licenses) #:prefix license:)) (define-public unrar (package (name "unrar") (version "6.0.3") (source (origin (method url-fetch) (ur...
null
https://raw.githubusercontent.com/rroohhh/guix_packages/8226e4500d2687d119ede3ebf620488f072c430c/vup/unrar.scm
scheme
(define-module (vup unrar)) (use-modules (guix packages)) (use-modules (guix build-system gnu)) (use-modules (guix download)) (use-modules ((guix licenses) #:prefix license:)) (define-public unrar (package (name "unrar") (version "6.0.3") (source (origin (method url-fetch) (ur...
5d4dbbe5d907d982a7232116f0610bfe314465566e6a359bc26fd750907f05db
kendroe/CoqRewriter
mylist.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * REWRITELIB * * mylist.mli * * This file contains signatures for some useful list processing functions * * ( C ) 2017 , * * This pr...
null
https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/mylist.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * REWRITELIB * * mylist.mli * * This file contains signatures for some useful list processing functions * * ( C ) 2017 , * * This pr...
35bbb1217378ca7496c3665abf3aa69f1f5ebc0aaaafb8211da843a57b0e7120
soegaard/super
test-object-notation.rkt
#lang super racket (define point% (class* object% (printable<%>) (super-new) (init-field [x 0] [y 0]) (define/public (custom-print port qq-depth) (do-print this print port)) (define/public (custom-display port) (do-print this display port)) (define/public (custom-write port...
null
https://raw.githubusercontent.com/soegaard/super/2451bf46cce1eb0dfef8b7f0da5dec7a9c265fbd/test-object-notation.rkt
racket
same as
#lang super racket (define point% (class* object% (printable<%>) (super-new) (init-field [x 0] [y 0]) (define/public (custom-print port qq-depth) (do-print this print port)) (define/public (custom-display port) (do-print this display port)) (define/public (custom-write port...
da050abec72197d0413f1a27d74254756ce915853e9e2bfcb4b5ae0f45327069
nikodemus/SBCL
packages.impure.lisp
;;;; miscellaneous tests of package-related stuff This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This softwar...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/packages.impure.lisp
lisp
miscellaneous tests of package-related stuff more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Tests USE-PACKAGE EXPORT IMPORT Make sure ...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (make-package "FOO") (defvar *foo* (find-package (coerce "FOO" 'base-string))) (rename-package "FOO" (make-array 0 :element-type nil)) (assert (eq *foo* (find-package ...
b9419e4d08544cc6e709d01278809db519ca3daed00131e3d785e16e38345127
shortishly/haystack
haystack_config.erl
Copyright ( c ) 2012 - 2016 < > %% 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 distribute...
null
https://raw.githubusercontent.com/shortishly/haystack/7ff0d737dcd90adf60c861b2cf755aee1355e555/src/haystack_config.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 permissi...
Copyright ( c ) 2012 - 2016 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(haystack_config). -export([acceptors/1]). -export([debug/1]). -export([docker/1]). -export([enabled/1]). -export([origin/0]). -exp...
2911dec9cf33400a9a36a6ba26af7c0b4ef1393f2803cfe350c27932fad68d82
HunterYIboHu/htdp2-solution
ex205-examples.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-abbr-reader.ss" "lang")((modname ex205-examples) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section13-project-list/ex205-examples.rkt
racket
about the language level of this file in a form that our tools can easily process. data difinitions A Date is a structure: data difinition functions ;;;; String -> List consume a n as the name of track String -> List consume a n as the name of artists String -> List consume a t as the title of album N -> Lis...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex205-examples) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/itunes) ( define - struct date [ ye...
88e455f258e7ad31c2c8084fff7aa347151418459a27e0bec8d87dc3e03654b2
spechub/Hets
GraphQL.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} module PGIP.GraphQL (isGraphQL, processGraphQL) where import PGIP.GraphQL.Resolver import PGIP.Shared import Driver.Options import Data.Aeson as Aeson import qualified Data.ByteString.Lazy as LBS import qualified Data.Text.Lazy.Encoding as LEncoding imp...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/PGIP/GraphQL.hs
haskell
# LANGUAGE OverloadedStrings # This structure contains the data that is passed to the GraphQL API This is an auxiliary strucutre that helps to parse the request body. It is then converted to QueryBody. For an unknown reason, GraphQL-API requires the query to be enclosed in {}
# LANGUAGE DeriveGeneric # module PGIP.GraphQL (isGraphQL, processGraphQL) where import PGIP.GraphQL.Resolver import PGIP.Shared import Driver.Options import Data.Aeson as Aeson import qualified Data.ByteString.Lazy as LBS import qualified Data.Text.Lazy.Encoding as LEncoding import Data.Maybe import Data.Map (Map...
143029d8e5abec0e34ecd7d1cb9c369f5af2bf2a7b2151c9d1c5d7f9b7c04a28
jacekschae/shadow-firebase
core.cljs
(ns app.core (:require [reagent.core :as reagent :refer [atom]] [app.views :as views] [app.fb.init :refer [firebase-init]] [app.fb.db :as fb-db])) (defn ^:export main [] (reagent/render-component [views/app] (.getElementById js/document "app")) (fir...
null
https://raw.githubusercontent.com/jacekschae/shadow-firebase/1471c02231805b8717a0b121522104465ffc1803/src/app/core.cljs
clojure
(ns app.core (:require [reagent.core :as reagent :refer [atom]] [app.views :as views] [app.fb.init :refer [firebase-init]] [app.fb.db :as fb-db])) (defn ^:export main [] (reagent/render-component [views/app] (.getElementById js/document "app")) (fir...
32acb9d7190063f0653e297d3a2f1ba7845c3d1a85ba8321c735d0be0c43ecba
ivanjovanovic/sicp
e-3.6.scm
Exercise 3.6 . ; ; It is useful to be able to reset a random-number generator to ; produce a sequence starting from a given value. Design a new rand procedure ; that is called with an argument that is either the symbol generate or the ; symbol reset and behaves as follows: (rand 'generate) produces a new random ; num...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.1/e-3.6.scm
scheme
It is useful to be able to reset a random-number generator to produce a sequence starting from a given value. Design a new rand procedure that is called with an argument that is either the symbol generate or the symbol reset and behaves as follows: (rand 'generate) produces a new random number; ((rand 'reset) <ne...
Exercise 3.6 . Rand is not object that contains local state and two actions ' generate and ' reset (load "../helpers.scm") (define random-init (inexact->exact (current-milliseconds))) I will use with some predefined constants m = 19 ( primary number ) a = 3 c = 5 maximum number this generator can...
45077055fcfe085f26b658397c73f79e5827cdb17faa493d21cc29217ffb6293
IGJoshua/farolero
signal.cljc
(ns farolero.signal (:require [clojure.spec.alpha :as s] [farolero.protocols :refer [Jump]]) #?(:clj (:import (farolero.signal Signal)))) #?(:cljs (defrecord Signal [target args])) (defn make-signal [target args] (#?(:clj Signal. :cljs ->Signal) target args)) (s/fdef make-signal :args (s/ca...
null
https://raw.githubusercontent.com/IGJoshua/farolero/db3baff4a1468a0167be74f263e2415e613c5fa8/src/cljc/farolero/signal.cljc
clojure
(ns farolero.signal (:require [clojure.spec.alpha :as s] [farolero.protocols :refer [Jump]]) #?(:clj (:import (farolero.signal Signal)))) #?(:cljs (defrecord Signal [target args])) (defn make-signal [target args] (#?(:clj Signal. :cljs ->Signal) target args)) (s/fdef make-signal :args (s/ca...
0c53ac1b35157ffdd50f9bdad58ced854dac57aad1aa2d4349c4c1b63ab5e210
inhabitedtype/ocaml-aws
copyDBParameterGroup.mli
open Types type input = CopyDBParameterGroupMessage.t type output = CopyDBParameterGroupResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/copyDBParameterGroup.mli
ocaml
open Types type input = CopyDBParameterGroupMessage.t type output = CopyDBParameterGroupResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
7016cccfa115f1f28ff2f10b6b366a9614a205188a408429717245f9138251f2
aristidb/aws
Select.hs
module Aws.SimpleDb.Commands.Select where import Aws.Core import Aws.SimpleDb.Core import Control.Applicative import Control.Monad import Data.Maybe import Prelude import Text.XML.Cursor (($//), (&|)) import qualified Data.Text ...
null
https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/SimpleDb/Commands/Select.hs
haskell
| ServiceConfiguration: 'SdbConfiguration'
module Aws.SimpleDb.Commands.Select where import Aws.Core import Aws.SimpleDb.Core import Control.Applicative import Control.Monad import Data.Maybe import Prelude import Text.XML.Cursor (($//), (&|)) import qualified Data.Text ...
360d8bcc36ccb8f2c32f3cfcf81d320c01a6de796e7bbcc80ec199459480e145
NovoLabs/gregor
consumer.clj
(ns gregor.details.consumer (:require [gregor.details.protocols.consumer :refer [ConsumerProtocol] :as consumer] [gregor.details.transform :as xform] [gregor.details.deserializer :refer [->deserializer]]) (:import org.apache.kafka.clients.consumer.KafkaConsumer java.util.concurren...
null
https://raw.githubusercontent.com/NovoLabs/gregor/017488d88abe23df1f0389080629d6f26ba2a84e/src/gregor/details/consumer.clj
clojure
Hopefully we can remove this try ... catch in the future. There is currently a synchronization bug
(ns gregor.details.consumer (:require [gregor.details.protocols.consumer :refer [ConsumerProtocol] :as consumer] [gregor.details.transform :as xform] [gregor.details.deserializer :refer [->deserializer]]) (:import org.apache.kafka.clients.consumer.KafkaConsumer java.util.concurren...
3c79e5aa431bbe8521da22142f1655ea34646b40c2d27727a79e0f540c111566
thomescai/erlang-ftpserver
config.erl
%% config-module. %% functions related to the server-configuration. %% for now, this is also the place to change the config-settings. -module(config). -include("bifrost.hrl"). -export([get_opt/2,get_opt/3]). get_opt(Key, Opts, Default) -> case proplists:get_value(Key, Opts) of undefined -> ca...
null
https://raw.githubusercontent.com/thomescai/erlang-ftpserver/061a8a3c2b13533542302bc9e19d29eba21d0998/src/config.erl
erlang
config-module. functions related to the server-configuration. for now, this is also the place to change the config-settings.
-module(config). -include("bifrost.hrl"). -export([get_opt/2,get_opt/3]). get_opt(Key, Opts, Default) -> case proplists:get_value(Key, Opts) of undefined -> case application:get_env(ftpserver,Key) of {ok, Value} -> Value; undefined -> Default end; ...
a72ac903f19c56ad143d04bf1fb42ee0c0543485968a5d8ee3f4ab47d29895ae
Helium4Haskell/helium
BgExplicitTypedBinding.hs
module BgExplicitTypedBinding where f :: Bool f 1 = 1
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Examples/BgExplicitTypedBinding.hs
haskell
module BgExplicitTypedBinding where f :: Bool f 1 = 1
55f074681b51d7b325a5e34309ce35db481981ead4bf090be31a14464f864674
lambdacube3d/lambdacube-workshop
Asteroids06.hs
# LANGUAGE LambdaCase , OverloadedStrings , RecordWildCards # import Control.Monad import System.IO import System.Directory import Data.Vect import Codec.Picture as Juicy import Graphics.UI.GLFW as GLFW import LambdaCube.Compiler as LambdaCube -- compiler import LambdaCube.GL as LambdaCubeGL -- renderer import quali...
null
https://raw.githubusercontent.com/lambdacube3d/lambdacube-workshop/3d40c91811d0aaf9fa57c3b8eb4a3f1bde0e3173/asteroids/stages/Asteroids06.hs
haskell
compiler renderer for mesh construction setup render data load OBJ geometry and material descriptions load materials textures debug sphere background load image and upload texture check schema compatibility update graphics input collision visuals spaceship asteroids bullets render utils
# LANGUAGE LambdaCase , OverloadedStrings , RecordWildCards # import Control.Monad import System.IO import System.Directory import Data.Vect import Codec.Picture as Juicy import Graphics.UI.GLFW as GLFW import qualified LambdaCube.OBJ as OBJ import Logic import LambdaCube.GL.Mesh as LambdaCubeGL import qualified Da...
1786ae7ed6d8ec2893743eb71b8e9eb9e1c83a4de3009025edde427ab59155a4
xvw/preface
equivalence.ml
module Invariant_suite = Preface.Qcheck.Invariant.Suite_contravariant (Req.Equivalence) (Preface.Equivalence.Invariant) (Sample.Int) (Sample.String) (Sample.Float) module Contravariant_suite = Preface.Qcheck.Contravariant.Suite (Req.Equivalence) (Preface.Equivalence.Contravariant) (...
null
https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/test/preface_laws_test/equivalence.ml
ocaml
module Invariant_suite = Preface.Qcheck.Invariant.Suite_contravariant (Req.Equivalence) (Preface.Equivalence.Invariant) (Sample.Int) (Sample.String) (Sample.Float) module Contravariant_suite = Preface.Qcheck.Contravariant.Suite (Req.Equivalence) (Preface.Equivalence.Contravariant) (...
61dee5bae4b4d3d2dac683b400de011fdb53d5ea231fda68805cf10c1aaa5b19
kronkltd/jiksnu
logger.clj
(ns jiksnu.logger (:require [ciste.config :refer [config config* describe-config]] [clojure.data.json :as json] [clojure.string :as string] [jiksnu.sentry :as sentry] jiksnu.serializers [puget.printer :as puget] [taoensso.timbre :as timbre] ...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/logger.clj
clojure
:err (force ?err_) :keys (keys data)
(ns jiksnu.logger (:require [ciste.config :refer [config config* describe-config]] [clojure.data.json :as json] [clojure.string :as string] [jiksnu.sentry :as sentry] jiksnu.serializers [puget.printer :as puget] [taoensso.timbre :as timbre] ...
fc8c76e8bf8af0a7ea743bef9806e8e4b69d06e7c0031df9eb55fe33b32087cc
mlabs-haskell/plutip
ClusterStartup.hs
module Spec.ClusterStartup (test) where import Cardano.Api (UTxO (unUTxO)) import Cardano.Api qualified as Capi import Control.Arrow (right) import Control.Monad (zipWithM) import Data.Default (Default (def)) import Data.Map qualified as Map import Data.Set qualified as Set import Plutip.CardanoApi (currentBlock, utxo...
null
https://raw.githubusercontent.com/mlabs-haskell/plutip/89cf822c213f6a4278a88c8a8bb982696c649e76/test/Spec/ClusterStartup.hs
haskell
module Spec.ClusterStartup (test) where import Cardano.Api (UTxO (unUTxO)) import Cardano.Api qualified as Capi import Control.Arrow (right) import Control.Monad (zipWithM) import Data.Default (Default (def)) import Data.Map qualified as Map import Data.Set qualified as Set import Plutip.CardanoApi (currentBlock, utxo...
430799e6e2fa53a8bd9d334a1ac38ecae5c2ea951e75a930d3f6b5f62d5ffaf9
areina/elfeed-cljsrn
events_test.cljs
(ns elfeed-cljsrn.events-test (:require [cljs.test :refer [deftest is testing]] [elfeed-cljsrn.events :as events])) (deftest search-execute-handler-test (testing "when the search term is empty" (let [term "" expected-default-term "@15-days-old +unread" db {:search {:default-...
null
https://raw.githubusercontent.com/areina/elfeed-cljsrn/4dea27f785d24a16da05c0ab2ac0c6a6f23360f1/test/elfeed_cljsrn/events_test.cljs
clojure
(ns elfeed-cljsrn.events-test (:require [cljs.test :refer [deftest is testing]] [elfeed-cljsrn.events :as events])) (deftest search-execute-handler-test (testing "when the search term is empty" (let [term "" expected-default-term "@15-days-old +unread" db {:search {:default-...
f6e7cab916b97dbc50a507504d959d4a0dea7b2784faa1cfc16cc1ab7fe91068
mikewin/cspbox-trading
open_range_breakout.clj
(ns cspbox.trading.ind.open-range-breakout (:require [cspbox.trading.ind.spec :refer [average-true-range]] [cspbox.runtime.store.buf.roll :refer [make-lookback-buffer]] [cspbox.trading.order.market :refer [market-closed-p]] [cspbox.runtime.sys.utils.macro :refer [to-map]] ...
null
https://raw.githubusercontent.com/mikewin/cspbox-trading/76f9cfb780d5f36e5fbd6d8cec7c978a0e51cb94/src/cspbox/trading/ind/open_range_breakout.clj
clojure
(ns cspbox.trading.ind.open-range-breakout (:require [cspbox.trading.ind.spec :refer [average-true-range]] [cspbox.runtime.store.buf.roll :refer [make-lookback-buffer]] [cspbox.trading.order.market :refer [market-closed-p]] [cspbox.runtime.sys.utils.macro :refer [to-map]] ...
c90c17a271d7425fcbd6a64fed02d393083db36fa281f697a650bb7c7551ace6
namin/staged-miniKanren
tests-append.scm
(load "staged-load.scm") (display "in mk") (newline) (define (appendo xs ys zs) (conde ((== xs '()) (== ys zs)) ((fresh (xa xd zd) (== xs (cons xa xd)) (== zs (cons xa zd)) (appendo xd ys zd))))) (time (length (run* (x y) (appendo x y (make-list 500 'a))))) (display "unstaged") (newlin...
null
https://raw.githubusercontent.com/namin/staged-miniKanren/8816527be93db1dece235d4dd1491b0b9ece1910/tests-append.scm
scheme
(load "staged-load.scm") (display "in mk") (newline) (define (appendo xs ys zs) (conde ((== xs '()) (== ys zs)) ((fresh (xa xd zd) (== xs (cons xa xd)) (== zs (cons xa zd)) (appendo xd ys zd))))) (time (length (run* (x y) (appendo x y (make-list 500 'a))))) (display "unstaged") (newlin...
f0cffb8ebc34704ed97a5e8e856067a519572cdf14ee9e520dc61b73445190fa
con-kitty/categorifier
Base.hs
# LANGUAGE TupleSections # | The ` Categorifier . . can support most of categorification ( ` arr ` is a -- very powerful operation), but it doesn't provide all of the appropriate functions and some of them are too complicated to encode directly in GHC Core . This module bridges the gap to make the Core ...
null
https://raw.githubusercontent.com/con-kitty/categorifier/df7e88e08535c646b97841c323326404b4a46664/plugin/Categorifier/Core/Base.hs
haskell
very powerful operation), but it doesn't provide all of the appropriate functions and some of
# LANGUAGE TupleSections # | The ` Categorifier . . can support most of categorification ( ` arr ` is a them are too complicated to encode directly in GHC Core . This module bridges the gap to make the Core definitions more tractable . module Categorifier.Core.Base ( distlB, fixB, ifThenElseB, ...
39fe7c80280554c7eaa3818a2dd6adef0b1c82d42fe146bdad4ab5cced054a45
chicken-mobile/chicken-sdl2-android-builder
define-enum-mask-accessor.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; - Redistributions...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/helpers/define-enum-mask-accessor.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
51f18d10ff84660923eda35101387dad5d813b26384179908ab272e42b4a85d2
elastic/eui-cljs
icon_logo_sketch.cljs
(ns eui.icon-logo-sketch (:require ["@elastic/eui/lib/components/icon/assets/logo_sketch.js" :as eui])) (def logoSketch eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_sketch.cljs
clojure
(ns eui.icon-logo-sketch (:require ["@elastic/eui/lib/components/icon/assets/logo_sketch.js" :as eui])) (def logoSketch eui/icon)
65b963159bb3b846f350e903530f8a0babc27732b2aff590e11e5cae4d4e20e6
input-output-hk/cardano-sl
Web.hs
-- | Web API parts of cardano-explorer module Pos.Explorer.Web ( module Web ) where import Pos.Explorer.Web.Server as Web import Pos.Explorer.Web.Transform as Web
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/explorer/src/Pos/Explorer/Web.hs
haskell
| Web API parts of cardano-explorer
module Pos.Explorer.Web ( module Web ) where import Pos.Explorer.Web.Server as Web import Pos.Explorer.Web.Transform as Web
71b778dd73428d7336f1cd4808fe7fbc88674d9cc54769a501b436f73df143fc
Javran/advent-of-code
Day13.hs
module Javran.AdventOfCode.Y2016.Day13 ( ) where import Control.Monad import Data.Bits import Data.Function import qualified Data.Map.Strict as M import qualified Data.PSQueue as PQ import Data.Semigroup import qualified Data.Sequence as Seq import qualified Data.Set as S import Javran.AdventOfCode.Prelude import Ja...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2016/Day13.hs
haskell
X then Y same polynomial, re-arranged to slightly reduce the amount of operations.
module Javran.AdventOfCode.Y2016.Day13 ( ) where import Control.Monad import Data.Bits import Data.Function import qualified Data.Map.Strict as M import qualified Data.PSQueue as PQ import Data.Semigroup import qualified Data.Sequence as Seq import qualified Data.Set as S import Javran.AdventOfCode.Prelude import Ja...
d2e6201bc90988c346a022654f1b1055b5150cd6752463292d60d304f6d856d3
francescoc/scalabilitywitherlangotp
bsc.erl
-module(bsc). -behaviour(application). %% Application callbacks -export([start/2, start_phase/3, stop/1]). start(_StartType, _StartArgs) -> bsc_sup:start_link(). start_phase(StartPhase, StartType, Args) -> io:format("bsc:start_phase(~p,~p,~p).~n", [StartPhase, StartType, Args]). stop(_Data) ->...
null
https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch9/start_phases/bsc.erl
erlang
Application callbacks
-module(bsc). -behaviour(application). -export([start/2, start_phase/3, stop/1]). start(_StartType, _StartArgs) -> bsc_sup:start_link(). start_phase(StartPhase, StartType, Args) -> io:format("bsc:start_phase(~p,~p,~p).~n", [StartPhase, StartType, Args]). stop(_Data) -> ok.
981ef84fed93d20cbe27caa01a7789831349812faa8823a9a8fa3869e0fdd85b
kowainik/containers-backpack
Int.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE TypeFamilies #-} module Map.Int ( Map , Key , empty , singleton , fromList , null , size , member , lookup , lookupDefault , toList , keys , elems , insert , ins...
null
https://raw.githubusercontent.com/kowainik/containers-backpack/d74fbb592dd1994c62cfd3a900d1c7429fd859d6/src/int-strict/Map/Int.hs
haskell
# LANGUAGE TypeFamilies # # INLINE empty # # INLINE member # # INLINE lookup # # INLINE delete #
# LANGUAGE FlexibleInstances # module Map.Int ( Map , Key , empty , singleton , fromList , null , size , member , lookup , lookupDefault , toList , keys , elems , insert , insertWith , adjust , up...
12f3bd7dfe5c40d7a3b7c6f0e871004809e5c24ef850c3bedbd8f5ac9527f615
MaskRay/OJHaskell
TLE_CIRUT.hs
import Data.Array.Base import Data.Array.IO import Data.Function import Data.List import Data.Monoid import Text.Printf import System.IO.Unsafe tau = pi*2 data Circle = Circle { x::Double, y::Double, r::Double } distance a b = sqrt $ (x b-x a)^2+(y b-y a)^2 contain a b = r a >= r b + distance a b intersects a b = ...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/SPOJ/TLE_CIRUT.hs
haskell
import Data.Array.Base import Data.Array.IO import Data.Function import Data.List import Data.Monoid import Text.Printf import System.IO.Unsafe tau = pi*2 data Circle = Circle { x::Double, y::Double, r::Double } distance a b = sqrt $ (x b-x a)^2+(y b-y a)^2 contain a b = r a >= r b + distance a b intersects a b = ...
05511829cf7ea3517c1b4d2c8c69eda631beb01fa86bb26af15c0d8ec47b4646
austral/austral
TypeParameter.mli
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
null
https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/TypeParameter.mli
ocaml
* This module defines the type_parameter type. * Represents type parameters. * Construct a type parameter. * The type parameter's name. * The type parameter's universe. * The name of the declaration this type parameter belongs to. * Transform a type parameter into an equivalent type variable. * Transform a type ...
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
1a264425cdc85df99c16b286dd55fa31eeb0c61c6249358798888cc210f3808b
lojic/LearningRacket
day01-benknoble.rkt
#lang racket version showing it 's not necessary to compute the sum ;; of the sliding windows :) Here's why: ;; ;; Given a list of '(a b c d ...) the sums of the sliding-3 windows are: ;; a + b + c ;; b + c + d an increase implies d > a ;; c + d + e an increase implies e > b ;; ... etc. (require "../../...
null
https://raw.githubusercontent.com/lojic/LearningRacket/00951818e2d160989e1b56cf00dfa38b55b6f4a9/advent-of-code-2021/solutions/day01/day01-benknoble.rkt
racket
of the sliding windows :) Here's why: Given a list of '(a b c d ...) the sums of the sliding-3 windows are: a + b + c b + c + d an increase implies d > a c + d + e an increase implies e > b ... etc.
#lang racket version showing it 's not necessary to compute the sum (require "../../advent/advent.rkt") (define input (file->list "day01.txt")) (define ((partn n) scans) (count < (drop-right scans n) (drop scans n))) (define (part1) ((partn 1) input)) (define (part2) ((partn 3) input))
2dccf0dc4329a0a09e73c6662e514c514a8c3f1bc43ef15003ef37ad782d72ae
coccinelle/coccinelle
lazy.mli
type 'a t = 'a CamlinternalLazy.t exception Undefined external force : 'a t -> 'a = "%lazy_force" val map : ('a -> 'b) -> 'a t -> 'b t val is_val : 'a t -> bool val from_val : 'a -> 'a t val map_val : ('a -> 'b) -> 'a t -> 'b t val from_fun : (unit -> 'a) -> 'a t val force_val : 'a t -> 'a val lazy_from_fun : (unit ->...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/lazy.mli
ocaml
type 'a t = 'a CamlinternalLazy.t exception Undefined external force : 'a t -> 'a = "%lazy_force" val map : ('a -> 'b) -> 'a t -> 'b t val is_val : 'a t -> bool val from_val : 'a -> 'a t val map_val : ('a -> 'b) -> 'a t -> 'b t val from_fun : (unit -> 'a) -> 'a t val force_val : 'a t -> 'a val lazy_from_fun : (unit ->...
6d28287e5bf908744ee6d0013beb6995380d2089353e1e687d932f619076ae9d
unclebob/AdventOfCode2021
project.clj
(defproject day20 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :main day20.core :dependencies [[org.clojure/clojure "1.8.0"]] :profiles {:dev {:dependencies [[speclj "3.3.2"]]}} :plugins [[speclj "3.3.2"]] :test-p...
null
https://raw.githubusercontent.com/unclebob/AdventOfCode2021/897b078146a80cc477a8a22b0af722a878f2aef3/day20/project.clj
clojure
(defproject day20 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :main day20.core :dependencies [[org.clojure/clojure "1.8.0"]] :profiles {:dev {:dependencies [[speclj "3.3.2"]]}} :plugins [[speclj "3.3.2"]] :test-p...
25464aae189cfed02f9786206c69ca9908f77ec972fabee5e9e536ed6450135d
eschulte/software-evolution
cil.lisp
;;; cil.lisp --- cil software representation Copyright ( C ) 2012 ;;; License: ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 , or ( at your option ) ;; any later ve...
null
https://raw.githubusercontent.com/eschulte/software-evolution/dbf5900d1eef834b93eeb00eca34eb7c80e701b6/software/cil.lisp
lisp
cil.lisp --- cil software representation License: This program is free software; you can redistribute it and/or modify either version 3 , or ( at your option ) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright ( C ) 2012 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , , USA . (in-package :software-evolution) (defclass cil (ast) ...
10f9b8f113b7178823b1ef21d0bbbc078f738271e3a181def0546b84d394fcc9
spurious/chibi-scheme-mirror
pathname.scm
Copyright ( c ) 2009 - 2013 . All rights reserved . ;; BSD-style license: ;;> A general, non-filesystem-specific pathname library. ;; POSIX basename ;; (define (path-strip-directory path) ;; (if (string=? path "") ;; path ( let ( ( end ( string - skip - right path # \/ ) ) ) ( if ( ze...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/pathname.scm
scheme
BSD-style license: > A general, non-filesystem-specific pathname library. POSIX basename (define (path-strip-directory path) (if (string=? path "") path "/" (substring-cursor path start end)))))) > Returns just the basename of \var{path}, with any directory > removed. If \var{...
Copyright ( c ) 2009 - 2013 . All rights reserved . ( let ( ( end ( string - skip - right path # \/ ) ) ) ( if ( zero ? end ) ( let ( ( start ( string - find - right path # \/ 0 end ) ) ) (define (path-strip-directory path) (substring-cursor path (string-find-right path #\/))...
9d8b173a2ca82d4fa21e60fd2a716135c909b8264a721ed755c4a3f72b02b2d2
fragnix/fragnix
Utils.hs
# LANGUAGE OverloadedStrings , module Utils ( IDType(..) , WithDeps(..) , sliceRequest , envRequest , archiveRequest , extract ) where import Fragnix.Slice (Slice) import Network.HTTP.Req import Language.Haskell.Names (Symbol) import Data.Text (Text, index, pack) import Data.ByteString.Lazy (ByteStrin...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/app/Utils.hs
haskell
# LANGUAGE OverloadedStrings , module Utils ( IDType(..) , WithDeps(..) , sliceRequest , envRequest , archiveRequest , extract ) where import Fragnix.Slice (Slice) import Network.HTTP.Req import Language.Haskell.Names (Symbol) import Data.Text (Text, index, pack) import Data.ByteString.Lazy (ByteStrin...
a3bf0989295c5c418b68803d7b512a3bcecb9ae3ac8ea86303c03fbfb99afc57
racket/macro-debugger
prefs.rkt
#lang racket/base (require racket/class racket/contract/base framework/preferences "interfaces.rkt" "../syntax-browser/prefs.rkt" framework/notify) (provide pref:macro-step-limit pref:close-on-reset-console? macro-stepper-config-base% macro-stepper...
null
https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/macro-debugger/view/prefs.rkt
racket
#lang racket/base (require racket/class racket/contract/base framework/preferences "interfaces.rkt" "../syntax-browser/prefs.rkt" framework/notify) (provide pref:macro-step-limit pref:close-on-reset-console? macro-stepper-config-base% macro-stepper...
1e6c90380ca863065d5576217d6c81bbc8d9b52e6299f43d9aaba170458830b3
fgalassi/cs61a-sp11
majority-strategy.scm
(load "higher-order") NB : bool - num and 1 are used because apparently you ca n't have a sentence of ; booleans so i am tricking it into a sequence of binary digits (define (majority-strategy first-strategy second-strategy third-strategy) (lambda (hand dealer-card) (majority-of? 1 (sentence ...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/projects/blackjack/normal/majority-strategy.scm
scheme
booleans so i am tricking it into a sequence of binary digits
(load "higher-order") NB : bool - num and 1 are used because apparently you ca n't have a sentence of (define (majority-strategy first-strategy second-strategy third-strategy) (lambda (hand dealer-card) (majority-of? 1 (sentence (bool-num (first-strategy hand dealer-card)) ...
16d2a28d588d2c19d8dc218236f46753100a948f483ad1d61f8a1c2056943cbe
dvingo/malli-code-gen
eql_pull.cljc
(ns space.matterandvoid.malli-gen.eql-pull "Generate EQL pull vectors from schemas Like space.matterandvoid.malli-gen.eql but uses options from schema properties EQL reference -query-language/eql#eql-for-selections" (:require [malli.core :as m] [space.matterandvoid.malli-gen.util :as u]) #?(:clj (:...
null
https://raw.githubusercontent.com/dvingo/malli-code-gen/8400a2d1f8e21b9de19d33329b225e8bb813c132/src/main/space/matterandvoid/malli_gen/eql_pull.cljc
clojure
maybe a double deref right away? they are equal if they have all the same keys (prn ::pull-vector orig-schema) _ (println "schema type: " (pr-str (m/type schema))) (println "child schema: " child-schema) (println "options: " options) _ (println "orig schema: " (pr-str orig-schema)) (println "not recursv...
(ns space.matterandvoid.malli-gen.eql-pull "Generate EQL pull vectors from schemas Like space.matterandvoid.malli-gen.eql but uses options from schema properties EQL reference -query-language/eql#eql-for-selections" (:require [malli.core :as m] [space.matterandvoid.malli-gen.util :as u]) #?(:clj (:...
bd93c01d3e0f25851fc6612389cf71043ee75da7e84ab2353f11923cd17502b1
fpco/ide-backend
Exception.hs
module Distribution.Compat.Exception ( catchIO, catchExit, tryIO, ) where import System.Exit import qualified Control.Exception as Exception tryIO :: IO a -> IO (Either Exception.IOException a) tryIO = Exception.try catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchIO = Exception.catch catchEx...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/Compat/Exception.hs
haskell
module Distribution.Compat.Exception ( catchIO, catchExit, tryIO, ) where import System.Exit import qualified Control.Exception as Exception tryIO :: IO a -> IO (Either Exception.IOException a) tryIO = Exception.try catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchIO = Exception.catch catchEx...
ace44772f6599bcdb21838311812870ff3ea1b3724389b6c8bd92ae8fb5d897c
dawidovsky/IIUWr
Wykład.rkt
#lang racket ;; arithmetic expressions (define (const? t) (number? t)) (define (binop? t) (and (list? t) (= (length t) 3) (member (car t) '(+ - * /)))) (define (binop-op e) (car e)) (define (binop-left e) (cadr e)) (define (binop-right e) (caddr e)) (define (binop-cons op l r) (list op ...
null
https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia6/Wyk%C5%82ad.rkt
racket
arithmetic expressions calculator let expressions evalation via substitution evaluation via environments
#lang racket (define (const? t) (number? t)) (define (binop? t) (and (list? t) (= (length t) 3) (member (car t) '(+ - * /)))) (define (binop-op e) (car e)) (define (binop-left e) (cadr e)) (define (binop-right e) (caddr e)) (define (binop-cons op l r) (list op l r)) (define (arith-expr...
c81f07937d70efe6eafc8285527c7ebb17dcdbc7202f7f67ac19400cfc254b34
fortytools/holumbus
UserInterface.hs
-- ---------------------------------------------------------------------------- | Module : Holumbus . MapReduce . UserInterface Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Module ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/source/Holumbus/MapReduce/UserInterface.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- * operations ---------------------------------------------------------------------------- -----------------------------------------------------------------------...
| Module : Holumbus . MapReduce . UserInterface Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Module : Holumbus.MapReduce.UserInterface Copyright : Copyright (C) 2008 Stefan ...
98f1ab07556ffd8be6dbb9bde9a343bda8f79fd44914ef344460db4b8d4de4cc
mpieva/biohazard-tools
PriorityQueue.hs
module PriorityQueue ( Sized(..), PQ_Conf(..), PQ, makePQ, closePQ, enqueuePQ, viewMinPQ, sizePQ, listToPQ, pqToList, ByQName(..), byQName, ByMatePos(..), BySelfPos(..), br_qname, br_mate_po...
null
https://raw.githubusercontent.com/mpieva/biohazard-tools/93959b6ad0dde2a760559fe82853ab78497f0452/src/PriorityQueue.hs
haskell
| A Priority Queue that can fall back to external storage. Note that such a Priority Queue automatically gives rise to an external sorting algorithm: enqueue everything, dequeue until empty. Whatever is to be stored in this queue needs to be in 'Binary', because it may need to be moved to external storage on de...
module PriorityQueue ( Sized(..), PQ_Conf(..), PQ, makePQ, closePQ, enqueuePQ, viewMinPQ, sizePQ, listToPQ, pqToList, ByQName(..), byQName, ByMatePos(..), BySelfPos(..), br_qname, br_mate_po...
6ca2938dcb262ac111c7fc294af8ab7c99a2b32b92fce932026f38173b20f191
BenjaminVanRyseghem/great-things-done
integration.cljs
Copyright ( c ) 2015 , . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; t...
null
https://raw.githubusercontent.com/BenjaminVanRyseghem/great-things-done/1db9adc871556a347426df842a4f5ea6b3a1b7e0/src/front/gtd/integration.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) 2015 , . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns gtd.integration (:use-macros [macro.core :only (for-os)])) (def ^:private osx-mail-applescript "tell application \"Mail\" set _sel to get selection set _links to {} repeat with _msg in _sel set ...
17c65b569f7f496dc24af9bb916653bca1f90d0d683494b516844392998cae90
clojure/spec-alpha2
spec.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/spec-alpha2/3d32b5e571b98e2930a7b2ed1dd9551bb269375a/src/main/clojure/clojure/alpha/spec.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns ^{:doc "The spec library specifies the structure of data or functions and provides operations to validate, conform, explain, describe, and generate data based on the specs. Rationale: Guide: "} clojure.alpha.spec (:refer-clojure :exclude [+ * and assert...
a5c9e7e0b3360129a70e2f3c9df9a3e99908b3f8e0ffeb29c524424b0dd581d1
synduce/Synduce
minmax_sim.ml
let xi_0 a = (a, a) let xi_2 b c x = (max (max b c) x, min (min b c) x) let rec target = function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_2 a (amin l) (amax r) and amin = function Leaf(a) -> a | Node(a, l, r) -> min a (min (amin l) (amin r)) and amax = function Leaf(a) -> a | Node(a, l, r) -> max a (max (amax ...
null
https://raw.githubusercontent.com/synduce/Synduce/289888afb1c312adfd631ce8d90df2134de827b8/extras/solutions/constraints/bst/minmax_sim.ml
ocaml
let xi_0 a = (a, a) let xi_2 b c x = (max (max b c) x, min (min b c) x) let rec target = function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_2 a (amin l) (amax r) and amin = function Leaf(a) -> a | Node(a, l, r) -> min a (min (amin l) (amin r)) and amax = function Leaf(a) -> a | Node(a, l, r) -> max a (max (amax ...
da22e4cee375a90500dccdbbe682170091782152969a51e20e6bb82ad69e5f93
code-iai/ros_emacs_utils
swank-package-fu.lisp
(in-package :swank) (defslimefun package= (string1 string2) (let* ((pkg1 (guess-package string1)) (pkg2 (guess-package string2))) (and pkg1 pkg2 (eq pkg1 pkg2)))) (defslimefun export-symbol-for-emacs (symbol-str package-str) (let ((package (guess-package package-str))) (when package (let ((*buffe...
null
https://raw.githubusercontent.com/code-iai/ros_emacs_utils/67aafa699ff0d8c6476ec577a8587bac3d498028/slime_wrapper/slime/contrib/swank-package-fu.lisp
lisp
(in-package :swank) (defslimefun package= (string1 string2) (let* ((pkg1 (guess-package string1)) (pkg2 (guess-package string2))) (and pkg1 pkg2 (eq pkg1 pkg2)))) (defslimefun export-symbol-for-emacs (symbol-str package-str) (let ((package (guess-package package-str))) (when package (let ((*buffe...
46c0aadf1bc40b79c053f5bdf1476ea48f7e043b1af5be1b050b4afa7019dd98
jasonkuhrt-archive/hpfp-answers
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad (replicateM, (<=<)) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Char8 as BC import Data.Text.Encoding (decodeUtf8, encodeUtf8) import qualified Data.Text.Lazy as TL import qualified Database.Redis as Redis import Dat...
null
https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-19-structure-applied/shrinkr/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # We need to generate our shortened URIs that refer to the links people post to this service. In order to rename, we need a character pool to select from: Now we need to pick random elements from the pool. We will need to be impure to achieve randomness: TODO ...we need to generate a new...
module Main where import Control.Monad (replicateM, (<=<)) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Char8 as BC import Data.Text.Encoding (decodeUtf8, encodeUtf8) import qualified Data.Text.Lazy as TL import qualified Database.Redis as Redis import Database.Redis (Redis) import Network....
7c6241c403c1eb3cc9b5922cb48c3de5e3340ef15c84c5a84c3147d5925e9962
metabase/metabase
tables.clj
(ns metabase.sync.sync-metadata.tables "Logic for updating Metabase Table models from metadata fetched from a physical DB." (:require [clojure.data :as data] [clojure.string :as str] [metabase.models.database :refer [Database]] [metabase.models.humanization :as humanization] [metabase.models.interfac...
null
https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/sync/sync_metadata/tables.clj
clojure
Django Drupal PostGIS nginx ---------------------------------------------------- Syncing ----------------------------------------------------- if the table already exists but is marked *inactive*, mark it as *active* otherwise create a new Table if this is a crufty table, mark initial sync as complete since we'...
(ns metabase.sync.sync-metadata.tables "Logic for updating Metabase Table models from metadata fetched from a physical DB." (:require [clojure.data :as data] [clojure.string :as str] [metabase.models.database :refer [Database]] [metabase.models.humanization :as humanization] [metabase.models.interfac...
698a37f4b1bca00996598105af79eafe342c3447e4968ca0c9b0b993eda60e4b
wireapp/wire-server
IntersperseSpec.hs
# LANGUAGE NumDecimals # # OPTIONS_GHC -fplugin = Polysemy . Plugin # module Test.IntersperseSpec where import qualified Data.Set as S import Imports hiding (intersperse) import Polysemy import Polysemy.Output (output) import Polysemy.State (evalState, get, modify) import Polysemy.Testing import Polysemy.Trace import...
null
https://raw.githubusercontent.com/wireapp/wire-server/91b1be585940f6169131440090c29aa61516ac65/libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs
haskell
This test spins up an async thread that communicates with the main Example showing how intersperse lays out actions
# LANGUAGE NumDecimals # # OPTIONS_GHC -fplugin = Polysemy . Plugin # module Test.IntersperseSpec where import qualified Data.Set as S import Imports hiding (intersperse) import Polysemy import Polysemy.Output (output) import Polysemy.State (evalState, get, modify) import Polysemy.Testing import Polysemy.Trace import...
c8107eb12ea9468cc7fd36351bbcad20f4a712cae4018a0d5f3c4cb66df3bb21
collbox/http-cron
cli.clj
(ns collbox.http-cron.cli (:require [clojure.string :as str] [clojure.tools.cli :as cli] [collbox.http-cron.conversion :as conv] [collbox.http-cron.core :as core] [com.stuartsierra.component :as component] [clojure.java.io :as io])) (defn- env-var [var] (when-let [v (System/getenv var)] (when...
null
https://raw.githubusercontent.com/collbox/http-cron/5d5de11b92d359e7fbc36afe08ea9819e1908022/src/collbox/http_cron/cli.clj
clojure
Public
(ns collbox.http-cron.cli (:require [clojure.string :as str] [clojure.tools.cli :as cli] [collbox.http-cron.conversion :as conv] [collbox.http-cron.core :as core] [com.stuartsierra.component :as component] [clojure.java.io :as io])) (defn- env-var [var] (when-let [v (System/getenv var)] (when...
cef09ea3473ea0edeb9c5a16f354efda0b2dbfbc35d21751ba27eb083e249c4d
fabianbergmark/ECMA-262
String.hs
module Language.JavaScript.String where import Control.Applicative ((<*), (<$>)) import Control.Monad (void) import Text.Parsec import Text.ParserCombinators.Parsec.Char import Language.JavaScript.Lexer stringNumericLiteral :: CharParser st Double stringNumericLiteral = do mb <- optional strWhiteSpace do...
null
https://raw.githubusercontent.com/fabianbergmark/ECMA-262/ff1d8c347514625595f34b48e95a594c35b052ea/src/Language/JavaScript/String.hs
haskell
module Language.JavaScript.String where import Control.Applicative ((<*), (<$>)) import Control.Monad (void) import Text.Parsec import Text.ParserCombinators.Parsec.Char import Language.JavaScript.Lexer stringNumericLiteral :: CharParser st Double stringNumericLiteral = do mb <- optional strWhiteSpace do...
33702920ca31e3bf7dff364b13cfece711c6eb6f3e4096b566c4576728ab48f6
albertoruiz/easyVision
domain.hs
import Vision.GUI import Image.Processing import Image.Capture import Image.ROI import Util.Homogeneous import Numeric.LinearAlgebra basis = imageBasis vga copyROI b x = copy b [(x,topLeft (roi x))] vga = Size 480 640 k v = constantImage v vga :: Image Float u = k 0.2 up = modifyROI (roiArray 3 3 2 2) (u |*| xIb b...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/examples/domain.hs
haskell
u `copyROI` up
import Vision.GUI import Image.Processing import Image.Capture import Image.ROI import Util.Homogeneous import Numeric.LinearAlgebra basis = imageBasis vga copyROI b x = copy b [(x,topLeft (roi x))] vga = Size 480 640 k v = constantImage v vga :: Image Float u = k 0.2 y = k 0 `copyROI` up t a = domainTrans32f (k 0...
fc8582e0bd135d39057e4fb8827229753503ee1e6a6f7f9fc62adfd3bd837df1
spechub/Hets
Formula.hs
| Module : ./ConstraintCASL / Formula.hs Copyright : ( c ) , Uni Bremen 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable parse terms and formulae Module : ./ConstraintCASL/Formula.hs Copyright : (c...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/ConstraintCASL/Formula.hs
haskell
------------------------------------------------------------------------ formula ------------------------------------------------------------------------
| Module : ./ConstraintCASL / Formula.hs Copyright : ( c ) , Uni Bremen 2006 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable parse terms and formulae Module : ./ConstraintCASL/Formula.hs Copyright : (c...
941460f8925db11c1e869715210567305950510d53ced3ec2ca8f4cfa948d9f5
clojure-interop/aws-api
AWSSecretsManagerAsyncClient.clj
(ns com.amazonaws.services.secretsmanager.AWSSecretsManagerAsyncClient "Client for accessing AWS Secrets Manager asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. AWS Sec...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.secretsmanager/src/com/amazonaws/services/secretsmanager/AWSSecretsManagerAsyncClient.clj
clojure
(ns com.amazonaws.services.secretsmanager.AWSSecretsManagerAsyncClient "Client for accessing AWS Secrets Manager asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. AWS Sec...
03e9b5d015ae0b475f60c2356cb9f67ad75981e2aa72411e6de3bb02360c9c0f
fakedata-haskell/fakedata
VolleyballSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module VolleyballSpec where import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Vector as V import Faker hiding (defaultFakerSettings) import Faker.Sport.Volleyball import Test.Hspec...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/test/VolleyballSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module VolleyballSpec where import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Vector as V import Faker hiding (defaultFakerSettings) import Faker.Sport.Volleyball import Test.Hspec import TestImport import Faker.Int...
402565a832323d46c8d1fd9b7570e34a2baa127ce4252efd1db8c7fbbd46cc18
xldenis/ill
Expression.hs
{-# LANGUAGE OverloadedStrings #-} module Thrill.Parser.Expression where import Thrill.Prelude import Thrill.Parser.Lexer import Thrill.Parser.Pattern import Thrill.Parser.Literal import Thrill.Syntax import Text.Megaparsec hiding (some, many) import Text.Megaparsec.Expr import Control.Comonad.Cofree impo...
null
https://raw.githubusercontent.com/xldenis/ill/46bb41bf5c82cd6fc4ad6d0d8d33cda9e87a671c/src/Thrill/Parser/Expression.hs
haskell
# LANGUAGE OverloadedStrings # need backtracking? matchers
module Thrill.Parser.Expression where import Thrill.Prelude import Thrill.Parser.Lexer import Thrill.Parser.Pattern import Thrill.Parser.Literal import Thrill.Syntax import Text.Megaparsec hiding (some, many) import Text.Megaparsec.Expr import Control.Comonad.Cofree import Control.Monad (when) import Con...
a18d23a6ee9601b4a95d4a55101eff4d60944bf530c6dd5f705096bfbadcb613
scrintal/heroicons-reagent
document_chart_bar.cljs
(ns com.scrintal.heroicons.mini.document-chart-bar) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 3.5A1.5 1.5 0 014.5 2h6.879a1.5 1.5 0 011.06.44l4.122 4.12A1.5 1.5 0 ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/document_chart_bar.cljs
clojure
(ns com.scrintal.heroicons.mini.document-chart-bar) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 3.5A1.5 1.5 0 014.5 2h6.879a1.5 1.5 0 011.06.44l4.122 4.12A1.5 1.5 0 ...
24a00ebbcb94db730dec63907acbf7c66d0492e0360e574b87800592e1605174
bluelisp/hemlock
wire.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; ;;; **********************************************...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/wire.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- ********************************************************************** ********************************************************************** This file contains an interface to internet domain sockets. Stuff that needs to be ported: Remote Object Randomness REMOTE-O...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . Written by . (in-package :hemlock.wire) (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant +buffer-size+ 2048) (defconstant +initial-cache-size+ 16) (...
ee13bbe4c63ea6df5afd3f774692855094984276ce5c38024c2661f554ae4fdd
Frama-C/Frama-C-snapshot
calculus.ml
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/calculus.ml
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
2b90ec3ac6107de383e90e051e5fb551b317a29dcd309763e7e7de60bfb3c876
maybe-hedgehog-later/hedgehog-golden
Aeson.hs
| This module can be used in order to create golden tests for serializers and -- -- @ { -\ # LANGUAGE TemplateHaskell \#- } -- -- import Hedgehog import qualified Hedgehog . Gen as Gen import qualified Hedgehog . Golden . Aeson as -- -- -- | A golden test for characters in the hex r...
null
https://raw.githubusercontent.com/maybe-hedgehog-later/hedgehog-golden/c0ce794c13c570077e386e5f1dc195e05a99e702/src/Hedgehog/Golden/Aeson.hs
haskell
@ import Hedgehog -- | A golden test for characters in the hex range prop_char_golden :: Property prop_char_golden = Aeson.goldenProperty Gen.hexit tests :: IO Bool tests = checkParallel $$discover @ * Golden tests for generators | Run a golden test on the given generator Thi...
| This module can be used in order to create golden tests for serializers and { -\ # LANGUAGE TemplateHaskell \#- } import qualified Hedgehog . Gen as Gen import qualified Hedgehog . Golden . Aeson as module Hedgehog.Golden.Aeson goldenProperty , goldenProperty' ) where import Pr...
89b00cbbbbe6d666ddfea0eefa1de52626fa4ad5d3ad2ed7e9fd2099e90749f3
blarney-lang/blarney
Derive.hs
import Blarney import System.Environment data MemReq = MemReq { memOp :: Bit 1 -- Is it a load or a store request? 32 - bit address 32 - bit data for stores } deriving (Generic, Bits, FShow) -- Top-level module top :: Module () top = always do let req = MemReq { memOp = 0, memAddr = 100, memData ...
null
https://raw.githubusercontent.com/blarney-lang/blarney/506d2d4f02f5a3dc0a7f55956767d2c2c6b40eca/Examples/Derive/Derive.hs
haskell
Is it a load or a store request? Top-level module Main function
import Blarney import System.Environment data MemReq = MemReq { 32 - bit address 32 - bit data for stores } deriving (Generic, Bits, FShow) top :: Module () top = always do let req = MemReq { memOp = 0, memAddr = 100, memData = 0 } display "req = " req finish main :: IO () main = do args <- getArgs...
f41bb29a3d88506de4c45cab6f6cd3f704459259eb431475eb986178dacf46df
janestreet/async_kernel
eager_deferred_memo.mli
include Async_kernel.Deferred.Memo.S with type 'a deferred := 'a Eager_deferred0.t * @inline
null
https://raw.githubusercontent.com/janestreet/async_kernel/5807f6d4ef415408e8ec5afe74cdff5d27f277d4/eager_deferred/src/eager_deferred_memo.mli
ocaml
include Async_kernel.Deferred.Memo.S with type 'a deferred := 'a Eager_deferred0.t * @inline
ae3cb1106afabe3de240e23b4125616d815f010efc2c676de7d5362c89fb7ba2
spechub/Hets
Parse.hs
module NeSyPatterns.Parse (basicSpec, symb, symbItems, symbMapItems) where import Common.Keywords import Common.AnnoState import Common.Id import Common.IRI import Common.Lexer import Common.Parsec import qualified Common.GlobalAnnotations as GA (PrefixMap) import NeSyPatterns.AS import Data.Maybe (isJust, catMaybe...
null
https://raw.githubusercontent.com/spechub/Hets/fc26b4947bf52be6baf7819a75d7e7f127e290dd/NeSyPatterns/Parse.hs
haskell
-- Function for easier testing Left e -> error $ "***Error:" ++ show e Right a -> a
module NeSyPatterns.Parse (basicSpec, symb, symbItems, symbMapItems) where import Common.Keywords import Common.AnnoState import Common.Id import Common.IRI import Common.Lexer import Common.Parsec import qualified Common.GlobalAnnotations as GA (PrefixMap) import NeSyPatterns.AS import Data.Maybe (isJust, catMaybe...
d008ebe82b4235efe711a6aea5b588011d4db28fd5ce012a36eba4c873c3d58f
well-typed/optics
Re.hs
module MMP.Optics.Re where import Control.Monad import Optics import MetaMetaPost import MMP.Optics.Common reOptics :: Stmts s () reOptics = do clippath <- vardef3 "clippath" SPath SPicture SPicture $ \p a b -> do t1 <- bindSnd_ $ bbox_ a `IntersectionTimes` p ...
null
https://raw.githubusercontent.com/well-typed/optics/1832f316c7b01fdd0526fd0362fc0495e5b97319/metametapost/src/MMP/Optics/Re.hs
haskell
arrows Getter <-> Review Lens <-> ReversedLens & Prism <-> ReversedPrism Prism <-> ReversedPrism Lens <-> ReversedLens pieces TODO: add crossings...
module MMP.Optics.Re where import Control.Monad import Optics import MetaMetaPost import MMP.Optics.Common reOptics :: Stmts s () reOptics = do clippath <- vardef3 "clippath" SPath SPicture SPicture $ \p a b -> do t1 <- bindSnd_ $ bbox_ a `IntersectionTimes` p ...
8a858f73a3f6f244bc85c18d4ff0d6622eed9efecd33421761e695da9a7a0e88
mu-chaco/ReWire
CaseInsertion.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # module ReWire.Core.Transformations.CaseInsertion where import ReWire.Core.Syntax import ReWire.Core.Transformations.Types import ReWire.Core.Transformations.Monad import Control.Monad import Unbound.LocallyNameless --ciAlt = undefined data Decon = WillDecon | WillMatch...
null
https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/cruft/CaseInsertion.hs
haskell
ciAlt = undefined FIXME : not too sure about this case . Is e2 really irrelevant ? FIXME: not too sure about this case. Is e2 really irrelevant?
# OPTIONS_GHC -fwarn - incomplete - patterns # module ReWire.Core.Transformations.CaseInsertion where import ReWire.Core.Syntax import ReWire.Core.Transformations.Types import ReWire.Core.Transformations.Monad import Control.Monad import Unbound.LocallyNameless data Decon = WillDecon | WillMatch | WontDecon derivin...
42b3e4f061cc93b88e86ffdcc7b0155437c5668c4ce82deb99c7ebb6fbedd647
hjcapple/reading-sicp
exercise_5_32.scm
#lang sicp P402 - [ 练习 5.32 - a ] (#%require "ch5-regsim.scm") (#%require "ch5-eceval-support.scm") (define (simple-application? exp) (and (pair? exp) (symbol? (car exp)))) (define eceval-operations (list ;;primitive Scheme operations (list 'read read) ;;operations in syntax.scm (l...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_5/exercise_5_32.scm
scheme
primitive Scheme operations operations in syntax.scm operations in eceval-support.scm for non-tail-recursive machine SECTION 5.4.4 **following instruction optional -- if use it, need monitored stack SECTION 5.4.1 SECTION 5.4.2 SECTION 5.4.3
#lang sicp P402 - [ 练习 5.32 - a ] (#%require "ch5-regsim.scm") (#%require "ch5-eceval-support.scm") (define (simple-application? exp) (and (pair? exp) (symbol? (car exp)))) (define eceval-operations (list (list 'read read) (list 'self-evaluating? self-evaluating?) (list 'quoted? quoted...
7753b0f54bd763be1edb2af22a31436b4643c242809e581ee3d3314487fffb61
OCamlPro/techelson
bigArith.ml
open Base open Common (* Factors Int/Nat stuff. *) module BigInt = struct type t = Z.t let fmt = Z.pp_print let to_string = Z.to_string let of_string = Z.of_string let of_native = Z.of_int let to_native = Z.to_int let add = Z.add let mul = Z.mul let div = Z.div let compare =...
null
https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/4_theory/bigArith.ml
ocaml
Factors Int/Nat stuff.
open Base open Common module BigInt = struct type t = Z.t let fmt = Z.pp_print let to_string = Z.to_string let of_string = Z.of_string let of_native = Z.of_int let to_native = Z.to_int let add = Z.add let mul = Z.mul let div = Z.div let compare = Z.compare let zero = Z.z...
75ee8dbfcc7d7aa12614fda747253c0c0a2eb6bbc4e3995416247716bba39f51
Workiva/eva
core.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/messaging/jms/beta/core.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.v2.messaging.jms.beta.core (:require [clojure.spec.alpha :as s]) (:import (java.time Instant) (javax.jms Destination Session MessageProducer ...
ab9e7a44e9bb8f2b66f5f0c90680a811d05a5d8310dba4ef666d14cdd024cd07
gigasquid/eodermdrome
parser.clj
(ns eodermdrome.parser (:require [eodermdrome.graph :as eg] [clojure.set :as set] [instaparse.core :as insta])) (def parser (insta/parser "program = cmdline (<'\n'> cmdline)* cmdline = (<comment> <space>*)* cmd (<space>* <comment>)* cmd = cmd-p...
null
https://raw.githubusercontent.com/gigasquid/eodermdrome/681b9205a8d27c86c72e5a22ae5d82496cbd29f0/src/eodermdrome/parser.clj
clojure
(ns eodermdrome.parser (:require [eodermdrome.graph :as eg] [clojure.set :as set] [instaparse.core :as insta])) (def parser (insta/parser "program = cmdline (<'\n'> cmdline)* cmdline = (<comment> <space>*)* cmd (<space>* <comment>)* cmd = cmd-p...
1b5af8f140dcda12652ff31e8df96a7a7f9d4f1124c68e1e0a3524b5e9f60b00
Metaxal/rwind
launcher-base.rkt
#lang racket/base ; launcher-base.rkt (require rwind/base rwind/util rwind/doc-string racket/file racket/list) (define history-max-length 50) (define rwind-launcher-history-file (find-user-config-file rwind-dir-name "rwind-launcher-history.txt")) (define* (launcher-history) "H...
null
https://raw.githubusercontent.com/Metaxal/rwind/5a4f580b0882452f3938aaa1711a6d99570f006f/launcher-base.rkt
racket
launcher-base.rkt If history is too long, truncate it and rewrite the file (we don't want the history to grow indefinitely)
#lang racket/base (require rwind/base rwind/util rwind/doc-string racket/file racket/list) (define history-max-length 50) (define rwind-launcher-history-file (find-user-config-file rwind-dir-name "rwind-launcher-history.txt")) (define* (launcher-history) "History of launched c...
86b13d17b4f4865d1a937432aafbbf1fa38c20e0aacfa2e055b015564892e0c0
disco-framework/disco
changer_tests.erl
%% @hidden to edoc -module(changer_tests). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). %% %% tests change_state_test() -> MockedMods = [port_utils, json], meck:new(MockedMods, [passthrough]), meck:new(application, [passthrough, unstick]), meck:expect(port_utils, easy_open_killer_port, f...
null
https://raw.githubusercontent.com/disco-framework/disco/f55f35d46d43ef5f4fa1466bdf8d662f5f01f30f/src/test/changer_tests.erl
erlang
@hidden to edoc tests
-module(changer_tests). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). change_state_test() -> MockedMods = [port_utils, json], meck:new(MockedMods, [passthrough]), meck:new(application, [passthrough, unstick]), meck:expect(port_utils, easy_open_killer_port, fun(_) -> foo_port end), Por...
55f7b325f3da2671a3289841e3ea4170fcd74e53376bc99d9694d0b2928f3de3
HJianBo/sserl
sserl_sup.erl
%%%------------------------------------------------------------------- %% @doc sserl top level supervisor. %% @end %%%------------------------------------------------------------------- -module(sserl_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]). -include("...
null
https://raw.githubusercontent.com/HJianBo/sserl/9e42930caf8bfe90ae9ed2edac2e0672f7e5e55e/apps/sserl/src/sserl_sup.erl
erlang
------------------------------------------------------------------- @doc sserl top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions =================================...
-module(sserl_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -include("sserl.hrl"). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules } init([]) -> TrafficEvent =...
d915002ce55b46c116f698624e2ad377b69d151559b633cfcba0e24ac3eb15b2
huangjs/cl
dlasq1.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dlasq1.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
e590530c5d6e77dce82f15728923adfba9b9759760ca230a484b6f816a888dc2
mstepniowski/project-euler
euler_016.clj
Solution to Project Euler problem 16 ;; ;; 2 ^ 15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26 . ;; What is the sum of the digits of the number 2 ^ 1000 ? (ns com.stepniowski.euler-016) (defn power [x y] (. (. java.math.BigInteger (valueOf x)) (pow y))) (defn solution [] (let [digits (map #(...
null
https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_016.clj
clojure
Solution to Project Euler problem 16 2 ^ 15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26 . What is the sum of the digits of the number 2 ^ 1000 ? (ns com.stepniowski.euler-016) (defn power [x y] (. (. java.math.BigInteger (valueOf x)) (pow y))) (defn solution [] (let [digits (map #(Integer/pa...
e3aa564aeb3c3201b85963ec8258aebf0084d87767374e01201968b6a2d06713
slipstream/SlipStreamServer
cookies_test.clj
(ns com.sixsq.slipstream.auth.cookies-test (:refer-clojure :exclude [update]) (:require [clj-time.coerce :as c] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer :all] [com.sixsq.slipstream.auth.cookies :as t] [com.sixsq.slipstream.auth.env-fixture :as env-fixture] [...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/token/clj/test/com/sixsq/slipstream/auth/cookies_test.clj
clojure
(ns com.sixsq.slipstream.auth.cookies-test (:refer-clojure :exclude [update]) (:require [clj-time.coerce :as c] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer :all] [com.sixsq.slipstream.auth.cookies :as t] [com.sixsq.slipstream.auth.env-fixture :as env-fixture] [...