_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
ed9355ff8adc697fcd0a4655c494bec56860cd53a987c84048d8f9b05a05bfe2
ArulselvanMadhavan/haskell-first-principles
Ex26_11_2.hs
{-# LANGUAGE OverloadedStrings #-} module Ex26_11_2 where import Control.Monad.IO.Class import Data.Text.Lazy as TL import Web.Scotty param' :: Parsable a => Text -> ActionM (Either String a) param' k = rescue (Right <$> param k) (const (return (Left $ "The Key:" ++ sh...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter26/src/Ex26_11_2.hs
haskell
# LANGUAGE OverloadedStrings #
module Ex26_11_2 where import Control.Monad.IO.Class import Data.Text.Lazy as TL import Web.Scotty param' :: Parsable a => Text -> ActionM (Either String a) param' k = rescue (Right <$> param k) (const (return (Left $ "The Key:" ++ show k ++ " was missing!"))) main :...
f7ca375092e1d50584ca7b8bfe5070b94b933acb1824d5809db13399e90731d2
srid/neuron
VersionSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE NoImplicitPrelude # module Neuron.VersionSpec ( spec, ) where import Data.Tagged import qualified Data.Text as T import Neuron.Version (neuronVersion) import Relude import Test.Hspec spec :: Spec spec = do describe "Application version" $ d...
null
https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/test/Neuron/VersionSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # # LANGUAGE NoImplicitPrelude # module Neuron.VersionSpec ( spec, ) where import Data.Tagged import qualified Data.Text as T import Neuron.Version (neuronVersion) import Relude import Test.Hspec spec :: Spec spec = do describe "Application version" $ do it "should have dots" $ do ...
d6be827515c37c655a4fcbbaeed7c205214e2e222173cde2b9305817e317bcbe
babashka/babashka
http-server.clj
#!/usr/bin/env bb #_" -*- mode: clojure; -*-" Source : ;; Based on -viewer.clj (ns http-server (:require [babashka.fs :as fs] [clojure.java.browse :as browse] [clojure.string :as str] [clojure.tools.cli :refer [parse-opts]] [hiccup2.core :as html] [org.h...
null
https://raw.githubusercontent.com/babashka/babashka/18cf24d35e352b5abba32979bfdbf71fc34d41ff/examples/http-server.clj
clojure
Based on -viewer.clj A simple mime type utility from -clojure/ring/blob/master/ring-core/src/ring/util/mime_type.clj -clojure/ring/blob/master/ring-core/src/ring/util/mime_type.clj -clojure/ring/blob/master/ring-core/src/ring/util/mime_type.clj
#!/usr/bin/env bb #_" -*- mode: clojure; -*-" Source : (ns http-server (:require [babashka.fs :as fs] [clojure.java.browse :as browse] [clojure.string :as str] [clojure.tools.cli :refer [parse-opts]] [hiccup2.core :as html] [org.httpkit.server :as server...
74e10bc3f64cad23d0bdcd111b03a080f30e08ae86ce9eae4baef65fc5771751
typedclojure/typedclojure
parse_ast.cljc
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/a5766b1ecb4ab956d739c54ae3fb474c4d1fc24b/typed/clj.runtime/src/clojure/core/typed/parse_ast.cljc
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:no-doc clojure.core.typed.parse-ast (:require [clojure.core.typed :as t] [clojure.core.typed.current-impl :as impl] [clojure.core.typed.errors :as err] [clojure.core.typed.util-vars :as vs] [clojure.core.typed.coerce-ut...
90143503eb4a325b98f7d79b578a65a50b00f06b6a9f6d9c67118cf5044c49d8
braidchat/braid
threads.cljs
(ns braid.core.client.ui.views.threads (:require [braid.core.client.ui.views.thread :refer [thread-view]] [clojure.set :refer [difference]] [reagent.core :as r] [reagent.dom :as r-dom])) (defn threads-view " threads threads to display; component will 'cache' order of threads if new threads ...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/core/client/ui/views/threads.cljs
clojure
to avoid accidental re-use when switching groups, key this component with the group-id for a better user experience, this component maintains order of threads after mounting, any new threads that come in via props are appended to the end of existing threads (except blank new threads, which are put at the front) '...
(ns braid.core.client.ui.views.threads (:require [braid.core.client.ui.views.thread :refer [thread-view]] [clojure.set :refer [difference]] [reagent.core :as r] [reagent.dom :as r-dom])) (defn threads-view " threads component will 'cache' order of threads if new threads come in, to prevent ...
a516b164a4031adebb734fe5919b35da1440c6e710dde95c05e57b01b200fb4d
bakul/s9fes
catch.scm
Scheme 9 from Empty Space , Function Library By , ; Placed in the Public Domain ; ; (catch <tag> <statement> ...) ==> object ; (throw <tag> <expression>) ==> undefined ; ; (load-from-library "catch.scm") ; ; Implement Common LISP-style CATCH and THROW. <Tag> must evaluate to an object that can be check...
null
https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/attic/catch.scm
scheme
Placed in the Public Domain (catch <tag> <statement> ...) ==> object (throw <tag> <expression>) ==> undefined (load-from-library "catch.scm") Implement Common LISP-style CATCH and THROW. <Tag> must evaluate to symbol). CATCH establishes a catch named <tag> and then evaluates passed to the innermost cat...
Scheme 9 from Empty Space , Function Library By , an object that can be checked for identity using EQ ? ( typically a the given < statement > s in an implicit BEGIN . Unless one of the statements executes THROW , the value of the last < statement > will be returned . When a < statement > executes THROW ...
879758cdec375fdb4ca68b44c87943de4cf5767081e0bbba5599cb31f35a2ad3
logseq/mldoc
range.ml
type t = { start : Timestamp.t ; stop : Timestamp.t } [@@deriving yojson] let to_string { start; stop } = Printf.sprintf "%s--%s" (Timestamp.to_string start) (Timestamp.to_string stop)
null
https://raw.githubusercontent.com/logseq/mldoc/e56334b8f0e1664288f549f54773b55a140bc2e3/lib/syntax/range.ml
ocaml
type t = { start : Timestamp.t ; stop : Timestamp.t } [@@deriving yojson] let to_string { start; stop } = Printf.sprintf "%s--%s" (Timestamp.to_string start) (Timestamp.to_string stop)
b4a66a7eed4ebdc81f833d16eb7f6d35da4d30b6d14d1a7152c5c7d5fca32d75
vult-dsp/vult
webaudio.ml
open Config let inputString (m : input) : Pla.t = match m with | IContext -> Pla.string "processor.context" | IReal name | IInt name | IBool name -> Pla.string name ;; let inputName (i, acc) s = match s with | IContext -> i, Pla.string "processor.context" :: acc | _ -> i + 1, [%pla {|in_<#i#i>[n]|}]...
null
https://raw.githubusercontent.com/vult-dsp/vult/860b2b7a8e891aa729578175a931ce2a9345428b/src/generators/templates/webaudio.ml
ocaml
generates the aguments for the process call declares the return variable and copies the values to the output buffers
open Config let inputString (m : input) : Pla.t = match m with | IContext -> Pla.string "processor.context" | IReal name | IInt name | IBool name -> Pla.string name ;; let inputName (i, acc) s = match s with | IContext -> i, Pla.string "processor.context" :: acc | _ -> i + 1, [%pla {|in_<#i#i>[n]|}]...
6b229e9f430e97e293fa2d21aa962d36cd018808f93a3a7286ea4fe414eb4a9f
basho-labs/wriaki
article_history.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2009 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You...
null
https://raw.githubusercontent.com/basho-labs/wriaki/cd437737fda7f47cbbb27fab4ec86d0e7c0ff57d/apps/wriaki/src/article_history.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 ) 2009 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
3c9fe2b3df1af373e68f6f3c6fb688db0f394ee9ae51472694ee75529a32e3b8
wireapp/wire-server
Validation.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/federator/src/Federator/Validation.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Federator.Validation ( ...
cb5156eea19bd5c5e09e82b3f14bae2fd0746e6b48ccd67ed86c8e2c150648a5
quil-lang/quilc
clifford-t.lisp
;;;; src/discrete/compilers/clifford-t.lisp ;;;; Author : (in-package #:cl-quil.discrete) ;;; Compilers targeting Clifford+T (i.e. H, S, T) Pauli to clifford expansion rules (q::define-compiler X-to-HZH ((x ("X" () q))) (q:inst "H" () q) (q:inst "Z" () q) (q:inst "H" () q)) (q::define-compiler expa...
null
https://raw.githubusercontent.com/quil-lang/quilc/e04c4d3fb9b7b1028ab7faaff1a3bf692dcb3d44/src/discrete/compilers/clifford-t.lisp
lisp
src/discrete/compilers/clifford-t.lisp Compilers targeting Clifford+T (i.e. H, S, T) Less candidates are available for larger epsilons Almost certainly a bug if no solution is found
Author : (in-package #:cl-quil.discrete) Pauli to clifford expansion rules (q::define-compiler X-to-HZH ((x ("X" () q))) (q:inst "H" () q) (q:inst "Z" () q) (q:inst "H" () q)) (q::define-compiler expand-Z-to-Ss ((z ("Z" () q))) (q:inst "S" () q) (q:inst "S" () q)) (q::define-compiler expan...
d805f6ff1b6627575ea1d6cc6af17dde17536356c0ec9b2bb913db8af94e4f99
ku-fpg/haskino
MultiLED.hs
{-# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #-} ------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.SamplePrograms.Rewrite.MultiLED Copyright : ( c ) University of Kansas -- License : BSD3 -- Stability : exp...
null
https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/legacy/Rewrite/MultiLED.hs
haskell
# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin # ----------------------------------------------------------------------------- | Module : System.Hardware.Haskino.SamplePrograms.Rewrite.MultiLED License : BSD3 Stability : experimental task structure, it is simply parameterized over ...
Copyright : ( c ) University of Kansas This is an example of using tasks to light several LEDs . There are 3 LED 's One blinks with a period of 1 second , the 2nd with a period of 2 seconds , and the third with a period of 4 seconds . They all use the same monadic module Main where import Data.Boolea...
55b8eda043564e6d9510f62b5aacb6840fd7a5ae7a3172b18dc767361635b60e
g-andrade/taskforce
tf_minion_serv.erl
% vim: set expandtab softtabstop=4 shiftwidth=4: %% @hidden -module(tf_minion_serv). -behaviour(gen_server). %% API functions -export([start_link/1]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -ign...
null
https://raw.githubusercontent.com/g-andrade/taskforce/7ec4f4fe8190e0b3c1fa2126bbdf88f9f724a7c8/src/tf_minion_serv.erl
erlang
vim: set expandtab softtabstop=4 shiftwidth=4: @hidden API functions gen_server callbacks =================================================================== API functions =================================================================== -------------------------------------------------------------------- @doc ...
-module(tf_minion_serv). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -ignore_xref([{start_link, 1}]). @headerfile " .. /include / taskforce.hrl " -include("include/taskfo...
b4453d4c840734a9aeac34839a1bd8061b605f652cdb632a0acc28256597a705
Deducteam/zenon_modulo
smtlib_util.ml
(* auto-generated by gt *) (* no extra data from grammar file. *) type extradata = unit;; let initial_data() = ();; let file = ref "stdin";; let line = ref 1;; type pos = int;; let string_of_pos p = "line "^(string_of_int p);; let cur_pd() = (!line, initial_data());; (* "pd": pos + extradata *) type pd = pos * extr...
null
https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/smtlib_util.ml
ocaml
auto-generated by gt no extra data from grammar file. "pd": pos + extradata
type extradata = unit;; let initial_data() = ();; let file = ref "stdin";; let line = ref 1;; type pos = int;; let string_of_pos p = "line "^(string_of_int p);; type pd = pos * extradata;;
59f20d91fb98966fcd99b776f41a9a8429cb28942a3573eea1b63834bcaf1220
htm-community/clortex
temporal_demo.clj
(ns clortex.temporal-demo (:use midje.sweet) (:require [quil.core :as q] [clortex.viz.temporal :as v])) (q/defsketch example :title "Temporal Pooling Visualisation" :setup v/setup :draw v/draw :size [800 400] :key-typed v/key-press)
null
https://raw.githubusercontent.com/htm-community/clortex/69003a352140510f47c6b8e18ad6a98a7b5a3bba/test/clortex/temporal_demo.clj
clojure
(ns clortex.temporal-demo (:use midje.sweet) (:require [quil.core :as q] [clortex.viz.temporal :as v])) (q/defsketch example :title "Temporal Pooling Visualisation" :setup v/setup :draw v/draw :size [800 400] :key-typed v/key-press)
1ea705ee83f2f24994af44522efc6407b8ed0be58630a274b44e681740233bef
racket/racket-lang-org
resources.rkt
#lang plt-web (require plt-web/style "../identity.rkt" "../testing.rkt") (provide www-site) (define www-site (site "www" #:url (rewrite-for-testing "-lang.org/") #:page-headers (identity-headers) #:navigation (list @a[href: (resource "stubs/pkgs/" #f)]{Pack...
null
https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/www/resources.rkt
racket
#lang plt-web (require plt-web/style "../identity.rkt" "../testing.rkt") (provide www-site) (define www-site (site "www" #:url (rewrite-for-testing "-lang.org/") #:page-headers (identity-headers) #:navigation (list @a[href: (resource "stubs/pkgs/" #f)]{Pack...
2b993290e19236c8702f7a4da7e6de570eb0bb5b3238b4b9524b9eb81bdc49dc
jdan/wordle.ml
seacher.ml
open Util open Evaluator let rec filter_words results = function | [] -> [] | words -> let matching_pattern guess pattern = List.filter ( fun candidate -> evaluate guess candidate = pattern ) in ( match results with | [] -> words | (guess, pattern)::rest -> ...
null
https://raw.githubusercontent.com/jdan/wordle.ml/0468f0169629bc5d74687d800d40b953d67c9281/lib/seacher.ml
ocaml
Return the table Simple heuristic to "score" a word
open Util open Evaluator let rec filter_words results = function | [] -> [] | words -> let matching_pattern guess pattern = List.filter ( fun candidate -> evaluate guess candidate = pattern ) in ( match results with | [] -> words | (guess, pattern)::rest -> ...
5da1f4478266828b361cd5ed14fb60f559680e7d717aba8e0b487d951c22d8bc
bnoordhuis/chicken-core
srfi-1.scm
;;;; srfi-1.scm - Shivers' reference implementation of SRFI-1 Some things to make it work with CHICKEN : ( flw ) ; (declare (unit srfi-1) (disable-interrupts) (hide ##srfi1#cars+cdrs/no-test ##srfi1#cdrs ##srfi1#cars+ ##srfi1#really-append-map ##srfi1#cars+cdrs+ ##srfi1#cars+cdrs ##srfi1#lset2<=) (not sta...
null
https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/srfi-1.scm
scheme
srfi-1.scm - Shivers' reference implementation of SRFI-1 SRFI-1 list-processing library -*- Scheme -*- Reference implementation this code as long as you do not remove this copyright notice or hold me liable for its use. Please send bug reports to . -Olin This is a library of list- and pair-processing fu...
Some things to make it work with CHICKEN : ( flw ) (declare (unit srfi-1) (disable-interrupts) (hide ##srfi1#cars+cdrs/no-test ##srfi1#cdrs ##srfi1#cars+ ##srfi1#really-append-map ##srfi1#cars+cdrs+ ##srfi1#cars+cdrs ##srfi1#lset2<=) (not standard-bindings member assoc)) (include "common-declarations.scm...
b139a1459be22b8b825c24d280b9930b8233f453f15d4e9ba67eb8b0541f7fa2
achirkin/qua-view
Camera.hs
{-# LANGUAGE RecursiveDo #-} -- | Dynamic behavior of camera module Program.Camera ( dynamicCamera , objectTransformEvents ) where import Control.Lens import Commons import Numeric.DataFrame import Reflex.Class import Reflex.Dom.Widget.Animation...
null
https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Program/Camera.hs
haskell
# LANGUAGE RecursiveDo # | Dynamic behavior of camera | Reflex camera's behavior ^ whether camera is locked due to object actions derive default camera state and its position from scenario all changes of the viewport size come from AResizeEvent projection matrix also changes only at AResizeEvents check...
module Program.Camera ( dynamicCamera , objectTransformEvents ) where import Control.Lens import Commons import Numeric.DataFrame import Reflex.Class import Reflex.Dom.Widget.Animation ( AEventType (..), PEventType (..), AnimationHandler ) import qualifie...
a2d0f317825751fe4040d537ff4990c1c78ef5ee775763f5f1aa9c86f5f9f8fe
travelping/eradius
eradius_sup.erl
@private -module(eradius_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). %% ------------------------------------------------------------------------------------------ %% -- supervisor call...
null
https://raw.githubusercontent.com/travelping/eradius/bac1a92f547ac4f8e009e9052f28c430b6f9b82d/src/eradius_sup.erl
erlang
------------------------------------------------------------------------------------------ -- supervisor callbacks
@private -module(eradius_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> RestartStrategy = one_for_one, MaxRestarts = 10, MaxSecondsBetweenRestarts = 5, SupFla...
7bc4bd7be9827defbbba3398b0cf3706923351e4663385bc8e1808f2c407fcc8
mwand/5010-examples
05-4-sets.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-intermediate-lambda-reader.ss" "lang")((modname sets) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-d...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/05-4-sets.rkt
racket
about the language level of this file in a form that our tools can easily process. sets (provide my-member? subset? set-equal?) (provide set-cons set-union) A SetOfX is a ListOfX with no duplicates note: empty is a SetOfX my-member? : X SetOfX -> Boolean RETURNS: true iff the X is an element of the set STRATEG...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname sets) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require rackunit) (require "extras.rkt") GIVEN : an...
38514efdd5d1e6d848f6ade59cd6e6b41f75bc12894ebf9646d2b2e4df95f811
justinmeiners/srcweave
code-types.lisp
Copyright ( c ) 2022 ; ; 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 , version 2 . ; ; This program is distributed in the hope that it will be useful, but ; WITHOUT ANY WARRANTY; with...
null
https://raw.githubusercontent.com/justinmeiners/srcweave/72aecb28b86c0d945f99d33f5762cbbadcfd8666/code-types.lisp
lisp
This program is free software: you can redistribute it and/or modify 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 General Public License for more details. alo...
Copyright ( c ) 2022 it under the terms of the GNU General Public License as published by the Free Software Foundation , version 2 . You should have received a copy of the GNU General Public License (in-package :srcweave) Already this is tricky because a block may be included by more than one . (d...
edac18ab56b5acd0ccb90a26458fd99386a23be8ed979722be01f71e5b2f18d8
AshleyYakeley/Truth
Switch.hs
module Changes.World.GNOME.GTK.Element.Switch ( createDynamic ) where import Changes.Core import Changes.World.GNOME.GI import GI.Gtk hiding (get) import Shapes createDynamic :: Model (ROWUpdate (GView 'Locked Widget)) -> GView 'Locked Widget createDynamic model = do box <- liftIO $ boxNew OrientationVert...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/e39ecefbcddaf38bc4c946def835650d11f5ac5e/Changes/changes-gnome/lib/Changes/World/GNOME/GTK/Element/Switch.hs
haskell
module Changes.World.GNOME.GTK.Element.Switch ( createDynamic ) where import Changes.Core import Changes.World.GNOME.GI import GI.Gtk hiding (get) import Shapes createDynamic :: Model (ROWUpdate (GView 'Locked Widget)) -> GView 'Locked Widget createDynamic model = do box <- liftIO $ boxNew OrientationVert...
36b3feb901bbe5be683ef3d67bcd8895ccdba05ebda17e29bee679d3d8fc09ed
deobald/sicp-clojure
ex2_2.clj
(ns sec2-1.ex2-2) (defn make-point [x y] {:x x :y y}) (defn make-segment [start end] {:start start :end end}) (defn print-point [p] (print "(") (print (:x p)) (print ", ") (print (:y p)) (print ")")) (defn print-segment [segment] (print newline) (print-point (:start segment)) (print " - ") (pr...
null
https://raw.githubusercontent.com/deobald/sicp-clojure/fc24e5114604e7a0510dab779bbff962aac7ee7e/src/sec2_1/ex2_2.clj
clojure
(ns sec2-1.ex2-2) (defn make-point [x y] {:x x :y y}) (defn make-segment [start end] {:start start :end end}) (defn print-point [p] (print "(") (print (:x p)) (print ", ") (print (:y p)) (print ")")) (defn print-segment [segment] (print newline) (print-point (:start segment)) (print " - ") (pr...
5f6a2dd5bfe93b7a71f3e4d5bf5ad91ad59265bb825c8b620194ba902bc0af0b
babashka/bbin
util.clj
(ns babashka.bbin.util (:require [babashka.fs :as fs] [babashka.process :as p] [babashka.bbin.meta :as meta] [clojure.pprint :as pprint] [clojure.string :as str] [taoensso.timbre :as log] [clojure.edn :as edn])) (defn user-home [] (System/getP...
null
https://raw.githubusercontent.com/babashka/bbin/61b9fe5ee3105bd6d93738e385f6fcddb18a3fbf/src/babashka/bbin/util.clj
clojure
(ns babashka.bbin.util (:require [babashka.fs :as fs] [babashka.process :as p] [babashka.bbin.meta :as meta] [clojure.pprint :as pprint] [clojure.string :as str] [taoensso.timbre :as log] [clojure.edn :as edn])) (defn user-home [] (System/getP...
618cc27acd1948e133c75d5876cca2de3c7fc93e5632db5c31f207dd7d927c50
haskell-tls/hs-tls
Layer.hs
{-# LANGUAGE OverloadedStrings #-} module Network.TLS.Record.Layer ( RecordLayer(..) , newTransparentRecordLayer ) where import Network.TLS.Imports import Network.TLS.Record import Network.TLS.Struct import qualified Data.ByteString as B data RecordLayer bytes = RecordLayer { Writing.hs recordEncode ...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Network/TLS/Record/Layer.hs
haskell
# LANGUAGE OverloadedStrings # all alerts are silent and must be transported externally based on TLS exceptions raised by the library
module Network.TLS.Record.Layer ( RecordLayer(..) , newTransparentRecordLayer ) where import Network.TLS.Imports import Network.TLS.Record import Network.TLS.Struct import qualified Data.ByteString as B data RecordLayer bytes = RecordLayer { Writing.hs recordEncode :: Record Plaintext -> IO (Either...
687a7ed93ea6ed7323037cff78fcd324ab981941e1eafae7ee823996bfce7186
footprintanalytics/footprint-web
parse.clj
(ns metabase.models.permissions.parse "Parses sets of permissions to create a permission graph. Strategy is: - Convert strings to parse tree - Convert parse tree to path, e.g. ['3' :all] or ['3' :schemas :all] - Convert set of paths to a map, the permission graph" (:require [clojure.core.match :refer [match]...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/models/permissions/parse.clj
clojure
\\ -> \ admin permissions download perms collection perms data model perms DB details perms
(ns metabase.models.permissions.parse "Parses sets of permissions to create a permission graph. Strategy is: - Convert strings to parse tree - Convert parse tree to path, e.g. ['3' :all] or ['3' :schemas :all] - Convert set of paths to a map, the permission graph" (:require [clojure.core.match :refer [match]...
b88d72f8e3649bf791fabf63ead59b067ee92ccc076f45a355f5b0ee0f51f396
instedd/planwise
handlers.cljs
(ns planwise.client.sources.handlers (:require [re-frame.core :refer [register-handler dispatch] :as rf] [planwise.client.asdf :as asdf] [planwise.client.sources.api :as api])) (def in-sources (rf/path [:sources])) (rf/reg-event-fx :sources/load in-sources (fn [{:keys [db]} [_]] {:api ...
null
https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/client/src/planwise/client/sources/handlers.cljs
clojure
(ns planwise.client.sources.handlers (:require [re-frame.core :refer [register-handler dispatch] :as rf] [planwise.client.asdf :as asdf] [planwise.client.sources.api :as api])) (def in-sources (rf/path [:sources])) (rf/reg-event-fx :sources/load in-sources (fn [{:keys [db]} [_]] {:api ...
815efd7dacd32dd87f68b598b970488c438f4ec1e5538726163a149130714f2b
darkleaf/publicator
binding_map.clj
(ns publicator.main.binding-map (:require [com.stuartsierra.component :as component] [publicator.persistence.storage :as storage] [publicator.persistence.storage.user-mapper :as user-mapper] [publicator.persistence.storage.post-mapper :as post-mapper] [publicator.persistence.user-queries :as user-q] ...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/main/src/publicator/main/binding_map.clj
clojure
(ns publicator.main.binding-map (:require [com.stuartsierra.component :as component] [publicator.persistence.storage :as storage] [publicator.persistence.storage.user-mapper :as user-mapper] [publicator.persistence.storage.post-mapper :as post-mapper] [publicator.persistence.user-queries :as user-q] ...
bbbb368a64fe1801e06e0b9038833939c51254e5f0101950c58dd1aec7e123f1
helium/erlang-libp2p
listen_SUITE.erl
-module(listen_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([ all/0, init_per_testcase/2, end_per_testcase/2 ]). -export([ port0/1, addr0/1, already/1, bad_addr/1, port0_reuse/1, restart_transport/1, sort_addresses/1 ]). ...
null
https://raw.githubusercontent.com/helium/erlang-libp2p/d587854c8a1f093576bbd05ab4616bcc2693e600/test/listen_SUITE.erl
erlang
-------------------------------------------------------------------- COMMON TEST CALLBACK FUNCTIONS -------------------------------------------------------------------- -------------------------------------------------------------------- @doc Running tests for this suite @end -------------------------------------...
-module(listen_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([ all/0, init_per_testcase/2, end_per_testcase/2 ]). -export([ port0/1, addr0/1, already/1, bad_addr/1, port0_reuse/1, restart_transport/1, sort_addresses/1 ]). ...
02be0cae59ce5332f6ec29f854f391e2d8705594512659b5cdbbe46c93ebfcd8
scrintal/heroicons-reagent
check.cljs
(ns com.scrintal.heroicons.outline.check) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/check.cljs
clojure
(ns com.scrintal.heroicons.outline.check) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
584b95431b69bf9fb17f3690182f69a7c17ac91ebd7b94039b791db457059519
jbclements/sxml
SSAX-code.rkt
#lang racket/base (require srfi/13/string (only-in racket/port call-with-input-string) "myenv.ss" "parse-error.ss" "input-parse.ss") (provide (all-defined-out)) Functional XML parsing framework : SAX / DOM and SXML parsers ; with support for XML Namespaces and validation ; ;...
null
https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/ssax/SSAX-code.rkt
racket
with support for XML Namespaces and validation This is a package of low-to-high level lexing and parsing procedures a parser intended for a particular document type. The procedures in the package can be used separately to tokenize or parse various internal and external parsed entities, user-controlled handl...
#lang racket/base (require srfi/13/string (only-in racket/port call-with-input-string) "myenv.ss" "parse-error.ss" "input-parse.ss") (provide (all-defined-out)) Functional XML parsing framework : SAX / DOM and SXML parsers that can be combined to yield a SAX , a DOM , a validati...
af38e8c6a03379a058250a0dc841a7f1128314a1b300e172983a4bc2a3545b61
vagarenko/static-tensor
Diff.hs
# LANGUAGE TypeApplications # {-# LANGUAGE TypeInType #-} module CoreDump.Tensor.Diff where import Data.Tensor.Static import TensorInstances () diff_ :: Tensor '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float diff_ = diff
null
https://raw.githubusercontent.com/vagarenko/static-tensor/8409d281707c23f3fe2028e926f1d4e8f7a9bc2d/tests/CoreDump/Tensor/Diff.hs
haskell
# LANGUAGE TypeInType #
# LANGUAGE TypeApplications # module CoreDump.Tensor.Diff where import Data.Tensor.Static import TensorInstances () diff_ :: Tensor '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float diff_ = diff
fed49a5df8ee037c5edf37f1345919ca23d4dd4a72d69690b75c649a5e02837d
goldfirere/units
Apothecaries.hs
# LANGUAGE TemplateHaskell , TypeFamilies , TypeOperators # ----------------------------------------------------------------------------- -- | -- Module : Data.Units.US.Apothecaries Copyright : ( C ) 2013 -- License : BSD-style (see LICENSE) Maintainer : ( ) -- Stability : experimental ...
null
https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units-defs/Data/Units/US/Apothecaries.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Units.US.Apothecaries License : BSD-style (see LICENSE) Stability : experimental Portability : non-portable This module defines apothecaries' measures of mass. These measures are rarely used. Included ar...
# LANGUAGE TemplateHaskell , TypeFamilies , TypeOperators # Copyright : ( C ) 2013 Maintainer : ( ) at a US government website . However , Wikipedia 's base is /much/ The US government references used are as follows : module Data.Units.US.Apothecaries ( module Data.Units.US.Apothecaries, Gr...
a24637645f71b4318348dfcbd29c00c193a97070aa22739543655333290b67f1
mhkoji/Senn
predict.lisp
(defpackage :senn.im.predict (:use :cl) (:export :execute)) (in-package :senn.im.predict) (defgeneric execute (predictor string) (:method-combination append) (:method append ((predictor t) string) nil))
null
https://raw.githubusercontent.com/mhkoji/Senn/3c7b5154dc38aa97f2efb6029c2089caef2c3ef8/senn/src/im/predict/predict.lisp
lisp
(defpackage :senn.im.predict (:use :cl) (:export :execute)) (in-package :senn.im.predict) (defgeneric execute (predictor string) (:method-combination append) (:method append ((predictor t) string) nil))
e4a011a32257082bd936c9217774173d4b454a70aa994f0c2cf1d2e0f90eff10
WorksHub/client
views.cljs
(ns wh.components.error.views (:require [re-frame.core :refer [dispatch]] [wh.components.error.subs :as subs] [wh.components.icons :refer [icon]] [wh.subs :refer [<sub]])) (defn global-status-box [] (let [type (<sub [::subs/type])] (when-let [message (<sub [::subs/message])]...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/components/error/views.cljs
clojure
(ns wh.components.error.views (:require [re-frame.core :refer [dispatch]] [wh.components.error.subs :as subs] [wh.components.icons :refer [icon]] [wh.subs :refer [<sub]])) (defn global-status-box [] (let [type (<sub [::subs/type])] (when-let [message (<sub [::subs/message])]...
b204c68e0300bb5c7577aa2f947a5aa170e8236d1e6ec60523eabfc31251b771
jaredly/reason-language-server
printlambda.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/printlambda.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Format open Asttypes open Primitiv...
cfdbaf85a7309f2bbe77111ff9a22684dfa3c09105f0bace2a461d6efad93227
clojurecademy/clojurecademy
about.clj
(ns clojurecademy.view.about (:require [clojurecademy.view.common :as view.common] [clojurecademy.util.resource :as resource.util])) (defn html [ctx] (view.common/full-html "About" (when (resource.util/authorized? ctx) (view.common/header :logged-in)) [:main.site.tos [:div.fit-...
null
https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/clj/clojurecademy/view/about.clj
clojure
(ns clojurecademy.view.about (:require [clojurecademy.view.common :as view.common] [clojurecademy.util.resource :as resource.util])) (defn html [ctx] (view.common/full-html "About" (when (resource.util/authorized? ctx) (view.common/header :logged-in)) [:main.site.tos [:div.fit-...
e5755b5ec989dbb982feb5ce75199428e207d234dfe2fee6ecedf30078f5deef
franks42/naclj
key_store.clj
(ns naclj.key-store (:require [naclj.key-protocol :as kp] [naclj.uri-util :as uri] )) (defprotocol INaclKeyStore "Interface to manage storing and finding private, public and other keys by kid." (add-key [this key][this kid key]) (get-key [this kid])) (defmulti make-key-store (fn [provider & xs] [pro...
null
https://raw.githubusercontent.com/franks42/naclj/0658915a860513340c5036fd759cc71510f91879/src/naclj/key_store.clj
clojure
(ns naclj.key-store (:require [naclj.key-protocol :as kp] [naclj.uri-util :as uri] )) (defprotocol INaclKeyStore "Interface to manage storing and finding private, public and other keys by kid." (add-key [this key][this kid key]) (get-key [this kid])) (defmulti make-key-store (fn [provider & xs] [pro...
d4a63e94815bcb408d79a53a2128c272922af9b2a7f4c69d6bdb7a6d11af036a
janestreet/core_bench
bench_command.ml
(* This module makes the command line interface for bench. *) open Core open Core_bench_internals module Time = Time_float_unix type callback_bench = ?run_config:Run_config.t -> ?analysis_configs:Analysis_config.t list -> ?display_config:Display_config.t -> ?save_to_file:(Measurement.t -> string) -> ?libname...
null
https://raw.githubusercontent.com/janestreet/core_bench/2e64c5f6037e43813076276881415f989b4208bc/src/bench_command.ml
ocaml
This module makes the command line interface for bench.
open Core open Core_bench_internals module Time = Time_float_unix type callback_bench = ?run_config:Run_config.t -> ?analysis_configs:Analysis_config.t list -> ?display_config:Display_config.t -> ?save_to_file:(Measurement.t -> string) -> ?libname:string -> Test.t list -> unit type callback_load_analyze...
946f5b2a21c8f20a19378c4faeb825eae9fa901d4a4b9d3435046f7e14234e4b
naoiwata/sicp
3.5.3.scm
;; ;; @author naoiwata SICP Chapter3 3.5.3 Exploiting the Stream Paradigm ;; (add-load-path "./" :relative) (load "stream.scm") (define (sqrt-improve guess x) (average guess (/ x guess))) (define (sqrt-stream x) (define guesses (cons-stream 1.0 (stream-map (lambda (gue...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/pages/3.5.3.scm
scheme
@author naoiwata ... ------------------------------------------------------------------------ Infinite streams of pairs ------------------------------------------------------------------------ ------------------------------------------------------------------------ Streams as signals -------------------------...
SICP Chapter3 3.5.3 Exploiting the Stream Paradigm (add-load-path "./" :relative) (load "stream.scm") (define (sqrt-improve guess x) (average guess (/ x guess))) (define (sqrt-stream x) (define guesses (cons-stream 1.0 (stream-map (lambda (guess) (...
c76458280eb84323d7c0d5e5c5516dc8299afad214135435ec22a972cfb4f225
pashatsyganenko/main
10032021.ml
type regexp = Concat of regexp*regexp | Alt of regexp*regexp | Char of char | Empty ;; let str = "(a|b)c" ;; let pos = ref 0 ;; let rec parse_s () = if !pos >= String.length str then Empty else let t = parse_t () in if !pos < String.length str && str.[!pos] = '|' then (pos := !pos + 1; Alt (t, parse_s ())...
null
https://raw.githubusercontent.com/pashatsyganenko/main/1b1bf905820b5007e9fb91ae17d52a72a955f961/2021-10/10032021.ml
ocaml
type regexp = Concat of regexp*regexp | Alt of regexp*regexp | Char of char | Empty ;; let str = "(a|b)c" ;; let pos = ref 0 ;; let rec parse_s () = if !pos >= String.length str then Empty else let t = parse_t () in if !pos < String.length str && str.[!pos] = '|' then (pos := !pos + 1; Alt (t, parse_s ())...
02d7ecaced9587f0a2250ca95314a4b2a59f14f7f5f69fa1095d50ae8ac45ebe
eeng/mercurius
flux.cljs
(ns mercurius.trading.presentation.order-book.flux (:require [re-frame.core :refer [reg-sub-raw reg-sub reg-event-fx]] [reagent.ratom :refer [reaction]] [mercurius.core.presentation.util.reframe :refer [reg-event-db >evt]] [mercurius.trading.presentation.tickers.flux :refer [ticker...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/trading/presentation/order_book/flux.cljs
clojure
Subscriptions Events
(ns mercurius.trading.presentation.order-book.flux (:require [re-frame.core :refer [reg-sub-raw reg-sub reg-event-fx]] [reagent.ratom :refer [reaction]] [mercurius.core.presentation.util.reframe :refer [reg-event-db >evt]] [mercurius.trading.presentation.tickers.flux :refer [ticker...
f4b34f80c8067cd625174fca1b2ad32e13bbeef5603cb9c5f0f5a63a86243e80
xapi-project/xen-api
network_config.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/703479fa448a8d7141954bb6e8964d8e25c4ac2e/ocaml/networkd/lib/network_config.ml
ocaml
Porting network interaface to ppx: convert ipv4_routes from [(string * int * string) list] to [{gateway:string; netmask:int; subnet:string}]
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
e9db59c1d84f4fefe2d7cdc2827bf7232a238eda3219a28634fee115005880e5
simingwang/emqx-plugin-kafkav5
hex_api_key.erl
%% @doc %% Hex HTTP API - Keys. -module(hex_api_key). -export([ list/1, get/2, add/3, delete/2, delete_all/1 ]). -export_type([permission/0]). -ifdef(OTP_19). -type permission() :: #{binary() := binary()}. -else. -type permission() :: #{binary() => binary()}. -endif. %% @doc %% Lists the user's o...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/plugins/hex_core/src/hex_api_key.erl
erlang
@doc Hex HTTP API - Keys. @doc Lists the user's or organization's API and repository keys. Examples: ``` > hex_api_key:list(hex_core:default_config()). <<"authing_key">> => true, <<"last_use">> => <<"name">> => <<"hex_core">>, <<"revoked_at">> => nil, }]}} ''' @end @doc Gets an API...
-module(hex_api_key). -export([ list/1, get/2, add/3, delete/2, delete_all/1 ]). -export_type([permission/0]). -ifdef(OTP_19). -type permission() :: #{binary() := binary()}. -else. -type permission() :: #{binary() => binary()}. -endif. { ok , { 200 , ... , [ # { < < " inserted_at " > > = ...
a422bcb6ff0a369ae1c287f615abe4b6436f52727b60b03a472623261ec8c0ca
haslab/HAAP
Tourney.hs
HAAP : Haskell Automated Assessment Platform This module provides the @Tourney@ plugin to run tournaments . HAAP: Haskell Automated Assessment Platform This module provides the @Tourney@ plugin to run tournaments. -} # LANGUAGE OverloadedStrings , DeriveDataTypeable , TupleSections , TypeOperators , DeriveFunc...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Test/Tourney.hs
haskell
| Player names need to be unique players should be unique maximum number of table entries for the tournament determine the number of rounds must be unique (left = unpaired players, right = paired players) web folder where to render the tournaments matchno players returning a match result renders a match resu...
HAAP : Haskell Automated Assessment Platform This module provides the @Tourney@ plugin to run tournaments . HAAP: Haskell Automated Assessment Platform This module provides the @Tourney@ plugin to run tournaments. -} # LANGUAGE OverloadedStrings , DeriveDataTypeable , TupleSections , TypeOperators , DeriveFunc...
f28e5b69efb3e3a68c317723a5fe77b9aac82c1b053e3617db0c7bb4afbe7903
zotonic/zotonic
m_translation.erl
@author < > 2013 - 2023 %% @doc Model for access to request language, language lists and language configuration. %% @end Copyright 2013 - 2023 %% 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...
null
https://raw.githubusercontent.com/zotonic/zotonic/aaa1894bb6ea430fe6eadf6c05857ed817c320ef/apps/zotonic_mod_translation/src/models/m_translation.erl
erlang
@doc Model for access to request language, language lists and language configuration. @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 A...
@author < > 2013 - 2023 Copyright 2013 - 2023 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(m_translation). -author("Marc Worrell <"). -behaviour(zotonic_model). -export([ m_get/3, languag...
2f087a770c11ec9085ff45c42080b669ab66ce02aeceb6f7c63c75185d53742a
aws-beam/aws-erlang
aws_redshift_data.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc You can use the Amazon Redshift Data API to run queries on Amazon %% Redshift tables. %% %% You can run SQL statements, which are committed if the statement succeeds. %% For more information about the Amazon Redshift Data...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_redshift_data.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! Redshift tables. You can run SQL statements, which are committed if the statement succeeds. Management Guide. ==================================================================== API ==================================================================== combinations of ...
See -beam/aws-codegen for more details . @doc You can use the Amazon Redshift Data API to run queries on Amazon For more information about the Amazon Redshift Data API and CLI usage examples , see Using the Amazon Redshift Data API in the Amazon Redshift -module(aws_redshift_data). -export([batch_execute_stat...
ba1288da2bbb5c299a3b8d269b1e532ba8bf709c7f050a8aebfbfe28af56697d
yogthos/compojure-template
home.clj
(ns {{name}}.routes.home (:require [compojure.core :refer :all] [{{name}}.views.layout :as layout])) (defn home [] (layout/common [:h1 "Hello World!"])) (defroutes home-routes (GET "/" [] (home)))
null
https://raw.githubusercontent.com/yogthos/compojure-template/2a4bdcb9cdda972b7966bf7e5a5f9b61a2bbda47/src/leiningen/new/compojure_app/home.clj
clojure
(ns {{name}}.routes.home (:require [compojure.core :refer :all] [{{name}}.views.layout :as layout])) (defn home [] (layout/common [:h1 "Hello World!"])) (defroutes home-routes (GET "/" [] (home)))
ca8bc06fa4fe2a49b2883e1a63092a144524adb5d58f9d2173bfce2c480d7b32
bzliu94/cs61a_fa07
lazy_modified.scm
;;;;LAZY EVALUATOR FROM SECTION 4.2 OF ;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS ;;;;Matches code in ch4.scm ;;;; Also includes enlarged primitive-procedures list ;;;;This file can be loaded into Scheme as a whole. ;;;;**NOTE**This file loads the metacircular evaluator of sections 4.1.1 - 4.1.4 , sinc...
null
https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/02%20-%20labs/lab14/lazy_modified.scm
scheme
LAZY EVALUATOR FROM SECTION 4.2 OF STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS Matches code in ch4.scm Also includes enlarged primitive-procedures list This file can be loaded into Scheme as a whole. **NOTE**This file loads the metacircular evaluator of environment representation, etc. You may need to chang...
sections 4.1.1 - 4.1.4 , since it uses the expression representation , the expression ( ) . Note : It is loaded first so that the section 4.2 definition of eval overrides the definition from 4.1.1 (load "mceval.scm") To run without memoization , reload the first version of force - it below SECTION 4...
bc57fc30f790323a995383ea84807ca13c5349ea683c79f8e8bd21a26237d073
gedge-platform/gedge-platform
rabbit_event_consumer.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_event_consumer). -include_lib("ra...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_event_consumer.erl
erlang
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- pattern matching is way more efficient that the string operations, let's use all the ...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_event_consumer). -include_lib("rabbit_c...
c31164ec45d39b46e768c68ccc41e9957fc94fef497086917c4a71523e4a0c12
Armael/ocaml-wlc
myocamlbuild.ml
OASIS_START DO NOT EDIT ( digest : 6ec67639c58727b6a131b0bb006de2a9 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else ...
null
https://raw.githubusercontent.com/Armael/ocaml-wlc/1825c6ff736fd1cdb751421d6f60eadf2dd994ec/myocamlbuild.ml
ocaml
these functions are not really officially exported ocamlfind command This lists all supported packages. Mock to list available syntaxes. By using Before_options one let command line options have an higher * priority on the contrary using After_options will guarantee to have * the higher p...
OASIS_START DO NOT EDIT ( digest : 6ec67639c58727b6a131b0bb006de2a9 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else ...
65d554ee99b7c342b3a74473d3812b7031abfb0716e134df7aa28fa8b6131b6b
anmonteiro/ocaml-quic
test_qifs.ml
open Qpack__ open Test_helpers let rec join ?(memo = []) = function | [] -> Ok (List.rev memo) | (Error _ as err) :: _ -> err | Ok x :: xs -> join ~memo:(x :: memo) xs let decoder ~max_size ~max_blocked_streams:_ = Decoder.create max_size let test t ~f { Qif.stream_id; encoded } = let faraday = F...
null
https://raw.githubusercontent.com/anmonteiro/ocaml-quic/7f1a06fbe5380954bf49adc53a8fa7458bdc0024/qpack/test/test_qifs.ml
ocaml
open Qpack__ open Test_helpers let rec join ?(memo = []) = function | [] -> Ok (List.rev memo) | (Error _ as err) :: _ -> err | Ok x :: xs -> join ~memo:(x :: memo) xs let decoder ~max_size ~max_blocked_streams:_ = Decoder.create max_size let test t ~f { Qif.stream_id; encoded } = let faraday = F...
c11165a6a5cbee16482da27a570b710119a4a20fafe5b0542637cc9ba5ab66c2
unsplash/intlc
Linter.hs
module Intlc.Linter where import qualified Data.Text as T import Control.Comonad (extract) import Control.Comonad.Trans.Cofree (CofreeF ((:<)), tailF) import Data.Char (isAscii) import Data.Functor.Foldable (cata, para) ...
null
https://raw.githubusercontent.com/unsplash/intlc/1e3e00add41db6b5f87d438f9998be2b18c27d99/lib/Intlc/Linter.hs
haskell
Select interpolations with only wildcards are redundant: they could be replaced with plain string interpolations. Plural interpolations with only wildcards are redundant: they could be replaced with plain number interpolations. Duplicate cases in plural interpolations are redundant. Our translation vendor has poo...
module Intlc.Linter where import qualified Data.Text as T import Control.Comonad (extract) import Control.Comonad.Trans.Cofree (CofreeF ((:<)), tailF) import Data.Char (isAscii) import Data.Functor.Foldable (cata, para) ...
dc956fa36ce88617eb550ca103e1f58305f89b838dfb872396e09d932c11ca27
azimut/shiny
incudine-dsps.lisp
(in-package :shiny) ;;-------------------------------------------------- ;; Sonic-pi (define-vug ss (freq mfreq amp) "helper for square function" (cond ((> freq 0d0) (* amp mfreq .0001)) ((< freq 0d0) (- (* amp mfreq .0001))) (t (* amp freq .0001)))) (dsp! square (freq amp dur atk) (:defaults 110 .1...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/instruments/incudine-dsps.lisp
lisp
-------------------------------------------------- Sonic-pi -------------------------------------------------- Sonic-pi Missing sc (normalizer in) -------------------------------------------------- Overtone - Prophet -------------------------------------------------- Overtone - All i wanted -----------------------...
(in-package :shiny) (define-vug ss (freq mfreq amp) "helper for square function" (cond ((> freq 0d0) (* amp mfreq .0001)) ((< freq 0d0) (- (* amp mfreq .0001))) (t (* amp freq .0001)))) (dsp! square (freq amp dur atk) (:defaults 110 .1 1 .25) (with-samples ((in (sine freq amp)) (i...
b528bbd1176518a641ec0e5739d66a30d3a395c226ba2f226a5495bfa4fdbd63
BitGameEN/bitgamex
erlcloud_ddb_tests.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_ddb_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_ddb.hrl"). %% Unit tests for ddb. These tests work by using to mock erlcloud_httpc . There are two classes of test : input...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/test/erlcloud_ddb_tests.erl
erlang
Unit tests for ddb. Input tests verify that different function args produce the desired JSON request. An input test list provides a list of funs and the JSON that is expected to result. Output tests verify that the http response produces the correct return from the fun. An output test lists provides a list of re...
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_ddb_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_ddb.hrl"). These tests work by using to mock erlcloud_httpc . There are two classes of test : input and output . -define(...
0ca7452818afae3e87e8629dbefe3a56ec732b94fc1f87637a137f9bcc1d0e24
JeremS/prose
core.cljc
(ns ^{:author "Jeremy Schoffen" :doc " Api providing generic compilation utilities. "} fr.jeremyschoffen.prose.alpha.compilation.core (:require [net.cgrand.macrovich :as macro :include-macros true] [fr.jeremyschoffen.prose.alpha.document.lib :as lib]) #?(:cljs (:import [goog.string StringBuffer]))) ...
null
https://raw.githubusercontent.com/JeremS/prose/618b3174bbe70cd2d0a1e68baa449201b52f2801/src/main/fr/jeremyschoffen/prose/alpha/compilation/core.cljc
clojure
---------------------------------------------------------------------------------------------------------------------- Basic compilation emit! mechanism ---------------------------------------------------------------------------------------------------------------------- -----------------------------------------------...
(ns ^{:author "Jeremy Schoffen" :doc " Api providing generic compilation utilities. "} fr.jeremyschoffen.prose.alpha.compilation.core (:require [net.cgrand.macrovich :as macro :include-macros true] [fr.jeremyschoffen.prose.alpha.document.lib :as lib]) #?(:cljs (:import [goog.string StringBuffer]))) ...
ddc27540c30a74a1814b971c17e2c2cfd62adbddcfd78ab4b66f74817aa6a7de
nikita-volkov/rerebase
Mem.hs
module System.Mem ( module Rebase.System.Mem ) where import Rebase.System.Mem
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/System/Mem.hs
haskell
module System.Mem ( module Rebase.System.Mem ) where import Rebase.System.Mem
f4c99c895e016fb5ce52939fb68afdf587f87334f85625ede61e8ed548f33c13
sneerteam/sneer
keys.clj
(ns sneer.keys (:import [sneer.crypto.impl KeysImpl])) (def ^:private ^KeysImpl keys-impl (KeysImpl.)) (defn create-prik [] (.createPrivateKey keys-impl)) (defn create-puk [^bytes rep] (.createPublicKey keys-impl rep)) (defn from-hex [^String hex] (.createPublicKey keys-impl hex)) (defn ->puk [^String rep]...
null
https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/sneer/keys.clj
clojure
(ns sneer.keys (:import [sneer.crypto.impl KeysImpl])) (def ^:private ^KeysImpl keys-impl (KeysImpl.)) (defn create-prik [] (.createPrivateKey keys-impl)) (defn create-puk [^bytes rep] (.createPublicKey keys-impl rep)) (defn from-hex [^String hex] (.createPublicKey keys-impl hex)) (defn ->puk [^String rep]...
afcb06b9fa8e3ec0e82ead7a8e52ee17dda6d352d443be57dc2f0e2e0f4708ac
dmjio/stripe
ApplicationFee.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RebindableSyntax # {-# LANGUAGE RankNTypes #-} module Web.Stripe.Test.ApplicationFee where import Test.Hspec import Web.Stripe.Test.Prelude import Web.Stripe.ApplicationFee import Data.Either applicationFeeTests :: StripeSpec applicationFeeTests stripe = do describe "Ap...
null
https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-tests/tests/Web/Stripe/Test/ApplicationFee.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE RebindableSyntax # module Web.Stripe.Test.ApplicationFee where import Test.Hspec import Web.Stripe.Test.Prelude import Web.Stripe.ApplicationFee import Data.Either applicationFeeTests :: StripeSpec applicationFeeTests stripe = do describe "Application Fee tests" $ do it "Succesfully fails to retrieve...
ada675390d2a73b648ea738c815184fe1102bf2c650b53f43003e6e6f8c6c825
winks/multiplex
gfx.clj
(ns multiplex.gfx (:require [multiplex.config :as config] [multiplex.util :as util])) (defn read-image "returns a BufferedImage from a filename" [filename] (with-open [r (java.io.FileInputStream. filename)] (javax.imageio.ImageIO/read r))) (defn image-size "returns width and height of ...
null
https://raw.githubusercontent.com/winks/multiplex/79e6e64f4cf8d6c9eaeceb5119b73ecaaa60e47f/src/multiplex/gfx.clj
clojure
(ns multiplex.gfx (:require [multiplex.config :as config] [multiplex.util :as util])) (defn read-image "returns a BufferedImage from a filename" [filename] (with-open [r (java.io.FileInputStream. filename)] (javax.imageio.ImageIO/read r))) (defn image-size "returns width and height of ...
e88000fc6d403fa63aca11251d7fef727ec5235905bd7fa3eee2cc54b9ea4553
rescript-lang/syntax
printtyp.ml
(**************************************************************************) (* *) (* OCaml *) (* *) and ,...
null
https://raw.githubusercontent.com/rescript-lang/syntax/75124cc4fab93f0b8555f0eb922457da31a6451a/compiler-libs-406/printtyp.ml
ocaml
************************************************************************ OCaml ...
and , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Ctype open Format open Longident open Path open Asttypes open Types open Btype open Outcometree let r...
210d8b43a85d264dbed0098189d89b317a97d045684a9ad17ad91a75d9af9530
andersfugmann/amqp-client
rpc_test.ml
open Amqp open Thread let uniq s = Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s let req_queue = (uniq "test.rpc") let start_server channel = let handler (content, body) = let i = int_of_string body in return (content, (string_of_int (i * i))) in Queue.declare channel ...
null
https://raw.githubusercontent.com/andersfugmann/amqp-client/2932a69510af550e9e156ed479f4fca7daee31cc/async/test/rpc_test.ml
ocaml
open Amqp open Thread let uniq s = Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s let req_queue = (uniq "test.rpc") let start_server channel = let handler (content, body) = let i = int_of_string body in return (content, (string_of_int (i * i))) in Queue.declare channel ...
d48ba7b9180e36aeb78d3980e9681ba492eb27cf02c7090eff64c825be5dceef
2600hz-archive/whistle
hotornot_listener.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 , VoIP INC %%% @doc %%% Rater whapp; send me a DID, get a rate back %%% @end Created : 3 May 2011 by < > %%%------------------------------------------------------------------- -module(hotornot_listener). -behav...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/hotornot/src/hotornot_listener.erl
erlang
------------------------------------------------------------------- @doc Rater whapp; send me a DID, get a rate back @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API ===========================...
@author < > ( C ) 2011 , VoIP INC Created : 3 May 2011 by < > -module(hotornot_listener). -behaviour(gen_listener). -export([start_link/0, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, handle_event/2 ,terminate/2, code_change/3]). -include("hotornot.hrl"). -define(SERVER,...
6ec7a1e7133feca2aefd3a177b34d129aaff20cf16d8b233424d882466c3a6fc
haskus/haskus-system
Mode.hs
# LANGUAGE RecordWildCards # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # -- | Display mode (resolution, refresh rate, etc.) module Haskus.System.Linux.Graphics.Mode ( Mode(..) , ModeType(..) , ModeTypes , ModeFlag(..) , ModeFlags , showMode -- * Low level , from...
null
https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/System/Linux/Graphics/Mode.hs
haskell
| Display mode (resolution, refresh rate, etc.) * Low level | Display mode | Show ModeFlag | Show mode
# LANGUAGE RecordWildCards # # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # module Haskus.System.Linux.Graphics.Mode ( Mode(..) , ModeType(..) , ModeTypes , ModeFlag(..) , ModeFlags , showMode , fromStructMode , toStructMode ) where import Haskus.Binary.BitFiel...
5eb4a437f7162455cf37ee5b4270a702ceff13727ed01865fae290afef3cd8c8
izgzhen/z3-encoding
SMTR.hs
# LANGUAGE UndecidableInstances # module Z3.Base.SMTR where import Z3.Monad import Z3.Base.Language import Z3.Base.Class newtype SMTR m e a = SMTR { unSMTR :: SMT m e => m e AST } mkBiOp :: (AST -> AST -> m e AST) -> SMTR m e a -> SMTR m e b -> SMTR m e c mkBiOp op a b = SMTR $ do a' <- unSMTR a b' <- unSMT...
null
https://raw.githubusercontent.com/izgzhen/z3-encoding/e7538f6e38e716dae1dc178b1d9fc218d96a9625/src/Z3/Base/SMTR.hs
haskell
XXX: magic number
# LANGUAGE UndecidableInstances # module Z3.Base.SMTR where import Z3.Monad import Z3.Base.Language import Z3.Base.Class newtype SMTR m e a = SMTR { unSMTR :: SMT m e => m e AST } mkBiOp :: (AST -> AST -> m e AST) -> SMTR m e a -> SMTR m e b -> SMTR m e c mkBiOp op a b = SMTR $ do a' <- unSMTR a b' <- unSMT...
6138f89028a2ed36851ee83e272214aaf6b793faaf9eeffc06a945bb66140fe0
mzp/coq-ide-for-ios
functional_principles_types.mli
open Names open Term val generate_functional_principle : (* do we accept interactive proving *) bool -> (* induction principle on rel *) types -> (* *) sorts array option -> (* Name of the new principle *) (identifier) option -> (* the compute functions to use *) constant array -> (* We prove ...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/plugins/funind/functional_principles_types.mli
ocaml
do we accept interactive proving induction principle on rel Name of the new principle the compute functions to use We prove the nth- principle The tactic to use to make the proof w.r the number of params
open Names open Term val generate_functional_principle : bool -> types -> sorts array option -> (identifier) option -> constant array -> int -> (constr array -> int -> Tacmach.tactic) -> unit val compute_new_princ_type_from_rel : constr array -> sorts array -> types -> types exception No_graph_f...
885fa39a6ef45fb0933a413b21f2103e2c0167c4cfdf7a2bf357f321d9852f4c
archambaultv/sexpresso
Parse.hs
-- | Module : Data . SExpresso . Copyright : © 2019 License : 0BSD -- Maintainer : < > -- Stability : experimental -- -- This module re-exports everything from " Data . SExpresso . . Generic " , " Data . SExpresso . . " and " Data . SExpresso . . Location " . module Dat...
null
https://raw.githubusercontent.com/archambaultv/sexpresso/b252fe2b3d7703d62cf0d65579949960f83cd7ef/src/Data/SExpresso/Parse.hs
haskell
| Stability : experimental This module re-exports everything from
Module : Data . SExpresso . Copyright : © 2019 License : 0BSD Maintainer : < > " Data . SExpresso . . Generic " , " Data . SExpresso . . " and " Data . SExpresso . . Location " . module Data.SExpresso.Parse ( module Data.SExpresso.Parse.Generic, module Data.SExpr...
46cf1d6c86468692bbdee154803a2b3003839bf155b0c70566ecb202e506a38f
mhuebert/maria
static.clj
(ns maria.static (:require [cljs-static.page :as page] [cljs-static.shadow :as shadow])) (defn index [] (page/root "Maria" {:meta {:viewport "width=device-width, initial-scale=1"} :styles [{:href "/trusted.css"}] :body [:div#maria-index] :scripts/b...
null
https://raw.githubusercontent.com/mhuebert/maria/39440293967777982645c9a88a3fc97bdc509baa/editor/src/maria/static.clj
clojure
(ns maria.static (:require [cljs-static.page :as page] [cljs-static.shadow :as shadow])) (defn index [] (page/root "Maria" {:meta {:viewport "width=device-width, initial-scale=1"} :styles [{:href "/trusted.css"}] :body [:div#maria-index] :scripts/b...
758a995be3ac6334081bcd8a9905f8f985231114458071830a894816a8ed3f8f
vraid/earthgen
require.rkt
#lang racket (provide require/provide) (require (for-syntax racket/syntax)) (define-syntax (require/provide stx) (syntax-case stx () [(_ paths ...) #'(begin (require paths ...) (provide (all-from-out paths ...)))]))
null
https://raw.githubusercontent.com/vraid/earthgen/208ac834c02208ddc16a31aa9e7ff7f91c18e046/package/vraid/require.rkt
racket
#lang racket (provide require/provide) (require (for-syntax racket/syntax)) (define-syntax (require/provide stx) (syntax-case stx () [(_ paths ...) #'(begin (require paths ...) (provide (all-from-out paths ...)))]))
909d191484deaefb0947a23b00ae1b6b93617d243dea2cab87ded29e623bf5e3
racket/deinprogramm
info.rkt
#lang info (define name "DeinProgramm") (define tools '("sdp/private/sdp-langs.rkt" "DMdA/private/DMdA-langs.rkt")) (define tool-icons '(("logo-small.png" "deinprogramm") ("dmda-logo.png" "deinprogramm"))) (define tool-names '("DeinProgramm SDP" "DeinProgramm DMdA")) (define tool-urls '("/" "/")) (define compile-om...
null
https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm/deinprogramm/info.rkt
racket
#lang info (define name "DeinProgramm") (define tools '("sdp/private/sdp-langs.rkt" "DMdA/private/DMdA-langs.rkt")) (define tool-icons '(("logo-small.png" "deinprogramm") ("dmda-logo.png" "deinprogramm"))) (define tool-names '("DeinProgramm SDP" "DeinProgramm DMdA")) (define tool-urls '("/" "/")) (define compile-om...
12ec7a7580d1b9303fbf8ff160eadb74c5702706e93dd8b46fc486ccaf248859
dmitryvk/sbcl-win32-threads
wxs.lisp
;;;; Generate WiX XML Source, from which we eventually generate the .MSI This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The s...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tools-for-build/wxs.lisp
lisp
Generate WiX XML Source, from which we eventually generate the .MSI more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. XML generation GUID generation Apparently this willy-nilly regeneration...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (defvar *indent-level* 0) (defvar *sbcl-source-root* (truename (merge-pathnames (make-pathname :directory (list :relat...
5683f23c77c47f3ade568b258c8bd09629c6f7a04aa9ffd1517499e1f4f45439
ndaniels/MRFy
LazySearchModel.hs
# LANGUAGE ScopedTypeVariables , BangPatterns , MultiParamTypeClasses , RankNTypes , NamedFieldPuns , ExistentialQuantification # # OPTIONS_GHC -Wall -fno - warn - name - shadowing # module LazySearchModel ( CCost , CCosted(..), unCCosted, ccostOf , History(..), unHistory, hcons, emptyHistory, hist...
null
https://raw.githubusercontent.com/ndaniels/MRFy/9b522d991a9bf98a6690f791dc92ad6fe675115c/LazySearchModel.hs
haskell
------------------------------------------------------ Preamble -------- Starting from a good initial state, we generate a sequence of successor states using random numbers. A new state may be "useful" or "useless". A useful state becomes the starting point for a new search; a useless state is eventually discarded....
# LANGUAGE ScopedTypeVariables , BangPatterns , MultiParamTypeClasses , RankNTypes , NamedFieldPuns , ExistentialQuantification # # OPTIONS_GHC -Wall -fno - warn - name - shadowing # module LazySearchModel ( CCost , CCosted(..), unCCosted, ccostOf , History(..), unHistory, hcons, emptyHistory, hist...
4e1eeffd1076138d80a98dcad56f40bd2b51aa9a5b7e7ae39be934f599e85806
cooldaemon/ermlia
ermlia_mock_node.erl
@author < > [ / ] @copyright 2008 %% @doc This module is mock node. Copyright 2008 %% 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 ...
null
https://raw.githubusercontent.com/cooldaemon/ermlia/fa5f8acf5965893b33f405de048e6d570d4aba53/test/ermlia_mock_node.erl
erlang
@doc This module is mock node. 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 spe...
@author < > [ / ] @copyright 2008 Copyright 2008 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ermlia_mock_node). -behaviour(udp_server). -include("udp_server.hrl"). -export([start_link/1, stop/0])....
2633ecae75bb81bd553e0363da3bf708028ec35a82ac0b96887054079a7ba624
tategakibunko/jingoo
jg_stub.ml
( c ) 2012 - by License : see LICENSE jg_stub.ml Copyright (c) 2012 - by Masaki WATANABE License: see LICENSE *) open Jg_utils let func_table : (string, Jg_types.tvalue) Hashtbl.t = Hashtbl.create 20 let func_path ~namespace ~func_name = spf "%s.%s" namespace func_name ;; let add_func ~name...
null
https://raw.githubusercontent.com/tategakibunko/jingoo/1ed8f036c8f37294f282fe147f767bbd11a5386d/src/jg_stub.ml
ocaml
( c ) 2012 - by License : see LICENSE jg_stub.ml Copyright (c) 2012 - by Masaki WATANABE License: see LICENSE *) open Jg_utils let func_table : (string, Jg_types.tvalue) Hashtbl.t = Hashtbl.create 20 let func_path ~namespace ~func_name = spf "%s.%s" namespace func_name ;; let add_func ~name...
ddbbdb5ba6547aedfd48932db8ef41e0a2f99beb9ec092b2abf1bdecbbb9e17a
master/ejabberd
ejabberd_system_monitor.erl
%%%------------------------------------------------------------------- %%% File : ejabberd_system_monitor.erl Author : < > %%% Description : Ejabberd watchdog Created : 21 Mar 2007 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne %%% %%% This program is free software; you can redistr...
null
https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/ejabberd_system_monitor.erl
erlang
------------------------------------------------------------------- File : ejabberd_system_monitor.erl Description : Ejabberd watchdog This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful,...
Author : < > Created : 21 Mar 2007 by < > ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Founda...
03f57862de0072c9e3d8fc44d7610a55f30749ce86ada0ea831686b6014eedd8
tsurucapital/franz
Client.hs
# LANGUAGE LambdaCase , OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE DeriveFunctor # {-# LANGUAGE BangPatterns #-} # LANGUAGE TypeFamilies # module Database.Franz.Client ( FranzPath(..) , fromFranzPath , toFranzPath , defaultPort , Connection , withConnection , connect , disconnect , St...
null
https://raw.githubusercontent.com/tsurucapital/franz/6894defd76d9be45af5abf59e2325baae109bef6/src/Database/Franz/Client.hs
haskell
# LANGUAGE BangPatterns # The protocol Client Server - | ---- Archive prefix ---> | Mounts P if possible - | <--- apiVersion -------- | -- RawRequest i p --- > | -- RawRequest j q --- > | - | ---- RawRequest k r ---> | - | <--- ResponseInstant i - | - | <--- result for p ----- | - Response...
# LANGUAGE LambdaCase , OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE DeriveFunctor # # LANGUAGE TypeFamilies # module Database.Franz.Client ( FranzPath(..) , fromFranzPath , toFranzPath , defaultPort , Connection , withConnection , connect , disconnect , StreamName(..) , Query(..) ,...
c4706625d5c1db5626959b0c34587e17c343ec8876cdf48630271daef155f9fe
maximedenes/native-coq
sign.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/sign.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file defines types and combina...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Created by out of names...
01dffbdae8737397a88a2389234e08c9b897afd732ef5b675bae88f3d43a58e5
tolysz/prepare-ghcjs
Environment.hs
{-# LANGUAGE Safe #-} # LANGUAGE CPP # ----------------------------------------------------------------------------- -- | -- Module : System.Environment Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability :...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/System/Environment.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | Module : System.Environment License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable Miscellaneous information about the system environm...
# LANGUAGE CPP # Copyright : ( c ) The University of Glasgow 2001 module System.Environment ( getArgs, getProgName, getExecutablePath, getEnv, lookupEnv, setEnv, unsetEnv, withArgs, withProgName, getEnvironment, ) where import Foreign import Fo...
b6edfba4c859141478b403e04325affe8163d9ed3715f7e71511608592a5214b
denibertovic/denv
Options.hs
{-# LANGUAGE OverloadedStrings #-} module Denv.Options where import RIO import qualified RIO.Text as T import Data.Semigroup ((<>)) import Data.Version (showVersion) import Denv.Types import Denv.Aws.Types import Options.Applicative import Paths_denv (version) data DenvArgs = DenvArgs { denvCommand :: Command ,...
null
https://raw.githubusercontent.com/denibertovic/denv/86a3d612d8207daad75ad38a1711ad048e8f6113/src/Denv/Options.hs
haskell
# LANGUAGE OverloadedStrings #
module Denv.Options where import RIO import qualified RIO.Text as T import Data.Semigroup ((<>)) import Data.Version (showVersion) import Denv.Types import Denv.Aws.Types import Options.Applicative import Paths_denv (version) data DenvArgs = DenvArgs { denvCommand :: Command , debug :: Bool } data Command ...
337a231e3eef8875fddcddba82d07e984dab464d7c6d3b4d8b93f95fc0a8e904
arttuka/reagent-material-ui
dialog_actions.cljs
(ns reagent-mui.material.dialog-actions "Imports @mui/material/DialogActions as a Reagent component. Original documentation is at -ui/api/dialog-actions/ ." (:require [reagent.core :as r] ["@mui/material/DialogActions" :as MuiDialogActions])) (def dialog-actions (r/adapt-react-class (.-default MuiDi...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/dialog_actions.cljs
clojure
(ns reagent-mui.material.dialog-actions "Imports @mui/material/DialogActions as a Reagent component. Original documentation is at -ui/api/dialog-actions/ ." (:require [reagent.core :as r] ["@mui/material/DialogActions" :as MuiDialogActions])) (def dialog-actions (r/adapt-react-class (.-default MuiDi...
3fe85fd7089f24fb021dec5c3a962710f00c0318304e70a567af0aa90230d066
Dexterminator/clj-templates
github_data.clj
(ns clj-templates.github-data (:require [org.httpkit.client :as http] [environ.core :refer [env]] [taoensso.timbre :as timbre] [cheshire.core :as json] [clojure.spec.alpha :as s] [clj-templates.specs.common :as c] [clj-templates.util.template :as...
null
https://raw.githubusercontent.com/Dexterminator/clj-templates/4d1fdbf40bdb833c6420f4e4b9eb1bc0299be7f7/src/clj/clj_templates/github_data.clj
clojure
(ns clj-templates.github-data (:require [org.httpkit.client :as http] [environ.core :refer [env]] [taoensso.timbre :as timbre] [cheshire.core :as json] [clojure.spec.alpha :as s] [clj-templates.specs.common :as c] [clj-templates.util.template :as...
f77d1ee039aa577be535da63856b405c61282272adf62adf4e5b58d933238fe3
kovyl2404/cg_mon
cg_mon_reader.erl
-module(cg_mon_reader). -author("Viacheslav V. Kovalev"). %% API -export([ start_link/4, read_meter/2, read_meter/3 ]). -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2 ]). %%%===============================================================...
null
https://raw.githubusercontent.com/kovyl2404/cg_mon/d8c3f460d39b91e6d86926479ae9b67a55e03cfc/src/cg_mon_reader.erl
erlang
API =================================================================== Api functions ===================================================================
-module(cg_mon_reader). -author("Viacheslav V. Kovalev"). -export([ start_link/4, read_meter/2, read_meter/3 ]). -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2 ]). start_link(ProvidedResource, KeyValueSources, SingleValueSources, FullCg...
864d11aa5a1dd96c7c4c21acab522de470ddc4fb04b75723300e7b7ccb3a331c
nachivpn/mt
b1.erl
-module (b1). f1() -> "" + 1. f2() -> 1 + "".
null
https://raw.githubusercontent.com/nachivpn/mt/fcffbcb770cfe0b19c189e6c8ce2ccab61062195/test/bad/b1.erl
erlang
-module (b1). f1() -> "" + 1. f2() -> 1 + "".
40895dcc0daf0a95ba71c35731e25c44050524d638ca3a405a9bd68746c54cb6
clojure-interop/aws-api
AmazonPersonalizeEventsAsyncClientBuilder.clj
(ns com.amazonaws.services.personalizeevents.AmazonPersonalizeEventsAsyncClientBuilder "Fluent builder for AmazonPersonalizeEventsAsync. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.personalizeeven...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.personalizeevents/src/com/amazonaws/services/personalizeevents/AmazonPersonalizeEventsAsyncClientBuilder.clj
clojure
(ns com.amazonaws.services.personalizeevents.AmazonPersonalizeEventsAsyncClientBuilder "Fluent builder for AmazonPersonalizeEventsAsync. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.personalizeeven...
84b72ed69b44dc02ef0049663ab93c321081339040995576c35a24c49b4d7750
wardle/pc4
build.clj
(ns build (:require [clojure.tools.build.api :as b])) (def lib 'com.eldrix.pc4/rsdb) (def version (format "0.1.%s" (b/git-count-revs nil))) (def class-dir "target/classes") (def jar-basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-lib-%s.jar" (name lib) version)) (defn clean [_] ...
null
https://raw.githubusercontent.com/wardle/pc4/d7c8a9513b085210b18eaac1f9fda3150bcb6fac/pc4-rsdb/build.clj
clojure
(ns build (:require [clojure.tools.build.api :as b])) (def lib 'com.eldrix.pc4/rsdb) (def version (format "0.1.%s" (b/git-count-revs nil))) (def class-dir "target/classes") (def jar-basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-lib-%s.jar" (name lib) version)) (defn clean [_] ...
bd2cfcebe8270064e6878c20bab682d22579b6d06ea9b7b67c9cbcf5b1b9124f
samrocketman/home
lowry-landscape-painter.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Landscape Painter script for GIMP 2.4 Original author : ; ; Tags: photo, artistic ; ; Author statement: ; ; A GIMP script-fu to generate a painted look to a ; landscape photo. Sometimes provides an interesting ; effect on portraits ...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/lowry-landscape-painter.scm
scheme
The GIMP -- an image manipulation program Tags: photo, artistic Author statement: A GIMP script-fu to generate a painted look to a landscape photo. Sometimes provides an interesting effect on portraits and animal shots. Creates a top layer set to Darken Only mode and then blurs it. Varying the blur radi...
Copyright ( C ) 1995 and Landscape Painter script for GIMP 2.4 Original author : Distributed by Gimp FX Foundry project Created on 4/12/2006 for v.2.2.8 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundati...
3e6c76c0c3cb8270b2d61762fe15a341b3184b1914329d366c9e77564c12b45d
skrah/minicaml
test29.ml
Example from 's " Modern Compiler Implementation in ML " , translated to . to Caml. *) (* Structural types: no type mismatch *) type arrtype1 = int array type arrtype2 = int array let arr1 : arrtype1 = ([0] ** 10 : arrtype2)
null
https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/test/test29.ml
ocaml
Structural types: no type mismatch
Example from 's " Modern Compiler Implementation in ML " , translated to . to Caml. *) type arrtype1 = int array type arrtype2 = int array let arr1 : arrtype1 = ([0] ** 10 : arrtype2)
2429a743d8f8c610121259837b9474e332a752cbafc65f306d3c7928fa23fd25
erlang-ls/erlang_ls
hover_docs_caller.erl
-module(hover_docs_caller). -export([ local_call_no_args/0 , local_call_with_args/0 , remote_call_multiple_clauses/0 , implicit_funs/0 ]). local_call_no_args() -> local_call(). local_call_with_args() -> local_call(dummy_arg1, dummy_arg2). remote_call_multiple_clauses() -> hover...
null
https://raw.githubusercontent.com/erlang-ls/erlang_ls/d975ac79224cf1745d6737101cf12ecfb48f8ce8/apps/els_lsp/priv/code_navigation/src/hover_docs_caller.erl
erlang
@doc An edoc hover item
-module(hover_docs_caller). -export([ local_call_no_args/0 , local_call_with_args/0 , remote_call_multiple_clauses/0 , implicit_funs/0 ]). local_call_no_args() -> local_call(). local_call_with_args() -> local_call(dummy_arg1, dummy_arg2). remote_call_multiple_clauses() -> hover...
84c6c3767b387782db5c38a1f33c70c48c875be73f66d40c9c57e222702aebd0
softlab-ntua/bencherl
sms_utils_test.erl
-*- coding : utf-8 -*- Note that , without the UTF line above and with pre - R17 Erlang versions , sent % text is garbled due to a wrong encoding. Copyright ( C ) 2013 - 2014 % This file is part of the Ceylan Erlang library . % % This library is free software: you can redistribute it and/or m...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/utils/sms_utils_test.erl
erlang
text is garbled due to a wrong encoding. This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License or any later version. You can also redistribute it and/or modify it under the terms of the This library is distributed in the hope th...
-*- coding : utf-8 -*- Note that , without the UTF line above and with pre - R17 Erlang versions , sent Copyright ( C ) 2013 - 2014 This file is part of the Ceylan Erlang library . the GNU General Public License , as they are published by the Free Software Foundation , either version 3 of ...
96eff5e9fae8d071f1560acaece9d4ba732e5cc142503bea33a951728f450117
sebsheep/elm2node
Type.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Elm.Compiler.Type ( Type(..) , RT.Context(..) , toDoc , DebugMetadata(..) , Alias(..) , Union(..) , encode , decoder , encodeMetadata ) where import qualified Data.Name as Name import qualified AST.Source as Src import qualified Js...
null
https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Elm/Compiler/Type.hs
haskell
# LANGUAGE OverloadedStrings # JSON for TYPE JSON for PROGRAM
# OPTIONS_GHC -Wall # module Elm.Compiler.Type ( Type(..) , RT.Context(..) , toDoc , DebugMetadata(..) , Alias(..) , Union(..) , encode , decoder , encodeMetadata ) where import qualified Data.Name as Name import qualified AST.Source as Src import qualified Json.Decode as D import qualified Jso...
402c3916a4d3446bce80ec3ff59e39fe62a855a1861293fb115bf2ee065787e4
vehicle-lang/vehicle
Verifier.hs
module Vehicle.Verify.Verifier ( verifiers, ) where import Vehicle.Verify.Core import Vehicle.Verify.Verifier.Interface import Vehicle.Verify.Verifier.Marabou (marabouVerifier) verifiers :: VerifierIdentifier -> Verifier verifiers = \case Marabou -> marabouVerifier
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/ca99b8da9e5aabde2c94b758bb4141fbe53ebed5/vehicle/src/Vehicle/Verify/Verifier.hs
haskell
module Vehicle.Verify.Verifier ( verifiers, ) where import Vehicle.Verify.Core import Vehicle.Verify.Verifier.Interface import Vehicle.Verify.Verifier.Marabou (marabouVerifier) verifiers :: VerifierIdentifier -> Verifier verifiers = \case Marabou -> marabouVerifier
e1c3fb4bfe18568b30f1cb8d9b180f01dd86fd0692caed967e7e3a7c630d4f3a
ghc/testsuite
TH_NestedSplices_Lib.hs
# LANGUAGE TemplateHaskell # module TH_NestedSplices_Lib where import Language.Haskell.TH spliceExpr :: String -> Q Exp -> Q Exp spliceExpr s e = [| (s, $e) |] declareFun :: String -> Q [Dec] declareFun s = do { n <- newName s ; d <- funD n [clause [] (normalB [| 22 |]) []] ; return [d] } ...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/TH_NestedSplices_Lib.hs
haskell
# LANGUAGE TemplateHaskell # module TH_NestedSplices_Lib where import Language.Haskell.TH spliceExpr :: String -> Q Exp -> Q Exp spliceExpr s e = [| (s, $e) |] declareFun :: String -> Q [Dec] declareFun s = do { n <- newName s ; d <- funD n [clause [] (normalB [| 22 |]) []] ; return [d] } ...
e087f78d6af3345d5dc40bb7c94d45600397a71e1c12b136953adfcef73800d7
synrc/nitro
action_ui.erl
-module(action_ui). -author('Andrey Martemyanov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). -define(T(T), wf_event:target(T)). render_action(#focus{target=T}) -> ["window.setTimeout(function(){var x=",?T(T),"; x && x.focus();},4);"].
null
https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/actions/action_ui.erl
erlang
-module(action_ui). -author('Andrey Martemyanov'). -include_lib("nitro/include/nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). -define(T(T), wf_event:target(T)). render_action(#focus{target=T}) -> ["window.setTimeout(function(){var x=",?T(T),"; x && x.focus();},4);"].
383905958662d75289ee7528e821472e0cd73923ef14d6622b99267723a4f7fe
postspectacular/devart-codefactory
shared.clj
(ns codefactory.handlers.shared (:require [codefactory.config :as config])) (defn api-route [& args] (apply str config/api-prefix (interpose \/ args))) (defn server-url [{:keys [scheme server-name server-port]} & more] (let [base (str (name scheme) "://" server-name) base (if (or (== 80 server-port...
null
https://raw.githubusercontent.com/postspectacular/devart-codefactory/9bccdc10e58fa4861a69767e9ae4be0bb8d7f650/src-gae/codefactory/handlers/shared.clj
clojure
(ns codefactory.handlers.shared (:require [codefactory.config :as config])) (defn api-route [& args] (apply str config/api-prefix (interpose \/ args))) (defn server-url [{:keys [scheme server-name server-port]} & more] (let [base (str (name scheme) "://" server-name) base (if (or (== 80 server-port...
c083a539475aed5e3c840544b4dc30e1622233582ae6e34cab6f101f2ab6042c
GaloisInc/semmc
Stochastic.hs
# LANGUAGE TypeApplications # module Stochastic ( tests ) where import qualified Data.Maybe as D import qualified Test.Tasty as T import qualified Test.Tasty.HUnit as T import qualified SemMC.Toy.Tests as TT import qualified SemMC.Util as U tests :: U.HasLogCfg => T.TestTree tests = T.testGroup "Synthesis" [ rightV...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-toy/tests/Stochastic.hs
haskell
# LANGUAGE TypeApplications # module Stochastic ( tests ) where import qualified Data.Maybe as D import qualified Test.Tasty as T import qualified Test.Tasty.HUnit as T import qualified SemMC.Toy.Tests as TT import qualified SemMC.Util as U tests :: U.HasLogCfg => T.TestTree tests = T.testGroup "Synthesis" [ rightV...
48bb7f0af7a3d0543222801f902a47added3f9b28519b795201dfbebd0bb5037
abdulapopoola/SICPBook
Ex2.48.scm
#lang planet neil/sicp ;; helpers (define (make-segment v1 v2) (cons v1 v2)) (define (start-segment segment) (car segment)) (define (end-segment segment) (cdr segment))
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.48.scm
scheme
helpers
#lang planet neil/sicp (define (make-segment v1 v2) (cons v1 v2)) (define (start-segment segment) (car segment)) (define (end-segment segment) (cdr segment))
67599ff05bac1ccd84244268dcbe95f8cc2e5491b157b55445c281002793ea9b
AllAlgorithms/racket
distance-between-points.rkt
#lang racket (provide distance) returns distance of 2 points in a cartesian graph . ;; takes coordinate pairs as arguments, example: '(x . y) (define (distance point1 point2) (sqrt (+ (sqr (- (car point1) (car point2))) (sqr (- (cdr point1) (cdr point2))))))
null
https://raw.githubusercontent.com/AllAlgorithms/racket/46b2a4b963b0536351273ee8068f58fed4884dde/algorithms/computational-geometry/distance-between-points.rkt
racket
takes coordinate pairs as arguments, example: '(x . y)
#lang racket (provide distance) returns distance of 2 points in a cartesian graph . (define (distance point1 point2) (sqrt (+ (sqr (- (car point1) (car point2))) (sqr (- (cdr point1) (cdr point2))))))
4e451cecb1eb561906ac27f664d782d5ce20b749d6b801d67214ae84f8352168
xsc/claro
cache.cljc
(ns claro.middleware.cache "A middleware to allow caching of resolution results." (:require [claro.data.protocols :as p] [claro.engine :as engine] [claro.runtime.impl :as impl] [claro.middleware [intercept :refer [wrap-intercept]] [observe :refer [wrap-o...
null
https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/middleware/cache.cljc
clojure
(ns claro.middleware.cache "A middleware to allow caching of resolution results." (:require [claro.data.protocols :as p] [claro.engine :as engine] [claro.runtime.impl :as impl] [claro.middleware [intercept :refer [wrap-intercept]] [observe :refer [wrap-o...
192ffce4d7de4570339bda9f5a9c3bb52c6ab7adea56d8811b729382a50a4980
tezos/tezos-mirror
test_list_basic.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/83da643f3bc9f5c00505393070a23d2b0323a6d0/src/lib_lwt_result_stdlib/test/test_list_basic.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...