_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
cafd2e84f6bde88f6a1a60199866fb1830b8ff4f8706591441cdcbead591d62e
ucsd-progsys/dsolve
syntax.ml
fun dp <> (a, b) = let val n = arraysize a fun loop (i, sum) = if i = n then sum else loop (i+1, sum + sub (a, i) * sub (b, i)) withtype {i:nat | i < n} int(i) * int(n) -> int in loop (0, 0) end withtype {n:nat} int array(n) * int array(n) -> int fun dp {n:nat} <n> (a: int array(n),...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/syntax.ml
ocaml
fun dp <> (a, b) = let val n = arraysize a fun loop (i, sum) = if i = n then sum else loop (i+1, sum + sub (a, i) * sub (b, i)) withtype {i:nat | i < n} int(i) * int(n) -> int in loop (0, 0) end withtype {n:nat} int array(n) * int array(n) -> int fun dp {n:nat} <n> (a: int array(n),...
fa3382bd7156c19e10cb271560a4d811fbe2d24d2c30a0076c23b2ccde801421
gebi/jungerl
m2.erl
-module(m2). -author(''). -compile(export_all). %%-export([Function/Arity, ...]). '#inheritance#'() -> [m3,m4].
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/xmerl/priv/testdata/m2.erl
erlang
-export([Function/Arity, ...]).
-module(m2). -author(''). -compile(export_all). '#inheritance#'() -> [m3,m4].
2293cc793be4912b98ebca018f94f64532ec864602a033f5cc22b6024fc79d5f
eeng/shevek
page.cljs
(ns shevek.pages.designer.page (:require [reagent.core :as r] [shevek.reflow.db :as db] [shevek.i18n :refer [t]] [shevek.components.layout :refer [topbar]] [shevek.components.message :refer [page-message]] [shevek.pages.cubes.helpers :refer [cube-fetcher cub...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/designer/page.cljs
clojure
We need to unbuild it so the next time the user enters, the previous designer doesn't show until the new one is built Wait until the cube metadata is ready Build the new report unless already built Build the designer and put it in the app-db Is nil while fetching a report by id
(ns shevek.pages.designer.page (:require [reagent.core :as r] [shevek.reflow.db :as db] [shevek.i18n :refer [t]] [shevek.components.layout :refer [topbar]] [shevek.components.message :refer [page-message]] [shevek.pages.cubes.helpers :refer [cube-fetcher cub...
5de32134eb97c73ffd4678d48905074166f5924c4b3c7537a335a9973734d5b1
nvim-treesitter/nvim-treesitter
highlights.scm
(sym_lit) @variable A highlighting for functions / macros in th cl namespace is available in theHamsta / nvim - treesitter - commonlisp ;(list_lit . (sym_lit) @function.builtin (#cl-standard-function? @function.builtin)) ;(list_lit . (sym_lit) @function.builtin (#cl-standard-macro? @function.macro)) (dis_expr) @com...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/c6f09ef051b7e27a3834070c39584e8ff9b897f9/queries/commonlisp/highlights.scm
scheme
(list_lit . (sym_lit) @function.builtin (#cl-standard-function? @function.builtin)) (list_lit . (sym_lit) @function.builtin (#cl-standard-macro? @function.macro)) dynamic variables quote syntax quote defun-like things constant
(sym_lit) @variable A highlighting for functions / macros in th cl namespace is available in theHamsta / nvim - treesitter - commonlisp (dis_expr) @comment (defun_keyword) @function.macro (defun_header function_name: (_) @function) (defun_header lambda_list: (list_lit (sym_lit) @parameter)) (defun_header key...
9c7d475c5cbd6ffd860e68a255c7e318e684bfa9bffaa38c8a0a8ac47f7e751c
AdRoll/rebar3_format
otp25.erl
%% @doc New stuff introduced in OTP25. -module(otp25). -feature(maybe_expr, enable). -export(['maybe'/0, 'else'/0, short/0]). 'maybe'() -> maybe 'maybe' ?= multiple:expressions(), with ?= question:equal(), which ?= should_indent_properly_even_if:the_next_thing(is_very_very_ext...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/a467bcc3f3a73e2ca74631947e40c8800936251c/test_app/src/otp25.erl
erlang
@doc New stuff introduced in OTP25.
-module(otp25). -feature(maybe_expr, enable). -export(['maybe'/0, 'else'/0, short/0]). 'maybe'() -> maybe 'maybe' ?= multiple:expressions(), with ?= question:equal(), which ?= should_indent_properly_even_if:the_next_thing(is_very_very_extremely_long_and_goes_beyond_the_margin)...
5a4c7b315fbc9bc54c9bde3b8908cd002edbbbd878e0db7daf14eccb5c69ab0b
lemmaandrew/CodingBatHaskell
scores100.hs
From Given an array of scores , return true if there are scores of 100 next to each other in the array . The array length will be at least 2 . Given an array of scores, return true if there are scores of 100 next to each other in the array. The array length will be at least 2. -} import Test.Hspec ( hspec, de...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/AP-1/scores100.hs
haskell
From Given an array of scores , return true if there are scores of 100 next to each other in the array . The array length will be at least 2 . Given an array of scores, return true if there are scores of 100 next to each other in the array. The array length will be at least 2. -} import Test.Hspec ( hspec, de...
4c87bfe770f617fb6c202122a1117c1d9257a33964b05ac2021aff5ee226cb1f
binsec/binsec
smtlib_utils.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/smtlib/smtlib_utils.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
4041929a94c95d8d2e08eb95672f9a4b948ca450887a1b6a72eb7fd7473f9aa5
nomeata/kaleidogen
Telegram.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # # LANGUAGE GeneralizedNewtypeDeriving # # OPTIONS_GHC -Wno - orphans # module Telegram (handleUpdate) where import qualified Data.ByteString as BS import qualified Data.Text as T import qualified Data.Text.Encoding as T import Text.Printf import Cry...
null
https://raw.githubusercontent.com/nomeata/kaleidogen/12dbd10f37bc3f58c21b6bc5ace6984cc7fe656a/src/Telegram.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE StandaloneDeriving # # LANGUAGE GeneralizedNewtypeDeriving # # OPTIONS_GHC -Wno - orphans # module Telegram (handleUpdate) where import qualified Data.ByteString as BS import qualified Data.Text as T import qualified Data.Text.Encoding as T import Text.Printf import Crypto.Hash import Data.ByteArray (con...
9b4ca39264e8e1b8fedf4b2eddaca82ef71028d1a5bd3e3e8ff1c14ce45a039e
eugeneia/athens
adler32.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- adler32.lisp - computing adler32 checksums ( ) of a byte array (in-package :crypto) smallest prime < 65536 (defconstant adler32-modulo 65521) (defstruct (adler32 (:constructor %make-adler32-digest nil) (:constructor %make-adler32-state (s1...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/src/digests/adler32.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*-
adler32.lisp - computing adler32 checksums ( ) of a byte array (in-package :crypto) smallest prime < 65536 (defconstant adler32-modulo 65521) (defstruct (adler32 (:constructor %make-adler32-digest nil) (:constructor %make-adler32-state (s1 s2)) (:copier nil)) (s1 1 :type...
5943faa4c5f44ee0caf48143e6ad56fc325d36fd15f5309878489419bacc63a7
clj-python/libpython-clj
jvm_handle.clj
(ns libpython-clj2.python.jvm-handle "Conversion of a jvm object into an integer and back. Used for storing handles on python proxies." (:require [libpython-clj2.python.protocols :as py-proto] [libpython-clj2.python.gc :as pygc] [libpython-clj2.python.ffi :as py-ffi]) (:import [java.uti...
null
https://raw.githubusercontent.com/clj-python/libpython-clj/e53112d00157f3744fd4c9d31809360b8460993a/src/libpython_clj2/python/jvm_handle.clj
clojure
(ns libpython-clj2.python.jvm-handle "Conversion of a jvm object into an integer and back. Used for storing handles on python proxies." (:require [libpython-clj2.python.protocols :as py-proto] [libpython-clj2.python.gc :as pygc] [libpython-clj2.python.ffi :as py-ffi]) (:import [java.uti...
0fe17a93db7413d6f6b70afe29218f531d2a2d03ab827cdb7338c6131a329cf1
backtracking/ocaml-bazaar
test_matrix.ml
open Matrix.Flat let test nrows ncols = let m = make nrows ncols 0 in assert (rows m = nrows); assert (cols m = ncols); assert (size m = (nrows, ncols)); for i = 0 to nrows - 1 do for j = 0 to ncols - 1 do set m i j 42; assert (get m i j = 42) done done; assert (fold_left (+) 0 m = n...
null
https://raw.githubusercontent.com/backtracking/ocaml-bazaar/5891441ab3d2c9ee1f6187511e6b4d0fd3805586/test_matrix.ml
ocaml
open Matrix.Flat let test nrows ncols = let m = make nrows ncols 0 in assert (rows m = nrows); assert (cols m = ncols); assert (size m = (nrows, ncols)); for i = 0 to nrows - 1 do for j = 0 to ncols - 1 do set m i j 42; assert (get m i j = 42) done done; assert (fold_left (+) 0 m = n...
20693545539b8697870d6897f21c0d269912bbe59d21be10b43fac9d81a09b09
erlang/otp
httpd_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2013 - 2023 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/b0afc29474f9625aa0b466b6672e0bbcefd07535/lib/inets/test/httpd_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2013 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -compile({no_auto_import,[alias/1]}). -module(httpd_SUITE). -include_lib("kernel/include/file.hrl"). -include_lib("...
9c71ab2e1afcae8e310876e6eec1e8e22e9b974965d413013cbd8549552353af
neil-lindquist/linear-programming
utils.lisp
(uiop:define-package :linear-programming/utils (:use :cl) (:import-from :alexandria #:once-only) (:import-from :linear-programming/conditions #:invalid-bounds-error) (:import-from :linear-programming/system-info #:optimization-type #:float-contagi...
null
https://raw.githubusercontent.com/neil-lindquist/linear-programming/417f764e65be1a92f7f9fc0f1ed8092700e916c6/src/utils.lisp
lisp
boundary values are represented as a number, or nil for +/- infinity Floating point (in)equality
(uiop:define-package :linear-programming/utils (:use :cl) (:import-from :alexandria #:once-only) (:import-from :linear-programming/conditions #:invalid-bounds-error) (:import-from :linear-programming/system-info #:optimization-type #:float-contagi...
7761ca844a96467f7e850440c577bbdc8e63313cc579bcba7fa1fa58d5a16837
marick/Midje
how_to_refer_to_privates_in_facts.clj
(ns as-documentation.about-privates.how-to-refer-to-privates-in-facts (:require [midje.sweet :refer :all] [midje.util :refer :all] [midje.test-util :refer :all])) Suppose you want to test private vars . There are three ways to do it . 1 . A common Clojure idiom is to call a private throu...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/as_documentation/about_privates/how_to_refer_to_privates_in_facts.clj
clojure
"expose" them with `expose-testables`.
(ns as-documentation.about-privates.how-to-refer-to-privates-in-facts (:require [midje.sweet :refer :all] [midje.util :refer :all] [midje.test-util :refer :all])) Suppose you want to test private vars . There are three ways to do it . 1 . A common Clojure idiom is to call a private throu...
5cf85244e4982ed883ed2e726dafc62ce48292445af4a602e6a629f38a9ca9eb
protosens/monorepo.cljc
_requirer.cljc
;; This file has been autogenerated. ;; Its only purpose is to require a collection of namespaces. ;; ;; (ns ^{:no-doc true} protosens.maestro.plugin.quickdoc.-requirer (:require #?(:clj protosens.maestro.plugin.quickdoc) )) ;;;;;;;;;; (defn -main [& _arg+])
null
https://raw.githubusercontent.com/protosens/monorepo.cljc/1c7cc00cbfb7c7484521146bf998438d2867552f/module/maestro.plugin.quickdoc/src/main/clj/protosens/maestro/plugin/quickdoc/_requirer.cljc
clojure
This file has been autogenerated. Its only purpose is to require a collection of namespaces.
(ns ^{:no-doc true} protosens.maestro.plugin.quickdoc.-requirer (:require #?(:clj protosens.maestro.plugin.quickdoc) )) (defn -main [& _arg+])
fcd3f8daf22ef6ac06290661cd1408c203dce4cb5d36868abf2308ada7d4d0f4
jordwalke/rehp
json_convert.ml
Js_of_ocaml example * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of ...
null
https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/lib/tests/json_convert.ml
ocaml
Json conversion module T2 = T.Json_string_map_t(Json_t);; type u = int StringMap.t deriving (Json)
Js_of_ocaml example * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of ...
7b3c3dade150d586449579ee590b4812e0b9bfb8bcfdb0a6c78294677d5efcfc
yogthos/yuggoth
core.clj
(ns yuggoth.bloom-search.core (:require [clojure.string :as s] [com.github.kyleburton.clj-bloom :refer [make-optimal-filter optimal-n-and-k make-permuted-hash-fn make-hash-fn-crc32 add! include?]]...
null
https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src/yuggoth/bloom_search/core.clj
clojure
(ns yuggoth.bloom-search.core (:require [clojure.string :as s] [com.github.kyleburton.clj-bloom :refer [make-optimal-filter optimal-n-and-k make-permuted-hash-fn make-hash-fn-crc32 add! include?]]...
70cb088561ba23bb6d439b06a7474ad3d6860c00c074236e75e3521edd2e5ff0
paf31/dicom-haskell-library
VL.hs
----------------------------------------------------------------------------- -- -- Module : Data.DICOM.VL Copyright : Copyright ( c ) DICOM Grid 2015 -- License : GPL-3 -- -- Maintainer : -- Stability : experimental -- Portability : -- -----------------------------------------------------------...
null
https://raw.githubusercontent.com/paf31/dicom-haskell-library/c3266869b55f2007e0b9476a5e70fcecfcd6f0a4/src/Data/DICOM/VL.hs
haskell
--------------------------------------------------------------------------- Module : Data.DICOM.VL License : GPL-3 Maintainer : Stability : experimental Portability : ---------------------------------------------------------------------------
Copyright : Copyright ( c ) DICOM Grid 2015 # LANGUAGE PatternSynonyms # module Data.DICOM.VL ( VL() , runVL , pattern UndefinedValueLength , vl ) where import Data.Int (Int64) newtype VL = VL { runVL :: Int64 } deriving (Show, Eq, Ord) Pattern synonyms for matching DICOM magic constants pat...
d5d4f5b99e90a45582c6a2b68bfc1e9635959d0052a02ffe9427e0b166cc2ac9
inhabitedtype/ocaml-aws
describeSourceRegions.ml
open Types open Aws type input = DescribeSourceRegionsMessage.t type output = SourceRegionMessage.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoints.ur...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/describeSourceRegions.ml
ocaml
open Types open Aws type input = DescribeSourceRegionsMessage.t type output = SourceRegionMessage.t type error = Errors_internal.t let service = "rds" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endpoints.ur...
94addbff35049ac30d68ed05e0d5eb3516612112cad629f61e9f39d5b2d969b0
binghe/PCL
fngen.lisp
-*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of derivative w...
null
https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/pcl/fngen.lisp
lisp
Package : PCL ; ; Syntax : Common - lisp -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export control laws. warra...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( o...
c84621326c3f70fa8c118c428ca710d669572f64e0ee1f7b9054093e10ab9fa5
charleso/bantam
Setup.hs
#!/usr/bin/env runhaskell import Data.Char (isDigit) import Data.List (intercalate) import Data.Monoid ((<>)) import Data.Version (showVersion) import Distribution.PackageDescription import Distribution.Verbosity import Distribution.Simple import ...
null
https://raw.githubusercontent.com/charleso/bantam/3af8d08f8e649cb5690815d17e6c79a3a9033d47/bantam-service/Setup.hs
haskell
#!/usr/bin/env runhaskell import Data.Char (isDigit) import Data.List (intercalate) import Data.Monoid ((<>)) import Data.Version (showVersion) import Distribution.PackageDescription import Distribution.Verbosity import Distribution.Simple import ...
3b19acf469827a116505e83d2607d8ce4cd94201ca6066af72a1c519528bf399
achirkin/vulkan
Command.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE RecordWildCards # {-# LANGUAGE Strict #-} # LANGUAGE TypeApplications # module Lib.Vulkan.Command ( createCommandPool , runCommandsOnce ) where import Graphics.Vulkan import Graphics.Vulkan.Core_1_0...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-triangles/src/Lib/Vulkan/Command.hs
haskell
# LANGUAGE Strict # create command buffer record command buffer execute command in a given queue TODO: a real app would need a better logic for waiting. In the example below, we create a new fence every time we want to execute a single command. Then, we attach this fence to our ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Lib.Vulkan.Command ( createCommandPool , runCommandsOnce ) where import Graphics.Vulkan import Graphics.Vulkan.Core_1_0 import Graphics.Vulkan.Marshal.Cr...
3ac8b36dc4c44ddb70a6136f667d6e3c68c0941b456c7622c501e260e988e29c
techascent/tech.io
amperity_vault.clj
(ns tech.v3.io.amperity-vault (:require [tech.config.core :as config] [vault.core :as vault] [vault.client.http])) (def client (-> (vault/new-client (config/get-config :vault-addr)) (vault/authenticate! :token (slurp (str (System/getProper...
null
https://raw.githubusercontent.com/techascent/tech.io/ede955685e710fa3fa9a1b2576520098489e5bc3/src/tech/v3/io/amperity_vault.clj
clojure
(ns tech.v3.io.amperity-vault (:require [tech.config.core :as config] [vault.core :as vault] [vault.client.http])) (def client (-> (vault/new-client (config/get-config :vault-addr)) (vault/authenticate! :token (slurp (str (System/getProper...
a8982e6aa2bfdd669b91ba8defb07558e6c08c7cff5d5c3e4fed3be6145abafe
haskell-tools/haskell-tools
RightSection.hs
module Refactor.ExtractBinding.RightSection where a = 1 + 2
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/ExtractBinding/RightSection.hs
haskell
module Refactor.ExtractBinding.RightSection where a = 1 + 2
a4ec43d97b82d5b174b11f3bb915485f5c2809970cdf4de9f49c5bbdeb2a1248
input-output-hk/project-icarus-importer
BackupPhrase.hs
-- | Module providing restoring from backup phrase functionality module Pos.Util.BackupPhrase ( BackupPhrase(..) , backupPhraseWordsNum , toSeed , keysFromPhrase , safeKeysFromPhrase ) where import qualified Prelude import Universum import Crypto.Hash (Bl...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Util/BackupPhrase.hs
haskell
| Module providing restoring from backup phrase functionality | A datatype representing word counts you'd have in a <-0039.mediawiki BIP39> mnemonic passphrase. | Generate an arbitrary mnemonic with the given number of words. | Number of words in backup phrase
module Pos.Util.BackupPhrase ( BackupPhrase(..) , backupPhraseWordsNum , toSeed , keysFromPhrase , safeKeysFromPhrase ) where import qualified Prelude import Universum import Crypto.Hash (Blake2b_256) import qualified Data.ByteString as BS import ...
9ce1588b0dbe7e0c759f9d69a2791295d4ae8cfb69d56eb3d1cbed8954136970
BillHallahan/G2
Error3.hs
{-@ LIQUID "--short-names" @-} {-@ LIQUID "--no-termination" @-} {-@ LIQUID "--prune-unsorted" @-} module Error3 where z :: (a -> a) -> a -> a {-@ z :: (a -> a) -> a -> a @-} z f x = f x
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/Error/Error3.hs
haskell
@ LIQUID "--short-names" @ @ LIQUID "--no-termination" @ @ LIQUID "--prune-unsorted" @ @ z :: (a -> a) -> a -> a @
module Error3 where z :: (a -> a) -> a -> a z f x = f x
dafbd74362b1f5a5f49ce7a4d2a8074d16f0aa445b043eeb368ee0dad5d52461
okuoku/nausicaa
compile-all.ypsilon.sps
;;; Part of : / Contents : compile script for Ypsilon Scheme ;;;Date: ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2010 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU General Public License as published by the Free Software Foundation , either vers...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/igraph/src/libraries/compile-all.ypsilon.sps
scheme
Date: Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied ...
Part of : / Contents : compile script for Ypsilon Scheme Copyright ( c ) 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (only (foreign math igraph)) ...
b146fe70b712d1a8d2ffb1de139b871cbea873350c0db5cdd2d1d7c843c5f3a6
JacquesCarette/Drasil
Notebook.hs
module Drasil.DocLang.Notebook where import Language.Drasil import qualified Data.Drasil.Concepts.Documentation as Doc (introduction, prpsOfDoc, review, body, mainIdea, procForAnls, summary, methAndAnls, coordinateSystem, example, appendix, reference) import qualified Data.Drasil.Concepts.Physics as P (motion, ...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/92dddf7a545ba5029f99ad5c5eddcd8dad56a2d8/code/drasil-docLang/lib/Drasil/DocLang/Notebook.hs
haskell
Notebook constructor. Create the notebook from given system name, authors, and sections doc :: NamedIdea c => c -> Sentence -> [Section] -> Document * Section Constructors | Section constructors for the lesson plan documents/jupyter notebooks. * Section References | Individual section reference labels. Used in...
module Drasil.DocLang.Notebook where import Language.Drasil import qualified Data.Drasil.Concepts.Documentation as Doc (introduction, prpsOfDoc, review, body, mainIdea, procForAnls, summary, methAndAnls, coordinateSystem, example, appendix, reference) import qualified Data.Drasil.Concepts.Physics as P (motion, ...
f99714716e1d9935e57708d9c6a9bfcd9b9ad2d67f0c1c6f38ce6fd4072813c6
acl2/acl2
uaconvert-values.lisp
C Library ; Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "C") (i...
null
https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/atc/symbolic-execution-rules/uaconvert-values.lisp
lisp
C Library Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "C") (include-book "convert-integer-value") (local (include-book "kestrel/std/system/good-ato...
170ec7aa3818a0003bf7a2a7c2e8452481eb498538c9573cdd67d88f88f5c804
NorfairKing/validity
ScientificSpec.hs
# LANGUAGE TypeApplications # module Data.GenValidity.ScientificSpec ( spec, ) where import Data.GenValidity.Scientific () import Data.Scientific import Test.Hspec import Test.Validity spec :: Spec spec = do genValidSpec @Scientific shrinkValidSpec @Scientific
null
https://raw.githubusercontent.com/NorfairKing/validity/1c3671a662673e21a1c5e8056eef5a7b0e8720ea/genvalidity-scientific/test/Data/GenValidity/ScientificSpec.hs
haskell
# LANGUAGE TypeApplications # module Data.GenValidity.ScientificSpec ( spec, ) where import Data.GenValidity.Scientific () import Data.Scientific import Test.Hspec import Test.Validity spec :: Spec spec = do genValidSpec @Scientific shrinkValidSpec @Scientific
531b5a7c848a409fc60e90377f7596ba4df76c6a73335dc5655d4ae3828f0a28
basho/riak_pipe
riak_pipe_w_tee.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2011 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the Li...
null
https://raw.githubusercontent.com/basho/riak_pipe/a341b653408bd1517ccdd0f54ec27be1005dbeba/src/riak_pipe_w_tee.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2011 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(riak_pipe_w_tee). -beha...
a17322bdb7b368c3caac6a1eef2634df92cd86d3923c80c0b87c72b90ba84eb2
hypernumbers/hypernumbers
wp_logged_out_test_SUITE.erl
%%%----------------------------------------------------------------------------- %%% File : webpage_test_suite.erl Author : < > %%% Description : tests security for a webpage view %%% Created : 30 August 2010 by %%%----------------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/tests/security_test/wp_logged_out_test_SUITE.erl
erlang
----------------------------------------------------------------------------- File : webpage_test_suite.erl Description : tests security for a webpage view ----------------------------------------------------------------------------- Note: This directive should only be used in test suites. callbacks tests ...
Author : < > Created : 30 August 2010 by -module(wp_logged_out_test_SUITE). -compile(export_all). -include("test_server.hrl"). -define(SITE, ":9000"). -define(test(Name, Path, Input, Expected), Name(_Config) -> URL = ?SITE++Path, Got = test:post_logged_out_...
7a2830bfacf40c41cc3a758db1a553f45056c3bf4bace86fa9ac08885413a87b
mput/sicp-solutions
2_27.rkt
#lang racket Solution for exercise 2_27 . (require rackunit "../solutions/utils.rkt") (provide deep-reverse) (define (deep-reverse items) (cond ((null? items) (list)) ((pair? items) (append (deep-reverse (cdr items)) (list (deep-reverse (car items))))) (else items)))...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_27.rkt
racket
#lang racket Solution for exercise 2_27 . (require rackunit "../solutions/utils.rkt") (provide deep-reverse) (define (deep-reverse items) (cond ((null? items) (list)) ((pair? items) (append (deep-reverse (cdr items)) (list (deep-reverse (car items))))) (else items)))...
bf9850ce19dbe15b96ffc8f15eee6aa4d2bb5ef2b9c02cbcfb3b4ccb8275e9e0
wz1000/HieDb
Utils.hs
# LANGUAGE BlockArguments # # LANGUAGE LambdaCase # # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # LANGUAGE CPP # module HieDb.Utils where import qualified Data.Tree import Prelud...
null
https://raw.githubusercontent.com/wz1000/HieDb/67b92df2359558091df9102db5b701327308b930/src/HieDb/Utils.hs
haskell
# LANGUAGE OverloadedStrings # | Recursively search for @.hie@ and @.hie-boot@ files in given directory For fields, the module details come from the parent For fields, the module details come from the parent
# LANGUAGE BlockArguments # # LANGUAGE LambdaCase # # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # LANGUAGE CPP # module HieDb.Utils where import qualified Data.Tree import Prelude hiding (mod) import Compat.HieBi...
a5cb85d2b8ba9a9810cd1499e3452f0278a01c35a9c70af4acdefafa8e29961d
reborg/binpack
fit_test.clj
(ns binpack.fit-test (:use [midje.sweet]) (:require [binpack.fit :as f])) (facts "population generation" (fact "return the two sort orders and a default of 8 randoms" (count (f/populations (shuffle (range 10)))) => 10 (first (f/populations (shuffle (range 10)))) => (reverse (range ...
null
https://raw.githubusercontent.com/reborg/binpack/6b47946236f45d272f3cdf03ce5437c35e340f82/test/binpack/fit_test.clj
clojure
(ns binpack.fit-test (:use [midje.sweet]) (:require [binpack.fit :as f])) (facts "population generation" (fact "return the two sort orders and a default of 8 randoms" (count (f/populations (shuffle (range 10)))) => 10 (first (f/populations (shuffle (range 10)))) => (reverse (range ...
ad7f8382340b86c257c8c2976f28f757b22b2814db44424bc77c31b954ce88df
fmi/clojure-examples
gui.clj
(ns life.gui (use [seesaw core color graphics behave] life.state)) (def cell-size 20) (def board-margin 10) (defn project [x] (+ board-margin (* x cell-size))) (defn rect-from [[x y]] (letfn [(project [n] (+ board-margin (* n cell-size)))] (rect (project x) (project y) cell-size cell-size))) (defn ...
null
https://raw.githubusercontent.com/fmi/clojure-examples/46ec0fe7bdfdfccde1ab74a94c64dbd73ea58269/2013/01-game-of-life/src/life/gui.clj
clojure
(ns life.gui (use [seesaw core color graphics behave] life.state)) (def cell-size 20) (def board-margin 10) (defn project [x] (+ board-margin (* x cell-size))) (defn rect-from [[x y]] (letfn [(project [n] (+ board-margin (* n cell-size)))] (rect (project x) (project y) cell-size cell-size))) (defn ...
d0eee6dc33d38121babaf47a1748e3fa5e7cdf3e6b06317a3709977e77a33295
feeley/pyffi
requests.scm
#!/usr/bin/env gsi-script (import (github.com/feeley pyffi)) (import (gambit)) ;; enable rich python foreign-object representation (register-foreign-write-handlers) (define VENV_PATH (getenv "VENV_PATH" #f)) (if (not VENV_PATH) (begin (display "VENV_PATH not set") (newline) (exit #f))) ;; Assumes a pro...
null
https://raw.githubusercontent.com/feeley/pyffi/ea310bbc0d4fc70996c07bb3f3cdf140498c5192/examples/requests/requests.scm
scheme
enable rich python foreign-object representation Assumes a proper virtualenv, created with virtualenv, not python -m venv
#!/usr/bin/env gsi-script (import (github.com/feeley pyffi)) (import (gambit)) (register-foreign-write-handlers) (define VENV_PATH (getenv "VENV_PATH" #f)) (if (not VENV_PATH) (begin (display "VENV_PATH not set") (newline) (exit #f))) (define (venv-path->PYTHONPATH p) (string-append (string-append...
44454241f6b2fda0f9b646e4f2f40551d245a2e154f4956a1c3815da5b43308d
pnwamk/stop2015-redex
dtr-fme.rkt
#lang racket basic Fourier - Motzkin elimination functions ;; and some other basic math reasoning for inequalities ;; & linear expressions (require redex "dtr-lang.rkt" "fme-bridge.rkt") (provide (all-defined-out)) (define-judgment-form λDTR #:mode (fme-imp I I) #:contract (fme-imp Φ Φ) [(where #t ,(redex-f...
null
https://raw.githubusercontent.com/pnwamk/stop2015-redex/275eb9dfda613c30790f49371a3f843d9cd1fff6/dtr-fme.rkt
racket
and some other basic math reasoning for inequalities & linear expressions
#lang racket basic Fourier - Motzkin elimination functions (require redex "dtr-lang.rkt" "fme-bridge.rkt") (provide (all-defined-out)) (define-judgment-form λDTR #:mode (fme-imp I I) #:contract (fme-imp Φ Φ) [(where #t ,(redex-fme-imp? (term Φ_1) (term Φ_2))) ----------- "FME-Imp" (fme-imp Φ_1 Φ_2)]) ...
7d579e1e0c88b9d95ca968247b1bb9c12f44a12b1ffc47010401d0f877f41ae2
mbillingr/lisp-in-small-pieces
primitives.scm
(define (make-primitive obj) obj) (define primitive? procedure?) (define (primitive-address obj) obj) (define (defprimitive0 name value) (definitial name (let* ((arity+1 (+ 0 1)) (behavior (lambda () (if (= arity+1 (activation-frame-argument-length *val*)) ...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/08-reflection/primitives.scm
scheme
(definitial 'the-environment (let* ((arity 0) (make-primitive (lambda () (set! *pc* stack-pop) (signal-exception #t (list "Incorrect arity" 'the-environment))))))) useful for debug useful for debug
(define (make-primitive obj) obj) (define primitive? procedure?) (define (primitive-address obj) obj) (define (defprimitive0 name value) (definitial name (let* ((arity+1 (+ 0 1)) (behavior (lambda () (if (= arity+1 (activation-frame-argument-length *val*)) ...
40eb8227f6d87a476415a5738783b763bd89df96241d6798b9987886eaf2889e
tezos/tezos-mirror
test_coefficients.ml
(*****************************************************************************) (* *) MIT License Copyright ( c ) 2020 - 2021 < > Copyright ( c ) 2022 Nomadic Labs < ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/603edb19d5217fcf0cc1036effe617d78a6ba265/src/lib_bls12_381_polynomial/test/test_coefficients.ml
ocaml
*************************************************************************** Permission is hereby granted, free of charge, to any person obtaining a copy of this so...
MIT License Copyright ( c ) 2020 - 2021 < > Copyright ( c ) 2022 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to ...
bc63de9b9758ed72d61b48f9ca7c666874d0d37c055ebf5d6ec5631972b5b9dc
andrewmcloud/consimilo
lsh_util.clj
(ns consimilo.lsh-util) (defn- slice "Slices from start to end non incluseive." [start end coll] (drop start (take end coll))) (defn get-hashranges "Vectors of [start stop] for each bucket for the given `k` buckets and `trees` trees." [k trees] (map #(vector (* % k) (* (inc %) k)) (range trees))) (defn g...
null
https://raw.githubusercontent.com/andrewmcloud/consimilo/db96c1695248c3486e1d23de5589b39f0e0bd49f/src/consimilo/lsh_util.clj
clojure
(ns consimilo.lsh-util) (defn- slice "Slices from start to end non incluseive." [start end coll] (drop start (take end coll))) (defn get-hashranges "Vectors of [start stop] for each bucket for the given `k` buckets and `trees` trees." [k trees] (map #(vector (* % k) (* (inc %) k)) (range trees))) (defn g...
a01a3205b14ca6e3feb6f3aca4678f5b988df27c5955f15102b191d6eb736b13
opqdonut/haskell-exercises
W3Test.hs
module W3Test where import W3 import Impl.Test import Data.Either import Control.Monad import Test.QuickCheck hiding (Result,reason,classify,(===)) main = testExs tests tests = [[property $ ex1_safeDiv_zero, property $ ex1_safeDiv_nonZero] ,[property $ ex2_eitherDiv_zero ,property $ ex2_eitherDiv_n...
null
https://raw.githubusercontent.com/opqdonut/haskell-exercises/87be496ccb0125a52386e979c2502fe9695c6498/W3Test.hs
haskell
-- -- -- -- -- -- --
module W3Test where import W3 import Impl.Test import Data.Either import Control.Monad import Test.QuickCheck hiding (Result,reason,classify,(===)) main = testExs tests tests = [[property $ ex1_safeDiv_zero, property $ ex1_safeDiv_nonZero] ,[property $ ex2_eitherDiv_zero ,property $ ex2_eitherDiv_n...
ddeaa5b0b3332e04ffd4bba79001eeb6ea9f698087c4446c0fc374d9ff755ce9
clojure-interop/google-cloud-clients
CloudStorageOption$Open.clj
(ns com.google.cloud.storage.contrib.nio.CloudStorageOption$Open "Interface for Google Cloud Storage options that can be specified when opening files." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage.contrib.nio CloudStorageOption$Open]))
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/contrib/nio/CloudStorageOption%24Open.clj
clojure
(ns com.google.cloud.storage.contrib.nio.CloudStorageOption$Open "Interface for Google Cloud Storage options that can be specified when opening files." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage.contrib.nio CloudStorageOption$Open]))
7139f786786fd35dd5ec8a9a85f54937b453bd66550b31bda0472939c876269c
borodust/claw-legacy
enum.lisp
(cl:in-package :claw.spec) (defclass foreign-enum (foreign-entity) ((values :initarg :values :initform nil :reader foreign-enum-values))) (defun register-foreign-enum (id name location value-list) "Define a foreign enum given `NAME`, a symbol, and a list of symbol-to-integer mappings, `VALUE-LIST`. ID should b...
null
https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/spec/entity/enum.lisp
lisp
Type is somewhat irrelevant here; enums are always :int-sized and a foreign-enum is always an :enum.
(cl:in-package :claw.spec) (defclass foreign-enum (foreign-entity) ((values :initarg :values :initform nil :reader foreign-enum-values))) (defun register-foreign-enum (id name location value-list) "Define a foreign enum given `NAME`, a symbol, and a list of symbol-to-integer mappings, `VALUE-LIST`. ID should b...
023317ad142f1b31671498bce6dfeb20f8ccab30a65a379635b57a5d50e58838
cbaggers/nineveh
bsharpe-quick32-hash.lisp
(in-package :nineveh.hashing) ;; bs - quick32 - hash ( known in 's work as FastHash32_2 ) ;; ;; An alternative to FastHash32 ;; - slightly slower ;; - can have a larger domain ;; - allows for a 4D implementation ;; ;;------------------------------------------------------------ ;; 2D (defun-g bs-quick32-hash ((gri...
null
https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/hashing/bsharpe-quick32-hash.lisp
lisp
An alternative to FastHash32 - slightly slower - can have a larger domain - allows for a 4D implementation ------------------------------------------------------------ 2D ------------------------------------------------------------ 3D ------------------------------------------------------------ 4D -----------...
(in-package :nineveh.hashing) bs - quick32 - hash ( known in 's work as FastHash32_2 ) (defun-g bs-quick32-hash ((grid-cell :vec2)) (let* ((offset (glsl-expr "vec2(403.839172, 377.242706)" :vec2)) (domain 69.0) (somelargefloat (glsl-expr "32745.708984" :float)) (scale (glsl-expr "vec2...
417e11c60c0328362944528b8dc59a5ca35b6c8e9e0adc255801284d8ec8c573
wz1000/hie-lsp
semantics.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} module Main (main) where import Reflex.Test import Data.Bifunctor import Data.Functor import Data.List import qualified Reflex.Bench.Focu...
null
https://raw.githubusercontent.com/wz1000/hie-lsp/dbb3caa97c0acbff0e4fd86fc46eeea748f65e89/reflex-0.6.1/test/semantics.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Main (main) where import Reflex.Test import Data.Bifunctor import Data.Functor import Data.List import qualified Reflex.Bench.Focused as Focused import qualified Reflex.Test.Micro as Micro import System.Environmen...
199be303243140d083171075dc737926130d392065283da7595d35d27351bbb8
fulcro-legacy/semantic-ui-wrapper
icon.cljs
(ns fulcrologic.semantic-ui.cards.icon (:require [fulcro.client.cards :refer [defcard-fulcro]] [fulcro.client.primitives :as prim :refer [defsc]] [fulcro.client.dom :as dom] [fulcrologic.semantic-ui.factories :as f] [clojure.string :as string] [cljs.tools.re...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers/src/cards/fulcrologic/semantic_ui/cards/icon.cljs
clojure
for future reference: this works but with warnings: (println (eval-str (str (:ns (meta func)) "/" (:name (meta func)))))
(ns fulcrologic.semantic-ui.cards.icon (:require [fulcro.client.cards :refer [defcard-fulcro]] [fulcro.client.primitives :as prim :refer [defsc]] [fulcro.client.dom :as dom] [fulcrologic.semantic-ui.factories :as f] [clojure.string :as string] [cljs.tools.re...
490f5577d73fe61d4ae2efe95c36bc9f7a9ac60f0ab27803bb085310f86c820c
EmileTrotignon/embedded_ocaml_templates
builder.ml
open Ast open Primitive (* -------------------------------------------------------------------------- *) (* Infix sugar *) let ( ^-> ) a b = (a, b) let ( ^^-> ) a b = (a, b) let ( ^= ) a b = (a, b) (* -------------------------------------------------------------------------- *) (* Type builder *) module T = struc...
null
https://raw.githubusercontent.com/EmileTrotignon/embedded_ocaml_templates/2baf51d1b07db050fe535615018864e7e850ce38/src/common/mocaml/builder.ml
ocaml
-------------------------------------------------------------------------- Infix sugar -------------------------------------------------------------------------- Type builder -------------------------------------------------------------------------- Expression builders -------------------------------------...
open Ast open Primitive let ( ^-> ) a b = (a, b) let ( ^^-> ) a b = (a, b) let ( ^= ) a b = (a, b) module T = struct let name s = TName s let primitive p = TPrimitive p let apply li n = TApply (li, n) let module_field f = TModuleField f let arrow li final = TArrow (li, final) let ( ^-> ) t1 t2 = ...
22cd88a153b9c3eae47feb44c9424573e1669886ed9bfe4243cfbd8c369467b2
wiseman/turboshrimp
navdata.clj
(ns ^:no-doc com.lemondronor.turboshrimp.navdata (:require [clojure.tools.logging :as log] [com.lemondronor.turboshrimp.network :as network] [com.lemondronor.turboshrimp.util :as util] [gloss.core :as gloss] [gloss.io] [lazymap.core :as lazymap]) (:import ...
null
https://raw.githubusercontent.com/wiseman/turboshrimp/a1f53003bd4afd084e1c9e8cb80109ba732854bc/src/com/lemondronor/turboshrimp/navdata.clj
clojure
Codecs for vectors and matrices used by other codecs. Types of vision detections. Codec for the demo option. First 11 bits are seconds. Last 21 bits are microseconds. GPS structure from #L157 These definitions come from from m/s deg rad Map from packet option ID to symbolic type. and the drone will star...
(ns ^:no-doc com.lemondronor.turboshrimp.navdata (:require [clojure.tools.logging :as log] [com.lemondronor.turboshrimp.network :as network] [com.lemondronor.turboshrimp.util :as util] [gloss.core :as gloss] [gloss.io] [lazymap.core :as lazymap]) (:import ...
194df56e6c2cb4299f743ab3a6b8b42a02c013d073de8b36d5d9b1d325f65a7a
ghcjs/ghcjs-dom
NonDocumentTypeChildNode.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.NonDocumentTypeChildNode (js_getPreviousElementSibling, getPreviousElementSibling, ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/NonDocumentTypeChildNode.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.NonDocumentTypeChildNode (js_getPreviousElementSibling, getPreviousElementSibling, getPreviousElementSiblingUnsafe, getPreviousElementSiblingUnchecked, js_getNextElementS...
db7c4d8fe77a9b7c36e0aeac9850b04ac3a05536c3f6fda1d83e7542c9ed2e7e
graninas/Functional-Design-and-Architecture
Device.hs
module Andromeda.Hardware.Impl.Device ( makeBlankDevice , makeDevicePart , makeController , addDevicePart , getDevicePart ) where import Andromeda.Hardware.Common import Andromeda.Hardware.Domain (ControllerName, ComponentIndex, DeviceName) import Andromeda.Hardware.Language.Hdl (Hdl) import Andromeda.Har...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/f54faef342bee66be1667d3fb9f54582bbc18a1d/Second-Edition-Manning-Publications/BookSamples/CH05/Section5p2p3/src/Andromeda/Hardware/Impl/Device.hs
haskell
module Andromeda.Hardware.Impl.Device ( makeBlankDevice , makeDevicePart , makeController , addDevicePart , getDevicePart ) where import Andromeda.Hardware.Common import Andromeda.Hardware.Domain (ControllerName, ComponentIndex, DeviceName) import Andromeda.Hardware.Language.Hdl (Hdl) import Andromeda.Har...
1616f7e7ca320b7f9d94bf966a242468cb1d62fa9bd0e69681a8af23b2bdc19a
mwand/5010-examples
interp-wednesday.rkt
#lang racket (require "datatypes.rkt") (require "environments.rkt") (provide pgm-value) ;; Program -> Value ;; Program -> Value ;; RETURNS: the value of the program (define (pgm-value pgm) (expr-value (program-main pgm) (decls2env (program-decls pgm)))) ;; Expr Env -> Value ;; RET...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/13-interp/interp-wednesday.rkt
racket
Program -> Value Program -> Value RETURNS: the value of the program Expr Env -> Value RETURNS: the value of the given expression in the given environment Utility Functions. These are here because they know about declarations. decls2env : Decls -> Env
#lang racket (require "datatypes.rkt") (require "environments.rkt") (define (pgm-value pgm) (expr-value (program-main pgm) (decls2env (program-decls pgm)))) (define (expr-value expr env) (cond [(const? expr) (const-value expr)] [(variable? expr) (env-lookup env ...
5d08e91227c1a9210ff0bc6941cf669fdb05a3bf62ca233ded79209696d12562
SkylineLabs/emqttd_kafka_bridge
emqttd_kafka_bridge_SUITE.erl
-module(emqttd_kafka_bridge_SUITE). -compile(export_all). all() -> []. groups() -> [].
null
https://raw.githubusercontent.com/SkylineLabs/emqttd_kafka_bridge/4c2ebe7acc760725870129954efdb8072bbea928/test/emqttd_kafka_bridge_SUITE.erl
erlang
-module(emqttd_kafka_bridge_SUITE). -compile(export_all). all() -> []. groups() -> [].
8c677269018ab95801c836953d22aa7db373420822d029f5dee54dde4fa4d2da
incoherentsoftware/defect-process
Util.hs
module Level.Room.Event.SlotMachine.Util ( SlotsChoice(..) , formatSlotsChoice , parseFormattedSlotsChoice , isSlotsChoiceTextPlus , slotsChoiceTextColor , isSlotsChoicesAllPlus , isSlotsChoicesAllMinus ) where import Data.Aeson.Types (FromJSON) import GHC.Generics (Generic) import ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/1549238a7eede1a60515f1afc26cbece63e479cd/src/Level/Room/Event/SlotMachine/Util.hs
haskell
module Level.Room.Event.SlotMachine.Util ( SlotsChoice(..) , formatSlotsChoice , parseFormattedSlotsChoice , isSlotsChoiceTextPlus , slotsChoiceTextColor , isSlotsChoicesAllPlus , isSlotsChoicesAllMinus ) where import Data.Aeson.Types (FromJSON) import GHC.Generics (Generic) import ...
11f22bf33eb2495af4f359a715968f8f7189f557a46535facf362e56e3ba58be
system-f/papa
Papa.hs
# LANGUAGE NoImplicitPrelude # module Papa( module Papa.Base, module Papa.Bifunctors, module Papa.Lens, module Papa.Semigroupoids ) where import Papa.Base import Papa.Bifunctors import Papa.Lens import Papa.Semigroupoids
null
https://raw.githubusercontent.com/system-f/papa/5c4d71e08b905a882dd9a4a7d0c336411971c360/papa/src/Papa.hs
haskell
# LANGUAGE NoImplicitPrelude # module Papa( module Papa.Base, module Papa.Bifunctors, module Papa.Lens, module Papa.Semigroupoids ) where import Papa.Base import Papa.Bifunctors import Papa.Lens import Papa.Semigroupoids
2052365cb019a20667cd890a949e6dae6fbb70a94c6afc5bf70bd1518b3efd57
rbkmoney/fistful-server
ff_codec.erl
-module(ff_codec). -include_lib("fistful_proto/include/ff_proto_base_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_repairer_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_account_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_msgpack_thrift.hrl"). -export([unmarshal/2]). -export([...
null
https://raw.githubusercontent.com/rbkmoney/fistful-server/526adc789f4f6083dae7eb4d7ac2d9ba3c34845b/apps/ff_server/src/ff_codec.erl
erlang
Types Callbacks API Catch this up in thrift validation TESTS
-module(ff_codec). -include_lib("fistful_proto/include/ff_proto_base_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_repairer_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_account_thrift.hrl"). -include_lib("fistful_proto/include/ff_proto_msgpack_thrift.hrl"). -export([unmarshal/2]). -export([...
b707e8d07f04f2a71b4d19f8035cfdc64c6ddca1cb91dec49980c79f1f16af92
ollef/sixten
QName.hs
# LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving , OverloadedStrings # module Syntax.QName where import Protolude import Data.Foldable(toList) import Data.List(intersperse, intercalate) import Data.List.Split import Data.String import Data.Vector(Vector) import GHC.Generics(Generic) import Pretty import Syntax....
null
https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Syntax/QName.hs
haskell
| A qualified name. | A qualified name plus possibly a generated part, e.g. from lambda lifting or closure conversion. ---------------------------------------------------------------------------- Instances
# LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving , OverloadedStrings # module Syntax.QName where import Protolude import Data.Foldable(toList) import Data.List(intersperse, intercalate) import Data.List.Split import Data.String import Data.Vector(Vector) import GHC.Generics(Generic) import Pretty import Syntax....
f5d3b6e89a92a1a42cbfe5b1ae7d5275f0ba2e4735216ffa0d19182470491f73
hasktorch/hasktorch
TensorOptions.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module Torch.Internal.Unmanaged.Type.TensorOptions where import qualified Language.C.Inline...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Unmanaged/Type/TensorOptions.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module Torch.Internal.Unmanaged.Type.TensorOptions where import qualified Language.C.Inline.Cpp as C import qualified Language...
c7de3c7be16840cad7f85bad7e7f624e645534a7cf7b72c05a147472b0a2190f
YoshikuniJujo/test_haskell
Gadt.hs
{-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # {-# LANGUAGE KindSignatures, TypeOperators #-} # LANGUAGE FlexibleContexts , FlexibleInstances # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gadt where import Data.Kind infixr 5 ::: data Hetero0 (as :: [Type]) where Nil :: Hetero0 '[...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/541639f28fe11eb3b6b544187726db56d41e218e/tribial/tribial-trials/src/Gadt.hs
haskell
# LANGUAGE GADTs # # LANGUAGE KindSignatures, TypeOperators # instance ListAddTypes as => ListAddTypes ((a :: (Type, Type)) ': as) where
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts , FlexibleInstances # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wall -fno - warn - tabs # module Gadt where import Data.Kind infixr 5 ::: data Hetero0 (as :: [Type]) where Nil :: Hetero0 '[] (:::) :: a -> Hetero0 as -> Hetero0 (a ': as) instance Show (Heter...
b9a6940ee8ad670c41fdea9560f7abc47afc12c7aefcdfa28aa57c620ff67956
chansey97/clprosette-miniKanren
basic-tests.rkt
#lang racket (require "../mk.rkt") (require "../rosette-bridge.rkt") (require "../test-check.rkt") (require "../logging.rkt") ;; (current-bitwidth 8) ( output - smt " ./ " ) (current-solver (z3 #:options (hash ':smt.random_seed 1 ' : smt.random_seed 2 ' : smt.random_seed 3 ' : ' : smt....
null
https://raw.githubusercontent.com/chansey97/clprosette-miniKanren/43c3620a2abf28916832712763ee552fc90229f2/clprosette-miniKanren/tests/basic-tests.rkt
racket
(current-bitwidth 8) default:2 in z3 - 4.8.7 default:6 in z3-4.8.12 -miniKanren/issues/10 Declare a fresh variable at the top Declare a variable, but that variable has already been unified with a constant. Some normal tests for `=/=` ex1 ex2 test fail conde
#lang racket (require "../mk.rkt") (require "../rosette-bridge.rkt") (require "../test-check.rkt") (require "../logging.rkt") ( output - smt " ./ " ) (current-solver (z3 #:options (hash ':smt.random_seed 1 ' : smt.random_seed 2 ' : smt.random_seed 3 ' : ))) (test "ros...
e5fe067639acd7729bc8aca7a59ec6732fd87fa7970e002fb5fa8144298ed49d
mfikes/fifth-postulate
ns475.cljs
(ns fifth-postulate.ns475) (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/ns475.cljs
clojure
(ns fifth-postulate.ns475) (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...
32c2045f92ec547df71be19251d83f3ad9eb762c566b1bad9d6a82a856c5f0b7
SimulaVR/godot-haskell
Shader.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.Shader (Godot.Core.Shader._MODE_CANVAS_ITEM, ...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Shader.hs
haskell
| Returns the shader's code as the user has written it, not the full generated code used internally. | Returns the shader's code as the user has written it, not the full generated code used internally. | Returns the texture that is set as default for the specified parameter. __Note:__ @param@ must match the n...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.Shader (Godot.Core.Shader._MODE_CANVAS_ITEM, ...
3e8927e2613d798037d3189609202a2c384875ac77307972ba036625aaf9a02b
rems-project/cerberus
common.ml
(* Things mostly taken unchanged from the concrete memory model that we might want to put in a common module *) open Ctype let ident_equal x y = Symbol.instance_Basic_classes_Eq_Symbol_identifier_dict.isEqual_method x y let rec offsetsof tagDefs tag_sym = match Pmap.find tag_sym tagDefs with | StructDef (m...
null
https://raw.githubusercontent.com/rems-project/cerberus/ee52c761db995ef5381ae867bf3dd6a3a774a409/memory/vip/common.ml
ocaml
Things mostly taken unchanged from the concrete memory model that we might want to put in a common module NOTE: the offset of a flexible array member is just like that of any other member TODO: what if too big? TODO: need to add trailing padding for structs with a flexible array member NOTE: addi...
open Ctype let ident_equal x y = Symbol.instance_Basic_classes_Eq_Symbol_identifier_dict.isEqual_method x y let rec offsetsof tagDefs tag_sym = match Pmap.find tag_sym tagDefs with | StructDef (membrs_, flexible_opt) -> let membrs = match flexible_opt with | None -> membrs_ ...
c56130169dceae4122826d32733409ceb0094d6e948cfd46acf288d36ad45ca5
pallet/pallet
utils_test_bad_ns.clj
(ns pallet.utils-test-bad-ns "A namespace for use by pallet.utils-test") (this isn't going to compile)
null
https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/dev-resources/pallet/utils_test_bad_ns.clj
clojure
(ns pallet.utils-test-bad-ns "A namespace for use by pallet.utils-test") (this isn't going to compile)
98a28f93fb7ebd910905ec0abd5edc81ddbde92a899ad3fe339fe23e708ffa0c
danelahman/haskell-coop
MLStateTests.hs
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # {-# LANGUAGE RankNTypes #-} | Module : MLStateTests Description : Example use cases of the runner for ML - style state from ` Control . Runner . MLState ` Copyright : ( c ) , 2019 License : MIT Maintainer : Stability : experimental ...
null
https://raw.githubusercontent.com/danelahman/haskell-coop/95ddb0f340313a25f2e006c75dab8e2c93add8f8/examples/without_signals/MLStateTests.hs
haskell
# LANGUAGE RankNTypes # expected result ("bar","foo") storing a higher-order (pure) function argument in the state
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # | Module : MLStateTests Description : Example use cases of the runner for ML - style state from ` Control . Runner . MLState ` Copyright : ( c ) , 2019 License : MIT Maintainer : Stability : experimental This module provides exampl...
63cd5ae9266092d8484e5d16d62925f93e980f0f4e3593628829ffcaebfc9e3d
dkataskin/erlazure
erlazure.erl
Copyright ( c ) 2013 - 2015 , %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% * Redistributions of source code must retain the above copyright notice, %% this list of conditi...
null
https://raw.githubusercontent.com/dkataskin/erlazure/c6d74d7a032e572ab585c97cebc99feffc1c4281/src/erlazure.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributi...
Copyright ( c ) 2013 - 2015 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL ,...
1ad170443b8d48b543bb3fbb7c081d1246994f2001c4d2b9806fe17fd1b8e785
yallop/ocaml-asp
test_int_exp.ml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/lib_test/test_int_exp.ml
ocaml
A tag module for tokens assumes characters in s' are distinct
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
22bc835813bbaa2fe1c1a459e839cd48bcb37f60f70288d5415f08e000c4bb78
lemmaandrew/CodingBatHaskell
makeTags.hs
From The web is built with HTML strings like \"<i > Yay</i>\ " which draws as italic text . In this example , the \"i\ " tag makes < i > and < /i > which surround the word \"Yay\ " . Given tag and word strings , create the HTML string with tags around the word , e.g. \"<i > Yay</i>\ " . The web is built wit...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/makeTags.hs
haskell
From The web is built with HTML strings like \"<i > Yay</i>\ " which draws as italic text . In this example , the \"i\ " tag makes < i > and < /i > which surround the word \"Yay\ " . Given tag and word strings , create the HTML string with tags around the word , e.g. \"<i > Yay</i>\ " . The web is built wit...
a5b19e3b49939662d0dc2f9041d66c695c38fd466069fb945ef6578b4df14038
wfnuser/sicp-solutions
e2-66.scm
(define (entry binary-tree) (car binary-tree) ) (define (left binary-tree) (cadr binary-tree) ) (define (right binary-tree) (caddr binary-tree) ) (define (lookup given-key binary-tree) (cond ((null? binary-tree) #f) ((equal? given-key (entry binary-tree)) #t) ((> given-key (entry bina...
null
https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch2/e2-66.scm
scheme
(define (entry binary-tree) (car binary-tree) ) (define (left binary-tree) (cadr binary-tree) ) (define (right binary-tree) (caddr binary-tree) ) (define (lookup given-key binary-tree) (cond ((null? binary-tree) #f) ((equal? given-key (entry binary-tree)) #t) ((> given-key (entry bina...
397ed744ef862807f747400767bbfc53426878543a62ff062b4d7e45eb5bd208
ideas-edu/ideas
ModeXML.hs
----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . -------...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Encoding/ModeXML.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional --------------------------------------------------------------------------- Use a fixed seed for random numbe...
Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) Services using XML notation modu...
108793df9ad2f66fa9fc32d16717d6847723a60f1127c355d871d3114f718989
Javran/advent-of-code
Day4.hs
module Javran.AdventOfCode.Y2017.Day4 ( ) where import Data.List import qualified Data.Map.Strict as M import Data.Monoid import qualified Data.Set as S import Javran.AdventOfCode.Prelude data Day4 deriving (Generic) isValid :: [String] -> Bool isValid xs = l == S.size ys where (Sum l, ys) = foldMap (\s -> (...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2017/Day4.hs
haskell
module Javran.AdventOfCode.Y2017.Day4 ( ) where import Data.List import qualified Data.Map.Strict as M import Data.Monoid import qualified Data.Set as S import Javran.AdventOfCode.Prelude data Day4 deriving (Generic) isValid :: [String] -> Bool isValid xs = l == S.size ys where (Sum l, ys) = foldMap (\s -> (...
e42095bbf1c0673386027b14554fb651009a9b162bcb7ad500d166a4e8a42fcf
sathyavijayan/upit
core.clj
(ns sats.upit.core (:require [clojure.tools.logging :as log])) (defn- setup-one [app-state {k :key sfn :setup :as state-def}] (if (get app-state k) (do (log/warnf "skipping %s, already started" k) app-state) (do (log/infof "starting %s" k) (-> app-state (assoc k (sfn app...
null
https://raw.githubusercontent.com/sathyavijayan/upit/119fe88fafd6d1e1e50e9a4fd1c7244f25e67411/src/sats/upit/core.clj
clojure
(ns sats.upit.core (:require [clojure.tools.logging :as log])) (defn- setup-one [app-state {k :key sfn :setup :as state-def}] (if (get app-state k) (do (log/warnf "skipping %s, already started" k) app-state) (do (log/infof "starting %s" k) (-> app-state (assoc k (sfn app...
52b5929fc600b98c488d058da409fb86f8ce0b7bc85024384c78be942a96111f
processone/tsung
ts_os_mon_munin.erl
%%% Copyright 2008 © %%% Author : < > Created : 21 oct 2008 by < > %%% %%% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or %%% (at your o...
null
https://raw.githubusercontent.com/processone/tsung/b0ed22981b534ee3becefb2124a6e168c664d434/src/tsung_controller/ts_os_mon_munin.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Genera...
Copyright 2008 © Author : < > Created : 21 oct 2008 by < > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple...
b265a0e972312ed23c5b359b34c743fcb661ff74301f05443894a522c602c87f
ConsumerDataStandardsAustralia/validation-prototype
Accounts.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module Web.ConsumerData.Au.Api.Types.Banking.Accounts ( module Web.ConsumerData.Au.Ap...
null
https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/Web/ConsumerData/Au/Api/Types/Banking/Accounts.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators #
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # module Web.ConsumerData.Au.Api.Types.Banking.Accounts ( module Web.ConsumerData.Au.Api.Types.Banking.Accounts ) where import Control.Error (note) import Control.Lens...
bf987bbfaef14735ed1128ebfadd7ab97ed1db9a83b664d8ea302d8891f1f0f6
fluree/db
constants.cljc
(ns fluree.db.constants) #?(:clj (set! *warn-on-reflection* true)) ;; Version (def ^:const data_version 4) ;; iri constants (def ^:const iri-CommitProof "#CommitProof") (def ^:const iri-Commit "#Commit") (def ^:const iri-commit "#commit") (def ^:const iri-DB "#DB") (def ^:const iri-data "#data") (def ^:const iri-t...
null
https://raw.githubusercontent.com/fluree/db/d60aaed09abae40794716c6cfaa8ffe5fba59535/src/fluree/db/constants.cljc
clojure
Version iri constants @id for default context setting system constants system collection ids max number reserved for 'system' predicate id constants JSON-LD: turning into data/db id any unique alias for predicate if transaction flake duplicates existing flake, always retract/insert (default behavior ignores n...
(ns fluree.db.constants) #?(:clj (set! *warn-on-reflection* true)) (def ^:const data_version 4) (def ^:const iri-CommitProof "#CommitProof") (def ^:const iri-Commit "#Commit") (def ^:const iri-commit "#commit") (def ^:const iri-DB "#DB") (def ^:const iri-data "#data") (def ^:const iri-t "#t") (def ^:const iri-add...
ec845de094e97e31bb711ee7d18f8e9009b912d44ddf13971be79ba81e56f10c
inhabitedtype/ocaml-aws
getHostedZoneLimit.ml
open Types open Aws type input = GetHostedZoneLimitRequest.t type output = GetHostedZoneLimitResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endp...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/getHostedZoneLimit.ml
ocaml
open Types open Aws type input = GetHostedZoneLimitRequest.t type output = GetHostedZoneLimitResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_option_exn (Endp...
0a3d50d438db41f138e5ecfa3fdda6a4e06f41f4d7488fdbf6fa9e8461f54963
janestreet/vcaml
mode.mli
open Core (** See `:h mode()` for descriptions of these modes. *) type t = | Command_line_editing | Confirm_dialog | External_command | Hit_enter_prompt | Insert | Insert_mode_completion | Insert_mode_x_completion | More_prompt | Normal | Normal_in_terminal_emulator | Normal_using_i_ctrl_o_in_ins...
null
https://raw.githubusercontent.com/janestreet/vcaml/7a53ff24276ddc3085a9b0b72b1053a6db6936cf/src/mode.mli
ocaml
* See `:h mode()` for descriptions of these modes.
open Core type t = | Command_line_editing | Confirm_dialog | External_command | Hit_enter_prompt | Insert | Insert_mode_completion | Insert_mode_x_completion | More_prompt | Normal | Normal_in_terminal_emulator | Normal_using_i_ctrl_o_in_insert_mode | Normal_using_i_ctrl_o_in_replace_mode | N...
f267cfefc943fa99b6904ee43f61c0feb1fa60e0776f8ea98c5d4dbea797db8d
jrm-code-project/LISP-Machine
gc.lisp
-*- Mode : LISP ; Package : GC ; Lowercase : Yes ; ; : CL -*- ( c ) Copyright 1980 , Massachusetts Institute of Technology . ( c ) Copyright 1986 , 1985 , Lisp Machine Incorporated ( LMI ) . Written June 1985 by KHS , once of LMI . Revised December 1985 . ;;; This file contains the (Common) Lisp-coded su...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/sys2/gc.lisp
lisp
Package : GC ; Lowercase : Yes ; ; : CL -*- This file contains the (Common) Lisp-coded support for the Garbage Collector. the without-flipping protocol. This is forwarded to A-memory -- set up by the cold-load builder. The microcode sets this to T as part of warm or cold booting. LMMAC (gc::without-flipping-...
( c ) Copyright 1980 , Massachusetts Institute of Technology . ( c ) Copyright 1986 , 1985 , Lisp Machine Incorporated ( LMI ) . Written June 1985 by KHS , once of LMI . Revised December 1985 . Some GC - related functions that need to be in the cold - load can be found in QRAND . (in-package "GC" :use '("...
ce13c8306cf079da8db98c56451d5b739ab5d913e8f91fec7b4acaa8db76de5d
mrowe/clj-aws-ec2
ec2.clj
(ns aws.sdk.ec2 "Functions to access the Amazon EC2 compute service. Each function takes a map of credentials as its first argument. The credentials map should contain an :access-key key and a :secret-key key. It can also contain an optional :endpoint key if you wish to specify an API endpoint (i.e. region) ...
null
https://raw.githubusercontent.com/mrowe/clj-aws-ec2/e57989fa8f9892dbf525ce2fa422acb3a2571322/src/aws/sdk/ec2.clj
clojure
convert object graphs to clojure maps convert clojure maps to object graphs exceptions filters tags instances the following attributes contain vectors of maps images volumes
(ns aws.sdk.ec2 "Functions to access the Amazon EC2 compute service. Each function takes a map of credentials as its first argument. The credentials map should contain an :access-key key and a :secret-key key. It can also contain an optional :endpoint key if you wish to specify an API endpoint (i.e. region) ...
bbe54cac87347f81dae43b6a5f02ba4a066719aad0804d129b4c0c3f617ca8e5
ucsd-progsys/liquidhaskell
Elim000.hs
{-@ LIQUID "--expect-any-error" @-} module Elim000 () where {-@ prop2 :: Int -> Nat @-} prop2 :: Int -> Int prop2 x = numAbsList x numAbsList = glap numAbs : : ( a - > b ) - > a - > b @ glap :: (a -> b) -> a -> b glap = undefined -- Adding the below signature makes it flag an error... -- numAbs :: Int -> Int numA...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Elim000.hs
haskell
@ LIQUID "--expect-any-error" @ @ prop2 :: Int -> Nat @ Adding the below signature makes it flag an error... numAbs :: Int -> Int
module Elim000 () where prop2 :: Int -> Int prop2 x = numAbsList x numAbsList = glap numAbs : : ( a - > b ) - > a - > b @ glap :: (a -> b) -> a -> b glap = undefined numAbs x = if x > 0 then x else x
a9e26d765d1cae210e5ea1f79f1bdaafddfef0bb676557b03b285385d162c6af
AnyChart/export-server
image_resizer.clj
(ns export-server.browser.image-resizer (:import (java.io ByteArrayInputStream ByteArrayOutputStream) (javax.imageio ImageIO) (java.awt.image BufferedImage) (java.awt Color))) (defn resize-image [screenshot options] (let [img (ImageIO/read (ByteArrayInputStream. screenshot)) ne...
null
https://raw.githubusercontent.com/AnyChart/export-server/0ef2f084e07aaa144e38dff30e3283f686de1108/src/export_server/browser/image_resizer.clj
clojure
(ns export-server.browser.image-resizer (:import (java.io ByteArrayInputStream ByteArrayOutputStream) (javax.imageio ImageIO) (java.awt.image BufferedImage) (java.awt Color))) (defn resize-image [screenshot options] (let [img (ImageIO/read (ByteArrayInputStream. screenshot)) ne...
35a8ce001e3fd3315cb66aaef246ef99be6520b81532503ce525217a685b7653
unison-code/unison
ItineraryGen.hs
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
null
https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison-specsgen/src/SpecsGen/ItineraryGen.hs
haskell
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
aa5734e3814c2dc5cfdf53497084a808d3c257a3a844af2025de90df1e7baaa9
tomhanika/conexp-clj
dependencies.clj
;; Copyright ⓒ the conexp-clj developers; all rights reserved. ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bou...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/main/clojure/conexp/fca/dependencies.clj
clojure
Copyright ⓒ the conexp-clj developers; all rights reserved. The use and distribution terms for this software are covered by the 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 re...
Eclipse Public License 1.0 ( -1.0.php ) (ns conexp.fca.dependencies "Dependencies for Formal Concept Analysis, based on 'Dependencies of many-valued attributes', 1987, Rudolf Wille " (:require [clojure.core.reducers :as r] [conexp.base :refer :all] [conexp.fca.implications :refer [...
45dfcff7a86c65b762c8f575b44c5140007581b23db52d477dc37e19d6df70cd
diffusionkinetics/open
Authentication.hs
# LANGUAGE OverloadedStrings , ScopedTypeVariables , TupleSections , DeriveGeneric , ExtendedDefaultRules , FlexibleContexts # DeriveGeneric, ExtendedDefaultRules, FlexibleContexts#-} module Youido.Authentication where import Web.Scotty import Web.Scotty.Cookie import Control.Concur...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/youido/lib/Youido/Authentication.hs
haskell
------------------------------------------------------------------------ - SERVING ------------------------------------------------------------------------
# LANGUAGE OverloadedStrings , ScopedTypeVariables , TupleSections , DeriveGeneric , ExtendedDefaultRules , FlexibleContexts # DeriveGeneric, ExtendedDefaultRules, FlexibleContexts#-} module Youido.Authentication where import Web.Scotty import Web.Scotty.Cookie import Control.Concur...
f52769306bb65b67772523d35957cc29f1d07ddf842aca31837ce22042bb17a0
YoshikuniJujo/test_haskell
List.hs
module List where import Data.List monosiri :: [String] monosiri = [ 'モ' : nosiri ++ "ックカーネル" | nosiri <- permutations "ノリシ" ]
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/131313c0f9fbe87875b00a239c440a4e2528d084/tribial/try-tribials/src/List.hs
haskell
module List where import Data.List monosiri :: [String] monosiri = [ 'モ' : nosiri ++ "ックカーネル" | nosiri <- permutations "ノリシ" ]
60aed9b73f1724f50e3542d1f297ad7d88cedf78f3693888147eca26301a6b33
erlang/rebar3
rebar_git_subdir_resource.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et -module(rebar_git_subdir_resource). -behaviour(rebar_resource_v2). -export([init/2, lock/2, download/4, needs_update/2, make_vsn/2, format_error/1]). -include("rebar.hrl"). -include_lib("...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_git_subdir_resource.erl
erlang
ex: ts=4 sw=4 et Return true if either the git url or tag/branch/ref is not the same as the currently checked out git repo for the dep sparse checkout not supported but we can still use the subdirectory so no need to fail, just don't do the sparse checkout verify that subdirectory exists
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(rebar_git_subdir_resource). -behaviour(rebar_resource_v2). -export([init/2, lock/2, download/4, needs_update/2, make_vsn/2, format_error/1]). -include("rebar.hrl"). -include_lib("providers/include/pr...
46565d888e6170a769ed70ca6881a482e82792f1288d0be156e76c4e2fa6e00d
ivanjovanovic/sicp
e-1.39.scm
Exercise 1.39 . ; A continued fraction representation of the tangent function was published in 1770 by the German mathematician : ; ; x ; tan x = --------------------- ; x^2 ; 1 - --------------- ; x^3 ; 3 - ---------- ...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/1.3/e-1.39.scm
scheme
A continued fraction representation of the tangent function was published x tan x = --------------------- x^2 1 - --------------- x^3 3 - ---------- where x is in radians. Define a procedure (tan-cf x k) that computes ...
Exercise 1.39 . in 1770 by the German mathematician : 5 - .... function based on Lambert 's formula . K specifies the number of terms to compute , as in exercise 1.37 . (define (tan-cf x k) copying most of the function which is defined in 1.37 (define (cont-frac x n-proc d-proc k...
f62b962c2aee5f67441f2ca29c942b44e8c73ff2b86f733f2e20e74541bc74b5
nuvla/api-server
configuration_template_session_mitreid_token_test.cljc
(ns sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid-token-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.configuration-template :as ct] [sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid-token :as cts-mitreid-token] [sixsq.n...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/configuration_template_session_mitreid_token_test.cljc
clojure
(ns sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid-token-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.configuration-template :as ct] [sixsq.nuvla.server.resources.spec.configuration-template-session-mitreid-token :as cts-mitreid-token] [sixsq.n...
83c4f5f74d40531caff749edccea51cd6bfdb6709398014a343cd18eed63e6a3
michiakig/LispInSmallPieces
variante5.scm
$ I d : variante5.scm , v 1.3 1996/01/28 17:29:37 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version may...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/meroonet/variante5.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) VARIANT 5: next-...
$ I d : variante5.scm , v 1.3 1996/01/28 17:29:37 LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz This file is part of the Meroonet package . (define-meroonet-macro (...
69043eb48a3c00682dd63539df2a49299c4878a91ee1a204474d51dc74be7b92
RichiH/git-annex
Commits.hs
git - annex assistant commit tracking - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Assistant.Commits where import Assistant.Common import Assistant.Types.Commits import...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Commits.hs
haskell
Records a commit in the channel. Records an export commit in the channel.
git - annex assistant commit tracking - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Assistant.Commits where import Assistant.Common import Assistant.Types.Commits import...
a3f3587570b514a85acb7e25058bd445fcd868cb400ee63b66b4c52328738faf
kupl/LearnML
patch.ml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let isStringExist (e : string) (l : 'a list) : bool = let x = List.find (fun x -> x = e) l in true let rec __s1 __s2 (__s3 : 'b list) : bool = match __s3 with | [] -> false | __s15 :: __s16 -> if __s15 = __s2 then true ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub43/patch.ml
ocaml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let isStringExist (e : string) (l : 'a list) : bool = let x = List.find (fun x -> x = e) l in true let rec __s1 __s2 (__s3 : 'b list) : bool = match __s3 with | [] -> false | __s15 :: __s16 -> if __s15 = __s2 then true ...
c5232a5e34bf5419970977dac56506f18a752286537e4e4a6216cb873debcd46
victornicolet/parsynt
inputc.ml
open Format open Cil open SketchTypes open SPretty open Utils open Utils.PpTools (* Generates synthetic join and loop functions *) type hdef_file = hdef_loop * hdef_join and hdef_loop = { args : Cil.varinfo list; llocals : Cil.varinfo list; lreturns : Cil.varinfo list; lbody: Cil.block; } and h...
null
https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/cilfront/inputc.ml
ocaml
Generates synthetic join and loop functions
open Format open Cil open SketchTypes open SPretty open Utils open Utils.PpTools type hdef_file = hdef_loop * hdef_join and hdef_loop = { args : Cil.varinfo list; llocals : Cil.varinfo list; lreturns : Cil.varinfo list; lbody: Cil.block; } and hdef_join = { argsl : Cil.varinfo list; a...
1c4726775790bcff933df7c0f36d5fb336f212749e685d4c95e00a3b33429283
d12frosted/git-config-manager
Git.hs
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Git ( setConfig , unsetConfig , getConfig , setScheme , unsetScheme , getSchemes , addScheme , removeScheme , loadConfig ...
null
https://raw.githubusercontent.com/d12frosted/git-config-manager/47f8877cddfd64feb5a639348e999b88fe35c804/app/Git.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ * Internal imports ------------------------------------------------------------------------------ * External imports ------------------------------------------------------------------------------ * Operation...
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # module Git ( setConfig , unsetConfig , getConfig , setScheme , unsetScheme , getSchemes , addScheme , removeScheme , loadConfig , getConfigPath ) ...
a5fe7713f61a128c872ed4e720bc57b7b85e74f428894e4dce0a7e6df01eda55
hallettj/dot-xmonad
MarkAsUrgent.hs
module XMonad.Hooks.MarkAsUrgent (markAsUrgent) where import XMonad import Foreign.C.Types (CLong) realUrgencyHintBit :: CLong realUrgencyHintBit = fromIntegral urgencyHintBit markAsUrgent :: ManageHook markAsUrgent = do w <- ask liftX $ withDisplay $ \d -> io $ do h <- getWMHints d w setWMHints d w (h {...
null
https://raw.githubusercontent.com/hallettj/dot-xmonad/4a05291b43fd12632264961e51aa93823e22eaeb/home/.xmonad/lib/XMonad/Hooks/MarkAsUrgent.hs
haskell
module XMonad.Hooks.MarkAsUrgent (markAsUrgent) where import XMonad import Foreign.C.Types (CLong) realUrgencyHintBit :: CLong realUrgencyHintBit = fromIntegral urgencyHintBit markAsUrgent :: ManageHook markAsUrgent = do w <- ask liftX $ withDisplay $ \d -> io $ do h <- getWMHints d w setWMHints d w (h {...
580125876a1b3a734d46d0cc57bd53cd2a16e78298bdcab46b52c505fdfbb49a
otakar-smrz/elixir-fm
E.hs
module Elixir.Data.Moony.Foreign.E (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['b','U','d','.','g','U','r','I','t','^','s','A'] <| [ _____ `xtra` {- <bUd.gUrIt^sA> -} [ ['P','o','d','g','o','r','i','c','a'] ] ] cluster_2 = cluster ...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Moony/Foreign/E.hs
haskell
<bUd.gUrIt^sA> <bUr> <bArI> <bArI> <bIrI> <bUrA> <bArIbA> <bIrU^giyA> <bIrI_hIl> <bArAdUrn> <bIrIrA> <bIrUzI> <bArIziyAn> <bIrIs> <bIrIz> <bUrIs> <birIstrUykA> <bArAk> <bArAk> <baramhAt> <bIrUn> <bArAnUf> <bIrinIh> <bArbAdUs> <bArbir> <barbArA> <bArtU> <bIrtI> <b...
module Elixir.Data.Moony.Foreign.E (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['b','U','d','.','g','U','r','I','t','^','s','A'] <| [ cluster_2 = cluster |> ['b','U','r'] <| [ cluster_3 = cluster |> ['b','A','r','I'] <| [ cluster_4 = cluster |> [...
2300599a2fc5b110fd321955bce709b124ecab0b1a2e5add48463dd0398dfb2a
sighingnow/mxnet-haskell
NDArray.hs
----------------------------------------------------------- -- | -- module: MXNet.Core.Base.Internal.TH.NDArray copyright : ( c ) 2016 - 2017 He license : MIT -- maintainer: -- Functions about NDArray that generated by template haskel...
null
https://raw.githubusercontent.com/sighingnow/mxnet-haskell/b8e8c6834519df512533094122ee223fd9fb91d8/mxnet/src/MXNet/Core/Base/Internal/TH/NDArray.hs
haskell
--------------------------------------------------------- | module: MXNet.Core.Base.Internal.TH.NDArray maintainer: # OPTIONS_GHC -Wno-redundant-constraints # # OPTIONS_GHC -Wno-unused-local-binds # | Register immutable version of ndarray operators. | Register mutable versi...
copyright : ( c ) 2016 - 2017 He license : MIT Functions about NDArray that generated by template haskell . # OPTIONS_GHC -Wno - missing - signatures # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAG...
97417fd05dc53fd2fd01f73062eb4f52659132ddc8522d0ae370f5dafb3158b6
cabol/cross_db
xdb_lib.erl
%%%------------------------------------------------------------------- %%% @doc %%% Common utilities. %%% @end %%%------------------------------------------------------------------- -module(xdb_lib). -export([ to_bin/1, to_atom/1, to_kvlist/1, to_map/1, is_datetime/1, stringify/2, keyfetch/2, keyfind/2...
null
https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/src/xdb_lib.erl
erlang
------------------------------------------------------------------- @doc Common utilities. @end ------------------------------------------------------------------- =================================================================== Common Types =================================================================== ===...
-module(xdb_lib). -export([ to_bin/1, to_atom/1, to_kvlist/1, to_map/1, is_datetime/1, stringify/2, keyfetch/2, keyfind/2, keyfind/3, keymerge/2, kv_keys/1, kv_values/1, reduce_while/3, raise/1, raise/2, raise/3 ]). -type kwentry() :: {atom(), any()}. -type keyword() :: [kwentry()]. -...
99cabac9a475823b25f3717dca6db05a7e3d61b0bb075ff5272557f5a560b80c
Soostone/katip
Time.hs
module Katip.Tests.Format.Time ( tests, ) where ------------------------------------------------------------------------------- import Data.Aeson (toJSON) import qualified Data.Text as Text import Data.Time import Data.Time.Clock.POSIX import qualified Data.Time.Locale.Compat as LC --------------------------------...
null
https://raw.githubusercontent.com/Soostone/katip/d868c431b435dc7e11a3888e2b333653514c1cd8/katip/test/Katip/Tests/Format/Time.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module Katip.Tests.Format.Time ( tests, ) where import Data.Aeson (toJSON) import qualified Data.Text as Text import Data.Time import Data.Time.Clock.POSIX import qualified Data.Time.Locale.Compat as LC import Katip.Format.Time import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck tests :: TestT...
d9cba970d27745e9d5f0e7480d9be1d288a6f7bd03630c6df431d2cc4a1b261a
Carnap/Carnap
CounterModelers.hs
module Filter.CounterModelers (makeCounterModelers) where import Text.Pandoc import Filter.Util (numof, contentOf, toDataCarnap, intoChunks,formatChunk, unlines', exerciseWrapper) import Data.Map (fromList, toList, unions) import qualified Data.Text as T import Data.Text (Text) import Prelude makeCounterModelers :: B...
null
https://raw.githubusercontent.com/Carnap/Carnap/a2b314474db803f31ee228f23ad7406c10a5c85a/Carnap-Server/Filter/CounterModelers.hs
haskell
module Filter.CounterModelers (makeCounterModelers) where import Text.Pandoc import Filter.Util (numof, contentOf, toDataCarnap, intoChunks,formatChunk, unlines', exerciseWrapper) import Data.Map (fromList, toList, unions) import qualified Data.Text as T import Data.Text (Text) import Prelude makeCounterModelers :: B...
ff4547723789789eadcc8816119512329b78862c1247ec2fb6f3885c832bbdf2
AndrasKovacs/ELTE-func-lang
Lesson05_after.hs
# options_ghc -Wincomplete - patterns # # language InstanceSigs # import Control.Monad {- composeEither variation -} data Error = Error deriving (Show, Eq) composeEither'' :: (b -> (Either Error) c) -> (a -> (Either Error) b) -> (a -> (Either Error) c) -- composeEither'' f g a = either Left f (g a) -- compose...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-2/gyak_2/Lesson05_after.hs
haskell
composeEither variation composeEither'' f g a = either Left f (g a) composeEither'' f g a = (g a) >>= f composeEither'' = flip (>=>) fmap f ra = do f <- rf a <- ra return (f a) (>=>) f g a = f a >>= g IO getLine :: IO String -- read user input until a newline character putStrLn :: String -> IO () ...
# options_ghc -Wincomplete - patterns # # language InstanceSigs # import Control.Monad data Error = Error deriving (Show, Eq) composeEither'' :: (b -> (Either Error) c) -> (a -> (Either Error) b) -> (a -> (Either Error) c) composeEither'' = (<=<) Monad instance variation data Result a = Ok a | Err String ...