_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
72d26fd674532b5835bb80a25aa8632034ae4af18bc072b9baac0cf39ca7660c
2600hz-archive/whistle
monitor_agent_network.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2010 - 2011 , VoIP INC %%% @doc %%% Responsible for runnning the network monitoring tasks %%% @end Created : 11 Nov 2010 by < > %%%------------------------------------------------------------------- -module(monitor_age...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/monitor/src/monitor_agent_network.erl
erlang
------------------------------------------------------------------- @doc Responsible for runnning the network monitoring tasks @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API =================...
@author < > ( C ) 2010 - 2011 , VoIP INC Created : 11 Nov 2010 by < > -module(monitor_agent_network). -behaviour(gen_server). -include("monitor_amqp.hrl"). -import(logger, [format_log/3]). -import(proplists, [get_value/2, get_value/3]). -export([start_link/1]). -export([set_amqp_host/1]). -export([ini...
2d56f09d782bbf7927d524203311fc73a3b0c9eae2131e8a5e823cd88ed05292
jtdaugherty/dbmigrations
Moo.hs
module Main ( main ) where import Prelude main :: IO () main = do error $ "This package (dbmigrations) does no longer contain the executable to \ \create, apply or revert database migrations. Please install the specific \ \wrapper package for your database: dbmigrations-postgresql, \ \dbmigr...
null
https://raw.githubusercontent.com/jtdaugherty/dbmigrations/80336a736ac394a2d38c65661b249b2fae142b64/programs/Moo.hs
haskell
module Main ( main ) where import Prelude main :: IO () main = do error $ "This package (dbmigrations) does no longer contain the executable to \ \create, apply or revert database migrations. Please install the specific \ \wrapper package for your database: dbmigrations-postgresql, \ \dbmigr...
84ba4561fdfbadab1a8d55314e0f3fefb77fd802b6be87e8310edc301346243e
mentat-collective/emmy
time_evolution_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.mechanics.time-evolution-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest]] [emmy.generic :as g :refer [+]] [emmy.mechanics.hamilton :as h] [emmy.mechanics.time-evolution :as te] [emmy.s...
null
https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/test/emmy/mechanics/time_evolution_test.cljc
clojure
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.mechanics.time-evolution-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest]] [emmy.generic :as g :refer [+]] [emmy.mechanics.hamilton :as h] [emmy.mechanics.time-evolution :as te] [emmy.s...
1cf42f0b98b7193dfc269bea3789ae7df2526f06e9bccb8b99943894a0dcf28e
emqx/quic
rev.erl
-module(rev). -compile(export_all). -compile(nowarn_export_all). -include("../../include/quicer.hrl"). %% This is an example of how we can revert connections. This is especially interesting when we want to connect to a device behind a NAT device . Code behind the NAT device can do connect ( ) , and following that...
null
https://raw.githubusercontent.com/emqx/quic/c562b2c8cb8b596b67e13b2095ed9f181e13ae88/test/example/rev.erl
erlang
This is an example of how we can revert connections. This is especially To run: connect to the top site. Following that all streams are created in both directions on top of the To test new streams going "down" To test new streams going "up" to use the shell and inspect the system -define(iof(F, A), ok). Test c...
-module(rev). -compile(export_all). -compile(nowarn_export_all). -include("../../include/quicer.hrl"). interesting when we want to connect to a device behind a NAT device . Code behind the NAT device can do connect ( ) , and following that the code at the " top site " can do start_stream ( ) to the device behin...
d2f090e31586022753a5b339ad01e919692e4a58223934281fc750f75f5b77e6
pascutto/cachecache
through.mli
module Make (C : S.Cache) (DB : S.DB with type key = C.key) : S.Through with type key = DB.key and type value = DB.value
null
https://raw.githubusercontent.com/pascutto/cachecache/28011482667326b4f2b7eb02e692e21fd8cb9080/src/through.mli
ocaml
module Make (C : S.Cache) (DB : S.DB with type key = C.key) : S.Through with type key = DB.key and type value = DB.value
e0f161e00cb24e40911df16517764479a9c5382a497993d8d687c30fd610b68f
tlaitinen/yesod-dsl
Setup.hs
#!/usr/bin/env runhaskell module Main where import Distribution.Simple main :: IO () main = defaultMain
null
https://raw.githubusercontent.com/tlaitinen/yesod-dsl/e248471bc708542dd050d96ac9fde627e9e349ae/YesodDsl/Setup.hs
haskell
#!/usr/bin/env runhaskell module Main where import Distribution.Simple main :: IO () main = defaultMain
5798d716c1d62815208a71cacf8b555de12e51dfa06f9c20d396aa32e254306e
racket/draw
draw-unit.rkt
#lang racket/base (require racket/unit racket/draw "draw-sig.rkt") (provide draw@) (define-unit-from-context draw@ draw^)
null
https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/draw-unit.rkt
racket
#lang racket/base (require racket/unit racket/draw "draw-sig.rkt") (provide draw@) (define-unit-from-context draw@ draw^)
301280ce4fb26496bbb2cf14e422073a5c261cc72126b96700bc32276594c6cc
dcavar/schemeNLP
countwords1c.scm
":"; exec mzscheme -r $0 "$@" (require (lib "vector-lib.ss" "srfi" "43")) (define load-file (lambda (fname) (printf "Loading file: ~a\n" fname) (call-with-input-file fname (lambda (p) (read-string (file-size fname) p))))) ;;; main steps (begin (vector-for-each (lambda (i fname) ...
null
https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/countwords1c.scm
scheme
exec mzscheme -r $0 "$@" main steps
(require (lib "vector-lib.ss" "srfi" "43")) (define load-file (lambda (fname) (printf "Loading file: ~a\n" fname) (call-with-input-file fname (lambda (p) (read-string (file-size fname) p))))) (begin (vector-for-each (lambda (i fname) (printf "~a\n" (load-file fname)))...
57021d43736dc19c83f6d710737cbf77d4a9c80c93dc7ef95f5dd58aa292021a
hexlet-basics/exercises-racket
test.rkt
#lang racket (require (only-in rackunit check-equal? test-begin)) (require "index.rkt") (test-begin (check-equal? (sum-of-squares 2 3) 13) (check-equal? (sum-of-squares 6 5) 61))
null
https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/20-definitions/25-function-shorthand/test.rkt
racket
#lang racket (require (only-in rackunit check-equal? test-begin)) (require "index.rkt") (test-begin (check-equal? (sum-of-squares 2 3) 13) (check-equal? (sum-of-squares 6 5) 61))
8295d331f1a44ae250ce52296afea186e9ef378d34f61c2b3e7b70bdf7192b69
HugoPeters1024/hs-sleuth
Int.hs
# LANGUAGE BangPatterns , CPP , MagicHash , RankNTypes , ScopedTypeVariables , UnboxedTuples # UnboxedTuples #-} # LANGUAGE Trustworthy # -- Module: Data.Text.Lazy.Builder.Int Copyright : ( c ) 2013 ( c ) 2011 MailRank , Inc. -- License: BSD-style Maintainer : < > -- Por...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/src/Data/Text/Lazy/Builder/Int.hs
haskell
Module: Data.Text.Lazy.Builder.Int License: BSD-style Portability: portable Efficiently write an integral value to a 'Builder'. # RULES "decimal/Word" decimal = positive :: Data.Word.Word -> Builder # # RULES "decimal/Word8" decimal = positive :: Word8 -> Builder # # RULES "decimal/Word64" decimal = posit...
# LANGUAGE BangPatterns , CPP , MagicHash , RankNTypes , ScopedTypeVariables , UnboxedTuples # UnboxedTuples #-} # LANGUAGE Trustworthy # Copyright : ( c ) 2013 ( c ) 2011 MailRank , Inc. Maintainer : < > module Data.Text.Lazy.Builder.Int ( decimal , hexadecimal ...
f6703b263559bb7552967486cbc8e20e15bc21089237e6c97088960cd234a677
ndmitchell/shake
Paths.hs
-- | Fake cabal module for local building module Paths_shake(getDataDir, version) where import Data.Version.Extra -- If Shake can't find files in the data directory it tries relative to the executable getDataDir :: IO FilePath getDataDir = pure "random_path_that_cannot_possibly_exist" version :: Version version = m...
null
https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Paths.hs
haskell
| Fake cabal module for local building If Shake can't find files in the data directory it tries relative to the executable
module Paths_shake(getDataDir, version) where import Data.Version.Extra getDataDir :: IO FilePath getDataDir = pure "random_path_that_cannot_possibly_exist" version :: Version version = makeVersion [0,0]
c1c98ea2c4b3295f9aa06886f0e5d93918b3855e28efb0c35e5450933fc83c8e
samrocketman/home
combine-bg.scm
; 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 2 of the License , or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; ...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/combine-bg.scm
scheme
This program is free software; you can redistribute it and/or modify either version 2 of the 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 MERCHANTABILITY or FITNESS FOR A PARTICULAR ...
it under the terms of the GNU General Public License as published by (define (script-fu-anim-combine-background image drawable) (define (get-all-layers img) (let* ( (all-layers (gimp-image-get-layers img)) (i (car all-layers)) (bottom-to-top ()) ) (set! all-layers (cadr a...
23f3e0f04ff36d4eb6f286912b07040d5c7aca16035061783b0c42df54f86675
goldfirere/thesis
BinaryCtx.hs
As submitted by ( ) # LANGUAGE DataKinds # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FunctionalDependencies # # LANGUAGE ...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/hs/dephs/BinaryCtx.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # # LANGUAGE ConstraintKinds # ---------------------------------------------------------------------- type family accessor functions for the Twice kind | Contexts are a kind representing a hetergenous list of values in some key. The parameter k, may be any kind. This datas...
As submitted by ( ) # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FunctionalDependencies # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstance...
494899fcd85a22ac6036ee5806932973f5baa2c9dc81e6f9b6736afa24a5ea85
bjorng/wings
wings_facemat.erl
%% %% wings_facemat.erl -- %% %% This module keeps tracks of the mapping from a face number %% to its material name. %% Copyright ( c ) 2001 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -...
null
https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/src/wings_facemat.erl
erlang
wings_facemat.erl -- This module keeps tracks of the mapping from a face number to its material name. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ API functions for retrieving information. all(We) -> [{...
Copyright ( c ) 2001 - 2011 -module(wings_facemat). -export([all/1,face/2,used_materials/1,is_material_used/2,mat_faces/2, any_interesting_materials/1, assign/2,assign/3, delete_face/2,delete_faces/2,keep_faces/2, hide_faces/1,show_faces/2, renumber/2,gc/1,merge/1]). -include("wings.hrl"). -import(list...
11b82693bebe6347da928b7c47b67c0ea07d0f8bf94d41befecff9f6f212203c
axelarge/advent-of-code
day01.clj
(ns advent-of-code.y2022.day01 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2022 1)) (defn parse [input] (->> (str/split input #"\n\n") (map #(->> % str/split-lines (map parse-int) (reduce +))) (sort (comp - compare)))) (defn solve1 [in...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/8323ef46570246f1ff7ee041a757cc3d78feaeb8/src/advent_of_code/y2022/day01.clj
clojure
(ns advent-of-code.y2022.day01 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def input (get-input 2022 1)) (defn parse [input] (->> (str/split input #"\n\n") (map #(->> % str/split-lines (map parse-int) (reduce +))) (sort (comp - compare)))) (defn solve1 [in...
adcba20a72d1197023ac8270d1f29fd68572ba1e77cfe65daebdb4e28398a027
discus-lang/ddc
ExportSpec.hs
{-# OPTIONS_HADDOCK hide #-} module DDC.Core.Codec.Text.Parser.ExportSpec ( ExportSpec (..) , pExportSpecs) where import DDC.Core.Codec.Text.Parser.Type import DDC.Core.Codec.Text.Parser.Context import DDC.Core.Codec.Text.Parser.Base import DDC.Core.Codec.Text.Lexer.Tokens import DDC.Core.Module im...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Codec/Text/Parser/ExportSpec.hs
haskell
# OPTIONS_HADDOCK hide # An exported thing. | Parse some export specifications. | Parse an export specification. | Parse a foreign value export spec. with foreign C imports and exports.
module DDC.Core.Codec.Text.Parser.ExportSpec ( ExportSpec (..) , pExportSpecs) where import DDC.Core.Codec.Text.Parser.Type import DDC.Core.Codec.Text.Parser.Context import DDC.Core.Codec.Text.Parser.Base import DDC.Core.Codec.Text.Lexer.Tokens import DDC.Core.Module import DDC.Type.Exp.Simple impo...
c0484274e841eaed84f8228d3e6420f80ed0f466ca6b50c86b5d855afc10a677
brendanhay/gogol
Patch.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-file/gen/Gogol/File/Projects/Locations/Instances/Snapshots/Patch.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates the settings of a specific snapshot. /See:/ </ Cloud Filestore API Reference> for @file.projects.locations.instances.snapshots.patch@. * Resource ** Constructing a Request | A resource alias for @file.projects.locatio...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
2d0a7d6adf84979fd01c430f4bc89c7a843a9d6d6b7453736388bdc0691d279c
wilkerlucio/conj2018demo
parser.cljc
;region header (ns com.wsscode.conj2018demo.parser (:require [clojure.core.async :refer [go timeout <! #?(:clj <!!)]] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.connect.graphql :as pcg] [com.wsscode.pathom.connect.spacex :as spacex] [com.wsscode.pathom.conn...
null
https://raw.githubusercontent.com/wilkerlucio/conj2018demo/464fa7b44b79e05fb44fae1b79ab4793df3f7984/src/core/com/wsscode/conj2018demo/parser.cljc
clojure
region header endregion endregion endregion ident joins endregion endregion endregion region parser endregion endregion region entity-parse endregion
(ns com.wsscode.conj2018demo.parser (:require [clojure.core.async :refer [go timeout <! #?(:clj <!!)]] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom.connect.graphql :as pcg] [com.wsscode.pathom.connect.spacex :as spacex] [com.wsscode.pathom.connect.youtube :as...
83e3dd80d00a5da6042d7a5de9ffc26b9413f79f6e4158b185a0289c59d6b6fb
erlang/otp
gen_server_not_exported.erl
-module(gen_server_not_exported). -behaviour(gen_server). -export([main/0, handle_call/3]). %% Not exported. Should be a warning. main() -> _ = init(whatever), _ = handle_cast(whatever, some_state), _ = format_status(<<"xyz">>), ok. init(_) -> ok. %% OK. No warning. handle_call(_Request, _From,...
null
https://raw.githubusercontent.com/erlang/otp/a7b12db67acb1e6a09e1f6d40bebfda0d352bdbe/lib/dialyzer/test/behaviour_SUITE_data/src/gen_server_not_exported.erl
erlang
Not exported. Should be a warning. OK. No warning. Not exported. Should be a warning. Not exported and conflicting arguments and return value. No warning since format_status/1 is an optional callback.
-module(gen_server_not_exported). -behaviour(gen_server). -export([main/0, handle_call/3]). main() -> _ = init(whatever), _ = handle_cast(whatever, some_state), _ = format_status(<<"xyz">>), ok. init(_) -> ok. handle_call(_Request, _From, State) -> {noreply, State}. -spec handle_cast(any()...
a29e210d7c88ba73f090ef50faff28e8d72ac2a4d05268d98dd9b83c5a1b5347
ocaml-ppx/ppx_tools_versioned
ast_mapper_class_405.ml
open Migrate_parsetree.Ast_405 (* This file is part of the ppx_tools package. It is released *) under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi (** Class-based customizable mapper *) open Parsetree open Asttypes open Ast_helper let map_fs...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_mapper_class_405.ml
ocaml
This file is part of the ppx_tools package. It is released * Class-based customizable mapper Type expressions for the core language Type expressions for the class language Type expressions for the module language Value expressions for the module language Value expressions for the core language Patterns...
open Migrate_parsetree.Ast_405 under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi open Parsetree open Asttypes open Ast_helper let map_fst f (x, y) = (f x, y) let map_snd f (x, y) = (x, f y) let map_tuple f1 f2 (x, y) = (f1 x, f2 y) let map_tup...
a4707462652150d89d0b43d14a6e474418bd5519c388effcd4133ceec5a3443e
markus-wa/lssl
deps.clj
(ns deps (:require [clojure.pprint :as ppt])) (def LWJGL_NS "org.lwjgl") ;; Edit this to change the version. (def LWJGL_VERSION "3.2.3") ;; Edit this to add/remove packages. (def LWJGL_MODULES ["lwjgl" "lwjgl-assimp" "lwjgl-bgfx" "lwjgl-egl" ...
null
https://raw.githubusercontent.com/markus-wa/lssl/0c4858f624331588228bc3c31d05597e9d27bd55/dev/lwjgl/src/deps.clj
clojure
Edit this to change the version. Edit this to add/remove packages. It's safe to just include all native dependencies, but you might save some space if you know you don't need some platform. These packages don't have any associated native ones.
(ns deps (:require [clojure.pprint :as ppt])) (def LWJGL_NS "org.lwjgl") (def LWJGL_VERSION "3.2.3") (def LWJGL_MODULES ["lwjgl" "lwjgl-assimp" "lwjgl-bgfx" "lwjgl-egl" "lwjgl-glfw" "lwjgl-jawt" ...
97f176ef0b399ae6a2c3421ed0692bdd500dac12d1bab59861879a73daaa29f5
tkovalyuk/functional-program
ex2 for lec2. метод Ньютона для кореня_квадратного.rkt
#lang racket ;===================================== приклад до lec2 ;-------------------------------------- Ex2 розрахунок корня квадратного за методом ;================================== процедура розрахунку корня квадратного з х (define (mysqrt x) завдання початкового значення корня з х рекурсивне покращ...
null
https://raw.githubusercontent.com/tkovalyuk/functional-program/37ffa67d813a6d410949557e28440600fb3784f3/code_example/ex2%20for%20lec2.%20%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%20%D0%9D%D1%8C%D1%8E%D1%82%D0%BE%D0%BD%D0%B0%20%D0%B4%D0%BB%D1%8F%20%D0%BA%D0%BE%D1%80%D0%B5%D0%BD%D1%8F_%D0%BA%D0%B2%D0%B0%D0%B4%D1%80%D0%B0%D1%82%D0%B...
racket
===================================== -------------------------------------- ================================== --------виклик процедури(функції)---------------
#lang racket приклад до lec2 Ex2 розрахунок корня квадратного за методом процедура розрахунку корня квадратного з х (define (mysqrt x) завдання початкового значення корня з х рекурсивне покращення y корня з х (define (sqrt-iter y x) якщо досягнуто задовільне значення отримати значення корня інакше по...
6aef754fadb6408d2e20609adf1ce6bfa9972075387a92b51670c53e92081256
ermine/sulci
wtf_convert.ml
open Dbm open Sqlite_util open Sqlite let _ = if Array.length Sys.argv <> 4 then begin Printf.printf "Usage: %s dbname owner@domain\n newdb" Sys.argv.(0); Pervasives.exit 127 end let voc = opendbm Sys.argv.(1) [Dbm_rdonly] 0o666 let owner = Sys.argv.(2) let db = let file = Sys.argv.(3) in le...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/utils/wtf/wtf_convert.ml
ocaml
open Dbm open Sqlite_util open Sqlite let _ = if Array.length Sys.argv <> 4 then begin Printf.printf "Usage: %s dbname owner@domain\n newdb" Sys.argv.(0); Pervasives.exit 127 end let voc = opendbm Sys.argv.(1) [Dbm_rdonly] 0o666 let owner = Sys.argv.(2) let db = let file = Sys.argv.(3) in le...
8a0087ee8dbc2a539ba1a6b1a72f7c2f5851f8785b9837b641654004a1c6a75f
cmsc430/www
info.rkt
#lang info (define version "1.0") (define collection 'multi) (define deps (list)) ;; Outlaw is omitted here because it depends on libraries that are a pain ;; to ensure are set up properly and we don't want students to see failing tests at the beginning of the semester , nor do we want to get into setting up libra...
null
https://raw.githubusercontent.com/cmsc430/www/0e678fae91125bfaa76c92b0daebb44d6fa833af/langs/info.rkt
racket
Outlaw is omitted here because it depends on libraries that are a pain to ensure are set up properly and we don't want students to see failing To test outlaw you should do an explicit: raco test -c outlaw
#lang info (define version "1.0") (define collection 'multi) (define deps (list)) tests at the beginning of the semester , nor do we want to get into setting up libraries only needed in the last week and only if you actually care to run Outlaw . (define test-omit-paths (list "outlaw"))
318605a09134a96fcf5bf1caf08d4329a49aa6afb26cb155daeb27f758b4fd91
adrianton3/staplo
levels.cljs
(ns staplo.levels (:require [staplo.common :refer [interval]])) (def level-configs { "strings" [ { :name "easy" :start-length (interval 3 4) :operations {:type "strings" :list ["reverse" "rotate" "push-c"]} :steps (interval 3 4)} { :name "medium" :start-length (interval ...
null
https://raw.githubusercontent.com/adrianton3/staplo/c251d24644c24fe100a6da63c6e32c9ba8b60fe9/src/staplo/levels.cljs
clojure
(ns staplo.levels (:require [staplo.common :refer [interval]])) (def level-configs { "strings" [ { :name "easy" :start-length (interval 3 4) :operations {:type "strings" :list ["reverse" "rotate" "push-c"]} :steps (interval 3 4)} { :name "medium" :start-length (interval ...
092675e98a85b2b7f801df6cb1bccbc368212f3065455451d829b87c72f2b004
lazy-cat-io/metaverse
bean.cljs
(ns metaverse.common.utils.bean (:require [cljs-bean.core :as b])) (defn ->js [x] (b/->js x)) (defn ->clj [x] (b/->clj x)) (defn bean [^js x] (when (some? x) (b/bean x :recursive true))) (defn then-bean [^js promise] (.then promise bean))
null
https://raw.githubusercontent.com/lazy-cat-io/metaverse/2e5754967ac0e4219197da3ff6937b666d2d26fa/src/main/clojure/metaverse/common/utils/bean.cljs
clojure
(ns metaverse.common.utils.bean (:require [cljs-bean.core :as b])) (defn ->js [x] (b/->js x)) (defn ->clj [x] (b/->clj x)) (defn bean [^js x] (when (some? x) (b/bean x :recursive true))) (defn then-bean [^js promise] (.then promise bean))
48f63b198fbc83aee17a9f11c2112df0e773327848e1c3bcb01398be25651238
haskell-tools/haskell-tools
Basic.hs
# LANGUAGE DefaultSignatures # module Basic where class DefaultClass a where f :: a -> () f = const () class C a where g :: a -> () default g :: DefaultClass a => a -> () {-* DefaultSignatures *-} g = f
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/DefaultSignaturesTest/Basic.hs
haskell
* DefaultSignatures *
# LANGUAGE DefaultSignatures # module Basic where class DefaultClass a where f :: a -> () f = const () class C a where g :: a -> () g = f
8ab8debd2bc2a75b37c71b13deb192771b419effb5c9e800049b60daf3f58e9d
shentufoundation/deepsea
BuiltinSemanticsExt.mli
this module defines extensions to the generated BuiltinSemantics module this module defines extensions to the generated BuiltinSemantics module *) val show0 : MachineModel.builtin0 -> string val show1 : MachineModel.builtin1 -> string
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/BuiltinSemanticsExt.mli
ocaml
this module defines extensions to the generated BuiltinSemantics module this module defines extensions to the generated BuiltinSemantics module *) val show0 : MachineModel.builtin0 -> string val show1 : MachineModel.builtin1 -> string
69cb3ad94f5ed4a8e8e9f70da49672f46b6fa0bb37033b254e11586b93d20ed1
acl2/acl2
eval-models.lisp
; A tool to evaluate the proof-advice-generating models ; Copyright ( C ) 2022 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "ACL2") ; todo: change to HEL...
null
https://raw.githubusercontent.com/acl2/acl2/2dbed6fff9a66644c1dec6b9f3564eeb7e5758ce/books/kestrel/helpers/eval-models.lisp
lisp
A tool to evaluate the proof-advice-generating models todo: change to HELP package todo: factor out common stuff todo: factor out common stuff: clear-keys-with-matching-prefixes todo: move An indicator for a test, of the form (book-name theorem-name breakage-type). book-name theorem-name breakage-type mod...
Copyright ( C ) 2022 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) (include-book "advice") (include-book "kestrel/utilities/split-path" :dir :system) (include-book "kestrel/lists-light/remove-nth" :dir :system) (local (include-book "kestrel/arithmeti...
98e0b6d8b03173a77f1331e38e53003dc748bda1e90cdef7dc3bba311a46b1e8
bitemyapp/bloodhound
ApproxEq.hs
# LANGUAGE DefaultSignatures # {-# LANGUAGE OverloadedStrings #-} module Test.ApproxEq where import qualified Data.List.NonEmpty as NE import Database.Bloodhound import Test.Import -- | Typeclass for "equal where it matters". Use this to specify -- less-strict equivalence for things such as lists that can wind up --...
null
https://raw.githubusercontent.com/bitemyapp/bloodhound/c5a10dd2922e0a2debaeb8985e53112700a1998b/tests/Test/ApproxEq.hs
haskell
# LANGUAGE OverloadedStrings # | Typeclass for "equal where it matters". Use this to specify less-strict equivalence for things such as lists that can wind up in an unpredictable order | Due to the way nodeattrfilters get serialized here, they may come out in a different order, but they are morally equivalent
# LANGUAGE DefaultSignatures # module Test.ApproxEq where import qualified Data.List.NonEmpty as NE import Database.Bloodhound import Test.Import class ApproxEq a where (=~) :: a -> a -> Bool showApproxEq :: a -> String default showApproxEq :: (Show a) => a -> String showApproxEq = show (==~) :: (ApproxEq ...
050b15b3964563a34c61b4ea21c35ea60e5c5b5efba64f4541d793371898e26b
EligiusSantori/L2Apf
party_loot.scm
(module system racket/base (provide loot-types) (define loot-types (list (cons 0 'finder) (cons 1 'random) (cons 2 'random-all) (cons 3 'by-turn) (cons 4 'by-turn-all) )) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/party_loot.scm
scheme
(module system racket/base (provide loot-types) (define loot-types (list (cons 0 'finder) (cons 1 'random) (cons 2 'random-all) (cons 3 'by-turn) (cons 4 'by-turn-all) )) )
546098fc265dec47e2902cbc5a78e024cdf2cd18aac533705c6654529c36ed45
silviucpp/erlxml
erlxml_utils.erl
-module(erlxml_utils). -author("byron.wang"). -include("erlxml.hrl"). -export([ cdata/1, subel/2, subel_cdata/2 ]). -spec cdata(#xmlel{}) -> binary(). cdata(#xmlel{children = Children}) -> case lists:keyfind(xmlcdata, 1, Children) of {xmlcdata, Xmlcdata} -> Xmlcdata; _ -> <<>> end. -spec subel(#...
null
https://raw.githubusercontent.com/silviucpp/erlxml/caa7ed198f6e8569b6e058047394f3799a38fec7/src/erlxml_utils.erl
erlang
-module(erlxml_utils). -author("byron.wang"). -include("erlxml.hrl"). -export([ cdata/1, subel/2, subel_cdata/2 ]). -spec cdata(#xmlel{}) -> binary(). cdata(#xmlel{children = Children}) -> case lists:keyfind(xmlcdata, 1, Children) of {xmlcdata, Xmlcdata} -> Xmlcdata; _ -> <<>> end. -spec subel(#...
70cdd677ace590892c171f91cc2d9454b654064de1cfaad1cb0280a61ffb5595
joaotavora/hunchensocket
hunchensocket.lisp
(in-package :hunchensocket) (define-constant +websocket-magic-key+ "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" :test #'string= :documentation "Fixed magic WebSocket UUIDv4 key use in handshakes") (define-constant +continuation-frame+ #x0) (define-constant +text-frame+ #x1) (define-constant +binary-fram...
null
https://raw.githubusercontent.com/joaotavora/hunchensocket/e2384c971ac65a63fb910a061a3cdec4b684debb/hunchensocket.lisp
lisp
Mandatory API Optional API 65KiB Convenience API Conditions Client and resource machinery Binary reading/writing machinery RFC6455 Masking ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") key ("masking-key-octet-j"): (if mask-p (error "sending masked messag...
(in-package :hunchensocket) (define-constant +websocket-magic-key+ "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" :test #'string= :documentation "Fixed magic WebSocket UUIDv4 key use in handshakes") (define-constant +continuation-frame+ #x0) (define-constant +text-frame+ #x1) (define-constant +binary-fram...
c65992c46f829033cea5ffac49fc80fa49d301be7873ecd6860140c1ee03aa88
bomberstudios/mtasc
base64.ml
* Base64 - Base64 codec * Copyright ( C ) 2003 * * 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.1 of the License , or ( at your option ) any l...
null
https://raw.githubusercontent.com/bomberstudios/mtasc/d7c2441310248776aa89d60f9c8f98d539bfe8de/src/extlib-dev/base64.ml
ocaml
* Base64 - Base64 codec * Copyright ( C ) 2003 * * 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.1 of the License , or ( at your option ) any l...
2db0ec87e2974e9f0cfcb48d29a41b5953ca24b37ad716d3276db0058774327e
Drup/dowsing
Poset.ml
open Graph module type POSET = sig type t type elt val init : unit -> t val add : t -> elt -> unit val iter_succ : t -> elt -> (elt -> unit) -> unit val iter_pred : t -> elt -> (elt -> unit) -> unit end module Label = struct type t = Type.t end module Poset = struct module ...
null
https://raw.githubusercontent.com/Drup/dowsing/25f95c78c02deeee8bf9e203fb84fe87d723a76d/lib/index/Poset.ml
ocaml
open Graph module type POSET = sig type t type elt val init : unit -> t val add : t -> elt -> unit val iter_succ : t -> elt -> (elt -> unit) -> unit val iter_pred : t -> elt -> (elt -> unit) -> unit end module Label = struct type t = Type.t end module Poset = struct module ...
8c8aeaa5d4267bd8ffe3f4a3cb2e6e60136dad40e981748f3b073d398bf50a48
sky-big/RabbitMQ
rabbit_guid.erl
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 WARRANTY OF ...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/rabbit_guid.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
3e19c9d1b8f42b4b454170302ee11509a29d0611971537d9f44f9c9bad083f04
graninas/Hydra
FTLI.hs
module Hydra.Core.Random.FTLI where import Hydra.Prelude import System.Random hiding (next) import qualified Hydra.Core.FTL as L import qualified Hydra.Runtime as R instance MonadIO m => L.RandomL (ReaderT R.CoreRuntime m) where getRandomInt range = l...
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/src/Hydra/Core/Random/FTLI.hs
haskell
module Hydra.Core.Random.FTLI where import Hydra.Prelude import System.Random hiding (next) import qualified Hydra.Core.FTL as L import qualified Hydra.Runtime as R instance MonadIO m => L.RandomL (ReaderT R.CoreRuntime m) where getRandomInt range = l...
4866e6fe7f9b85dd0917faf686a8371897e2077813eefbb0d24403f89d1a33b3
imandra-ai/ocaml-opentelemetry
resource_types.mli
(** resource.proto Types *) (** {2 Types} *) type resource = { attributes : Common_types.key_value list; dropped_attributes_count : int32; } * { 2 Default values } val default_resource : ?attributes:Common_types.key_value list -> ?dropped_attributes_count:int32 -> unit -> resource (** [default_resou...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/62d1a9cec785186966e880c91c4c109875b0dd62/src/resource_types.mli
ocaml
* resource.proto Types * {2 Types} * [default_resource ()] is the default value for type [resource]
type resource = { attributes : Common_types.key_value list; dropped_attributes_count : int32; } * { 2 Default values } val default_resource : ?attributes:Common_types.key_value list -> ?dropped_attributes_count:int32 -> unit -> resource
c3918aa2b9d8b4bb9b856c0f9079e5a68a42a46dfe01569bea7206dee3886ec4
glondu/belenios
fill_en_po.ml
(* For each source string that has no translation, copy msgid as translation *) Usage : < en.po | sponge en.po #use "topfind";; #require "pcre";; let rex = Pcre.regexp "^msgid (.*)$" let rec process_msgid ic oc = match input_line ic with | exception End_of_file -> () | line -> match Pcre.exec ~rex lin...
null
https://raw.githubusercontent.com/glondu/belenios/86114db11cdf55c2355ac47ab6938976b51a73e5/contrib/fill_en_po.ml
ocaml
For each source string that has no translation, copy msgid as translation
Usage : < en.po | sponge en.po #use "topfind";; #require "pcre";; let rex = Pcre.regexp "^msgid (.*)$" let rec process_msgid ic oc = match input_line ic with | exception End_of_file -> () | line -> match Pcre.exec ~rex line with | s -> process_msgstr (Pcre.get_substring s 1) ic oc | exceptio...
4ec930a6146b6cbde9a6ca848e2f23cab980e776794b494bb4a5799986980378
koka-lang/koka
InferKind.hs
------------------------------------------------------------------------------ Copyright 2012 - 2021 , Microsoft Research , . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be -- found in the LICENSE file...
null
https://raw.githubusercontent.com/koka-lang/koka/2909df715aebf57966fbdd4afdc7a477f55f239e/src/Kind/InferKind.hs
haskell
---------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the found in the LICENSE file at the root of this distribution. --------------------------------------------------------------------------- ------------------------...
Copyright 2012 - 2021 , Microsoft Research , . terms of the Apache License , Version 2.0 . A copy of the License can be module Kind.InferKind ( InfKind(..) , infKindStar, infKindHandled, infKindLabel , infKindFun , infKindFunN ...
f82bb80bb5a33e58a7f9197f411285358e3395432fd54424b84286f69719fae2
bet365/erpc
erpc_ssl_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Hillside Technology Ltd. 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by ap...
null
https://raw.githubusercontent.com/bet365/erpc/77c63d4398ad6baa07178e976d26eb95240e17a8/test/erpc_ssl_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Hillside Technology Ltd. 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erpc_ssl_SUITE). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("common...
a4196eee42c9e6967a78f24309b2a6ee873918e681ed380c8ab2e2bb4e27fccd
pirapira/coq2rust
fake_ide.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/tools/fake_ide.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Fake_ide : Simulate a [coqide] tal...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * let error s = prerr_endlin...
0e28e065e874069e1cbe0b5e7d20c9007609a20bd9027dc2e5292bf365baff82
bmeurer/ocamljit2
wc.ml
Counts characters , lines and words in one or several files . let chars = ref 0 and words = ref 0 and lines = ref 0 type state = Inside_word | Outside_word let count_channel in_channel = let rec count status = let c = input_char in_channel in incr chars; match c with '\n' -> incr lines;...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/basic-io/wc.ml
ocaml
No command-line arguments
Counts characters , lines and words in one or several files . let chars = ref 0 and words = ref 0 and lines = ref 0 type state = Inside_word | Outside_word let count_channel in_channel = let rec count status = let c = input_char in_channel in incr chars; match c with '\n' -> incr lines;...
13eeccca1ad946ce15eaa7db69037e3f6b633da3ec8473fdcc7c06a625c848ec
nathell/solitaire
events.cljs
(ns solitaire.events (:require [re-frame.core :as rf] [solitaire.board :as board] [solitaire.db :as db] [day8.re-frame.tracing :refer-macros [fn-traced]])) (rf/reg-event-db ::initialize-db (fn [_ _] db/default-db)) (rf/reg-event-db ::select-field (fn [db [_ x y]] (assoc db :selected-field ...
null
https://raw.githubusercontent.com/nathell/solitaire/02c951d7886aa391b2cea6b49fc6d892dd9c0fa4/exercises/ex_04/solution/events.cljs
clojure
(ns solitaire.events (:require [re-frame.core :as rf] [solitaire.board :as board] [solitaire.db :as db] [day8.re-frame.tracing :refer-macros [fn-traced]])) (rf/reg-event-db ::initialize-db (fn [_ _] db/default-db)) (rf/reg-event-db ::select-field (fn [db [_ x y]] (assoc db :selected-field ...
d1714d1a3418a723812e470ffbee8c1267f5132d632c267af1aaa52604cb7fbf
PacktWorkshops/The-Clojure-Workshop
core_test.cljs
(ns test-app.core-test (:require [cljs.test :refer-macros [are deftest is testing use-fixtures]] [test-app.core :refer [handle-click multiply]])) (use-fixtures :each {:before (fn [] (def app-state (atom {:counter 0}))) :after (fn [] (reset! app-state nil))}) (deftest handle-click-te...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter10/Exercise10.08/test-app/test/test_app/core_test.cljs
clojure
(ns test-app.core-test (:require [cljs.test :refer-macros [are deftest is testing use-fixtures]] [test-app.core :refer [handle-click multiply]])) (use-fixtures :each {:before (fn [] (def app-state (atom {:counter 0}))) :after (fn [] (reset! app-state nil))}) (deftest handle-click-te...
d84f37a202b57652fddbdf4b8e8c11512a546573ad2e2bec253fe217d11e8fe3
declanoller/haskell-vae
MatrixUtils.hs
module MatrixUtils ( layer_to_matrix , batch_to_mat , batchlist_to_matlist , nonlinear_fn , nonlinear_fn_bw , softplus , softplus_bw , softplus_inv , mse_loss , mse_loss_bw , sigmoid , sigmoid_batch , sigmoid_bw , get_y_out_from_vae_output , get_latent_from_vae_output , get_mu_sigma_from_vae_output , right_pad_ones , d...
null
https://raw.githubusercontent.com/declanoller/haskell-vae/08c54e37be8592e699dac412c6859a775eb92460/MatrixUtils.hs
haskell
------- Conversions to/from Batch type ---------- Matrix functions use, all other places call this one, so you just need to switch here. corresponding backwards fn. ----------------------- Producing points in the latent space Supply a Matrix R of a point in the latent space, as well as the "radius" around it to get...
module MatrixUtils ( layer_to_matrix , batch_to_mat , batchlist_to_matlist , nonlinear_fn , nonlinear_fn_bw , softplus , softplus_bw , softplus_inv , mse_loss , mse_loss_bw , sigmoid , sigmoid_batch , sigmoid_bw , get_y_out_from_vae_output , get_latent_from_vae_output , get_mu_sigma_from_vae_output , right_pad_ones , d...
f040bce7fdcdbc257b821c52602dde30cfee0fc02e9c11652ba7f26d78ec0449
mbg/hoop
NewExpr.hs
module Language.Hoop.NewExpr where data NewExpr = NewExpr { newClassName :: String, newArgs :: String }
null
https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/src/Language/Hoop/NewExpr.hs
haskell
module Language.Hoop.NewExpr where data NewExpr = NewExpr { newClassName :: String, newArgs :: String }
53021b0166b031ba776d2abe43171be59c61000a174d6e9e30762d1e4a68e137
haskellari/lattices
PartialOrd.hs
{-# LANGUAGE Safe #-} ---------------------------------------------------------------------------- -- | -- Module : Algebra.PartialOrd Copyright : ( C ) 2010 - 2015 , 2015 - 2019 -- License : BSD-3-Clause (see the file LICENSE) -- Maintainer : < > -- --------------------------------------...
null
https://raw.githubusercontent.com/haskellari/lattices/6b22c2e8d1df4d3f8ab927709847193a5bb6e357/src/Algebra/PartialOrd.hs
haskell
# LANGUAGE Safe # -------------------------------------------------------------------------- | Module : Algebra.PartialOrd License : BSD-3-Clause (see the file LICENSE) -------------------------------------------------------------------------- * Partial orderings * Fixed points of chains in partial or...
Copyright : ( C ) 2010 - 2015 , 2015 - 2019 Maintainer : < > module Algebra.PartialOrd ( PartialOrd(..), partialOrdEq, lfpFrom, unsafeLfpFrom, gfpFrom, unsafeGfpFrom ) where import Data.Foldable (Foldable (..)) import Data.Hashable (Hashable (..)) impo...
2e80ac3bbc99b5d4112911570b726c364b36401f43486a4b85e4967e6e341f5c
den1k/vimsical
fixture.clj
(ns vimsical.backend.components.snapshot-store.fixture (:require [clojure.test :as t] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra.fixture :as cassandra] [vimsical.backend.components.snapshot-store :as snapshot-store])) ;; ;; * State ;; (def ^:dynamic *snapshot-store* nil) ;...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/test/backend/vimsical/backend/components/snapshot_store/fixture.clj
clojure
* State * Helpers * Fixtures
(ns vimsical.backend.components.snapshot-store.fixture (:require [clojure.test :as t] [com.stuartsierra.component :as cp] [vimsical.backend.adapters.cassandra.fixture :as cassandra] [vimsical.backend.components.snapshot-store :as snapshot-store])) (def ^:dynamic *snapshot-store* nil) (defn- ->snapshot...
4ea6adb23a4c0be5f9e86fc15baf829f0b6f57090da083e93e243eff46886bea
hellonico/origami-fun
writingv2.clj
(ns opencv4.video.writingv2 (:require [opencv4.core :refer :all] [opencv4.utils :as u] [opencv4.video :refer :all])) (defn -main[& args] (let[ outputVideo (new-videowriter)] (.open outputVideo (first args) ( VideoWriter / fourcc \M \J \P \G ) 1196444237 30 (new-size 240 320) ;...
null
https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/video/writingv2.clj
clojure
(.release outputVideo) (-main)
(ns opencv4.video.writingv2 (:require [opencv4.core :refer :all] [opencv4.utils :as u] [opencv4.video :refer :all])) (defn -main[& args] (let[ outputVideo (new-videowriter)] (.open outputVideo (first args) ( VideoWriter / fourcc \M \J \P \G ) 1196444237 30 ) (u/simple-cam-w...
e1420c6e36fc5bd23a8ca83930700471543e83b90561d51daa39b3cab3787bac
ConferOpenSource/refurb
Cli.hs
# LANGUAGE NoImplicitPrelude # -- |Module with @optparse-applicative@ parsers for and datatypes to represent the command line arguments. module Refurb.Cli where import ClassyPrelude import Composite.Record ((:->)(Val)) import Data.Word (Word16) import qualified Options.Applicative as OA import Refurb.Store (FQualified...
null
https://raw.githubusercontent.com/ConferOpenSource/refurb/c6cb92e2c21718027b475a378f6f66b9d789ea07/src/Refurb/Cli.hs
haskell
|Module with @optparse-applicative@ parsers for and datatypes to represent the command line arguments. execute@ boolean ( @True@ if given , @False@ if omitted ) backup - first@ option to the @migrate@ command . seed@ boolean ( @True@ if given , @False@ if omitted ) |The various top level commands that can be requeste...
# LANGUAGE NoImplicitPrelude # module Refurb.Cli where import ClassyPrelude import Composite.Record ((:->)(Val)) import Data.Word (Word16) import qualified Options.Applicative as OA import Refurb.Store (FQualifiedKey) newtype GoNoGo = GoNoGo Bool deriving (Eq, Show) newtype PreMigrationBackup = PreMigrationBackup Fi...
af62d068b4833ae40f970e85bdbe7e56eb52b1bc8fdfdfbad3f7363a3f4937e3
javalib-team/javalib
ptmap.mli
* Copyright ( C ) 2008 ( C ) 2008 , 2009 ( CNRS ) * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 , with the special exception on linking described in file * LICENSE . * This software is...
null
https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/src/ptrees/ptmap.mli
ocaml
* The following signature is similar to [Map.S with type key = int]. The documentation is only given for function that differs from [Map.S with type key = int]. The module {!Ptset} is based on the same data-structure. * [add ~merge:f k d m] returns a map containing the same bindings as [m], plus a ...
* Copyright ( C ) 2008 ( C ) 2008 , 2009 ( CNRS ) * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 , with the special exception on linking described in file * LICENSE . * This software is...
bea724015fce3cace36fdf90ecfad9f5de58a5060d831b52bd818d08e90c94da
webyrd/n-grams-for-synthesis
variant-old-skool-incomplete.scm
(define *output-table-file-name* "tmp/variant-old-skool-incomplete-table.scm") (define allow-incomplete-search? #t) (load "mk-vicare.scm") (load "mk.scm") (load "test-check.scm") (load "interp-old-style.scm") (load "simplified-interp-tests.scm")
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/variant-old-skool-incomplete.scm
scheme
(define *output-table-file-name* "tmp/variant-old-skool-incomplete-table.scm") (define allow-incomplete-search? #t) (load "mk-vicare.scm") (load "mk.scm") (load "test-check.scm") (load "interp-old-style.scm") (load "simplified-interp-tests.scm")
744cc0bc335e4410d875dc2b4d763810be6084d3a3663f2f559e87129122659c
RedPRL/algaett
Pi.mli
open Tactic val pi : name:Yuujinchou.Trie.path option -> cbase:check -> cfam:check binder -> check val vir_pi : name:Yuujinchou.Trie.path option -> cbase:check -> cfam:check binder -> check val lam : name:Yuujinchou.Trie.path option -> cbnd:check binder -> check val app : itm:infer -> ctm:check -> infer
null
https://raw.githubusercontent.com/RedPRL/algaett/5685e49608aaf230f5691f3e339cd2bd3acb6ec9/src/refiner/rules/Pi.mli
ocaml
open Tactic val pi : name:Yuujinchou.Trie.path option -> cbase:check -> cfam:check binder -> check val vir_pi : name:Yuujinchou.Trie.path option -> cbase:check -> cfam:check binder -> check val lam : name:Yuujinchou.Trie.path option -> cbnd:check binder -> check val app : itm:infer -> ctm:check -> infer
d504935db20c52155a9baf889d97054038010aba1ac9eb1afe7b934a5c4c9cdd
ailisp/Graphic-Forms
system-conditions.lisp
(in-package :graphic-forms.uitoolkit.system) (define-condition toolkit-error (simple-error) ((detail :reader detail :initarg :detail :initform nil))) (defmethod print-object ((obj toolkit-error) stream) (let ((detail (detail obj))) (cond (detail (format stream "~a" detail)) (t ...
null
https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/system/system-conditions.lisp
lisp
(in-package :graphic-forms.uitoolkit.system) (define-condition toolkit-error (simple-error) ((detail :reader detail :initarg :detail :initform nil))) (defmethod print-object ((obj toolkit-error) stream) (let ((detail (detail obj))) (cond (detail (format stream "~a" detail)) (t ...
3c156084adbfc370133f329d201de3849926d49450f76efaa59c6eee5c602941
2600hz-archive/whistle
proper_transformer.erl
Copyright 2010 - 2011 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr 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 o...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/proper-1.0/src/proper_transformer.erl
erlang
PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo...
Copyright 2010 - 2011 < > , < > and < > This file is part of PropEr . 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 Pub...
7e456cc8ea4efb5d77975b8d1ac97dc32aeb660718c2bf9f6449686781fd5542
titola/incudine
config-specials.lisp
(declaim (special *addrinfo-hints-flags* *audio-driver* *bounce-to-disk-guard-size* *c-compiler* *client-name* *default-bpm* *default-data-format* *default-header-type* *default-table-size* *edf-heap-pool-grow* *edf-heap-pool-size* *enable-jack-midi* *enable-portmidi-output-sample-offset* *...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/src/config-specials.lisp
lisp
(declaim (special *addrinfo-hints-flags* *audio-driver* *bounce-to-disk-guard-size* *c-compiler* *client-name* *default-bpm* *default-data-format* *default-header-type* *default-table-size* *edf-heap-pool-grow* *edf-heap-pool-size* *enable-jack-midi* *enable-portmidi-output-sample-offset* *...
c46d2638c045ee57d295e0b4d41484394a7a350a779da7eb23ae1428d91cb30e
vkatsuba/rebar3_plugin
{{ repo-name }}_prv.erl
%%% @doc Plugin provider for rebar3 {{ repo-name }}. -module({{ repo-name }}_prv). -export([init/1, do/1, format_error/1]). -ignore_xref([do/1, format_error/1, {providers, create, 1}, {rebar_state, add_provider, 2}, {rebar_state, command_parsed_args, 1}]). -def...
null
https://raw.githubusercontent.com/vkatsuba/rebar3_plugin/3e3ad10e3e46acd8491bfdf2fc7084f082f1d6f4/src/%7B%7B%20repo-name%20%7D%7D_prv.erl
erlang
@doc Plugin provider for rebar3 {{ repo-name }}. ============================================================================= Public API ============================================================================= The 'user friendly' name of the task The module implementation of the task The task can be run by...
-module({{ repo-name }}_prv). -export([init/1, do/1, format_error/1]). -ignore_xref([do/1, format_error/1, {providers, create, 1}, {rebar_state, add_provider, 2}, {rebar_state, command_parsed_args, 1}]). -define(PROVIDER, {{ repo-name }}). -define(DEPS, []). -d...
918ccafb8834412c9bfb424d0e13444fb290b99f0a7ad60ab8bd61f0a96e271e
liquidz/misaki
impress.clj
@title default title @format html5 (def ID (atom 0)) (def ^:dynamic *group* {}) (defn- rad [n] (Math/toRadians (double n))) (defn- rotate [x y rad] (let [sin-r (Math/sin rad) cos-r (Math/cos rad)] (map #(Math/round %) [(- (* x cos-r) (* y sin-r)) (+ (* y cos-r) (* x sin-r))])...
null
https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/samples/impress/template/layouts/impress.clj
clojure
x y scale rotate /head /body
@title default title @format html5 (def ID (atom 0)) (def ^:dynamic *group* {}) (defn- rad [n] (Math/toRadians (double n))) (defn- rotate [x y rad] (let [sin-r (Math/sin rad) cos-r (Math/cos rad)] (map #(Math/round %) [(- (* x cos-r) (* y sin-r)) (+ (* y cos-r) (* x sin-r))])...
cfa85616552733e1a451123995404adb43afa00a5319d7d2d0cd341ccb254779
copton/haskell-examples
logger.hs
type Log = [String] data Logger a = Logger { execLogger :: (a, Log) } record :: String -> Logger () record s = Logger ((), [s]) getLog :: Logger a -> Log getLog (Logger (_, l)) = l instance Monad Logger where m >>= f = let (a, w) = execLogger m n = f a (b, x) = execLogger n ...
null
https://raw.githubusercontent.com/copton/haskell-examples/27c297848ca0f77aa152ab815d1aacd1e01d0830/real-world-haskell/monads/logger.hs
haskell
m >> f = m >>= \_ -> f
type Log = [String] data Logger a = Logger { execLogger :: (a, Log) } record :: String -> Logger () record s = Logger ((), [s]) getLog :: Logger a -> Log getLog (Logger (_, l)) = l instance Monad Logger where m >>= f = let (a, w) = execLogger m n = f a (b, x) = execLogger n ...
e0b5b91c64b84cee48c9a3278c5670b28aa1856ffe021c51ebb5df42fa7776b5
ryanpbrewster/haskell
Strategies.hs
module Strategies ( eStop , sqrtStop ) where import Data.List (find) import Data.Maybe (fromMaybe) stop :: Int -> [Int] -> Int stop k xs = let (as, bs) = splitAt k xs bestFromAs = maximum as firstBRecord = find (>= bestFromAs) bs in fromMaybe (last xs) firstBRecord eStop xs = stop (round $ fromInteg...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/Secretary/Strategies.hs
haskell
module Strategies ( eStop , sqrtStop ) where import Data.List (find) import Data.Maybe (fromMaybe) stop :: Int -> [Int] -> Int stop k xs = let (as, bs) = splitAt k xs bestFromAs = maximum as firstBRecord = find (>= bestFromAs) bs in fromMaybe (last xs) firstBRecord eStop xs = stop (round $ fromInteg...
9763e4b1cd33d54d302140da2fcf4a8ebace98d5104c2eb5eccb20bef33b064a
rtoy/cmucl
boot-2010-08-1.lisp
;; Need to add a new ef macro id for OCTETS-TO-STRING-COUNTED. ;; 2010 - 09 ( probably ) needs to be cross - compiled from 2010 - 08 ( aka 20b - pre1 ) . Use something like ;; src / tools / cross - build - world.sh -crl -B src / bootfiles/20a / boot-2010 - 08 - 1.lisp target/ cross src / tools / cross - scripts...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/20a/boot-2010-08-1.lisp
lisp
Need to add a new ef macro id for OCTETS-TO-STRING-COUNTED. string length input a character output a character input string output string octets to string string to octets encode decode flush state copy state
2010 - 09 ( probably ) needs to be cross - compiled from 2010 - 08 ( aka 20b - pre1 ) . Use something like src / tools / cross - build - world.sh -crl -B src / bootfiles/20a / boot-2010 - 08 - 1.lisp target/ cross src / tools / cross - scripts / cross - x86 - x86.lisp < 20b / bin / lisp > (in-package "STREAM")...
8b4257f4223d7317af507042c45eb10ebfac9d5b5bf6f6b2eb2c063497692a3c
rjray/advent-2020-clojure
day11bis.clj
(ns advent-of-code.day11bis (:require [clojure.string :as str])) (def surrounds [[-1 -1] [-1 0] [-1 1] [0 -1] [0 1] [1 -1] [1 0] [1 1]]) (defn- process-input [input] (->> input str/split-lines (mapv vec))) (defn- count-occupied [floor] ((frequencies (flat...
null
https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/src/advent_of_code/day11bis.clj
clojure
(ns advent-of-code.day11bis (:require [clojure.string :as str])) (def surrounds [[-1 -1] [-1 0] [-1 1] [0 -1] [0 1] [1 -1] [1 0] [1 1]]) (defn- process-input [input] (->> input str/split-lines (mapv vec))) (defn- count-occupied [floor] ((frequencies (flat...
52f58d66ad5380986bf6bd5621a0bc2c7a8b32e0582d85c7c0057b39fb74fcb7
supki/envparse
Env.hs
# LANGUAGE CPP # {-# LANGUAGE Safe #-} -- | Here's a simple example of a program that uses @envparse@'s parser: -- -- @ module ( main ) where -- import Control . ( unless ) -- import Env -- data Hello = Hello { name : : String , quiet : : } -- -- hello :: IO Hello -- hello = Env.'parse' ('Help.header' \"envpar...
null
https://raw.githubusercontent.com/supki/envparse/59601499efb9df9ef694d8dfb6cc045662fe0ed5/src/Env.hs
haskell
# LANGUAGE Safe # | Here's a simple example of a program that uses @envparse@'s parser: @ import Env hello :: IO Hello hello = Env.'parse' ('Help.header' \"envparse example\") $ Hello \<$\> 'var' ('str' <=< 'nonempty') \"NAME\" ('help' \"Target for the greeting\") main :: IO () main = do Hello {name,...
# LANGUAGE CPP # module ( main ) where import Control . ( unless ) data Hello = Hello { name : : String , quiet : : } > ' switch ' \"QUIET\ " ( ' help ' \"Whether to actually print the greeting\ " ) module Env ( parse , parseOr , Parser , Mod , Help.Info , Help.header ...
e2b402b0ef33a87dd1bf054cae2633b79e8a892b1f768a9fd9823552b8213afe
kfish/const-math-ghc-plugin
arith013.hs
Test gcdInt / gcdInteger import GHC.Real ( gcdInt ) import GHC.Integer.GMP.Internals ( gcdInteger ) main :: IO () main = do test gcdInt [ -42, 0, 105 ] test gcdInteger [-12193263111263526900, -42, 0, 105, 1234567890 ] test :: (Show a, Integral a) => (a -> a -> a) -> [a]...
null
https://raw.githubusercontent.com/kfish/const-math-ghc-plugin/c1d269e0ddc72a782c73cca233ec9488f69112a9/tests/ghc-7.4/arith013.hs
haskell
Test gcdInt / gcdInteger import GHC.Real ( gcdInt ) import GHC.Integer.GMP.Internals ( gcdInteger ) main :: IO () main = do test gcdInt [ -42, 0, 105 ] test gcdInteger [-12193263111263526900, -42, 0, 105, 1234567890 ] test :: (Show a, Integral a) => (a -> a -> a) -> [a]...
edcf366811263060e0df528f952fb341fe0121a4fc1c8f68846e8eb155379251
spectrum-finance/cardano-dex-sdk-haskell
Combinators.hs
module Common.Data.List.Combinators ( indexOf ) where indexOf :: (Eq a, Integral s) => a -> [a] -> s indexOf a as = indexOf' a as 0 where indexOf' :: (Eq a, Integral s) => a -> [a] -> s -> s indexOf' _ [] _ = -1 indexOf' a' (x:xs) s | a' == x = s | otherwise = indexOf' a' xs (s + 1)
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/ce6cf0e541f27dc1d53e6675f38fad10910812f7/ergo-hs-common/src/Common/Data/List/Combinators.hs
haskell
module Common.Data.List.Combinators ( indexOf ) where indexOf :: (Eq a, Integral s) => a -> [a] -> s indexOf a as = indexOf' a as 0 where indexOf' :: (Eq a, Integral s) => a -> [a] -> s -> s indexOf' _ [] _ = -1 indexOf' a' (x:xs) s | a' == x = s | otherwise = indexOf' a' xs (s + 1)
74c8cf397ad57e7ed2189e2a981c866b162e879ec60e215f412e1272f35dd308
janestreet/bonsai
linter.mli
open! Core open! Import module Warning : sig type t val to_string : t -> string val relative_to : Source_code_position.t -> t -> t end * Produces a list of missed optimization opportunities . It currently checks for the following : - Unfolded constants - State_machine1 to State_machine0 trans...
null
https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/src/linter.mli
ocaml
open! Core open! Import module Warning : sig type t val to_string : t -> string val relative_to : Source_code_position.t -> t -> t end * Produces a list of missed optimization opportunities . It currently checks for the following : - Unfolded constants - State_machine1 to State_machine0 trans...
af96d929358c196157164908a67edf82af605ead976ef1e9f62c3e9d52a0db82
Daniel-Diaz/pcre-light
failure1.hs
import Text.Regex.PCRE.Light.Char8 main = do let r = compile "(a|)*\\d" [] print (match r "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" [])
null
https://raw.githubusercontent.com/Daniel-Diaz/pcre-light/fc83e9869df1e6bae995520f8dffd61df9aa3f1e/tests/failure1.hs
haskell
import Text.Regex.PCRE.Light.Char8 main = do let r = compile "(a|)*\\d" [] print (match r "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" [])
4ff25f2f8247747d3a7491d4e8da5c9133649706b0baf8430f7fa14ecab250b3
tov/dssl2
subtract.rkt
#lang dssl2 assert 4 - 2 == 2
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/subtract.rkt
racket
#lang dssl2 assert 4 - 2 == 2
448d6569852d4674fdee205ffdc1542a8b63a0689ef8f423b06ea77010e6d7b3
lambdaisland/harvest
harvest_test.cljc
(ns lambdaisland.harvest-test (:require [clojure.test :refer [deftest testing is are]] [lambdaisland.harvest :as h] [lambdaisland.harvest.kernel :as hk])) (h/defactory user {:name "Arne"}) (deftest basic-attributes (testing "factories can be built explicitly" (is (= {:name "Arne"} (h...
null
https://raw.githubusercontent.com/lambdaisland/harvest/17e601ee9718ef2c915e469ed62ea963c43db17e/test/lambdaisland/harvest_test.cljc
clojure
(ns lambdaisland.harvest-test (:require [clojure.test :refer [deftest testing is are]] [lambdaisland.harvest :as h] [lambdaisland.harvest.kernel :as hk])) (h/defactory user {:name "Arne"}) (deftest basic-attributes (testing "factories can be built explicitly" (is (= {:name "Arne"} (h...
85b44251cded37623afe9dba04300c76bdbe0788d8834437d136c7b1a914e9b2
realworldocaml/book
dep_conf.ml
open Import open Dune_lang.Decoder type t = | File of String_with_vars.t | Alias of String_with_vars.t | Alias_rec of String_with_vars.t | Glob_files of { glob : String_with_vars.t ; recursive : bool } | Source_tree of String_with_vars.t | Package of String_with_vars.t | Universe | En...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/dep_conf.ml
ocaml
open Import open Dune_lang.Decoder type t = | File of String_with_vars.t | Alias of String_with_vars.t | Alias_rec of String_with_vars.t | Glob_files of { glob : String_with_vars.t ; recursive : bool } | Source_tree of String_with_vars.t | Package of String_with_vars.t | Universe | En...
0bd15fb693325442c159b71587a79ccebfec8af7806850b8e54471929b0b956b
cjay/vulkyrie
Shader.hs
{-# LANGUAGE Strict #-} module Vulkyrie.Vulkan.Shader ( metaFileContent , createShaderStage , metaShaderModule , shaderModuleFile , shaderFile , specializationInfo ) where import Foreign.Marshal.Alloc import Foreign.Marshal.Array import Foreign.Storable (pokeEl...
null
https://raw.githubusercontent.com/cjay/vulkyrie/0a53e6c943c535117e2676753d9bf3e04b37b26e/src/Vulkyrie/Vulkan/Shader.hs
haskell
# LANGUAGE Strict # example spec info TODO restrict lifetime example spec info TODO restrict lifetime
module Vulkyrie.Vulkan.Shader ( metaFileContent , createShaderStage , metaShaderModule , shaderModuleFile , shaderFile , specializationInfo ) where import Foreign.Marshal.Alloc import Foreign.Marshal.Array import Foreign.Storable (pokeElemOff) import ...
196247fee39feb80cd99473c6239804ffaaa0622fe357da0c7dbaae7c91dfb62
tschady/advent-of-code
d05_test.clj
(ns aoc.2020.d05-test (:require [aoc.2020.d05 :as sut] [clojure.test :refer :all])) (deftest challenges (is (= 850 (sut/part-1 sut/input))) (is (= 599 (sut/part-2 sut/input))))
null
https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/test/aoc/2020/d05_test.clj
clojure
(ns aoc.2020.d05-test (:require [aoc.2020.d05 :as sut] [clojure.test :refer :all])) (deftest challenges (is (= 850 (sut/part-1 sut/input))) (is (= 599 (sut/part-2 sut/input))))
a42d4cccca75eedf9692456b4b8b4e4b94c671599d933359412a4ddfc4e7ffa6
TyOverby/mono
implementation.mli
(** Internal to [Async_rpc_kernel]. See [Rpc.Implementation]. *) open! Core open! Async_kernel open Protocol open Implementation_types.Implementation module Expert : sig module Responder : sig type t = Expert.Responder.t = { query_id : Query_id.t ; writer : Transport.Writer.t ; mutable respon...
null
https://raw.githubusercontent.com/TyOverby/mono/5ce4569fc6edf6564d29d37b66d455549df1e497/vendor/janestreet-async_rpc_kernel/src/implementation.mli
ocaml
* Internal to [Async_rpc_kernel]. See [Rpc.Implementation]. 'init can be an error or an initial state
open! Core open! Async_kernel open Protocol open Implementation_types.Implementation module Expert : sig module Responder : sig type t = Expert.Responder.t = { query_id : Query_id.t ; writer : Transport.Writer.t ; mutable responded : bool } [@@deriving sexp_of] val create : Quer...
fe441378c1bd7880ca912660de6b7905c3e6439d029702fe68c7f4e21df71e15
russross/cownfs
readdirCache.mli
Copyright 2004 , 2005 * See the file COPYING for information about licensing and distribution . * See the file COPYING for information about licensing and distribution. *) open Common;; type t val make : int -> t val remove : t -> Fh.t -> unit val add : t -> Fh.t -> Unix.LargeFile.stats -> int -> int -> ...
null
https://raw.githubusercontent.com/russross/cownfs/cc67fae0294203a78b022d7300be8aa6c35c58af/readdirCache.mli
ocaml
Copyright 2004 , 2005 * See the file COPYING for information about licensing and distribution . * See the file COPYING for information about licensing and distribution. *) open Common;; type t val make : int -> t val remove : t -> Fh.t -> unit val add : t -> Fh.t -> Unix.LargeFile.stats -> int -> int -> ...
7a538c400b492883c6712185454aac933808757d881781f8e2e3ce3db43df2ae
ates/netflow
netflow_v5_codec_tests.erl
-module(netflow_v5_codec_tests). -include_lib("eunit/include/eunit.hrl"). decode_test() -> Data = <<0,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, 255,0,0,0,0,0,0,0,0,255,0,0,0,0,1,0,0,0,1,0,0,0,0,255,255,0,0, 0,0,255,0,0,0,17,0,0,0,255,0,0,0,0,0>>, Res = {ok,{{nfh_v5,5...
null
https://raw.githubusercontent.com/ates/netflow/fb00d02d9e5ff742dd7c8b562912308c42e5bffd/test/netflow_v5_codec_tests.erl
erlang
-module(netflow_v5_codec_tests). -include_lib("eunit/include/eunit.hrl"). decode_test() -> Data = <<0,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, 255,0,0,0,0,0,0,0,0,255,0,0,0,0,1,0,0,0,1,0,0,0,0,255,255,0,0, 0,0,255,0,0,0,17,0,0,0,255,0,0,0,0,0>>, Res = {ok,{{nfh_v5,5...
f9c9b26982e4973d136de0eaa9bd00ea90bd93f9124b5f2b30500c4e6c451db1
shirok/WiLiKi
util.scm
;;; ;;; wiliki.util - utility functions ;;; Copyright ( c ) 2004 - 2009 < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;;; including with...
null
https://raw.githubusercontent.com/shirok/WiLiKi/5fce918ed5b3f9c69cd2972c418bd72cbc0b1fe5/src/wiliki/util.scm
scheme
wiliki.util - utility functions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of furnished to do so, subject...
Copyright ( c ) 2004 - 2009 < > files ( the " Software " ) , to deal in the Software without restriction , the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND...
858b4e9fba26edfc19bf72b16a7d7298a6c021f0e5fa5f4c79e255fa8218d86c
7theta/via
subs.cljc
;; Copyright (c) 7theta. All rights reserved. ;; The use and distribution terms for this software are covered by the MIT License ( ) which can also be ;; found in the LICENSE file at the root of this distribution. ;; ;; By using this software in any fashion, you are agreeing to be bound by ;; the terms o...
null
https://raw.githubusercontent.com/7theta/via/172c51824ebfd76827161312c42c11cf39b6a389/src/via/subs.cljc
clojure
Copyright (c) 7theta. All rights reserved. The use and distribution terms for this software are covered by the found in the LICENSE file at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice,...
MIT License ( ) which can also be (ns via.subs (:require [via.endpoint :as e] [via.events :as ve] [via.schema :as schema] [via.util.id :as id] [tempus.core :as t] [distantia.core :refer [patch diff]] [signum.subs :as ss] [signum...
712a8681b4989e0d7148f173082b23aee1dfbfb95225d2d80791366203346f7c
ghc/packages-base
Foreign.hs
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude # ----------------------------------------------------------------------------- -- | -- Module : Foreign Copyright : ( c ) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : -- Stability : pr...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Foreign.hs
haskell
--------------------------------------------------------------------------- | Module : Foreign License : BSD-style (see the file libraries/base/LICENSE) Stability : provisional Portability : portable A collection of data types, classes, and functions for interfacing with another programming lan...
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude # Copyright : ( c ) The FFI task force 2001 Maintainer : module Foreign ( module Data.Bits , module Data.Int , module Data.Word , module Foreign.Ptr , module Foreign.ForeignPtr , module Foreign.StablePtr ...
a8a5d486e78ef810d8ee4b558a8bc25dd2ee7055618625654708fb2514bd0fd1
emqx/ehttpc
ehttpc_pool.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/ehttpc/be6b99357fc3f7dabc42ba46489e13e3fd83d069/src/ehttpc_pool.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 ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ehttpc_pool). -behaviour(gen_server). -export([start_link/2]). -export([ info/1 , st...
791a47a21a733b874ac192c8f61c725cd28c73d27c93d5e782061fdc42465766
commsor/titanoboa
system.clj
Copyright ( c ) Commsor Inc. All rights reserved . ; The use and distribution terms for this software are covered by the ; GNU Affero General Public License v3.0 (/#AGPL) ; which can be found in the LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; th...
null
https://raw.githubusercontent.com/commsor/titanoboa/ffe3e1e58f89169092d7b6a3a45e1707a0ecc9ee/src/clj/titanoboa/system.clj
clojure
The use and distribution terms for this software are covered by the GNU Affero General Public License v3.0 (/#AGPL) which can be found in the LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice,...
Copyright ( c ) Commsor Inc. All rights reserved . (ns titanoboa.system (:require [com.stuartsierra.component :as component] [clojure.tools.logging :as log] [titanoboa.util :as util] [titanoboa.channel :as channel])) (def lock (Object.)) (def n-cpu (.availableProcessors (Runtim...
1abdc21077b9fa933a9b273a6ab3e58a76a3f019ba3ded36d742fc9ae3277784
8c6794b6/guile-tjit
t-br-if-le-02.scm
;; Simple loop with `br-if-<=', with flonum. (define (loop n) (let lp ((i 0.0) (acc 0)) (if (<= n i) acc (lp (+ i 1.0) (+ acc 1))))) (loop 1.0e6)
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-br-if-le-02.scm
scheme
Simple loop with `br-if-<=', with flonum.
(define (loop n) (let lp ((i 0.0) (acc 0)) (if (<= n i) acc (lp (+ i 1.0) (+ acc 1))))) (loop 1.0e6)
0a2cc207f1234d52cf759fcbb7b5c6fb026a9e3e1f5116667c2ad6c39fffcbf2
herd/herdtools7
AArch64PteVal.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/6a5b3085a9d2357f98f4d560d7dd12add34edabe/lib/AArch64PteVal.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris , France . Copyright 2020 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribute...
0cc06ebe75789ba13042335389ad36e236b5faa68d0d0a18cd0fc1cd02724dda
ocsigen/ocsipersist-legacy
ocsipersist_webstorage.mli
include Ocsipersist_sig.REF with type 'a wrap = 'a
null
https://raw.githubusercontent.com/ocsigen/ocsipersist-legacy/98b5ee0e64774b558302c5354ab683ee26874ea4/src_webstorage/ocsipersist_webstorage.mli
ocaml
include Ocsipersist_sig.REF with type 'a wrap = 'a
49964aabb1c76f97db929eb6c0ab660f6961c03a6cab637f6dcc69b3422f2340
siili-core/humanize
schema.clj
(ns humanize.schema (:require [clojure.walk :refer [postwalk]] [clojure.core.match :refer [match]] [schema.utils :refer [validation-error-explain]] [schema.core :as s]) (:import (schema.utils NamedError ValidationError))) ;; Originally based on and then heavily refactored from ...
null
https://raw.githubusercontent.com/siili-core/humanize/e6e050a30c0f4b1d74c2d33a27b72f14bd28a600/src/main/clj/humanize/schema.clj
clojure
Originally based on and then heavily refactored from -core-match-cant-match-on-class TLDR: We can't match on classes (it'd be bound to that symbol) Schema built-in structures: error by s/enum: (not (#{:x :y} :foo)) Error was not generic enough to resolve on this level: the key itself might be a validation error ...
(ns humanize.schema (:require [clojure.walk :refer [postwalk]] [clojure.core.match :refer [match]] [schema.utils :refer [validation-error-explain]] [schema.core :as s]) (:import (schema.utils NamedError ValidationError))) (defn- vectorize "Recursively transforms all seq in...
2f109f2f0fe8bcf4be7f5e83a828876e98fe2e361782823c83ffc2a64fa19323
syallop/DHT
RoutingSpec.hs
{-# LANGUAGE OverloadedStrings #-} module DHT.Test.RoutingSpec where import DHT.Core.Routing import DHT.Core.ID import DHT.Core.Types import DHT.Core.Address import DHT.Core.Bits import DHT.Core.Contact import Test.Hspec import Data.Maybe import Data.List (delete) import Control.Monad.Writer (Writer, runWriter, exec...
null
https://raw.githubusercontent.com/syallop/DHT/a376cf5a423f50212cfd856dcf733eb5177fc00c/Test/DHT/Test/RoutingSpec.hs
haskell
# LANGUAGE OverloadedStrings # Used to mock monadic functions, accumulating the order Addresses were pinged (and whether they were good). Note: Since this is an observable effect it's reasonable to test it's behaving as expected. This is not quite the same as being able to violate the black-boxness of a function a...
module DHT.Test.RoutingSpec where import DHT.Core.Routing import DHT.Core.ID import DHT.Core.Types import DHT.Core.Address import DHT.Core.Bits import DHT.Core.Contact import Test.Hspec import Data.Maybe import Data.List (delete) import Control.Monad.Writer (Writer, runWriter, execWriter, tell) All localhost addr...
f17a8365bb7edb6ebd1408406e08b6bffa63d7936583996eeee0cc895a615d4a
williamyaoh/named-read-macros
packages.lisp
Copyright ( c ) 2017 - 2021 , ;; 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 ...
null
https://raw.githubusercontent.com/williamyaoh/named-read-macros/560e7d2b85b3cb672621fd327db677ea79f4e5ab/packages.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions ...
Copyright ( c ) 2017 - 2021 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEM...
344dfa8af48cde5dc7d293ca79b9504914eab48027efa3856e12a6c08e10721f
upenn-cis1xx/camelot
camelot.ml
(** Entry point for the OCaml linter. Parses command line args, and runs the linter *) open Canonical open Report let lint_dir : string ref = ref "./" (* lint the current directory if none provided *) let recurse : bool ref = ref false (* Do not recurse the directory by default *) let lint_file : string option ...
null
https://raw.githubusercontent.com/upenn-cis1xx/camelot/2d7e8db8abb8c1ad8187bfeb94499fe1746bb664/bin/camelot.ml
ocaml
* Entry point for the OCaml linter. Parses command line args, and runs the linter lint the current directory if none provided Do not recurse the directory by default lint a given file default to showing hints for students The spec we'll be using to format command line arguments remove directories Le...
open Canonical open Report let set_display_type : string -> unit = fun s -> match s with | "ta" -> show_type := Display.ta_display | "gradescope" -> show_type := Display.gradescope_display | "json" -> show_type := Display.json_display | _ -> show_type := Display.student_display let set_config_file : stri...
ae12f99379f66f20fa7f3d9b080f8317b7f1d00f0bf6d8f175bc93e2b6c659a2
mejgun/haskell-tdlib
Minithumbnail.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.Minithumbnail where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | | Thumbnail image of a very poor quality and low resolution @width Thumbnail width , usually does n't exceed 40 @height Thumbnail heigh...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/Minithumbnail.hs
haskell
# LANGUAGE OverloadedStrings # | | | | |
module TD.Data.Minithumbnail where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U | Thumbnail image of a very poor quality and low resolution @width Thumbnail width , usually does n't exceed 40 @height Thumbnail height , usually does n't exceed 40 @data The thum...
c40f32e8bdd25ec955c941988202e2c6409892bad6036690ea04d3b406de4757
mfikes/fifth-postulate
ns347.cljs
(ns fifth-postulate.ns347) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns347.cljs
clojure
(ns fifth-postulate.ns347) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
f277a7a8a6c9cc169f1f9e58f264a88a03acef12f5c3e12a776cb081bc548ecb
WorksHub/client
views.cljs
;; Common widgets for conversation. (ns wh.components.conversation.views (:require [re-frame.core :refer [dispatch dispatch-sync]] [reagent.core :as reagent] [wh.components.icons :refer [icon]] [wh.subs :refer [<sub]] [wh.util :refer [merge-classes]])) (defn codi-message [& parts] (let [[optio...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/components/conversation/views.cljs
clojure
Common widgets for conversation.
(ns wh.components.conversation.views (:require [re-frame.core :refer [dispatch dispatch-sync]] [reagent.core :as reagent] [wh.components.icons :refer [icon]] [wh.subs :refer [<sub]] [wh.util :refer [merge-classes]])) (defn codi-message [& parts] (let [[options parts] (if (map? (first parts)) ...
a9f12dabb907cc5e0afab75b074981938741ea2d3e8977ed77341df47efb1605
disco-lang/disco
Commands.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} # LANGUAGE StandaloneDeriving # ----------------------------------------------------------------------------- -- | Module : Disco . Interactive . Commands -- Copyright : disco team and contributors -- Maintainer : -- SPDX - Licen...
null
https://raw.githubusercontent.com/disco-lang/disco/8cdb3c914805c400cd5aae2f32302e9fe6882335/src/Disco/Interactive/Commands.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PatternSynonyms # --------------------------------------------------------------------------- | Copyright : disco team and contributors Maintainer : Defining and dispatching all commands/functionality available at the REPL prompt. ------------------------------...
# LANGUAGE StandaloneDeriving # Module : Disco . Interactive . Commands SPDX - License - Identifier : BSD-3 - Clause module Disco.Interactive.Commands ( dispatch, discoCommands, handleLoad, loadFile, parseLine ) where import Control.Arrow ((&&&)) import ...
68f01f4f0dcbfecf1e21fc019b5e4a22ad61feb0ef9bb979aa0aa1bd95329606
haskell-opengl/OpenGLRaw
PointSprite.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.PointSprite Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- --------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/PointSprite.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.ARB.PointSprite License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.ARB.PointSprite ( glGetARBPointSprite, gl_ARB_point_sprite, pattern GL_COORD_REPLACE_ARB, pattern GL_POINT_SPRITE_ARB ) where import Graphics.GL.ExtensionPredicates import Graphics.GL.Tokens
14207a710a0a44c055101b3856c8aa06e066a67a7d5974335b1fe3e62cd97e8e
JacquesCarette/Drasil
ODELibraries.hs
-- | Define and collect information about ODEs and ODE solvers from various libraries. module Data.Drasil.ExternalLibraries.ODELibraries ( -- * SciPy Library (Python) scipyODEPckg, scipyODESymbols, -- * Oslo Library (C#) osloPckg, osloSymbols, arrayVecDepVar, -- * Apache Commons (Java) apacheODEPckg, apache...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/d6c474afd745c9e756d0e7ccaf53a7df8327036d/code/drasil-code/lib/Data/Drasil/ExternalLibraries/ODELibraries.hs
haskell
| Define and collect information about ODEs and ODE solvers from various libraries. * SciPy Library (Python) * Oslo Library (C#) * Apache Commons (Java) * Odeint (C++) SciPy Library (Python) | [SciPy](/) ODE library package. (ccObjVar ut transpose) does not seem to work. Oslo Library (C#) | [Oslo](-us/resear...
module Data.Drasil.ExternalLibraries.ODELibraries ( scipyODEPckg, scipyODESymbols, osloPckg, osloSymbols, arrayVecDepVar, apacheODEPckg, apacheODESymbols, odeintPckg, odeintSymbols ) where import Language.Drasil (HasSymbol(symbol), HasUID(uid), MayHaveUnit(getUnit), QuantityDict, HasSpace(typ), Space (Actor...
de2847a2f18fc454e680d9a698a978c20c97a0f47af22c9ecccb11740ec03cc9
askonomm/ruuter
core.cljc
(ns ruuter.core (:require [clojure.string :as string]) #?(:clj (:gen-class))) (defn- path->regex-path "Takes in a raw route `path` and turns it into a regex pattern to match against the request URI." [path] (cond (= "/" path) "\\/" (re-find #"\*" path) (-> (string/replace path ...
null
https://raw.githubusercontent.com/askonomm/ruuter/60e1f9c8a6b5f343cfc8be2d8bc25018cfe0ddab/src/ruuter/core.cljc
clojure
matches anything, and must be present for example `:name` matches anything, but is optional for example `:name?` what comes around, goes around required parameter optional parameter responses are maps, so there's no reason they can't be direct maps. responses can also be functions that return maps, and when ...
(ns ruuter.core (:require [clojure.string :as string]) #?(:clj (:gen-class))) (defn- path->regex-path "Takes in a raw route `path` and turns it into a regex pattern to match against the request URI." [path] (cond (= "/" path) "\\/" (re-find #"\*" path) (-> (string/replace path ...
7d427e819e1748e0afebc9bf94c3775920330e8ddcb2612e8166e3e479db28ed
nikita-volkov/rerebase
Unsafe.hs
module Data.Void.Unsafe ( module Rebase.Data.Void.Unsafe ) where import Rebase.Data.Void.Unsafe
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Void/Unsafe.hs
haskell
module Data.Void.Unsafe ( module Rebase.Data.Void.Unsafe ) where import Rebase.Data.Void.Unsafe
357b54a97b7433c302ca4b9eb4f5df1a43c22a907239d6b1103333970afb6844
soegaard/pyffi
test-auto-numpy.rkt
#lang racket/base (require pyffi pyffi/numpy racket/format racket/list racket/match (for-syntax racket/base racket/syntax syntax/parse)) ;;; ;;; Start Python and import "numpy" ;;; (initialize) ; handles `main` and `builtins` (import-numpy) ; ; load the `nu...
null
https://raw.githubusercontent.com/soegaard/pyffi/84cee7adbd9fcd1206dbe9224915911206498410/pyffi-tests/tests/test-auto-numpy.rkt
racket
Start Python and import "numpy" handles `main` and `builtins` ; load the `numpy` module ; import and initialize numpy before ; running the delayed initializers run delayed setters (get-fun-as-pyproc 'numpy.linalg.det) (define numpy...
#lang racket/base (require pyffi pyffi/numpy racket/format racket/list racket/match (for-syntax racket/base racket/syntax syntax/parse)) (import-numpy) (define rng (numpy.random.default_rng 12345)) rng (tell rng random -> ~py) (tell rng beta 1 ~py 1 ~py -> ~py) (numpy.random.beta 1 1) 'foo 'ba...
0a2317b75d2d1c5a2d74fca4ee0fbbc3e400b84f0363953107a9d391a606852e
nasa/Common-Metadata-Repository
generic_documents.clj
(ns cmr.metadata-db.data.oracle.concepts.generic-documents "Implements multi-method variations for generic documents" (:require [cmr.common.concepts :as cc] [cmr.common.util :as util] [cmr.metadata-db.data.oracle.concepts :as c] [cmr.metadata-db.data.util :as db-util] [cmr.oracle.connection :as oracl...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/d4434719cd72df815d8292d16c5e34fa909b79eb/metadata-db-app/src/cmr/metadata_db/data/oracle/concepts/generic_documents.clj
clojure
(ns cmr.metadata-db.data.oracle.concepts.generic-documents "Implements multi-method variations for generic documents" (:require [cmr.common.concepts :as cc] [cmr.common.util :as util] [cmr.metadata-db.data.oracle.concepts :as c] [cmr.metadata-db.data.util :as db-util] [cmr.oracle.connection :as oracl...
11854a6b2866da7719c7fdbcb878cb88b23d1243d8bd3a4ae45d0dd82fd989cb
savonet/ocaml-posix
gen_constants_c.ml
module Constants = Posix_base.Generators.Types (struct module Types = Posix_time2_constants.Def let c_headers = {| #include <time.h> #include <sys/time.h> // Some macos are missing these defines: #ifdef __MACH__ #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 #endif #ifndef CLOCK_MONOTONIC #define CLOCK_MON...
null
https://raw.githubusercontent.com/savonet/ocaml-posix/1053f2df61bc0cf94a1c28f3a05ab9dd192f20a7/posix-time2/src/generator/gen_constants_c.ml
ocaml
module Constants = Posix_base.Generators.Types (struct module Types = Posix_time2_constants.Def let c_headers = {| #include <time.h> #include <sys/time.h> // Some macos are missing these defines: #ifdef __MACH__ #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 #endif #ifndef CLOCK_MONOTONIC #define CLOCK_MON...
c457218588da53e1d6e84ba8889d80374286200b51b24541ad8cc6054a1724fc
pascal-knodel/haskell-craft
E'6'20.hs
-- -- -- ----------------- Exercise 6.20 . ----------------- -- -- -- module E'6'20 where import E'6''8 ( rotate90 ) import Pictures ( Picture , invert , rotate , invertColour , horse ) Transform a picture first ( using ( map reverse ( rotate90 picture ) ) or sth . similar ) . Then use the functi...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'6'20.hs
haskell
--------------- --------------- Another "working solution": flipV -- --------- flipH -- --------- rotate -- ---------- invertColour -- ---------------- height -- ---------- width -- --------- above -- --------- beside -- ----------
Exercise 6.20 . module E'6'20 where import E'6''8 ( rotate90 ) import Pictures ( Picture , invert , rotate , invertColour , horse ) Transform a picture first ( using ( map reverse ( rotate90 picture ) ) or sth . similar ) . Then use the functions from Picture.hs on the result and it will work . ...