_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
15d3c8b841697d089d790c1ae70cee19b10fd2f9d8c39d11b4cbd887c85e6e6e
callum-oakley/advent-of-code
20.clj
(ns aoc.2016.20 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (->> s str/split-lines (map #(mapv read-string (re-seq #"\d+" %))))) (defn part-* [limit blacklist] (let [[allowed i] (reduce (fn [[allowed i] [low high]] [(into allowed (range...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/da5233fc0fd3d3773d35ee747fd837c59c2b1c04/src/aoc/2016/20.clj
clojure
(ns aoc.2016.20 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (->> s str/split-lines (map #(mapv read-string (re-seq #"\d+" %))))) (defn part-* [limit blacklist] (let [[allowed i] (reduce (fn [[allowed i] [low high]] [(into allowed (range...
1516946b63500aeb02be2c02da29466a63a9282ba82d54091300f220ec461c2e
lykahb/groundhog
CodeGen.hs
# LANGUAGE CPP # {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE ExplicitForAll #-} # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # module Database.Groundhog.TH.CodeGen ( mkEmbeddedPersistFieldInstance, mkEmbeddedPurePersistFieldInstance, mkEmbeddedInstance, mkEnti...
null
https://raw.githubusercontent.com/lykahb/groundhog/1f82260df6a901f1701f57a6673ca21da8603ea6/groundhog-th/Database/Groundhog/TH/CodeGen.hs
haskell
# LANGUAGE DoAndIfThenElse # # LANGUAGE ExplicitForAll # find corresponding field from vars we cannot use simply isClassInstance because it crashes on type vars and in this case isPrim (AppT (ConT key) _) | key == ''Key = return True if there are any type settings, apply them in runtime
# LANGUAGE CPP # # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # module Database.Groundhog.TH.CodeGen ( mkEmbeddedPersistFieldInstance, mkEmbeddedPurePersistFieldInstance, mkEmbeddedInstance, mkEntityPhantomConstructors, mkEntityPhantomConstructorInstances, ...
f7aa4ca89cd134f2658d86fd09d609bb6ccece338ca6304dfe3bf74ebd819c0d
roryk/bcbio.rnaseq
t_template.clj
(ns bcbio.rnaseq.t-template (:require [bcbio.rnaseq.util :refer [file-exists?]] [bcbio.rnaseq.test-setup :refer [test-setup]] [bcbio.rnaseq.config :refer [combined-count-file count-files]] [bcbio.rnaseq.templates :refer [run-template templates get-analysis-config run-R-an...
null
https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/test/bcbio/rnaseq/t_template.clj
clojure
(ns bcbio.rnaseq.t-template (:require [bcbio.rnaseq.util :refer [file-exists?]] [bcbio.rnaseq.test-setup :refer [test-setup]] [bcbio.rnaseq.config :refer [combined-count-file count-files]] [bcbio.rnaseq.templates :refer [run-template templates get-analysis-config run-R-an...
b3a74a0ef56267f5ffb03ac7bc7205fedd8df6860fb3b14ded4e5fbd9ea9c626
Liqwid-Labs/liqwid-plutarch-extra
Value.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE PolyKinds # module Plutarch.Extra.Value ( -- * Creation passetClassDataValue, passetClassDataValueT, psingleValue, psingleValue', psingleValueT', pvalue, pvaluePositive, -- * Queries padaOf, passetClassValueOf', passetClassValueOf, passetClas...
null
https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/79604ece6d24c1e5d6e11c02e88f9e7907a19399/src/Plutarch/Extra/Value.hs
haskell
* Creation * Queries * Aggregation and elimination * Comparison * Miscellaneous ------------------------------------------------------------------------------ -------------------------------------- Value Creation > PValue ' Sorted ' NonZero ) > PAsData PTokenName > PInteger > PBuiltinPair > PBuiltinPair > PBuilt...
# LANGUAGE ExistentialQuantification # # LANGUAGE PolyKinds # module Plutarch.Extra.Value ( passetClassDataValue, passetClassDataValueT, psingleValue, psingleValue', psingleValueT', pvalue, pvaluePositive, padaOf, passetClassValueOf', passetClassValueOf, passetClassValueOfT', passetClassValueO...
08242a1e0592e6f053ab3bb0f76e61c3cb4af532b803713a2d30be7b1ad6ea01
meiersi/blaze-builder
ScalingBenchmark.hs
{-# LANGUAGE GADTs #-} ----------------------------------------------------------------------------- -- | -- Module : Criterion.ScalingBenchmark Copyright : -- License : BSD3-style (see LICENSE) -- Maintainer : < > -- Stability : experimental Portability : GHC -- -- Measure the scaling behavi...
null
https://raw.githubusercontent.com/meiersi/blaze-builder/2d8ce308951656ebf0318097989dc1c017dcff83/Criterion/ScalingBenchmark.hs
haskell
# LANGUAGE GADTs # --------------------------------------------------------------------------- | Module : Criterion.ScalingBenchmark License : BSD3-style (see LICENSE) Stability : experimental Measure the scaling behaviour of a benchmarkable function. -------------------------------------------------...
Copyright : Maintainer : < > Portability : GHC module Criterion.ScalingBenchmark where import Prelude hiding (lines) import Data.Function (on) import Data.List (unfoldr, group, transpose, sortBy, intersperse) import Data.Word (Word8) import Data.Monoid import Data.Int (Int64) import qualified Data.V...
11fb09d381a5d8390f8721db5b4a277540fead9395eb46ca69a2b4970fb22fb9
janestreet/ecaml
minor_mode.ml
open! Core open! Import module Q = struct include Q let abbrev_mode = "abbrev-mode" |> Symbol.intern let buffer_read_only = "buffer-read-only" |> Symbol.intern let define_minor_mode = "define-minor-mode" |> Symbol.intern let goto_address_mode = "goto-address-mode" |> Symbol.intern let read_only_mode = "re...
null
https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/src/minor_mode.ml
ocaml
open! Core open! Import module Q = struct include Q let abbrev_mode = "abbrev-mode" |> Symbol.intern let buffer_read_only = "buffer-read-only" |> Symbol.intern let define_minor_mode = "define-minor-mode" |> Symbol.intern let goto_address_mode = "goto-address-mode" |> Symbol.intern let read_only_mode = "re...
1515822dd369ea34fd6fea0bd5610583297a1125f27485610de2fcdc243d8221
ocaml-flambda/flambda-backend
int_ids.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/c71dbc9c0cb0f0581456c1503d202cd3f3288e78/middle_end/flambda2/identifiers/int_ids.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2020 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the module Const : sig type t = private Table_by_int_id.Id.t type ...
53b9616d935bad42aecdd4627d2f08cc0255924b0f3026f28a06d17ebca6a3a2
bos/rwh
HttpParser.hs
module HttpParser ( HttpRequest(..) , Method(..) , p_query , p_request , parse ) where import ApplicativeParsec import Numeric (readHex) type HttpParser a = CharParser () a p_query :: HttpParser [(String, Maybe String)] p_query = pair `sepBy` char '&' where pair = (,) <$> many1 safe <...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch27/HttpParser.hs
haskell
module HttpParser ( HttpRequest(..) , Method(..) , p_query , p_request , parse ) where import ApplicativeParsec import Numeric (readHex) type HttpParser a = CharParser () a p_query :: HttpParser [(String, Maybe String)] p_query = pair `sepBy` char '&' where pair = (,) <$> many1 safe <...
33ec33867344e0e66d3ea15bd599dc45d6d087892dc923e00dede7d757ac78de
onyx-platform/onyx
kill_job.clj
(ns onyx.log.commands.kill-job (:require [clojure.data :refer [diff]] [com.stuartsierra.component :as component] [onyx.log.commands.common :refer [peer->allocated-job] :as common] [onyx.scheduling.common-job-scheduler :as cjs] [onyx.extensions :as extensions] ...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/log/commands/kill_job.clj
clojure
(ns onyx.log.commands.kill-job (:require [clojure.data :refer [diff]] [com.stuartsierra.component :as component] [onyx.log.commands.common :refer [peer->allocated-job] :as common] [onyx.scheduling.common-job-scheduler :as cjs] [onyx.extensions :as extensions] ...
68188a400192fad8e42c4d9235149586898a1c415822b52a930bfc37897c2d5e
EFanZh/EOPL-Exercises
exercise-1.32.rkt
#lang eopl ;; Exercise 1.32 [★] Write a procedure double-tree that takes a bintree, as represented in definition 1.1.7, and ;; produces another bintree like the original, but with all the integers in the leaves doubled. (require "exercise-1.31.rkt") (define double-tree (lambda (bin-tree) (if (leaf? bin-tree) ...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-1.32.rkt
racket
Exercise 1.32 [★] Write a procedure double-tree that takes a bintree, as represented in definition 1.1.7, and produces another bintree like the original, but with all the integers in the leaves doubled.
#lang eopl (require "exercise-1.31.rkt") (define double-tree (lambda (bin-tree) (if (leaf? bin-tree) (leaf (* (contents-of bin-tree) 2)) (interior-node (contents-of bin-tree) (double-tree (lson bin-tree)) (double-tree (rson bin-tree)))))) (provide ...
7e17a5684af2c2d59937d33581d383f885866709f0571e3c0d7c4bbba393d05a
Convex-Dev/convex-web
session.clj
(ns convex-web.session (:require [clojure.pprint :as pp] [clojure.tools.logging :as log] [datalevin.core :as d] [ring.middleware.session.store :refer [SessionStore]] [convex-web.convex :as convex]) (:import (java.util UUID))) (defn all [db] (d/q '[:find [(pull ?e [*]) ...] :in $ ...
null
https://raw.githubusercontent.com/Convex-Dev/convex-web/c1822a14a0459cf622143af30433d9e9544defed/src/main/clojure/convex_web/session.clj
clojure
TODO: Change the app to use :convex-web.session/wallet instead. Key is nil when it's a new Session
(ns convex-web.session (:require [clojure.pprint :as pp] [clojure.tools.logging :as log] [datalevin.core :as d] [ring.middleware.session.store :refer [SessionStore]] [convex-web.convex :as convex]) (:import (java.util UUID))) (defn all [db] (d/q '[:find [(pull ?e [*]) ...] :in $ ...
8f538386498e04fe88bc1dd251ebaad46ee41bc3ed7bbab5bf0a0a2eba7870e4
nyu-acsys/drift
sum_cps.ml
let rec cps_sum (cn: int) (ck: int -> unit) = if cn <= 0 then ck 0 else let f (fx: int) = ck (fx + cn) in cps_sum (cn - 1) f let main_p (n:int) = let u (ux: int) = assert (ux >= n) in cps_sum n u let main (w:unit) = let _ = main_p 100 in let _ = for i = 1 to 1000000 do main ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/high/sum_cps.ml
ocaml
let rec cps_sum (cn: int) (ck: int -> unit) = if cn <= 0 then ck 0 else let f (fx: int) = ck (fx + cn) in cps_sum (cn - 1) f let main_p (n:int) = let u (ux: int) = assert (ux >= n) in cps_sum n u let main (w:unit) = let _ = main_p 100 in let _ = for i = 1 to 1000000 do main ...
3ce3a9e23b8f3dce8f8b6042e09d3bb345228a6ec11f606caf12ba4c379c6007
geneweb/geneweb
gwc.ml
Copyright ( c ) 1998 - 2007 INRIA open Gwcomp (** Checks a .gwo header and prints fails if header is absent or not compatible. *) let check_magic fname ic = let b = really_input_string ic (String.length magic_gwo) in if b <> magic_gwo then if String.sub magic_gwo 0 4 = String.sub b 0 4 then failwith (...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/bin/gwc/gwc.ml
ocaml
* Checks a .gwo header and prints fails if header is absent or not compatible. switch to the next .gwo file
Copyright ( c ) 1998 - 2007 INRIA open Gwcomp let check_magic fname ic = let b = really_input_string ic (String.length magic_gwo) in if b <> magic_gwo then if String.sub magic_gwo 0 4 = String.sub b 0 4 then failwith ("\"" ^ fname ^ "\" is a GeneWeb object file, but not compatible") else fai...
a321ab19ba5ec83d8fe8f208423e9616841794122204facde9c8a46457ff0d80
spawnfest/eep49ers
f2.erl
-module(f2). -export([wait/0]). wait() -> receive after infinity -> ok end.
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/otp_6115/f2.erl
erlang
-module(f2). -export([wait/0]). wait() -> receive after infinity -> ok end.
ad0b7b7b61b53fd09cb32bd3b117046d9cdfa064fb2c1ad3ac6d0c56465370ba
per-gron/termite
cell.scm
(define-type cell id: 713cb0a4-16ea-4b18-a18e-7a9e33e7b92b unprintable: pid) (define (cell obj) (make-cell (spawn (lambda () (cell-loop obj))))) (define (cell-loop obj) (recv ((from tag 'ref) (! from (list tag obj)) (cell-loop obj)) (('set! obj) (cell-loop obj)))) ...
null
https://raw.githubusercontent.com/per-gron/termite/d8b72aa5970d68c99953cf58e10e9eca7cb156be/examples/cell.scm
scheme
(define-type cell id: 713cb0a4-16ea-4b18-a18e-7a9e33e7b92b unprintable: pid) (define (cell obj) (make-cell (spawn (lambda () (cell-loop obj))))) (define (cell-loop obj) (recv ((from tag 'ref) (! from (list tag obj)) (cell-loop obj)) (('set! obj) (cell-loop obj)))) ...
e9644bd68c97c9c0ec8e7f22d9ad5b3623959f212a25c45aeafb639b4ac21095
vtsingaras/orct
core_test.clj
(ns orct.core-test (:require [clojure.test :refer :all] [orct.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/vtsingaras/orct/1b4c2b2b16c62cd8a51db8c1ed6a805a4677779c/test/orct/core_test.clj
clojure
(ns orct.core-test (:require [clojure.test :refer :all] [orct.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
7f6af8be32bf26951019e0498b443f6ce2a6ee27b39a4f38ae8ef47499ab5ca9
emilypi/higher-functors
Rep.hs
# LANGUAGE TypeFamilies # # LANGUAGE RoleAnnotations # {-# LANGUAGE GADTs #-} # LANGUAGE StandaloneKindSignatures # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE DefaultSignatures # {-# LANGUAGE RankNTypes #-} module Data.Functor.Higher.Rep where ...
null
https://raw.githubusercontent.com/emilypi/higher-functors/41f8858983f706177b88e6f2ec78e6f5f59dd58c/src/Data/Functor/Higher/Rep.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # minimal (hindex, htabulate) #
# LANGUAGE TypeFamilies # # LANGUAGE RoleAnnotations # # LANGUAGE StandaloneKindSignatures # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE DefaultSignatures # module Data.Functor.Higher.Rep where import Data.Function.Higher import Data.Functor.H...
5c159eec635d1c7f5e35f021efcdf405d869c47efde029fd12c59a2def90fbd4
rroohhh/guix_packages
i3.scm
(define-module (vup home i3) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix import utils) ;; for flatten #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:export (i3-configuration i3-bar-configuration i3-bar-colors-configuration i3-bar...
null
https://raw.githubusercontent.com/rroohhh/guix_packages/9d3057b70d4172027bc0c5136b2394e8ea866631/vup/home/i3.scm
scheme
for flatten shitty hack for unicode to work ca n't use this , as it breaks unicode :(
(define-module (vup home i3) #:use-module (guix gexp) #:use-module (guix records) #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:export (i3-configuration i3-bar-configuration i3-bar-colors-configuration i3-bar-color make-i3-bar-color i3-font-configura...
81dc3cfb4892be12c22638818ce2873d8f4a10271917a8243d957edbadab9866
slegrand45/mysql_protocol
mp_data_simple.ml
let split_date_string v = let t = Array.make 3 "" in let i = ref 0 in let f c = match c with | '0'..'9' -> t.(!i) <- t.(!i) ^ (String.make 1 c) | '-' -> incr i | _ -> assert false in let () = String.iter f v in if empty , default to 0 let default i e = if (e = "...
null
https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/src/mp_data_simple.ml
ocaml
sign time is not used for datetime/timestamp TODO : newdate : add to tests TODO : add to tests
let split_date_string v = let t = Array.make 3 "" in let i = ref 0 in let f c = match c with | '0'..'9' -> t.(!i) <- t.(!i) ^ (String.make 1 c) | '-' -> incr i | _ -> assert false in let () = String.iter f v in if empty , default to 0 let default i e = if (e = "...
395d4325b27313a3237a59d6662030a68edcdd1994ab2965c323957cf990fa35
basho/riak_test
verify_dt_context.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 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_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_dt_context.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 ) 2013 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 ( C ) 2013 , Basho Technologi...
5c8a43622b621401cdc709401c20b591b7eb150e7862eac0a1969d5f1595426b
BoeingX/haskell-programming-from-first-principles
LetUsWriteCodeSpec.hs
module MoreFunctionalPatterns.ChapterExercises.LetUsWriteCodeSpec where import Test.Hspec import MoreFunctionalPatterns.ChapterExercises.LetUsWriteCode spec :: Spec spec = do describe "Test roundTrip'" $ do it "roundTrip' 4" $ do roundTrip' 4 `shouldBe` 4
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/MoreFunctionalPatterns/ChapterExercises/LetUsWriteCodeSpec.hs
haskell
module MoreFunctionalPatterns.ChapterExercises.LetUsWriteCodeSpec where import Test.Hspec import MoreFunctionalPatterns.ChapterExercises.LetUsWriteCode spec :: Spec spec = do describe "Test roundTrip'" $ do it "roundTrip' 4" $ do roundTrip' 4 `shouldBe` 4
0538438bc74defa7bd83d1fa722312e8bc2e6ff05eaa90694ad69d1b004bbba3
modular-macros/ocaml-macros
pr6870_bad.ml
module type T = sig type 'a t end module Fix (T : T) = struct type r = ('r T.t as 'r) end
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-rectypes-bugs/pr6870_bad.ml
ocaml
module type T = sig type 'a t end module Fix (T : T) = struct type r = ('r T.t as 'r) end
fd9197076c352ecbca078e078748161aedb4a49c898177fd7d6700ffa3201b64
kiselgra/c-mera
cxx.decl.03.lisp
(include <iostream>) (using-namespace std) (struct Foo (function bar () -> int (return 29081997))) (function main () -> int (decl ((Foo foo) (int bar = (foo.bar))) (<< cout bar endl) (return 0))) # # 29081997
null
https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/cxx.decl.03.lisp
lisp
(include <iostream>) (using-namespace std) (struct Foo (function bar () -> int (return 29081997))) (function main () -> int (decl ((Foo foo) (int bar = (foo.bar))) (<< cout bar endl) (return 0))) # # 29081997
ffda69ec0f51ac4a7c2becd9cc156a5eafc982d68b05ca3651f66a9b77e4fa69
bldl/magnolisp
test-if-2.rkt
#lang magnolisp (require (only-in racket/base)) (typedef int #:: (foreign)) (function (holds? x) #:: ([type (-> int Bool)] foreign) #t) (function (f x) #:: (export [type (-> int int)]) (if (holds? x) x 6)) (f 5)
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-if-2.rkt
racket
#lang magnolisp (require (only-in racket/base)) (typedef int #:: (foreign)) (function (holds? x) #:: ([type (-> int Bool)] foreign) #t) (function (f x) #:: (export [type (-> int int)]) (if (holds? x) x 6)) (f 5)
09b7b76d552fbfd91d15f64d05e6fbb95f893e88ceb610ba7506217931e22879
gheber/kenzo
suspensions.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - * ;;; SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS ;;; SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS ;;; SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS (IN-PACKAGE #:cat-7) (PROVIDE "suspensions") (DEFUN SUSPENSION-CMPR (cmpr) (decl...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/src/kenzo-7/suspensions.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 - * SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS SUSPENSIONS
(IN-PACKAGE #:cat-7) (PROVIDE "suspensions") (DEFUN SUSPENSION-CMPR (cmpr) (declare (type cmprf cmpr)) (flet ((rslt (gnrt1 gnrt2) (declare (type gnrt gnrt1 gnrt2)) (if (eq gnrt1 :s-bsgn) :equal (funcall cmpr gnrt1 gnrt2)))) (the cmprf #'rslt))) (DEFUN SU...
6d54ab510db1ef2931cbab2b5ed32839a4d7896321c222c3c360b60f10541d54
Pyons/aoc-util
tools_test.clj
(ns aoc-util.tools-test (:require [clojure.test :refer [deftest testing is are]] [clojure.java.io :as io] [aoc-util.utils :refer [parse-int]] [aoc-util.tools :refer [download-puzzle parse-ns parse-input]])) (deftest namespace-parser (testing "Parsing namespace" (are [x]...
null
https://raw.githubusercontent.com/Pyons/aoc-util/cba0b9ac23cd730f8e36354d39748b6a6bd6d41e/test/aoc_util/tools_test.clj
clojure
(ns aoc-util.tools-test (:require [clojure.test :refer [deftest testing is are]] [clojure.java.io :as io] [aoc-util.utils :refer [parse-int]] [aoc-util.tools :refer [download-puzzle parse-ns parse-input]])) (deftest namespace-parser (testing "Parsing namespace" (are [x]...
f5dc6ae29d481f5af8d63a8fd808bf75c94733828d782eec845a08a26d53e9ab
brendanhay/amazonka
WorkDocs.hs
-- | -- Module : Test.Amazonka.WorkDocs Copyright : ( c ) 2013 - 2023 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > -- Stability : auto-generated Portability : non - portable ( GHC extensions ) module Test.Amazonka.WorkDocs ( tests, fixtures, ) where i...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workdocs/test/Test/Amazonka/WorkDocs.hs
haskell
| Module : Test.Amazonka.WorkDocs Stability : auto-generated
Copyright : ( c ) 2013 - 2023 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Portability : non - portable ( GHC extensions ) module Test.Amazonka.WorkDocs ( tests, fixtures, ) where import Test.Tasty (TestTree) tests :: [TestTree] tests = [] fixtures :: [Tes...
a166665647e1f7b8768e0fc28822414fee5f352a85cf2f5dd5217363be9e8830
spawngrid/htoad
crash.erl
%% a module that crashes in just about every way possible -module(crash). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start/0]). -record(state, { host, port }). start() -> gen_server:start({local, ?MODULE}, ?MOD...
null
https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/lager/test/crash.erl
erlang
a module that crashes in just about every way possible
-module(crash). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([start/0]). -record(state, { host, port }). start() -> gen_server:start({local, ?MODULE}, ?MODULE, [], []). init(_) -> {ok, {}}. handle_call(undef, _...
3963611a4633c1efa52c359e4f1d9aa315cdce08fff75942f81cc7aca20848a9
Ericson2314/lighthouse
Internals.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Text.XHtml.internals Copyright : ( c ) , and the Oregon Graduate Institute of Science and Technology , 1999 - 2001 , ( c ) , 2004 - 2006 -- License : BSD-style...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/xhtml/Text/XHtml/Internals.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Text.XHtml.internals License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable Internals of the XHTML combinator library. -------------------------------------------------...
Copyright : ( c ) , and the Oregon Graduate Institute of Science and Technology , 1999 - 2001 , ( c ) , 2004 - 2006 Maintainer : < > module Text.XHtml.Internals where import Data.Char import Data.Monoid data HtmlElement = HtmlString String | HtmlTag...
b17092163db3d05bf440e2a6d6196008bb00d5f7a1bc18a0f1ac7b2fd75d8a6f
philnguyen/soft-contract
patterns.rkt
#lang typed/racket/base (provide singleton-set with-guard match-lambda**/symmetry) (require racket/match racket/set (for-syntax racket/base racket/list racket/syntax syntax/parse)) (define (singleton-set? x) (and (set? x) (= 1 (set-count...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/utils/patterns.rkt
racket
#lang typed/racket/base (provide singleton-set with-guard match-lambda**/symmetry) (require racket/match racket/set (for-syntax racket/base racket/list racket/syntax syntax/parse)) (define (singleton-set? x) (and (set? x) (= 1 (set-count...
c540eb84f2c9c30aa3eafc1ec5d4333ce219f17c2e391b90f63949a20f2481c0
mbj/mhs
Schema.hs
module OpenApi.Schema where import Data.Scientific (Scientific) import OpenApi.JSON import OpenApi.Prelude hiding (Enum) import OpenApi.Referencable import OpenApi.Reference import OpenApi.ReferenceOr import OpenApi.TaggedText import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import ...
null
https://raw.githubusercontent.com/mbj/mhs/71d96825e92df3549c2ca5b0058acbb91fc2a6e7/openapi/src/OpenApi/Schema.hs
haskell
module OpenApi.Schema where import Data.Scientific (Scientific) import OpenApi.JSON import OpenApi.Prelude hiding (Enum) import OpenApi.Referencable import OpenApi.Reference import OpenApi.ReferenceOr import OpenApi.TaggedText import qualified Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import ...
fc6942e2723c013c0e681ef79b47141051136f9fd7facc0e0697a325f9708fa1
jordanthayer/ocaml-search
vacuum_inadmiss.ml
(** Where inadmissible heuristics for vacuum world problems go to die *) open Vacuum let scaled_manhattan obst_p l1 l2 = (1. +. obst_p) *. (manhattan l1 l2) let scaled_spanning_tree obst_p = spanning_tree ~d_calc:(scaled_manhattan obst_p) let scaled_spanning_tree_heuristic obst_p n = let verts = n.pos :: n...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/vacuum/vacuum_inadmiss.ml
ocaml
* Where inadmissible heuristics for vacuum world problems go to die Interfaces
open Vacuum let scaled_manhattan obst_p l1 l2 = (1. +. obst_p) *. (manhattan l1 l2) let scaled_spanning_tree obst_p = spanning_tree ~d_calc:(scaled_manhattan obst_p) let scaled_spanning_tree_heuristic obst_p n = let verts = n.pos :: n.remaining_dirt in (scaled_spanning_tree obst_p) verts let make_hea...
5919dfd9f6555979e8c6cd46f000e2292f98b41183c4586935c69645942da94c
onedata/op-worker
custom_metadata.erl
%%%------------------------------------------------------------------- @author ( C ) 2015 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Model for holding files' custom me...
null
https://raw.githubusercontent.com/onedata/op-worker/05957abf9e7f3624e2bddae3f1c7e78d46fb4ea2/src/modules/datastore/models/file/metadata/custom_metadata.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Model for holding files' custom metadata. Note: this module operates on referenced uuids - all operations on hardlinks are treated as operations on original file. Thus, ...
@author ( C ) 2015 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(custom_metadata). -author("Tomasz Lichon"). -include("modules/datastore/datastore_models.hrl"). -include("modules/datastore/datastore_runner.hrl"). -include("proto/oneprovider/provider_mess...
86a54565ab1f23b512d74ca0bd2c6c0cc47782c5fa1ee90e8d1873b7124210b8
asr/apia
Environment.hs
-- | Functions for initializing the translation monad environment. {-# LANGUAGE CPP #-} # LANGUAGE UnicodeSyntax # module Apia.Monad.Environment ( env ) where ------------------------------------------------------------------------------ import Apia.Prelude import Apia.Defaults ( defaultOptions, getD...
null
https://raw.githubusercontent.com/asr/apia/a66c5ddca2ab470539fd68c42c4fbd45f720d682/src/Apia/Monad/Environment.hs
haskell
| Functions for initializing the translation monad environment. # LANGUAGE CPP # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | The environment.
# LANGUAGE UnicodeSyntax # module Apia.Monad.Environment ( env ) where import Apia.Prelude import Apia.Defaults ( defaultOptions, getDefaults ) import Apia.Options ( Options, optNoConfigFile, processOptions ) import Apia.Utils.Monad ( die ) import System.Environment ( getArgs ) env ∷ IO Options env = do ...
5d6959740b739938ab07d1274f112289aba5408d239d2556bc2bb5e3f9ad3020
Frechmatz/cl-threadpool
logger.lisp
(in-package :cl-threadpool-test) (defparameter *initialized-logger* nil) (defun init-logger () (if (not *initialized-logger*) (progn (setf *initialized-logger* t) (setf cl-threadpool:*logger* (lambda(level who format-control format-arguments) (let ((msg (apply #'format nil format-control format-arg...
null
https://raw.githubusercontent.com/Frechmatz/cl-threadpool/86ef8a6b3d6a28ce41f25362c1c2db804d3ca605/test/util/logger.lisp
lisp
(in-package :cl-threadpool-test) (defparameter *initialized-logger* nil) (defun init-logger () (if (not *initialized-logger*) (progn (setf *initialized-logger* t) (setf cl-threadpool:*logger* (lambda(level who format-control format-arguments) (let ((msg (apply #'format nil format-control format-arg...
f1564bc57473ab567802f88e8b08c683f4a6b67a4ec506639d203477fc728658
athos/Bigmouth
atom.clj
(ns bigmouth.atom (:require [bigmouth.models.account :as account] [bigmouth.utils :as utils] [selmer.parser :as parser]) (:import [java.util Date])) (defn- normalize-entry [entry] (let [now (Date.)] (cond-> entry (nil? (:created_at entry)) (assoc :created_at now) (nil? (:u...
null
https://raw.githubusercontent.com/athos/Bigmouth/d7a43cc0317175eabb3be22a1211caf34011eb2e/src/bigmouth/atom.clj
clojure
(ns bigmouth.atom (:require [bigmouth.models.account :as account] [bigmouth.utils :as utils] [selmer.parser :as parser]) (:import [java.util Date])) (defn- normalize-entry [entry] (let [now (Date.)] (cond-> entry (nil? (:created_at entry)) (assoc :created_at now) (nil? (:u...
34ba6c73e346f6aa36ee807d48b4fa7cc0e3a0e3d3b986a08cb49ee53d7406a3
prl-julia/juliette-wa
redex.rkt
#lang racket (require redex) ; import surface language (require "../../../src/redex/core/wa-surface.rkt") ; import full language (require "../../../src/redex/core/wa-full.rkt") ; import optimizations (require "../../../src/redex/optimizations/wa-optimized.rkt") (displayln "Test for litmus-wa/test11:") (define p ...
null
https://raw.githubusercontent.com/prl-julia/juliette-wa/1d1a2154e7b4e232ea2166fba485a3bf574ebd88/tests/litmus-wa/test11/redex.rkt
racket
import surface language import full language import optimizations
#lang racket (require redex) (require "../../../src/redex/core/wa-surface.rkt") (require "../../../src/redex/core/wa-full.rkt") (require "../../../src/redex/optimizations/wa-optimized.rkt") (displayln "Test for litmus-wa/test11:") (define p (term (evalg (seq (mdef "h" ((:: 1_bool Bool)) (...
e17834e4bc2ff9c156b844c326c4c220a8738817581e434c828585d029f747f1
ghcjs/ghcjs-boot
Signal.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # module GHC.Conc.Signal ( Signal , HandlerFun , setHandler , runHandlers , runHandlersPtr ) where import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Data.Dynamic (Dynamic) import Foreign.C.Types (CInt) ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/Conc/Signal.hs
haskell
---------------------------------------------------------------------- Lock used to protect concurrent access to signal_handlers. Symptom It is our responsibility to free the memory buffer, so we create a foreignPtr. it is when base is dynamically loaded into GHCi. The RTS keeps the dynamically-loaded base packa...
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # module GHC.Conc.Signal ( Signal , HandlerFun , setHandler , runHandlers , runHandlersPtr ) where import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Data.Dynamic (Dynamic) import Foreign.C.Types (CInt) ...
6bca7c1d9d05432958b4c5855d573503fdda0afdcd9c606517a6277a524ee134
dbmcclain/LispPlotter
plotter-classes.lisp
(in-package :plotter) (defvar *cross-cursor* (ignore-errors (capi:load-cursor '((:win32 (translate-logical-pathname "PROJECTS:LIB;crosshair.cur")) (:cocoa (translate-logical-pathname "PROJECTS:LIB;crosshair.gif")) :x-hot 7 :y-hot 7)) )) (defclass <line-style> () ((line-thick ...
null
https://raw.githubusercontent.com/dbmcclain/LispPlotter/c019c7062711f454308a69aa9bed26584c0708fd/plotter-classes.lisp
lisp
The mixin has all the information needed to produce plots but has nothing to draw on... info for nice looking zooming The pane adds something to draw on... And it also adds some user gestures and any display related items like cross hairs, cursors, backing images, etc. -------------------------------------------...
(in-package :plotter) (defvar *cross-cursor* (ignore-errors (capi:load-cursor '((:win32 (translate-logical-pathname "PROJECTS:LIB;crosshair.cur")) (:cocoa (translate-logical-pathname "PROJECTS:LIB;crosshair.gif")) :x-hot 7 :y-hot 7)) )) (defclass <line-style> () ((line-thick ...
1342d9e377200ecdccc3c6421343d754e727400c83398928361f15e1c230ea77
elaforge/karya
Mridangam_test.hs
Copyright 2018 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Synth.Sampler.Patch.Mridangam_test where import qualified Data.Maybe as Maybe import qualified Util.Log as Log import qualified Util.Seq as Seq import qualified Derive.Derive as D...
null
https://raw.githubusercontent.com/elaforge/karya/89d1651424c35e564138d93424a157ff87457245/Synth/Sampler/Patch/Mridangam_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2018 module Synth.Sampler.Patch.Mridangam_test where import qualified Data.Maybe as Maybe import qualified Util.Log as Log import qualified Util.Seq as Seq import qualified Derive.Derive as Derive import qualified Derive.DeriveTest as DeriveTest import qualified Derive.Score as Score import qualified De...
fa66979dcd50c736560a341e29c74238481acaedf71dab2f3b4aaeaa2fb5bcd7
janegca/htdp2e
0502-SP-Updater.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname 0502-SP-Updater) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "un...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/0502-SP-Updater.rkt
racket
about the language level of this file in a form that our tools can easily process. 05.02 - Sample Problem - Updater It produces a Posn like p with n in the x field. Posn Number -> Posn we can define x+ using posn-up-x Posn -> Posn we can something similar for y Posn Number -> Posn updates y-coordinate with n...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname 0502-SP-Updater) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #...
5a1ed316236adaa42620a3d74ebe300515db4af7c7f5975a43daccafdafa4e38
tip-org/tools
Eval.hs
-- | Evaluation of tip terms. # LANGUAGE RecordWildCards # module Tip.Eval where import Tip.Core import Tip.Scope import Tip.Pretty import Data.Map(Map) import qualified Data.Map.Strict as Map import Data.List import Data.Maybe -- | A value. data Value a = IntVal Integer | RatVal Rational | BoolVal Bool | ...
null
https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-lib/src/Tip/Eval.hs
haskell
| Evaluation of tip terms. | A value. | Evaluate an uninterpreted function symbol. | Evaluate an expression in an environment.
# LANGUAGE RecordWildCards # module Tip.Eval where import Tip.Core import Tip.Scope import Tip.Pretty import Data.Map(Map) import qualified Data.Map.Strict as Map import Data.List import Data.Maybe data Value a = IntVal Integer | RatVal Rational | BoolVal Bool | FuncVal (Type a) ([Value a] -> Value a) | ...
5176f3f7144d789d80e02cffcc059e419bb893759442c3eef4147fd40a2e7c93
ghc/ghc
C.hs
# OPTIONS_GHC -Wno - incomplete - uni - patterns # -- | Handling of C foreign imports/exports module GHC.HsToCore.Foreign.C ( dsCImport , dsCFExport , dsCFExportDynamic ) where import GHC.Prelude import GHC.Platform import GHC.Tc.Utils.Monad -- temp import GHC.Tc.Utils.Env import GHC.Tc.Utils.TcType ...
null
https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/HsToCore/Foreign/C.hs
haskell
| Handling of C foreign imports/exports temp Either the exported Id, or the foreign-export-dynamic constructor from C, and its representation type The name to export to C land True => foreign export dynamic so invoke IO action that's hanging off contents of Module_stub.h contents of Module_stub.c str...
# OPTIONS_GHC -Wno - incomplete - uni - patterns # module GHC.HsToCore.Foreign.C ( dsCImport , dsCFExport , dsCFExportDynamic ) where import GHC.Prelude import GHC.Platform import GHC.Tc.Utils.Env import GHC.Tc.Utils.TcType import GHC.Core import GHC.Core.Unfold.Make import GHC.Core.Type import GHC.Core.Ty...
29618a5b27db2106d008be71fb830601785693bca4b016a3365dfd7b6e36d1b1
awakesecurity/proto3-suite
Class.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleInstances # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVaria...
null
https://raw.githubusercontent.com/awakesecurity/proto3-suite/f54801824bbfc752477338c37a93eba9e2983a37/src/Proto3/Suite/JSONPB/Class.hs
haskell
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE DerivingVia # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # <-buffers/docs/proto3#json>. representation and equivalent underlying 'Data.Aeson' representations. operations;...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # | Support for the " JSONPB " canonical JSON encoding described at T...
769c817a8ab4f38ab73b17fa058e04b5ffc596db4ca871606e91e823dccd4932
mfikes/fifth-postulate
ns353.cljs
(ns fifth-postulate.ns353) (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/ns353.cljs
clojure
(ns fifth-postulate.ns353) (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...
74697f51935a0bbf07c553bbc5f0758de18ea1cf10f2a8d32494cfc991a9db2d
k0001/tisch
Tutorial.hs
-- This module is kept here so that it can be typechecked when -- running the test suite. {-# LANGUAGE Arrows #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE OverloadedLabels # # LANG...
null
https://raw.githubusercontent.com/k0001/tisch/4d3fc55f0b64f50dc8a59b371e855a22d22f0a79/tests/Tutorial.hs
haskell
This module is kept here so that it can be typechecked when running the test suite. # LANGUAGE Arrows # ------------------------------------------------------------------------------ Defining tables, types, etc. ------------------------------------------------------------------------------ Let's explore how to teac...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # | @tisch@ is a different API for the core @opaleye@ infrastructure with the follow...
4ea8ea07d7073e58334989f4d237105da726a8f700f3006f304dca6766184d99
macchiato-framework/examples
project.clj
(defproject auth-example "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :dependencies [[darkleaf/router "0.3.1"] [com.taoensso/timbre "4.8.0"] [hiccups "0.3.0"] [macchiato/auth "0.0.1"] [macchiato/core "0.1.2"] [macch...
null
https://raw.githubusercontent.com/macchiato-framework/examples/946bdf1a04f5ef787fc83affdcbf6603bbf29b5c/auth-example-router/project.clj
clojure
(defproject auth-example "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :dependencies [[darkleaf/router "0.3.1"] [com.taoensso/timbre "4.8.0"] [hiccups "0.3.0"] [macchiato/auth "0.0.1"] [macchiato/core "0.1.2"] [macch...
f08fc08645a7f64eb0c5f255f69f7da4272682fefac884661a0492a0ac42b446
obsidiansystems/beam-automigrate
Main.hs
module Main where import qualified Data.List as L import qualified Data.Text.Lazy as TL import Database.Beam.AutoMigrate import Database.Beam.AutoMigrate.Schema.Gen import Database.Beam.AutoMigrate.Validity import Test.Database.Beam.AutoMigrate.Arbitrary hiding ((===)) import Test.QuickCheck import Test.Tasty import T...
null
https://raw.githubusercontent.com/obsidiansystems/beam-automigrate/93f86a29b81150ac356107b82225ac7f151d6e51/tests/Main.hs
haskell
module Main where import qualified Data.List as L import qualified Data.Text.Lazy as TL import Database.Beam.AutoMigrate import Database.Beam.AutoMigrate.Schema.Gen import Database.Beam.AutoMigrate.Validity import Test.Database.Beam.AutoMigrate.Arbitrary hiding ((===)) import Test.QuickCheck import Test.Tasty import T...
c86b6ca5fbcd89e74bb82cfe309b53a5cfb424ff822d81c02a7d2198ad093645
eckyputrady/haskell-scotty-realworld-example-app
HTTP.hs
module Platform.HTTP ( main ) where import ClassyPrelude import Web.Scotty.Trans import Network.HTTP.Types.Status import Network.Wai (Response) import Network.Wai.Handler.WarpTLS (runTLS, tlsSettings) import Network.Wai.Handler.Warp (defaultSettings, setPort) import Network.Wai.Middleware.Cors import qua...
null
https://raw.githubusercontent.com/eckyputrady/haskell-scotty-realworld-example-app/366a1eec021fb1bfcbc2d8e0485b59cbedba10e5/src/Platform/HTTP.hs
haskell
* Routing middlewares err feature routes health
module Platform.HTTP ( main ) where import ClassyPrelude import Web.Scotty.Trans import Network.HTTP.Types.Status import Network.Wai (Response) import Network.Wai.Handler.WarpTLS (runTLS, tlsSettings) import Network.Wai.Handler.Warp (defaultSettings, setPort) import Network.Wai.Middleware.Cors import qua...
a6c604ee95f51c502beb1b9abbb7aa6ee46ff9f0f0748c7cbbee275e8a10a57e
Feuerlabs/kvdb
kvdb_lib.erl
%%%---- BEGIN COPYRIGHT ------------------------------------------------------- %%% Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one ...
null
https://raw.githubusercontent.com/Feuerlabs/kvdb/c8c71bf5422a8fa2e58c608c65629be7a58e27f3/src/kvdb_lib.erl
erlang
---- BEGIN COPYRIGHT ------------------------------------------------------- ---- END COPYRIGHT --------------------------------------------------------- @hidden Intended for replication Pre-fetch value, if needed, so we only fetch it once. If value doesn't exist, we must re-throw when asked for. We could chec...
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @author -module(kvdb_lib). -export([table_name/1, db_file/1, valid_tabl...
e0cb58e1ade082ba549b69b5df864af7a2d88a077c4eaa74a6a0eba185b37512
icicle-lang/icicle-ambiata
Position.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # module Icicle.Sorbet.Position ( Positioned(..) , Position(..) ) where impo...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-source/src/Icicle/Sorbet/Position.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # module Icicle.Sorbet.Position ( Positioned(..) , Position(..) ) where import Data.Data (Data) import Data.Typeable (Typeable)...
a3d28bc15a85657e51a3b1bb44351c3cc385f3e5e786d60b618f014bd3fb2a16
arttuka/reagent-material-ui
table_container.cljs
(ns reagent-mui.material.table-container "Imports @mui/material/TableContainer as a Reagent component. Original documentation is at -ui/api/table-container/ ." (:require [reagent.core :as r] ["@mui/material/TableContainer" :as MuiTableContainer])) (def table-container (r/adapt-react-class (.-default...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/table_container.cljs
clojure
(ns reagent-mui.material.table-container "Imports @mui/material/TableContainer as a Reagent component. Original documentation is at -ui/api/table-container/ ." (:require [reagent.core :as r] ["@mui/material/TableContainer" :as MuiTableContainer])) (def table-container (r/adapt-react-class (.-default...
d20ebc225c8370708f4ab047b886e3d5980d0d0623f44af70854a580b66152a5
racket/racket7
debug.rkt
#lang racket/base ;; Change `debug-select` to enable or disable debugging mode, ;; such as assertions about the current atomicity mode. (provide debug-select) (define-syntax-rule (debug-select #:on [on ...] #:off [off ...]) ;; Sele...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/thread/debug.rkt
racket
Change `debug-select` to enable or disable debugging mode, such as assertions about the current atomicity mode. Select `on` or `off` here:
#lang racket/base (provide debug-select) (define-syntax-rule (debug-select #:on [on ...] #:off [off ...]) (begin off ...))
446880cc7fc6b26ef31df80c7dac09c58cdeb8a1217ffb4f06d28aa9109550e6
rumuki/rumuki-server
PerpetualGrants.hs
module Handler.PerpetualGrants where import Data.Aeson import Data.Time.Clock import Import import Model.Device import Model.PerpetualGrant () import Model.PushNotification data POSTRequest = POSTRequest { postRequestKeyCipher :: ByteString ...
null
https://raw.githubusercontent.com/rumuki/rumuki-server/59798656e9eb440a2344223850dbd1f9f77060ca/src/Handler/PerpetualGrants.hs
haskell
Insert, or just update the expiry
module Handler.PerpetualGrants where import Data.Aeson import Data.Time.Clock import Import import Model.Device import Model.PerpetualGrant () import Model.PushNotification data POSTRequest = POSTRequest { postRequestKeyCipher :: ByteString ...
16af39039bd20544b6c04f618c7dd117805eb87596533f20ce04a67dac31d1a1
merijn/Belewitte
Debug.hs
# OPTIONS_GHC -Wno - deprecations # # LANGUAGE ApplicativeDo # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Commands.Debug (DebugQuery(..), commands) where import Data.ByteString.Base64 (encodeBase64) import Data.Char (isSpace) import Data.Conduit as C import qualified Data.Conduit.Combinators as C...
null
https://raw.githubusercontent.com/merijn/Belewitte/cab6010a2bc54acfc4f4b169c95799fe455799ef/benchmark-analysis/src/Commands/Debug.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wno - deprecations # # LANGUAGE ApplicativeDo # module Commands.Debug (DebugQuery(..), commands) where import Data.ByteString.Base64 (encodeBase64) import Data.Char (isSpace) import Data.Conduit as C import qualified Data.Conduit.Combinators as C import Data.Map (Map) import qualified Data.Map as M impo...
482777e987d42b0cceafa3641bfa4cee7f8abdcd0c0757c9c1f02c22120a07be
ostinelli/misultin
misultin_websocket_sessions_example.erl
% ========================================================================================================== MISULTIN - Websocket Sessions Example . % % >-|-|-(°> % Copyright ( C ) 2011 , < > % All rights reserved. % % BSD License % % Redistribution and use in source and binary forms, with or without modificat...
null
https://raw.githubusercontent.com/ostinelli/misultin/b9fe3125cf17f4415a6d7fc60642b670f5e18eb8/examples/misultin_websocket_sessions_example.erl
erlang
========================================================================================================== >-|-|-(°> All rights reserved. BSD License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribu...
MISULTIN - Websocket Sessions Example . Copyright ( C ) 2011 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ...
1064f4e1b416633148969d7bbc39ddb258ba8ce4d87faae489907d3861cb37df
Clojure2D/clojure2d-examples
texture.clj
(ns rt4.the-rest-of-your-life.ch06b.texture (:require [fastmath.core :as m] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.core :as c2d] [rt4.color :as color] [rt4.the-rest-of-your-life.ch06b.perlin :as perlin] [fastmath.random :as r...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06b/texture.clj
clojure
a color is also a texture (same as SolidTexture) using fastmath fbm-noise, which is much much faster also using code from version 3.x
(ns rt4.the-rest-of-your-life.ch06b.texture (:require [fastmath.core :as m] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.core :as c2d] [rt4.color :as color] [rt4.the-rest-of-your-life.ch06b.perlin :as perlin] [fastmath.random :as r...
72cf821d1b29f3842a69caac5caa960654731649f4786d435170bc496451ebc1
grin-compiler/ghc-wpc-sample-programs
Unidirectional.hs
# LANGUAGE BangPatterns # -- | Directed graphs (can of course simulate undirected graphs). -- -- Represented as adjacency maps in direction from source to target. -- -- Each source node maps to an adjacency map of outgoing edges, -- which is a map from target nodes to edges. -- -- Listed time co...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Graph/AdjacencyMap/Unidirectional.hs
haskell
| Directed graphs (can of course simulate undirected graphs). Represented as adjacency maps in direction from source to target. Each source node maps to an adjacency map of outgoing edges, which is a map from target nodes to edges. Listed time complexities are for the worst case (and possibly amortis...
# LANGUAGE BangPatterns # module Agda.Utils.Graph.AdjacencyMap.Unidirectional Graph(..) , invariant , Edge(..) , lookup , edges , neighbours, neighboursMap , edgesFrom , edgesTo , diagonal , nodes, sourceNodes, targetNodes, isolatedNodes , Nodes(..), computeNodes , discrete ...
570b9a76cd1e6a03d07a71f53c9d7043b40b1831c5fbf99079fc1e762256b949
graninas/GraphServer
TGA.hs
-- Working with textures will require loading images from disk. We will use the TGA format since it is quite simple to work with . module ThirdParty.ImageFormats.TGA (readTGA) where import Control.Applicative ((<$>)) import Control.Monad ((<=<)) import qualified Data.ByteString as BS import qualified Data.ByteString....
null
https://raw.githubusercontent.com/graninas/GraphServer/088c234ae840162002f707559cfefc96bcc02bda/src/ThirdParty/ImageFormats/TGA.hs
haskell
Working with textures will require loading images from disk. We will |The header structure contains quite a bit of information, but we are only concerned with whether the image is RGB color or grayscale, and what its dimensions are.
use the TGA format since it is quite simple to work with . module ThirdParty.ImageFormats.TGA (readTGA) where import Control.Applicative ((<$>)) import Control.Monad ((<=<)) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import Data.Binary.Get readImage :: Get (Int, Int, BS.ByteSt...
ac58b4645e9dc302e40ab28adb23d895f9f1e94aca6e58605722c90d85f646f5
agda/agda
Base.hs
# LANGUAGE CPP # # LANGUAGE ViewPatterns # | Function for generating highlighted and aligned LaTeX from literate -- Agda source. module Agda.Interaction.Highlighting.LaTeX.Base ( generateLaTeXIO , prepareCommonAssets , runLogLaTeXTWith , logMsgToText , LogMessage(..) , MonadLogLaTeX , LogLaTeXT , La...
null
https://raw.githubusercontent.com/agda/agda/4f3899c597792fa4455e0f8134dfd63bc89b1c07/src/full/Agda/Interaction/Highlighting/LaTeX/Base.hs
haskell
Agda source. , reportSLn) ---------------------------------------------------------------------- * Logging | Log LaTeX messages using a provided action. into a WriterT, but that becomes slightly more complicated to reason about in We want the logging to be reasonably polymorphic, avoid space leaks that can occur...
# LANGUAGE CPP # # LANGUAGE ViewPatterns # | Function for generating highlighted and aligned LaTeX from literate module Agda.Interaction.Highlighting.LaTeX.Base ( generateLaTeXIO , prepareCommonAssets , runLogLaTeXTWith , logMsgToText , LogMessage(..) , MonadLogLaTeX , LogLaTeXT , LaTeXOptions(..) ...
35bde8eaf7a0743948eb3cdfc6eed01c289dc75714aec4d0f9ccc88122c73528
johnmn3/tau.alpha
io.cljs
(ns tau.alpha.io (:require-macros [tau.alpha.macros :refer [log on]]) (:require [cljs.reader :refer [read-string]] [tau.alpha.state :refer [serve-handlers get-id ports conf start-time screen on-screen? off-screen? id loaded? add-h...
null
https://raw.githubusercontent.com/johnmn3/tau.alpha/b1b7e89e95b9b1eb0c7a7ca8c4b8c9a793d2d710/src/tau/alpha/io.cljs
clojure
(println "receive-dist-port:" m)
(ns tau.alpha.io (:require-macros [tau.alpha.macros :refer [log on]]) (:require [cljs.reader :refer [read-string]] [tau.alpha.state :refer [serve-handlers get-id ports conf start-time screen on-screen? off-screen? id loaded? add-h...
99b0e9e0e36ef1d10a9611333fbf08d9d8f97ce7f97d32c1f93615433f363242
OlivierSohn/hamazed
Results.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveGeneric # module Imj.Profile.Results ( toOptimalStrategies , addRefin...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-profile/src/Imj/Profile/Results.hs
haskell
# LANGUAGE OverloadedStrings # for white box tests Same has 'Results', except we have a single variant and we tag the results. This is close to 'OptimalStrategy', but more detailed There is no smaller size. | Returns true if either * there is no smaller size * a valid result exists for the closest smaller size ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # LANGUAGE LambdaCase # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE DeriveGeneric # module Imj.Profile.Results ( toOptimalStrategies , addRefinedResult , addUnrefinedResult ...
ff10e1de7112ef139a8981d7b58fe94d61816854aec7a09fcf0d928c67407254
uwplse/rake
types.rkt
#lang rosette/safe (require (only-in racket/base error) (only-in racket/struct make-constructor-style-printer) rosette/lib/destruct rake/cpp/types) (provide (except-out (all-defined-out) instr-forms v0 v1 elem v0-elem v1-elem elem-type num-elems vec-pair? type) (prefix-out hvx: instr-forms) (prefix-out hvx...
null
https://raw.githubusercontent.com/uwplse/rake/0fb9b46ae8ac64f95a4c0e89060ffdb043229a5b/rake/hvx/ast/types.rkt
racket
Let exprs Predicate register types Boolean Ops Halide HVX abstractions New types to represent abstract computation (these types should never appear in output code) New types to represent abstract data movement (these types should never appear in output code) (filter concrete? (??load-gather-tbl obj)) Type signa...
#lang rosette/safe (require (only-in racket/base error) (only-in racket/struct make-constructor-style-printer) rosette/lib/destruct rake/cpp/types) (provide (except-out (all-defined-out) instr-forms v0 v1 elem v0-elem v1-elem elem-type num-elems vec-pair? type) (prefix-out hvx: instr-forms) (prefix-out hvx...
3bc5733c255e671163db12cf224689e0b06efc61c0cedc434ab9523a47277f9c
Deducteam/Dedukti
dtree.mli
open Term open Basic open Rule open Ac * { 2 Error } type dtree_error = | HeadSymbolMismatch of loc * name * name | ArityInnerMismatch of loc * ident * ident | ACSymbolRewritten of loc * name * int exception Dtree_error of dtree_error * This represent a meta variables applied to distinct locally bounded...
null
https://raw.githubusercontent.com/Deducteam/Dedukti/af7dfba10b4858354524ed798b8b58dd2cf2b923/kernel/dtree.mli
ocaml
* Arity of the meta variable * Depth under which this occurence of the meta variable is considered * The list of local DB indices of argument variables * The mapping from all local DB indices for either -1 or position in the list of argument variables (starting from the end) * Abstract matching problems....
open Term open Basic open Rule open Ac * { 2 Error } type dtree_error = | HeadSymbolMismatch of loc * name * name | ArityInnerMismatch of loc * ident * ident | ACSymbolRewritten of loc * name * int exception Dtree_error of dtree_error * This represent a meta variables applied to distinct locally bounded...
661e81ceb53a596e3e251404bffb339bea4c034777130689e7ce3ec5a10165a9
Knewton/rifactor
Types.hs
# LANGUAGE NoImplicitPrelude # -- Module : Rifactor.Types Copyright : ( c ) 2015 Knewton , Inc < > ( c ) 2015 < > ( contributor ) License : Apache 2.0 -2.0 Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) module Rifactor.Types...
null
https://raw.githubusercontent.com/Knewton/rifactor/58a50e74bd5ed82e6cb3a7fdacd39696f50e0916/src/Rifactor/Types.hs
haskell
Module : Rifactor.Types Stability : experimental
# LANGUAGE NoImplicitPrelude # Copyright : ( c ) 2015 Knewton , Inc < > ( c ) 2015 < > ( contributor ) License : Apache 2.0 -2.0 Maintainer : < > Portability : non - portable ( GHC extensions ) module Rifactor.Types (module Rifactor.Types.AWS, module Rifactor.Types.Conf...
ee67259c6e90b66fef1b08775132f9812fe940083db5c44e62c24bb02b8a6836
datodev/datodomvc
init.clj
(ns datodomvc.init (:require [datodomvc.datomic.core] [datodomvc.datomic.migrations] [datodomvc.datomic.schema] [datodomvc.nrepl] [datodomvc.server]) (:import [java.util Date])) (defn init [] (datodomvc.nrepl/init) (datodomvc.datomic.core/init) (datodomvc.datom...
null
https://raw.githubusercontent.com/datodev/datodomvc/f6d65b61e2fe135a27e870f9a9613f204ded09a9/src/datodomvc/init.clj
clojure
(ns datodomvc.init (:require [datodomvc.datomic.core] [datodomvc.datomic.migrations] [datodomvc.datomic.schema] [datodomvc.nrepl] [datodomvc.server]) (:import [java.util Date])) (defn init [] (datodomvc.nrepl/init) (datodomvc.datomic.core/init) (datodomvc.datom...
68b6b3737c1f3656f863b7ba6dab1f20479eb2410fdcc990c358e83cc914c3c2
caribou/caribou-core
migration.clj
(ns caribou.migration (:require [clojure.set :as set] [clojure.java.jdbc :as sql] [clojure.pprint :as pprint] [leiningen.core.main :as lein] [caribou.util :as util] [caribou.config :as config] [caribou.logger :as log] [caribou.db :as ...
null
https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/migration.clj
clojure
This is because the presence of an active h2 thread prevents it using 'eval-in-project' see comment in run-migrations, above
(ns caribou.migration (:require [clojure.set :as set] [clojure.java.jdbc :as sql] [clojure.pprint :as pprint] [leiningen.core.main :as lein] [caribou.util :as util] [caribou.config :as config] [caribou.logger :as log] [caribou.db :as ...
94efa68852668520ba01b018abebafe26a60dcd3a2426f007e1ad063e4a8d6e5
kaizhang/Taiji
Rank.hs
-------------------------------------------------------------------------------- -- PageRank analysis -------------------------------------------------------------------------------- # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # LANG...
null
https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/Taiji/src/Taiji/Component/Rank.hs
haskell
------------------------------------------------------------------------------ PageRank analysis ------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # | Read RNA expression data ^ Threshold to call a gene as non-expressed ^ cell type ^ absolute value and z-sc...
# LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # # LANGUAGE DataKinds # module Taiji.Component.Rank where import Bio.Data.Experiment.Types import Bio.Pipeline.Instances () import Bio.Utils.Functions (scale) import ...
a6a0c67275fc0a4153ed294fb44b68468d696a9b6b0bba70f83aa5b76a7c8e3f
skanev/playground
05.scm
SICP exercise 5.05 ; ; Hand-simulate the factorial and Fibonacci machines, using some nontrivial input ( requiring execution of at least one recursive call ) . Show the ; contents of the stack at each significant point in the execution. ; I did that on a piece of paper. It's fairly tricky to find a way to write it...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/05.scm
scheme
Hand-simulate the factorial and Fibonacci machines, using some nontrivial contents of the stack at each significant point in the execution. I did that on a piece of paper. It's fairly tricky to find a way to write it down in this file, so I will just show the state of the stacks after various saves and restores. ...
SICP exercise 5.05 input ( requiring execution of at least one recursive call ) . Show the First , the factorial machine . Let 's say we 're calculating it for 3 . Initially n is 3 and the stack is empty . 1 . + -------------+ n : 3 2 . + -------------+ n : 2 3 . + -------------+ n : 1 4 . + ----...
6b43987013df8192f52f817d98ffb2dcd2f16c0978cdfe22d9c5dc9ecce14493
kmi/irs
medical-ontology.lisp
Mode : Lisp ; Package : (in-package "OCML") File : medical-ontology.ol Author : ( debugged and translated to ocmnl by ) ;; Works With: Ontolingua V4.0 ;; History: 11/11/1996 (Created) (in-ontology medical-ontology) (def-class medical-ontology-object () (?object) "General class of...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/medical-ontology/medical-ontology.lisp
lisp
Package : Works With: Ontolingua V4.0 History: 11/11/1996 (Created) :AXIOM-CONSTRAINTS (and (subclass-of disorder-group medical-ontology-object) (exhaustive-subclass-partition '(observable medical-state)))) :AXIOM-CONSTRAINTS (domain variable.value-type variable))
(in-package "OCML") File : medical-ontology.ol Author : ( debugged and translated to ocmnl by ) (in-ontology medical-ontology) (def-class medical-ontology-object () (?object) "General class of all objects in the medical ontology") (def-relation disorder-group-member (?group ?disorder)...
50636633d32d35073702f6681da808b447789fba72649870c059f850abb994d5
contentjon/mocha-latte
project.clj
(defproject mocha-latte "0.1.2" :description "A ClojureScript port of the Mocha test frame work" :url "-latte" :license {:name "MIT" :url "" :distribution :repo :comments "Same license as Mocha"} :min-...
null
https://raw.githubusercontent.com/contentjon/mocha-latte/27251ca349086e17e82906f48014b945c848c04d/project.clj
clojure
(defproject mocha-latte "0.1.2" :description "A ClojureScript port of the Mocha test frame work" :url "-latte" :license {:name "MIT" :url "" :distribution :repo :comments "Same license as Mocha"} :min-...
b68f442032f010221f342bfd433ab505c3531c2486521f9adc4aad03981b3405
Yuras/pdf-toolbox
UnicodeCMap.hs
{-# LANGUAGE OverloadedStrings #-} | Unicode CMap defines mapping from glyphs to text module Pdf.Content.UnicodeCMap ( UnicodeCMap(..), parseUnicodeCMap, unicodeCMapNextGlyph, unicodeCMapDecodeGlyph ) where import Data.Char import qualified Data.List as List import Data.Map (Map) import qualified Data.Map ...
null
https://raw.githubusercontent.com/Yuras/pdf-toolbox/bc42219d714c1d740224ee16dedd43fe26ce45b2/content/lib/Pdf/Content/UnicodeCMap.hs
haskell
# LANGUAGE OverloadedStrings # | Unicode character map Font dictionary can contain \"ToUnicode\" key -- reference | Take the next glyph code from string, also returns the rest of the string | Convert glyph to text | It returns regular ranges and char map Array ranges are converted to char map hex can contain ...
| Unicode CMap defines mapping from glyphs to text module Pdf.Content.UnicodeCMap ( UnicodeCMap(..), parseUnicodeCMap, unicodeCMapNextGlyph, unicodeCMapDecodeGlyph ) where import Data.Char import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import Data.ByteString (Byte...
c8a199d09432b500f88d195a640587306c92b75366c6e36d869988e467c4e648
atlas-engineer/nyxt
documentation-coverage.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause Dependencies : Nsymbols , , Swank - MOP --- all to list slots . (defun documentation-coverage (package) "Documentation coverage data on PACKAGE. Returns four values: - The percentage of documented external symbols. -...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/81a3348ee9413f5d61435c851aba69f7aaa738f5/build-scripts/documentation-coverage.lisp
lisp
sort undocumented symbols sort by percentage
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause Dependencies : Nsymbols , , Swank - MOP --- all to list slots . (defun documentation-coverage (package) "Documentation coverage data on PACKAGE. Returns four values: - The percentage of documented external symbols. -...
100091fd0be823576f6ae8eec1c7f824b2b19b7daebaa759416eb532c9956f73
qkrgud55/ocamlmulti
t301-object.ml
* * * file testinterp / t301 - object.ml suggested by to compilable with ocamlc -nostdlib -I .. / .. /stdlib \ .. / .. /stdlib / pervasives.cmo .. / .. /stdlib / camlinternalOO.cmo \ t301-object.ml -o t301-object.byte * * suggested by Jacques Garrigue to Basile Starynkevitch compilab...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/testsuite/tests/tool-ocaml/t301-object.ml
ocaml
* * * file testinterp / t301 - object.ml suggested by to compilable with ocamlc -nostdlib -I .. / .. /stdlib \ .. / .. /stdlib / pervasives.cmo .. / .. /stdlib / camlinternalOO.cmo \ t301-object.ml -o t301-object.byte * * suggested by Jacques Garrigue to Basile Starynkevitch compilab...
bc328c21ba6ecb30553046d81513612779d2c3f59e4c49f30c57fb5deae7f828
nomasystems/nmaglev
nmaglev_SUITE.erl
Copyright 2022 Nomasystems , S.L. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distri...
null
https://raw.githubusercontent.com/nomasystems/nmaglev/01191a26ddcd39a8dec6441ada69933e3919aed1/test/nmaglev_SUITE.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2022 Nomasystems , S.L. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(nmaglev_SUITE). -include_lib("stdlib/include/assert.hrl"). -compile([nowarn_export_all, export_all]). all() -> [usage, consis...
fbaaa8d5392ffaba8750dd67eba090ce1c47967037f83fbf06b483e7eb3258dc
qiao/sicp-solutions
2.18.scm
nil is not defined in MIT / GNU Scheme (define (reverse items) (define (reverse-iter items acc) (if (null? items) acc (reverse-iter (cdr items) (cons (car items) acc)))) (reverse-iter items nil))
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.18.scm
scheme
nil is not defined in MIT / GNU Scheme (define (reverse items) (define (reverse-iter items acc) (if (null? items) acc (reverse-iter (cdr items) (cons (car items) acc)))) (reverse-iter items nil))
57525332c9795feccc7b72249c60ce80977d52fc9d405050bcf52a8663d7154c
jrh13/hol-light
schnirelmann.ml
(* ========================================================================= *) density and its basic properties ( not 's theorem yet ) . (* ========================================================================= *) needs "Multivariate/misc.ml";; needs "Library/products.ml";; prioritize_real();; (* ---------...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Examples/schnirelmann.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- The basic definition. ---------------...
density and its basic properties ( not 's theorem yet ) . needs "Multivariate/misc.ml";; needs "Library/products.ml";; prioritize_real();; let count = new_definition `count s n = CARD (s INTER (1..n))`;; let schnirelmann = new_definition `schnirelmann s = inf { &(count s n) / &n | 1 <= n}`;; let COUNT_BO...
54c9822c0fd356c6b6a5c023948437eba746a9abd4b1373d5c3c551c0ff135bf
bldl/magnolisp
test-build-2.rkt
#lang magnolisp (require (only-in racket/base +)) (typedef int #:: (foreign)) (function (one) #:: (foreign (type (-> int))) 1) (function (add x y) #:: (foreign (type (-> int int int)) (build need-adder)) (+ x y)) (function (f x) #:: (export (type (-> int int))) (define y (let ((x x)) (one))) y) (f 1)...
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-build-2.rkt
racket
#lang magnolisp (require (only-in racket/base +)) (typedef int #:: (foreign)) (function (one) #:: (foreign (type (-> int))) 1) (function (add x y) #:: (foreign (type (-> int int int)) (build need-adder)) (+ x y)) (function (f x) #:: (export (type (-> int int))) (define y (let ((x x)) (one))) y) (f 1)...
813881d149f0bdf3b3f5521c0acb2900d01d02c61df73b34ad4776b92903cb00
Beluga-lang/Beluga
optName.mli
(** The type of validated option names. *) type t = { canonical : string ; aliases : string list } val to_list : t -> string list val to_string : t -> string
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/e51fc3026b0250fed3d0d95196512f65484ccf22/src/optparser/optName.mli
ocaml
* The type of validated option names.
type t = { canonical : string ; aliases : string list } val to_list : t -> string list val to_string : t -> string
d8e0d2cce50da8b76df3285ce3c1e533949d225a95de73e5498ec971dff66c8d
ekataglobal/github-changelog
core.clj
(ns github-changelog.core (:require [clojure.spec.alpha :as s] [github-changelog.config :as config] [github-changelog.conventional :as conventional] [github-changelog.core-spec :as core-spec] [github-changelog.git :as git] [github-changelog.github :as github...
null
https://raw.githubusercontent.com/ekataglobal/github-changelog/29dcaab03407c69584549a79ed449bdddebc1e16/src/github_changelog/core.clj
clojure
(ns github-changelog.core (:require [clojure.spec.alpha :as s] [github-changelog.config :as config] [github-changelog.conventional :as conventional] [github-changelog.core-spec :as core-spec] [github-changelog.git :as git] [github-changelog.github :as github...
397803b24bad20d535a476d2cc34a0d436cd7573de00bfc9fe5a8acb6c281ebe
xoken/xoken-node
Handler.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # {-# LANGUAGE Rank2Types #-} # LANGUAGE TupleSections # module Network.Xoken.Node.HTTP.Handler where import Arivi.P2P.Config (decodeHex, encodeHex) import Control.Applicative ((<|>)) import qualified Control.Error.Util as ...
null
https://raw.githubusercontent.com/xoken/xoken-node/ed01b1c1acc1e1036084ee03013d345aa78e7765/node/src/Network/Xoken/Node/HTTP/Handler.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # - | Helper functions
# LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Network.Xoken.Node.HTTP.Handler where import Arivi.P2P.Config (decodeHex, encodeHex) import Control.Applicative ((<|>)) import qualified Control.Error.Util as Extra import Control.Exception (SomeException(..), throw, try) ...
0d6994c8687762f4e04e961b0b941095d6fdb1ebbc2eae28457f0f7932f2770f
tommaisey/aeon
pv-copy-phase.help.scm
;; (pv-copyPhase bufferA bufferB) Combines magnitudes of first input and phases of the second input . (with-sc3 (lambda (fd) (async fd (b-alloc 10 2048 1)) (async fd (b-alloc 11 2048 1)) (async fd (b-alloc-read 12 "/home/rohan/audio/metal.wav" 0 0)))) (let* ((a (mul (white-noise ar) 0.2)) (b (mul ...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/fft/pv-copy-phase.help.scm
scheme
(pv-copyPhase bufferA bufferB)
Combines magnitudes of first input and phases of the second input . (with-sc3 (lambda (fd) (async fd (b-alloc 10 2048 1)) (async fd (b-alloc 11 2048 1)) (async fd (b-alloc-read 12 "/home/rohan/audio/metal.wav" 0 0)))) (let* ((a (mul (white-noise ar) 0.2)) (b (mul (sin-osc ar 100 0) 0.2)) (f...
76e86ccee0e19d18715e2a5233afca09e52ca1d5e1b6dc79c0b6609fa2a8ea1a
elastic/eui-cljs
icon_beaker.cljs
(ns eui.icon-beaker (:require ["@elastic/eui/lib/components/icon/assets/beaker.js" :as eui])) (def beaker eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_beaker.cljs
clojure
(ns eui.icon-beaker (:require ["@elastic/eui/lib/components/icon/assets/beaker.js" :as eui])) (def beaker eui/icon)
3f375affc3451ca8b804080d84fad73f15ad8c8eb6ff1f811fb78f84a12dc169
UU-ComputerScience/uhc
LibraryDataList1.hs
{- ---------------------------------------------------------------------------------------- what : library Data.List expected: ok ---------------------------------------------------------------------------------------- -} module Main where import Data.List s = "z1y2a3b4" main = do putStrLn (s) put...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/LibraryDataList1.hs
haskell
---------------------------------------------------------------------------------------- what : library Data.List expected: ok ----------------------------------------------------------------------------------------
module Main where import Data.List s = "z1y2a3b4" main = do putStrLn (s) putStrLn ("sort: " ++ sort s) putStrLn ("intersperse ',': " ++ intersperse ',' s) putStrLn ("maximum: " ++ show (maximum s)) putStrLn ("minimum: " ++ show (minimum s)) putStrLn ("delete 'a': " ++ delete 'a'...
a47d9dd17dc304d560079a3c0f37246a9b2416d66bd8d4ade0f6c10c7d97d3a0
triffon/fp-2022-23
13.take.rkt
#lang racket (require rackunit rackunit/text-ui) # # # Зад 13 връща списък от първите ` n ` елемента на ` l ` . (define (take n l) 'тук) (run-tests (test-suite "take tests" (check-equal? (take 0 '()) '()) (check-equal? (take 0 '(1 2 3 4)) '()) (check-equal? (take...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/56690db370b1c838170e56a4d83bc5ed55d7a785/exercises/cs2/04.scheme.lists/13.take.rkt
racket
#lang racket (require rackunit rackunit/text-ui) # # # Зад 13 връща списък от първите ` n ` елемента на ` l ` . (define (take n l) 'тук) (run-tests (test-suite "take tests" (check-equal? (take 0 '()) '()) (check-equal? (take 0 '(1 2 3 4)) '()) (check-equal? (take...
8bee33002f709365a7c3bac634f1f97583f193ca09fffe7670375e4a39e943f8
AmpersandTarski/Ampersand
Utils.hs
module Ampersand.Options.Utils where import Ampersand.Basics import Options.Applicative import qualified RIO.Char as C -- | If argument is True, hides the option from usage and help hideMods :: Bool -> Mod f a hideMods hide = if hide then internal <> hidden else idm -- Common parsers: outputLanguageP :: Parser (May...
null
https://raw.githubusercontent.com/AmpersandTarski/Ampersand/20efac6166165cb6d8010dc924b8a70e018035fc/src/Ampersand/Options/Utils.hs
haskell
| If argument is True, hides the option from usage and help Common parsers:
module Ampersand.Options.Utils where import Ampersand.Basics import Options.Applicative import qualified RIO.Char as C hideMods :: Bool -> Mod f a hideMods hide = if hide then internal <> hidden else idm outputLanguageP :: Parser (Maybe Lang) outputLanguageP = f <$> strOption ( long "language" ...
c8bb9419c4b49516eb4df728277f639f83078c9d40dc7e63dc6b3f0d8be8756b
robrix/Manifold
Type.hs
# LANGUAGE LambdaCase , TypeFamilies # module Manifold.Type where import Data.Bifoldable import Data.Bifunctor import Data.Foldable (fold, toList) import Data.Functor.Foldable (Base, Corecursive(..), Recursive(..)) import Data.Maybe (fromMaybe) import qualified Data.Set as Set import Data.Trifoldable import Data.Trifu...
null
https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Manifold/Type.hs
haskell
# LANGUAGE LambdaCase , TypeFamilies # module Manifold.Type where import Data.Bifoldable import Data.Bifunctor import Data.Foldable (fold, toList) import Data.Functor.Foldable (Base, Corecursive(..), Recursive(..)) import Data.Maybe (fromMaybe) import qualified Data.Set as Set import Data.Trifoldable import Data.Trifu...
e582998d449122deef2f07316fa12919e2a266e155d137f68a4e0ac10bd12102
Kakadu/fp2022
inferencer.ml
* Copyright 2022 - 2023 , * SPDX - License - Identifier : LGPL-3.0 - or - later (* *) open Base open Ast open Typing module Format = Caml.Format (* Original code was taken from -materials/-/blob/master/code/miniml, (with small updates for printf supporting) *) type error = [ `Occurs_check | `No_variab...
null
https://raw.githubusercontent.com/Kakadu/fp2022/0ecfd0a84158d9897c26d07108437e9036b92f05/OCamlPrintf/lib/inferencer.ml
ocaml
Original code was taken from -materials/-/blob/master/code/miniml, (with small updates for printf supporting) * Creation of a fresh name from internal state * Running a transformer: getting the inner result value A compositon: State monad after Result monad an association list. In real world replace it ...
* Copyright 2022 - 2023 , * SPDX - License - Identifier : LGPL-3.0 - or - later open Base open Ast open Typing module Format = Caml.Format type error = [ `Occurs_check | `No_variable of string | `Unification_failed of ty * ty ] let pp_error ppf : error -> _ = function | `Occurs_check -> Format.fprintf...
5bbb59e356a45f88b7043f6a5dbcd8f0171e0e8429a1a4e705de31b41f0d54ed
clojure-lsp/clojure-lsp
build.clj
(ns build (:require [babashka.fs :as fs] [clojure.java.io :as io] [clojure.string :as string] [clojure.tools.build.api :as b])) (def standalone-lib 'com.github.clojure-lsp/clojure-lsp-standalone) (def server-lib 'com.github.clojure-lsp/clojure-lsp-server) (def current-version (string/trim (slurp (io/reso...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/faff6c3f52a96149bcbd5116505106cfc51ca979/cli/build.clj
clojure
(ns build (:require [babashka.fs :as fs] [clojure.java.io :as io] [clojure.string :as string] [clojure.tools.build.api :as b])) (def standalone-lib 'com.github.clojure-lsp/clojure-lsp-standalone) (def server-lib 'com.github.clojure-lsp/clojure-lsp-server) (def current-version (string/trim (slurp (io/reso...
0bf2569ed6f02cc6d3c4359ec787750ab0538969e1e19ed4f0a557d7d3c5c2ad
m-2k/erlach
erlach_session.erl
-module(erlach_session). -author('Maxim Sokhatsky'). -include_lib("n2o/include/wf.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). -export(?SESSION_API). -compile(export_all). -include("erlach.hrl"). -include_lib("db/include/user.hrl"). init(State, Ctx) -> Request = case wf:cookie_req(session_cookie_name()...
null
https://raw.githubusercontent.com/m-2k/erlach/ce0a19a0550c3457a1fc1d7c40e4f1cb577d7924/apps/erlach/src/erlach_session.erl
erlang
Speed fix: -20 ms
-module(erlach_session). -author('Maxim Sokhatsky'). -include_lib("n2o/include/wf.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). -export(?SESSION_API). -compile(export_all). -include("erlach.hrl"). -include_lib("db/include/user.hrl"). init(State, Ctx) -> Request = case wf:cookie_req(session_cookie_name()...
5681d8c9975852bb5e5c09592d992bb18103db18f55c9aa28492afc9c0f46b87
ksaaskil/functional-programming-examples
InputAndOutput.hs
Chapter 9 : -and-output -- Enter interactive mode with `stack ghci` -- and load the module with `:l StartingOut` module InputAndOutput () where import Control.Monad import Data.Char import System.IO import System.Random import Control.Monad ( whe...
null
https://raw.githubusercontent.com/ksaaskil/functional-programming-examples/cbeb90f200d42e4a464dfb02fa5d7424bc12dd00/learn-you-a-haskell/src/InputAndOutput.hs
haskell
Enter interactive mode with `stack ghci` and load the module with `:l StartingOut` Pure functions cannot change state of things in the world. To achieve effects, ghci> :t putStrLn putStrLn :: String -> IO () So the function takes a string and returns an I/O action. Here's how you compose I/O actions in the m...
Chapter 9 : -and-output module InputAndOutput () where import Control.Monad import Data.Char import System.IO import System.Random import Control.Monad ( when ) uses the IO type . For example , the type of ` putStrLn ` : putStrLn " H...
b766ef5bf206cc1ff8fcd30a2abc4637fe8a02b3d896bc109bdbe7b43e869162
sigscale/5g-ngap
ngap_listen_fsm.erl
%%% ngap_listen_fsm.erl %%% vim: ts=3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2020 SigScale Global Inc. %%% @end 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...
null
https://raw.githubusercontent.com/sigscale/5g-ngap/e4de7891a757d9587314d02f9e5598d51f8e7f5a/src/ngap_listen_fsm.erl
erlang
ngap_listen_fsm.erl vim: ts=3 @end 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 fo...
2020 SigScale Global Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module implements a socket handler for incoming SCTP connections in the { @link //ngap . } application . -module(ngap_listen_fsm). -copyright...
e883d3309c21a9a2ce5c81908702b859f5d39be5f1553d72ff614e033e9bac08
LennMars/algorithms_in_OCaml
test.ml
let capacity = 20 let goods = [(1, 2); (1, 1); (2, 2); (2, 3); (3, 2); (3, 6); (5, 5); (5, 7); (6, 10); (6, 4); (9, 11); (10, 12); (10, 9); (11, 15)] let solution = Main.opt capacity goods let _ = List.iter (fun x -> Printf.printf "(%d, %d) " (fst x) (snd x)) solution; Printf.printf "\n"
null
https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/knapsack/test.ml
ocaml
let capacity = 20 let goods = [(1, 2); (1, 1); (2, 2); (2, 3); (3, 2); (3, 6); (5, 5); (5, 7); (6, 10); (6, 4); (9, 11); (10, 12); (10, 9); (11, 15)] let solution = Main.opt capacity goods let _ = List.iter (fun x -> Printf.printf "(%d, %d) " (fst x) (snd x)) solution; Printf.printf "\n"
2779c5c1579a5fce769e90e815ef8eecef10638aa3e8ed5329fbdbe6c14fa278
startalkIM/ejabberd
http_send_notify.erl
-module(http_send_notify). -export([handle/1]). -include("ejabberd.hrl"). -include("logger.hrl"). handle(Req) -> {Method, Req1} = cowboy_req:method(Req), case Method of <<"POST">> -> send_notify(Req1); _ -> http_utils:cowboy_req_reply_json(http_utils:gen_fail_result(1, <<Method/binary, " is n...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/http_send_notify.erl
erlang
-module(http_send_notify). -export([handle/1]). -include("ejabberd.hrl"). -include("logger.hrl"). handle(Req) -> {Method, Req1} = cowboy_req:method(Req), case Method of <<"POST">> -> send_notify(Req1); _ -> http_utils:cowboy_req_reply_json(http_utils:gen_fail_result(1, <<Method/binary, " is n...
c59abc9b32a868c37f5a0ab84fa19d414b976d6139c6c91380a0c6631d80d332
chaoxu/fancy-walks
SEQ7.hs
import Control.Monad import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int bnds = (1, 130000) a :: [Int] a = 1 : 2 : (drop 2.concat) [replicate x i | (i, x) <- zip [1..] a] a' :: [Int64] a' = scanl (+) 1 $ map fromIntegral a fastA :: Int -> Int fastA = (cache!) where cache = listArray...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/spoj.pl/SEQ7.hs
haskell
a[lo..hi] = x func v = v `div` fromIntegral x + lo
import Control.Monad import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int bnds = (1, 130000) a :: [Int] a = 1 : 2 : (drop 2.concat) [replicate x i | (i, x) <- zip [1..] a] a' :: [Int64] a' = scanl (+) 1 $ map fromIntegral a fastA :: Int -> Int fastA = (cache!) where cache = listArray...
bdfd6dfb173b2286e3e6376ca4c17ff22e81c2b18fa45f6d66b397d42818718c
rainoftime/PFAD
ch6.erl
%% @doc Chapter6: Making a century -module(ch6). -export([ solutions/1, improved_solutions/1 ]). -type expression() :: [pfad_term()]. -type pfad_term() :: [factor()]. -type factor() :: [digit()]. -type digit() :: integer(). -spec solutions([digit()]) -> [expression()]. solutions(...
null
https://raw.githubusercontent.com/rainoftime/PFAD/e594c027fc49da6f546701f6a550271b99442e0a/ch6/ch6.erl
erlang
@doc Chapter6: Making a century -spec modify(integer(), value()) -> [value()]. modify(X, {K, F, T, E}) ->
-module(ch6). -export([ solutions/1, improved_solutions/1 ]). -type expression() :: [pfad_term()]. -type pfad_term() :: [factor()]. -type factor() :: [digit()]. -type digit() :: integer(). -spec solutions([digit()]) -> [expression()]. solutions(Digits) -> lists:filter(fun (E)...
0391ccd5109f39459b7446f829a6c0b837c28bdaed7e0d77b91d894401ade0f7
cram2/cram
cloud-logger-query-handler.lisp
(in-package :ccl) (defun send-cram-start-parent-action (owl-action-class task-context start-time prev-action parent-task action-inst) (send-prolog-query-1 (create-query "cram_start_action" (list owl-action-class task-context start-time prev-action parent-task actio...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_knowrob/cram_cloud_logger/src/cloud-logger-query-handler.lisp
lisp
(stamp (cl-transforms-stamped:stamp pose-stamped)) (send-rdf-query (convert-to-prolog-str pose-stamped-instance-id) "knowrob:stamp" (create-float-owl-literal stamp))
(in-package :ccl) (defun send-cram-start-parent-action (owl-action-class task-context start-time prev-action parent-task action-inst) (send-prolog-query-1 (create-query "cram_start_action" (list owl-action-class task-context start-time prev-action parent-task actio...
5d7b6295721e35aef3e91a946d8240f8ea5497c6fcb663abe37dc9724663f1e4
NorfairKing/tickler
TriggeredEmailConverterSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Tickler.Server.Looper.TriggeredEmailConverterSpec (spec) where import Data.Time import Data.UUID as UUID import Data.UUID.Typed as Typed import TestImport import Tickler.Data import Tickler.Server.Looper.TriggeredEmailConverter spec :: Spec spec = do let sets = Tri...
null
https://raw.githubusercontent.com/NorfairKing/tickler/49f10fd0c55d9702dd7bd0116557ddcde9cc3ce0/tickler-server-gen/test/Tickler/Server/Looper/TriggeredEmailConverterSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Tickler.Server.Looper.TriggeredEmailConverterSpec (spec) where import Data.Time import Data.UUID as UUID import Data.UUID.Typed as Typed import TestImport import Tickler.Data import Tickler.Server.Looper.TriggeredEmailConverter spec :: Spec spec = do let sets = TriggeredEmailConverterSettings ...
88c3170763cc9f48053a7f07631dfc845ad124860a75377e87773bf0db7b5e97
tumarkin/edgar
Main.hs
import Control.Monad.Writer (Writer) import Options.Applicative import Options.Applicative.Simple import Edgar.Common import qualified Edgar.Download as Download import qualified Edgar.Init as Init import qualified Edgar.Update as ...
null
https://raw.githubusercontent.com/tumarkin/edgar/e6382a31ef0ff1a37489c2d816e4d3b1ffd8d3a5/app/Main.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Individual option parsers -- ---...
import Control.Monad.Writer (Writer) import Options.Applicative import Options.Applicative.Simple import Edgar.Common import qualified Edgar.Download as Download import qualified Edgar.Init as Init import qualified Edgar.Update as ...
f76b04ee4bbf901c370f7e78d021608c69cf6dbd3265cd6f17314e6081040fb1
ygrek/mldonkey
commonUploads.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonUploads.ml
ocaml
****************************************************************** TYPES ****************************************************************** We should probably directly use the Store.index here so that all shared_infos are stored on disk. *****************************************************...
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 ...