_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
6cc70b5b07dc566af976ec1a0d98eca4fceac7b67c472bc636534cf473b2c0d3
goldfirere/singletons
Enum.hs
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # ----------------------------------------------------------------------------- -- | -- Module : Data.Singletons.Base.Enum Copyright : ( C ) 2014 , -- License ...
null
https://raw.githubusercontent.com/goldfirere/singletons/a169d3f6c0c8e962ea2983f60ed74e507bca9b2b/singletons-base/src/Data/Singletons/Base/Enum.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Singletons.Base.Enum License : BSD-style (see LICENSE) Stability : experimental Portability : non-portable classes. names are likely to clash with code that deals with unary natural numbers. want them. ...
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # Copyright : ( C ) 2014 , Maintainer : ( ) Defines the promoted and singleton version of the ' Bounded ' and ' ' type While " Prelude . Singletons " re ...
b50aaabcaa72015e76b8077f498fb57eb539d494533f80bce90367355bf98894
berke/aurochs
seq.ml
(*** Seq *) type 'a t = | It of 'a | Lst of 'a list | Seq of 'a t list ;; let empty = Seq[];; let ( !! ) a = It a;; let ( ^^^ ) a s = match s with | It _ as a' -> Seq[It a; a'] | Seq l -> Seq((It a) :: l) | Lst l -> Lst(a :: l) ;; let ( ** ) s1 s2 = match (s1,s2) with | (It a, _) -> a ^^^ s1 | (_,...
null
https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/util/seq.ml
ocaml
** Seq
type 'a t = | It of 'a | Lst of 'a list | Seq of 'a t list ;; let empty = Seq[];; let ( !! ) a = It a;; let ( ^^^ ) a s = match s with | It _ as a' -> Seq[It a; a'] | Seq l -> Seq((It a) :: l) | Lst l -> Lst(a :: l) ;; let ( ** ) s1 s2 = match (s1,s2) with | (It a, _) -> a ^^^ s1 | (_, _) -> Seq[s...
eb10170cca80c670c2be538c147286e2a813618c8795f4292941c1bec0c10308
andrewzhurov/brawl-haus
entities.cljs
(ns brawl-haus.fit.entities (:require [brawl-haus.fit.misc :as misc] [brawl-haus.fit.player :as player] [brawl-haus.fit.sound :as sound] [brawl-haus.fit.time :as time] [brawl-haus.fit.state :as state] [brawl-haus.fit.utils :as u] [brawl-haus.fit....
null
https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/cljs/brawl_haus/fit/entities.cljs
clojure
:state :normal :frame 0
(ns brawl-haus.fit.entities (:require [brawl-haus.fit.misc :as misc] [brawl-haus.fit.player :as player] [brawl-haus.fit.sound :as sound] [brawl-haus.fit.time :as time] [brawl-haus.fit.state :as state] [brawl-haus.fit.utils :as u] [brawl-haus.fit....
b400d3d7e7a90a4fcdf2c086330f85dd8da5353116181ecc12f896179cf1d5b1
triffon/fp-2019-20
graphs-and-streams.rkt
#lang racket ; Отложени операции delay от даден израз прави отложена операция ; или още promise (delay (+ 1 2)) ; #<promise> Как обаче да вземем потрябва . (define some-expression (delay (+ 1 2))) force взима дадена отложена операция ( promise ) ; и я оценява 3 С помощта на тези 2 функции можем да си ...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-4/08/graphs-and-streams.rkt
racket
Отложени операции или още promise #<promise> и я оценява 1) '() е поток - t е promise за поток. Генерира безкраен поток от стойности v (1 1 1 1 1) Генерира безкрайния поток x, f(x), f(f(x)), ... (cycle '(1 2 3)) би създало потока: | | v v Бихме го записали: Още няколко функции за работа с граф...
#lang racket delay от даден израз прави отложена операция Как обаче да вземем потрябва . (define some-expression (delay (+ 1 2))) force взима дадена отложена операция ( promise ) 3 С помощта на тези 2 функции можем да си . Поток е списък , чиито елементи се оценяват отложено 2 ) ( h. t ) е поток т...
af55d4e71a6465e73478f2bb8ea263a867d6898c7ccc0de8c61480104439ecb9
haroldcarr/learn-haskell-coq-ml-etc
UseWriterTwo.hs
# LANGUAGE FlexibleContexts # module UseWriterTwo where import Control.Monad.Writer.Strict import Prelude hiding (log) import Test.HUnit as T import Test.HUnit.Util as U ------------------------------------------------------------------------------ data Action = One | Two deriving (Eq, Show) lAct :: (MonadWriter ([...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/monads/m/src/UseWriterTwo.hs
haskell
---------------------------------------------------------------------------- $
# LANGUAGE FlexibleContexts # module UseWriterTwo where import Control.Monad.Writer.Strict import Prelude hiding (log) import Test.HUnit as T import Test.HUnit.Util as U data Action = One | Two deriving (Eq, Show) lAct :: (MonadWriter ([Action], [String]) m) => Action -> m () lAct x = tell ([x], []) lStr :: (Mona...
568556e881891a679e7c46cff009631c4a179d61e523b538cecec4ae138ca8c5
boomerang-lang/boomerang
bdiff3.ml
(******************************************************************************) The Harmony Project (******************************************************************************) Copyright ( C ) 2008 and ...
null
https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/lib/bdiff3.ml
ocaml
**************************************************************************** **************************************************************************** This library is free software; you can redistribute it and/or modify it u...
The Harmony Project Copyright ( C ) 2008 and License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later ...
ee2a9e12c35be92d1d3b2ba684560e0eb03cfd6122ef6b7a8e04a216188b0256
sabine/ocaml-to-wasm
test.ml
let a = 13
null
https://raw.githubusercontent.com/sabine/ocaml-to-wasm/de98909a3ce3e902c4d18852a142c33ae75f7285/tests/a01_global/test.ml
ocaml
let a = 13
9ab623e81d4d2c2577af89a70828242ab44faa40908136a55cd42ef419c9addf
mwunsch/overscan
event.rkt
#lang racket/base (require ffi/unsafe/introspection racket/contract "private/core.rkt") (provide (contract-out [event? (-> any/c boolean?)] [event-type (-> event? (gi-enum-value/c gst-event-type))] [event-s...
null
https://raw.githubusercontent.com/mwunsch/overscan/f198e6b4c1f64cf5720e66ab5ad27fdc4b9e67e9/gstreamer/event.rkt
racket
#lang racket/base (require ffi/unsafe/introspection racket/contract "private/core.rkt") (provide (contract-out [event? (-> any/c boolean?)] [event-type (-> event? (gi-enum-value/c gst-event-type))] [event-s...
5204930b7f156e4b869b547b2ca04c670d029604154d81c65d0be9f408de5c6d
xclerc/ocamljava
javaChar.mli
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/javalib/src/javaChar.mli
ocaml
* Utility functions for [char] type and [Character] class. * The type of wrappers for character values. * The smallest value for character values. * The largest value for character values. * Returns a new {java java.lang.Character} wrapper for the passed value. * Returns the wrapped value. * Compares the passed v...
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * library is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation ; either version 3 of the License , or * ( at yo...
11925b0fa4a344d887ee9cb81e12d452ad220b426040929e53fbb59ee5e79a6b
den1k/vimsical
text.clj
(ns vimsical.frontend.styles.text) (def text [[:.truncate {:white-space :nowrap :overflow :hidden :text-overflow :ellipsis}]])
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/styles/text.clj
clojure
(ns vimsical.frontend.styles.text) (def text [[:.truncate {:white-space :nowrap :overflow :hidden :text-overflow :ellipsis}]])
a42dff951e570353354edc78831185b8e03e31bdba54e32b93e72cf4bd23711c
cmerrick/plainview
consumer.clj
(ns plainview.consumer (:require [cheshire.core :refer :all] [amazonica.aws.kinesis :as kinesis] [amazonica.aws.s3 :as s3] [clojure.tools.cli :refer [parse-opts]])) (defn- to-json [byte-buffer] (let [b (byte-array (.remaining byte-buffer))] (.get byte-buffer b) (parse-st...
null
https://raw.githubusercontent.com/cmerrick/plainview/388f9c0f63f1d0b4cb23bf7f5f0775d6c1e0f39c/src/clj/plainview/consumer.clj
clojure
default to disabled checkpointing, can still force a checkpoint by returning true from the processor function
(ns plainview.consumer (:require [cheshire.core :refer :all] [amazonica.aws.kinesis :as kinesis] [amazonica.aws.s3 :as s3] [clojure.tools.cli :refer [parse-opts]])) (defn- to-json [byte-buffer] (let [b (byte-array (.remaining byte-buffer))] (.get byte-buffer b) (parse-st...
3e0be794bf9330f71c9852f38c036df0987faa41d7ad0aef0edcacb13e9bf310
Metaxal/MrEd-Designer
widget.rkt
#lang racket/base (require "../../mred-plugin.rkt" "../../default-values.rkt" racket/gui/base) (make-plugin [type 'message] [tooltip "Message"] [button-group "Controls"] [widget-class message%] [parent-class container-classes] [necessary '(label parent)] ; necessary properties [options '()] ...
null
https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/widgets/message/widget.rkt
racket
necessary properties widget properties or: 'app 'caution 'stop !!
#lang racket/base (require "../../mred-plugin.rkt" "../../default-values.rkt" racket/gui/base) (make-plugin [type 'message] [tooltip "Message"] [button-group "Controls"] [widget-class message%] [parent-class container-classes] [options '()] [style (prop:some-of '(deleted) '())] [font (fon...
f4318b5e4b0b7ef384446533d877e4232ac5e50ed97caaf4ab6b1f4c89034c23
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.admin.pages.class-profile.students-list.views (:require [re-frame.core :as re-frame] [reagent.core :as r] [webchange.admin.pages.class-profile.students-list.state :as state] [webchange.admin.pages.class-profile.state :as parent-state] [webchange.admin.widgets.page.views :as page] ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/2b14cfa0b116034312a382763e6aebd67e2f25a7/src/cljs/webchange/admin/pages/class_profile/students_list/views.cljs
clojure
(ns webchange.admin.pages.class-profile.students-list.views (:require [re-frame.core :as re-frame] [reagent.core :as r] [webchange.admin.pages.class-profile.students-list.state :as state] [webchange.admin.pages.class-profile.state :as parent-state] [webchange.admin.widgets.page.views :as page] ...
3177eebe0a42cc35bdebc585695a1a55894f03eaa444b194b1d082d3921300a8
vikram/lisplibraries
examples.lisp
;;;; -*- lisp -*- (in-package :it.bese.ucw-user) ;;;; The definiton of the example application (defvar *example-application* (make-instance 'cookie-session-application :url-prefix "/" :tal-generator (make-instance 'yaclml:file-system-generator ...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_dev/examples/examples.lisp
lisp
-*- lisp -*- The definiton of the example application define the window component the welcome page the transaction demo error related examples just like the above example but write directly to the client stream. you can usually tell the difference if N is large. All rights reserved. Redistribution and use...
(in-package :it.bese.ucw-user) (defvar *example-application* (make-instance 'cookie-session-application :url-prefix "/" :tal-generator (make-instance 'yaclml:file-system-generator :cachep t ...
ce83c909b940515391422313247e6376dec126abf85b72d777f8a640967b75ea
tlehman/sicp-exercises
ex-1.37.scm
Exercise 1.37 : An infinite continued fraction is an expression of the form ; N₁ ; f = ----------------- D₁ + N₂ ; --------- ; D₂ + N₃ ; ---- ; D₃+… ; ; As an example, one can show that th...
null
https://raw.githubusercontent.com/tlehman/sicp-exercises/57151ec07d09a98318e91c83b6eacaa49361d156/ex-1.37.scm
scheme
f = ----------------- --------- D₂ + N₃ ---- D₃+… As an example, one can show that the infinite continued fraction expansion expansion after a given number of terms. Such a truncation is called a k-term finite continue...
Exercise 1.37 : An infinite continued fraction is an expression of the form N₁ D₁ + N₂ with the Nᵢ and Dᵢ all equal to 1 produces 1 / φ , where φ is the golden ratio . One way to approximate an infinite continued fraction is to truncate the Suppose that n and d are proce...
1a3f04a8440897fe0279cfd7f90c6f8b2b2174b3b05af769da48fcf68b2dfb52
aliaksandr-s/prototyping-with-clojure
app.cljs
(ns visitera.app (:require [visitera.core :as core])) ;;ignore println statements in prod (set! *print-fn* (fn [& _])) (core/init!)
null
https://raw.githubusercontent.com/aliaksandr-s/prototyping-with-clojure/e1f90bf66c315de1dfa72624895637f1c609c42e/app/chapter-07/end/visitera/env/prod/cljs/visitera/app.cljs
clojure
ignore println statements in prod
(ns visitera.app (:require [visitera.core :as core])) (set! *print-fn* (fn [& _])) (core/init!)
3a4f6b318175cb2ad6e82ea59de0da2e25f63fcb496c5d3bc3a7319da1c11fb1
haskell-compat/base-compat
CompatSpec.hs
module Numeric.CompatSpec (main, spec) where import Test.Hspec import Numeric.Compat main :: IO () main = hspec spec spec :: Spec spec = do describe "showFFloatAlt" $ do it "shows a RealFloat value, always using decimal notation" $ showFFloatAlt Nothing (12 :: Double) "" `shouldBe` "12.0" it "allows...
null
https://raw.githubusercontent.com/haskell-compat/base-compat/3be91c934896977c67a7a4a24d1a321e7b2b4d0e/base-compat-batteries/test/Numeric/CompatSpec.hs
haskell
module Numeric.CompatSpec (main, spec) where import Test.Hspec import Numeric.Compat main :: IO () main = hspec spec spec :: Spec spec = do describe "showFFloatAlt" $ do it "shows a RealFloat value, always using decimal notation" $ showFFloatAlt Nothing (12 :: Double) "" `shouldBe` "12.0" it "allows...
6889220290ce916350e5461b88a4cce1494b7ae3d5297af1619caee03bcb72fd
polyfy/polylith
select_lib_deps_test.clj
(ns polylith.clj.core.path-finder.select-lib-deps-test (:require [clojure.test :refer :all] [polylith.clj.core.path-finder.test-data :as test-data] [polylith.clj.core.path-finder.interface.criterias :as c] [polylith.clj.core.path-finder.interface.select :as select])) (deftest all-...
null
https://raw.githubusercontent.com/polyfy/polylith/e3bc4556f5efa0346bd144dfe579a7a453a4464d/components/path-finder/test/polylith/clj/core/path_finder/select_lib_deps_test.clj
clojure
(ns polylith.clj.core.path-finder.select-lib-deps-test (:require [clojure.test :refer :all] [polylith.clj.core.path-finder.test-data :as test-data] [polylith.clj.core.path-finder.interface.criterias :as c] [polylith.clj.core.path-finder.interface.select :as select])) (deftest all-...
ab628cfc04f84a381d88465f549a5f1e24705523dee3ada2ad9a8c1804154257
EgorDm/fp-pacman
Constants.hs
module Constants where import Graphics.Gloss.Data.Color(black) -- | Window name gameName = "FP Pacman" background = black -- | Windows size constants width, height, offset :: Int width = 448 height = 560 offset = 100 -- | FPS ofcourse fps :: Int fps = 60 -- | Paths -- resourceDir = "../res/" --for interpreter reso...
null
https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Constants.hs
haskell
| Window name | Windows size constants | FPS ofcourse | Paths resourceDir = "../res/" --for interpreter | Sprite Interval | Game specifics
module Constants where import Graphics.Gloss.Data.Color(black) gameName = "FP Pacman" background = black width, height, offset :: Int width = 448 height = 560 offset = 100 fps :: Int fps = 60 resourceDir = "res/" spriteScale :: Float spriteScale = 2 spriteInterval :: Float spriteInterval = 0.08 epsilon :: Float...
f6af234127082518748f0d5ac7492e9f59b0e0220c9c0305707631d3d7fcb5be
jiangpengnju/htdp2e
ex203.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 ex203) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/extended-exercises-lists/ex203.rkt
racket
about the language level of this file in a form that our tools can easily process. a possibly empty sequence of "connected" segments. Here "connected" means that treat all segments -- head and tail segments -- the same. Then modify your program form ex201 to accommodate a multi-segment worm. and ( 3 ) ignore that...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex203) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Develop a data representation for worms with tails . A worm...
ef18036ca04837eb776d9b0280955bdfc9cf2e8311e3e3475512b4d22b267e03
cartazio/tlaps
e_t.mli
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) open Property;; open Util;; * Type of bulleted lists . [ And ] and [ Or ] are the standard TLA+ bulleted lists of 1 or more arguments . [ Refs ] represents a generic conjunction that c...
null
https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/expr/e_t.mli
ocaml
* An "expression" is either a TLA+ expression, operator or sequent operators sequents unified module and subexpression references ordinary TLA+ expressions true -> @ from except / false -> @ from proof-step * actual parens in source syntax * named label * indexed label * subexpression selectors * Except ...
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) open Property;; open Util;; * Type of bulleted lists . [ And ] and [ Or ] are the standard TLA+ bulleted lists of 1 or more arguments . [ Refs ] represents a generic conjunction that c...
78d7885fd37888888293e5d4b902d58542f6ab5602e24e686a7d7dc2665031fe
mk270/archipelago
terrain.mli
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
null
https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/model/terrain.mli
ocaml
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
cd6cf147611a059d24e8a1008ae4bae54a1458d55b64d3a9b02ef58fb162ec3c
kallisti-dev/hs-webdriver
SearchBaidu.hs
{-# LANGUAGE OverloadedStrings #-} module SearchBaidu where import Control.Monad import Control.Applicative import Data.List import qualified Data.Text as T import Test.WebDriver import Test.WebDriver.Commands.Wait import Prelude chromeConf = useBrowser chrome defaultConfig ffConf = defaultConfig Have no fun with...
null
https://raw.githubusercontent.com/kallisti-dev/hs-webdriver/ea594ce8720c9e11f053b2567f250079f0eac33b/test/etc/SearchBaidu.hs
haskell
# LANGUAGE OverloadedStrings #
module SearchBaidu where import Control.Monad import Control.Applicative import Data.List import qualified Data.Text as T import Test.WebDriver import Test.WebDriver.Commands.Wait import Prelude chromeConf = useBrowser chrome defaultConfig ffConf = defaultConfig Have no fun with baidu but only cause it is loading...
09f0ed06442d5acab947d8684a00d344e9c911408bb29583448dfeac8c1da429
threatgrid/asami-loom
project.clj
(defproject org.clojars.quoll/asami-loom "0.3.1" :description "Loom extensions to Asami" :url "-loom" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.2"] [org.clojure/clojurescript "1.10.773"] ...
null
https://raw.githubusercontent.com/threatgrid/asami-loom/48bb93d433171e2f7ca62d130670226f9700075c/project.clj
clojure
(defproject org.clojars.quoll/asami-loom "0.3.1" :description "Loom extensions to Asami" :url "-loom" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.2"] [org.clojure/clojurescript "1.10.773"] ...
26225e2efa46a1fa30f688a1227fe5668ddd9da6b1d2b7ae7c6cf743c523f5c0
mfikes/fifth-postulate
ns321.cljs
(ns fifth-postulate.ns321) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns321.cljs
clojure
(ns fifth-postulate.ns321) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
dec48b8bbdd81cd00da920ef54ba24412d9c005685125b341e2e1f782ce755cb
votinginfoproject/data-processor
custom_ballot.clj
(ns vip.data-processor.output.v3-0.custom-ballot (:require [vip.data-processor.output.xml-helpers :refer :all] [korma.core :as korma])) (defn ballot-responses "Find ballot responses belonging to a custom ballot. Goes through the custom_ballot_ballot_responses table to grab their `id` and `sort_orde...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/output/v3_0/custom_ballot.clj
clojure
(ns vip.data-processor.output.v3-0.custom-ballot (:require [vip.data-processor.output.xml-helpers :refer :all] [korma.core :as korma])) (defn ballot-responses "Find ballot responses belonging to a custom ballot. Goes through the custom_ballot_ballot_responses table to grab their `id` and `sort_orde...
16adca511f49dfb9c3f09c073702a328cfad44442980ee6bc69a251dc2efb536
alexandergunnarson/quantum
async.cljc
(ns ^{:doc "Asynchronous and thread-related functions." :attribution "alexandergunnarson"} quantum.core.async (:refer-clojure :exclude [locking promise deliver, delay force, realized? future repeatedly count reduce, for conj!, contains? map, map-indexed]) (:require [clojure.core ...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/async.cljc
clojure
===== LOCKS AND SEMAPHORES ===== ; `monitor-enter`, `monitor-exit` ([] (async+/chan)) ; can't have no-arg |defnt| receive send `join` after interrupt doesn't work ([ ] (.isInterrupted ^Strand (current-strand))) ([x] (interrupted?* x)))) TODO CLJS TODO CLJS TODO CLJS TODO CLJS MORE COMPLEX OPERATIONS --...
(ns ^{:doc "Asynchronous and thread-related functions." :attribution "alexandergunnarson"} quantum.core.async (:refer-clojure :exclude [locking promise deliver, delay force, realized? future repeatedly count reduce, for conj!, contains? map, map-indexed]) (:require [clojure.core ...
8883c925982df9cebc262fb2ea34b68f783a1121316f9894bd4bf85097e06c03
magehash/magehash
chrome.clj
(ns chrome (:require [clojure.core.async :refer [>! <!! <! go chan timeout alts!!]] [clojure.string :as string] [org.httpkit.client :as http] [clojure.data.json :as json] [gniazdo.core :as ws])) (defn !capitalize [s] (if (< (count s) 2) (.toLowerCase s) (str ...
null
https://raw.githubusercontent.com/magehash/magehash/9545d65a10a570536f8c6d9ebbafc4982e07cedc/src/chrome.clj
clojure
(ns chrome (:require [clojure.core.async :refer [>! <!! <! go chan timeout alts!!]] [clojure.string :as string] [org.httpkit.client :as http] [clojure.data.json :as json] [gniazdo.core :as ws])) (defn !capitalize [s] (if (< (count s) 2) (.toLowerCase s) (str ...
e44c61f1a7f4dfc8cab360515885a522f7bb915c2217eee05458bc7257517eb5
GaloisInc/surveyor
ValueSelector.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Surveyor.Brick.Widget.ValueSelector ( ValueSelector, ValueSelectorForm, valueSelectorForm, selectedIndex, selectedValue, renderValueSelectorForm, handle...
null
https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Widget/ValueSelector.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # | This is a type capturing the data necessary to render the value selector form We have to carefully quantify type parameters so that we can mesh well with brick. | This wrapper quantifies out the ctx parameter from the form so that we can return it | A degenerate...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Surveyor.Brick.Widget.ValueSelector ( ValueSelector, ValueSelectorForm, valueSelectorForm, selectedIndex, selectedValue, renderValueSelectorForm, handleValueSelectorFormEvent ) where import qualified Brick a...
475644cd96ae4ce5c8fe26a624d10fd91656dab50e0a3ae2e01787b0fe47b042
chef-boneyard/opscode-pushy-server
pushy_process_monitor.erl
%%%------------------------------------------------------------------- @author %%% @doc A simple process monitor which inserts process statistics %%% to folsom %%% %%% @end %%%------------------------------------------------------------------- Copyright 2012 Chef Software , Inc. All Rights Reserved . %% This ...
null
https://raw.githubusercontent.com/chef-boneyard/opscode-pushy-server/7272326960fcc35eaa99fa8d5f5bd58959755b3e/apps/pushy/src/pushy_process_monitor.erl
erlang
------------------------------------------------------------------- @doc A simple process monitor which inserts process statistics to folsom @end ------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file except in compliance with the License. You m...
@author Copyright 2012 Chef Software , Inc. All Rights Reserved . This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(pushy_process_monitor). -behaviour(gen_server). -compile...
1496a3dc78216d7051334b8a05e7a23b3b5479268eea1b5e5fa1483f02405b9b
bondy-io/bondy
bondy_peer_discovery_dns_agent.erl
%% ============================================================================= %% bondy_peer_discovery_dns_agent.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance wit...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_peer_discovery_dns_agent.erl
erlang
============================================================================= bondy_peer_discovery_dns_agent.erl - 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...
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , that uses DNS for service discovery . Where service_name is the service to be used by the DNS lookup . -m...
75e317f6138ba10b64ce460e65d643ac26cc3641dcaecdc23ccf10094c55d4d4
REMath/mit_16.399
concrete_To_Abstract_Syntax.mli
(* concrete_To_Abstract_Syntax.mli *) open Abstract_Syntax (* abstract syntax *) type variable = Abstract_Syntax.variable and aexp = Abstract_Syntax.aexp and bexp = Abstract_Syntax.bexp and label = Abstract_Syntax.label and com = Abstract_Syntax.com (* concrete syntax *) type c_bexp = | C_TRUE | C_FALSE | C_LT of ae...
null
https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-Abstract-Interpreter/concrete_To_Abstract_Syntax.mli
ocaml
concrete_To_Abstract_Syntax.mli abstract syntax concrete syntax normalization of boolean expressions labels command entry label command exit label label in command program entry label program exit label program labelling
open Abstract_Syntax type variable = Abstract_Syntax.variable and aexp = Abstract_Syntax.aexp and bexp = Abstract_Syntax.bexp and label = Abstract_Syntax.label and com = Abstract_Syntax.com type c_bexp = | C_TRUE | C_FALSE | C_LT of aexp * aexp | C_LEQ of aexp * aexp | C_EQ of aexp * aexp | C_NEQ of aexp * aexp ...
90884c27c7edee04e52cffe3be4505ce0e11d9a28a47ac0d15798ea8efac75bb
gigamonkey/monkeylib-parser
parser.lisp
;;; Copyright ( c ) 2003 - 2005 , Gigamonkeys Consulting All rights reserved . ;;; Parser generator , loosely based on META paper . The ;;; most obvious change is that we don't user reader macros because ;;; they're too much of a hassle. ;;; (in-package :com.gigamonkeys.parser) (defvar *productions* (make-hash...
null
https://raw.githubusercontent.com/gigamonkey/monkeylib-parser/4327b4ba273f0b79310cb488e495c2a5e49884b4/parser.lisp
lisp
most obvious change is that we don't user reader macros because they're too much of a hassle. of input they consume. CHARACTER-PARSERs consume characters and can turn them into a vector of tokens or can proceed directly to a tree might be produced by a CHARACTER-PARSER but not necessarily) and return whatever...
Copyright ( c ) 2003 - 2005 , Gigamonkeys Consulting All rights reserved . Parser generator , loosely based on META paper . The (in-package :com.gigamonkeys.parser) (defvar *productions* (make-hash-table :test #'eql)) Parsers -- different subclasses of PARSER differ based on the kind or object representat...
f7bafde02afc75fec7bccf44143c201e834cac12490ec786c87bbb99ff587f44
cornell-pl/forest
Swat.hs
# LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables # module Main where import Language.Pads.Padsc hiding (take, rest, head) import Language.Pads.BaseTypes import Language.Forest.Forestc hiding (test, numErrors) impor...
null
https://raw.githubusercontent.com/cornell-pl/forest/3772c1f44cdee0b705e927a14b54d84e60e224e6/src/Examples/Swat.hs
haskell
Known issue: we assume unix line endings for files on system (pcp, fig). Note: doesn't work on default pcp.pcp or tmp.tmp file because it appears those files are missing newlines at the end. Not sure if this is an input error, or something I should take into account?
# LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables # module Main where import Language.Pads.Padsc hiding (take, rest, head) import Language.Pads.BaseTypes import Language.Forest.Forestc hiding (test, numErrors) impor...
8430eb8484f392f2665bfa97f707837cd948672b30890f51f9a5fd93e2daca65
alakahakai/hackerrank
area-under-curves.hs
Area Under Curves and Volume of Revolving a Curve -under-curves-and-volume-of-revolving-a-curv Author : < > Date : June 15th , 2015 Area Under Curves and Volume of Revolving a Curve -under-curves-and-volume-of-revolving-a-curv Author: Ray Qiu <> Date: June 15th, 2015 -} import C...
null
https://raw.githubusercontent.com/alakahakai/hackerrank/465d17107bbe402daf750651bb57cf092305acf9/fp/area-under-curves.hs
haskell
This function should return a list [area, volume].
Area Under Curves and Volume of Revolving a Curve -under-curves-and-volume-of-revolving-a-curv Author : < > Date : June 15th , 2015 Area Under Curves and Volume of Revolving a Curve -under-curves-and-volume-of-revolving-a-curv Author: Ray Qiu <> Date: June 15th, 2015 -} import C...
71fbe274e4508a766bed3d6b864158a9d90dde1e1bbcfd4123e66febdd3ae74c
hatsugai/SyncStitch
t.ml
open Printf type tvar = int type tgen = int type t = Var of tvar | App of tcon * t list | Gen of tgen and tcon = Bool | Int of (int * int) option | Fun | Tuple | Set | List | Event | Process | Name of Id.t let bool = App (Bool, []) let int = App (Int None, []) let event = App (Event, []) let even...
null
https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/t.ml
ocaml
open Printf type tvar = int type tgen = int type t = Var of tvar | App of tcon * t list | Gen of tgen and tcon = Bool | Int of (int * int) option | Fun | Tuple | Set | List | Event | Process | Name of Id.t let bool = App (Bool, []) let int = App (Int None, []) let event = App (Event, []) let even...
155ada980401ed81cb77e9fee27b194d663a3171ad5e08c5407ad1fea2e33658
afainer/cleven
sprite.lisp
Copyright ( c ) 2015 - 2016 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining ;;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;;; without limitation the rights to use, copy, modify, merg...
null
https://raw.githubusercontent.com/afainer/cleven/24e3102f01c4f18152b2618c994aa7b6a7598755/sprite.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMPLIED, ...
Copyright ( c ) 2015 - 2016 , < > " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to included in all copies or substantial portions of the Softw...
878289f1198e00c1a72ebc746e5b3e1e7e53cb8a4144d6c58afa9a8448b101b8
tcsprojects/ocaml-sat-solvers
picosatwrapper.mli
open Satwrapper;; open Picosat;; class picosatSolverFactory: object inherit solverFactory method description: string method identifier: string method short_identifier: string method copyright: string method url: string method new_instance: abstractSolver end
null
https://raw.githubusercontent.com/tcsprojects/ocaml-sat-solvers/2c36605fb3e38a1bee41e079031ab5b173794910/deprecated/picosat/picosatwrapper.mli
ocaml
open Satwrapper;; open Picosat;; class picosatSolverFactory: object inherit solverFactory method description: string method identifier: string method short_identifier: string method copyright: string method url: string method new_instance: abstractSolver end
d4e9cf214185caf82e15100e87bfdf3eb999706525007b61cce84b372ea72a2e
uncomplicate/deep-diamond
impl.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) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/deep-diamond/35e23851fc4c7f859e2fbd4025a61b409d5f9037/src/clojure/uncomplicate/diamond/internal/cudnn/impl.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE 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 rem...
Copyright ( c ) . All rights reserved . (ns uncomplicate.diamond.internal.cudnn.impl (:require [uncomplicate.commons [core :refer [Releaseable release with-release let-release Info Wrapper Wrappable wrap extract info Viewable view]] [utils :refer [dragan-say...
9836676df3324fcdbcf0fb359c81b1c834523abfd250a744fcf293dc4148bb47
alexandergunnarson/quantum
python.cljc
(ns quantum.interop.python (:require [clojure.string :as str] [quantum.core.vars :as var]) (:import #?(:clj [org.python.util PythonInterpreter]) #?(:clj [org.python.core PyObject Py PyModule]))) (declare ^:dynamic *interp*) #?(:clj (defn append-paths "Appends a vector of paths to the pytho...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/interop/python.cljc
clojure
(ns quantum.interop.python (:require [clojure.string :as str] [quantum.core.vars :as var]) (:import #?(:clj [org.python.util PythonInterpreter]) #?(:clj [org.python.core PyObject Py PyModule]))) (declare ^:dynamic *interp*) #?(:clj (defn append-paths "Appends a vector of paths to the pytho...
fec498ad25327fb99ac666ffe78b5f808aa686b145cd50377767fe98735fbeec
ocaml-multicore/eio
eio_luv.ml
* Copyright ( C ) 2021 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DIS...
null
https://raw.githubusercontent.com/ocaml-multicore/eio/b0f80ccaffde49cec333903f19e25bb92b9834a4/lib_eio_luv/eio_luv.ml
ocaml
Raise if the buffer is too big. Use this for atomic reads and writes. Will process [run_q] when prodded. Used for mapping readable/writable poll handles * [cancel_all t fd] should be called just before [fd] is closed. Any waiters will be cancelled. Can only be called from our domain. If we got an error ...
* Copyright ( C ) 2021 * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DIS...
5f8a511b9159903db8c2a0fc334adc896625b00c4c745a8597991d859d0b4f41
penpot/penpot
comments.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.comments (:require [app.common.geom.point :as gpt] [app.common.geom.shapes...
null
https://raw.githubusercontent.com/penpot/penpot/76c9f11922337b5787a41245ee0ad14fc444fa3d/frontend/src/app/main/data/workspace/comments.cljs
clojure
Copyright (c) KALEIDOS INC Event responsible of the what should be executed when user clicked on the comments layer. An option can be create a new draft thread, an other option is close previously open thread or cancel the latest opened thread draft. Move comment threads that are inside a frame when that frame i...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.comments (:require [app.common.geom.point :as gpt] [app.common.geom.shapes :as gsh] [app.common.pages.ch...
d5f26f50909c520fb51531ed6f6694991aec70c6f69fa88efc73a2d99b7a3007
functionally/pigy-genetics
Types.hs
----------------------------------------------------------------------------- -- -- Module : $Headers Copyright : ( c ) 2021 License : MIT -- Maintainer : < > -- Stability : Experimental Portability : Portable -- -- | Types for pig images. -- -----------------------------------...
null
https://raw.githubusercontent.com/functionally/pigy-genetics/8ec2b9437a0ae14aabb166020f5c2707b2c9aa37/app/Pigy/Image/Types.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental | Types for pig images. --------------------------------------------------------------------------- * Chromosomes * Phenotype * Upgrades | The chromosome. | An upgradeable object. ...
Copyright : ( c ) 2021 License : MIT Maintainer : < > Portability : Portable # LANGUAGE MultiParamTypeClasses # module Pigy.Image.Types ( Chromosome , Phenotype(..) , Phenable(..) , Upgradeable(..) ) where import Codec.Picture (PixelRGBA8(..)) type Chromosome = String class ...
b73f89f52bdc815d0f0723d070314771bb9a8fec85ffa066a7a4f094562ab369
patrikja/AFPcourse
AssocTypes.hs
# LANGUAGE TypeFamilies # module AssocTypes where import qualified Expr as E import qualified Middle as M import qualified Typed as T class Eval e where type Value e; eval :: e -> Value e instance Eval E.Expr where type Value E.Expr = E.Value; eval = E.eval instance Ev...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/src/AssocTypes.hs
haskell
Take-home message: use a type family when you would like a type to be a class method. But think twice - perhaps you don't really need it. Alternative "stand-alone" syntax (can be used without a class):
# LANGUAGE TypeFamilies # module AssocTypes where import qualified Expr as E import qualified Middle as M import qualified Typed as T class Eval e where type Value e; eval :: e -> Value e instance Eval E.Expr where type Value E.Expr = E.Value; eval = E.eval instance Ev...
00f320cd3fd96fdfd3eb14d8e4241315d46a86f65d8f6dcc285f70bda7c24f3d
aycanirican/hweblib
Rfc2388.hs
{-# LANGUAGE OverloadedStrings #-} -- | Module : Network . Copyright : Aycan iRiCAN 2010 - 2020 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- Returning Values from Forms: multipart/form-data -- -- <> module Network.Parser.Rfc2388 where im...
null
https://raw.githubusercontent.com/aycanirican/hweblib/e0031eee26cb83f131ca2ccadf58456856b4c641/src/Network/Parser/Rfc2388.hs
haskell
# LANGUAGE OverloadedStrings # | License : BSD3 Maintainer : Stability : experimental Portability : unknown Returning Values from Forms: multipart/form-data <> | 3. Definition of multipart/form-data Right (Disposition {dispType = DispFormData, dispParams = [OtherParam "name" "user"]})
Module : Network . Copyright : Aycan iRiCAN 2010 - 2020 module Network.Parser.Rfc2388 where import Control.Applicative (Alternative (many, (<|>))) import Data.Attoparsec.ByteString (Parser) import Data.Attoparsec.ByteString.Char8 (char, stringCI) import Data.Functor (($>)) import Network.Parser.Rfc2...
4bd15192e98c1185567efe9a54f90355712872b2c61d386d4e0caf57fd4ab5e0
jordanthayer/ocaml-search
digraph.ml
(** Operations on directed graphs *) * Constructs a directed planar graph by placing random points on the unit squrae and performing a Delaunay triangulization . Each edge is directed toward the positive x direction . The graph is not guaranteed to be connected . The result is an edge list wher...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrmath/digraph.ml
ocaml
* Operations on directed graphs * Dumps a spt-it-out input file to the file [fname] to draw the graph. * Finds the clockwise angle between line segments p0->p1 and p1->p2. * Gets all of the edges from the given point.
* Constructs a directed planar graph by placing random points on the unit squrae and performing a Delaunay triangulization . Each edge is directed toward the positive x direction . The graph is not guaranteed to be connected . The result is an edge list where each node is represented by a...
ac66bfcd30812dc2c83e017354ef2cbdc09ac190a5db0b91615d03d0cc4a7274
mzp/coq-ide-for-ios
syntax_def.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/interp/syntax_def.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : syntax_def.ml 13329...
bb596f96e24c98b32d94d5713af0d1d80dfb2c2334afcf124eefd2cb954b7609
Z572/guile-wlroots
switch.scm
(define-module (wlroots types switch) #:use-module (wlroots types)) (define-wlr-types-class wlr-switch () #:descriptor %wlr-switch-struct)
null
https://raw.githubusercontent.com/Z572/guile-wlroots/f2e0646a8fd6fa7d09159230505a4a8176c9087b/wlroots/types/switch.scm
scheme
(define-module (wlroots types switch) #:use-module (wlroots types)) (define-wlr-types-class wlr-switch () #:descriptor %wlr-switch-struct)
49eb0f5bbb8989ab01d4a56e3fba3b9141d77d4dfdd49d48d6a5111e6d33b221
kiselgra/c-mera
cxx.namespace.03.lisp
(include <iostream>) (using-namespace std) (namespace 'foo (typedef int bar)) (decl (((from-namespace 'foo 'bar) x = 9)) (function test ((const (from-namespace 'foo 'bar) y)) -> int (return y)) (function main () -> int (<< cout (test x) endl) (return 0))) # # 9
null
https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/cxx.namespace.03.lisp
lisp
(include <iostream>) (using-namespace std) (namespace 'foo (typedef int bar)) (decl (((from-namespace 'foo 'bar) x = 9)) (function test ((const (from-namespace 'foo 'bar) y)) -> int (return y)) (function main () -> int (<< cout (test x) endl) (return 0))) # # 9
4b6a69a98bb2df3084dd45fab04b4b3555790922abb8963460575c23f5411074
benoitc/upnp
upnp_handler_sup.erl
@author < > %% @doc Supervises all processes of UPnP subsystem. %% @end -module(upnp_handler_sup). -behaviour(supervisor). -ifdef(TEST). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -endif. -export([start_link/1, add_upnp_entity/3]). -export([init/1]). -define(...
null
https://raw.githubusercontent.com/benoitc/upnp/75a526d8386f6cff4c2100f45cdb7664b775991e/src/upnp_handler_sup.erl
erlang
@doc Supervises all processes of UPnP subsystem. @end Each UPnP device or service can be uniquely identified by its category + type + uuid.
@author < > -module(upnp_handler_sup). -behaviour(supervisor). -ifdef(TEST). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -endif. -export([start_link/1, add_upnp_entity/3]). -export([init/1]). -define(SERVER, ?MODULE). start_link(Specs) -> supervisor:start...
73cd6bc7ea04b05b437506eadfc5eba48eb322a33f02b3e935e26bf016d6fdf9
Relph1119/sicp-solutions-manual
p1-7-good-enough.scm
(define (good-enough? old-guess new-guess) (> 0.01 (/ (abs (- new-guess old-guess)) old-guess)))
null
https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-7-good-enough.scm
scheme
(define (good-enough? old-guess new-guess) (> 0.01 (/ (abs (- new-guess old-guess)) old-guess)))
79027730386f1092f17c7127cfceb935d63c2b9b5431074992f600a6d2fd2f90
why-not-try-calmer/feedo
Main.hs
module Main where import Server (startApp) main :: IO () main = startApp
null
https://raw.githubusercontent.com/why-not-try-calmer/feedo/d5c93cfcc5e9f2af1805c7127677717254280bec/app/Main.hs
haskell
module Main where import Server (startApp) main :: IO () main = startApp
9fedd7d55c621e7cb600a82459177158a8e18470045a3108ae68b397a6d300a7
puppetlabs/puppetdb
utils.clj
(ns puppetlabs.puppetdb.catalog.utils "Catalog generation and manipulation A suite of functions that aid in constructing random catalogs, or randomly modifying an existing catalog (wire format or parsed)." (:require [puppetlabs.puppetdb.catalogs :as cat] [clojure.walk :as walk] [puppe...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/catalog/utils.clj
clojure
(ns puppetlabs.puppetdb.catalog.utils "Catalog generation and manipulation A suite of functions that aid in constructing random catalogs, or randomly modifying an existing catalog (wire format or parsed)." (:require [puppetlabs.puppetdb.catalogs :as cat] [clojure.walk :as walk] [puppe...
674cbdea4f45ee3544257978e2ac54e6d7c07a50732c028a7cd7999aaf6159e5
granule-project/gerty
Comments.hs
{-| This module defines the lex action to lex nested comments. As is well-known this cannot be done by regular expressions (which, incidently, is probably the reason why C-comments don't nest). When scanning nested comments we simply keep track of the nesting level, counting up for /open comments/ and ...
null
https://raw.githubusercontent.com/granule-project/gerty/972fa027973032a4499747039b45e744ca17e9e2/src/Language/Gerty/Syntax/Parser/Comments.hs
haskell
| This module defines the lex action to lex nested comments. As is well-known this cannot be done by regular expressions (which, incidently, is probably the reason why C-comments don't nest). When scanning nested comments we simply keep track of the nesting level, counting up for /open comments/ and do...
module Language.Gerty.Syntax.Parser.Comments where import qualified Data.List as List import Language.Gerty.Syntax.Parser.Monad import Language.Gerty.Syntax.Parser.Tokens import Language.Gerty.Syntax.Parser.Alex import Language.Gerty.Syntax.Parser.LookAhead import Language.Gerty.Syntax.Position keepComments :: ...
fd6cc3c9abd4a16dcbe93f56d9034c07079159b156a9659fbae90be94630c715
metabase/metabase
fix_bad_references.clj
(ns metabase.query-processor.middleware.fix-bad-references (:require [clojure.walk :as walk] [metabase.mbql.util :as mbql.u] [metabase.query-processor.store :as qp.store] [metabase.util :as u] [metabase.util.i18n :refer [trs]] [metabase.util.log :as log])) (defn- find-source-table [{:keys [source-t...
null
https://raw.githubusercontent.com/metabase/metabase/c4050fee7f347aad2272cb990aee674b0d8e7bb6/src/metabase/query_processor/middleware/fix_bad_references.clj
clojure
don't replace anything inside source metadata. if we have entered a join map and don't have `join-source` info yet, determine that and recurse. :source-table]` path that do not have `:join-alias` info
(ns metabase.query-processor.middleware.fix-bad-references (:require [clojure.walk :as walk] [metabase.mbql.util :as mbql.u] [metabase.query-processor.store :as qp.store] [metabase.util :as u] [metabase.util.i18n :refer [trs]] [metabase.util.log :as log])) (defn- find-source-table [{:keys [source-t...
fbe21b3eaf49b5d4688e0a576b66674cb249d7d4a5a5f494f51c970e74dc25fc
bjornbm/astro
UtilSpec.hs
# LANGUAGE ScopedTypeVariables # module Astro.UtilSpec where import Test.Hspec import Test.QuickCheck (property, (==>)) import Data.AEq import TestUtil import TestInstances import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro.Util import Astro.Coords import Astro.Coords.PosVel import Astr...
null
https://raw.githubusercontent.com/bjornbm/astro/dbfcade84e17b01f1e0624c4fb64a1a6e1a3af98/test/Astro/UtilSpec.hs
haskell
# LANGUAGE ScopedTypeVariables # module Astro.UtilSpec where import Test.Hspec import Test.QuickCheck (property, (==>)) import Data.AEq import TestUtil import TestInstances import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro.Util import Astro.Coords import Astro.Coords.PosVel import Astr...
8009aa8956b4cf2c3ecad72e9aca3625452cd297839aa449829bf4cfb8cdc670
singleheart/programming-in-haskell
nim.hs
import Data.Char type Board = [Int] initial :: Board initial = [5, 4, 3, 2, 1] finished :: Board -> Bool finished = all (== 0) next :: Int -> Int next 1 = 2 next 2 = 1 valid :: Board -> Int -> Int -> Bool valid board row num = board !! (row - 1) >= num move :: Board -> Int -> Int -> Board move board row num = [up...
null
https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch10/nim.hs
haskell
import Data.Char type Board = [Int] initial :: Board initial = [5, 4, 3, 2, 1] finished :: Board -> Bool finished = all (== 0) next :: Int -> Int next 1 = 2 next 2 = 1 valid :: Board -> Int -> Int -> Bool valid board row num = board !! (row - 1) >= num move :: Board -> Int -> Int -> Board move board row num = [up...
c852c9bba73546a07c83a11aa7ad4074e72de7964745b298c263c807834a9ec7
yangchenyun/learning-sicp
evdata.scm
EVDATA.SCM Chapter 4 Evaluator data structures and driver loop The Read - Eval - Print Loop for the evaluators (define (eval-loop) (newline) (let ((result (force-it (current-evaluator (prompt-for-command-expression current-prompt) the-global-environment)))) (newline) ...
null
https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/practices/assignments/14.evaluators/evdata.scm
scheme
Since the environment is generally a circular list which will print forever, we use MAKE-PRINTABLE to turn circular list structures into lists Data Structures Primitive procedures are inherited from Scheme. Compound procedures Each frame is a cons-pair consisting of a list of variables and a list of values. This...
EVDATA.SCM Chapter 4 Evaluator data structures and driver loop The Read - Eval - Print Loop for the evaluators (define (eval-loop) (newline) (let ((result (force-it (current-evaluator (prompt-for-command-expression current-prompt) the-global-environment)))) (newline) ...
a9a86dc729196aba407beafb808d9d0769c8cc5f246a2ac05584c396d8c36cf2
mbj/stratosphere
DatasetFormatProperty.hs
module Stratosphere.SageMaker.MonitoringSchedule.DatasetFormatProperty ( module Exports, DatasetFormatProperty(..), mkDatasetFormatProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.SageMaker.M...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/MonitoringSchedule/DatasetFormatProperty.hs
haskell
# SOURCE # # SOURCE #
module Stratosphere.SageMaker.MonitoringSchedule.DatasetFormatProperty ( module Exports, DatasetFormatProperty(..), mkDatasetFormatProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import ...
a199e519dd0a1c87f47d234d27479a5a1406717219682e29daae88091e81fd72
hakaru-dev/hakaru
HKC.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # module Main where import Language.Hakaru.Evaluation.ConstantPropagation import Language.Hakaru.Syntax.TypeCheck import Language.Hakaru.Syntax.AST.Transforms (expandTransformations) import Language.Hakaru.Syntax.ANF (normalize...
null
https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/commands/HKC.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # turns on simd and sharedMem <*> switch ( long "-no-log-space-probs" <> help "Do not log `prob` types; WARNING this is more likely to underflow.")
# LANGUAGE FlexibleContexts # module Main where import Language.Hakaru.Evaluation.ConstantPropagation import Language.Hakaru.Syntax.TypeCheck import Language.Hakaru.Syntax.AST.Transforms (expandTransformations) import Language.Hakaru.Syntax.ANF (normalize) import Language.Hakaru.Syntax.CSE (cse) import Lang...
a46f6bdfdd7f667850e80b54eb1c58fdefe722a548d13047789cb50b6919954d
lemmih/lhc
NewTypes.hs
module Language.Haskell.Crux.NewTypes where import Language.Haskell.Crux lowerNewTypes :: Module -> Module lowerNewTypes m = m { cruxDecls = map decl (cruxDecls m) } where decl (Declaration ty name body) = Declaration ty name (expr body) expr e = case e of Var{} -> e Con{...
null
https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/haskell-crux/src/Language/Haskell/Crux/NewTypes.hs
haskell
module Language.Haskell.Crux.NewTypes where import Language.Haskell.Crux lowerNewTypes :: Module -> Module lowerNewTypes m = m { cruxDecls = map decl (cruxDecls m) } where decl (Declaration ty name body) = Declaration ty name (expr body) expr e = case e of Var{} -> e Con{...
c3e8b1e2237a8830d20552b915981e48d199ec74d27aa0fa6e947670a1d050e0
camsaul/toucan2
pipeline.clj
(ns toucan2.pipeline "This is a low-level namespace implementing our query execution pipeline. Most of the stuff you'd use on a regular basis are implemented on top of stuff here. Pipeline order is 1. [[toucan2.query/parse-args]] (entrypoint fn: [[transduce-unparsed]]) 2. [[toucan2.model/resolve-model]] ...
null
https://raw.githubusercontent.com/camsaul/toucan2/5204b34d46f5adb3e52b022218049abe9b336928/src/toucan2/pipeline.clj
clojure
pipeline called something else necessary since we would probably already be in one if we needed to be because stuff otherwise we can just execute with a normal non-transaction query. add your own implementations as otherwise it see [[toucan2.map-backend]] for more information. wrapping them in a vector? Maybe ...
(ns toucan2.pipeline "This is a low-level namespace implementing our query execution pipeline. Most of the stuff you'd use on a regular basis are implemented on top of stuff here. Pipeline order is 1. [[toucan2.query/parse-args]] (entrypoint fn: [[transduce-unparsed]]) 2. [[toucan2.model/resolve-model]] ...
46b3982e261bed612cedf476d634179632c0668d53bb8d8466d033a1e3504679
yihming/aihaskell
FrontEnd.hs
module FrontEnd where import Text.ParserCombinators.Parsec import qualified Text.ParserCombinators.Parsec.Token as T import Data.Char import Data.List import AbstractSyntax as S keywords :: [String] keywords = ["proc", "returns", "var", "begin", "end", "int", "real", "skip", "halt", "fail", "assume", "ra...
null
https://raw.githubusercontent.com/yihming/aihaskell/5d4539a0f093914e32bda7e797f502626b8f2d93/FrontEnd.hs
haskell
identifier = T.identifier lexer symbol = T.symbol lexer This is the main function of Front-end. Statements. s1 ::= skip; | halt; | fail; s2 ::= Var = RHSExpr s3 ::= while BoolExpr do [Stmt] done; Boolean Expressions.
module FrontEnd where import Text.ParserCombinators.Parsec import qualified Text.ParserCombinators.Parsec.Token as T import Data.Char import Data.List import AbstractSyntax as S keywords :: [String] keywords = ["proc", "returns", "var", "begin", "end", "int", "real", "skip", "halt", "fail", "assume", "ra...
10b7dacab7a54ccaeb9d39768164738f684db84c2df9e64adc637a809ae6d26d
2600hz-archive/whistle
crossbar_schema.erl
%%%%------------------------------------------------------------------- @author < > %%% ( C ) 2011 , %%% @doc %%% %%% Implementation of JSON Schema spec %%% -zyp-json-schema-03 -schema-specifying-and-validating-json-data-structures/ %%% %%% @end 28 July 2011 - remove dust & refresh code , still v0.3 %%%...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/crossbar/src/crossbar_schema.erl
erlang
------------------------------------------------------------------- @doc Implementation of JSON Schema spec -zyp-json-schema-03 @end ------------------------------------------------------------------- trace through the validation steps macroing to increase readability ------------------------------------------...
@author < > ( C ) 2011 , -schema-specifying-and-validating-json-data-structures/ 28 July 2011 - remove dust & refresh code , still v0.3 -module(crossbar_schema). -export([do_validate/2]). -include("../include/crossbar.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(VALIDATION_FUN, fun({error...
b9377d3328a7077a1b25dc278a8b50484bae542bf8ea79cd4ced417184c4b33b
sjl/cl-blt
map.lisp
( ql : quickload ' (: cl - blt : : iterate : split - sequence ) ) (asdf:load-system :cl-blt) (asdf:load-system :losh) (asdf:load-system :iterate) (asdf:load-system :split-sequence) (defpackage :cl-blt.examples.map (:use :cl :losh :iterate :bearlibterminal.quickutils)) (in-package :cl-blt.examples.map) (defun cl...
null
https://raw.githubusercontent.com/sjl/cl-blt/ee69ac7bfb473e9cdd8c2d50d45ef288ef315ff3/examples/map.lisp
lisp
( ql : quickload ' (: cl - blt : : iterate : split - sequence ) ) (asdf:load-system :cl-blt) (asdf:load-system :losh) (asdf:load-system :iterate) (asdf:load-system :split-sequence) (defpackage :cl-blt.examples.map (:use :cl :losh :iterate :bearlibterminal.quickutils)) (in-package :cl-blt.examples.map) (defun cl...
3bb2c5b59a29a305db26551b06c9b7bddd80c122e28b9ee3705a2c0efc743b42
csabahruska/jhc-grin
Op.hs
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} Generated by DrIFT ( Automatic class derivations for ) # LINE 1 " src / Cmm / Op.hs " # {-# OPTIONS -funbox-strict-fields #-} module Cmm.Op where import Data.Binary import Util.Gen import Text.ParserCombinators.ReadP as P import Text.Read.Lex Basic operat...
null
https://raw.githubusercontent.com/csabahruska/jhc-grin/30210f659167e357c1ccc52284cf719cfa90d306/src/Cmm/Op.hs
haskell
# LANGUAGE TypeSynonymInstances, FlexibleInstances # # OPTIONS -funbox-strict-fields # operations , operations, double in size of the original, and the shift and rotate routines, where the number. the invarient is that the return type is always exactly determined by the argument types ^ round to -Infinity ^ m...
Generated by DrIFT ( Automatic class derivations for ) # LINE 1 " src / Cmm / Op.hs " # module Cmm.Op where import Data.Binary import Util.Gen import Text.ParserCombinators.ReadP as P import Text.Read.Lex but can be effectively used to generate C or assembly code as well . An operation consists of the operat...
f558cb0f1a49475c50e82bb90987876e50c7f6c3102cbcd880df008c47ef5432
patricoferris/ocaml-multicore-monorepo
headers.ml
This file is part of Dream , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2021 for details, or visit . Copyright 2021 Anton Bachin *) let (-:) name f = Alcotest.test_case name `Quick f let tests = "headers", [ "header" -: begin fun () -> let requ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/test/unit/headers.ml
ocaml
This file is part of Dream , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2021 for details, or visit . Copyright 2021 Anton Bachin *) let (-:) name f = Alcotest.test_case name `Quick f let tests = "headers", [ "header" -: begin fun () -> let requ...
d2016bc3c35dbebc913a49da21c468ee21e00629c5eb850f8ea534376d17230e
dpom/nlp-tools
dev.clj
(ns dev (:refer-clojure :exclude [test]) (:require [clojure.repl :refer :all] [clojure.tools.namespace.repl :refer [refresh]] [clojure.spec.test.alpha :as stest] [clojure.spec.gen.alpha :as gen] [clojure.java.io :as io] [clojure.java.jdbc :as j] [fipp.edn :refer [pprint] :rename {pprint fipp}] ...
null
https://raw.githubusercontent.com/dpom/nlp-tools/f513442e0ff993bba9daf1f5aff9582c61367324/dev/src/dev.clj
clojure
(when (io/resource "local.clj") (load "local"))
(ns dev (:refer-clojure :exclude [test]) (:require [clojure.repl :refer :all] [clojure.tools.namespace.repl :refer [refresh]] [clojure.spec.test.alpha :as stest] [clojure.spec.gen.alpha :as gen] [clojure.java.io :as io] [clojure.java.jdbc :as j] [fipp.edn :refer [pprint] :rename {pprint fipp}] ...
ef8b45c3951a7f5ce5f63d7dd3ea261e22f6f4bac5f520bef3840c7412076911
xapi-project/xen-api
datamodel_vm.ml
(* VM *) open Datamodel_common open Datamodel_roles open Datamodel_types let vmpp_removed = [ (Lifecycle.Published, rel_cowley, "") ; (Deprecated, rel_clearwater, "Dummy transition") ; (Removed, rel_clearwater, "The VMPR feature was removed") ] Removing a one - to - many field is quite difficult , leav...
null
https://raw.githubusercontent.com/xapi-project/xen-api/42ebd10a2b3ec82c8f9fa4bf69c10324e6c1093c/ocaml/idl/datamodel_vm.ml
ocaml
VM * Action to take on guest reboot/power off/sleep etc * Virtual CPUs * Default actions no async VM.Clone VM.Copy VM.snapshot VM.Provision -- causes the template's disks to be instantiated VM.Start VM.atomic_set_resident_on When HA is enabled we need to prevent memory changes which will break the...
open Datamodel_common open Datamodel_roles open Datamodel_types let vmpp_removed = [ (Lifecycle.Published, rel_cowley, "") ; (Deprecated, rel_clearwater, "Dummy transition") ; (Removed, rel_clearwater, "The VMPR feature was removed") ] Removing a one - to - many field is quite difficult , leave vmpp re...
53c1286c030c780b02449b6a7b0e716d3be64bf4c324bb44e9aae3a1f6b1ef75
runeksvendsen/bitcoin-payment-channel
Settle.hs
module PaymentChannel.Internal.Receiver.Settle where import Bitcoin.Types import qualified Network.Haskoin.Crypto as HC import qualified Network.Haskoin.Transaction as HT import PaymentChannel.Internal.Error import PaymentChannel.Internal.Metadata.Util import ...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Internal/Receiver/Settle.hs
haskell
|What would the status of the payment channel be if the settlement transaction were published right now ? channelIsExhausted |What would the status of the payment channel be if the settlement transaction were published right now? channelIsExhausted undefined where clientOutM = l...
module PaymentChannel.Internal.Receiver.Settle where import Bitcoin.Types import qualified Network.Haskoin.Crypto as HC import qualified Network.Haskoin.Transaction as HT import PaymentChannel.Internal.Error import PaymentChannel.Internal.Metadata.Util import ...
057448ff9fd38f1bdca49e3890a24d19e7a36e879bfdae09fd4b49ca191295d6
sternenseemann/spacecookie
Integration.hs
{-# LANGUAGE OverloadedStrings #-} module Test.Integration where import Control.Applicative ((<|>)) import Control.Concurrent (threadDelay) import Control.Exception (bracket) import Control.Monad (forM_) import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.List import Data.Maybe (isNot...
null
https://raw.githubusercontent.com/sternenseemann/spacecookie/687bc78c1e9355468bf4eb480750b819e520f20e/test/Test/Integration.hs
haskell
# LANGUAGE OverloadedStrings # ignore ordering for the purpose of this test can't test directory traversal since curl won't try it
module Test.Integration where import Control.Applicative ((<|>)) import Control.Concurrent (threadDelay) import Control.Exception (bracket) import Control.Monad (forM_) import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.List import Data.Maybe (isNothing, isJust, fromJust) import Netw...
4ce0766f44f592599b62a065411cc1f86f41f73be5e788dfdc1fc4b42e4330a3
erlangonrails/devdb
log4erl_lex.erl
%% The source of this file is part of leex distribution, as such it %% has the same Copyright as the other files in the leex %% distribution. The Copyright is defined in the accompanying file COPYRIGHT . However , the resultant scanner generated by is the %% property of the creator of the scanner and is not covered ...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/log4erl/src/log4erl_lex.erl
erlang
The source of this file is part of leex distribution, as such it has the same Copyright as the other files in the leex distribution. The Copyright is defined in the accompanying file property of the creator of the scanner and is not covered by that Copyright. User code. This is placed here to allow extra attribut...
COPYRIGHT . However , the resultant scanner generated by is the -module(log4erl_lex). -export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]). -export([format_error/1]). strip(TokenChars,TokenLen) -> lists:sublist(TokenChars, 2, TokenLen - 2). format_error({illegal,S}) -> ["illegal characters ",io_l...
bb3a4c51f40897da0f28fd4c55710ec6232288b659211d64a5c7c95d183c4f32
chaoxu/fancy-walks
E.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # {-# OPTIONS_GHC -O2 #-} import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/119/E.hs
haskell
# OPTIONS_GHC -O2 # input is integer -------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control . Monad . State import C...
63d6368870f9ae6255ded3e88dab6a74e2ea6a83acc246274603d1b632f7a08a
mfp/extprot
codec.ml
include Types type prefix = int let vint_length = function n when n < 128 -> 1 | n when n < 16384 -> 2 | n when n < 2097152 -> 3 | n when n < 268435456 -> 4 FIXME : checking for 64 - bit and 32 - bit let ll_type_prefix_table = [| Vint; Tuple; Bits8; Bytes; Bits32...
null
https://raw.githubusercontent.com/mfp/extprot/11ef436c7a1f267f301f4507c05c0a3bb8beda4f/compiler/codec.ml
ocaml
vlen:1 ctyp:2 all the following for tag 0 ctyp 0, vlen 0
include Types type prefix = int let vint_length = function n when n < 128 -> 1 | n when n < 16384 -> 2 | n when n < 2097152 -> 3 | n when n < 268435456 -> 4 FIXME : checking for 64 - bit and 32 - bit let ll_type_prefix_table = [| Vint; Tuple; Bits8; Bytes; Bits32...
b597434a3d30b78afdd32ebb7ad8e4e456113b0742aa72338157d0ec65de12d2
brunjlar/neural
FixedSize.hs
{-# OPTIONS_HADDOCK show-extensions #-} | Module : Data . FixedSize Description : fixed - size containers Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : portable This module provides some fixed - size containers . Module : Data.F...
null
https://raw.githubusercontent.com/brunjlar/neural/1211d1a2bed14b4036f48c500f945fea027cd3b9/src/Data/FixedSize.hs
haskell
# OPTIONS_HADDOCK show-extensions #
| Module : Data . FixedSize Description : fixed - size containers Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : portable This module provides some fixed - size containers . Module : Data.FixedSize Description : fixed-size contai...
525bf216ee4fa1215b9920bbe9a40f25aadbee82d1f863ec3dc3e4d13585044d
ghc/packages-Cabal
FetchUtils.hs
----------------------------------------------------------------------------- -- | Module : Distribution . Client . FetchUtils Copyright : ( c ) 2005 2011 -- License : BSD-like -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Functions f...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/FetchUtils.hs
haskell
--------------------------------------------------------------------------- | License : BSD-like Maintainer : Stability : provisional Portability : portable Functions for fetching packages --------------------------------------------------------------------------- * fetching packages ** specifical...
Module : Distribution . Client . FetchUtils Copyright : ( c ) 2005 2011 # LANGUAGE RecordWildCards # module Distribution.Client.FetchUtils ( fetchPackage, isFetched, checkFetched, checkRepoTarballFetched, fetchRepoTarball, asyncFetchPackages, wait...
aa4a65e790d3f976defa828c38dee3b93744234cc79c36233e7cc1de8984c9da
0xd34df00d/coformat
Score.hs
# LANGUAGE DeriveGeneric , DerivingVia # {-# LANGUAGE RecordWildCards, QuasiQuotes #-} module Language.Coformat.Score ( Score , calcScore , PreparedFile , filename , prepareFile ) where import qualified Data.ByteString.Char8 as BS import qualified Data.IntMap.Strict as IM import Control.Monad.IO.Class import Data.Ch...
null
https://raw.githubusercontent.com/0xd34df00d/coformat/5ea8cf57d9df08e6b72d341e4c73f9933cad8a3d/src/Language/Coformat/Score.hs
haskell
# LANGUAGE RecordWildCards, QuasiQuotes #
# LANGUAGE DeriveGeneric , DerivingVia # module Language.Coformat.Score ( Score , calcScore , PreparedFile , filename , prepareFile ) where import qualified Data.ByteString.Char8 as BS import qualified Data.IntMap.Strict as IM import Control.Monad.IO.Class import Data.Char import Data.Monoid import Data.String.Inter...
51a4e1c3830f3ce49bdca04686c22d8f91176778476df90cd3d50b7d00c02624
kazzmir/master-of-magic
extruec.ml
Example program for the Allegro library , by . * * This program shows how to specify colors in the various different * truecolor pixel formats . The example shows the same screen ( a few * text lines and three coloured gradients ) in all the color depth * modes supported by your video card ....
null
https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/ocaml-allegro-20080222/ml_examples/extruec.ml
ocaml
set the screen mode use the makecol() function to specify RGB values... or we could draw some nice smooth color gradients... try each of the possible possible color depths...
Example program for the Allegro library , by . * * This program shows how to specify colors in the various different * truecolor pixel formats . The example shows the same screen ( a few * text lines and three coloured gradients ) in all the color depth * modes supported by your video card ....
f2e88aeb746829129d2d157333708365c9c8e0acd87ca47a81e598cfe743f8a5
ayamada/copy-of-svn.tir.jp
version.scm
#!/usr/bin/env gosh ;;; coding: euc-jp ;;; -*- scheme -*- ;;; vim:set ft=scheme ts=8 sts=2 sw=2 et: $ Id$ (use gauche.test) ;;; ---- (test-start "tir03.version") (use tir03.version) (test-module 'tir03.version) ;;; ---- ;(test-section "check version") (test* "(tir03-version)" (call-with-input-file "../VERSION...
null
https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.3/test/version.scm
scheme
coding: euc-jp -*- scheme -*- vim:set ft=scheme ts=8 sts=2 sw=2 et: ---- ---- (test-section "check version") ----
#!/usr/bin/env gosh $ Id$ (use gauche.test) (test-start "tir03.version") (use tir03.version) (test-module 'tir03.version) (test* "(tir03-version)" (call-with-input-file "../VERSION" read-line) (tir03-version)) (test-end)
7f77f0689c325789f06df3e2eb9406d99d160081a028edbb88e40adcf334c13b
rfkm/zou
context.clj
(ns zou.web.context) (declare ^:private ^:dynamic *context*) (defn- context [] *context*) (defn- request [] (when (bound? #'*context*) (:request *context*))) (defn- set-context! [ctx] (when (bound? #'*context*) (set! *context* ctx))) (defn- update-in! [ks f & args] (when (bound? #'*context*) (s...
null
https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/src/zou/web/context.clj
clojure
(ns zou.web.context) (declare ^:private ^:dynamic *context*) (defn- context [] *context*) (defn- request [] (when (bound? #'*context*) (:request *context*))) (defn- set-context! [ctx] (when (bound? #'*context*) (set! *context* ctx))) (defn- update-in! [ks f & args] (when (bound? #'*context*) (s...
09fe82664235136e900f22ca8ffe9d45570ffd57aa9969772110d6e8273c42fa
kronkltd/jiksnu
request_token_actions.clj
(ns jiksnu.modules.core.actions.request-token-actions (:require [jiksnu.modules.core.model.request-token :as model.request-token] [jiksnu.modules.core.templates.actions :as templates.actions] [jiksnu.session :as session] [jiksnu.transforms :as transforms] [jiksnu.transf...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/actions/request_token_actions.clj
clojure
(ns jiksnu.modules.core.actions.request-token-actions (:require [jiksnu.modules.core.model.request-token :as model.request-token] [jiksnu.modules.core.templates.actions :as templates.actions] [jiksnu.session :as session] [jiksnu.transforms :as transforms] [jiksnu.transf...
7e6ced7395fa3d41b21a5c160cafcdad972f8abede748aab8fb69d0c51f84211
sgbj/MaximaSharp
hybrj1.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/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/minpack/lisp/hybrj1.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls nil) (: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...
10a8a941f7086c89eef20662b3119fc66db6cba47edb4216151656ac2d5901c5
junegunn/lq
core.clj
(ns lq.core "LQ is a simple HTTP server that manages named queues of lines of text in memory. By using plain-text request and response bodies, it aims to aid shell scripting scenarios in distributed environments where it's not feasible to set up proper development tools across the nodes (e.g. all you have is cu...
null
https://raw.githubusercontent.com/junegunn/lq/f4d698a34e53ceecf3cccc39898defcc3e72b561/src/lq/core.clj
clojure
(ns lq.core "LQ is a simple HTTP server that manages named queues of lines of text in memory. By using plain-text request and response bodies, it aims to aid shell scripting scenarios in distributed environments where it's not feasible to set up proper development tools across the nodes (e.g. all you have is cu...
f1ea74f9d5cebaff31657f603bfbdc0f7aa344ebed01faa69e837cfe0a75b7a4
sdiehl/write-you-a-haskell
Main.hs
module Main where import Eval import Type import Check import Parser import Pretty import Syntax import Data.Maybe import Control.Monad.Trans import System.Console.Haskeline eval' :: Expr -> Expr eval' = fromJust . eval process :: String -> IO () process line = do let res = parseExpr line case res of Left ...
null
https://raw.githubusercontent.com/sdiehl/write-you-a-haskell/ae73485e045ef38f50846b62bd91777a9943d1f7/chapter5/calc_typed/Main.hs
haskell
module Main where import Eval import Type import Check import Parser import Pretty import Syntax import Data.Maybe import Control.Monad.Trans import System.Console.Haskeline eval' :: Expr -> Expr eval' = fromJust . eval process :: String -> IO () process line = do let res = parseExpr line case res of Left ...
4e8200cc2158d3f9370bc6c93e6253af7dfdc4f5f7ee99e0195e0214b3e1b7ee
okeuday/erlbench
btrie.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc %%% ==A trie data structure implementation.== %%% The trie (i.e., from "retrieval") data...
null
https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/btrie.erl
erlang
------------------------------------------------------------------------ @doc ==A trie data structure implementation.== The trie (i.e., from "retrieval") data structure was invented by string suffixes as a list because it is a PATRICIA trie means that other data structures are quicker alternatives, so this modu...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : ( it is a form of radix sort ) . The implementation stores ( PATRICIA - Practical Algorithm to Retrieve Information Coded in Alphanumeric , D.R.Morrison ( 1968 ) ) . ...
1b8b69c79997a265c2e4f5ddab3211e4145172ec5d0543cd5a4feb0f3bee70a6
facebookarchive/pfff
ast_minic.ml
* * Copyright ( C ) 2014 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/mini/ast_minic.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** *************************************************************************** -----...
* * Copyright ( C ) 2014 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...
41292b796cd3cc65b034c79c51a1df28b930529b9851f9c415cc13859a6ce9a2
georgegarrington/Syphon
Subscribe.hs
{-# OPTIONS_GHC -Wno-deferred-type-errors #-} # LANGUAGE FlexibleContexts # module Transpile.Subscribe where import AST.Type import AST.Definition import AST.Expression import AST.Module import Data.Maybe import Data.List import qualified Data.Map as M import qualified Data.Set as S All properties that can be su...
null
https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/Transpile/Subscribe.hs
haskell
# OPTIONS_GHC -Wno-deferred-type-errors # Module level functions that must be present if any of the subscriptions are used Query if a function is a subscription generating function Should technically never happen } --Given a subscribable property, find its handler function lookupHandler :: String -> String lookupHandle...
# LANGUAGE FlexibleContexts # module Transpile.Subscribe where import AST.Type import AST.Definition import AST.Expression import AST.Module import Data.Maybe import Data.List import qualified Data.Map as M import qualified Data.Set as S All properties that can be subscribed to , mapped to functions that handle ...
7a52d99e9e36cc93bc7f92c2c322640113119a68686822183866292a8af16f15
opencog/opencog
data_#2.scm
Test # 2 ;; anaphor is non-reflexive ;; The parse tree structure is: ;; verb ;; to / \ by ;; / \ ;; antecedent anaphor ;; Expected result: ;; Acceptance Connection between two clauses (ListLink (AnchorNode "CurrentResolution") (WordInstanceNode "anap...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/tests/nlp/anaphora/data/propose/filter-%2317/data_%232.scm
scheme
anaphor is non-reflexive The parse tree structure is: verb to / \ by / \ antecedent anaphor Expected result: Acceptance filter tests
Test # 2 Connection between two clauses (ListLink (AnchorNode "CurrentResolution") (WordInstanceNode "anaphor") (WordInstanceNode "antecedent") ) (ListLink (AnchorNode "CurrentPronoun") (WordInstanceNode "anaphor") ) (ListLink (AnchorNode "CurrentProposal") (WordInstanceNode "antece...
24c7eeeebf880aa852ba9f38b7dbc8a12fd0f76920570745513a5a888b36889c
erlio/vmq_server
vmq_metrics_SUITE.erl
-module(vmq_metrics_SUITE). -export([ %% suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([simple_systree_test/1, simple_graphite_test/1, simple_prometheus_test/1, simple_cli_t...
null
https://raw.githubusercontent.com/erlio/vmq_server/d008c6dcc62fe985d08456caa4024750e1febf38/test/vmq_metrics_SUITE.erl
erlang
suite/0, vmq_graphite connects we have to setup the listener here, because vmq_test_utils is overriding the default set in vmq_server.app.src let the metrics system do some increments
-module(vmq_metrics_SUITE). -export([ init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([simple_systree_test/1, simple_graphite_test/1, simple_prometheus_test/1, simple_cli_test/1]). -export([ho...
bb05a41722e5adb8baf070d7c374cdc7f9d5964bafc5b49a4fd06bf10a8cb18c
juspay/atlas
BaseUrl.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/test/src/Fixtures/BaseUrl.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
a149830b9d80399ae87e6d3d4cd282584dce721fcaf3218de21367c98cfe9362
wellposed/numerical
Dense.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE FlexibleInstances # # LANGUAGE NoImplic...
null
https://raw.githubusercontent.com/wellposed/numerical/6b458232760b20674487bd9f8442b0991ce59423/src/Numerical/Array/Layout/Dense.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # need to figure out how to support symmetric and hermitian and triangular and banded matrices empty class instances for all the dense Layouts #UNPACK# #UNPACK# #UNPACK# deriving (Show,Eq,Data) | @'Format' 'Row' 'Contiguous' n@ is a...
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NoImplicitPrelude # # LANGUAGE FunctionalDependencies # # LANGUAGE CPP # # LANGUAGE StandaloneDer...
ec7883e93e6c19a95729b5c9cd564256da8cbbb47ef78d9de6d9a9167df0e10f
erlydtl/erlydtl
erlydtl_lib_test1.erl
-module(erlydtl_lib_test1). -behaviour(erlydtl_library). -export([version/0, inventory/1, reverse/1]). %% dummy behaviour for lib_test2 -export([behaviour_info/1]). behaviour_info(callbacks) -> []. %% end behaviour version() -> 1. inventory(filters) -> [reverse]; inventory(tags) -> []. reverse(String) when is_lis...
null
https://raw.githubusercontent.com/erlydtl/erlydtl/c1f3df8379b09894d333de4e9a3ca2f3e260cba3/test/erlydtl_lib_test1.erl
erlang
dummy behaviour for lib_test2 end behaviour
-module(erlydtl_lib_test1). -behaviour(erlydtl_library). -export([version/0, inventory/1, reverse/1]). -export([behaviour_info/1]). behaviour_info(callbacks) -> []. version() -> 1. inventory(filters) -> [reverse]; inventory(tags) -> []. reverse(String) when is_list(String) -> lists:reverse(String); reverse(St...
72fbdc881128a79d0138f059a97fb2e1d2918e667ef470d16fe884c94b7a3222
naproche/naproche
Encode.hs
{- generated by Isabelle -} Title : Isabelle / XML / Encode.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) XML as data representation language . See " $ ISABELLE_HOME / src / Pure / PIDE / xml . ML " . Author: Makarius LICENSE: BSD 3-clause (Isabelle) X...
null
https://raw.githubusercontent.com/naproche/naproche/00547e0e11746e83dfce14c90477efd52effa589/Isabelle/src/Isabelle/XML/Encode.hs
haskell
generated by Isabelle # LANGUAGE OverloadedStrings # atomic values structural nodes representation of standard types
Title : Isabelle / XML / Encode.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) XML as data representation language . See " $ ISABELLE_HOME / src / Pure / PIDE / xml . ML " . Author: Makarius LICENSE: BSD 3-clause (Isabelle) XML as data representation la...
cf4e188c1448d4ea9eb347590a9d4654ec06feb021cd029854dc588707fee214
7bridges-eu/remys
queries_test.clj
(ns remys.api.resources.queries-test (:require [remys.api.resources.queries :as q] [remys.services.mysql :as db] [clojure.test :refer :all])) (def schema {"test" [{:column-key "PRI" :column-name "id"}] "test2" [{:column-key "PRI" :column-name "id1"} {:column...
null
https://raw.githubusercontent.com/7bridges-eu/remys/71d6450beeb44137ef48e3872817ea6551e19954/test/remys/api/resources/queries_test.clj
clojure
(ns remys.api.resources.queries-test (:require [remys.api.resources.queries :as q] [remys.services.mysql :as db] [clojure.test :refer :all])) (def schema {"test" [{:column-key "PRI" :column-name "id"}] "test2" [{:column-key "PRI" :column-name "id1"} {:column...
7617bc1f4b2e02a09d324b614386752778eb66b45b14a8529a8d50b5b7969e16
adrienmo/hbasex
hbase_types.erl
%% Autogenerated by Thrift Compiler ( ) %% %% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING %% -module(hbase_types). -include("hbase_types.hrl"). -export([struct_info/1, struct_info_ext/1]). struct_info('TTimeRange') -> {struct, [{1, i64}, {2, i64}]} ; struct_info('TColumn') -> ...
null
https://raw.githubusercontent.com/adrienmo/hbasex/4be1f3950cdfde30b5a2f34508e9b9ea86085c9e/src/hbase_types.erl
erlang
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
Autogenerated by Thrift Compiler ( ) -module(hbase_types). -include("hbase_types.hrl"). -export([struct_info/1, struct_info_ext/1]). struct_info('TTimeRange') -> {struct, [{1, i64}, {2, i64}]} ; struct_info('TColumn') -> {struct, [{1, string}, {2, string}, {3, i64}]} ; struct_...
85a96241cb063f9f3e431a944801aab62ac75bc85d8561ffcab431da60d21f66
debug-ito/greskell
Impl.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE TypeApplications # -- | -- Module: Network.Greskell.WebSocket.Connection.Impl -- Description: internal implementation of Connection Maintainer : < > -- -- This is an internal module. It...
null
https://raw.githubusercontent.com/debug-ito/greskell/ff21b8297a158cb4b5bafcbb85094cef462c5390/greskell-websocket/src/Network/Greskell/WebSocket/Connection/Impl.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # | Module: Network.Greskell.WebSocket.Connection.Impl Description: internal implementation of Connection This is an internal module. It deliberately exports everything. The upper module is responsible to make a proper export list. | Host name o...
# LANGUAGE DuplicateRecordFields # # LANGUAGE TypeApplications # Maintainer : < > module Network.Greskell.WebSocket.Connection.Impl where import Control.Applicative (empty, (<$>), (<|>)) import Control.Concurrent (threadDelay) import...
bfeb1ce48857c773e5dacc664ee9f4c04d0305183a0f3f401b916d17902fa8fd
elastic/eui-cljs
combo_box_option.cljs
(ns eui.combo-box-option (:require ["@elastic/eui/lib/components/combo_box/combo_box_options_list/combo_box_option.js" :as eui])) (def EuiComboBoxOption eui/EuiComboBoxOption)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/combo_box_option.cljs
clojure
(ns eui.combo-box-option (:require ["@elastic/eui/lib/components/combo_box/combo_box_options_list/combo_box_option.js" :as eui])) (def EuiComboBoxOption eui/EuiComboBoxOption)
2bf0bb9488f39ee50c2e9f40963a4061fd9c1f67f63d2453fffa361bf8489a65
reenberg/xmonad
Swap.hs
# LANGUAGE ScopedTypeVariables # module Properties.Swap where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) -- --------------------------------------------------------------------- swapUp , swapDown , : -- swap is trivially reversible prop_swap_left (x :: T) = (sw...
null
https://raw.githubusercontent.com/reenberg/xmonad/c4f471bfb6ffe70741fe76c3b154f6bae920da7f/tests/Properties/Swap.hs
haskell
--------------------------------------------------------------------- swap is trivially reversible swap is reversible, but involves moving focus back the window with master on it. easy to do with a mouse... swap doesn't change focus = case peek x of Nothing -> True Just f -> focus (stack (work...
# LANGUAGE ScopedTypeVariables # module Properties.Swap where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) swapUp , swapDown , : prop_swap_left (x :: T) = (swapUp (swapDown x)) == x prop_swap_right (x :: T) = (swapDown (swapUp x)) == x TODO swap is reversibl...
cee79b03d5fbb3417df42887f420454798e39c544babc9b504c1e40ee5915e39
shayan-najd/NativeMetaprogramming
T11145.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # # LANGUAGE TemplateHaskell # module T11145 where data family Fuggle x y [d| data instance Fuggle Int (Maybe (a,b)) where MkFuggle :: Fuggle Int (Maybe Bool) |]
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/th/T11145.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE TypeFamilies # # LANGUAGE TemplateHaskell # module T11145 where data family Fuggle x y [d| data instance Fuggle Int (Maybe (a,b)) where MkFuggle :: Fuggle Int (Maybe Bool) |]
d137848f71a3f3e29703f4f1d8ec36e12d4ae89a61ff1993bd6174725a395ee6
smallhadroncollider/taskell-2.0
Tuple.hs
module Taskell.Utility.Tuple ( dup , thrd ) where -- duplicate a value to both sides of a tuple dup :: a -> (a, a) dup a = (a, a) thrd :: (a, b, c) -> c thrd (_, _, c) = c
null
https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/6d7cc528143274cd208432353572cc8e3178736b/src/Taskell/Utility/Tuple.hs
haskell
duplicate a value to both sides of a tuple
module Taskell.Utility.Tuple ( dup , thrd ) where dup :: a -> (a, a) dup a = (a, a) thrd :: (a, b, c) -> c thrd (_, _, c) = c