_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
b7f2f4d7e4265caa50252f945e912620b1b0c4bf539531784181a82aa752282b
soegaard/urlang
test-async-and-await.rkt
#lang racket (require urlang urlang/extra) ;;; ;;; TEST ;;; ; This file contains tests for the async and await. ; Note: the keyword for ES6 let declarations is let-decl. ; we have used the keyword let for Racket-like let-expressions. ;;; Note: No output means all tests ran successfully. ;;; Note: You need...
null
https://raw.githubusercontent.com/soegaard/urlang/086622e2306e72731016c7108aca3328e5082aee/urlang/tests/test-async-and-await.rkt
racket
TEST This file contains tests for the async and await. Note: the keyword for ES6 let declarations is let-decl. we have used the keyword let for Racket-like let-expressions. Note: No output means all tests ran successfully. Note: You need to install node in order to run these tests. / Ru...
#lang racket (require urlang urlang/extra) both a JavaScript file and a file containing names of exports . Then node ( a command line version of the JavaScript engine used in Chrome ) is invoked on the JavaScript file , and the run using Node ? print generated JavaScript ? (current-urlang-console.log-m...
02787600ca2bb1a2cccf28f654deec8b5a1a0ad6d184adfd854ccacf5558ba31
locusmath/locus
object.clj
(ns locus.associative-algebra.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.struc...
null
https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/associative_algebra/core/object.clj
clojure
Associative algebras Let R be a ring, then an associative algebra over R is a ring over R that is simultaneously a module over R. In some cases, the underlying base ring might be required to be a field, so that the associative algebra must necessarily form a field. Convert a ring homomorphism into an associative ...
(ns locus.associative-algebra.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.struc...
cace17418a34f26ae046ccb32a9e2e23775017ab97b2591069e5626508bf7844
oakes/tile-soup
terraintypes.cljc
(ns tile-soup.terraintypes (:require [clojure.spec.alpha :as s] [tile-soup.utils :as u] [tile-soup.terrain :as terrain])) (defmulti spec :tag) (defmethod spec :terrain [_] ::terrain/terrain) (defmethod spec :default [x] (throw (ex-info (str (:tag x) " not supported in terraintypes tags") {}...
null
https://raw.githubusercontent.com/oakes/tile-soup/e2d495523af59322891f667859d39478d118a7c2/src/tile_soup/terraintypes.cljc
clojure
(ns tile-soup.terraintypes (:require [clojure.spec.alpha :as s] [tile-soup.utils :as u] [tile-soup.terrain :as terrain])) (defmulti spec :tag) (defmethod spec :terrain [_] ::terrain/terrain) (defmethod spec :default [x] (throw (ex-info (str (:tag x) " not supported in terraintypes tags") {}...
8d9679131fbff8289d21bad823880c70b4af4ce182195a64a0d67c1c117d6e81
illiichi/orenolisp
transforms.clj
(ns orenolisp.commands.transforms (:require [orenolisp.model.conversion :as conv] [orenolisp.model.forms :as form] [orenolisp.model.editor :as ed])) (defn- find-nearest-ident [editor ident-value] (ed/find-by-first-element editor #(ed/move % :parent) #(= (:value %...
null
https://raw.githubusercontent.com/illiichi/orenolisp/7b085fb687dbe16b5cbe8c739238bbaf79156814/src/orenolisp/commands/transforms.clj
clojure
fixme when node-id has been changed
(ns orenolisp.commands.transforms (:require [orenolisp.model.conversion :as conv] [orenolisp.model.forms :as form] [orenolisp.model.editor :as ed])) (defn- find-nearest-ident [editor ident-value] (ed/find-by-first-element editor #(ed/move % :parent) #(= (:value %...
a305ac3b8932d2a325d756d4d04fccbf5409adac3253b2991b316615a1e944ba
timothypratley/leaderboardx
common.cljs
(ns algopop.leaderboardx.app.views.common (:require [goog.dom.forms :as forms] [reagent.core :as reagent] [reagent.dom :as dom] [cljs.test :as t :include-macros true :refer-macros [testing is]] [devcards.core :as dc :refer-macros [defcard deftest]] [cljs.too...
null
https://raw.githubusercontent.com/timothypratley/leaderboardx/ad1719b3bb49fb7ab495ed833f1a451ebb3aec4d/src/algopop/leaderboardx/app/views/common.cljs
clojure
TODO: what about decimal numbers? TODO: is this the right way to get numbers? /shrug seems to work TODO: move tests to another namespace to save production build size TODO: make collapsable?? maybe... but it works? maybe not a bad thing? TODO: entities might not be either nodes or edges?
(ns algopop.leaderboardx.app.views.common (:require [goog.dom.forms :as forms] [reagent.core :as reagent] [reagent.dom :as dom] [cljs.test :as t :include-macros true :refer-macros [testing is]] [devcards.core :as dc :refer-macros [defcard deftest]] [cljs.too...
bd46ac01cf5148546a2b55a652661902f4494e21dffd61b6a5b228ebeb864317
rd--/hsc3
hairCell.help.hs
hairCell ; constantly self oscillates at 5 Hz pan2 (X.hairCell (soundIn 0) 5.0 100 1000 0.99) 0 0.1 -- hairCell pan2 (X.hairCell (saw ar (mouseX kr 1 10 Linear 0.2)) 0 (mouseY kr 0 10000 Linear 0.2) 1000 0.99) 0 0.5
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/hairCell.help.hs
haskell
hairCell
hairCell ; constantly self oscillates at 5 Hz pan2 (X.hairCell (soundIn 0) 5.0 100 1000 0.99) 0 0.1 pan2 (X.hairCell (saw ar (mouseX kr 1 10 Linear 0.2)) 0 (mouseY kr 0 10000 Linear 0.2) 1000 0.99) 0 0.5
b4efdc6fe07b902ed3a6388fc1a80cf09c984458741a14c84c1dc1bcb10d7df2
ArtichOwO/r86
main.ml
open R86 open Args let () = Arg.parse speclist anon_fun usage_msg; match List.hd !input_file with | "" -> Log.log @@ Log.SysError "No input file specified."; exit 1 | _ -> ( if !compile then let file_content = try Core.In_channel.read_all @@ List.hd !input_file wit...
null
https://raw.githubusercontent.com/ArtichOwO/r86/85d118561ec7c52e969a6439a0e6a451ff81c796/bin/main.ml
ocaml
open R86 open Args let () = Arg.parse speclist anon_fun usage_msg; match List.hd !input_file with | "" -> Log.log @@ Log.SysError "No input file specified."; exit 1 | _ -> ( if !compile then let file_content = try Core.In_channel.read_all @@ List.hd !input_file wit...
781f450accf268862b28007ce8bab6fa2934f35286d723e61411faff4ec23e6e
realworldocaml/book
ppx_bin_prot.ml
(** Ppx_bin_prot: Preprocessing Module for a Type Safe Binary Protocol *) open Base open Ppxlib open Ast_builder.Default let ( @@ ) a b = a b (* +-----------------------------------------------------------------+ | Signature generators | +-----------------------------...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_bin_prot/src/ppx_bin_prot.ml
ocaml
* Ppx_bin_prot: Preprocessing Module for a Type Safe Binary Protocol +-----------------------------------------------------------------+ | Signature generators | +-----------------------------------------------------------------+ +------------------------------------...
open Base open Ppxlib open Ast_builder.Default let ( @@ ) a b = a b module Sig = struct let mk_sig_generator combinators = let mk_sig ~ctxt:_ (_rf, tds) = List.concat_map tds ~f:(fun td -> let td = name_type_params_in_td td in List.map combinators ~f:(fun mk -> mk td)) in Derivin...
513f7048e32b2af93d628092525f1c0699be18a4041f6547c88420126f1e0201
sorted-falnyd/clj-airlock-client
api.clj
(ns sorted-falnyd.airlock.client.api (:require [sorted-falnyd.airlock.ship :as ship] [sorted-falnyd.airlock.connection :as conn] [sorted-falnyd.airlock.http :as http])) (defn client "Construct an API Client. Returns a map describing the connection which contains a channel on which all subscription up...
null
https://raw.githubusercontent.com/sorted-falnyd/clj-airlock-client/44f7756e927433628b6758179f460681c3994e1d/src/main/clojure/sorted_falnyd/airlock/client/api.clj
clojure
(ns sorted-falnyd.airlock.client.api (:require [sorted-falnyd.airlock.ship :as ship] [sorted-falnyd.airlock.connection :as conn] [sorted-falnyd.airlock.http :as http])) (defn client "Construct an API Client. Returns a map describing the connection which contains a channel on which all subscription up...
cfb692209fc419f606c245142e1b27137428921b4aaeb15d1db405eca598da77
thattommyhall/offline-4clojure
p34.clj
;; Implement range - Easy ;; Write a function which creates a list of all integers in a given range. ;; tags - seqs:core-functions ;; restricted - range (ns offline-4clojure.p34 (:use clojure.test)) (def __ ;; your solution here ) (defn -main [] (are [soln] soln (= (__ 1 4) '(1 2 3)) (= (__ -2 2) '(-2 -1 0 1)) (=...
null
https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p34.clj
clojure
Implement range - Easy Write a function which creates a list of all integers in a given range. tags - seqs:core-functions restricted - range your solution here
(ns offline-4clojure.p34 (:use clojure.test)) (def __ ) (defn -main [] (are [soln] soln (= (__ 1 4) '(1 2 3)) (= (__ -2 2) '(-2 -1 0 1)) (= (__ 5 8) '(5 6 7)) ))
2ae904faa8064cd188aa365dc2f87f1c8a30ea0a4ae9c6d85869a4545ac77360
fishcakez/acceptor_pool
acceptor.erl
%%------------------------------------------------------------------- %% Copyright ( c ) 2016 , < > %% 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 License at %% %% -2.0 ...
null
https://raw.githubusercontent.com/fishcakez/acceptor_pool/7eeda6c129577723e968735ee5495e00dd2e47da/src/acceptor.erl
erlang
------------------------------------------------------------------- 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, KIND, either express or implied. See the Lic...
Copyright ( c ) 2016 , < > This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc This module provides a ` gen_tcp ' acceptor behaviour for use with ` acceptor_pool ' . There are th...
64b3139c5790de37bb86fe3c3f733e48568357a30bc500888875fd722f50c539
tmattio/js-bindings
http2.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - Buffer - BufferEncoding - Error - EventEmitter - Http1IncomingHttpHeaders - NodeJS.ArrayBufferView - NodeJS.ErrnoException - OutgoingHttpHeaders ...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/node/_gen/http2.mli
ocaml
import * as fs from 'node:fs'; import * as net from 'node:net'; import * as stream from 'node:stream'; import * as tls from 'node:tls'; import * as url from 'node:url'; export { OutgoingHttpHeaders } from 'node:http'; FIXME: type 'Array<union<String | ?url.URL | {..}>>' cannot be used for variadic argument...
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - Buffer - BufferEncoding - Error - EventEmitter - Http1IncomingHttpHeaders - NodeJS.ArrayBufferView - NodeJS.ErrnoException - OutgoingHttpHeaders ...
1d8b1737b8f84d6c5c5746bda201f096a83144d3fdb288038484f881fa63cc8e
ygmpkk/house
Initialization.hs
-------------------------------------------------------------------------------- -- | Module : Graphics . UI.GLUT.Initialization Copyright : ( c ) 2003 -- License : BSD-style (see the file libraries/GLUT/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/GLUT/Graphics/UI/GLUT/Initialization.hs
haskell
------------------------------------------------------------------------------ | License : BSD-style (see the file libraries/GLUT/LICENSE) Maintainer : Stability : provisional Portability : portable The primary initialization routine is 'initialize', which should only be be called before 'initiali...
Module : Graphics . UI.GLUT.Initialization Copyright : ( c ) 2003 Actions and state variables in this module are used to initialize GLUT state . called exactly once in a GLUT program . No other GLUT or OpenGL actions should 400 400)@ before ' initialize ' is called to indicate 400 by 400 is the...
9e3c67df49ca9b84df11558bd0c8bfe326a4e5811ca683f45b48bab1a3ee07dc
RefactoringTools/wrangler
refac_intro_new_var.erl
Copyright ( c ) 2010 , , %% 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...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/7f4c120e4bf06a39d8762caa60b4c88ef03086b0/src/refac_intro_new_var.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. %% Redi...
Copyright ( c ) 2010 , , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR @private -module(refac_intro_new_var). -export([intro_new_var/7, intro_new_var_eclipse/6, is_available_at/3]). -export([do_intro...
f0e300be03fe3204cf42ab392166ef5ffcd1a16f8ed48fa7fdfb6510809a47e8
apache/couchdb-rebar
protobuffs_compile.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2015 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/proto_protobuffs/mock/protobuffs/src/protobuffs_compile.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2015 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
d32cfd042eccde9457d44add41b1eeb9a0ccea391ff99eff2646ea528735e394
anmonteiro/lumo
preload.cljs
(ns preloads-test.preload) (def preload-var :foo)
null
https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/cljs/preloads_test/preload.cljs
clojure
(ns preloads-test.preload) (def preload-var :foo)
de92d0e4a40b0be83e386497d459ae01ad5581ca7bc621dea8a80faa0428bfd2
ekmett/haskell
Evaluation.hs
{-# Language CPP #-} {-# Language LambdaCase #-} {-# Language BlockArguments #-} {-# Language ScopedTypeVariables #-} {-# Language BangPatterns #-} -- | Copyright : ( c ) 2020 , 2020 License : BSD-2 - Clause OR Apache-2.0 Maintainer : < > -- Stability : experimental -- Portability: non-portable ...
null
https://raw.githubusercontent.com/ekmett/haskell/37ad048531f5a3a13c6dfbf4772ee4325f0e4458/ulf/src/Elaborate/Evaluation.hs
haskell
# Language CPP # # Language LambdaCase # # Language BlockArguments # # Language ScopedTypeVariables # # Language BangPatterns # | Stability : experimental Portability: non-portable eval we get back the new spine. We use (-1) in order to make the hack clear in potential debugging situations. # inline nf #
Copyright : ( c ) 2020 , 2020 License : BSD-2 - Clause OR Apache-2.0 Maintainer : < > QLF.Elaborate . Evaluation module Elaborate.Evaluation where import Common.Icit #ifdef FCIF import Common.Names #endif import Data.Functor ((<&>)) import Elaborate.Term import Elaborate.Value import GHC.IO....
8f88b9e6900a92ab564e66634d58c6d74b5554fc4123805a11b2e79d07a8695c
dhleong/spade
dom.cljs
(ns spade.container.dom "The DomStyleContainer renders styles into DOM elements. References to those elements are stored in a `styles` atom, or `*injected-styles*` if that is not provided. Similarly, if no `target-dom` is provided, the `document.head` element is used." (:require [spade.container :refer [IS...
null
https://raw.githubusercontent.com/dhleong/spade/d77c2adcf451aa9c0b55bd0a835d53f95c7becf4/src/spade/container/dom.cljs
clojure
(ns spade.container.dom "The DomStyleContainer renders styles into DOM elements. References to those elements are stored in a `styles` atom, or `*injected-styles*` if that is not provided. Similarly, if no `target-dom` is provided, the `document.head` element is used." (:require [spade.container :refer [IS...
269db7597cdd804b677adcf7abb58d69dd6a22e39fabe9458f048f3ba3e84418
ggreif/omega
TwoHoles.hs
# LANGUAGE GADTs , KindSignatures , DataKinds # module TwoHoles where data Nat = Z | S Nat data Tree a = Node (Tree a) (Tree a) | Leaf a deriving Show data TreeWithHoles :: Nat -> Nat -> * -> * where HLeaf :: a -> TreeWithHoles n n a HNode :: TreeWithHoles m n a -> TreeWithHoles n o a -> TreeWithHoles m o a ...
null
https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/TwoHoles.hs
haskell
# LANGUAGE GADTs , KindSignatures , DataKinds # module TwoHoles where data Nat = Z | S Nat data Tree a = Node (Tree a) (Tree a) | Leaf a deriving Show data TreeWithHoles :: Nat -> Nat -> * -> * where HLeaf :: a -> TreeWithHoles n n a HNode :: TreeWithHoles m n a -> TreeWithHoles n o a -> TreeWithHoles m o a ...
c9afdba19fb66b2f55a009483d7e56efebaa0bec11815c7d21f36e46e4aadf4d
mzp/coq-for-ipad
topdirs.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/toplevel/topdirs.mli
ocaml
********************************************************************* Objective Caml ...
, 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 . $ I d : topdirs.mli 4694 2002 - 04 - ...
b025b65da6769f03116609f9d3c501f4560f5d4cb267cf5587f096486898ed66
vimus/libmpd-haskell
Class.hs
# LANGUAGE FlexibleContexts # -- | Module : Network.MPD.Core.Class Copyright : ( c ) 2005 - 2009 , Joachim Fasting 2010 License : MIT ( see LICENSE ) -- Maintainer : Joachim Fasting <> -- Stability : alpha -- -- The MPD typeclass. module Network.MPD.Core.Class where import Data.ByteStri...
null
https://raw.githubusercontent.com/vimus/libmpd-haskell/1ec02deba33ce2a16012d8f0954e648eb4b5c485/src/Network/MPD/Core/Class.hs
haskell
| Module : Network.MPD.Core.Class Maintainer : Joachim Fasting <> Stability : alpha The MPD typeclass. | A typeclass to allow for multiple implementations of a connection | Close the connection. | Send a string to the server and return its response. | Produce a password to send to the server should it as...
# LANGUAGE FlexibleContexts # Copyright : ( c ) 2005 - 2009 , Joachim Fasting 2010 License : MIT ( see LICENSE ) module Network.MPD.Core.Class where import Data.ByteString (ByteString) import Network.MPD.Core.Error (MPDError) import Control.Monad.Except (MonadError) typ...
4bc3199650024373173fae7851cd4e814afcb854bbe5c61d2a9c9099e4a0b0a8
OCamlPro/drom
commandTest.ml
(**************************************************************************) (* *) Copyright 2020 OCamlPro & Origin Labs (* *) (* All rights ...
null
https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/commandTest.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2020 OCamlPro & Origin Labs GNU Lesser General Public License version 2.1 , with the special open Ezcmd.V2 open EZCMD.TYPES open Ez_file.V1 open EzFile.OP let cmd_name = "test" let action ~all ~args () = let (p : Types.project) = Build.build ~dev_deps:true ~a...
14ec1a9c61391b427487e880fb44d35eccd30327d7db757b25034e3df4b0ea8d
ormf/cm
midi1.lisp
;;; ********************************************************************** Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu > ;;; ;;; This program is free software; you can redistribute it and/or modify it under the terms of the Lisp Lesser Gnu Public License . See for the text of this agreement . ;;; **...
null
https://raw.githubusercontent.com/ormf/cm/26843eec009bd6c214992a8e67c49fffa16d9530/src/midi1.lisp
lisp
********************************************************************** This program is free software; you can redistribute it and/or **********************************************************************
Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu > modify it under the terms of the Lisp Lesser Gnu Public License . See for the text of this agreement . generated by scheme->cltl from midi1.scm on 04 - Aug-2009 14:11:46 (in-package :cm) (defparameter +enc-route-byte+ (byte 10 22)) (defparameter +e...
d5cb298ff0e6932f6fe8345e04876637ecccd271881215bcf54d31bd0c2adaca
dropbox/datagraph
NumberDataSource.hs
# LANGUAGE StandaloneDeriving , GADTs , TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving , OverloadedStrings # # OPTIONS_GHC -fno - warn - orphans # module NumberDataSource where import Data.Hashable import Haxl.Core import Data.IORef import Control.Monad (forM_) import Text.Printf import GraphQLHelp...
null
https://raw.githubusercontent.com/dropbox/datagraph/429957ebdbf1ef3553dabb2a8f7b16056ef4ac41/src/NumberDataSource.hs
haskell
# LANGUAGE StandaloneDeriving , GADTs , TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving , OverloadedStrings # # OPTIONS_GHC -fno - warn - orphans # module NumberDataSource where import Data.Hashable import Haxl.Core import Data.IORef import Control.Monad (forM_) import Text.Printf import GraphQLHelp...
0126149db5d99d806261ec2d87ab09f03252e85a0eaeb8d43de40ba7716f6a73
2600hz/kazoo
kzt_twiml_util.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author 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 /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_translator/src/converters/kzt_twiml_util.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz @author 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 /. -module(kzt_twiml_util). -export([get_terminators/1 ,loop_count/1 ,get_voice/1 ...
934f90d7a3252719a1472e72447a99d231f833973e81dadaf97f54f96dde2aa9
dongcarl/guix
haskell-crypto.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2015 , 2017 , 2018 , 2019 < > Copyright © 2016 Nikita < > Copyright © 2017 rsiddharth < > Copyright © 2017 , 2019 < > Copyright © 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free softw...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/haskell-crypto.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 © 2015 < > Copyright © 2015 , 2017 , 2018 , 2019 < > Copyright © 2016 Nikita < > Copyright © 2017 rsiddharth < > Copyright © 2017 , 2019 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU Gener...
dc995401bca7025e8eeead5b4ceb709debff2471dd2443bdfab2451cac1744a0
marianoguerra/jwt-erl
jwt_SUITE.erl
-module(jwt_SUITE). -compile(export_all). -include("jwt.hrl"). all() -> [encode_decode, decode_with_bad_secret, decode_empty_token, decode_bad_token, decode_bad_token_3_parts, decode_bad_sig, decode_expired]. init_per_suite(Config) -> Config. end_per_suite(Config) -> Config. check_encode_dec...
null
https://raw.githubusercontent.com/marianoguerra/jwt-erl/a9cd8af4d3318bcb79de523d4e95d5f1ff414542/test/jwt_SUITE.erl
erlang
-module(jwt_SUITE). -compile(export_all). -include("jwt.hrl"). all() -> [encode_decode, decode_with_bad_secret, decode_empty_token, decode_bad_token, decode_bad_token_3_parts, decode_bad_sig, decode_expired]. init_per_suite(Config) -> Config. end_per_suite(Config) -> Config. check_encode_dec...
b3c870bf43511369f905486fcf46e5a2123aeca0062ef0eca4c5250d49ade4da
bugczw/Introduction-to-Functional-Programming-in-OCaml
functions.ml
let f x = x+1;; (* global definition *) f 17;; let g y = 2*y (* local definition *) in g 42;; f f 1;; (f f) 1;; f (f 1);;
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W1_ALL/functions.ml
ocaml
global definition local definition
f 17;; in g 42;; f f 1;; (f f) 1;; f (f 1);;
e2fc1f7df9665156a7f754477e4acfac95117ef95fdc798534f8354687ec7ba7
openmusic-project/openmusic
traject-editor.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : you can redist...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/0bd8613a844a382e5db7185be1b5a5d026d66b20/OPENMUSIC/code/projects/space/3D/traject-editor.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. =================...
OpenMusic : Visual Programming Language for Music Composition Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License ...
f84fada4ca7184659d04d7712a2b2211475c68310b6bfa08cb311de1ce25c5bc
shayne-fletcher/zen
unification.ml
(*The type of a term*) type ('a, 'b) term = | Var of 'b | Term of 'a * ('a, 'b) term list (* Assume [term_fold] to operate on arguments of type [('a, 'd) term]. It "returns" either via [f] or [v], and so [f], [v] and [term_fold] must share the same return type, ['c] say. Since the intermediate list results fr...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/term/unification.ml
ocaml
The type of a term Assume [term_fold] to operate on arguments of type [('a, 'd) term]. It "returns" either via [f] or [v], and so [f], [v] and [term_fold] must share the same return type, ['c] say. Since the intermediate list results from recursive calls to [term_fold] then it must have type ['c list]. This...
type ('a, 'b) term = | Var of 'b | Term of 'a * ('a, 'b) term list let rec term_fold (f : ('a * 'b) -> 'c) (g : 'c -> 'b -> 'b) (x : 'b) (v : 'd -> 'c) : ('a, 'd ) term -> 'c = function | Term (a, tl) -> let l : 'c list = List.map (term_fold f g x v) tl in let res : 'b = List.fold_right g l x in ...
abe3f9c528cb175589068f4eb2a0837ec690d32f79436a8c735b095193b9b90f
emotiq/emotiq
generate.lisp
(in-package :emotiq/config/generate) (um:defconstant+ +default-configuration+ `((:hostname . "localhost") (:ip . "127.0.0.1") (:rest-server . :true) (:rest-server-port . 3140) (:websocket-server . :true) (:websocket-server-port . 3145) (...
null
https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/generate.lisp
lisp
devops-ansible hook passes the network generation routines The ports take the default values if not otherwise specified Override by pushing ahead in alist FIXME: JSON doesn't currently round-trip very well, so use LISP-OBJECT-ENCODER as a workaround. Hmm? FIXME kludge
(in-package :emotiq/config/generate) (um:defconstant+ +default-configuration+ `((:hostname . "localhost") (:ip . "127.0.0.1") (:rest-server . :true) (:rest-server-port . 3140) (:websocket-server . :true) (:websocket-server-port . 3145) (...
9809825351de612f973a0246791ccb5646d6d7505f2a85a8a7a505bb4dc39397
finnishtransportagency/harja
johto_ja_hallintokorvaus_osio.cljs
(ns harja.views.urakka.suunnittelu.kustannussuunnitelma.johto-ja-hallintokorvaus-osio (:require [reagent.core :as r] [harja.tiedot.urakka.suunnittelu.mhu-kustannussuunnitelma :as t] [harja.ui.taulukko.grid :as grid] [harja.ui.yleiset :as yleiset] [harja.ui.kentat :as ke...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/6170c269fefe11ce5bf93932e85b5c9a9edb4879/src/cljs/harja/views/urakka/suunnittelu/kustannussuunnitelma/johto_ja_hallintokorvaus_osio.cljs
clojure
jh-yhteenvetopaivitys -funktiolle parametreiksi. :oma = itselisätyn toimenkuvan nimi-solu Tuntipalkka-solu Pudotusvalikko-solu -- --- Palauta aina grid --- | -- Gridit päättyy -----
(ns harja.views.urakka.suunnittelu.kustannussuunnitelma.johto-ja-hallintokorvaus-osio (:require [reagent.core :as r] [harja.tiedot.urakka.suunnittelu.mhu-kustannussuunnitelma :as t] [harja.ui.taulukko.grid :as grid] [harja.ui.yleiset :as yleiset] [harja.ui.kentat :as ke...
1935f49ad8a8d2a444f9e910c18a9f41e545adad1ce19bb93ca92bb371a56efb
parsimony-ide/parsimony
common_test.clj
(ns parsimony.common-test (:require [alanlcode.util.os :as os] [clojure.test :refer [is]])) (defmacro is-not [arg & args] `(is (not ~arg) ~@args)) (defn temp-db-file [] (-> (os/make-temp-file (os/temp-directory) "temp-rdag" ".db") (os/->file) (doto (.deleteOnExit))))
null
https://raw.githubusercontent.com/parsimony-ide/parsimony/1744e8b4a921a50dfbd0815499cf3af1059590c8/test/parsimony/common_test.clj
clojure
(ns parsimony.common-test (:require [alanlcode.util.os :as os] [clojure.test :refer [is]])) (defmacro is-not [arg & args] `(is (not ~arg) ~@args)) (defn temp-db-file [] (-> (os/make-temp-file (os/temp-directory) "temp-rdag" ".db") (os/->file) (doto (.deleteOnExit))))
b9123734c950038188844237a3da1f6b722ca01f7d66aa103f6661536f9cf96f
footprintanalytics/footprint-web
types.cljc
(ns metabase.types "The Metabase Hierarchical Type System (MHTS). This is a hierarchy where types derive from one or more parent types, which in turn derive from their own parents. This makes it possible to add new types without needing to add corresponding mappings in the frontend or other places. For example, a...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/shared/src/metabase/types.cljc
clojure
we can add this type as a derivative of `:type/Text` and everywhere else can it may be the same as base type or something different if the column has a we might choose to interpret this column as a timestamp column by giving it an effective type its the fact that this column is used to record update timestamps is ...
(ns metabase.types "The Metabase Hierarchical Type System (MHTS). This is a hierarchy where types derive from one or more parent types, which in turn derive from their own parents. This makes it possible to add new types without needing to add corresponding mappings in the frontend or other places. For example, a...
50e3df9b9df53582b4a131cb0e75a5bd373ce88d3141fd6c5f869eace7ac6cfe
gvolpe/haskell-book-exercises
intermission.hs
data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn v) (TisAn v') = v == v' data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two a b) (Two a' b') = a == a' && b == b' data StringOrInt = TisAnInt Int | TisAString String instance Eq StringOrInt where (==) (Tis...
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter6/intermission.hs
haskell
data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn v) (TisAn v') = v == v' data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two a b) (Two a' b') = a == a' && b == b' data StringOrInt = TisAnInt Int | TisAString String instance Eq StringOrInt where (==) (Tis...
06efb291430ef5b4be5f92dd03676126677b2989bfdb8b29348a4c31c8923815
jaspervdj/tweetov
Markov.hs
-- | Generate tweets based on markov chains. -- {-# LANGUAGE OverloadedStrings #-} module Tweetov.Twitter.Markov ( markovTweet ) where import Data.Text (Text) import qualified Data.Text as T import Data.Char (isAlphaNum) import Tweetov.Twitter (Tweet (..)) import Tweetov.Data.Markov -- | Extract a 'Sample' f...
null
https://raw.githubusercontent.com/jaspervdj/tweetov/b310da0844ed9bfe8696ffba6f70ea0194dd6144/src/Tweetov/Twitter/Markov.hs
haskell
| Generate tweets based on markov chains. # LANGUAGE OverloadedStrings # | Extract a 'Sample' from a tweet. | Generate a random tweet ^ Author ^ Tweet samples ^ Random pool ^ Result | Check if a tweet is already too large
module Tweetov.Twitter.Markov ( markovTweet ) where import Data.Text (Text) import qualified Data.Text as T import Data.Char (isAlphaNum) import Tweetov.Twitter (Tweet (..)) import Tweetov.Data.Markov sampleFromTweet :: Tweet -> Sample Text sampleFromTweet = Sample . filter (not . T.null) . m...
8f68df0626151cf592e345f0cc21c6ebc253a65d77dbc9674a4735f3d1d2ea35
yzhs/ocamlllvm
misc.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/utils/misc.ml
ocaml
********************************************************************* Objective Caml ...
, 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 . $ I d : misc.ml 7909 2007 - 02 - 23 1...
6162862143be415b27513b59bceb01341529c46cea75a1dd97887bc924a1c238
parapluu/Concuerror
depend_4_2.erl
-module(depend_4_2). -export([result/0, procs/0, run/1]). result() -> io:format("20"). procs() -> io:format("6"). run(Procs) -> [S] = io_lib:format("~p",[Procs]), initial(), run_aux(S), block(). run_aux([]) -> ok; run_aux([P|R]) -> spawn(fun() -> proc(P) end), run_aux(R). block() -> re...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/resources/perm_tests/src/depend_4_2.erl
erlang
-module(depend_4_2). -export([result/0, procs/0, run/1]). result() -> io:format("20"). procs() -> io:format("6"). run(Procs) -> [S] = io_lib:format("~p",[Procs]), initial(), run_aux(S), block(). run_aux([]) -> ok; run_aux([P|R]) -> spawn(fun() -> proc(P) end), run_aux(R). block() -> re...
46d46efcc8a1358a4e6742c750e6abdf13fbcbe69abd072455f252239551cded
mmzeeman/elli_websocket
elli_ws_request_adapter.erl
@author < > 2013 %% @doc . %% Copyright 2013 %% 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 agr...
null
https://raw.githubusercontent.com/mmzeeman/elli_websocket/7545c031ef3d8cf67c2485121b369441ecb9d7c9/src/elli_ws_request_adapter.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing ...
@author < > 2013 @doc . Copyright 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(elli_ws_request_adapter). -include_lib("elli/include/elli.hrl"). -export([ init/2, get/2, maybe_...
bad4f0aaad9847d9d95a2be77f7597557272c7f7a45d4ca8697c36a824f03477
nikomatsakis/a-mir-formality
implied-bounds--supertraits.rkt
#lang racket (require redex/reduction-semantics "../../util.rkt" "../grammar.rkt" "../prove.rkt" ) (module+ test (redex-let* formality-rust [(Rust/Program (term ([(crate C { (trait PartialEq[] where [] {}) (trait Eq[] where [(Self : Part...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/71be4d5c4bd5e91d326277eaedd19a7abe3ac76a/racket-src/rust/test/implied-bounds--supertraits.rkt
racket
#lang racket (require redex/reduction-semantics "../../util.rkt" "../grammar.rkt" "../prove.rkt" ) (module+ test (redex-let* formality-rust [(Rust/Program (term ([(crate C { (trait PartialEq[] where [] {}) (trait Eq[] where [(Self : Part...
bffc85b7b5b83ed8a1f97d4ed0dece84e629b4790137b23e1d5a7cd431c00685
webyrd/wreckto-verseo
absento-tests.scm
Tests for general absento , where the first argument is n't a ground atom . (test "test 0" (run* (q) (absento q q)) '()) (test "test 1" (run* (q) (fresh (a b c) (== a b) (absento b c) (== c b) (== `(,a ,b ,c) q))) '()) (test "test 2" (run* (q) (fresh (a) (absento q a...
null
https://raw.githubusercontent.com/webyrd/wreckto-verseo/45ce27643a18ff7d6a8080f37a3e5d2ec984b051/faster-minikanren/absento-tests.scm
scheme
Tests for general absento , where the first argument is n't a ground atom . (test "test 0" (run* (q) (absento q q)) '()) (test "test 1" (run* (q) (fresh (a b c) (== a b) (absento b c) (== c b) (== `(,a ,b ,c) q))) '()) (test "test 2" (run* (q) (fresh (a) (absento q a...
b7de3429f4105c693b1096381683057809ecec7f822b01892f543cae7806a78f
zack-bitcoin/verkle
unit_tests.erl
-module(unit_tests). -export([doit/1]). doit(0) -> S = success, io:fwrite("leaf\n"), S = leaf:test(1), io:fwrite("stem\n"), S = stem2:test(1), io:fwrite("get\n"), S = get2:test(1), lists:map(fun(N) -> io:fwrite("fr "), io:fwrite(integer_to_lis...
null
https://raw.githubusercontent.com/zack-bitcoin/verkle/da9a014779decb3744aef197efcf972de80adccc/src/unit_tests.erl
erlang
-module(unit_tests). -export([doit/1]). doit(0) -> S = success, io:fwrite("leaf\n"), S = leaf:test(1), io:fwrite("stem\n"), S = stem2:test(1), io:fwrite("get\n"), S = get2:test(1), lists:map(fun(N) -> io:fwrite("fr "), io:fwrite(integer_to_lis...
2e8c4dda7e7658448303974ffa5057a73267888999938c23cf960dc8dc91fe0f
anwarmamat/cmsc330fall18-public
student.ml
open P3.Nfa open P3.Regexp open TestUtils open OUnit2 let m1 = { qs = [0; 1; 2; 3]; sigma = ['a'; 'b']; delta = [(0, Some 'a', 1); (0, Some 'a', 2); (2, Some 'b', 3)]; q0 = 0; fs = [1; 3] } let test_nfa_new_states ctxt = assert_set_set_eq [[]; []] (new_states m1 []); assert_set_set_eq [[1; 2]; []] (new_...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330fall18-public/12585d98d45f954f75e2f78df3062444f5f97cf6/p3/test/student.ml
ocaml
open P3.Nfa open P3.Regexp open TestUtils open OUnit2 let m1 = { qs = [0; 1; 2; 3]; sigma = ['a'; 'b']; delta = [(0, Some 'a', 1); (0, Some 'a', 2); (2, Some 'b', 3)]; q0 = 0; fs = [1; 3] } let test_nfa_new_states ctxt = assert_set_set_eq [[]; []] (new_states m1 []); assert_set_set_eq [[1; 2]; []] (new_...
d534b87a3721f76f47d7f1f93936cf7adc95d6249a00b54cd98efdd166da4c44
avsm/platform
zed_edit.ml
* zed_edit.ml * ----------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of , an editor engine . * zed_edit.ml * ----------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Zed, an editor engine. *) open CamomileLibra...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/zed.2.0.3/src/zed_edit.ml
ocaml
+-----------------------------------------------------------------+ | Types | +-----------------------------------------------------------------+ Custom data attached to the engine. The contents of the engine. The set of line position of [text]. C...
* zed_edit.ml * ----------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of , an editor engine . * zed_edit.ml * ----------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Zed, an editor engine. *) open CamomileLibra...
194fbdb493926025f0fe0ced8ea6ae317c9afc88fcad33845b86d72543b94930
joneshf/purty
Span.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} # LANGUAGE NoImplicitPrelude # module Span ( Span (..), adoBlock, betweenSourceRanges, betweenSourceTokens, binder, caseOf, comment, constraint, dataCtor, dataMembers, declaration, delimitedNonEmpty, do...
null
https://raw.githubusercontent.com/joneshf/purty/a3bd72646b3b6237e185ab4d10a1c4b50987faee/internal/format/Span.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PackageImports #
# LANGUAGE NoImplicitPrelude # module Span ( Span (..), adoBlock, betweenSourceRanges, betweenSourceTokens, binder, caseOf, comment, constraint, dataCtor, dataMembers, declaration, delimitedNonEmpty, doBlock, doStatement, export, expr, foreign', gua...
c5a07b13a25a588d9e391b300d09c3bf2d971b0c39f0b55c7d14efd2829c1adb
phylogeography/spread
subscriptions.cljs
(ns ui.subscriptions (:require [clojure.string :as string] [re-frame.core :as re-frame])) (re-frame/reg-sub ::config (fn [db _] (get db :config))) (re-frame/reg-sub ::users (fn [db _] (-> db :users (dissoc :authorized-user)))) (re-frame/reg-sub ::authorized-user (fn [db _] ...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/subscriptions.cljs
clojure
(ns ui.subscriptions (:require [clojure.string :as string] [re-frame.core :as re-frame])) (re-frame/reg-sub ::config (fn [db _] (get db :config))) (re-frame/reg-sub ::users (fn [db _] (-> db :users (dissoc :authorized-user)))) (re-frame/reg-sub ::authorized-user (fn [db _] ...
1fbfc19632b94b73995c5c76ccd59221a4c0c5bfc79681dd57609ef3fcc6acd8
igorhvr/bedlam
jndi.scm
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 ;;; / ;;; Software distributed under the License is distributed on an " AS IS " basis , ;;; WITHOUT WAR...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/scm/util/jndi.scm
scheme
you may not use this file except in compliance with the License. You may obtain a copy of the License at / WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Contributor(s): Alternatively, the contents of th...
The contents of this file are subject to the Mozilla Public License Version Software distributed under the License is distributed on an " AS IS " basis , The Original Code is SISCweb . The Initial Developer of the Original Code is . Portions created by the Initial Developer are Copyright ( C ) 2005 . Al...
e48f2f8bdca318f2d60cb8f30eb0eddc5a84149c0bf0911ad0845d459a5735d4
ucsd-progsys/nate
main.ml
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/browser/main.ml
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ I d : main.ml , v 1.34 2006/04/16 ...
760ea7e16f9a5fd9043e46c6c586b82327532ad7c59a343dcdc09ca89121dcd7
LaurentMazare/ocaml-arrow
table.ml
open Core_kernel open Arrow_c_api let%expect_test _ = let table = List.init 3 ~f:(fun i -> let cols = [ Wrapper.Writer.utf8 [| "v1"; "v2"; "v3" |] ~name:"foo" ; Wrapper.Writer.int [| i; 5 * i; 10 * i |] ~name:"bar" ; Wrapper.Writer.int_opt [| Some ((i * 2) + 1); None; None |...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-arrow/f7adb7593974fd955ad82b8324d5626c6dded8ce/tests/table.ml
ocaml
open Core_kernel open Arrow_c_api let%expect_test _ = let table = List.init 3 ~f:(fun i -> let cols = [ Wrapper.Writer.utf8 [| "v1"; "v2"; "v3" |] ~name:"foo" ; Wrapper.Writer.int [| i; 5 * i; 10 * i |] ~name:"bar" ; Wrapper.Writer.int_opt [| Some ((i * 2) + 1); None; None |...
25fbf2573fa2935e036829357b93d50f0356f29e0c4d753b893556d92c15a6e8
tjammer/olox
ast.ml
type unop = Not | Neg [@@deriving show] type binop = | Less | Less_equal | Greater | Greater_equal | Equal_equal | Plus | Minus | Star | Slash [@@deriving show] type logicop = And | Or [@@deriving show] type callable = { callable : string; call : value list -> value } and method' = value option ->...
null
https://raw.githubusercontent.com/tjammer/olox/f8febbbec5ecd1a7bd4955b0cd51da02a705e72f/lib/ast.ml
ocaml
We make the env opaque to since we don't really care about the content The env is a reference to make it easier to set values
type unop = Not | Neg [@@deriving show] type binop = | Less | Less_equal | Greater | Greater_equal | Equal_equal | Plus | Minus | Star | Slash [@@deriving show] type logicop = And | Or [@@deriving show] type callable = { callable : string; call : value list -> value } and method' = value option ->...
af28903338ee8760b967b2efe077e8d643880a3a1cff1446ffc45c99f1d95497
effectai/effect-network
swap.cljs
(ns e2e.swap (:require [eos-cljs.core :as eos] e2e.token [e2e.util :as util] ["@cityofzion/neon-js" :refer [rpc tx] :as Neon] [clojure.string :as string] (clojure.pprint :refer [pprint]) [cljs.test :refer-macros [deftest is testing run-tests async use-fixtures]] )) (def swap-acc (eos/random-a...
null
https://raw.githubusercontent.com/effectai/effect-network/17af92f491458fee8f1e0a3eb602f7be3d6384c4/tests/e2e/swap.cljs
clojure
define a new token for the swap test needs swap account authority cant update before init cant issue before init needs swap account authority cant init with invalid name can set config cant set config twice can perform update compare can add bookkeeper needs contract permission cant add same bookkeeper twi...
(ns e2e.swap (:require [eos-cljs.core :as eos] e2e.token [e2e.util :as util] ["@cityofzion/neon-js" :refer [rpc tx] :as Neon] [clojure.string :as string] (clojure.pprint :refer [pprint]) [cljs.test :refer-macros [deftest is testing run-tests async use-fixtures]] )) (def swap-acc (eos/random-a...
18a3a539c061c708c2dbbfb43bb995c078e1bb6503e2faa5af630519e03f6fd8
2600hz/kazoo
kzd_task.erl
%%%----------------------------------------------------------------------------- ( C ) 2016 - 2020 , 2600Hz @doc Task document @author 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 /. ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_task.erl
erlang
----------------------------------------------------------------------------- @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc @end ------------------------------------------------------------------...
( C ) 2016 - 2020 , 2600Hz @doc Task document @author 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 /. -module(kzd_task). -export([fetch/2]). -export([account_id/1 ,action/1 ...
69b7291ca95eaa1b72f69e0deb7a020f74e1ccf647fb60820c5e8ed6888fd3e3
SimulaVR/godot-haskell
NavigationMesh.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.NavigationMesh (Godot.Core.NavigationMesh._SAMPLE_PA...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/NavigationMesh.hs
haskell
# NOINLINE bindNavigationMesh_get_agent_max_slope # # NOINLINE bindNavigationMesh_get_filter_ledge_spans # # NOINLINE bindNavigationMesh_get_parsed_geometry_type # # NOINLINE bindNavigationMesh_set_agent_height # # NOINLINE bindNavigationMesh_set_collision_mask # # NOINLINE bindNavigationMesh_set_sample_partition_type ...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.NavigationMesh (Godot.Core.NavigationMesh._SAMPLE_PA...
efa95eba737126bf6317c5abe5ab80019a9924f3b6522018b4006cfc1707d760
gpwwjr/LISA
terminal-node.lisp
This file is part of LISA , the Lisp - based Intelligent Software ;;; Agents platform. Copyright ( C ) 2000 ;;; This library 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 2....
null
https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/src/rete/reference/terminal-node.lisp
lisp
Agents platform. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License either version 2.1 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FI...
This file is part of LISA , the Lisp - based Intelligent Software Copyright ( C ) 2000 of the License , or ( at your option ) any later version . GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License Foundation , Inc. , 59 Temple...
193e6ddb77b43370f8c38d8f5778ad2fc0e141bcda8964d197a80fac118616c9
replikativ/datahike-server
json_utils.clj
(ns datahike-server.json-utils (:require [clojure.string :as string] [clojure.walk :as walk] [datahike.schema :as s])) (def edn-fmt "application/edn") (def json-fmt "application/json") (def number-re #"\d+(\.\d+)?") (def number-format-instance (java.text.NumberFormat/getInstance)) (defn- fil...
null
https://raw.githubusercontent.com/replikativ/datahike-server/ec87469832e017bfaff98e86046de85f8e365817/src/clj/datahike_server/json_utils.clj
clojure
Q: Is this error appropriate? Q: Or should this be escaped by doubling, for consistency with other special chars?
(ns datahike-server.json-utils (:require [clojure.string :as string] [clojure.walk :as walk] [datahike.schema :as s])) (def edn-fmt "application/edn") (def json-fmt "application/json") (def number-re #"\d+(\.\d+)?") (def number-format-instance (java.text.NumberFormat/getInstance)) (defn- fil...
5693229b51c16910b25b45c2fb5c2acb0160ea0b590119f10ebbcdc5719cae55
KingoftheHomeless/Cofree-Traversable-Functors
Cofree.hs
# LANGUAGE DataKinds , DeriveTraversable , GADTs # # LANGUAGE RankNTypes , ScopedTypeVariables , StandaloneDeriving # module Data.Traversable.Cofree ( module Data.Nat, module Data.Fin, module Data.Vec, module Data.Traversable, Cotra(..), unit, counit, hoist, fromTraversal ) where import Data.Batch ...
null
https://raw.githubusercontent.com/KingoftheHomeless/Cofree-Traversable-Functors/40289b1f5ec151da10ab625102527432e84d6743/src/Data/Traversable/Cofree.hs
haskell
Members of this type are representational triples. | Calculates the characterization of any traversable container, effectively decoupling the elements of the container from its shape. | Integrates the elements into the shape, creating a container of the base functor. | Applies the natural transformation to the sh...
# LANGUAGE DataKinds , DeriveTraversable , GADTs # # LANGUAGE RankNTypes , ScopedTypeVariables , StandaloneDeriving # module Data.Traversable.Cofree ( module Data.Nat, module Data.Fin, module Data.Vec, module Data.Traversable, Cotra(..), unit, counit, hoist, fromTraversal ) where import Data.Batch ...
b8eb61b50f26ec19b3c28bf5906e4113914b37b820f96b90f45eda7e6bfdade3
OCamlPro/OCamlPro-OCaml-Branch
kb.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/tests/misc-kb/kb.ml
ocaml
********************************************************************* Objective Caml ...
, 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 . $ I d : 2553 1999 - 11 - 17 18:59:06...
b5aa2f113067e49a56a3cbfba4df052e50411bcd65e9dfa9c092150246d8c2c6
nasa/Common-Metadata-Repository
core.clj
(ns cmr.exchange.common.components.core (:require [cmr.exchange.common.components.config :as config] [cmr.exchange.common.components.logging :as logging] [com.stuartsierra.component :as component])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Common Configuration C...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/exchange-common/src/cmr/exchange/common/components/core.clj
clojure
Common Configuration Components ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Component Initializations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns cmr.exchange.common.components.core (:require [cmr.exchange.common.components.config :as config] [cmr.exchange.common.components.logging :as logging] [com.stuartsierra.component :as component])) (def cfg {:config (config/create-component)}) (def log {:logging (component/using (logg...
733a1d7f755bdcb7417c775397bca586d7c10af26f43f156e732b9a062de0e1f
vert-x/mod-lang-clojure
config_to_eb.clj
Copyright 2013 the original author or authors . ;; 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, ...
null
https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/lang-module/src/test/resources/embed/config_to_eb.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...
Copyright 2013 the original author or authors . distributed under the License is distributed on an " AS IS " BASIS , (ns deployments.config-to-eb (:require [vertx.core :as core] [vertx.http :as http])) (println "TC: LOADED") (let [cfg (core/config)] (-> (http/server) (http/on-request (fn...
9e09dbe5e1d02ce80c90843ae8a59f53b6d50b5f73ea94fd2c2d8a5cb5a21e51
bhauman/advent-of-clojure
day12.clj
(ns advent-2015.day12 (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.walk :refer [prewalk]])) (def prob12 (slurp (io/resource "2015/prob12"))) part 1 #_(reduce + (map read-string (re-seq #"[-]{0,1}\d+" prob12))) part 2 (defn has-red? [m] (some (fn [me] ((set me) "red")) m))...
null
https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2015/day12.clj
clojure
(ns advent-2015.day12 (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.walk :refer [prewalk]])) (def prob12 (slurp (io/resource "2015/prob12"))) part 1 #_(reduce + (map read-string (re-seq #"[-]{0,1}\d+" prob12))) part 2 (defn has-red? [m] (some (fn [me] ((set me) "red")) m))...
19c57d2d4b9fea6f0b2b6f2f2b6521fdb37bbff054b6b14b7c0c0eaf5c87e0ac
nodename/clevolution
imagefunctions.clj
(ns clevolution.app.imagefunctions (:require [seesaw.core :as seesaw] [seesaw.widget-options :refer [widget-option-provider]] [mikera.image.core :as img] [clevolution.file-input :refer [read-image-from-file]]) (:import [mikera.gui JIcon] [java.awt Dimension] ...
null
https://raw.githubusercontent.com/nodename/clevolution/e0302d788826d6408076471a724fbe6352dddd82/src/clj/clevolution/app/imagefunctions.clj
clojure
(ns clevolution.app.imagefunctions (:require [seesaw.core :as seesaw] [seesaw.widget-options :refer [widget-option-provider]] [mikera.image.core :as img] [clevolution.file-input :refer [read-image-from-file]]) (:import [mikera.gui JIcon] [java.awt Dimension] ...
30b273bfb6e0e6d8193a5451a39d2a8bd3b6c0b138af584e0a17d3574f723717
alexbecker/formal-morality
Morality.hs
module Morality where import Data.Maybe import Data.List import Control.Applicative import Preorder import ProbDist import Norm type WorldState = String type PossibleState = ProbDist WorldState type MoralTheory = PreorderFamily PossibleState invert :: (Eq a) => (a -> a) -> [a] -> a -> a invert f domain x = fromJus...
null
https://raw.githubusercontent.com/alexbecker/formal-morality/64d1751924a6f06834c8cd1a287b22a814e43e4a/Morality.hs
haskell
infer a moral theory from adjacency lists approximating each preorder and functions from your own states to those of others randomize a list of possible states across the moral community same as above, but ignore self (assumes self's preferences have index 0) judges which state is Just (punnyness >9000), or Nothin...
module Morality where import Data.Maybe import Data.List import Control.Applicative import Preorder import ProbDist import Norm type WorldState = String type PossibleState = ProbDist WorldState type MoralTheory = PreorderFamily PossibleState invert :: (Eq a) => (a -> a) -> [a] -> a -> a invert f domain x = fromJus...
336bd87bd30da640419a46ca49d97b88128d1bfca0715d0a9a38a21eee3e017c
vehicle-lang/vehicle
AnnotationRestrictions.hs
module Vehicle.Compile.Type.Subsystem.Polarity.AnnotationRestrictions ( assertUnquantifiedPolarity, checkNetworkType, ) where import Vehicle.Compile.Error import Vehicle.Compile.Normalise.Quote (Quote (..)) import Vehicle.Compile.Prelude import Vehicle.Compile.Type.Core import Vehicle.Compile.Type.Monad import...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Compile/Type/Subsystem/Polarity/AnnotationRestrictions.hs
haskell
\|Decomposes the Pi types in a network type signature, checking that the binders are explicit and their types are equal. Returns a function that
module Vehicle.Compile.Type.Subsystem.Polarity.AnnotationRestrictions ( assertUnquantifiedPolarity, checkNetworkType, ) where import Vehicle.Compile.Error import Vehicle.Compile.Normalise.Quote (Quote (..)) import Vehicle.Compile.Prelude import Vehicle.Compile.Type.Core import Vehicle.Compile.Type.Monad import...
944057d9d090566739afbf774d9b8783a5bbe2a234ceb73075f8bcbe13ec23f6
binsec/haunted
infos.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/parser/infos.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
591cdbaf231f421a2a1e53fc70b2607207324e4f53e808bf4123f5a60f21e0f7
HugoPeters1024/hs-sleuth
Stream.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} -- | -- Module : Data.List.Stream Copyright : ( c ) 2007 ( c ) 2007 - 2013 -- License : BSD-style -- Maintainer : -- Stability : experimental -- Portability : portable -- A reimplementation of the standard list libra...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/8ea5efc614b23692fd208c611f749b788f09f596/test-project/stream-fusion/Data/List/Stream.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE MagicHash # | Module : Data.List.Stream License : BSD-style Maintainer : Stability : experimental Portability : portable based on stream fusion for sequences. Described in: * /Stream Fusion: From Lists to Streams to Nothing at All/, by </~dons/pap...
Copyright : ( c ) 2007 ( c ) 2007 - 2013 A reimplementation of the standard list library to take advantage of stream fusion , and new GHC optimisations . The fusion mechanism is , and , ICFP 2007 . * /Rewriting Haskell Strings/ , by , and Roman Leshchinskiy...
422b8b74f9d3ad7fe5d7665177af69a9334857de53b6ed4a7edd937c59328869
chetmurthy/pa_ppx
unreachable.ml
let%expect_test _ = if false then [%expect.unreachable]
null
https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/tests-inline/unreachable.ml
ocaml
let%expect_test _ = if false then [%expect.unreachable]
88c4ce6d5aa5bd8ce04028426c5b2a0884085a70ce3c93e2d7f28a25d9afc0af
inconvergent/weir
simplify-path.lisp
(in-package :simplify-path) (deftype pos-int (&optional (bits 31)) `(unsigned-byte ,bits)) (deftype int-vector () `(vector pos-int)) (deftype vec-simple () `(simple-array vec:vec)) ;note: it would be better if we could avoid using an adjustable vector. (defun -simplify (pts lim &key left right) (declare #.*op...
null
https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/src/math/simplify-path.lisp
lisp
note: it would be better if we could avoid using an adjustable vector. :8338
(in-package :simplify-path) (deftype pos-int (&optional (bits 31)) `(unsigned-byte ,bits)) (deftype int-vector () `(vector pos-int)) (deftype vec-simple () `(simple-array vec:vec)) (defun -simplify (pts lim &key left right) (declare #.*opt-settings* (double-float lim) (vec-simple p...
a6d00babd62d065bd09e5054ce02b78f4ad11f7d94011240db3ce6050c673362
sol/http-kit
HeaderSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Network.HTTP.Toolkit.HeaderSpec (main, spec) where import Helper import qualified Data.ByteString.Char8 as B import Network.HTTP.Toolkit.Error import Network.HTTP.Toolkit.Header main :: IO () main = hspec spec spec :: Spec spec = do describe...
null
https://raw.githubusercontent.com/sol/http-kit/cc7eb6f1cb3ad6044c822286ad1352e26c112c69/test/Network/HTTP/Toolkit/HeaderSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.HTTP.Toolkit.HeaderSpec (main, spec) where import Helper import qualified Data.ByteString.Char8 as B import Network.HTTP.Toolkit.Error import Network.HTTP.Toolkit.Header main :: IO () main = hspec spec spec :: Spec spec = do describe "readMessageHeader" $ do it "r...
31a6c3d0d80a390c4112de3cbd69fc800773458e5f19c4609aec19e61f937d40
LdBeth/CLFSWM
menu-def.lisp
;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Menu definitions ;;; Note : Mod-1 is the Alt or Meta key , Mod-2 is the key . ;;; ---------------...
null
https://raw.githubusercontent.com/LdBeth/CLFSWM/4e936552d1388718d2947a5f6ca3eada19643e75/src/menu-def.lisp
lisp
-------------------------------------------------------------------------- CLFSWM - FullScreen Window Manager -------------------------------------------------------------------------- Documentation: Menu definitions -------------------------------------------------------------------------- This program is fr...
Note : Mod-1 is the Alt or Meta key , Mod-2 is the key . ( C ) 2005 - 2015 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (in-pack...
379e485fd1416ec8800325e9cc0a9bee9e447faf5ab787f18ad309ab827ac9f4
chrislloyd/kepler
name.clj
(ns kepler.systems.name (:require [kepler.component :refer [update-component-val]])) (defn name-system [state action] (if (= (:type action) :name) (map (fn [component] (if (and (= (:entity action) (:entity component)) (= (:type component) :name)) (update-component-va...
null
https://raw.githubusercontent.com/chrislloyd/kepler/bd6f30c20ff9e5ad6749bab0d3589d9ccce6f14f/src/kepler/systems/name.clj
clojure
(ns kepler.systems.name (:require [kepler.component :refer [update-component-val]])) (defn name-system [state action] (if (= (:type action) :name) (map (fn [component] (if (and (= (:entity action) (:entity component)) (= (:type component) :name)) (update-component-va...
01599b787f11060d61e44b077a533033c9cdf74882f1ecc3c58a2bfa2f567026
bjpop/blip
Utils.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # {-# LANGUAGE MagicHash #-} module Blip.Interpreter.HashTable.Utils ( whichBucket , nextBestPrime , bumpSize , shiftL , shiftRL , iShiftL , iShiftRL , nextHighestPowerOf2 , log2 , highestBitMask , wordSize , cacheLineSize , numElemsIn...
null
https://raw.githubusercontent.com/bjpop/blip/3d9105a44d1afb7bd007da3742fb19dc69372e10/blipinterpreter/src/Blip/Interpreter/HashTable/Utils.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE MagicHash # ---------------------------------------------------------------------------- | What you have to mask an integer index by to tell if it's cacheline-aligned ---------------------------------------------------------------------------- ----------------------------------...
# LANGUAGE CPP # module Blip.Interpreter.HashTable.Utils ( whichBucket , nextBestPrime , bumpSize , shiftL , shiftRL , iShiftL , iShiftRL , nextHighestPowerOf2 , log2 , highestBitMask , wordSize , cacheLineSize , numElemsInCacheLine , cacheLineIntMask , cacheLineIntBits , forc...
80793525b410dd757e4cd4e9241cf152ef34748da805d9c16543c3a6d1c08d69
Mattiemus/LaneWars
Tests.hs
module Main where import Test.Hspec import Test.QuickCheck import FRP.Yampa as Yampa import FRP.Yampa.Geometry import Game.Shared.Types import Game.Shared.Physics import Game.Shared.Arrows import Game.Shared.Object import Data.Maybe import Control.Exception (evaluate) testObjects :: [GameObject] test...
null
https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Tests.hs
haskell
module Main where import Test.Hspec import Test.QuickCheck import FRP.Yampa as Yampa import FRP.Yampa.Geometry import Game.Shared.Types import Game.Shared.Physics import Game.Shared.Arrows import Game.Shared.Object import Data.Maybe import Control.Exception (evaluate) testObjects :: [GameObject] test...
ee6bd703bf86a6b500adc0367fdb517931f83511b87621a14bea661fc2fc772f
alsonkemp/turbinado
Common.hs
module Turbinado.Database.ORM.Common where import Data.Char import Data.List import qualified Data.Map as M import Database.HDBC import Turbinado.Database.ORM.Types --------------------------------------------------------------------------- -- Utility functions -- ...
null
https://raw.githubusercontent.com/alsonkemp/turbinado/da2ba7c3443ddf6a51d1ec5b05cb45a85efc0809/Turbinado/Database/ORM/Common.hs
haskell
------------------------------------------------------------------------- Utility functions -- ------------------------------------------------------------------------- Does the column have a default make a valid function. make a valid type.
module Turbinado.Database.ORM.Common where import Data.Char import Data.List import qualified Data.Map as M import Database.HDBC import Turbinado.Database.ORM.Types cols :: Columns -> String cols cs = unwords $ intersperse "," $ map (\s -> "\\\"" ++ s ++ "\\\"") $ M.keys cs columnToFieldLabel :: (String, (SqlColDe...
6728bbf9b32e1efdb2c5062a6dc5819258ef69264bfeb82b2c4116ff7201d1f2
jrclogic/SMCDEL
Cheryl.hs
module SMCDEL.Examples.Cheryl where import Data.HasCacBDD (Bdd,con,disSet) import Data.List import SMCDEL.Language import SMCDEL.Symbolic.S5 import SMCDEL.Internal.Help (powerset) type Possibility = (Int, String) possibilities :: [Possibility] possibilities = [ (15,"May"), (16,"May"), (19,"May") , (17,"June"), ...
null
https://raw.githubusercontent.com/jrclogic/SMCDEL/10bd5ba2f1f3cc85e4b0f23d5eddbb26f05df5bf/src/SMCDEL/Examples/Cheryl.hs
haskell
alternative to: booloutofForm (powerset props !! n) props inverse of "is": an agent knows the value iff they know-whether all bits For this we need a way to reveal the sum, hence we use a knowledge transformer 8 bits to label all sums Bernard: Of course we know the bus number, but we still don't know your age.
module SMCDEL.Examples.Cheryl where import Data.HasCacBDD (Bdd,con,disSet) import Data.List import SMCDEL.Language import SMCDEL.Symbolic.S5 import SMCDEL.Internal.Help (powerset) type Possibility = (Int, String) possibilities :: [Possibility] possibilities = [ (15,"May"), (16,"May"), (19,"May") , (17,"June"), ...
4c7945a31bf8ed1869e7edcd0aa75dcb2878af99da1b970c14da18db7a52f5a8
ragkousism/Guix-on-Hurd
utils.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 < > Copyright © 2016 < > 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 ...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/import/utils.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 © 2012 , 2013 < > Copyright © 2016 < > 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 import utils) #:use-module (guix...
8cf1a680c9be55f3e1742860f1ce501052d0fb9785fa378efaf19f6406d3f502
jeromesimeon/Galax
code_util_materialize.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_util_materialize.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : code_util_materialize.mli , v 1.8 2007/02/01 22:08:45 simeon Exp $ Module : Code_util_materialize Description : This module contains code to handle the materialization of tuple cursors into an array of physical xm...
c2ccf11126e497d0c5a7c4e49e1040f58dc27410b216d9ede81b3e8d14a9cce3
manuel-serrano/bigloo
apply.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / / comptime / Coerce / apply.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/fdeac39af72d5119d01818815b0f395f2907d6da/comptime/Coerce/apply.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The `apply' coercion */ *============================...
* serrano / prgm / project / bigloo / / comptime / Coerce / apply.scm * / * Author : * / * Creation : Fri Jan 20 17:21:26 1995 * / * Last change : Thu Jul 8 11:28:29 2021 ( serrano ) * / * Copyrig...
4bb6c69da9985c54cd28c4280740a4c6f4196b3fa4d481a1bced563da3af2aee
startalkIM/ejabberd
scram.erl
%%%---------------------------------------------------------------------- File : scram.erl Author : < > Purpose : SCRAM ( RFC 5802 ) Created : 7 Aug 2011 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% This program is free software; you can redistribute it and/or modi...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/scram.erl
erlang
---------------------------------------------------------------------- This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
File : scram.erl Author : < > Purpose : SCRAM ( RFC 5802 ) Created : 7 Aug 2011 by < > ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have recei...
e59db8f1e1e4616fe690da3e7a46b2424b5800db83e16393a13c7a3aae0a0f97
facebook/duckling
Tests.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. module Duckling.Duration.FR.Tests ( tests ) where import Prelude import Data.String import Test.Tasty ...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Duration/FR/Tests.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.
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Duration.FR.Tests ( tests ) where import Prelude import Data.String import Test.Tasty import Duckling.Dimensions.Types import Duckling.Duration.FR.Corpus import Duckling.Testing.Asserts tests :: TestTree tests = testGroup "FR Tests" [ makeCor...
f349ad056a1d426151d0eff73361454b161cf84623c6d7749adf2a98785fe6d0
kalxd/azelf
json.rkt
#lang racket/base (require racket/generic racket/contract (only-in racket/function identity) (prefix-in base:: racket/base) json) (provide gen:ToJSON ToJSON? ->json json->string json->byte) (define (json-number? x) (or (exact...
null
https://raw.githubusercontent.com/kalxd/azelf/e078bae30ef695265d1e94c04160916f0ff99652/type/json.rkt
racket
#lang racket/base (require racket/generic racket/contract (only-in racket/function identity) (prefix-in base:: racket/base) json) (provide gen:ToJSON ToJSON? ->json json->string json->byte) (define (json-number? x) (or (exact...
c5839061f6b71019ac50ff2b58dec13574e55f370c05820496a8141f3e617658
ragkousism/Guix-on-Hurd
graph.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 , 2017 < > ;;; ;;; 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...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/scripts/graph.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 © 2015 , 2016 , 2017 < > 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 scripts graph) #:use-module (guix ui) #:use-module (guix graph) #:use-mod...
53ccb87eb3077a35e5560504dff63b68597453d9a6d36d14b041e68207bae97c
Workiva/eva
tracing.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/utils/tracing.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.utils.tracing (:require [eva.config :refer [config-strict]] [utiliva.macros :refer [when-class]] [ichnaie.core :refer [tracing-with-spanbuilder]]) (:import [io.jaegertracing C...
2c5392dea2524fc3a50ebeca874e45d2113e12bb3abbee3a338d89011dd68c31
montelibero-org/veche
Foundation.hs
# LANGUAGE BlockArguments # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DisambiguateRecordFields # # LANGUAGE ImportQualifiedPost # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # {-# LANGUAGE RankNTy...
null
https://raw.githubusercontent.com/montelibero-org/veche/a0a97cf465df7c41bcafbfda0574323a4dab5808/veche-web/src/Foundation.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # prelude global project component | A convenient synonym for database access functions. Please see the documentation for the Yesod typeclass. There are a number of settings which can be configured by overriding methods here. Contr...
# LANGUAGE BlockArguments # # LANGUAGE DisambiguateRecordFields # # LANGUAGE ImportQualifiedPost # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # instance { Yesod , YesodAuth ... } App module Foundation ...
5da6dad9f1d7a90a45a55126a2cf9e7aab5c2d485fea2602fc16bb0c9edead6f
4clojure/4clojure
solutions.clj
(ns foreclojure.solutions (:require [clojure.string :as s]) (:use [somnium.congomongo :only [fetch-one update!]] [useful.debug :only [?]] [foreclojure.messages :only [err-msg]])) (defn get-solution ([perm-level user-id problem-id] (when (or (= :private perm-level) ...
null
https://raw.githubusercontent.com/4clojure/4clojure/25dec057d9d6871ce52aee9e2c3de7efdab14373/src/foreclojure/solutions.clj
clojure
(ns foreclojure.solutions (:require [clojure.string :as s]) (:use [somnium.congomongo :only [fetch-one update!]] [useful.debug :only [?]] [foreclojure.messages :only [err-msg]])) (defn get-solution ([perm-level user-id problem-id] (when (or (= :private perm-level) ...
125967c2ced25bd4480ea93403e24dc2d73c731ec9cd7832c3a4b01fb720e0b4
VitorCBSB/HetrisV2
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Constants (windowSize) import Control.Lens import CountingDown import Credits import Game import GameOver import Help import InitialStates import Intro import MainMenu import Paused import qualified SDL import qualified SDL.Font as Ttf import qualified SDL.M...
null
https://raw.githubusercontent.com/VitorCBSB/HetrisV2/2544e8ce56a4d0daba9126642118f0504215f742/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Constants (windowSize) import Control.Lens import CountingDown import Credits import Game import GameOver import Help import InitialStates import Intro import MainMenu import Paused import qualified SDL import qualified SDL.Font as Ttf import qualified SDL.Mixer as Mixer import Types import U...
ac083e40a3e9680b4f38b574fa6ce6973180d3b232faa8e0db259302cc167563
kmi/irs
xpath-parser.lisp
(in-package :kmi.vt.xpath-mini) (defparser xpath-parser ((start PathExpr) $1) PathExpr : : = ( " / " ? ) | ( " // " ) | ((PathExpr :/) `(apply-leading-/ :/)) ((PathExpr :/ RelativePathExpr) `(apply-leading-/ ,$2)) ((PathExpr ://) `(apply-leading-//)) ((PathExpr :// RelativePathExpr) `(apply-leading-...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/src/xpath-mini/xpath-parser.lisp
lisp
StepExpr ::= AxisStep | FilterExpr .. .. ForwardAxis ::= <"child" "::"> | <"descendant" "::"> | <"attribute" "::"> | <"self" "::"> | <"descendant-or-self" "::"> | <"following-sibling" "::"> | <"following" "::"> | <"namespace" "::"> .. .. QName ::= [-xml-names/#NT-QName] Wildcard ::= "*" | <NCName ":" "*"> | <"*" ":"...
(in-package :kmi.vt.xpath-mini) (defparser xpath-parser ((start PathExpr) $1) PathExpr : : = ( " / " ? ) | ( " // " ) | ((PathExpr :/) `(apply-leading-/ :/)) ((PathExpr :/ RelativePathExpr) `(apply-leading-/ ,$2)) ((PathExpr ://) `(apply-leading-//)) ((PathExpr :// RelativePathExpr) `(apply-leading-...
6be2234797f08583bdbd50d8bfebecfc64d2264cd5b1ee48e541c02892fffcf7
BranchTaken/Hemlock
u256.ml
open RudimentsInt0 open RudimentsFunctions module T = struct module U = struct type t = {w0: u64; w1: u64; w2: u64; w3: u64} let word_length = 4L let init ~f = {w0=f 0L; w1=f 1L; w2=f 2L; w3=f 3L} let get i t = match i with | 0L -> t.w0 | 1L -> t.w1 | 2L -> t.w2 ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/u256.ml
ocaml
open RudimentsInt0 open RudimentsFunctions module T = struct module U = struct type t = {w0: u64; w1: u64; w2: u64; w3: u64} let word_length = 4L let init ~f = {w0=f 0L; w1=f 1L; w2=f 2L; w3=f 3L} let get i t = match i with | 0L -> t.w0 | 1L -> t.w1 | 2L -> t.w2 ...
d4387c5afcf116dff193a806a21a071870b36bab4ef97e44df9f0e479d19acc4
melange-re/melange
ounit_hashtbl_tests.ml
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: )) let ( =~ ) = OUnit.assert_equal ~printer:Ounit_test_util.dump let suites = __FILE__ >::: [ (* __LOC__ >:: begin fun _ -> *) (* let h = Hash_string.create 0 in *) (* let accu key = *) Hash_string.replace_or_init h key succ 1...
null
https://raw.githubusercontent.com/melange-re/melange/a8f6ddf9f46d51ffd1dde6095f655a8ca9fb6aa5/jscomp/ounit_tests/ounit_hashtbl_tests.ml
ocaml
__LOC__ >:: begin fun _ -> let h = Hash_string.create 0 in let accu key = for i = 0 to count - 1 do Array.iter accu [|"a";"b";"c";"d";"e";"f"|] done; end;
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: )) let ( =~ ) = OUnit.assert_equal ~printer:Ounit_test_util.dump let suites = __FILE__ >::: [ Hash_string.replace_or_init h key succ 1 in let count = 1000 in Hash_string.length h = ~ 6 ; ( fun _ v - > v = ~ count ) h ( "add semantics...
94080fc3f3f790a7244fdbd0425cfcc8e1bb716436e0abda10033f1535d63cd4
cac-t-u-s/om-sharp
chord-editor.lisp
;============================================================================ ; om#: visual programming language for computer-assisted music composition ;============================================================================ ; ; This program is free software. For information on usage ; and redistribution, see...
null
https://raw.githubusercontent.com/cac-t-u-s/om-sharp/6a9e50f3fc4f42ae881247996d249675b700d0cf/src/packages/score/editor/chord-editor.lisp
lisp
============================================================================ om#: visual programming language for computer-assisted music composition ============================================================================ This program is free software. For information on usage and redistribution, see the "...
File author : (in-package :om) CHORD EDITOR (defclass chord-editor (score-editor play-editor-mixin) ((temp-arp-chord :accessor temp-arp-chord :initform nil))) (defmethod object-has-editor ((self chord)) t) (defmethod get-editor-class ((self chord)) 'chord-editor) (defmethod object-default-edition-param...
1ef1f145c6706c030f4f84c76e94b4218e0e83ac0c91093ea6603138914bf8b4
maximedenes/native-coq
evar_tactics.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/evar_tactics.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 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Tacmach open Names open ...
03a0a279c9b80fdb96cd614aed4b7cef20e83218fbbf238f55f605de0f2f0348
ocaml/dune
user_message.ml
module Style = struct type t = | Loc | Error | Warning | Kwd | Id | Prompt | Hint | Details | Ok | Debug | Success | Ansi_styles of Ansi_color.Style.t list end module Annots = struct include Univ_map.Make () let has_embedded_location = Key.create ~name:"has-em...
null
https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/user_message.ml
ocaml
As found here #OCaml no operation required a deletion an insertion a substitution
module Style = struct type t = | Loc | Error | Warning | Kwd | Id | Prompt | Hint | Details | Ok | Debug | Success | Ansi_styles of Ansi_color.Style.t list end module Annots = struct include Univ_map.Make () let has_embedded_location = Key.create ~name:"has-em...
976985a18f3d41555aa46430b59acf6fc8be3185880563ee3991bf32893ab292
cram2/cram
tdist.lisp
Regression test TDIST for GSLL ;; Copyright 2009 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of t...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/tdist.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test TDIST for GSLL Copyright 2009 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public Li...
f8849f8f11f285442b195ccdaf155a72a67352c3050c3df9ce884559039a41a4
mattn/clj-ezoe
core_test.clj
(ns ezoe.core-test (:require [clojure.test :refer :all] [ezoe.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/mattn/clj-ezoe/b51e2beceb18d5cd39426e91d45d3a69f2e0b028/test/ezoe/core_test.clj
clojure
(ns ezoe.core-test (:require [clojure.test :refer :all] [ezoe.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
8e9f576a51c6e48c27ad2bf6827b1765eac5c365b2b8a94e22d14bf0a2dd6395
dyzsr/ocaml-selectml
pr7937.ml
(* TEST * expect *) type 'a r = [< `X of int & 'a ] as 'a let f: 'a. 'a r -> 'a r = fun x -> true;; [%%expect {| type 'a r = 'a constraint 'a = [< `X of int & 'a ] Line 3, characters 35-39: 3 | let f: 'a. 'a r -> 'a r = fun x -> true;; ^^^^ Error: This expression has type boo...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-misc/pr7937.ml
ocaml
TEST * expect
type 'a r = [< `X of int & 'a ] as 'a let f: 'a. 'a r -> 'a r = fun x -> true;; [%%expect {| type 'a r = 'a constraint 'a = [< `X of int & 'a ] Line 3, characters 35-39: 3 | let f: 'a. 'a r -> 'a r = fun x -> true;; ^^^^ Error: This expression has type bool but an expression was...
14e5c36aed691995c4d55909d1a9841af7659fcea1841a37397e21712c8dbcef
opencog/pln
simple-assertions.scm
; Define the concepts (ConceptNode "Socrates" (stv .001 0.9)) (ConceptNode "Einstein" (stv .001 0.9)) (ConceptNode "Peirce" (stv .001 0.9)) (ConceptNode "man" (stv .01 0.9)) (ConceptNode "human" (stv .02 0.9)) ; Define the instances of man (InheritanceLink (stv 0.9 0.9) (ConceptNode "Socrates") (ConceptNode ...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/tests/pln/rules/simple-assertions.scm
scheme
Define the concepts Define the instances of man Define what man is part of Assign some additional memberships as well Pattern to match to check the output
(ConceptNode "Socrates" (stv .001 0.9)) (ConceptNode "Einstein" (stv .001 0.9)) (ConceptNode "Peirce" (stv .001 0.9)) (ConceptNode "man" (stv .01 0.9)) (ConceptNode "human" (stv .02 0.9)) (InheritanceLink (stv 0.9 0.9) (ConceptNode "Socrates") (ConceptNode "man")) (InheritanceLink (stv 0.9 0.9) (Concept...
f1bae7e0f6333e02a89a03f4aab33b2f2f876a43414baf682c594ac89ee6d6ac
chenyukang/eopl
lang.scm
(load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/type-structures.scm") (load-relative "./base/type-module.scm") (load-relative "./base/grammar.scm") (load-relative "./base/renaming.scm") (load-relative "./base/subtyping.scm") (load-...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch8/lang.scm
scheme
(load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/type-structures.scm") (load-relative "./base/type-module.scm") (load-relative "./base/grammar.scm") (load-relative "./base/renaming.scm") (load-relative "./base/subtyping.scm") (load-...
e411c680ef7caafccfee955fd12635579dfb5cc66d253dd1daf1912ad8da388a
wireapp/wire-server
Services.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/bfc329f8aca3b6ecadd801820016f611ef5750a2/services/galley/src/Galley/Data/Services.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Galley.Data.Services * ...
3f2a568c0fc38dfabd8421c4d17fb3c002df18be80f4ba78a55b48d148af3189
LonoCloud/arrows
proc.clj
(ns arrows.proc (:require [monads.core :as m] [monads.macros :as mm])) ;; A simple parser to parse proc expressions (deftype parser-m [v mv f] clojure.lang.IFn (invoke [_ s] (if f (if-let [[v ss] (mv s)] ((f v) ss) nil) [v s])) m/Monad (do-result [_ v] (parse...
null
https://raw.githubusercontent.com/LonoCloud/arrows/2def9db48e684913d51da3065b010687041caf4f/src/arrows/proc.clj
clojure
A simple parser to parse proc expressions a parser that removes the next item from what is being parsed a parser that returns the entire parser state A parser to match a :let clause in a proc-do binding block A parser that throws an exception when a binding clause is malformed A parser to match any clause in a pr...
(ns arrows.proc (:require [monads.core :as m] [monads.macros :as mm])) (deftype parser-m [v mv f] clojure.lang.IFn (invoke [_ s] (if f (if-let [[v ss] (mv s)] ((f v) ss) nil) [v s])) m/Monad (do-result [_ v] (parser-m. v nil nil)) (bind [mv f] (parser-m...
fb83c0c4aed5d4f28cc486a9500ab6e5abc14ccf69952b075c4a2f590d1cf0d3
yesodweb/persistent
UpsertTest.hs
module UpsertTest where import Data.Function (on) import Init import PersistentTestModels -- | MongoDB assumes that a @NULL@ value in the database is some "empty" value . So a query that does @+ 2@ to a @NULL@ value results in @2@. SQL databases instead " annihilate " with null , so + 2 = NULL@. data BackendNul...
null
https://raw.githubusercontent.com/yesodweb/persistent/bf4c3ae430d7e7ec0351a768783d73e6bd265890/persistent-test/src/UpsertTest.hs
haskell
| MongoDB assumes that a @NULL@ value in the database is some "empty" | @UPSERT@ on SQL databses does an "update-or-insert," which preserves all prior values, including keys. MongoDB does not preserve the identifier, so the entity key changes on an upsert. #ifdef WITH_MONGODB update' <- ((==@) `o...
module UpsertTest where import Data.Function (on) import Init import PersistentTestModels value . So a query that does @+ 2@ to a @NULL@ value results in @2@. SQL databases instead " annihilate " with null , so + 2 = NULL@. data BackendNullUpdateBehavior = AssumeNullIsZero | Don'tUpdateNull data Backen...
5ef71875f7114ccb7357210c63bed59bf317517fbbfdd01ae852fefd55cad5dc
kaznum/programming_in_ocaml_exercise
inord.ml
type 'a tree = Lf | Br of 'a * 'a tree * 'a tree;; let comptree = Br(1, Br(2, Br(4, Lf, Lf),Br(5, Lf, Lf)), Br(3, Br(6, Lf, Lf), Br(7, Lf, Lf)));; let rec inord t l = match t with Lf -> l | Br(x, left, right) -> (inord left (x::(inord right l)));; inord comptree [];;
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex6.6/inord.ml
ocaml
type 'a tree = Lf | Br of 'a * 'a tree * 'a tree;; let comptree = Br(1, Br(2, Br(4, Lf, Lf),Br(5, Lf, Lf)), Br(3, Br(6, Lf, Lf), Br(7, Lf, Lf)));; let rec inord t l = match t with Lf -> l | Br(x, left, right) -> (inord left (x::(inord right l)));; inord comptree [];;