_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
d6d3bbcbe81ed0a09ffbf93f7657871c31f6a6b83908fbf470f3855352950294
IvanMartinez/oauth2_webmachine
access_token_test.erl
@author %% @doc Tests for access_code resource. %% @todo Add tests for timed-out grants. -module(access_token_test). -include_lib("eunit/include/eunit.hrl"). -define(AUTHORIZATION_CODE_URL, ":8000/authorization_code"). -define(ACCESS_TOKEN_URL, ":8000/access_token"). -define(STATE, "State"). -define(CLIENT1_ID, "...
null
https://raw.githubusercontent.com/IvanMartinez/oauth2_webmachine/d4b358167bdb2129989a4bec71753ab75044ad69/test/access_token_test.erl
erlang
@doc Tests for access_code resource. @todo Add tests for timed-out grants. =================================================================== Setup functions =================================================================== =================================================================== Tests ===========...
@author -module(access_token_test). -include_lib("eunit/include/eunit.hrl"). -define(AUTHORIZATION_CODE_URL, ":8000/authorization_code"). -define(ACCESS_TOKEN_URL, ":8000/access_token"). -define(STATE, "State"). -define(CLIENT1_ID, "ConfidentialClient"). -define(CLIENT1_SECRET, "Secret1"). -define(CLIENT1_URI, ""...
032602e1ef1fd441afcc3a83ad01598fff7e6e4f665125e58ce8d02b00988100
tomprimozic/type-systems
test_infer.ml
open OUnit2 open Expr type result = | OK of string | Fail of string option let fail = Fail None let error msg = Fail (Some msg) let test_cases = [ Hindley - Milner ("id", OK "forall[a] a -> a"); ("one", OK "int"); ("x", error "variable x not found"); ("let x = x in x", error "variable x not found"); ("let x...
null
https://raw.githubusercontent.com/tomprimozic/type-systems/4403586a897ee94cb8f0de039aeee8ef1ecef968/extensible_rows2/test_infer.ml
ocaml
records variants
open OUnit2 open Expr type result = | OK of string | Fail of string option let fail = Fail None let error msg = Fail (Some msg) let test_cases = [ Hindley - Milner ("id", OK "forall[a] a -> a"); ("one", OK "int"); ("x", error "variable x not found"); ("let x = x in x", error "variable x not found"); ("let x...
7f4473c1fdd5122f76bca4ae2a8b3e0715acf111f8af12ddba4d54b96c4adb42
clojure/core.typed
typed.clj
(ns clojure.core.typed.test.ctyp-294.typed {:lang :core.typed :core.typed {:experimental #{:infer-vars :infer-locals}}} (:require [clojure.core.typed :as t] [clojure.core.typed.test.ctyp-294.untyped :as u])) #(inc (t/ann-form u/bar t/Int)) #(inc (u/foo 1)) # _ # ( inc ...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/ctyp_294/typed.clj
clojure
[t/Str :-> t/Str]
(ns clojure.core.typed.test.ctyp-294.typed {:lang :core.typed :core.typed {:experimental #{:infer-vars :infer-locals}}} (:require [clojure.core.typed :as t] [clojure.core.typed.test.ctyp-294.untyped :as u])) #(inc (t/ann-form u/bar t/Int)) #(inc (u/foo 1)) # _ # ( inc ...
85e37a612a794b7eb3dbf616dd2c955d5df18e23006fe3317d62b45e93831aac
Clozure/ccl-tests
loop12.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Nov 17 08:47:43 2002 Contains : Tests for ALWAYS , NEVER , THEREIS (in-package :cl-test) ;;; Tests of ALWAYS clauses (deftest loop.12.1 (loop for i in '(1 2 3 4) always (< i 10)) t) (deftest loop.12.2 (loop for i in nil always nil) t) (deftest loo...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/loop12.lsp
lisp
-*- Mode: Lisp -*- Tests of ALWAYS clauses Tests of NEVER Tests of THEREIS Error cases Non-error cases Test that explicit calls to macroexpand in subforms are done in the correct environment
Author : Created : Sun Nov 17 08:47:43 2002 Contains : Tests for ALWAYS , NEVER , THEREIS (in-package :cl-test) (deftest loop.12.1 (loop for i in '(1 2 3 4) always (< i 10)) t) (deftest loop.12.2 (loop for i in nil always nil) t) (deftest loop.12.3 (loop for i in '(a) always nil) nil) (de...
7202555f020c88bcfd72266699ca0090a99a4925554c72c8c2c07e5d71f2f02a
bjorng/wings
e3d_util.erl
%% %% e3d_util.erl -- %% %% Utility functions. %% Copyright ( c ) 2002 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% $ I d : , v 1.2 2006/08/02 20:25:02 antoneos Exp $ %% -module(e3d_util). -export([m...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/e3d/e3d_util.erl
erlang
e3d_util.erl -- Utility functions. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. Functions for meshes stored in indexed format (verts/faces lists) replace indices with values replace values with indices re-indexes th...
Copyright ( c ) 2002 - 2011 $ I d : , v 1.2 2006/08/02 20:25:02 antoneos Exp $ -module(e3d_util). -export([make_uniq/2, indexed_to_raw/2, raw_to_indexed/1]). -import(lists, [reverse/1,sort/1,sublist/2,sublist/3,all/2]). make_uniq([Name|_]=Ns0, Max) when is_atom(Name) -> Ns1 = [atom_to_list(N) || N <-...
eab624a96f6cd5de07b4bc62f56d651e43dc8d7101ae9b63ba2f2cfae0ba39b6
georgefst/monpad
OS.hs
module OS (conf, keyUnknown) where import Control.Monad.Reader import Control.Monad.State import Data.Either import Data.Foldable import Data.Int import Data.Traversable import Optics hiding (Empty) import Data.ByteString.Char8 qualified as BS import Data.Coerce (coerce) import Data.List.NonEmpty qualified as NE impo...
null
https://raw.githubusercontent.com/georgefst/monpad/34f39fd31e04d9005cb8720c3f8339ce8d9a119e/haskell/linux/OS.hs
haskell
module OS (conf, keyUnknown) where import Control.Monad.Reader import Control.Monad.State import Data.Either import Data.Foldable import Data.Int import Data.Traversable import Optics hiding (Empty) import Data.ByteString.Char8 qualified as BS import Data.Coerce (coerce) import Data.List.NonEmpty qualified as NE impo...
7a66dc112f53e6a45e438e3b085bd257d4ea2ee88f1d54193a9cc137d19dc8d8
quark-lang/quark
Remover.hs
module Core.Macro.Initializing.Remover where import Core.Parser.AST import Data.Maybe remove :: Expression -> Maybe Expression remove (Node (Identifier "defm") _) = Nothing remove x = Just x runMacroRemover :: [Expression] -> [Expression] runMacroRemover = mapMaybe remove
null
https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Macro/Initializing/Remover.hs
haskell
module Core.Macro.Initializing.Remover where import Core.Parser.AST import Data.Maybe remove :: Expression -> Maybe Expression remove (Node (Identifier "defm") _) = Nothing remove x = Just x runMacroRemover :: [Expression] -> [Expression] runMacroRemover = mapMaybe remove
2ef0b8db0bab39ee1e8a0ca1317fd1110bd45bbe14d5ae36bb1915d2867b0c3f
clojurecademy/clojurecademy
user.cljs
(ns clojurecademy.controller.user (:require [clojurecademy.util :as util] [clojurecademy.validation :as validation])) (defn- update-account-details-validations [data] [[(validation/fullname? (:fullname data)) "Full Name is invalid."] [(validation/email? (:email data)) "Email is invalid."] [(va...
null
https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/cljs/clojurecademy/controller/user.cljs
clojure
(ns clojurecademy.controller.user (:require [clojurecademy.util :as util] [clojurecademy.validation :as validation])) (defn- update-account-details-validations [data] [[(validation/fullname? (:fullname data)) "Full Name is invalid."] [(validation/email? (:email data)) "Email is invalid."] [(va...
3cea07eeb492a8f8a222061795adecdab23bdd55a51a688b1ec6af516a6d3e84
KestrelInstitute/Specware
Double.lisp
(defpackage :Specware) (defpackage :Double) (defpackage :DoubleAux) (defpackage :DoubleInt) (defpackage :IntDouble) (defpackage :Complex) (defpackage :String-Spec) (defpackage :Integer-Spec) (in-package :Double) (setq SpecToLisp::SuppressGeneratedDefuns (append '("Double::the-double" "Double::zero" ...
null
https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Library/Unvetted/Handwritten/Lisp/Double.lisp
lisp
unary, from a domain type D to a codomain type C, where D can be a product, e.g. A * B, in which case the op can be "viewed" as being that is a tuple. The naming convention is that the variant that takes just name with a "-n" suffix. The define-compiler-macro definitions are necessary to get efficient arithmetic....
(defpackage :Specware) (defpackage :Double) (defpackage :DoubleAux) (defpackage :DoubleInt) (defpackage :IntDouble) (defpackage :Complex) (defpackage :String-Spec) (defpackage :Integer-Spec) (in-package :Double) (setq SpecToLisp::SuppressGeneratedDefuns (append '("Double::the-double" "Double::zero" ...
c21f28dd77ddc87fab889d826820a76fde48780b6e204137ac01ab45d246f492
mks-m/wower
tcp_server.erl
-module(tcp_server). -author('Jesse E.I. Farmer <>'). -behavior(gen_server). -export([init/1, code_change/3, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -export([accept_loop/1]). -export([start/3]). -define(TCP_OPTIONS, [binary, inet, {packet, 0}, {active, false}]). -record(server_state, { po...
null
https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/common/src/tcp_server.erl
erlang
Let the server spawn a new process and replace this loop with the echo loop, to avoid blocking To be more robust we should be using spawn_link and trapping exits These are just here to suppress warnings.
-module(tcp_server). -author('Jesse E.I. Farmer <>'). -behavior(gen_server). -export([init/1, code_change/3, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -export([accept_loop/1]). -export([start/3]). -define(TCP_OPTIONS, [binary, inet, {packet, 0}, {active, false}]). -record(server_state, { po...
7dce1a4e4bd27b5bdd81bf05f5cfefbf38f91e505bb299423a1820ec6e5711c4
xxyzz/SICP
Exercise_2_88.rkt
#lang racket/base (define table (make-hash)) (define (put op type item) (hash-set! table (list op type) item)) (define (get op type) (hash-ref! table (list op type) null)) (define (attach-tag type-tag contents) (cond [(and (eq? type-tag 'scheme-number) (number? contents)) contents] ...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.5_Systems_with_Generic_Operations/Exercise_2_88.rkt
racket
internal procedures representation of poly representation of terms and term lists interface to rest of the system '(polynomial x) y + 1 x^2 + (y + 1)x + 5 x^2 + 2x + 1 '(polynomial x) x^100 + x^2 - 2x
#lang racket/base (define table (make-hash)) (define (put op type item) (hash-set! table (list op type) item)) (define (get op type) (hash-ref! table (list op type) null)) (define (attach-tag type-tag contents) (cond [(and (eq? type-tag 'scheme-number) (number? contents)) contents] ...
ba248121d5f6cbb9893e1c879ec11c88f7e23c4b83d48450e2395b1c6e236d3c
penpot/penpot
collapse.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.collapse (:require [app.common.pages.helpers :as cph] [app.common.uuid :as...
null
https://raw.githubusercontent.com/penpot/penpot/cc18f84d620e37d8efafc5bed1bcdbe70ec23c1e/frontend/src/app/main/data/workspace/collapse.cljs
clojure
Copyright (c) KALEIDOS INC --- Shape attrs (Layers Sidebar)
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.data.workspace.collapse (:require [app.common.pages.helpers :as cph] [app.common.uuid :as uuid] [potok.core :as ptk])) ...
30c1ab6dd88e00388564956b27f52687a06f3fba1906b836e2e7b8dfddf8f3bf
kapok-lang/kapok
kapok_ast.erl
ast handlings , which include expanding / translating -module(kapok_ast). -export([compile/2, add_uses/2, build_namespace/6, format_error/1, empty_doc/0]). -import(kapok_scanner, [token_text/1, token_meta/1]). -import(kapok_parser, [is_plain_dot/1, plain_dot_name/1]). -import(ka...
null
https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_ast.erl
erlang
Sometimes we need to expand a top level macro call to a list of ast, in this case, we need to handle the returned all these asts in sequence. namespace build the previous namespace before entering the new namespace require use Check whether the default namespaces is used. Add them if they are not declared in use...
ast handlings , which include expanding / translating -module(kapok_ast). -export([compile/2, add_uses/2, build_namespace/6, format_error/1, empty_doc/0]). -import(kapok_scanner, [token_text/1, token_meta/1]). -import(kapok_parser, [is_plain_dot/1, plain_dot_name/1]). -import(ka...
82889b6319fe9b42cd8d84e3045cae910809560bde0210c15f251717f158db6d
NorfairKing/sydtest
Hedgehog.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Test.Syd.Hedgehog (fromHedgehogGroup) where import Control.Concurrent.STM import Control.Exception import Control.Monad import qual...
null
https://raw.githubusercontent.com/NorfairKing/sydtest/61f8cc4bc010140cca1613b9aee173c87e3cfe9d/sydtest-hedgehog/src/Test/Syd/Hedgehog.hs
haskell
| Import an Hedgehog 'Hedgehog.Group' as a Sydtest 'Test.Syd.Spec'. The reasoning behind this function is that, eventhough migration from hedgehog to sydtest is usually very simple, you might depend on certain libraries beyond your control that still use hedgehog. In that case you want to be able to still use th...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Test.Syd.Hedgehog (fromHedgehogGroup) where import Control.Concurrent.STM import Control.Exception import Control.Monad import qual...
fc624aa9d31c4ee8db85b8ac16de568020f7720fa23aaf9a16cfc3ee5957ee8d
astrada/ocaml-extjs
Edit.ml
let text_field xtype name fieldLabel : Ext_form_field_Text.configs Js.t = {| xtype = Js.string xtype; name = Js.string name; fieldLabel = Js.string fieldLabel; |} let _ = let view : Ext_window_Window.configs Js.t = {| title = Js.string "Edit User"; autoShow = Js.bool true; |} in vie...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/examples/account_manager/app/view/user/Edit.ml
ocaml
let text_field xtype name fieldLabel : Ext_form_field_Text.configs Js.t = {| xtype = Js.string xtype; name = Js.string name; fieldLabel = Js.string fieldLabel; |} let _ = let view : Ext_window_Window.configs Js.t = {| title = Js.string "Edit User"; autoShow = Js.bool true; |} in vie...
d1b9d1d90a6ab5f4364e6ac83e1c7e2576d3cca38d6a2c134802bc52d74850e3
polyfy/polylith
interface_deps.clj
(ns polylith.clj.core.deps.interface-deps (:require [clojure.string :as str] [polylith.clj.core.common.interface :as common])) (defn brick-namespace [namespace] (let [idx (str/index-of namespace ".")] (if (nil? idx) namespace (subs namespace 0 idx)))) (defn existing-interface? [interfa...
null
https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/deps/src/polylith/clj/core/deps/interface_deps.clj
clojure
(ns polylith.clj.core.deps.interface-deps (:require [clojure.string :as str] [polylith.clj.core.common.interface :as common])) (defn brick-namespace [namespace] (let [idx (str/index-of namespace ".")] (if (nil? idx) namespace (subs namespace 0 idx)))) (defn existing-interface? [interfa...
dd2d2fef9cde21dea45b17540c06d7f0643aaa908366bead5c9956148eb75e9c
ktakashi/sagittarius-scheme
%3a159.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; srfi/%3a159.scm - Combinator Formatting ;;; Copyright ( c ) 2020 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Red...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/sitelib/srfi/%253a159.scm
scheme
coding : utf-8 ; -*- srfi/%3a159.scm - Combinator Formatting Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list ...
Copyright ( c ) 2020 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (srfi :159) (export :all) (import (srf...
2bcd46480fdbccb69277d12fffed441dd2c3abae8dc870a97cb49faa78b71f82
onedata/op-worker
paths_cache.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module is responsible for man...
null
https://raw.githubusercontent.com/onedata/op-worker/6b4eae12034bb469f49200c32c32f37c9179ac6a/src/modules/fslogic/caches/paths_cache.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module is responsible for management of paths caches. @end ------------------------------------------------------------------- API RPC API ========================...
@author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(paths_cache). -author("Jakub Kudzia"). -author("Michał Stanisz"). -include("global_definitions.hrl"). -include("modules/fslogic/fslogic_common.hrl"). -include_lib("ctool/include/errors.hrl"...
dd9566937d81a1f073efc27d52268b144a80a5ea3fdde4b85f93320bae3db530
meredydd/expect-call
internal.clj
(ns org.senatehouse.expect-call.internal (:use clojure.test [clojure.core.match :only (match)])) (def ^:dynamic *disable-interception* false) (defn my-report "Disable interception, to prevent looping if the test reporting code uses a function we're intercepting. Also put accurate file and line information i...
null
https://raw.githubusercontent.com/meredydd/expect-call/d03f23e19446ed3ec6e3910ab776cd260b910f55/src/org/senatehouse/expect_call/internal.clj
clojure
It matched the next explicit expectation. Run it. It didn't match an explicit expectation - did it match a :more or :never? Nope - it's just wrong Format: {function closure, function closure} Format: ([function closure fn-name arg-form], [function closure arg-form], ...) If we haven't used up all our c...
(ns org.senatehouse.expect-call.internal (:use clojure.test [clojure.core.match :only (match)])) (def ^:dynamic *disable-interception* false) (defn my-report "Disable interception, to prevent looping if the test reporting code uses a function we're intercepting. Also put accurate file and line information i...
a56669326f66b678beb2aeccaf02168cff2a800aae7f0405a4abe8333dbd3da0
parsimony-ide/parsimony
automaton_test.clj
(ns parsimony.automaton-test (:require [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]] [ubergraph.core :as uber] [parsimony.common-test :refer [is-not]] [parsimony.rdag.automaton :as automaton] ...
null
https://raw.githubusercontent.com/parsimony-ide/parsimony/1744e8b4a921a50dfbd0815499cf3af1059590c8/test/parsimony/automaton_test.clj
clojure
- This stuff just tests the edge cases in the BRICs syntax itself basic unicode escaped non-reserved chars catchall unescaped dash dash inside charclass escaped dot unescaped lsquarebrace is not ok escaped lsquarebrace unescaped rsquarebrace is ok escaped rsquarebrace empty language any string weird ch...
(ns parsimony.automaton-test (:require [clojure.pprint :refer [pprint]] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]] [ubergraph.core :as uber] [parsimony.common-test :refer [is-not]] [parsimony.rdag.automaton :as automaton] ...
ea48fcc409c70fda27053a11aa5e32e0379d9a8ceb1f8c5f5d310cccdc43c1be
reiddraper/knockbox
resolvable.clj
;; ------------------------------------------------------------------- Copyright ( c ) 2011 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 may obtai...
null
https://raw.githubusercontent.com/reiddraper/knockbox/ed22221759d0d3dbe4f1b1f83355e95e945de729/src/knockbox/resolvable.clj
clojure
------------------------------------------------------------------- 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 permission...
Copyright ( c ) 2011 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 (ns kno...
cb0ac09d2788e7949a90931c14c056ca2509335fd3ea071409572d904364eb74
techwhizbang/bluecollar
redis.clj
(ns bluecollar.redis (:require [taoensso.carmine :as redis-client] [taoensso.carmine.connections :as redis-conn] [bluecollar.keys-and-queues :as keys-qs]) (:refer-clojure :exclude [pop])) (defrecord RedisConnection [pool settings]) (def pool-and-settings (atom nil)) (def config (atom {:ho...
null
https://raw.githubusercontent.com/techwhizbang/bluecollar/10269249a686c4e92daefd7cecd6c7c5934db81c/src/bluecollar/redis.clj
clojure
(ns bluecollar.redis (:require [taoensso.carmine :as redis-client] [taoensso.carmine.connections :as redis-conn] [bluecollar.keys-and-queues :as keys-qs]) (:refer-clojure :exclude [pop])) (defrecord RedisConnection [pool settings]) (def pool-and-settings (atom nil)) (def config (atom {:ho...
e1f0141fda42cc712b858b44c29ad4b60f434b95a0b4162aa7b47a7434733de2
overtone/overtone
buffer.clj
(ns ^{:doc "Useful synths for manipulating buffers" :author "Sam Aaron"} overtone.synth.buffer (:use [overtone.core])) (defsynth mono-player "Plays a single channel audio buffer." [buf 0 rate 1.0 start-pos 0.0 loop? 0 amp 1 pan 0 out-bus 0] (out out-bus (* amp (pan2 ...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/synth/buffer.clj
clojure
(ns ^{:doc "Useful synths for manipulating buffers" :author "Sam Aaron"} overtone.synth.buffer (:use [overtone.core])) (defsynth mono-player "Plays a single channel audio buffer." [buf 0 rate 1.0 start-pos 0.0 loop? 0 amp 1 pan 0 out-bus 0] (out out-bus (* amp (pan2 ...
1b7fbacf7f6c8f4fc16f47b1d66387b7302dbf9f2c7702ec64a7e9a81d0c7ea1
neovimhaskell/nvim-hs
OS.hs
module Neovim.OS ( isWindows, getSocketUnix ) where import Data.Streaming.Network (getSocketUnix) isWindows :: Bool isWindows = False
null
https://raw.githubusercontent.com/neovimhaskell/nvim-hs/8bc6786f17eb9b8425b7946e18a77a4cb3b0e3ba/srcos/unix/Neovim/OS.hs
haskell
module Neovim.OS ( isWindows, getSocketUnix ) where import Data.Streaming.Network (getSocketUnix) isWindows :: Bool isWindows = False
5431b00fb77a4259c9bdf00424e30698be50b87a0542ec87fec78598ef3276e3
gergoerdi/tandoori
class-monorestrict.hs
default () genericLength :: Num a => [b] -> a genericLength [] = 0 test xs = let len = genericLength xs --in (len, len) in len len = genericLength [] -- test' = (len, len)
null
https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/class-monorestrict.hs
haskell
in (len, len) test' = (len, len)
default () genericLength :: Num a => [b] -> a genericLength [] = 0 test xs = let len = genericLength xs in len len = genericLength []
199d31e6b4f09a74fb224b7f936ba180110808d32f40f6eaedebce5689c0b23e
Functional-AutoDiff/STALINGRAD
saddle-RF-larceny.scm
(define (run) (let* ((start (list 1.0 1.0)) (f (lambda (x1 y1 x2 y2) (d- (d+ (sqr x1) (sqr y1)) (d+ (sqr x2) (sqr y2))))) (x1*-y1* (multivariate-argmin-R (lambda (x1-y1) (multivariate-max-F (lambda (x2-y2) (f (car x1-y1) (car (cdr x1-y1)) (car x2-y2) (car (cdr x2-y2)))) start)) start...
null
https://raw.githubusercontent.com/Functional-AutoDiff/STALINGRAD/8a782171872d5caf414ef9f8b9b0efebaace3b51/examples/examples2009/saddle-RF-larceny.scm
scheme
(define (run) (let* ((start (list 1.0 1.0)) (f (lambda (x1 y1 x2 y2) (d- (d+ (sqr x1) (sqr y1)) (d+ (sqr x2) (sqr y2))))) (x1*-y1* (multivariate-argmin-R (lambda (x1-y1) (multivariate-max-F (lambda (x2-y2) (f (car x1-y1) (car (cdr x1-y1)) (car x2-y2) (car (cdr x2-y2)))) start)) start...
69e8b6e82498ea4929fb4cfdc777ffc6cac411ecf72c4cc5db74832d10159c3a
appleshan/cl-http
cl-http-70-21.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Patch file for CL - HTTP version 70.21 ;;; Reason: Function TCP::CRLF-STREAM-COPY-INTO-STRING: handle empty input buffer windows. ;;; Function URL::%MERGE-RELATIVE-URL: new. ;;; Function (CLOS:METHOD URL:NAME-STRING (HTTP...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-21.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Reason: Function TCP::CRLF-STREAM-COPY-INTO-STRING: handle empty input buffer windows. Function URL::%MERGE-RELATIVE-URL: new. Function (CLOS:METHOD URL:NAME-STRING (HTTP::SERVER)): new. Function HTTP::PARSE-LOCATION-HEADER: handle rela...
Patch file for CL - HTTP version 70.21 Written by JCMa , 11/18/99 19:55:33 while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod with Open Genera 2.0 , Genera 8.5 , Documentation Database 440.12 , Logical Pathnames Translation Files NEWEST , CLIM 72.0 , Genera CLIM...
12a6067ca310cf9843e33f8ebbc13b01fd42352b1474d388da9ca1f7e1c8374e
ocaml-gospel/gospel
RingBuffer.mli
(**************************************************************************) (* *) VOCaL -- A Verified OCaml Library (* *) Copyright ( ...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/1065be4011079c6d709680be58fec18654fdd715/test/vocal/RingBuffer.mli
ocaml
************************************************************************ (as described in file LICE...
VOCaL -- A Verified OCaml Library Copyright ( c ) 2020 The VOCaL Project This software is free software , distributed under the MIT license type 'a buffer @ mutable model sequence : ' a sequence model capacity : integer...
60066298ff9726cae23561fc5508572aee7e4b2cbb2312947bbbb2138fc2c994
Helium4Haskell/helium
Irrefutable.hs
module Irrefutable where main = (f True (3,4), f False undefined) f :: Bool -> (Int, Int) -> Int f lookInside ~(x, y) = if lookInside then x else 0
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/correct/Irrefutable.hs
haskell
module Irrefutable where main = (f True (3,4), f False undefined) f :: Bool -> (Int, Int) -> Int f lookInside ~(x, y) = if lookInside then x else 0
23fc47f382aa11c88c97c48fdcc6b70328cb595f46ab1e868625f6e323a9a2bc
robert-strandh/SICL
type-inference.lisp
(cl:in-package #:cleavir-type-inference) (defun compute-initial-work-list (initial-instruction) (let ((result '())) (cleavir-ir:map-instructions-arbitrary-order (lambda (instruction) (unless (typep instruction 'cleavir-ir:enter-instruction) (push instruction result))) initial-instructio...
null
https://raw.githubusercontent.com/robert-strandh/SICL/343b47d083ffc3db4aaa00ed8c5e79b23143a62a/Code/Cleavir/Type-inference/type-inference.lisp
lisp
Given how few enter instructions are usually around, using a hash table is a bit overkill. value is bottom, which will remain if it never returns normally. Now find all return instructions. join the values at each with whatever is already known. Finally, make it a bit more presentable.
(cl:in-package #:cleavir-type-inference) (defun compute-initial-work-list (initial-instruction) (let ((result '())) (cleavir-ir:map-instructions-arbitrary-order (lambda (instruction) (unless (typep instruction 'cleavir-ir:enter-instruction) (push instruction result))) initial-instructio...
07f2b1d6097bcdb5915aea306e8c022bdd74394a617173e3f11f5bbba3c6b3d8
iokasimov/pandora
Controlflow.hs
module Pandora.Paradigm.Controlflow (module Exports) where import Pandora.Paradigm.Controlflow.Pipeline as Exports import Pandora.Paradigm.Controlflow.Observable as Exports import Pandora.Paradigm.Controlflow.Effect as Exports
null
https://raw.githubusercontent.com/iokasimov/pandora/4ff22ccf1c9824e3072d2ea0163b923798528b3a/Pandora/Paradigm/Controlflow.hs
haskell
module Pandora.Paradigm.Controlflow (module Exports) where import Pandora.Paradigm.Controlflow.Pipeline as Exports import Pandora.Paradigm.Controlflow.Observable as Exports import Pandora.Paradigm.Controlflow.Effect as Exports
484ee7ed7b2acd2fa65264f7074102f2df8c7afbb33620db9236ac2191da9fc7
facebook/infer
AnnotatedSignature.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/d2e59e6df24858729129debcc2813ae3915c4f0a/infer/src/nullsafe/AnnotatedSignature.ml
ocaml
get nullability of method's return type given its annotations and information about its params if any param is annotated with propagates nullable, the return nullability is also nullable We already know it is nullable - lets not overwrite the origin if any params is propagates nullable, the return type can be on...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
17872d81acc6b3c416170073779e4aaa4b69260e253cc5810463eb901d6d7fca
mattmundell/nightshade
abbrev.lisp
;;; Word abbreviation mode. (in-package "ED") #[ Word Abbreviation Word abbreviation provides a way to speed the typing of frequently used words and phrases. When in `Abbrev' mode, typing a word delimiter causes the previous word to be replaced with its expansion if there is one currently defined. The expansion fo...
null
https://raw.githubusercontent.com/mattmundell/nightshade/7a67f9eac96414355de1463ec251b98237cb4009/src/ed/abbrev.lisp
lisp
Word abbreviation mode. Defining Abbrevs immediately after prefix-mark. Deleting. collective deletion provides a clean slate from which to pretty format pretty format "~A<tab>(~A)<tab>\""
(in-package "ED") #[ Word Abbreviation Word abbreviation provides a way to speed the typing of frequently used words and phrases. When in `Abbrev' mode, typing a word delimiter causes the previous word to be replaced with its expansion if there is one currently defined. The expansion for an abbrev may be any strin...
980f022b8c3e8dd337a44cd60feaaaa310b498d0ad1da372754e4a6364fa29c2
robert-strandh/Cluffer
edit-protocol.lisp
(cl:in-package #:cluffer-base) (defclass cluffer:buffer () ()) (defclass cluffer:line () ((%dock :initarg :dock :initform nil :accessor cluffer-internal:dock))) (defclass cluffer:cursor () ()) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Generic function LINE - COUNT . ;;; Return the number of li...
null
https://raw.githubusercontent.com/robert-strandh/Cluffer/4aad29c276a58a593064e79972ee4d77cae0af4a/Base/edit-protocol.lisp
lisp
Generic function ITEM-COUNT. Return the number of items in ENTITY. If ENTITY is a buffer, then the total number of items in the buffer is returned. IF ENTITY is a line, then the number of items in the line is returned. If ENTITY is a cursor that is currently attached to a line, the number of items of t...
(cl:in-package #:cluffer-base) (defclass cluffer:buffer () ()) (defclass cluffer:line () ((%dock :initarg :dock :initform nil :accessor cluffer-internal:dock))) (defclass cluffer:cursor () ()) Generic function LINE - COUNT . Return the number of lines in BUFFER . (defgeneric cluffer:line-count (buffer)) ...
474879780c9264040078cc58fb2911b5add1b77464a637706a41c7985d02ec1d
ryanpbrewster/haskell
bit_positions.hs
-- bit_positions.hs - Challenge Description : - - Given a number n and two integers p1,p2 determine if the bits in position p1 and p2 are the same or not . Positions p1 and p2 and 1 based . - Input sample : - - The first argument will be a text file containing a comma separated list of 3 integers , on...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/bit_positions.hs
haskell
bit_positions.hs
- Challenge Description : - - Given a number n and two integers p1,p2 determine if the bits in position p1 and p2 are the same or not . Positions p1 and p2 and 1 based . - Input sample : - - The first argument will be a text file containing a comma separated list of 3 integers , one list per line . E....
7bcf052136d496024630ec94705b858e0fe69b9a2af92dba6f50bdb7b5574fe5
overtone/overtone
piano.clj
(ns overtone.samples.piano (:use [overtone.core])) (def FREESOUND-PIANO-SAMPLES "Freesound ids and matching notes for all the loud samples in the MISStereoPiano pack" {148401 :BB5 148402 :BB6 148403 :B7 148404 :BB0 148405 :B5 148406 :B6 148407 :BB3 148408 :BB4 148423 :BB1 148424 :BB2 148425 :D1 148426 :C...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/samples/piano.clj
clojure
Silent buffer used to fill in the gaps.
(ns overtone.samples.piano (:use [overtone.core])) (def FREESOUND-PIANO-SAMPLES "Freesound ids and matching notes for all the loud samples in the MISStereoPiano pack" {148401 :BB5 148402 :BB6 148403 :B7 148404 :BB0 148405 :B5 148406 :B6 148407 :BB3 148408 :BB4 148423 :BB1 148424 :BB2 148425 :D1 148426 :C...
4c0cb41e4c8b269734e82f10c7d0123ee05f57827db30bc7ce7216e0d64e8a79
Clojure2D/clojure2d-examples
ch7_diffuse.clj
(ns rt-in-weekend.ch7-diffuse (:require [clojure2d.core :refer :all] [clojure2d.pixels :as p] [clojure2d.extra.utils :as u] [fastmath.vector :as v] [rt-in-weekend.ray :refer :all] [rt-in-weekend.hitable :refer :all] [rt-in-weekend.sphere :refer :...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/rt_in_weekend/ch7_diffuse.clj
clojure
(save img "results/rt-in-weekend/diffuse.jpg")
(ns rt-in-weekend.ch7-diffuse (:require [clojure2d.core :refer :all] [clojure2d.pixels :as p] [clojure2d.extra.utils :as u] [fastmath.vector :as v] [rt-in-weekend.ray :refer :all] [rt-in-weekend.hitable :refer :all] [rt-in-weekend.sphere :refer :...
f0884db54246d36cfe840a2143eb8640c36a5ba6951b5b4bf2437ff9794a8c1d
FranklinChen/hugs98-plus-Sep2006
State.hs
{-# OPTIONS -fallow-undecidable-instances #-} -- Search for -fallow-undecidable-instances to see why this is needed ----------------------------------------------------------------------------- -- | Module : Control . Monad . State Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Sc...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/mtl/Control/Monad/State.hs
haskell
# OPTIONS -fallow-undecidable-instances # Search for -fallow-undecidable-instances to see why this is needed --------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non...
Module : Control . Monad . State Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2001 State monads . ( < /~mpj/ > ) Advanced School of Functional Programming , 1995 . module Control.Monad.State ( MonadState(..), modify, gets, * The St...
a0ba6033fecf55d70dfafac948c1ad850f656f8810238d92221b52fd2785c60b
facebookarchive/pfff
unit_matcher.mli
Returns the testsuite for matcher/. To be concatenated by * the caller ( e.g. in / main_test.ml ) with other testsuites and * run via OUnit.run_test_tt * the caller (e.g. in pfff/main_test.ml ) with other testsuites and * run via OUnit.run_test_tt *) val unittest : OUnit.test val unittest: OUnit.t...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/matcher/unit_matcher.mli
ocaml
subsystems unittest
Returns the testsuite for matcher/. To be concatenated by * the caller ( e.g. in / main_test.ml ) with other testsuites and * run via OUnit.run_test_tt * the caller (e.g. in pfff/main_test.ml ) with other testsuites and * run via OUnit.run_test_tt *) val unittest : OUnit.test val unittest: OUnit.t...
f74ce6d28d2a55d35bff905cd735e9d3941507650678309283d58c8e4369a30c
aantron/bisect_ppx
html.mli
This file is part of Bisect_ppx , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) val output : to_directory:string -> title:string -> tab_size:int -> theme:[ `Light | `Dark | `Auto ] -> coverage_files:string list -> coverag...
null
https://raw.githubusercontent.com/aantron/bisect_ppx/71bc38d5ac3bd4eabf7c8562ef70d54355a3397d/src/report/html.mli
ocaml
This file is part of Bisect_ppx , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) val output : to_directory:string -> title:string -> tab_size:int -> theme:[ `Light | `Dark | `Auto ] -> coverage_files:string list -> coverag...
ed049b1ff8aef7b7c7394666c3d740974ba19aca2705818f78120532aff7dc2d
ocamllabs/opamfu
opamfuFormula.ml
* Copyright ( c ) 2013 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/ocamllabs/opamfu/bfb9f24cd624f0889a26afb979a856e547344391/lib/opamfuFormula.ml
ocaml
TODO: these should probably be inverses convert an expression to DNF fold_right is important to converge
* Copyright ( c ) 2013 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
777c46bbc0cbb22e9d3106250bb0c9e391cd6ab002a56cbc220ce06a84e42cc0
cojna/iota
SuffixArray.hs
{-# LANGUAGE BangPatterns #-} module Data.ByteString.SuffixArray where import Control.Monad import Control.Monad.ST import Data.Bits import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Coerce import Data.Function import Data.Int import qualified Data.Vector.Unboxed as U impo...
null
https://raw.githubusercontent.com/cojna/iota/f0f649300a5e30a52975add27d80b5641c596fb4/src/Data/ByteString/SuffixArray.hs
haskell
# LANGUAGE BangPatterns # # INLINE unLS # # INLINE unLS # # INLINE unLS # # INLINE unLS # # INLINE unLS # | filled with (-1) | the maximum alphabet
module Data.ByteString.SuffixArray where import Control.Monad import Control.Monad.ST import Data.Bits import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Coerce import Data.Function import Data.Int import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unbox...
65785dcd8700c5c45266f37410775bf3ddda162f19c1ad19fb276a23a2153039
Taneb/groups
Group.hs
{-# LANGUAGE CPP #-} # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # #if MIN_VERSION_base(4,12,0) # LANGUAGE TypeOperators # #endif module Data.Group where import Data.Monoid import Data.Semigroup.Commutative import Data.Ord import Data.List (unfoldr) #if MIN_VERSION_base...
null
https://raw.githubusercontent.com/Taneb/groups/dcc117787d09c10564809041939d0b1d61134a6e/src/Data/Group.hs
haskell
# LANGUAGE CPP # |A 'Group' is a 'Monoid' plus a function, 'invert', such that: @invert a \<> a == mempty@ |@'pow' a n == a \<> a \<> ... \<> a @ @ (n lots of a) @ If n is negative, the result is inverted. |An 'Abelian' group is a 'Group' that is also 'Commutative' | A 'Group' G is 'Cyclic' ...
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # #if MIN_VERSION_base(4,12,0) # LANGUAGE TypeOperators # #endif module Data.Group where import Data.Monoid import Data.Semigroup.Commutative import Data.Ord import Data.List (unfoldr) #if MIN_VERSION_base(4,7,0) import Data.Proxy #endif #if M...
8bec8efb1ffa96e71e5be505c6dfa27e9ff7c92e540896f090662051f9f2281b
UU-ComputerScience/uu-cco
EvalArithBool.hs
import CCO.ArithBool (eval) import CCO.Component (component, printer, ioWrap) import CCO.Tree (parser, Tree (fromTree, toTree)) import Control.Arrow (Arrow (arr), (>>>)) main = ioWrap $ parser >>> component toTree >>> component eval >>> arr fromTree >>> printer
null
https://raw.githubusercontent.com/UU-ComputerScience/uu-cco/cca433c8a6f4d27407800404dea80c08fd567093/uu-cco-examples/src/EvalArithBool.hs
haskell
import CCO.ArithBool (eval) import CCO.Component (component, printer, ioWrap) import CCO.Tree (parser, Tree (fromTree, toTree)) import Control.Arrow (Arrow (arr), (>>>)) main = ioWrap $ parser >>> component toTree >>> component eval >>> arr fromTree >>> printer
9c9b51ae8efefe9fcd879d3c5868196d57af8a1408e2f31259302bb72ddfc510
WorksHub/client
promotions.cljc
(ns wh.styles.promotions) (def object "promotions__object--3wc-3") (def preview__promotion "promotions__preview__promotion--2rii3") (def header "promotions__header--1wPQ5") (def show-hide "promotions__show-hide--253Zq") (def date "promotions__date--1L6eF") (def create-promotion "promotions__create-promotion--3zs0v") (d...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/styles/promotions.cljc
clojure
(ns wh.styles.promotions) (def object "promotions__object--3wc-3") (def preview__promotion "promotions__preview__promotion--2rii3") (def header "promotions__header--1wPQ5") (def show-hide "promotions__show-hide--253Zq") (def date "promotions__date--1L6eF") (def create-promotion "promotions__create-promotion--3zs0v") (d...
3ca951a15d3abe81b9cb2767091a407f63629a7cb40dec9796c54800e0ef41fb
racket/typed-racket
object-rep.rkt
#lang racket/base ;; Representation of "objects" --- these describe the ;; part of an environment that an expression accesses ;; See " Logical Types for Untyped Languages " pg.3 (require "../utils/utils.rkt" "fme-utils.rkt" racket/match "rep-utils.rkt" "../utils/identifier.rkt" ...
null
https://raw.githubusercontent.com/racket/typed-racket/22fac459edd39d5905734530e7c2eb6a11903a80/typed-racket-lib/typed-racket/rep/object-rep.rkt
racket
Representation of "objects" --- these describe the part of an environment that an expression accesses NOTE: key must be the verbose/expanded key! (see utils/prefab.rkt) path elements which do not correspond to a field within some type (currently just vector length PEs) lets not make the pe if we don't need to l...
#lang racket/base See " Logical Types for Untyped Languages " pg.3 (require "../utils/utils.rkt" "fme-utils.rkt" racket/match "rep-utils.rkt" "../utils/identifier.rkt" "core-rep.rkt" "free-variance.rkt" "../env/mvar-env.rkt" (for-syntax racket/...
2b71dd1de902ddac11ff80f4866328bf269abb89f101a4720feaa1242fa1dd69
barrucadu/dejafu
STM.hs
-- | -- Module : Control.Concurrent.Classy.STM Copyright : ( c ) 2016 License : MIT Maintainer : < > -- Stability : experimental -- Portability : non-portable -- -- Classy software transactional memory. module Control.Concurrent.Classy.STM ( module Control.Monad.STM.Class , module Contro...
null
https://raw.githubusercontent.com/barrucadu/dejafu/f805783398e2be60ebabb56fce9f23506b9d1879/concurrency/Control/Concurrent/Classy/STM.hs
haskell
| Module : Control.Concurrent.Classy.STM Stability : experimental Portability : non-portable Classy software transactional memory.
Copyright : ( c ) 2016 License : MIT Maintainer : < > module Control.Concurrent.Classy.STM ( module Control.Monad.STM.Class , module Control.Concurrent.Classy.STM.TVar , module Control.Concurrent.Classy.STM.TMVar , module Control.Concurrent.Classy.STM.TChan , module Control.Concurrent.Cla...
7e0cf045e5e5cc29d1b6392f46b40d21851cdc344d2f84d2c08257ac1abd1645
unison-code/unison
LiftRegs.hs
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
null
https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Import/LiftRegs.hs
haskell
TODO: update targets to work with new '--explicitcallregs' flag, then get rid of ExtractCallRegs pass (this pass should do all register lifting work). TODO: check that there should not be any 'orphan' after this pass TODO: how do we handle pre-assignments, in general?
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
33c5d145fa3c183b4436131bddd113cd0aa8d86172de6bdfec733e1a9df20b47
wuest/haskell-scotty-elm-ws-template
Opts.hs
{-# LANGUAGE OverloadedStrings #-} module Opts ( Options , getOpts , optVerbose , webPort , baseDir , dbUser , dbPass , dbHost , dbPort , dbName ) where import Prelude import System.Console.GetOpt ...
null
https://raw.githubusercontent.com/wuest/haskell-scotty-elm-ws-template/e6f3fcb076103ba72885171d38133a96462e4033/src/Opts.hs
haskell
# LANGUAGE OverloadedStrings #
module Opts ( Options , getOpts , optVerbose , webPort , baseDir , dbUser , dbPass , dbHost , dbPort , dbName ) where import Prelude import System.Console.GetOpt import System.Environment (getPr...
01068654aec702e396d4c3a629d3e852382b3179099b7c5a21a65d58f9f9070c
joinr/spork
events.clj
(ns spork.sim.events (:use [util.general :only [unfold generate]] [sim.data])) ;Events are descriptions of ways to compute new values from initial values. ;They are inputs to functions that consume such information to map an ;initial value, with a description of change, to a new value, with the change ;i...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/sim/backburner/events.clj
clojure
Events are descriptions of ways to compute new values from initial values. They are inputs to functions that consume such information to map an initial value, with a description of change, to a new value, with the change implemented (and the pending event removed), or with the change unimplemented (the pending eve...
(ns spork.sim.events (:use [util.general :only [unfold generate]] [sim.data])) Note - > this is basically a direct copy of the events.base from cljgui I 'm going to reconcile the two at some point ... (defn- emit-event "Auxillary function for parsing event specs in defevents/let-events, and turning...
de17aae6f72c102a1c61928a90c52a24ee3495a4df256f1d695bcbdef97f97dc
reborg/reclojure
transient_collection.clj
(ns reclojure.lang.protocols.transient-collection (:refer-clojure :exclude [conj])) (defprotocol TransientCollection (conj [coll val]) (persistent [coll]))
null
https://raw.githubusercontent.com/reborg/reclojure/c8aae4cc384d59262569cbc9c332e08619f292ef/src/reclojure/lang/protocols/transient_collection.clj
clojure
(ns reclojure.lang.protocols.transient-collection (:refer-clojure :exclude [conj])) (defprotocol TransientCollection (conj [coll val]) (persistent [coll]))
58b966483166f283ef71164efce3b9b3c2e72fbfb048ef5cfaba178d2f20a1f7
na4zagin3/satyrographos
libraries.ml
open Core open Satyrographos module Satysfi = Satyrographos_satysfi.Writer module StringMap = Map.Make(String) let name = "$libraries" let library_type_name = "library" let library_name_field_name = "name" let library_version_field_name = "version" let library_list_field_name = "list" let font_type_decl = [ `Typ...
null
https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/src/autogen/libraries.ml
ocaml
open Core open Satyrographos module Satysfi = Satyrographos_satysfi.Writer module StringMap = Map.Make(String) let name = "$libraries" let library_type_name = "library" let library_name_field_name = "name" let library_version_field_name = "version" let library_list_field_name = "list" let font_type_decl = [ `Typ...
44dab735201599e82b1cbd416ef5b15fcabae202fb735a79801931ef1c8ba3e9
o1-labs/ocamlbyexample
bench.ml
open Core open Core_bench let () = let _ = Random.init (* seed: *) 0 in let buffer_length = 100 in let rand_char _ = Random.int 256 |> char_of_int in let bytes_buffer = Bytes.init buffer_length ~f:rand_char in let hexstring = Hexstring.encode bytes_buffer in Command.run (Bench.make_command [ Bench.Tes...
null
https://raw.githubusercontent.com/o1-labs/ocamlbyexample/937284e168d84ec53acd4c58577bc26e1c556a73/book/chapters/libraries/core_bench/bench.ml
ocaml
seed:
open Core open Core_bench let () = let buffer_length = 100 in let rand_char _ = Random.int 256 |> char_of_int in let bytes_buffer = Bytes.init buffer_length ~f:rand_char in let hexstring = Hexstring.encode bytes_buffer in Command.run (Bench.make_command [ Bench.Test.create ~name:"encoding" (fun (...
b284b5c52a185cc59b6d7a4fdaea52f18c039740bd1829a467451f21160e7cf5
samrocketman/home
strflash.scm
(define (apply-strflash-effect img logo-layer bcolor npix scolor ecolor numframe) (let* ( (width (car (gimp-drawable-width logo-layer))) (height (car (gimp-drawable-height logo-layer))) (tmpLayer) (txtLayer) (newLayer) (nframe) (cnt) (sr) (sg) (sb) (er) (eg) (eb) (incr) (incg) ...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/strflash.scm
scheme
(define (apply-strflash-effect img logo-layer bcolor npix scolor ecolor numframe) (let* ( (width (car (gimp-drawable-width logo-layer))) (height (car (gimp-drawable-height logo-layer))) (tmpLayer) (txtLayer) (newLayer) (nframe) (cnt) (sr) (sg) (sb) (er) (eg) (eb) (incr) (incg) ...
8f2293bc5a52bff2848683e64222b378d131f0fb00c83b470b886788cd969bc0
pandoc/pandoc-lua-marshal
TableParts.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} | Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT Maintainer : > Marshaling / unmarshaling functions of types that are used exclusively with tables . Copyright : © 2021-202...
null
https://raw.githubusercontent.com/pandoc/pandoc-lua-marshal/e71315da1d377cf52cd94975c20ac04616c2d935/src/Text/Pandoc/Lua/Marshal/TableParts.hs
haskell
# LANGUAGE OverloadedStrings # * Constructors # SOURCE # # SOURCE # | Push Caption element | Peek Caption element @row_head_columns@, @head@, and @body@. @row_head_columns@, @head@, and @body@. | Add a value to the table at the top of the stack at a string-index.
# LANGUAGE LambdaCase # | Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT Maintainer : > Marshaling / unmarshaling functions of types that are used exclusively with tables . Copyright : © 2021-2023 Albert Krewinkel SPDX-License-Identi...
df7d66635ca1ab97eaf40859223e78d6e16178766d59c0d06d1e5faac3f276a8
russelldb/rabl
rabl_codec.erl
@author < > ( C ) 2017 , %%% @doc %%% encode/decode rabl messages %%% @end Created : 31 Jul 2017 by < > -module(rabl_codec). -compile(export_all). -spec encode(erlang:timestamp(), rabl_riak:bk(), binary()) -> {ok, binary()}. encode(Time, BK, BinObj) -> Bin = term_to_binary({Tim...
null
https://raw.githubusercontent.com/russelldb/rabl/9aa140ef5ec09959393adba5a98321b6df8323e1/src/rabl_codec.erl
erlang
@doc encode/decode rabl messages @end
@author < > ( C ) 2017 , Created : 31 Jul 2017 by < > -module(rabl_codec). -compile(export_all). -spec encode(erlang:timestamp(), rabl_riak:bk(), binary()) -> {ok, binary()}. encode(Time, BK, BinObj) -> Bin = term_to_binary({Time, BK, BinObj}), {ok, Bin}. -spec decode(bina...
963d1ebc5b33fc7ead60e31ca21d2c3563af3a75ebaa0a6b0876b81c0abd68ed
2600hz-archive/whistle
monitor_job.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2010 - 2011 , VoIP INC %%% @doc %%% Responsible for managing the monitoring application %%% @end Created : 11 Nov 2010 by < > %%%------------------------------------------------------------------- -module(monitor_job)....
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/monitor/src/monitor_job.erl
erlang
------------------------------------------------------------------- @doc Responsible for managing the monitoring application @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API ===================...
@author < > ( C ) 2010 - 2011 , VoIP INC Created : 11 Nov 2010 by < > -module(monitor_job). -behaviour(gen_server). -include("monitor_amqp.hrl"). -include("monitor_couch.hrl"). -import(logger, [format_log/3]). -import(props, [get_value/2, get_value/3]). -import(timer, [send_interval/2, cancel/1]). -impo...
cfc7b37f2fbd288052f7fc69bcacef05424e2ab0f75f1472bcc2d9c19e969315
aprolog-lang/aprolog
trie.ml
(* alphaProlog *) (* Tries (for namespaces) *) type ('a,'b) trie = Trie of ('b option ref * ('a,('a,'b) trie) Hashtbl.t);; let create i = Trie (ref None,Hashtbl.create i);; let rec add (Trie (vr,t)) l v = match l with [] -> vr := Some v | x::l -> if not(Hashtbl.mem t x) then Hashtbl.add t x (...
null
https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/trie.ml
ocaml
alphaProlog Tries (for namespaces)
type ('a,'b) trie = Trie of ('b option ref * ('a,('a,'b) trie) Hashtbl.t);; let create i = Trie (ref None,Hashtbl.create i);; let rec add (Trie (vr,t)) l v = match l with [] -> vr := Some v | x::l -> if not(Hashtbl.mem t x) then Hashtbl.add t x (create 1); add (Hashtbl.find t x) l v ;; ...
3bdd03243a9385f0940b27f5ff1a16f608ebac92d7ae11c7c0834f732740b255
naveensundarg/prover
code-for-lists2.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- ;;; File: code-for-lists2.lisp The contents of this file are subject to the Mozilla Public License ;;; Version 1.1 (the "License"); you may not use this file except in ;;; compliance with the License. You may obtain a copy of the License at ;;; / ;;; Softw...
null
https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/code-for-lists2.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*- File: code-for-lists2.lisp Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the speci...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is SNARK . The Initial Developer of the Original Code is SRI International . Portions created by the Initial Developer are Copyright ( C ) 1981 - 2011 . ...
0b382e775571f9e099cc48d58879fb4193b1361bedf6078e0900ac1e182115c9
theodormoroianu/SecondYearCourses
HaskellChurch_20210415162745.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415162745.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the first alternative cTrue :: C...
8c67c605845166b1b91df9d24bd33688870a5dad97bfa4d5d87774968f5af037
reasonml/reason
menhir_error_processor.ml
This file is an executable run at build time to generate a file called _ build / default / src / reason - parser / reason_parser_explain_raw.ml That generated file pattern - matches on the error codes that are related to e.g. accidentally using a reserved keyword as an identifier . Once we get those ...
null
https://raw.githubusercontent.com/reasonml/reason/3f433821d93bdc8f85677d4ee5d276ff6551c777/src/reason-parser/menhir_error_processor.ml
ocaml
We want to detect any state where an identifier is admissible. That way, we can assume that if a keyword is used and rejceted, the user was intending to put an identifier. Now we filter the list of all states and keep the interesting ones Produce a function that will be linked into the reason parser to recog...
This file is an executable run at build time to generate a file called _ build / default / src / reason - parser / reason_parser_explain_raw.ml That generated file pattern - matches on the error codes that are related to e.g. accidentally using a reserved keyword as an identifier . Once we get those ...
bbeea616cbe856214d646b344c8bef9382c9daaf0946a4fc35dbacaeb489e5ed
k0ral/imm
HTTP.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} -- | HTTP module abstracts over HTTP requests to the external world. -- This module follows the [ Handle pattern]( / posts/2018 - 03 - 08 - handle - pattern.html ) . -- > import quali...
null
https://raw.githubusercontent.com/k0ral/imm/eae96d96297aec0533bfcb88393827613e4235eb/src/lib/Imm/HTTP.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | HTTP module abstracts over HTTP requests to the external world. {{{ Imports }}} * Types | Handle to perform GET HTTP requests. * Primitives
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # This module follows the [ Handle pattern]( / posts/2018 - 03 - 08 - handle - pattern.html ) . > import qualified . HTTP as HTTP module Imm.HTTP ( module Imm.HTTP , module Network.HTTP.Client ) where import Imm.Logger hiding (H...
244f3cff95e9b75f2fe3b8c3294eee2c65575f379fc203ebfedb22ea4cdcaccb
1Jajen1/Brokkr
Client.hs
# LANGUAGE UndecidableInstances # module Client ( Client(..) , Joined ) where import Prelude hiding (init) import Hecs newtype Client = Client EntityId data Joined -- TODO Specialize
null
https://raw.githubusercontent.com/1Jajen1/Brokkr/5c128a47c7123e576b4e415048d58c2ab3f4a0aa/src/Client.hs
haskell
TODO Specialize
# LANGUAGE UndecidableInstances # module Client ( Client(..) , Joined ) where import Prelude hiding (init) import Hecs newtype Client = Client EntityId data Joined
7a7f8241e845f102f9fd2b2a8feefab26fef49d5490562542aea510d74285968
haskell-compat/base-compat
Data.Ratio.Compat.check.hs
# LANGUAGE NoImplicitPrelude , PackageImports # module Test where import "base-compat-batteries" Data.Ratio.Compat
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/check/check-hs/Data.Ratio.Compat.check.hs
haskell
# LANGUAGE NoImplicitPrelude , PackageImports # module Test where import "base-compat-batteries" Data.Ratio.Compat
eb5579e854cf5191a8c7d53b25c8755ca02a1054bd9950410e39f029986bd844
noelmarkham/learn-you-a-haskell-exercises
DistanceConversions.hs
module DistanceConversions ( yardsToFeet , feetToInches , inchesToCentimetres ) where -- Define yards to feet yardsToFeet :: Float -> Float yardsToFeet y = undefined -- Define feet to inches feetToInches :: Float -> Float feetToInches f = undefined -- Define inches to centimetres inchesToCentimetres :: Float -> Flo...
null
https://raw.githubusercontent.com/noelmarkham/learn-you-a-haskell-exercises/a663197be2c946b5d05beea8a881829e413d411c/DistanceConversions.hs
haskell
Define yards to feet Define feet to inches Define inches to centimetres
module DistanceConversions ( yardsToFeet , feetToInches , inchesToCentimetres ) where yardsToFeet :: Float -> Float yardsToFeet y = undefined feetToInches :: Float -> Float feetToInches f = undefined inchesToCentimetres :: Float -> Float inchesToCentimetres i = undefined
6ab44f702ee0be5a9565a2c2dd0006b19b38a90b42241d372c9dd74198b15a11
picrin-scheme/picrin
test.scm
(import (picrin base) (picrin test) (picrin control option)) (define phonebook '(("Bob" . "01788 665242") ("Fred" . "01624 556442") ("Alice" . "01889 985333") ("Jane" . "01732 187565"))) (define nums '((one . 1) (two . 2) (three . 3) (four . 19))) (define num-dict (alist->dictionary...
null
https://raw.githubusercontent.com/picrin-scheme/picrin/2af16bc88fbfca2efafd27ca9e5006d73c06f6fb/contrib/50.option/t/test.scm
scheme
(import (picrin base) (picrin test) (picrin control option)) (define phonebook '(("Bob" . "01788 665242") ("Fred" . "01624 556442") ("Alice" . "01889 985333") ("Jane" . "01732 187565"))) (define nums '((one . 1) (two . 2) (three . 3) (four . 19))) (define num-dict (alist->dictionary...
54965234699c8a69bbffae5e522cb542b7ec8d04f136e098d6ff33a909a50c04
slagyr/joodo
view_context.clj
(ns ^{:doc "This namespace contains logic that incorporates a var called *view-context* with the ring-handler."} joodo.middleware.view-context (:use [joodo.views :only (*view-context*)] [chee.util :only (->options)])) (defn wrap-view-context "Middleware that configures the *view-context* for rendering. ...
null
https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/joodo/src/joodo/middleware/view_context.clj
clojure
(ns ^{:doc "This namespace contains logic that incorporates a var called *view-context* with the ring-handler."} joodo.middleware.view-context (:use [joodo.views :only (*view-context*)] [chee.util :only (->options)])) (defn wrap-view-context "Middleware that configures the *view-context* for rendering. ...
c91d2b0e260c201320a2e157a7883f5af0d970be1057d07300f5152384742b70
Kerl13/AsciiMath
TestAsciiMath.hs
module Main ( main ) where import TestLib import Test.HUnit tests :: IO Test tests = TestList <$> sequence [ mkTestSuite "Numerals" "numbers", mkTestSuite "Operation symbols" "op-sym", mkTestSuite "Miscellaneous symbols" "misc-sym", mkTestSuite "Relation symbols" "rel-sym", mkTestSuite "Greek letters" "greek...
null
https://raw.githubusercontent.com/Kerl13/AsciiMath/a4c1539a19fd505e6394e552df8afd598013da85/tests/TestAsciiMath.hs
haskell
module Main ( main ) where import TestLib import Test.HUnit tests :: IO Test tests = TestList <$> sequence [ mkTestSuite "Numerals" "numbers", mkTestSuite "Operation symbols" "op-sym", mkTestSuite "Miscellaneous symbols" "misc-sym", mkTestSuite "Relation symbols" "rel-sym", mkTestSuite "Greek letters" "greek...
3e82903196378fd516613da9304550940fb64f3ebfd13be93e97409583a55943
lisp-mirror/able
gui.lisp
;;; Some simple LTk extensions. (in-package :ltk) ;;; This replaces the current ltk implementation of this method to remove ;;; the trailing CR that Tk leaves on. (defmethod text ((text text)) (format-wish "senddatastring [~a get 1.0 end-1c]" (widget-path text)) (read-data)) (defmethod insert-text ((txt text) te...
null
https://raw.githubusercontent.com/lisp-mirror/able/8fd0f46f3262dad3c222bf503153feb615515034/gui.lisp
lisp
Some simple LTk extensions. This replaces the current ltk implementation of this method to remove the trailing CR that Tk leaves on. listbox-configure ??
(in-package :ltk) (defmethod text ((text text)) (format-wish "senddatastring [~a get 1.0 end-1c]" (widget-path text)) (read-data)) (defmethod insert-text ((txt text) text &rest tags &key (position "insert")) (format-wish "~a insert ~a \"~a\" {~{ ~(~a~)~}}" (widget-path txt) position (tkescape text) tags) ...
a4650c030ad0a3dab9f5b6865408433b8d2c21a5e0c1fdda3d6314a1f075c234
iitalics/rust-redex
model.rkt
#lang racket/base (require redex/reduction-semantics "redex-util.rkt" "language.rkt" "typerules.rkt" "eval.rkt")
null
https://raw.githubusercontent.com/iitalics/rust-redex/6f9f1d30eb1d43119b2a3db291f8e4bcd0c05dde/private/model.rkt
racket
#lang racket/base (require redex/reduction-semantics "redex-util.rkt" "language.rkt" "typerules.rkt" "eval.rkt")
86a1169339e9a87be9b94e0ad80b1f8cabaae5ad07d2a19747cd37a36ad8c46e
stuartsierra/lazytest
string.clj
(ns clojure.test-clojure.string (:require [clojure.string :as s]) (:use lazytest.deftest)) (deftest t-split (is (= ["a" "b"] (s/split "a-b" #"-"))) (is (= ["a" "b-c"] (s/split "a-b-c" #"-" 2))) (is (vector? (s/split "abc" #"-")))) (deftest t-reverse (is (= "tab" (s/reverse "bat")))) (deftest t-replace ...
null
https://raw.githubusercontent.com/stuartsierra/lazytest/3b0f419ce3d6f259d2ab3cfde475fa491a4db23e/modules/clojure-language-tests/test/clojure/test_clojure/string.clj
clojure
(ns clojure.test-clojure.string (:require [clojure.string :as s]) (:use lazytest.deftest)) (deftest t-split (is (= ["a" "b"] (s/split "a-b" #"-"))) (is (= ["a" "b-c"] (s/split "a-b-c" #"-" 2))) (is (vector? (s/split "abc" #"-")))) (deftest t-reverse (is (= "tab" (s/reverse "bat")))) (deftest t-replace ...
09b0e070ef4170f83085c1715c6797318395eeea1c3231561f24e1f47fde70ec
monadbobo/ocaml-core
core_float_test.ml
open Core.Std open OUnit let () = Random.self_init () round : ... < -)[-><-)[-><-)[-><-)[-><-)[-><-)[- > ... ... -+-----+-----+-----+-----+-----+-----+- ... ... -3 -2 -1 0 1 2 3 ... so round x - . x should be in ( -0.5,0.5 ] ... <-)[-><-)[-><-)[-><-)[-><-...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib_test/core_float_test.ml
ocaml
Float.iround_nearest built so this should always be true code for generating random floats on which to test functions
open Core.Std open OUnit let () = Random.self_init () round : ... < -)[-><-)[-><-)[-><-)[-><-)[-><-)[- > ... ... -+-----+-----+-----+-----+-----+-----+- ... ... -3 -2 -1 0 1 2 3 ... so round x - . x should be in ( -0.5,0.5 ] ... <-)[-><-)[-><-)[-><-)[-><-...
2a37012145b578d17874274dc36e0f8ef4afcf20452c6b790e4a8276098b7d9d
McCLIM/McCLIM
address-book.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*- $ fiHeader : address - book.lisp , v 1.20 1993/07/27 01:45:06 (defpackage #:clim-demo.address-book (:use #:clim-lisp #:clim) (:export #:address-book)) (in-package #:clim-demo.address-book) "Copyright ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/be8c4be6a6d6eed7a02a9e45abdb2e7f61e0c9e5/Examples/address-book.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*- A structure to hold each address Database maintenance. A support utility. And a function which operates on the address class. A place to keep addresses. Obviously could deal with multiple address entries with same name here,...
$ fiHeader : address - book.lisp , v 1.20 1993/07/27 01:45:06 (defpackage #:clim-demo.address-book (:use #:clim-lisp #:clim) (:export #:address-book)) (in-package #:clim-demo.address-book) "Copyright (c) 1990 International Lisp Associates. All rights reserved." Define a simple CLIM program . This prog...
a5a2de3030a9668a623f1d31edf2a35c36a81a9c465a5b111ee5608f975de791
softlab-ntua/bencherl
class_Probe_test.erl
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify % it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/data-management/monitoring/probe/class_Probe_test.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. Unit tests for the Probe class implementation. framework (ex: the result manager). See the class_Probe.erl ...
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
be74d213056abc9b8a1b2225882877358b337b4e9610e92a7d0a4cb5e3401352
alexandergunnarson/quantum
loops.cljc
(ns ^{:doc "Useful looping constructs. Most of these, like |doseq| and |for|, are faster than their lazy clojure.core counterparts." :attribution "alexandergunnarson"} quantum.core.loops (:refer-clojure :exclude [doseq for reduce dotimes, deref reset!]) (:require [clojure.core ...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/loops.cljc
clojure
bootstrapping `map+` (defmacro for-internally-mutable Recognizes persistent vs. transient tradeoff." [[elem coll] & body] `(let-mutable [ret# (transient [])] would normally replace this with this namespace 's |doseq| , but needed the |^:local| hint to be present ^:local (fn [_# ~elem] ...
(ns ^{:doc "Useful looping constructs. Most of these, like |doseq| and |for|, are faster than their lazy clojure.core counterparts." :attribution "alexandergunnarson"} quantum.core.loops (:refer-clojure :exclude [doseq for reduce dotimes, deref reset!]) (:require [clojure.core ...
22ef163c6cb10b02290ad4d3d02cbb4ee4c41683c8846b1f5f8899abe4d10cf1
SleepyBag/leetcode-racket
1877.rkt
(define/contract (is-power-of-four n) (-> exact-integer? boolean?) (and (> n 0) (= n (bitwise-and n (- n))) (not (= (bitwise-and n 1431655765) 0))) )
null
https://raw.githubusercontent.com/SleepyBag/leetcode-racket/e4a7b1aacc91d98512d3d39e3eaabeb6e04e0c4b/1877.rkt
racket
(define/contract (is-power-of-four n) (-> exact-integer? boolean?) (and (> n 0) (= n (bitwise-and n (- n))) (not (= (bitwise-and n 1431655765) 0))) )
b01759cfc376b284dec625faf8407115d7424413cd49f1dbb6f93e942a255b9a
Frama-C/Frama-C-snapshot
normAtLabels.mli
(**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* *) Copyrigh...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/normAtLabels.mli
ocaml
************************************************************************ alternatives) ...
This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Software Foundation ,...
becc67c8bc1e525ce1e2a9aa969f79a6917579ba7b2ec48c1fc0a72ed7477ced
lancelet/wgpu-hs
Fun.hs
# LANGUAGE ForeignFunctionInterface # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # {-# OPTIONS_GHC -Wno-unused-imports #-} -- This file was generated by wgpu-raw-hs-codegen on: 2021 - 08 - 25T10:02:03.522705 -- Using wgpu-native git hash: b10496e7eed9349f0fd541e6dfe50...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/42d7931cdd793970bf4844906b382d908bbb196f/wgpu-raw-hs/src/WGPU/Raw/Generated/Fun.hs
haskell
# LANGUAGE RankNTypes # # OPTIONS_GHC -Wno-unused-imports # This file was generated by wgpu-raw-hs-codegen on: Using wgpu-native git hash: # INLINEABLE wgpuAdapterGetProperties # # INLINEABLE wgpuComputePassEncoderEndPass # # INLINEABLE wgpuComputePassEncoderSetBindGroup # # INLINEABLE wgpuDeviceCreateBuffer # # INLI...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # 2021 - 08 - 25T10:02:03.522705 b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu - native ( ) module WGPU.Raw.Generated.Fun where import Control.Monad.IO.Class (MonadIO, liftIO) import Foreign import Foreign.C impo...
b1b443725b21e952e21138e1919733515416a59aa1002872af7ba4352ed586c0
ahf/peculium_core
peculium_core_protocol_types.erl
%%% Copyright ( c ) 2013 . %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% %%% * Redistributions of source code must retain the above copyright notice, this %%% list of condition...
null
https://raw.githubusercontent.com/ahf/peculium_core/50259b7ee11ad31316e97c7e88b33cae3f89e5a1/src/peculium_core_protocol_types.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions...
Copyright ( c ) 2013 . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF S...
d516284838f45f45e749f13ad521b7f4272c2826bb695409edad893587ab2b82
runtimeverification/haskell-backend
Symbols.hs
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Builtin.Symbols ( lookupSymbol, lookupSymbolUnit, lookupSymbolElement, lookupSymbolConcat, isSymbol, ) where im...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/7e0d12bef597158073a5d273185096828bd68300/kore/src/Kore/Builtin/Symbols.hs
haskell
| Look up the symbol hooked to the named builtin in the provided module. | builtin name | the hooked sort | Find the symbol hooked to @unit@. It is an error if the sort does not provide a @unit@ attribute; this is checked during verification. **WARNING**: The returned 'Symbol' will have the default attributes, no...
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Builtin.Symbols ( lookupSymbol, lookupSymbolUnit, lookupSymbolElement, lookupSymbolConcat, isSymbol, ) where im...
1261ff5ff91283650cc85030b7be231b9d83cd746cf4a90f23bac6f3b28631c9
tommaisey/aeon
am-clip.help.scm
;; (am-clip a b) Two quadrant multiply , 0 when b < = 0 , a*b when b > 0 (audition (out 0 (am-clip (white-noise ar) (mul (f-sin-osc kr 1 0) 0.2))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/am-clip.help.scm
scheme
(am-clip a b)
Two quadrant multiply , 0 when b < = 0 , a*b when b > 0 (audition (out 0 (am-clip (white-noise ar) (mul (f-sin-osc kr 1 0) 0.2))))
facc000da163d90badaecb2c28626eab3b55e29440db37a60db114356ce9eaf0
1Jajen1/Brokkr
Connection.hs
# LANGUAGE RecordWildCards # # LANGUAGE UndecidableInstances # module Network.Connection ( Connection , new , SendPacket(..) , pushCommand, pushCommands , sendPacket, sendPackets , flushCommands , flushPackets , sendKeepAlive , ackKeepAlive , close , Command(..) ) where import Control.Concurrent import Control.Excep...
null
https://raw.githubusercontent.com/1Jajen1/Brokkr/5c128a47c7123e576b4e415048d58c2ab3f4a0aa/src/Network/Connection.hs
haskell
Full means we sent the number, empty means the client responded correctly # INLINE flushPackets # If the client hasn't yet responded, close the connection If the client responds with an invalid keepalive or one we did not expect, we close the connection Commands
# LANGUAGE RecordWildCards # # LANGUAGE UndecidableInstances # module Network.Connection ( Connection , new , SendPacket(..) , pushCommand, pushCommands , sendPacket, sendPackets , flushCommands , flushPackets , sendKeepAlive , ackKeepAlive , close , Command(..) ) where import Control.Concurrent import Control.Excep...
580a22fd9c5358a788422a86168a668082804ff0c1b96a1cf2ce56e9d878dc63
owickstrom/wickstrom.tech
VideoClassifierDiagrams.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE TypeFamilies #-} # OPTIONS_GHC -fno - warn - missing - signatures # module VideoClassifierDiagrams where import Diagrams.Backend.Cairo import Diagrams...
null
https://raw.githubusercontent.com/owickstrom/wickstrom.tech/5aa7d5f6ceda04597a5d935081e24251435df1ca/diagrams/src/VideoClassifierDiagrams.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts # # LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -fno - warn - missing - signatures # module VideoClassifierDiagrams where import Diagrams.Backend.Cairo import Diagrams.Prelude import TimelineDiagrams movingClipBg = sRGB24 168 176 119 moving...
c6c4b76b2fd9b1364524cbedcb5ac906f2c30a8bc903493e2f94d673f3631072
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.TimeGrain.UK.Rules ( rules ) wh...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/UK/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.TimeGrain.UK.Rules ( rules ) where import Data.String import Data.Text (Text) import Prelude import Duckling.Dimensions.Types import Duckling.Types import qualified Duckling.TimeGrain.Types as TG grains :: [(Text, String, TG.Grain)] grains = [ (...
026aa744fbfb7a89ac33b78e7441e3ce1038605bbfdb0cac766635f99828d822
facebookarchive/pfff
unit_coverage_php.ml
open Common open Coverage_tests_php (*****************************************************************************) (* Unit test *) (*****************************************************************************) open OUnit * The test coverage analysis of we do for facebook depends on * multiple components : ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/analyze/qa_test/unit_coverage_php.ml
ocaml
*************************************************************************** Unit test *************************************************************************** shortcut mocking Right now if a function calls another function in a loop, then * those functions calls will occcur a lot in the trace, which ...
open Common open Coverage_tests_php open OUnit * The test coverage analysis of we do for facebook depends on * multiple components : * * - xdebug , and our ocaml binding to the runner and trace format * - phpunit , and our ocaml binding to the runner and result format * - some facebook exte...
e7b9c6abe9ef70e9bfc02742128bfefdbb525bf8f1654c6d698eefb8819e645f
rescript-association/genType
config.ml
let version = "4.06.1+BS" let standard_library = let (//) = Filename.concat in Filename.dirname Sys.executable_name // Filename.parent_dir_name // "lib" // "ocaml" let standard_library_default = standard_library let syntax_kind = ref `ml let bs_only = ref true let unsafe_empty_array = ref true and cmi_magic_n...
null
https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/config.ml
ocaml
This is normally the same as in obj.ml, but we have to define it separately because it can differ when we're in the middle of a bootstrapping phase. print the magic number
let version = "4.06.1+BS" let standard_library = let (//) = Filename.concat in Filename.dirname Sys.executable_name // Filename.parent_dir_name // "lib" // "ocaml" let standard_library_default = standard_library let syntax_kind = ref `ml let bs_only = ref true let unsafe_empty_array = ref true and cmi_magic_n...
5df6614c979d7798cc649daad73df0103a2c194024d8790806e9451751ddff3d
clojournal/clojournal
account.cljc
(ns com.clojournal.alpha.account)
null
https://raw.githubusercontent.com/clojournal/clojournal/483619cbd9a1dc544c9930cf135d10a3de91337b/src/main/com/clojournal/alpha/account.cljc
clojure
(ns com.clojournal.alpha.account)
1a9b489a393c8c4b4323f3ef08bd9229153c5b236960e0ce9853e5a2e6bf3226
jesperes/aoc_erlang
aoc2017_day03.erl
-module(aoc2017_day03). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2017, day = 3, name = "Spiral Memory", expected ...
null
https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2017/aoc2017_day03.erl
erlang
Part 1 East -> South South -> West West -> North North -> East ------------------------------------------------------------ ending at N. Starting coordinates is {0, 0} Coordinate of the previous cell The new coordinate + delta if we rotate New coordinate + delta if we go straight. Note that values for each...
-module(aoc2017_day03). -behavior(aoc_puzzle). -export([parse/1, solve1/1, solve2/1, info/0]). -include("aoc_puzzle.hrl"). -spec info() -> aoc_puzzle(). info() -> #aoc_puzzle{module = ?MODULE, year = 2017, day = 3, name = "Spiral Memory", expected ...
b814bfd1d2b59667163e6d611c0fa8eb6535e5ac71de8adbc7a7c43b8c707ad1
amnh/poy5
edge.mli
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/edge.mli
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
67fc33afef84a6082b493f9d744e577b879cbd3dcffb837c6dc52981b6d73e71
rabbitmq/khepri
async_option.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 © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved . %% -module(async_option). -include_lib("eunit/include/e...
null
https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/async_option.erl
erlang
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 © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved . -module(async_option). -include_lib("eunit/include/eunit.h...
3b09afc01ba595874b35815fc87b34d0601f18061e7fd94d3d75fdbfa2064850
OCamlPro/ocp-build
autoconfAutoconf.ml
(**************************************************************************) (* *) (* Typerex Tools *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-autoconf/autoconfAutoconf.ml
ocaml
************************************************************************ Typerex Tools ...
Copyright 2011 - 2017 OCamlPro SAS the GNU General Public License version 3 described in the file open OcpCompat open AutoconfTypes module PROJECT = AutoconfProjectConfig let () = AutoconfCommon.register_maker "configure" (fun () -> AutoconfCommon.save...
3d217e865c8a055943ad6aedc8231e2939646a5f10af3c7e3596bb55d0e6a4ef
kim/opentracing
Types.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE StrictData # module OpenTracing.Zipkin.Types ( Endpoint (..) , defaultZipkinAddr ) where import Data.Aeson import Data.Aeson.Encoding import Data.Maybe ...
null
https://raw.githubusercontent.com/kim/opentracing/0cae2699eb83c5ff840173920d26646a8238e820/opentracing-zipkin-common/OpenTracing/Zipkin/Types.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # module OpenTracing.Zipkin.Types ( Endpoint (..) , defaultZipkinAddr ) where import Data.Aeson import Data.Aeson.Encoding import Data.Maybe (catMaybes) import Data.Text ...
db2c906273fbc4e31491b65ffe177eb8556bd4b8dd3f68bd0663248622acb61e
dparis/gen-phzr
animation_manager.cljs
(ns phzr.impl.accessors.animation-manager) (def animation-manager-get-properties {:current-anim "currentAnim" :current-frame "currentFrame" :frame "frame" :frame-data "frameData" :frame-name "frameName" :frame-total "frameTotal" :game "game" :is-loaded "isLoaded" :name "name" :paused "paus...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/animation_manager.cljs
clojure
(ns phzr.impl.accessors.animation-manager) (def animation-manager-get-properties {:current-anim "currentAnim" :current-frame "currentFrame" :frame "frame" :frame-data "frameData" :frame-name "frameName" :frame-total "frameTotal" :game "game" :is-loaded "isLoaded" :name "name" :paused "paus...
6e20ceaed07cd2889d3e5be6a69cb11747ed62d702956580aa5b47b9f9b69620
swarmpit/swarmpit
info.cljs
(ns swarmpit.component.stack.info (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.chart :as chart] [material.component.list.basic :as list] [material.component.label :as label] ...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/stack/info.cljs
clojure
(ns swarmpit.component.stack.info (:require [material.icon :as icon] [material.components :as comp] [material.component.form :as form] [material.component.chart :as chart] [material.component.list.basic :as list] [material.component.label :as label] ...
deadc29952d77d84a67ed2a9c2a134cf5c67c441f13fb70f8c533abccbbd6e3f
adaliu-gh/htdp
12-199-204.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 12-199-204) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-d...
null
https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/8-13%20Arbitrarily%20Large%20Data/12-199-204.rkt
racket
about the language level of this file in a form that our tools can easily process. ---------------------------- DATA DEFINITIONS --------------------------- A Date is a structure: day (between 1 and 31), hour (between 0 A Track is a structure: interpretation An instance records in order: the track's title, its p...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 12-199-204) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct date [year month day hour minute second]...
8ceea8cbd90d0295d34bd36dd775b6921d404affa9e8c24b9faac4c690c6246b
lambdaclass/erlang-katana
ktn_task.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% ktn_task: functions useful for managing asyncronous tasks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -module(ktn_task). -export([ wait_for/2, wait_for/4, wait_for_succes...
null
https://raw.githubusercontent.com/lambdaclass/erlang-katana/ebb6b1358c974b5e3b16f5e95422061385ae34ac/src/ktn_task.erl
erlang
ktn_task: functions useful for managing asyncronous tasks
-module(ktn_task). -export([ wait_for/2, wait_for/4, wait_for_success/1, wait_for_success/3 ]). -type task(T) :: fun(() -> T). -spec wait_for(task(T1), T2) -> {error, {timeout, {badmatch, T1}}} | T2 when is_subtype(T2, T1). wait_for(Task, ExpectedAnswer) -> wai...
4780f6e5d1e2b00022be12c09bc2c683a6cae300977df581da9ad7f6254b26bc
deadpendency/deadpendency
Aeson.hs
# OPTIONS_GHC -fno - warn - orphans # module Common.Aeson.Aeson ( cleanJSONOptions, (.:~), ) where import Data.Aeson import Data.Aeson.Key qualified as KM import Data.Aeson.KeyMap qualified as KM import Data.Aeson.Types import Data.List (lookup) import Data.Vector.NonEmpty qualified as NV import Text.URI (URI...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Aeson/Aeson.hs
haskell
copied from -filthy-0.1.4/docs/Data-Aeson-Filthy.html#v:.:-126- package does not build with latest time
# OPTIONS_GHC -fno - warn - orphans # module Common.Aeson.Aeson ( cleanJSONOptions, (.:~), ) where import Data.Aeson import Data.Aeson.Key qualified as KM import Data.Aeson.KeyMap qualified as KM import Data.Aeson.Types import Data.List (lookup) import Data.Vector.NonEmpty qualified as NV import Text.URI (URI...
084dcde7bcd6263435ff1a79583e64b4018c491a8ded156fd6511229f15392d7
JoseFilipeFerreira/haskHell3D
Draw_State.hs
{-| Module : Draw_State Description : Module draw state haskHell 3D -} module Draw_State where import Data_structures import Draw_State3D import Draw_HUD import Graphics.Gloss.Data.Picture import Graphics.Gloss.Data.Color drawState :: Estado -> Picture drawState e | (menu e) == MenuPlay = drawStatePlay e ...
null
https://raw.githubusercontent.com/JoseFilipeFerreira/haskHell3D/de47a9462b81c5c9e7e1a527de4893450c8ac21e/src/Draw_State.hs
haskell
| Module : Draw_State Description : Module draw state haskHell 3D
module Draw_State where import Data_structures import Draw_State3D import Draw_HUD import Graphics.Gloss.Data.Picture import Graphics.Gloss.Data.Color drawState :: Estado -> Picture drawState e | (menu e) == MenuPlay = drawStatePlay e | otherwise = Translate (-200) 0 $ scale 1 1 $ text $ "Game Over" | ...
956dca47863ecf3dee5a9e6b6e41f5c6b3c26abf516f9942193d67de60e664a2
codedownio/sandwich
Logs.hs
module Test.Sandwich.Formatters.Print.Logs where import Control.Concurrent.STM import Control.Monad.IO.Class import Control.Monad.Logger import Control.Monad.Reader import Data.String.Interpolate import System.IO import Test.Sandwich.Formatters.Print.Color import Test.Sandwich.Formatters.Print.Printing import Test.Sa...
null
https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/src/Test/Sandwich/Formatters/Print/Logs.hs
haskell
module Test.Sandwich.Formatters.Print.Logs where import Control.Concurrent.STM import Control.Monad.IO.Class import Control.Monad.Logger import Control.Monad.Reader import Data.String.Interpolate import System.IO import Test.Sandwich.Formatters.Print.Color import Test.Sandwich.Formatters.Print.Printing import Test.Sa...
1bcf26ce32bfe3b86d9fbadc473871644e1dc91a69800f360b60b8fd6b0ec02e
returntocorp/ocaml-tree-sitter-core
Topo_sort.ml
(* Topological sorting of the type definitions. *) open Printf open CST_grammar let debug = false let rec collect_names acc x = match x with | Repeat x | Repeat1 x | Optional x -> collect_names acc x | Seq l -> List.fold_left (fun acc x -> collect_names acc x) acc l | Choice l -> List.fold_left (fun a...
null
https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/f1bd8ad1472ef7cb3198f677916c5bd298a06306/src/gen/lib/Topo_sort.ml
ocaml
Topological sorting of the type definitions.
open Printf open CST_grammar let debug = false let rec collect_names acc x = match x with | Repeat x | Repeat1 x | Optional x -> collect_names acc x | Seq l -> List.fold_left (fun acc x -> collect_names acc x) acc l | Choice l -> List.fold_left (fun acc (_, x) -> collect_names acc x) acc l | Symbol nam...