_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
4a8baeb69aa7683365f0e9e242b4ef693e00d0485e984f2eab7961eb72a149da
MyDataFlow/ttalk-server
folsom_sample_slide_server.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2011 Basho Technologies , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the Li...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/folsom/src/folsom_sample_slide_server.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2011 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY File : @author ...
a5afaebe2aaad1dd4391961d0ebba32d789aea341740337e09c145b338255286
softlab-ntua/bencherl
rm_beh.erl
2008 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/rm_beh.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2008 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @version $ I d : rm_beh.erl 15:00:45Z $ -module(rm_beh). -author(''). -vsn('$Id: rm_beh.erl 2639 2012-01-03...
548b5748c6932f2f0be46b69eb720a14e92661d423c4b9aa62f8e686c4a53530
dimitri/pginstall
config.lisp
;;; pginstall Configuration management ;;; (in-package #:pginstall.config) (defvar *config-filename* "~/.pginstall.ini" "Where to store pginstall configuration.") (defparameter *pidfile* "~/.pginstall.pid" "pginstall pid file") (defparameter *repo-logfile* "/tmp/pginstall-repo.log") (defparameter *http-logfil...
null
https://raw.githubusercontent.com/dimitri/pginstall/66e4274fc544c48be03c719f8d3f03955649a994/src/config/config.lisp
lisp
Defaults, organized in sections, with proper use facing option names allow reading broken config return the new value Validation functions we want a usable URI here then return path itself pidfile reading
pginstall Configuration management (in-package #:pginstall.config) (defvar *config-filename* "~/.pginstall.ini" "Where to store pginstall configuration.") (defparameter *pidfile* "~/.pginstall.pid" "pginstall pid file") (defparameter *repo-logfile* "/tmp/pginstall-repo.log") (defparameter *http-logfile* "/tmp...
e7491436d28d8dca96a0dd9090de244e1ef6cdd32a5ef6af360f4c76791badb5
yrashk/erlang
snmp_verbosity.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2000 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pu...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/snmp/src/misc/snmp_verbosity.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limit...
Copyright Ericsson AB 2000 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(snmp_verbosity). -include_lib("st...
f6af522ff631ef3cad6eecbf6532fbf2980e41fb5f2939646787445d6a454a99
fossas/fossa-cli
Git.hs
{-# LANGUAGE GADTs #-} module Control.Carrier.Git ( GitC, runGit, ) where import Control.Carrier.Simple (SimpleC, interpret) import Control.Effect.Diagnostics ( ToDiagnostic (renderDiagnostic), errCtx, ) import Control.Effect.Diagnostics qualified as Diag import Control.Effect.Git (GitF (..)) import Control....
null
https://raw.githubusercontent.com/fossas/fossa-cli/719fbe75ab9c73bc606fa4ba0bd79c1f75057127/src/Control/Carrier/Git.hs
haskell
# LANGUAGE GADTs #
module Control.Carrier.Git ( GitC, runGit, ) where import Control.Carrier.Simple (SimpleC, interpret) import Control.Effect.Diagnostics ( ToDiagnostic (renderDiagnostic), errCtx, ) import Control.Effect.Diagnostics qualified as Diag import Control.Effect.Git (GitF (..)) import Control.Effect.Lift (Lift, send...
59e0fb0b3a2281000277dbf532d504eb0f2dec025189ec5e3bb356326f3eb53d
ragkousism/Guix-on-Hurd
asdf-build-system.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/build/asdf-build-system.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix build asdf-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use...
32a99e36a72105bf580be2c40050b969fe7506890c908cf68b3f105a37cd199a
fetburner/Coq2SML
names.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/names.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Parsing and printing of identifier...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * { 6 Identifiers } type ide...
f4e43f73542f494f42006c12ee36bf6f7cceca2c9572d008c2385ad25a4ab1cd
nickzuber/infrared
cli.ml
open InfraredUtils type valid_command = | Help of Help_command.t | Version of Version_command.t | Check of Check_command.t | Parse of Parse_command.t type any_command = | Valid of valid_command | Invalid of string let version_command = Version Version_command.command let help_command = Help Help_command....
null
https://raw.githubusercontent.com/nickzuber/infrared/cd495bbfeb98274310ff3fbc14e20d79ca72ba18/Infrared/cli.ml
ocaml
open InfraredUtils type valid_command = | Help of Help_command.t | Version of Version_command.t | Check of Check_command.t | Parse of Parse_command.t type any_command = | Valid of valid_command | Invalid of string let version_command = Version Version_command.command let help_command = Help Help_command....
67e383774d952602256a1bdfc9e920161566986e9a533b14dd2b5e180efc96e6
ocamllabs/ocaml-modular-implicits
taku.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/misc/taku.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . let rec tak (x, y, z) = if x > y then...
9115a579bbcc37f5ee28cea2be9d13b64c8ebb1fc4e6254ab89d65c7c1a52132
stackbuilders/dotenv-hs
DotenvSpec.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Configuration.DotenvSpec (main, spec) where import Configuration.Dotenv (load, loadFile, onMissingFile, parseFile) import Configuration.Dotenv.Environment (getEn...
null
https://raw.githubusercontent.com/stackbuilders/dotenv-hs/4d7aab2cfe957c42de612297549f520cb69db675/spec/Configuration/DotenvSpec.hs
haskell
# LANGUAGE OverloadedStrings # Load extra information Load envs Check existing envs
# LANGUAGE CPP # module Configuration.DotenvSpec (main, spec) where import Configuration.Dotenv (load, loadFile, onMissingFile, parseFile) import Configuration.Dotenv.Environment (getEnvironment, lookupEnv, ...
5d3c102432153a5ec72b4987a50ce769cb39a6ade3d0002b7e0fc745f38ee9f5
pixlsus/registry.gimp.org_static
do-pencil-drawing.scm
(define (do-pencil-drawing filename sfBlurRadius sfStrength) (let* ((sfImage (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (sfDrawable (car (gimp-image-get-active-layer sfImage))) (sfMergeLayers 1)) (let* ( ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/do-pencil-drawing.scm
scheme
Don't add an alpha channel to the layer Layer position Range of affected hues 0 = ALL-HUES Hue offset in degrees Saturation modification non-interactive opacity merge-type 0 = EXPAND-AS-NECESSARY
(define (do-pencil-drawing filename sfBlurRadius sfStrength) (let* ((sfImage (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (sfDrawable (car (gimp-image-get-active-layer sfImage))) (sfMergeLayers 1)) (let* ( ...
5225d26a6ee7b0fe91949cd248f1315d4d8c9bc198b5990965dfbca032ef9414
piotr-yuxuan/choose-a-new-phone
config.cljs
(ns choose-a-new-phone.config) (def debug? ^boolean goog.DEBUG)
null
https://raw.githubusercontent.com/piotr-yuxuan/choose-a-new-phone/656304e34a41122e515418072c7ebf6524032fc6/src/choose_a_new_phone/config.cljs
clojure
(ns choose-a-new-phone.config) (def debug? ^boolean goog.DEBUG)
98663b554103cebc81fac69797e94eba3de154a65bab2dec188599fc31247c73
google/haskell-trainings
ErrorOr.hs
Copyright 2021 Google LLC -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distributed und...
null
https://raw.githubusercontent.com/google/haskell-trainings/214013fc324fd6c8f63b874a58ead0c1d3e6788c/haskell_102/codelab/01_mastermind/src/ErrorOr.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2021 Google LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # # OPTIONS_GHC -fno - warn - unused - binds # # OPTI...
f4f129388014216532b43e667e0ea784aa4e1c9b50714ef8386e8da33bdab032
EligiusSantori/L2Apf
protagonist.scm
(module logic racket/base (require (only-in srfi/1 fold alist-delete) (only-in racket/set set->list) (only-in racket/function negate) racket/contract "../library/extension.scm" "../library/cache.scm" "../system/structure.scm" "../system/database.scm" "object.scm" "character.scm" ) (provide (contr...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/model/protagonist.scm
scheme
Default aggro timeout. If field belongs to protagonist. TODO extract type
(module logic racket/base (require (only-in srfi/1 fold alist-delete) (only-in racket/set set->list) (only-in racket/function negate) racket/contract "../library/extension.scm" "../library/cache.scm" "../system/structure.scm" "../system/database.scm" "object.scm" "character.scm" ) (provide (contr...
16f872dec82f26c67c9e4861332d99675216ec7372c9ef295574bb213f27bfca
SnootyMonkey/Falkland-CMS
common.clj
(ns fcms.representations.common) (def GET "GET") (def POST "POST") (def PUT "PUT") (def DELETE "DELETE") (def PATCH "PATCH") (def json-collection-version "1.0") (defn link-map [rel method url media-type & others] (apply array-map (flatten (into [:rel rel :method method :href url :type media-type] others)))) (...
null
https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/src/fcms/representations/common.clj
clojure
Iterate over the ordered keys collecting the value from the map for each key (or a blank string), put these into a vector with the key name, and create an array-map out of it sort the remaining key-value pairs into a sorted map create a new ordered array map from our existing ordered map and the newly sorted map
(ns fcms.representations.common) (def GET "GET") (def POST "POST") (def PUT "PUT") (def DELETE "DELETE") (def PATCH "PATCH") (def json-collection-version "1.0") (defn link-map [rel method url media-type & others] (apply array-map (flatten (into [:rel rel :method method :href url :type media-type] others)))) (...
2f0c7f6c995f42a85b668d82cac00f593c013497ac5340c9ced17613051a9235
flavioc/cl-hurd
server-version.lisp
(in-package :hurd) (defcfun ("io_server_version" %io-server-version) err (object port) (server-name :string) (server-major-version :pointer) (server-minor-version :pointer) (server-edit-level :pointer)) (defun io-server-version (port) "Return a list with name and 3 versions of a filesystem port." as ...
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/io/server-version.lisp
lisp
(in-package :hurd) (defcfun ("io_server_version" %io-server-version) err (object port) (server-name :string) (server-major-version :pointer) (server-minor-version :pointer) (server-edit-level :pointer)) (defun io-server-version (port) "Return a list with name and 3 versions of a filesystem port." as ...
7cd9d990700e45f5c11063586623392c59c727d9d3dd439f6c5f4b20cc13db04
input-output-hk/hydra-sim
Baselines.hs
# LANGUAGE PatternGuards # {- | Module HydraSim.Examples.Baselines Description: Baseline scenarios for protocol performance -} module HydraSim.Examples.Baselines ( Baseline (..), Concurrency (..), Scenario (..), tpsTotalBound, baselineTPS, findIntersection, minConfTime, ) where import qual...
null
https://raw.githubusercontent.com/input-output-hk/hydra-sim/8119e630c73dafc024dc04e7a24c2328fc18e421/src/HydraSim/Examples/Baselines.hs
haskell
| Module HydraSim.Examples.Baselines Description: Baseline scenarios for protocol performance | Type representing bounds on the transaction rate from different constraints. | We only have a bound from latency if we have finite concurrency (otherwise, we can amortise it completely) | The part of the bound that doe...
# LANGUAGE PatternGuards # module HydraSim.Examples.Baselines ( Baseline (..), Concurrency (..), Scenario (..), tpsTotalBound, baselineTPS, findIntersection, minConfTime, ) where import qualified Data.Set as Set import Data.Time.Clock (DiffTime, diffTimeToPicoseconds, picosecondsToDiffTime...
666a96538e521919140279b4877e00e5832d6e1e9e68275270a5372d200f78c0
aluuu/osm_xml
parser.mli
* OSM XML Parser module . For given file returns value of Types . OSM type . For given file returns value of Types.OSM type. *) type xml_tree = XMLElement of Xmlm.tag * xml_tree list | XMLData of string * Parser options . You can specify what type of OSM objects to skip during parsing process ( node...
null
https://raw.githubusercontent.com/aluuu/osm_xml/37ae07bab6a5790cffbcf9b98542c8af98639edb/src/parser.mli
ocaml
* OSM XML Parser module . For given file returns value of Types . OSM type . For given file returns value of Types.OSM type. *) type xml_tree = XMLElement of Xmlm.tag * xml_tree list | XMLData of string * Parser options . You can specify what type of OSM objects to skip during parsing process ( node...
eee337ece7f57be9480202686b11d4fc4eb32e4f7d37b2148f77fb144c866781
Kappa-Dev/KappaTools
kasa_site_graphs_sig.ml
module type Site_graph = sig type t type agent_id type bond_index type binding_state = | Free | Wildcard | Bound_to_unknown | Binding_type of string * string | Bound_to of bond_index val binding_state_to_json : binding_state -> Yojson.Basic.t val binding_state_of_json : Yojson.Basic.t -> bind...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/site_graphs/kasa_site_graphs_sig.ml
ocaml
module type Site_graph = sig type t type agent_id type bond_index type binding_state = | Free | Wildcard | Bound_to_unknown | Binding_type of string * string | Bound_to of bond_index val binding_state_to_json : binding_state -> Yojson.Basic.t val binding_state_of_json : Yojson.Basic.t -> bind...
e30db65e1db6d40d4cca48fb68058dc422fca6d88c7a137a931c3cd4e257d143
belambert/cl-asr
mdef.lisp
Copyright 2010 - 2018 Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; -2.0 ;; Unless required by applicable law or agreed to in writing, software distributed under the L...
null
https://raw.githubusercontent.com/belambert/cl-asr/a734ddb396f18bf4a504e9ecb3c91e507764358c/src/interface/mdef.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permis...
Copyright 2010 - 2018 distributed under the License is distributed on an " AS IS " BASIS , (in-package :cl-asr) (defun integer-first-token (string) "Given a string, get the first token (defined as space-separated), and convert that token to an integer." (parse-integer (first (split-sequence:split-sequ...
1eb4aa1c772b8a6ce6cb245cffc1f606d30cafd7a46049ee117a74b12c80961e
slepher/astranaut
astranaut_uniplate_SUITE.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2021 , %%% @doc %%% %%% @end Created : 9 Apr 2021 by < > %%%------------------------------------------------------------------- -module(astranaut_uniplate_SUITE). -compile(export_all). -compile(nowarn_export_all)....
null
https://raw.githubusercontent.com/slepher/astranaut/3e4059b5b7040ff2ddd9b9a547fde48bd3559711/test/astranaut_uniplate_SUITE.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- -------------------------------------------------------------------- Info = [tuple()] @end -------------------------------------------------------------------- ---------...
@author < > ( C ) 2021 , Created : 9 Apr 2021 by < > -module(astranaut_uniplate_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -record(uniplate_node_context, {node, withs...
2f8dbff43fb632a8a69e499987c4e382a5b5c0dc0e54f199899036b444bb4780
comby-tools/comby
test_parse_template.ml
open Core open Comby_kernel open Test_helpers open Matchers let%expect_test "get_offsets_for_holes" = let module Template_parser = Template.Make (Metasyntax.Default) (External.Default) in let rewrite_template = {|1234:[1]1234:[2]|} in let variables = Template_parser.variables rewrite_template in print_s [%mess...
null
https://raw.githubusercontent.com/comby-tools/comby/a36c63fb1e686adaff3e90aed00e88404f8cda78/test/common/test_parse_template.ml
ocaml
open Core open Comby_kernel open Test_helpers open Matchers let%expect_test "get_offsets_for_holes" = let module Template_parser = Template.Make (Metasyntax.Default) (External.Default) in let rewrite_template = {|1234:[1]1234:[2]|} in let variables = Template_parser.variables rewrite_template in print_s [%mess...
8a2fed3cedcf5a7f30dde61471d91f9b723fe112b124aaab75957e7e4d330607
Bogdanp/racket-binfmt
unparse-key-mismatch-test.rkt
#lang racket/base (require racket/port rackunit "unparse-key-mismatch.b") (check-exn #rx"expected: Value_1" (lambda () (call-with-output-bytes (lambda (out) (un-Header `((Name_1 . ((u8_1 . 2) (u8_2 . (#x01 #x02)))) (b . ((u8_1 . 0) (u...
null
https://raw.githubusercontent.com/Bogdanp/racket-binfmt/add9a109ac9293707586a791a63116f32a7f0039/binfmt-test/binfmt/unparse-key-mismatch-test.rkt
racket
#lang racket/base (require racket/port rackunit "unparse-key-mismatch.b") (check-exn #rx"expected: Value_1" (lambda () (call-with-output-bytes (lambda (out) (un-Header `((Name_1 . ((u8_1 . 2) (u8_2 . (#x01 #x02)))) (b . ((u8_1 . 0) (u...
4353a529a2d7a82efe95b893df3e1bee20ade0053fa4821df711fa6d0c2fa2f3
alesaccoia/festival_flinger
ogi_tll_diphone.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Oregon Health & Science University ; ; Division of Biomedical Computer Science ; ; ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/english/ogi_tll_diphone/festvox/ogi_tll_diphone.scm
scheme
<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ; ; ; ; ; ;; ; release of the Festival TTS system. ;; ...
OGI TLL diphone : female American English ( ) , version 000821 by (set! ogi_tll_diphone_dir (cdr (assoc 'ogi_tll_diphone voice-locations))) (set! load-path (cons (path-append ogi_tll_diphone_dir "festvox") load-path)) (set! load-path (cons (path-append libdir "ogi") load-path)) (require 'ogi_configure_voic...
4878c4d252c3d8be2adbf031038895ad6c8ccd8d89e99b453a5e06f52bb8b4be
returntocorp/semgrep
Parse_ocaml_tree_sitter.ml
* * Copyright ( c ) 2021 - 2022 R2C * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICE...
null
https://raw.githubusercontent.com/returntocorp/semgrep/db9b44c8a606ffa84f92b45b79d96ed821c420ee/languages/ocaml/tree-sitter/Parse_ocaml_tree_sitter.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Helpers ************************************************************************...
* * Copyright ( c ) 2021 - 2022 R2C * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICE...
d13af6a31616f27e08a8e823cd0b8bd06d4b73e3437915ad86cab3af38112195
v0d1ch/plaid
Main.hs
module Main where {- Module containing useful real world examples of using plaid library. -} import Control.Exception.Safe (MonadThrow, throwM) import Control.Monad.Except (liftEither, runExceptT) import Control.Monad.Reader import Data.ByteString.Lazy (ByteString) import ...
null
https://raw.githubusercontent.com/v0d1ch/plaid/9a9a37e4284f890a1dbebfcd515eea72510bf805/examples/Main.hs
haskell
Module containing useful real world examples of using plaid library. | Client id | Public key | Sandbox secret key | Public token | Access token | Example of item id | Main function from which we call different api endpoints for demonstration /#exchange-token-flow get the plaid environment create the publ...
module Main where import Control.Exception.Safe (MonadThrow, throwM) import Control.Monad.Except (liftEither, runExceptT) import Control.Monad.Reader import Data.ByteString.Lazy (ByteString) import Data.Plaid import Data.Text (Text) import ...
f79ae25e9942789bdfb31771c0e548deaf9dbe6f047d594a27017e0f41b998c5
soarlab/FPTaylor
log.ml
(* ========================================================================== *) : A Tool for Rigorous Estimation of Round - off Errors (* *) Author : , University of Utah (* ...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/log.ml
ocaml
========================================================================== ========================================================================== -----------...
: A Tool for Rigorous Estimation of Round - off Errors Author : , University of Utah This file is distributed under the terms of the MIT license open Format type level = [`Main | `Important | `Info | `Debug] let log_out = ref None...
88f3d74005f2dcf5aa259c30aa6f33f14f01a4d75d8b5417e093dbc10266d2db
quan-nh/adventofcode
day2.clj
(ns adventofcode2017.day2 (:require [clojure.java.io :as io] [clojure.string :as str])) (def input (slurp (io/resource "2017/day2"))) (def data (->> (str/split-lines input) (map #(str/split % #"\t")) (map (fn [a] (map #(Integer/parseInt %) a))))) part 1 (->> data (m...
null
https://raw.githubusercontent.com/quan-nh/adventofcode/98542934a121d1df85dd271d28fedc1f25b98206/src/adventofcode2017/day2.clj
clojure
(ns adventofcode2017.day2 (:require [clojure.java.io :as io] [clojure.string :as str])) (def input (slurp (io/resource "2017/day2"))) (def data (->> (str/split-lines input) (map #(str/split % #"\t")) (map (fn [a] (map #(Integer/parseInt %) a))))) part 1 (->> data (m...
8e6f36ddf12e29d13f069f94ce8f1e40a21ffeae7f0d5030a68d1aebfadaa613
ocamllabs/ocaml-modular-implicits
selection.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/asmcomp/selection.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . val fundecl: Cmm.fundecl -> Mach.funde...
4145eb1d04661459148ddff2262b2344768b52c4834f068480053c4daf5f4a49
rowangithub/DOrder
netbsd_g_ctoc.ml
let rec loop i j len base_sz = if ( len == 0 ) then () else let _ = assert( 0<= j ) in let _ = assert(j < base_sz) in let _ = assert( 0<= i ) in let _ = assert(i < base_sz ) in (* buf[j] = str[i];*) if ( Random.bool () ) then let i = i+1 in let j = j+1 in () e...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/netbsd_g_ctoc.ml
ocaml
buf[j] = str[i];
let rec loop i j len base_sz = if ( len == 0 ) then () else let _ = assert( 0<= j ) in let _ = assert(j < base_sz) in let _ = assert( 0<= i ) in let _ = assert(i < base_sz ) in if ( Random.bool () ) then let i = i+1 in let j = j+1 in () else loop (i+1) (j+1) (len-1) ba...
dcacc45aa3336a017df3b0abb31c2b24faa9ecbf7dcc1f2b04fcbf1f115714ab
jaredly/reason-language-server
translclass.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/translclass.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Asttypes open Types open Typedtree op...
f2873c6df43578d9b0411c6ec49c0c6032eee015a06f747463283a21389eeb4e
mput/sicp-solutions
dispatch-table.rkt
#lang racket (provide put get attach-tag type-tag contents apply-generic put-coercion get-coercion) ;;;----------- from section 3.3.3 for section 2.4.3 ;;; to support operation/type table for data-directed dispatch (define (mlist . items) (foldr mcons '() items)) (define (mcaar table) (mcar (mcar table))) (def...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/dispatch-table.rkt
racket
----------- to support operation/type table for data-directed dispatch
#lang racket (provide put get attach-tag type-tag contents apply-generic put-coercion get-coercion) from section 3.3.3 for section 2.4.3 (define (mlist . items) (foldr mcons '() items)) (define (mcaar table) (mcar (mcar table))) (define (assoc key records) (cond ((null? records) false) ((equal? key (...
eea3c2252c990dc0fa8cebfdb1b89f1f18bc7c9c3dc01f0bf62b39d7121980fc
Mishio595/disml
dispatch.ml
open Core open Event_models let ready = ref (fun (_:Ready.t) -> ()) let resumed = ref (fun (_:Resumed.t) -> ()) let channel_create = ref (fun (_:ChannelCreate.t) -> ()) let channel_update = ref (fun (_:ChannelUpdate.t) -> ()) let channel_delete = ref (fun (_:ChannelDelete.t) -> ()) let channel_pins_update = re...
null
https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/gateway/dispatch.ml
ocaml
let integrations_update = ref (fun (_:Yojson.Safe.t) -> ()) let voice_state_update = ref (fun (_:Yojson.Safe.t) -> ()) let voice_server_update = ref (fun (_:Yojson.Safe.t) -> ())
open Core open Event_models let ready = ref (fun (_:Ready.t) -> ()) let resumed = ref (fun (_:Resumed.t) -> ()) let channel_create = ref (fun (_:ChannelCreate.t) -> ()) let channel_update = ref (fun (_:ChannelUpdate.t) -> ()) let channel_delete = ref (fun (_:ChannelDelete.t) -> ()) let channel_pins_update = re...
6b8c60bd014bacdfa9c9fafeaeecf68c5e5309264894847ded6247405aff06d0
eeng/mercurius
wallet_test.clj
(ns mercurius.wallets.domain.entities.wallet-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.test] [mercurius.support.factory :refer [build-wallet]] [mercurius.wallets.domain.entities.wallet :refer [deposit withdraw reserve transfer]])) (deftest depo...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/test/mercurius/wallets/domain/entities/wallet_test.clj
clojure
(ns mercurius.wallets.domain.entities.wallet-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.test] [mercurius.support.factory :refer [build-wallet]] [mercurius.wallets.domain.entities.wallet :refer [deposit withdraw reserve transfer]])) (deftest depo...
10f26b662aea44b9274ace77f780057bf0424bca4b3ffcd7fed5aee66a2e88e6
rtoy/ansi-cl-tests
loop4.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Oct 27 22:46:39 2002 ;;;; Contains: Tests for LOOP FOR-AS-EQUAL-THEN (in-package :cl-test) (deftest loop.4.1 (loop for x = 1 then (1+ x) until (> x 5) collect x) (1 2 3 4 5)) (deftest loop.4.2 (loop for i from 1 to 10 for j = (1+ i) colle...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/loop4.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for LOOP FOR-AS-EQUAL-THEN Error cases Test that explicit calls to macroexpand in subforms are done in the correct environment
Author : Created : Sun Oct 27 22:46:39 2002 (in-package :cl-test) (deftest loop.4.1 (loop for x = 1 then (1+ x) until (> x 5) collect x) (1 2 3 4 5)) (deftest loop.4.2 (loop for i from 1 to 10 for j = (1+ i) collect j) (2 3 4 5 6 7 8 9 10 11)) (deftest loop.4.3 (loop for i fro...
cb59b38447bff855abcee400eeaafddaf6c3c7e22388e602d67d45c38773683e
mbutterick/beautiful-racket
grammar.rkt
#lang brag program : load-expr output-file-expr compare-to-expr output-list-expr test-expr* load-expr : /"load" ID /"," output-file-expr : /"output-file" ID /"," compare-to-expr : /"compare-to" ID /"," output-list-expr : /"output-list" column+ /";" /column : ID FORMAT-STRING @test-expr : step-expr+ /";" @step-expr : ...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/hdl-tst-demo/grammar.rkt
racket
#lang brag program : load-expr output-file-expr compare-to-expr output-list-expr test-expr* load-expr : /"load" ID /"," output-file-expr : /"output-file" ID /"," compare-to-expr : /"compare-to" ID /"," output-list-expr : /"output-list" column+ /";" /column : ID FORMAT-STRING @test-expr : step-expr+ /";" @step-expr : ...
bb4eb7724187d2d55403bb437e7047faf040a2d7d37e5e01887865053b0eb5ba
shirok/Gauche
ftype.scm
;;; ;;; binary.ftype - foreign types and foreign objects ;;; Copyright ( c ) 2011 - 2022 < > ;;; ;;; 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 re...
null
https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/binary/ftype.scm
scheme
binary.ftype - foreign types and foreign objects 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 of conditions and the...
Copyright ( c ) 2011 - 2022 < > " 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 A @emph{foreign type } , or @code{ftype } ...
33d53e9c1bdc59e1c5afc8fdf06ccce220ef85b2a38c4ecbfd7da61820042d46
joinr/spork
bitset.clj
;;A wrapper around the java.util.BitSet class. Will replace this with ;;a more portable protocol-backed implementation in the near future. ;;Currently used for bitstring operations, supporting genetic algorithms. (ns spork.util.bitset (:import java.util.BitSet)) ;;The persistent bitset implementation here i...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/util/bitset.clj
clojure
A wrapper around the java.util.BitSet class. Will replace this with a more portable protocol-backed implementation in the near future. Currently used for bitstring operations, supporting genetic algorithms. The persistent bitset implementation here is a copy-on-write wrapper around the java.util.BitSet . As such...
(ns spork.util.bitset (:import java.util.BitSet)) (defn ^BitSet make-bitset [n] (BitSet. (long n))) (def empty-bits (BitSet. 0)) (def ^:dynamic *mutate!* nil) (defn ^BitSet clone [^BitSet bs] (if *mutate!* bs (.clone bs))) (defn ^BitSet and-bits "Performs a logical AND of this targ...
0df8a68e4b908981d2114bc3a72166e37d9aba1173d99622d8266473c587bcca
fpco/minghc
Installer.hs
{-# LANGUAGE OverloadedStrings #-} module Installer(installer) where import Config import Control.Monad import Data.String import Data.List.Extra import Development.NSIS as NSIS import Development.NSIS.Plugins.EnvVarUpdate installer :: FilePath -> Arch -> (Program -> Version) -> String installer projRoot arch versi...
null
https://raw.githubusercontent.com/fpco/minghc/1231cf6c73653b7f98431e5e70b215d5ad1a10e4/Installer.hs
haskell
# LANGUAGE OverloadedStrings # See: -appdata-now-the-correct-place-to-install-user-specific-apps-which-modify-t/1845459#1845459 Precedence: low to high (potentially) preexisting paths should precede (i.e. have lower precedence than) new paths file [Recursive] $ fromString $ concat ["bin/", showArchAbbr arch, "-*"] ...
module Installer(installer) where import Config import Control.Monad import Data.String import Data.List.Extra import Development.NSIS as NSIS import Development.NSIS.Plugins.EnvVarUpdate installer :: FilePath -> Arch -> (Program -> Version) -> String installer projRoot arch version = nsis $ do forM_ [minBound....
7cb5d8c3c0aa750a0a9f0c3d1afa64f16f70debdbaa6eb07287763c4c2ed976d
walkable-server/realworld
user_test.clj
(ns conduit.handler.user-test (:require [clojure.test :refer :all] [integrant.core :as ig] [ring.mock.request :as mock] [conduit.handler.user :as user])) (deftest smoke-test (testing "whoami page exists" (let [handler (ig/init-key :conduit.handler.user/whoami {}) ...
null
https://raw.githubusercontent.com/walkable-server/realworld/786706f15399b827e2820877ac3e2e26184ee79a/test/conduit/handler/user_test.clj
clojure
(ns conduit.handler.user-test (:require [clojure.test :refer :all] [integrant.core :as ig] [ring.mock.request :as mock] [conduit.handler.user :as user])) (deftest smoke-test (testing "whoami page exists" (let [handler (ig/init-key :conduit.handler.user/whoami {}) ...
5388dd608bcf312ee2d1dba609251b778a0da374933fb4eee7ef209023625d01
ndmitchell/rattle
EscCodes.hs
# LANGUAGE CPP # -- | Working with escape sequences module General.EscCodes( Color(..), checkEscCodes, removeEscCodes, escWindowTitle, escCursorUp, escClearLine, escForeground, escNormal ) where import Data.Char import Data.List.Extra import System.IO import System.Environment impo...
null
https://raw.githubusercontent.com/ndmitchell/rattle/f1f10504ef175dd005c8affdddfc1fb615c040f2/src/General/EscCodes.hs
haskell
| Working with escape sequences # NOINLINE checkEscCodesOnce # (-11) for some reason If they aren't, try and set it to emulated mode.
# LANGUAGE CPP # module General.EscCodes( Color(..), checkEscCodes, removeEscCodes, escWindowTitle, escCursorUp, escClearLine, escForeground, escNormal ) where import Data.Char import Data.List.Extra import System.IO import System.Environment import System.IO.Unsafe #ifdef mingw32...
f31f863e058189c63c6700bfa5ec80597dc52a79c41996cc40f0c34084edf6f8
zotonic/zotonic
SITE_app.erl
@author % % @copyright % % YEAR%% % % %% Generated on %%DATE%% %% @doc %%SITE%% application. Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required ...
null
https://raw.githubusercontent.com/zotonic/zotonic/2361d27ae43ecfd27fc43e4b1e26710373c6edac/apps/zotonic_mod_zotonic_site_management/priv/skel/empty/src/SITE_app.erl
erlang
% % YEAR%% % % Generated on %%DATE%% @doc %%SITE%% application. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -author("%%FULLNAME%%"). -behaviour(application). -export([ start/2, stop/1 ]). start(_StartType, _StartArgs) -> stop(_State) -> ok.
79b584c34de3d56b946df8d1d96310198b71c31faba62e1b66f068c54d0d1a25
metosin/compojure-api
ordered.clj
(ns examples.ordered (:require [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all])) (def more-ordered-routes (routes (GET "/6" [] (ok)) (GET "/7" [] (ok)) (GET "/8" [] (ok)))) (def ordered-routes (context "/ordered" [] :tags ["ordered"] (context "/a" [] ...
null
https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/examples/thingie/src/examples/ordered.clj
clojure
(ns examples.ordered (:require [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all])) (def more-ordered-routes (routes (GET "/6" [] (ok)) (GET "/7" [] (ok)) (GET "/8" [] (ok)))) (def ordered-routes (context "/ordered" [] :tags ["ordered"] (context "/a" [] ...
56c291588a7a029352934869cbcd8623ae12e9f804cd2f729511ecbe6ac2f5ca
scrintal/heroicons-reagent
calendar.cljs
(ns com.scrintal.heroicons.solid.calendar) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M6.75 2.25A.75.75 0 017.5 3v1.5h9V3A.75.75 0 0118 3v1.5h.75a3 3 0 013 3v11.25a3 3...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/calendar.cljs
clojure
(ns com.scrintal.heroicons.solid.calendar) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M6.75 2.25A.75.75 0 017.5 3v1.5h9V3A.75.75 0 0118 3v1.5h.75a3 3 0 013 3v11.25a3 3...
c421596561ff66fcfaf904b4aeacf130307b9553b91550abd0b8318c597a6108
pirapira/coq2rust
ppannotation.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/printing/ppannotation.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This module defines the ann...
db9a6fc2e0a61d6c53673392ca7e833ede3b4443e24a185ca17dcf82a709cdaf
fulcro-legacy/semantic-ui-wrapper
ui_mount_node.cljs
(ns fulcrologic.semantic-ui.addons.mountnode.ui-mount-node (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/addons/MountNode/MountNode" :default MountNode])) (def ui-mount-node "A component that allows to manage classNames on a DOM node in declarative manner. ...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/addons/mountnode/ui_mount_node.cljs
clojure
(ns fulcrologic.semantic-ui.addons.mountnode.ui-mount-node (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/addons/MountNode/MountNode" :default MountNode])) (def ui-mount-node "A component that allows to manage classNames on a DOM node in declarative manner. ...
90e1acfe6d9f724d07a160183fbe4c7504ca06a72efd83f685459cdbd19a1720
joelburget/lvca
Pcf.ml
open Base open Brr open Lvca_provenance open Note open Lvca_languages.Pfpl_pcf open Prelude let ( >> ) = Lvca_util.( >> ) type term = Exp.t let buf = "input" let parse str = Lvca_parsing.(parse_string (whitespace *> Exp.parse)) str let parsed_to_result = function | Ok tm -> let steps, result = eval tm in ...
null
https://raw.githubusercontent.com/joelburget/lvca/f8a3b8e294f564d1fc9836af63e6169b26ca0234/pages/Pcf.ml
ocaml
open Base open Brr open Lvca_provenance open Note open Lvca_languages.Pfpl_pcf open Prelude let ( >> ) = Lvca_util.( >> ) type term = Exp.t let buf = "input" let parse str = Lvca_parsing.(parse_string (whitespace *> Exp.parse)) str let parsed_to_result = function | Ok tm -> let steps, result = eval tm in ...
6840344674618cdfea5412c087dca4d2c35d3f2f9117efc427d11c1683bbf6cf
roman01la/clojurescript-workshop
button.cljs
(ns app.components.button) (def button [:button])
null
https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/13.namespaces/app/components/button.cljs
clojure
(ns app.components.button) (def button [:button])
00141eadce48cbd8ade336f21ebb4e7ad07c1c541f9a1375f9e29c4e305f2994
ryanpbrewster/haskell
P046.hs
module Problems.P046 ( solve ) where - It was proposed by that every odd composite number can be - written as the sum of a prime and twice a square . - - 9 = 7 + 2 * 1 ^ 2 - 15 = 7 + 2 * 2 ^ 2 - 21 = 3 + 2 * 3 ^ 2 - 25 = 7 + 2 * 3 ^ 2 - 27 = 19 + 2 * 2 ^...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P046.hs
haskell
module Problems.P046 ( solve ) where - It was proposed by that every odd composite number can be - written as the sum of a prime and twice a square . - - 9 = 7 + 2 * 1 ^ 2 - 15 = 7 + 2 * 2 ^ 2 - 21 = 3 + 2 * 3 ^ 2 - 25 = 7 + 2 * 3 ^ 2 - 27 = 19 + 2 * 2 ^...
f79812200f1f1ccf73f7685f198d10cc689bc26edaa8b9d59ceb51ead0e010d4
fractalide/fractalide
widget.rkt
#lang racket (require fractalide/modules/rkt/rkt-fbp/def racket/gui/base) (provide (contract-out [struct widget ([id (or/c string? number?)] [draw (-> boolean? (is-a?/c dc<%>) real? real? real? real? ...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/edges/gui/widget.rkt
racket
#lang racket (require fractalide/modules/rkt/rkt-fbp/def racket/gui/base) (provide (contract-out [struct widget ([id (or/c string? number?)] [draw (-> boolean? (is-a?/c dc<%>) real? real? real? real? ...
f5e4914bb0dff5a4e3aa968df20505119ea67a80a22f28835750a4f5e0f4df4e
lehins/Color
AdobeRGB.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NegativeLiterals # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE T...
null
https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/src/Graphics/Color/Space/RGB/AdobeRGB.hs
haskell
# LANGUAGE DeriveTraversable # | Module : Graphics.Color.Space.RGB.AdobeRGB License : BSD3 Stability : experimental Portability : non-portable * Constructors for a AdobeRGB color space. | A very common [AdobeRGB (1998)]() color space with: * `D65` illuminant * Transfer function: \[ \] * Inv...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NegativeLiterals # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # Copyright : ( c ...
9f25d4167329f970cd948046e17479780d977de17e83f803eb53bd682add7164
Elzair/nazghul
basic-party.scm
;;---------------------------------------------------------------------------- ;; Characters ;;---------------------------------------------------------------------------- (kern-mk-char 'ch_thorald_greybeard ; tag "Thorald Greybeard" ; name sp_human ; species oc...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/tests/basic-party.scm
scheme
---------------------------------------------------------------------------- Characters ---------------------------------------------------------------------------- tag name species occ sprite starting alignment hp mod/mult mp mod/mult hp/xp/mp/lvl conv sched special ai readied ---------------------------...
str / int / dex (load "tests/empty-party.scm") (kern-party-add-member player ch_thorald_greybeard)
6f3cf8a847ad5992b0c0418871038f492f36a714745d2b2f8653666a99098d2e
jimcrayne/jhc
tc116.hs
{-# OPTIONS -fglasgow-exts #-} -- !!! Functional dependencies -- This broke an early impl of functional dependencies -- (caused a panic) module ShouldCompile where class Foo r a | r -> a where foo :: r -> a instance Foo [m a] (m a) bad:: Monad m => m a bad = foo bar bar:: [m a] bar = []
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc116.hs
haskell
# OPTIONS -fglasgow-exts # !!! Functional dependencies This broke an early impl of functional dependencies (caused a panic)
module ShouldCompile where class Foo r a | r -> a where foo :: r -> a instance Foo [m a] (m a) bad:: Monad m => m a bad = foo bar bar:: [m a] bar = []
61e5b11e6e9ee65f94546a107c8ee89288eded83b41039c53b1e57a4984426f4
dparis/gen-phzr
bitmap_data.cljs
(ns phzr.impl.accessors.bitmap-data) (def bitmap-data-get-properties {:base-texture "baseTexture" :canvas "canvas" :context "context" :ctx "ctx" :data "data" :dirty "dirty" :disable-texture-upload "disableTextureUpload" :game "game" :height "height" :image-data "imageData" :key "key" ...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/bitmap_data.cljs
clojure
(ns phzr.impl.accessors.bitmap-data) (def bitmap-data-get-properties {:base-texture "baseTexture" :canvas "canvas" :context "context" :ctx "ctx" :data "data" :dirty "dirty" :disable-texture-upload "disableTextureUpload" :game "game" :height "height" :image-data "imageData" :key "key" ...
79b2e93343c9a0471211a63e46d7fa29f39f55fb3c0cd835781cc8ab7c6a6af5
letmaik/monadiccp
Stat.hs
{-# LANGUAGE Rank2Types #-} # LANGUAGE FlexibleInstances # module Control.Search.Stat ( appStat , constStat , depthStat , nodesStat , discrepancyStat , solutionsStat , failsStat , timeStat , notStat , Stat(..), IValue, varStat , (#>), (#<), (#>=), (#<=), (#=), (#/) , readStat, evalStat ) wher...
null
https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/Search/Stat.hs
haskell
# LANGUAGE Rank2Types # ========================================================================== -- ========================================================================== -- ========================================================================== -- STATS ===================================================...
# LANGUAGE FlexibleInstances # module Control.Search.Stat ( appStat , constStat , depthStat , nodesStat , discrepancyStat , solutionsStat , failsStat , timeStat , notStat , Stat(..), IValue, varStat , (#>), (#<), (#>=), (#<=), (#=), (#/) , readStat, evalStat ) where import Text.PrettyPrint h...
154c7bbc16c83cba8fbd2c2822880493143e6b0943b9b97db565cf1fad70271c
15Galan/asignatura-204
TwoListsQueue.hs
------------------------------------------------------------------------------- Efficient functional queue by means of two lists ( used as stacks ) -- Data Structures . en Informática . UMA . , 2012 ------------------------------------------------------------------------------- module DataStructures.Queue.Two...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Ex%C3%A1menes/2020/Febrero/Haskell/DataStructures/Queue/TwoListsQueue.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Showing a queue Queue equality
Efficient functional queue by means of two lists ( used as stacks ) Data Structures . en Informática . UMA . , 2012 module DataStructures.Queue.TwoListsQueue ( Queue , empty , isEmpty , enqueue , first , dequeue ) where import Data.List(intercalate) import Test.QuickCheck data Queue a = Q [a]...
1463ffce5356031f082ad8b53a0310a5a4856041a63d8e6df3ace9f2f796a0ef
awslabs/quivela
Diff.hs
Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE LambdaCase # module Quivela.Diff ( applyDiffs ) where import qualified Control.Lens as Lens import Control.Lens ((^.)) import qualified Data.List as L import qualified Quivela.Languag...
null
https://raw.githubusercontent.com/awslabs/quivela/c58a883c9387c18b51a83ede60fbb131357173e8/src/Quivela/Diff.hs
haskell
Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE LambdaCase # module Quivela.Diff ( applyDiffs ) where import qualified Control.Lens as Lens import Control.Lens ((^.)) import qualified Data.List as L import qualified Quivela.Languag...
fa024087fcf26ca226a5aab4d91ee8fc56d08b3deead6cdc57acd58ee939b07f
argp/bap
dGraphSubTree.ml
(**************************************************************************) (* *) (* This file is part of OcamlGraph. *) (* *) Copyright...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/dgraph/dGraphSubTree.ml
ocaml
************************************************************************ This file is part of OcamlGraph. ...
Copyright ( C ) 2009 - 2010 CEA ( Commissariat à ) Lesser General Public License as published by the Free Software Foundation , version 2.1 , with a linking exception . ( ) ...
fc5fbd7bec3759c0500a4a063724ddb48dea62a66c9bb852224a46e12942e269
facebook/infer
ClangPointers.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/bbe7a30be97a0211962f3ad3df508e6445eed4df/infer/src/clang/ClangPointers.ml
ocaml
This function is not thread-safe visit This function is not thread-safe populate caches
* 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 ...
2d8fbb3d84fe3e421c88cd0555edf831bad5be6d7edd3d9b9417172e64e9e6bd
soulomoon/SICP
test.scm
git clone -libev.git cd shadowsocks-libev sudo apt-get install build-essential autoconf libtool libssl-dev ./configure && make make install vultr: 9vM.22qTG[92{4gf
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/test.scm
scheme
git clone -libev.git cd shadowsocks-libev sudo apt-get install build-essential autoconf libtool libssl-dev ./configure && make make install vultr: 9vM.22qTG[92{4gf
9cb781fc20836e10946285b938f18f79e072fb6a11094611acb05a6357d2abc0
juanmirocks/CL-HMM
hmm-simple.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Author : Created : We d Jul 9 19:05:15 2008 ( CEST ) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Description: ;; This file defines the basic HMM type , the hmm - simple class . This is divided ;; into ...
null
https://raw.githubusercontent.com/juanmirocks/CL-HMM/9e3863e41dec811032927ec29319128ae34d1984/src/hmm-simple.lisp
lisp
Description: into the infinite and finite classes. They are almost the same and only characteristics are well docummented in the main class definition. Every state keeps a bit-properties vector, namely: * end * silent * invalid (no transitions) * tied emissions * fixed (the probabilities don't change, th...
Author : Created : We d Jul 9 19:05:15 2008 ( CEST ) This file defines the basic HMM type , the hmm - simple class . This is divided differ in the last steps of / forward / backward . The model * begin - state ( true if its init prob is non zero ) model is linear , two lists expressing the transition ...
5b3319080c2cef09ece0d0f813aaa19f4781ea1c24782668ec03e6bcbd3f853f
melange-re/melange
ast_bs_open.ml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/frontend/ast_bs_open.ml
ocaml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
34eaacf9569beec6a4f36084c0d6b23e21ca48d450ee2c2360aabd1ed8011268
Frama-C/Frama-C-snapshot
GuiSequent.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/GuiSequent.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 ,...
6f5722ff0c672a454d6f8414e0efd209d119d9c98bd08c1a36c2b9ef49a1999f
routineco/ocaml-nanoid
nanoid.ml
include Nanoid_os.Simple ()
null
https://raw.githubusercontent.com/routineco/ocaml-nanoid/9449dfb4b14cf0d0b7371e7fee7fb629109982bd/lib/src/os/nanoid.ml
ocaml
include Nanoid_os.Simple ()
e9e6d4f989006be678083c392b00542553b9078e2e4d48db7730073bbc331ec6
DeathKing/Hit-DataStructure-On-Scheme
zip.scm
(load-option 'format) (define *default-hash-size* 97) (define *default-hash-fill* '()) (define (make-hash #!optional size fill) (let ((s (if (eq? #!default size) *default-hash-size* size)) (f (if (eq? #!default fill) *default-hash-fill* fill))) (make-vector s f))) (define (hash-insert! hash proc item) ...
null
https://raw.githubusercontent.com/DeathKing/Hit-DataStructure-On-Scheme/11677e3c6053d6c5b37cf0509885f74ab5c2bab9/application4/zip.scm
scheme
(load-option 'format) (define *default-hash-size* 97) (define *default-hash-fill* '()) (define (make-hash #!optional size fill) (let ((s (if (eq? #!default size) *default-hash-size* size)) (f (if (eq? #!default fill) *default-hash-fill* fill))) (make-vector s f))) (define (hash-insert! hash proc item) ...
a65b39753b60fc5153e9ffb5742655b524685283d2afc3f66afd84430b0d2566
yuanqing/code-problems
test.ml
open Number_format open OUnit2 let () = run_test_tt_main ("number_format n" >::: [ "`n` < 0" >:: (fun _ -> assert_equal "-42" (number_format (-42)); assert_equal "-1,234,567" (number_format (-1234567)) ); "`n` = 0" >:: (fun _ -> assert_equal "0" (number_format 0) ); "`n` > 0" >:: (fun _ -> ...
null
https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/number_format/test.ml
ocaml
open Number_format open OUnit2 let () = run_test_tt_main ("number_format n" >::: [ "`n` < 0" >:: (fun _ -> assert_equal "-42" (number_format (-42)); assert_equal "-1,234,567" (number_format (-1234567)) ); "`n` = 0" >:: (fun _ -> assert_equal "0" (number_format 0) ); "`n` > 0" >:: (fun _ -> ...
b5682e699d859d6c445ddba077921985f9ed6d08bb91aa3f1f3568b62ec6fd71
lspitzner/brittany
Test282.hs
wrapPatPrepend pat prepElem = do patDocs <- layoutPat pat case Seq.viewl patDocs of Seq.EmptyL -> return $ Seq.empty x1 Seq.:< xR -> do x1' <- docSeq [prepElem, return x1] return $ x1' Seq.<| xR
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test282.hs
haskell
wrapPatPrepend pat prepElem = do patDocs <- layoutPat pat case Seq.viewl patDocs of Seq.EmptyL -> return $ Seq.empty x1 Seq.:< xR -> do x1' <- docSeq [prepElem, return x1] return $ x1' Seq.<| xR
af308aee5a0277f5372b191b8d11013bcf2f0c8702de018b207735e51b6d9494
mfoemmel/erlang-otp
public_key.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/public_key/src/public_key.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(public_key). -include("public_ke...
a3f2d7740be583b08c00611ab267fa7f6fe82e7e141e86f95909f51e51d8cfb8
ghcjs/ghcjs-dom
MediaKeys.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.MediaKeys (js_createSession, createSession, createSession_, js_setServerCertifi...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaKeys.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/WebKitMediaKeys.createSession Mozilla WebKitMediaKeys.createSession documentation> | <-US/docs/Web/API/WebKitMediaKeys.createSession Mozilla WebKitMediaKeys.createSession documentation>
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.MediaKeys (js_createSession, createSession, createSession_, js_setServerCertificate, setServerCertificate, setServerCertificate_, MediaKeys(..), gTypeMediaKeys) wh...
505bca0280a3585e604059a7cfc36ce3728d5b6426496dc0f505819c8efb0e57
bhk/scam
escape.scm
;;-------------------------------------------------------------- ;; escape : escaping ;;-------------------------------------------------------------- (require "core.scm") ;; The problem of "escaping" strings for inclusion in Make source code can be broken down into two aspects . ;; First , there is escaping ` $ ...
null
https://raw.githubusercontent.com/bhk/scam/12b1f3c6525983d000e2532af28e030db3bf3bb5/escape.scm
scheme
-------------------------------------------------------------- escape : escaping -------------------------------------------------------------- The problem of "escaping" strings for inclusion in Make source code can handled by the `escape` function. significance in the Make syntax. This task varies depending on ...
(require "core.scm") be broken down into two aspects . First , there is escaping ` $ ` characters to survive expansion . This is Second , special characters must be quoted that would otherwise have where in the Makefile the code will appear : - the contents of a " define VAR ... " statement - th...
d99bd918b31100e09cc61d4e666033d2793b3a8b1d485581915e69c12fd98ef0
erlang/otp
maybe_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2003 - 2023 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/compiler/test/maybe_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2003 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(maybe_SUITE). -include_lib("common_test/include/ct.hrl"). -feature(maybe_expr, enable). -export([all/0, gr...
de177da168c78e36c82584be54ccbf6d01b093687a8444d6c10f669f0fa623e7
dyzsr/ocaml-selectml
parse.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/parsing/parse.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let last_token = ref Parser.EOF let token lexbuf = let token = Lexer.token lexbuf in last_token :=...
517f32c6cd71b82fde60b28483a3633d29703e6300dbf1c38b135127b56a8d6c
walmartlabs/lacinia
enums_test.clj
Copyright ( c ) 2017 - present Walmart , Inc. ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/walmartlabs/lacinia/88bf46f197bfed645d7767fcfe2bfa39e8b00b27/test/com/walmartlabs/lacinia/enums_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2017 - present Walmart , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns com.walmartlabs.lacinia.enums-test (:require [clojure.test :refer [deftest is]] [com.walmartlabs.test-schema :refer [t...
73a1cd3c3fb5639fdaad4e4d3c9e66682336d57407f995830587918296ef9315
opencog/pln
similarity.scm
;; ============================================================================= ;; Similarity Rule ;; AndLink ;; A ;; B OrLink ;; A ;; B ;; |- SimilarityLink ;; A ;; B ;; ;; ----------------------------------------------------------------------------- (define similarity-rule (BindLink (V...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/opencog/pln/rules/wip/similarity.scm
scheme
============================================================================= Similarity Rule A B A B |- A B -----------------------------------------------------------------------------
AndLink OrLink SimilarityLink (define similarity-rule (BindLink (VariableList (VariableNode "$A") (VariableNode "$B")) (AndLink (AndLink (VariableNode "$A") (VariableNode "$B")) (OrLink (VariableNo...
34de7cba67221cb242013bc5b6af24d5199efe43cfe438b211d7091575d51b20
NicklasBoto/funQ
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import FunQ import Paths_qfunc ( version ) import Turtle import Data.Version ( showVersion ) import Data.Functor import qualified Interpreter.Run as Run import qualified Repl desc :: Description desc = "funQ - Functional Quantum Programming" -- | Parses an option...
null
https://raw.githubusercontent.com/NicklasBoto/funQ/f35b47e070542f1525cd9b4a8af9b9033600bb7b/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # | Parses an optional input file. | Option to show the funq version. | If a input file is provided execute it, else start the repl.
module Main where import FunQ import Paths_qfunc ( version ) import Turtle import Data.Version ( showVersion ) import Data.Functor import qualified Interpreter.Run as Run import qualified Repl desc :: Description desc = "funQ - Functional Quantum Programming" parseInput :: Parser (Maybe (String, Maybe Int, Bool)) p...
f6ebd64235b44acabe729dde042b1ddf967bd5569a1d3cfeaf511ea23590d254
kumarshantanu/lein-sub
core_test.clj
(ns child2.core-test (:use clojure.test child2.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/kumarshantanu/lein-sub/4ddbb83359b2f9b6435ffd5b9c012b81e28de1ac/subtest/child2/test/child2/core_test.clj
clojure
(ns child2.core-test (:use clojure.test child2.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
69cf92272f0ebfa8f1c49c275f8d557d8d11312f5a3049d8acca1281bef7b548
txyyss/Project-Euler
Euler027.hs
-- Euler published the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39 . However , when n = 40 , 40 ^ 2 + 40 + 41 = 40(40 + 1 ) + 41 is divisible by 41 , and certainly when n = 41 , 41² + 41 + 41 is clearly divisible by 41...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler027.hs
haskell
Euler published the remarkable quadratic formula: Considering quadratics of the form: where |n| is the modulus/absolute value of n Find the product of the coefficients, a and b, for the quadratic expression that produces the maximum number of primes for consecutive values of n, starting with n = 0.
n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39 . However , when n = 40 , 40 ^ 2 + 40 + 41 = 40(40 + 1 ) + 41 is divisible by 41 , and certainly when n = 41 , 41² + 41 + 41 is clearly divisible by 41 . Using computers , the incredible formula n² - 7...
d9500b2ab91de7551020676545c282ad3c8a2d412277233e6b64368485a4f4e5
pink-gorilla/goldly
funny.cljs
(ns demo.funny) (defn joke [] "I wos born with grosse Ohrn! ...") (defn facts [] "There is a lot of interest in Antarctica. But Why?") (def data 27)
null
https://raw.githubusercontent.com/pink-gorilla/goldly/6f298355dbc99ce403763369bbe2a679655a3442/goldly-test/src/demo/funny.cljs
clojure
(ns demo.funny) (defn joke [] "I wos born with grosse Ohrn! ...") (defn facts [] "There is a lot of interest in Antarctica. But Why?") (def data 27)
885088516601451fd119ae9f187bf7ad8fd565896e66a739e1d18184aa3e5ccf
jwaldmann/haskell-obdd
Domino.hs
In how many ways can a n x m board be entirely covered by 2 x 1 domino pieces ? Usage : ./Domino 4 3 time stack runghc examples / Domino.hs 4 9 VERBOSE=1 stack runghc examples / Domino.hs 2 3 or : ghci > prettySolve 4 3 In how many ways can a n x m board be entirely covered by 2 x 1 domi...
null
https://raw.githubusercontent.com/jwaldmann/haskell-obdd/537f710bc3eb6d06370659fd8c79f4da94554aeb/examples/Domino.hs
haskell
In how many ways can a n x m board be entirely covered by 2 x 1 domino pieces ? Usage : ./Domino 4 3 time stack runghc examples / Domino.hs 4 9 VERBOSE=1 stack runghc examples / Domino.hs 2 3 or : ghci > prettySolve 4 3 In how many ways can a n x m board be entirely covered by 2 x 1 domi...
c62562929ed0c01ecef312e646ada6f8e0b3c92b0cb681ddb7b7d81651b3b414
eval/deps-try
commands.clj
(ns rebel-readline.commands (:require [clojure.pprint :refer [pprint]] [clojure.string :as string] [rebel-readline.jline-api :as api] [rebel-readline.jline-api.attributed-string :as astring] [rebel-readline.tools :as tools :refer [color]]) (:import [org.jline.utils AttributedStringBuilder Attribut...
null
https://raw.githubusercontent.com/eval/deps-try/da691c68b527ad5f9e770dbad82cce6cbbe16fb4/vendor/rebel-readline/rebel-readline/src/rebel_readline/commands.clj
clojure
its dicey to have parallel state like this so we are just going to have the service config or consider a cross repl solution that works maybe something you can put in service interface request exit
(ns rebel-readline.commands (:require [clojure.pprint :refer [pprint]] [clojure.string :as string] [rebel-readline.jline-api :as api] [rebel-readline.jline-api.attributed-string :as astring] [rebel-readline.tools :as tools :refer [color]]) (:import [org.jline.utils AttributedStringBuilder Attribut...
bff78fcc3def30655477278407a2a04d76c04b002bb70703924277643c8d218a
kawasima/jagrid
user.clj
(ns user (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.tools.namespace.repl :refer [refresh]] [clojure.java.io :as io] [com.stuartsierra.component :as component] [eftest.runner :as eftest] [meta-merge.core :refer ...
null
https://raw.githubusercontent.com/kawasima/jagrid/524b351c47ba2648f96ce8ef5ee431d0eb594d28/dev/user.clj
clojure
(ns user (:require [clojure.repl :refer :all] [clojure.pprint :refer [pprint]] [clojure.tools.namespace.repl :refer [refresh]] [clojure.java.io :as io] [com.stuartsierra.component :as component] [eftest.runner :as eftest] [meta-merge.core :refer ...
fa0c7050e7d9e04fdc6e8bf98ae489ca203e585c8bc7bf49f37cd56397bc2ed0
pallix/lacij
def.clj
(ns lacij.examples.def (:use lacij.edit.graph lacij.view.graphview analemma.svg analemma.xml)) (def dotl-marker [:dotl [:marker {:refX 0 :refY 0 :orient "auto" :style "overflow:visible"} (-> (path [:M [-2.5,-1.0] :C [-2.5,1.76 -4....
null
https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/examples/def.clj
clojure
(ns lacij.examples.def (:use lacij.edit.graph lacij.view.graphview analemma.svg analemma.xml)) (def dotl-marker [:dotl [:marker {:refX 0 :refY 0 :orient "auto" :style "overflow:visible"} (-> (path [:M [-2.5,-1.0] :C [-2.5,1.76 -4....
4be4a734d02ee7857483c66af347fd9fe01bccb9ab364c74fda22a6ed9fed465
dizengrong/erlang_game
mysql_auth.erl
%%%------------------------------------------------------------------- %%% File : mysql_auth.erl Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > %%% Note : All MySQL code was written by , originally %%% in the file mysql.erl - I just moved it he...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/lib/amnesia/src/drivers/mysql/mysql_auth.erl
erlang
------------------------------------------------------------------- File : mysql_auth.erl in the file mysql.erl - I just moved it here. See the file COPYING ------------------------------------------------------------------- -------------------------------------------------------------------- -------...
Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > Note : All MySQL code was written by , originally Copyright ( c ) 2001 - 2004 Kungliga Tekniska -module(mysql_auth). External exports ( should only be used by the ' mysql_conn ' module ) -export([ do_old...
497d3f6bddaa01f36fd998f34986be033c8542136e95f3381a46ce5712a1c18b
cardmagic/lucash
heap.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; Allocation ; s48-*hp* is the heap pointer and s48-*limit* is the limit beyond which no ; storage should be allocated. Both of these are addresses (not ; descriptors). (define s48-*hp*) (define s48-*limit*) (define *oldspace-hp*) (define *oldspace-li...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/vm/heap.scm
scheme
Allocation s48-*hp* is the heap pointer and s48-*limit* is the limit beyond which no storage should be allocated. Both of these are addresses (not descriptors). These are all in address units ---------------- To write images we need to be able to undo the swapping. ---------------- Pre-Allocation Prealloca...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define s48-*hp*) (define s48-*limit*) (define *oldspace-hp*) (define *oldspace-limit*) (define *newspace-begin*) (define *newspace-end*) (define *oldspace-begin*) (define *oldspace-end*) For the GC ( which is in another module ) (define (heap-pointe...
c6f7cd0d45f4d16f02e90f550fae6c78e32eb5e2a33b7b9da9fd0adba242e612
tommaisey/aeon
grain-sin.help.scm
(hear (let* ((x (mouse-x kr -0.5 0.5 0 0.1)) (y (mouse-y kr 0 400 0 0.1)) (n (white-noise kr)) (f (add 440 (mul n y))) (t (impulse kr 10 0))) (mul (grain-sin 2 t 0.1 f x -1 512) 0.1)))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/granular/grain-sin.help.scm
scheme
(hear (let* ((x (mouse-x kr -0.5 0.5 0 0.1)) (y (mouse-y kr 0 400 0 0.1)) (n (white-noise kr)) (f (add 440 (mul n y))) (t (impulse kr 10 0))) (mul (grain-sin 2 t 0.1 f x -1 512) 0.1)))
f0bd24ee467f04e30cac4c0b62df550afa1752e4c66f5f072783bf22db8bc546
HaskellForCats/HaskellForCats
factorial.hs
module Factorial where -- factorial :: Double -> Double -- forcing the type factorial 0 = 1 factorial x = x * factorial (x - 1) ------ factorial' n | n < 2 = 1 factorial' n = n * factorial' (n - 1) ------ factorial'' n = foldl1 (*) [1..n] fn001 :: (Num a, Enum a) => Integer -> Integer fn001 n = foldl1 (*) [1..n]
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/factorial.hs
haskell
factorial :: Double -> Double -- forcing the type ---- ----
module Factorial where factorial 0 = 1 factorial x = x * factorial (x - 1) factorial' n | n < 2 = 1 factorial' n = n * factorial' (n - 1) factorial'' n = foldl1 (*) [1..n] fn001 :: (Num a, Enum a) => Integer -> Integer fn001 n = foldl1 (*) [1..n]
9069aaa20fde7b3963b1a00d4cd3b310fa9991ba294854247288421c76a9c4fa
ds-wizard/engine-backend
PackageBundleService.hs
module Wizard.Service.Package.Bundle.PackageBundleService ( getTemporaryFileWithBundle, exportBundle, pullBundleFromRegistry, importAndConvertBundle, importBundle, ) where import Control.Monad (forM) import Control.Monad.Except (catchError, throwError) import Control.Monad.Reader (asks) import Data.Aeson imp...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/090f4f3460e8df128e88e2c3ce266b165e4a0a50/engine-wizard/src/Wizard/Service/Package/Bundle/PackageBundleService.hs
haskell
-------------------------------- PRIVATE --------------------------------
module Wizard.Service.Package.Bundle.PackageBundleService ( getTemporaryFileWithBundle, exportBundle, pullBundleFromRegistry, importAndConvertBundle, importBundle, ) where import Control.Monad (forM) import Control.Monad.Except (catchError, throwError) import Control.Monad.Reader (asks) import Data.Aeson imp...
134130ab35aca3169a28cd7393065741c78709f01d276fd22ce89db467a34383
cbaggers/daft
actor-kind.lisp
(in-package :daft) ;;------------------------------------------------------------ (defclass actor-kind () ((name :initarg :name :reader name) (current :initform (make-array 0 :adjustable t :fill-pointer 0) :initarg :current :accessor this-frames-actors) (next :initform (make-array 0 :a...
null
https://raw.githubusercontent.com/cbaggers/daft/62c4b8b883469eb121b55403b6afabad5052b204/src/actor-kind/actor-kind.lisp
lisp
------------------------------------------------------------ ------------------------------------------------------------
(in-package :daft) (defclass actor-kind () ((name :initarg :name :reader name) (current :initform (make-array 0 :adjustable t :fill-pointer 0) :initarg :current :accessor this-frames-actors) (next :initform (make-array 0 :adjustable t :fill-pointer 0) :initarg :next :accessor n...
ab1854e3dc088a6d38ccd533fd50ec609ff079de948d6450cdc4fb4f8f69a652
reasonml/reason
reactjs_jsx_ppx_v2.mli
This file 's shared between the repo and the BuckleScript repo . In Reason , it 's in src . In BuckleScript , it 's in vendor / reason We periodically copy this file from Reason ( the source of truth ) to BuckleScript , then uncomment the # if # else # end cppo macros you see in the file . That 's be...
null
https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/ppx/reactjs_jsx_ppx_v2.mli
ocaml
val ast_mapper : Ast_mapper.mapper
This file 's shared between the repo and the BuckleScript repo . In Reason , it 's in src . In BuckleScript , it 's in vendor / reason We periodically copy this file from Reason ( the source of truth ) to BuckleScript , then uncomment the # if # else # end cppo macros you see in the file . That 's be...
d26159e7ac6637a81eb8ea739d7952aabe8635b065a16e18198b2d50cc1cbe4a
mtgred/netrunner
quotes.clj
(ns game.quotes (:require [clojure.edn :as edn] [clojure.java.io :as io])) (def quotes-corp-filename "data/quotes-corp.edn") (def quotes-runner-filename "data/quotes-runner.edn") (def generic-key "Default") (def identity-quotes (atom {})) (defn load-quotes! [] (let [quotes-corp (when (.exists (io/file q...
null
https://raw.githubusercontent.com/mtgred/netrunner/9ad9a8990131308925c24f87eceffd094021defa/src/clj/game/quotes.clj
clojure
(ns game.quotes (:require [clojure.edn :as edn] [clojure.java.io :as io])) (def quotes-corp-filename "data/quotes-corp.edn") (def quotes-runner-filename "data/quotes-runner.edn") (def generic-key "Default") (def identity-quotes (atom {})) (defn load-quotes! [] (let [quotes-corp (when (.exists (io/file q...
07e7aceaa2f3b284a9684c3f7b12e11620d1b64d938aa703d8a7307515fd540d
jrm-code-project/LISP-Machine
mfiles.lisp
Lisp Machine mail reader -*- Mode : LISP ; Package : ZWEI ; Base:8 ; : ZL -*- Buffer handling , definition are in DEFS * * ( c ) Copyright 1981 Massachusetts Institute of Technology * * An invalid Enhancements copyright notice on AI : ZMAIL;MFILES 236 removed on 5/7/82 by RG This file had been installed as ...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/zmail/mfiles.lisp
lisp
Package : ZWEI ; Base:8 ; : ZL -*- MFILES 236 removed on 5/7/82 by RG Mpdify the HEADERS-END-BP property in the MSG-STATUS so that it points into the copied text. Try to preserve where it points. When we find the line in the old interval that the old bp points to, make the new bp point at the corresponding new ...
Buffer handling , definition are in DEFS * * ( c ) Copyright 1981 Massachusetts Institute of Technology * * This file had been installed as the official MIT source in direct contravention to instructions to Symbolics personnel acting on MIT 's behalf . (TV:ADD-TYPEOUT-ITEM-TYPE *ZMAIL-TYPEOUT-ITEM-ALIST* ZMA...
a040308fb053a3e79bb652a55dfb2c302a824db1226b9505970c2bfdbff8bd7c
zcaudate-me/cronj
tab.clj
(ns cronj.data.tab (:require [clojure.string :refer [split]] [hara.common.error :refer [error suppress]] [hara.common.primitives :refer [F]] [clj-time.core :as t] [clj-time.local :as lt])) (def SCHEDULE-ELEMENTS [:second :minute :hour :day-of-week :day :month :year]) ...
null
https://raw.githubusercontent.com/zcaudate-me/cronj/13f4fc394b0e96781227271094a6f077f9d051c0/src/cronj/data/tab.clj
clojure
string: (for humans) " * 2,4 2-9 /8 ... " :tab-str :tab-arr +---------+ +---------+ | | | | | | | | | string | -----------> ...
(ns cronj.data.tab (:require [clojure.string :refer [split]] [hara.common.error :refer [error suppress]] [hara.common.primitives :refer [F]] [clj-time.core :as t] [clj-time.local :as lt])) (def SCHEDULE-ELEMENTS [:second :minute :hour :day-of-week :day :month :year]) ...
c747d62a8ce16a71a6cafb1e686b3c16db342efe14d2baaf150cdad27b08339d
tonsky/datascript
query_fns.cljc
(ns datascript.test.query-fns (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datascript.core :as d] [datascript.db :as db] [datascript.test.core :as tdc]) #?(:clj (:import [clojure.lang Except...
null
https://raw.githubusercontent.com/tonsky/datascript/1a405721cb2226a28678066b176a5326c264153e/test/datascript/test/query_fns.cljc
clojure
plain predicate join in predicate join with extra symbols empty result pred over const, true pred over const, false
(ns datascript.test.query-fns (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]) [datascript.core :as d] [datascript.db :as db] [datascript.test.core :as tdc]) #?(:clj (:import [clojure.lang Except...
2cc04b9a163f2d9fc5568687a0909bacf1ad6206ec34dc64681bf91273bff661
Bike/hominy
numbers.lisp
(in-package #:hominy/baselib) Kernel has a couple impedance mismatches with CL here . ;;; In particular I have not really looked at "inexact" numbers much. ;;; So for now only rationals are supported. (eval-when (:compile-toplevel :load-toplevel :execute) (defclass exact-infinity () ()) (defclass -infinity (exa...
null
https://raw.githubusercontent.com/Bike/hominy/ee8bb886d26f9c04eadf978ddbf4141c687b0c74/baselib/numbers.lisp
lisp
In particular I have not really looked at "inexact" numbers much. So for now only rationals are supported. sum of -infinity and +infinity has no primary value, which is an error with strict arithmetic. which i'm just gonna say is on. meaning the reader should be returning infinities when it sees these, not a symbo...
(in-package #:hominy/baselib) Kernel has a couple impedance mismatches with CL here . (eval-when (:compile-toplevel :load-toplevel :execute) (defclass exact-infinity () ()) (defclass -infinity (exact-infinity) ()) (defclass +infinity (exact-infinity) ())) (defconstant -infinity (if (boundp '-infinity) (symb...
0ad7ea2f85afd517ae26ce73820b176a42717ddd701e9338366869768a36a974
mbutterick/beautiful-racket
expander.rkt
#lang br/quicklang (provide (matching-identifiers-out #rx"^b-" (all-defined-out))) (define-macro (b-line NUM STATEMENT ...) (with-pattern ([LINE-NUM (prefix-id "line-" #'NUM #:source #'NUM)]) (syntax/loc caller-stx (define (LINE-NUM) (void) STATEMENT ...)))) (define-m...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo/expander.rkt
racket
#lang br/quicklang (provide (matching-identifiers-out #rx"^b-" (all-defined-out))) (define-macro (b-line NUM STATEMENT ...) (with-pattern ([LINE-NUM (prefix-id "line-" #'NUM #:source #'NUM)]) (syntax/loc caller-stx (define (LINE-NUM) (void) STATEMENT ...)))) (define-m...
4fc37b21b55f2d829bfacf3c0e5e0762f4f64eb2d39c21480e55b788a93d9989
sneerteam/sneer
future.clj
(ns rx.lang.clojure.future "Functions and macros for making rx-ified futures. That is, run some code in some other thread and return an Observable of its result. " (:require [rx.lang.clojure.interop :as iop] [rx.lang.clojure.core :as rx])) (def ^:private -ns- *ns*) (defn future* "Exerimental/Po...
null
https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/rx/lang/clojure/future.clj
clojure
eventually outputs content of input.txt
(ns rx.lang.clojure.future "Functions and macros for making rx-ified futures. That is, run some code in some other thread and return an Observable of its result. " (:require [rx.lang.clojure.interop :as iop] [rx.lang.clojure.core :as rx])) (def ^:private -ns- *ns*) (defn future* "Exerimental/Po...
c46490ecba11e9f5b93483f26009594f5e2d84881dc5e11a51c1c2d20b4ad729
google/codeworld
source.hs
Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to ...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/andOnPrograms/source.hs
haskell
Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to ...
82b0da842b50b781e4d04fa7593e98ae0707392bf9e825040916353f6f45e40a
zcaudate/hara
transform.clj
(ns hara.data.base.transform) (defn template? "checks if an object is a template (template? \"{{template}}\") => true (template? :not-one) => false" {:added "3.0"} [s] (and (string? s) (.startsWith s "{{") (.endsWith s "}}"))) (defn find-templates "finds the template with assoc...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/data/base/transform.clj
clojure
(ns hara.data.base.transform) (defn template? "checks if an object is a template (template? \"{{template}}\") => true (template? :not-one) => false" {:added "3.0"} [s] (and (string? s) (.startsWith s "{{") (.endsWith s "}}"))) (defn find-templates "finds the template with assoc...
2d972e7dc3aa79b465a95ca4177ad2664f4fd72e3075dafca0c8e070beb33739
nd/bird
2.5.1.hs
fun :: (Either Bool Char) -> Bool fun (Left a) = True fun (Right c) = False fun undefined = fun undefined
null
https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch02/2.5.1.hs
haskell
fun :: (Either Bool Char) -> Bool fun (Left a) = True fun (Right c) = False fun undefined = fun undefined
4b48ab3f9009fb01f7f407cdad74cb42c2a9b9bed81587557f3e2cff1f808938
pdarragh/parsing-with-zippers-paper-artifact
define.ml
type 'a eq_type = | Eq | Equal | Custom of ('a -> 'a -> bool) let eq_lookup (eq : 'a eq_type) : ('a -> 'a -> bool) = match eq with | Eq -> (==) | Equal -> (=) | Custom f -> f module type MakeHashedType = sig type key val eq : key eq_type end The MakeHash module w...
null
https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/benchmark/pwz_bench/generate/static/define.ml
ocaml
`hash_ref` is a translation of `hash-ref` from Racket. `fix` is a function which computes a fixed point of another function. This implementation is based on the `define/fix` syntax extension defined in `fixed-points.rkt` in the original implementation. The predicates in the `func` function have been ...
type 'a eq_type = | Eq | Equal | Custom of ('a -> 'a -> bool) let eq_lookup (eq : 'a eq_type) : ('a -> 'a -> bool) = match eq with | Eq -> (==) | Equal -> (=) | Custom f -> f module type MakeHashedType = sig type key val eq : key eq_type end The MakeHash module w...