_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 |
|---|---|---|---|---|---|---|---|---|
ff25d7f3320e801a6aa8210f9f1847d845ae9739f5d767ef95418e78400289ff | Ekdohibs/joujou | CPS.ml | (* The source calculus. *)
module S = Lambda
(* The target calculus. *)
module T = Tail
let block_let (blo : T.block) (body : T.value -> T.term) : T.term =
let f = Atom.fresh "cps_block_let" in
T.LetBlo (f, blo, body (T.vvar f))
let make_handler (body : T.value -> T.value -> T.value -> T.term) : T.block =
let h... | null | https://raw.githubusercontent.com/Ekdohibs/joujou/02ef5052f93623da99ed2e871a59c99a5e6026a1/CPS.ml | ocaml | The source calculus.
The target calculus. | module S = Lambda
module T = Tail
let block_let (blo : T.block) (body : T.value -> T.term) : T.term =
let f = Atom.fresh "cps_block_let" in
T.LetBlo (f, blo, body (T.vvar f))
let make_handler (body : T.value -> T.value -> T.value -> T.term) : T.block =
let handle_var = Atom.fresh "cps_handler_var" in
let hand... |
1d558d7866080963c2dc089f616fe8daa39ae90b4dfa3cb4d15b7fa077fdb05d | arttuka/reagent-material-ui | date_time_picker_tabs_pro.cljs | (ns reagent-mui.x.date-time-picker-tabs-pro
"Imports @mui/x-date-pickers-pro/DateTimePickerTabs as a Reagent component.
Original documentation is at -pickers/date-time-picker-tabs/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers-pro/DateTimePickerTabs" :as MuiDateTimePickerTabs]))
(def date-... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/4fc4b44891919d2b84160eb411d52227dd89e0a5/src/x/reagent_mui/x/date_time_picker_tabs_pro.cljs | clojure | (ns reagent-mui.x.date-time-picker-tabs-pro
"Imports @mui/x-date-pickers-pro/DateTimePickerTabs as a Reagent component.
Original documentation is at -pickers/date-time-picker-tabs/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers-pro/DateTimePickerTabs" :as MuiDateTimePickerTabs]))
(def date-... | |
05833158018bee11df6ac708a8e088e90f08735e66bb1de95eeafb5d5e4d8a86 | elektronaut/advent-of-code | day01.clj | (ns advent-of-code.2020.01)
(def inputs [1788 1627 1883 1828 1924 1993 972 1840 1866 1762 1781
1782 1520 1971 1660 1857 1867 1564 1983 1391 2002 494
1500 1967 1702 1958 1886 1910 1838 1985 1836 2009 2005
1602 1939 1945 1609 1582 1647 1737 1982 1931 790 745
1598 1586 ... | null | https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2020/day01/day01.clj | clojure | (ns advent-of-code.2020.01)
(def inputs [1788 1627 1883 1828 1924 1993 972 1840 1866 1762 1781
1782 1520 1971 1660 1857 1867 1564 1983 1391 2002 494
1500 1967 1702 1958 1886 1910 1838 1985 1836 2009 2005
1602 1939 1945 1609 1582 1647 1737 1982 1931 790 745
1598 1586 ... | |
6f47e775fadfc64809b93ee40b41512c624d864f71e850c18c6db508c43906c8 | ndmitchell/uniplate | PlateTypeable.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
|
/DEPRECATED/ : Use " Data . Generics . Uniplate . " instead .
This module supplies a method for writing ' Biplate ' instances more easily .
To take an example :
> data = | ... | null | https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/PlateTypeable.hs | haskell | * The Class
* The Combinators
| This class represents going from the container type to the target.
This class should only be constructed with 'plate', '|+' and '|-'
| The main combinator used to start the chain.
The following rule can be used for optimisation:
> plate Ctor |- x == plate (Ctor x)
| the field ... | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
|
/DEPRECATED/ : Use " Data . Generics . Uniplate . " instead .
This module supplies a method for writing ' Biplate ' instances more easily .
To take an example :
> data = | ... |
4b6f29b3255a83c4b5512befe90834a06618818e4133953a34cc52f05c1bc562 | GaloisInc/semmc | Statistics.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- | A module defining some helpers to manage run-time statistics
--
-- It is structured as its own thread so that access to the on-disk stats files
-- is synchronized.
module SemMC.Stochastic... | null | https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-learning/src/SemMC/Stochastic/Statistics.hs | haskell | # LANGUAGE OverloadedStrings #
| A module defining some helpers to manage run-time statistics
It is structured as its own thread so that access to the on-disk stats files
is synchronized.
* Statistics thread management
^ Tell the thread to terminate
^ An invocation while trying to learn the given opcode
that ra... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module SemMC.Stochastic.Statistics (
StatisticsThread,
newStatisticsThread,
terminateStatisticsThread,
* statistics
SolverTime(..),
recordSolverInvocation,
recordStrataTimeout,
recordStrataSuccess,
recordSynt... |
986e2e20faf9988e3125e7df56119fb96603b62374014f3b6dcf24a17e2b0ec1 | harpocrates/inline-rust | Hello.hs | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Main where
import Language.Rust.Inline
import Data.Int
extendContext basic
setCrateRoot []
main = do
putStrLn "Haskell: Hello. Enter a number:"
x <- readLn
y <- [rustIO| i32 {
println!("Rust: Your number is {}", $(x: i32));
$(x: i32) + 1
} |]
putS... | null | https://raw.githubusercontent.com/harpocrates/inline-rust/5ecff8c92526000e5fc358a2dfede9b60ef59a1a/examples/Hello.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Main where
import Language.Rust.Inline
import Data.Int
extendContext basic
setCrateRoot []
main = do
putStrLn "Haskell: Hello. Enter a number:"
x <- readLn
y <- [rustIO| i32 {
println!("Rust: Your number is {}", $(x: i32));
$(x: i32) + 1
} |]
putS... | |
4576381e23ec536dc923271837c1f34d329a6dfb8413aedac6e8a1bb553381fd | clojurewerkz/elephant | invoices.clj | (ns clojurewerkz.elephant.invoices
(:refer-clojure :exclude [list update])
(:require [clojurewerkz.elephant.conversion :as cnv]
[clojurewerkz.elephant.util :refer (api-key->request-options)]
[clojure.walk :as wlk])
(:import [clojure.lang IPersistentMap]
[com.stripe.model Invoice... | null | https://raw.githubusercontent.com/clojurewerkz/elephant/aa5b61719263eab71484066f255709e0928a4bc3/src/clojure/clojurewerkz/elephant/invoices.clj | clojure |
API
| (ns clojurewerkz.elephant.invoices
(:refer-clojure :exclude [list update])
(:require [clojurewerkz.elephant.conversion :as cnv]
[clojurewerkz.elephant.util :refer (api-key->request-options)]
[clojure.walk :as wlk])
(:import [clojure.lang IPersistentMap]
[com.stripe.model Invoice... |
49d2615259bbb01849728e941ae630281a75433d8c1f2807c1b0199e410f132c | yuriy-chumak/ol | console.scm | (define-library (lib gl console)
(import (otus lisp)
(lib gl)
(lib soil))
(cond-expand
(Android
(import
(OpenGL ES version-1-1))
(begin
(setq FONT "/sdcard/Anonymous_Pro_Minus.ttf")
(define glClearTexImage #false)))
(else
(imp... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/904c8abb9ce9213be06596e13c4ff9cdcfa91f13/libraries/lib/gl/console.scm | scheme | (OpenGL ARB clear_texture))
...
текущий цвет , тоже пока
please read samples/OpenGL/fonts/README.md
SOIL_LOAD_RGBA
font precompilation:
texture coordinates
glyph coordinates
atlas creation finished
-----------------------------
яркостные компоненты палитры
internal function
иначе отрендерим символ
аналоги... | (define-library (lib gl console)
(import (otus lisp)
(lib gl)
(lib soil))
(cond-expand
(Android
(import
(OpenGL ES version-1-1))
(begin
(setq FONT "/sdcard/Anonymous_Pro_Minus.ttf")
(define glClearTexImage #false)))
(else
(imp... |
67749887855899aa07e899ff39dae3131ba8b6c2022e3713c7209e6258a14c77 | vasilisp/inez | pa_logic.ml | open Camlp4.PreCast
open Camlp4_maps
let _ =
let m = (map_uf "Logic" "Script")#str_item in
AstFilters.register_str_item_filter m;
AstFilters.register_topphrase_filter m
let _ =
let m = (map_logic "Logic")#str_item in
AstFilters.register_str_item_filter m;
AstFilters.register_topphrase_filter m
let _ =
... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/pa_logic.ml | ocaml | open Camlp4.PreCast
open Camlp4_maps
let _ =
let m = (map_uf "Logic" "Script")#str_item in
AstFilters.register_str_item_filter m;
AstFilters.register_topphrase_filter m
let _ =
let m = (map_logic "Logic")#str_item in
AstFilters.register_str_item_filter m;
AstFilters.register_topphrase_filter m
let _ =
... | |
d9da188f2a8d1005b1fefff794548540dd3fc61d7ad1e9eba130487adb1e1b6b | pirapira/coq2rust | index.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/coqdoc/index.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* refers to the file being parsed
*... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Printf
open Cdglobals
t... |
315f3a632ed7c2ba5df159749ebb43b645d2e0070233e4a5c3fbef45b19d4d99 | aliaksandr-s/prototyping-with-clojure | core.clj | (ns visitera.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[visitera.config :refer [env]]
[clojure.string :as str]
[buddy.hashers :as hs]
[clojure.core.match :refer [match]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-... | null | https://raw.githubusercontent.com/aliaksandr-s/prototyping-with-clojure/e1f90bf66c315de1dfa72624895637f1c609c42e/app/chapter-07/end/visitera/src/clj/visitera/db/core.clj | clojure | (show-schema conn)
find Specifications using ':find ?a .' will return single scalar
(d/q '[:find ?alpha-2
:in $ ?name
:where
[?e :country/name ?name]
[?e :country/alpha-2 ?alpha-2]]
(d/db conn)
app domain functions
(add-user conn {:email ""
:password "somepa... | (ns visitera.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[visitera.config :refer [env]]
[clojure.string :as str]
[buddy.hashers :as hs]
[clojure.core.match :refer [match]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-... |
67b258e62339ecdf64c8cc10eb9422cf4b493b458658b849ca7c8c0c06c364c8 | MastodonC/kixi.datastore | conformers_test.clj | (ns kixi.unit.schemastore.conformers-test
(:require [kixi.datastore.schemastore :as ss]
[kixi.datastore.schemastore.conformers :as conformers]
[kixi.integration.base :refer :all]
[clojure.spec.alpha :as s]
[clojure.test :refer :all]))
(defn valid?
[p r]
(if (= r :c... | null | https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/test/kixi/unit/schemastore/conformers_test.clj | clojure | we conform ONLY if .0
we remove the .0 then conform
works fine with (Double/valueOf "1")
conforms to double
conforms to double
| (ns kixi.unit.schemastore.conformers-test
(:require [kixi.datastore.schemastore :as ss]
[kixi.datastore.schemastore.conformers :as conformers]
[kixi.integration.base :refer :all]
[clojure.spec.alpha :as s]
[clojure.test :refer :all]))
(defn valid?
[p r]
(if (= r :c... |
c2d002e73e6ad9fc4b645b9eb15611f886d118d13a65848dda82b752beca756c | tommaisey/aeon | data-structures.scm | ;;; data-structures.scm - Optional data structures extensions
;
Copyright ( c ) 2008 - 2014 , The Chicken Team
; 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 c... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/thunder/data-structures.scm | scheme | data-structures.scm - Optional data structures extensions
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 con... | Copyright ( c ) 2008 - 2014 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
a02470b76d7677ae89f954ad7ccc6e4ffb0161ebf331ed47a6c29f45e0374fdb | anton-k/processing-for-haskell | Scale.hs | -- original code:
Scale by .
--
Paramenters for the scale ( ) function are values specified as decimal
-- percentages. For example, the method call scale(2.0) will increase
the dimension of the shape by 200 percent . Objects always scale from the origin .
import Graphics.Proc
main = runProc $ def { procSetu... | null | https://raw.githubusercontent.com/anton-k/processing-for-haskell/7f99414f3c266135b6a2848978fcb572fd7b67b1/examples/Transform/Scale.hs | haskell | original code:
percentages. For example, the method call scale(2.0) will increase |
Scale by .
Paramenters for the scale ( ) function are values specified as decimal
the dimension of the shape by 200 percent . Objects always scale from the origin .
import Graphics.Proc
main = runProc $ def { procSetup = setup, procDraw = draw, procUpdate = update }
width = 640
height = 360
dim = 80.0
se... |
e8124e4bc3a2a3bddf38a61a4c0b6daa20043271de055fadfea4d49992049d0c | quephird/fun-with-quil | morning.clj | (ns fun-with-quil.animations.morning
(:require [quil.core :as q :include-macros true]))
(def θ (atom 0))
(defn setup []
(q/smooth)
(q/ellipse-mode :center)
(q/stroke-weight 3))
(defn choose-color [c1 c2 n]
(if (even? n) c1 c2))
(defn cell [w plus-or-minus c1 c2 c3]
(let [fc (q/frame-count)
circl... | null | https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/animations/morning.clj | clojure | rotate the cell
draw circle and 'crosshairs' | (ns fun-with-quil.animations.morning
(:require [quil.core :as q :include-macros true]))
(def θ (atom 0))
(defn setup []
(q/smooth)
(q/ellipse-mode :center)
(q/stroke-weight 3))
(defn choose-color [c1 c2 n]
(if (even? n) c1 c2))
(defn cell [w plus-or-minus c1 c2 c3]
(let [fc (q/frame-count)
circl... |
a3eeb08ddce6295300ca9afc3074268781021a9f6d5bab8d4abdfcad8a15e9e2 | bufferswap/ViralityEngine | sprite.lisp | (in-package #:virality.component)
(v:define-component sprite ()
((%name :accessor name
:initarg :name
:initform nil)
(%spec :reader spec
:initarg :spec
:initform nil)
(%block-alias :reader block-alias
:initarg :block-alias
;; TODO: This ... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/components/sprite.lisp | lisp | TODO: This default assumes umbra's sprite shader, which has
this component.
If the frame time is somehow incredibly slow, assume the amount of
time that had passed is the screen refresh rate. This prevents large
skips of frames in these situations. | (in-package #:virality.component)
(v:define-component sprite ()
((%name :accessor name
:initarg :name
:initform nil)
(%spec :reader spec
:initarg :spec
:initform nil)
(%block-alias :reader block-alias
:initarg :block-alias
an exported ssbo buffer named... |
1d1d6db09403eaf286f9fae5ca943ab17c4a7e5429cc2bc446d5db2f1264e8c1 | quchen/stgi | Tuple.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Test.Prelude.Tuple (tests) where
import qualified Data.Tuple as T
import Stg.Marshal
import Stg.Parser.QuasiQuoter
import qualified Stg.Prelude ... | null | https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/test/Testsuite/Test/Prelude/Tuple.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes # | # LANGUAGE ScopedTypeVariables #
module Test.Prelude.Tuple (tests) where
import qualified Data.Tuple as T
import Stg.Marshal
import Stg.Parser.QuasiQuoter
import qualified Stg.Prelude as Stg
import Test.Machine.Evaluate.TestTemplates.MarshalledValue
import Test.Orphans ... |
9b32ad0ee4dfed8fb2e68dfabc93f4b19ed2e40b9ad97a914cb35f333cb66e50 | weavejester/lein-ring | server.clj | (ns leiningen.ring.server
(:require [leinjacker.deps :as deps]
[leiningen.core.classpath :as classpath]
[clojure.java.io :as io])
(:use [leinjacker.eval :only (eval-in-project)]
[leiningen.ring.util :only (ensure-handler-set! update-project ring-version)]))
(defn classpath-dirs
"l... | null | https://raw.githubusercontent.com/weavejester/lein-ring/e19f19ed4a739a2920570fd8d487a0d86686a08a/src/leiningen/ring/server.clj | clojure | (ns leiningen.ring.server
(:require [leinjacker.deps :as deps]
[leiningen.core.classpath :as classpath]
[clojure.java.io :as io])
(:use [leinjacker.eval :only (eval-in-project)]
[leiningen.ring.util :only (ensure-handler-set! update-project ring-version)]))
(defn classpath-dirs
"l... | |
1ba08488ad46d9fd3e86fd28715970331868cb678b84a110f1f8e13fee0c3ace | dannypsnl/racket-tree-sitter | types.rkt | #lang racket/base
(provide (all-defined-out))
(require ffi/unsafe)
(define _TSParserRef (_cpointer 'TSParser))
(define _TSTreeRef (_cpointer 'TSTree))
(define _TSLanguageRef (_cpointer 'TSLanguage))
(define _TSRangeRef (_cpointer 'TSRange))
(define _TSInputEditRef (_cpointer 'TSInputEdit))
(define _TSSymbol _uint16)
(... | null | https://raw.githubusercontent.com/dannypsnl/racket-tree-sitter/69bee3fdb187c9a56a07b1b4e5c9a1579043aac9/types.rkt | racket | #lang racket/base
(provide (all-defined-out))
(require ffi/unsafe)
(define _TSParserRef (_cpointer 'TSParser))
(define _TSTreeRef (_cpointer 'TSTree))
(define _TSLanguageRef (_cpointer 'TSLanguage))
(define _TSRangeRef (_cpointer 'TSRange))
(define _TSInputEditRef (_cpointer 'TSInputEdit))
(define _TSSymbol _uint16)
(... | |
91c9e6acfb2bf5eae9d8a37e8ec8fe65c4268cf93675a56b1f6eb008dde3900b | afiniate/aws_async | ddb_getitem.mli | open Core.Std
open Async.Std
type keys = Ddb_system.attribute List.t
val exec: Ddb_system.t -> ?attributes:Ddb_getitem_t.attribute_name List.t ->
?consistent_read:Bool.t ->
?return_consumed_capacity:Ddb_getitem_t.return_consumed_capacity ->
String.t ->
keys ->
(Ddb_system.t * Ddb_getitem_t.result, Exn.t) De... | null | https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/dynamodb/ddb_getitem.mli | ocaml | open Core.Std
open Async.Std
type keys = Ddb_system.attribute List.t
val exec: Ddb_system.t -> ?attributes:Ddb_getitem_t.attribute_name List.t ->
?consistent_read:Bool.t ->
?return_consumed_capacity:Ddb_getitem_t.return_consumed_capacity ->
String.t ->
keys ->
(Ddb_system.t * Ddb_getitem_t.result, Exn.t) De... | |
d1417c962e00e683e98eb84b63427fa8d0a0f5d7f31b148165bed9e4f7f7570b | saltysystems/overworld | ow_session.erl | %%=========================================================================
%% Overworld Session
%%
%% This module handles communication with game sessions.
%%
%%=========================================================================
-module(ow_session).
-behaviour(ow_rpc).
% Required ow callbacks
-export([rpc_info... | null | https://raw.githubusercontent.com/saltysystems/overworld/6589d2109789ad520cff1096229131e85a450fb5/src/ow_session.erl | erlang | =========================================================================
Overworld Session
This module handles communication with game sessions.
=========================================================================
Required ow callbacks
alias for get_authenticated
ms
it can be anything but we default to ma... | -module(ow_session).
-behaviour(ow_rpc).
-export([rpc_info/0]).
-export([
encode_log/1,
broadcast/2,
multicast/2,
new/0,
set_id/2,
get_id/1,
set_pid/2,
get_pid/1,
set_serializer/2,
get_serializer/1,
set_authenticated/2,
get_authenticated/1,
set_latency/2,
get_l... |
b9da9981f49a3e892bb68885440db0564a1b99d16097a1e8dbb51120f8d44351 | autolwe/autolwe | SimpRules.ml | (* * Simplification rules *)
(* ** Imports and abbreviations *)
open Abbrevs
open Util
open Nondet
open Syms
open Expr
open ExprUtils
open Type
open Game
open Rules
open CoreTypes
open RewriteRules
module CR = CoreRules
module T = Tactic
module Ht = Hashtbl
let mk_log level = mk_logger "Derive.SimpRules" level "Sim... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Derived/SimpRules.ml | ocaml | * Simplification rules
** Imports and abbreviations
** Simplification
* -----------------------------------------------------------------------
** Simp and split inequality on n-tuples to obtain n proof obligations
* -----------------------------------------------------------------------
delay inequalities w... |
open Abbrevs
open Util
open Nondet
open Syms
open Expr
open ExprUtils
open Type
open Game
open Rules
open CoreTypes
open RewriteRules
module CR = CoreRules
module T = Tactic
module Ht = Hashtbl
let mk_log level = mk_logger "Derive.SimpRules" level "SimpRules.ml"
let _log_t = mk_log Bolt.Level.TRACE
let _log_d = mk_... |
04c49ffd6eb1a24049f2e3e50b60f8b53bc987910b1bbc9f4f179efad7fb6c5d | Vortecsmaster/EmurgoAcademyPlutusExamples | 14 - GuessingGame.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# L... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/90ffe69a0b14b551336e80fd8f348257ebdabfdc/preVasil_V1/14%20-%20GuessingGame.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# LANGUAGE DerivingStrategies #
and uses its hash, and the game validator script, to lock
some funds (the prize) in a pay-to-script transaction output.
... | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# ... |
7289c593a088616324cba8c66231cd5163db14d7fa261565fc0f61d93bd9b7af | realworldocaml/book | ppx_assert.ml | open Ppxlib
let expand_test_pred ~loc:_ ~path:_ typ =
let loc = { typ.ptyp_loc with loc_ghost = true } in
[%expr fun ?(here= []) ?message predicate t ->
let pos = [%e Ppx_here_expander.lift_position_as_string ~loc] in
let sexpifier = [%e Ppx_sexp_conv_expander.Sexp_of.core_type typ] in
Ppx_assert... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_assert/src/ppx_assert.ml | ocaml | open Ppxlib
let expand_test_pred ~loc:_ ~path:_ typ =
let loc = { typ.ptyp_loc with loc_ghost = true } in
[%expr fun ?(here= []) ?message predicate t ->
let pos = [%e Ppx_here_expander.lift_position_as_string ~loc] in
let sexpifier = [%e Ppx_sexp_conv_expander.Sexp_of.core_type typ] in
Ppx_assert... | |
971063931cb25a8cb72c9b399931a1eb63f350601111cd85338ea4ba798fe036 | couchbase/couchdb | couch_secondary_sup.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/couchbase/couchdb/8a75fd2faa89f95158de1776354ceccf3e762753/src/couchdb/couch_secondary_sup.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_secondary_sup).
-behaviour(supervisor).
-export([init/1, start_link/0]).
start_link() ->
supervisor:start_link({local,couch_secondary_ser... |
886f8bd12bea36e8ebb05710f0c612c3ded7d8305f6977ec53dd1f6840c82c53 | jrm-code-project/LISP-Machine | storage.lisp | -*- Mode : LISP ; Package : SIM ; Fonts:(CPTFONT HL12I ) ; ; : ZL -*-
(defreg *active-cons-cache-area* 0 0)
(defreg *active-cons-cache-region* 0 1)
(defreg *active-cons-cache-region-origin* 0 2)
(defreg *active-cons-cache-free-pointer* 0 3)
(defreg *active-cons-cache-free-limit* ... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/k/storage.lisp | lisp | Package : SIM ; Fonts:(CPTFONT HL12I ) ; ; : ZL -*-
This is 4x page-size, so scavenger work is at least 4x cons work.
prog1
Cons cache hit, but we need to insert a list header
(so that find-structure-header doesn't have to search
too far). This path is a bit slower, but
not nearly as bad as the uncached case.
... |
(defreg *active-cons-cache-area* 0 0)
(defreg *active-cons-cache-region* 0 1)
(defreg *active-cons-cache-region-origin* 0 2)
(defreg *active-cons-cache-free-pointer* 0 3)
(defreg *active-cons-cache-free-limit* 0 4)
(defreg *active-cons-cache-allocation-status* 0 5)
(defreg *lis... |
18032d43f3bafeef61a134ea6b8a97d02979840b6f4363d9b752ce8920b71dcf | HealthSamurai/pg3 | backup.clj | (ns pg3.backup
(:require [pg3.fsm :as fsm]
[k8s.core :as k8s]
[pg3.naming :as naming]
[pg3.model :as model]
[unifn.core :as u]
[pg3.utils :as ut]
[clojure.string :as str]))
(defmethod u/*fn ::backup-enable? [{backup :resource}]
(when-not (get-... | null | https://raw.githubusercontent.com/HealthSamurai/pg3/3fc680c9849b00f08ccb18dc64b72dc19b04fd2a/src/pg3/backup.clj | clojure | (ns pg3.backup
(:require [pg3.fsm :as fsm]
[k8s.core :as k8s]
[pg3.naming :as naming]
[pg3.model :as model]
[unifn.core :as u]
[pg3.utils :as ut]
[clojure.string :as str]))
(defmethod u/*fn ::backup-enable? [{backup :resource}]
(when-not (get-... | |
09c8d9ff041b5df2b37bbec57c86ac1f114e07ab8f129045ce71a34c91ca2913 | bzg/subscribe | i18n.clj | Copyright ( c ) 2019 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
;; License-Filename: LICENSES/EPL-2.0.txt
(ns i18n
"Subscribe localization."
(:require [taoensso.tempura :refer [tr]]
[config :as config]))
(def supported-languages
"A set of supported languages."
#{"en" "fr"... | null | https://raw.githubusercontent.com/bzg/subscribe/39a95cf42e5b93b8ba0c61353885fa901240c10a/src/i18n.clj | clojure | License-Filename: LICENSES/EPL-2.0.txt | Copyright ( c ) 2019 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
(ns i18n
"Subscribe localization."
(:require [taoensso.tempura :refer [tr]]
[config :as config]))
(def supported-languages
"A set of supported languages."
#{"en" "fr"})
(def localization
{:en
{:already-... |
e92d2eb94bd604ed2e4e5e46bc735b2c8db874d223170f05b781653e53155a76 | achirkin/vulkan | VK_EXT_acquire_xlib_display.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LA... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_acquire_xlib_display.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
contact: @James Jones @cuba... | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_EXT_acquire_xlib_display
* Vulkan extension : @VK_EXT_acquire_xlib_display@
author :
VkAcquireXlibDisplayEXT, pattern VkAcquireXli... |
945b99c13772dd4e5b912a1e3611e24003109464c742df77e1c383e82b735f2b | static-analysis-engineering/codehawk | bCHDataExportSpec.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/f2891d9120d5a776ea9ac1feec7bf98cce335e12/CodeHawk/CHB/bchlib/bCHDataExportSpec.ml | ocaml | chutil
bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
c566fc72567c715172b780cb389edb11ea3cc3218b911ffef357aa278c0c7f02 | coq/coq | control.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/9aa64494d870fc03d824733f5ed3fd7eae196b5a/lib/control.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
84d7b30b36ba443c1695f369584afaa73df55d0c765e0b2ffd345f1a789249c0 | vindarel/demo-web-live-reload | run.lisp |
(load "project.asd")
(ql:quickload "web-live-reload")
(format t "package: ~a~&" *package*)
(in-package :web-live-reload)
(start)
(format t "package: ~a~&" *package*)
| null | https://raw.githubusercontent.com/vindarel/demo-web-live-reload/4cc3ea6dcad801aad5654dda66a204d3eceae883/run.lisp | lisp |
(load "project.asd")
(ql:quickload "web-live-reload")
(format t "package: ~a~&" *package*)
(in-package :web-live-reload)
(start)
(format t "package: ~a~&" *package*)
| |
558e0a3a170e19126279b94bda38f7cf882e95e99174c080b72337c20a794e9d | tathougies/beam-mysql | FromField.hs | | Beam defines a custom ' FromField ' type class for types that can be read from
-- MySQL fields. The ones in 'mysql-simple' are inadequate because they rely on
-- bizarre asynchronous exceptions that cannot be used consistently
{-# LANGUAGE BangPatterns #-}
module Database.Beam.MySQL.FromField
( FieldParse... | null | https://raw.githubusercontent.com/tathougies/beam-mysql/2c561b486acf80c7847f48667f1a7d9222f2b35a/Database/Beam/MySQL/FromField.hs | haskell | MySQL fields. The ones in 'mysql-simple' are inadequate because they rely on
bizarre asynchronous exceptions that cannot be used consistently
# LANGUAGE BangPatterns # | | Beam defines a custom ' FromField ' type class for types that can be read from
module Database.Beam.MySQL.FromField
( FieldParser
, ParseError(..)
, ParseErrorType(..)
, FromField(..)
, atto ) where
import Database.MySQL.Base
import Database.MySQL.Base.Types
import ... |
4e20d17998d640c4198d04f93f9251c26518a92a3aa6e955f2af1a52aeb3631d | marick/Midje | t_clojure_test_facade.clj | (ns midje.emission.t-clojure-test-facade
(:require [midje.sweet :refer :all]
[midje.emission.clojure-test-facade :refer :all]
[midje.test-util :refer :all]
clojure.test))
;;; run-tests
(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
(fact
:check-only-at-lo... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/emission/t_clojure_test_facade.clj | clojure | run-tests
so as not to see failure when test rerun.
so as not to see success when test rerun. | (ns midje.emission.t-clojure-test-facade
(:require [midje.sweet :refer :all]
[midje.emission.clojure-test-facade :refer :all]
[midje.test-util :refer :all]
clojure.test))
(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
(fact
:check-only-at-load-time
(:... |
6c71972bc7ea25911706429d7ed94858650e20997f5459fb3fc9bebf4566dcf7 | ndmitchell/weeder | Check.hs | {-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module Check(check) where
import Hi
import Cabal
import Util
import Data.Maybe
import Data.List.Extra
import Data.Tuple.Extra
import System.Info.Extra
import qualified Data.HashSet as Set
import qualified Data.HashMap.Strict as Map
import Warning
data S = S
... | null | https://raw.githubusercontent.com/ndmitchell/weeder/3bc7ee09de6faf34cd60a0f4554aa1baf36f25e8/src/Check.hs | haskell | # LANGUAGE RecordWildCards, ScopedTypeVariables #
Sometimes we don't get the package name at all, e.g.
ignore packages that must be conditional on the other platform
ignore packages that are often conditional
used by Paths_ modules which we have thrown away by this point
reexporting for someone else
reexporting ... |
module Check(check) where
import Hi
import Cabal
import Util
import Data.Maybe
import Data.List.Extra
import Data.Tuple.Extra
import System.Info.Extra
import qualified Data.HashSet as Set
import qualified Data.HashMap.Strict as Map
import Warning
data S = S
{pkg :: PackageName
,hi :: HiKey -> Hi
,sectio... |
8abb263a11e648096e01c132030c6bd818c924278de0cfb5620634a80ad695c6 | dyoo/whalesong | sk-generator-2.rkt | #lang whalesong/base
(define (make-gen gen)
(let ([cont (box #f)])
(lambda ()
(call/cc (lambda (caller)
(if (unbox cont)
((unbox cont) caller)
(gen (lambda (v)
(call/cc (lambda (gen-k)
(begi... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/sk-generator-2.rkt | racket | #lang whalesong/base
(define (make-gen gen)
(let ([cont (box #f)])
(lambda ()
(call/cc (lambda (caller)
(if (unbox cont)
((unbox cont) caller)
(gen (lambda (v)
(call/cc (lambda (gen-k)
(begi... | |
d03752038345159256f29de18d8924199e6132ff451835865f5d1cab2c2d400b | RefactoringTools/HaRe | CmdLineParser.hs | module CmdLineParser where
data Cmd cmd = Null cmd
| Args String ([String] -> cmd)
fileArgs = Args "<files>"
fileArg f = fileArgs (mapM_ f)
kwOption kw cmd =
case cmd of
Null f -> addKwArg id (null2args f)
Args args f -> addKwArg (++' ':args) f
where
addKwArg rest f = Args (rest ("["++kw... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/lib/CmdLineParser.hs | haskell | module CmdLineParser where
data Cmd cmd = Null cmd
| Args String ([String] -> cmd)
fileArgs = Args "<files>"
fileArg f = fileArgs (mapM_ f)
kwOption kw cmd =
case cmd of
Null f -> addKwArg id (null2args f)
Args args f -> addKwArg (++' ':args) f
where
addKwArg rest f = Args (rest ("["++kw... | |
01027e88ac8f45b35a0addbe48e4c8a01a579583c3affa22687dcb0d2257e192 | lspitzner/pqueue | Internals.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
Module : Data . PQueue . Prio .
Copyright : ( c ) 2010
-- License : BSD-style
-- Maintainer :
-... | null | https://raw.githubusercontent.com/lspitzner/pqueue/1a1239abaacdcc1dfd18231aa74c55cdd79bf416/src/Data/PQueue/Prio/Max/Internals.hs | haskell | # LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
* Construction
* Query
** Maximum view
... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Module : Data . PQueue . Prio .
Copyright : ( c ) 2010
module Data.PQueue.Prio.Max.Internals (
MaxPQueue (..),
empty,
singleton,
insert,
insertBehind,
union,
unions,
null,
size,
findMax,
getMax,... |
edf8a673ecba8704ea66c8ef564d58b69f6211c702dac91074e332a1122190ac | RefactoringTools/HaRe | GenSym.hs | $ I d : GenSym.hs , v 1.1 2001/07/24 17:39:10 moran Exp $
Horribly hacked up gensym .
Horribly hacked up gensym.
-}
module GenSym (newName) where
import IOExts
count :: IORef Int
count = unsafePerformIO $
newIORef 0
incCount :: Int
incCount = unsafePerformIO $
do c <- readIORef count
... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/SA/GenSym.hs | haskell | $ I d : GenSym.hs , v 1.1 2001/07/24 17:39:10 moran Exp $
Horribly hacked up gensym .
Horribly hacked up gensym.
-}
module GenSym (newName) where
import IOExts
count :: IORef Int
count = unsafePerformIO $
newIORef 0
incCount :: Int
incCount = unsafePerformIO $
do c <- readIORef count
... | |
256bc3ff67f6d08c07bc385270d11eb6de4e79afdc9a74ce1c2b914db256a86d | patricoferris/ocaml-multicore-monorepo | respd.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/h2/lib/respd.ml | ocaml | From RFC7540§8.1: A server can send a complete response prior to the
* client sending an entire request if the response does not depend on
* any portion of the request that has not been sent and received. When
* this is true, a server MAY request that the client abort transmission
* of a re... | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... |
6a47edd9d4a81c9871cfedbdd633f0318d2a1c62d711bf3131f1212b86952a95 | aeternity/aeternity | aetx_env.erl | %%%-------------------------------------------------------------------
( C ) 2018 , Aeternity Anstalt
%%%-------------------------------------------------------------------
%%% @doc
ADT containing a check / process environment for transactions
%%% @end
%%%-----------------------------------------------------------... | null | https://raw.githubusercontent.com/aeternity/aeternity/d7704394e11f0e957d61dc6428ef37330230f72d/apps/aetx/src/aetx_env.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Constructors
Getters
Setters
===================================================================
Typ... | ( C ) 2018 , Aeternity Anstalt
ADT containing a check / process environment for transactions
-module(aetx_env).
-export([ tx_env_from_key_header/4
, tx_env_and_trees_from_hash/2
, tx_env_and_trees_from_top/1
]).
-ifdef(TEST).
-export([ contract_env/6
, tx_env/1
, tx_env/2... |
83d64b0fb9d5502ac76fdd763270dfef4690b6d32b0e3febbafc9922fa419c38 | mfikes/fifth-postulate | ns266.cljs | (ns fifth-postulate.ns266)
(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/ns266.cljs | clojure | (ns fifth-postulate.ns266)
(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... | |
26a9efa40676c5799e018a3bf9ebaa3ddd76a2acfbf81fd3a296d7cf4138820f | erlang/sourcer | sourcer_scan_model_tests.erl | @author jakob
-module(sourcer_scan_model_tests).
-include_lib("eunit/include/eunit.hrl").
-include("sourcer_token.hrl").
%%
%% API Functions
%%
scanner_test_() ->
[?_assertEqual({[#token{kind = atom, line = 0, offset = 0,length = 1, value = a, text="a"},
#token{kind = '(', line = 0, offse... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/sourcer/test2/sourcer_scan_model_tests.erl | erlang |
API Functions
Local Functions
| @author jakob
-module(sourcer_scan_model_tests).
-include_lib("eunit/include/eunit.hrl").
-include("sourcer_token.hrl").
scanner_test_() ->
[?_assertEqual({[#token{kind = atom, line = 0, offset = 0,length = 1, value = a, text="a"},
#token{kind = '(', line = 0, offset = 1, length = 1, text... |
e5ce52595246186bd1efb6b3bd7d20c2f9b8a1626f8b48b612291491b79a44bf | futurice/haskell-mega-repo | GroupMatch.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module Futurice.App.FUM.Types.GroupMatch where
import Algebra.Lattice
(BoundedJoinSemiLattice (..), BoundedMeetSemiLattice (..), Lattice (..),
joins1, meets1)
import Data.... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/fum-carbon-app/src/Futurice/App/FUM/Types/GroupMatch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
recursion-schemes
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Latt... | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
module Futurice.App.FUM.Types.GroupMatch where
import Algebra.Lattice
(BoundedJoinSemiLattice (..), BoundedMeetSemiLattice (..), Lattice (..),
joins1, meets1)
import Data.Aeson.Compat (withText)
import Data.Functor.Foldable (cata... |
c4951a9dd1c5658a13d4d54d0db88a30dc0f057f7dd6700ca344d4d31c15eb2e | hexlet-codebattle/battle_asserts | vowels_to_numbers.clj | (ns battle-asserts.issues.vowels-to-numbers
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]
[faker.generate :as faker]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "In a given word array, replace the vowels in each word with their indexes... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/3d92dfc8be2379742e554ee1b6e3878372fe9e78/src/battle_asserts/issues/vowels_to_numbers.clj | clojure | (ns battle-asserts.issues.vowels-to-numbers
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]
[faker.generate :as faker]))
(def level :elementary)
(def tags ["strings"])
(def description
{:en "In a given word array, replace the vowels in each word with their indexes... | |
8a2a74b5d30f490f93e08b2400d6e21442d98b890eef035c26a4757fb0c8725a | gedge-platform/gedge-platform | rabbit_federation_upstream.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_federation_upstream).
-include("r... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_federation/src/rabbit_federation_upstream.erl | erlang |
For testing
----------------------------------------------------------------------------
----------------------------------------------------------------------------
coerce maps to proplists | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_federation_upstream).
-include("rabbit_... |
8fce17e7e96bfc56b4d9db2bf867bc09db39ed329a730d269eecbe14eeb2a0fe | phantomics/april | utilities.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 ; Package : April -*-
;;;; utilities.lisp
(in-package #:april)
(defun join-fns (form &optional wrap)
"Compose multiple successive scalar functions into a larger scalar function. Used to expand (a-call)."
(when (and (listp form) (eql 'a-call (first... | null | https://raw.githubusercontent.com/phantomics/april/86908f1ca9f18ccf58807f2c5d7162acbaeda858/attic/utilities.lisp | lisp | Syntax : ANSI - Common - Lisp ; Coding : utf-8 ; Package : April -*-
utilities.lisp |
(in-package #:april)
(defun join-fns (form &optional wrap)
"Compose multiple successive scalar functions into a larger scalar function. Used to expand (a-call)."
(when (and (listp form) (eql 'a-call (first form)))
(destructuring-bind (_ function &rest args) form
(declare (ignore _))
(if (and (list... |
43bde93826850ab4d37593c3644f4ce2ff96fd8894364723d252965e34646a56 | HumbleUI/HumbleUI | wordle.clj | (ns examples.wordle
(:refer-clojure :exclude [key type])
(:require
[clojure.string :as str]
[io.github.humbleui.font :as font]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.typeface :as typeface]
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.skija Typeface]))
(de... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/5bf5e2a47bf99818c6e7f712c43462d4ecb6254c/dev/examples/wordle.clj | clojure | (ns examples.wordle
(:refer-clojure :exclude [key type])
(:require
[clojure.string :as str]
[io.github.humbleui.font :as font]
[io.github.humbleui.paint :as paint]
[io.github.humbleui.typeface :as typeface]
[io.github.humbleui.ui :as ui])
(:import
[io.github.humbleui.skija Typeface]))
(de... | |
7d0891501df95ce07e5911508b270c8ef837cbf74feb870e3922a503fcbeae34 | opencog/opencog | processing-utils.scm | ;
; processing-utils.scm
;
Utilities for applying different processing steps to input sentences .
; These include getting a list of recently parsed sentences, and a
; utility to send raw input text to the RelEx parse server, with the
resulting parse inserted into the cogserver atomspace .
;
Copyright ( c ) 2009 L... | null | https://raw.githubusercontent.com/opencog/opencog/47c8743d5c7825705cdfda7009355db1f6472267/opencog/nlp/scm/oc/processing-utils.scm | scheme |
processing-utils.scm
These include getting a list of recently parsed sentences, and a
utility to send raw input text to the RelEx parse server, with the
needed for open-pipe, close-pipe
needed for with-mutex
needed for get-line
-----------------------------------------------------------------------
See belo... | Utilities for applying different processing steps to input sentences .
resulting parse inserted into the cogserver atomspace .
Copyright ( c ) 2009 Linas Vepstas < >
Copyright ( c ) 2015 OpenCog Foundation
(srfi srfi-1)
(opencog))
(define-public get-one-anchored-item
(let ((mtx (ma... |
2acb144ae5e01d503c7c701b005c9044e169493c33b3309b456253c24f89634b | rabbitmq/ra-kv-store | centos.clj | (ns jepsen.os.centos
"Common tasks for CentOS boxes."
(:use clojure.tools.logging)
(:require [clojure.set :as set]
[jepsen.util :refer [meh]]
[jepsen.os :as os]
[jepsen.control :as c]
[jepsen.control.util :as cu]
[jepsen.net :as net]
[clojure... | null | https://raw.githubusercontent.com/rabbitmq/ra-kv-store/faf36863bb3822ef4dcd99de5635007273d35997/jepsen/jepsen/src/jepsen/os/centos.clj | clojure | Install specific versions
Install any version
Packages! | (ns jepsen.os.centos
"Common tasks for CentOS boxes."
(:use clojure.tools.logging)
(:require [clojure.set :as set]
[jepsen.util :refer [meh]]
[jepsen.os :as os]
[jepsen.control :as c]
[jepsen.control.util :as cu]
[jepsen.net :as net]
[clojure... |
bb46141ab4e8c4779e575716457ad3bd60a86f9731cc992990fb91f765770713 | argp/bap | piqirun_ext.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 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 agreed to in writing... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqilib/piqirun_ext.ml | ocaml | preallocate default convert options |
Copyright 2009 , 2010 , 2011 , 2012 , 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 agreed to in writing... |
0ed224e942fc8369481cce7f031b77df7daa55a5b13f5a478aa3008ae7998548 | samply/blaze | transaction.clj | (ns blaze.interaction.transaction
"FHIR batch/transaction interaction.
#transaction"
(:require
[blaze.anomaly :as ba :refer [if-ok when-ok]]
[blaze.async.comp :as ac :refer [do-sync]]
[blaze.db.api :as d]
[blaze.executors :as ex]
[blaze.fhir.spec :as fhir-spec]
[blaze.fhir.spec.type :as t... | null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/interaction/src/blaze/interaction/transaction.clj | clojure | if the resource handle with `id` exists, it was created in the
transaction because a new id is created for POST requests
it's important to switch to the executor here, because otherwise
the central indexing thread would execute response building. | (ns blaze.interaction.transaction
"FHIR batch/transaction interaction.
#transaction"
(:require
[blaze.anomaly :as ba :refer [if-ok when-ok]]
[blaze.async.comp :as ac :refer [do-sync]]
[blaze.db.api :as d]
[blaze.executors :as ex]
[blaze.fhir.spec :as fhir-spec]
[blaze.fhir.spec.type :as t... |
75d0844fb6e07df5a63222e3b4d037ce8156f6967b53f33ad33e9b87c8cfeed1 | ludat/conferer | ConfererHedisSpecMain.hs | # OPTIONS_GHC -F - discover -optF --module - name = ConfererHedisSpecMain #
| null | https://raw.githubusercontent.com/ludat/conferer/3c2d794a0e109626abb314e802971121dac7d7f9/packages/hedis/test/ConfererHedisSpecMain.hs | haskell | module - name = ConfererHedisSpecMain # | |
5acd65deda24c114a44bc0350819e2e05c82eaca6e03e4c9e11023aa274f7be0 | LexiFi/lrt | typEq.mli | (******************************************************************************)
Copyright ( C ) 2020 by LexiFi .
(* *)
This source file is released under the terms of the MIT license as part ... | null | https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/lib/typEq.mli | ocaml | ****************************************************************************
of the lrt package. Details can be found in the attached LICENSE file.
****************************************************************************
* Type equal... | Copyright ( C ) 2020 by LexiFi .
This source file is released under the terms of the MIT license as part
* A value of type [ ( ' a , ' b ) t ] is a witness that the two types [ ' a ] and [ ' b ]
are equal .
are equal. *)
type (_, _) t = Eq : ('a, 'a) t
... |
513d3d85319e2cebcc0eef46c2061b19b5d0a85b4aae88983cdb0c6eff8fe93f | 40ants/defmain | defmain.lisp | (uiop:define-package :defmain
(:use :cl)
(:nicknames :defmain/defmain)
(:import-from #:net.didierverna.clon
#:remainder
#:defsynopsis
#:make-context
#:help
#:getopt)
(:import-from #:alexandria
#:ensure-symbol)
(:im... | null | https://raw.githubusercontent.com/40ants/defmain/55b6414839c7c3fb7c4e08dfc5273b7996c763da/src/defmain.lisp | lisp | unnecessary dependencies here:
Making real work
Making real work
For reference on defsynopsys, take a look at it's documentation
/
TODO: add a test
name of environment variable to take value from
if true, then option does not require a value,
but becomes True if specified on the command-line
when not specifie... | (uiop:define-package :defmain
(:use :cl)
(:nicknames :defmain/defmain)
(:import-from #:net.didierverna.clon
#:remainder
#:defsynopsis
#:make-context
#:help
#:getopt)
(:import-from #:alexandria
#:ensure-symbol)
(:im... |
728ce8a3e2be806aa84f45728d44a712846e35ec2ecfc6439e6e5ca06186e0dd | dwayne/haskell-programming | ReplaceThe.hs | module ReplaceThe where
import Data.List (intercalate)
-- This may not be the solution they had in mind.
replaceThe :: String -> String
replaceThe s = intercalate " " $ map theToA (words s)
where
theToA :: String -> String
theToA "the" = "a"
theToA s = s
| null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch12/ReplaceThe.hs | haskell | This may not be the solution they had in mind. | module ReplaceThe where
import Data.List (intercalate)
replaceThe :: String -> String
replaceThe s = intercalate " " $ map theToA (words s)
where
theToA :: String -> String
theToA "the" = "a"
theToA s = s
|
e308bfaf85f73da0b861e80176aeb54e977d6bffa2aa7291bde0c4ea973cfeea | MyDataFlow/ttalk-server | mysql.erl | %%%-------------------------------------------------------------------
%%% File : mysql.erl
Author : < >
. : MySQL client .
%%%
Created : 4 Aug 2005 by < >
%%%
Copyright ( c ) 2001 - 2004 Kungliga Tekniska Högskolan
%%% See the file COPYING
%%%
%%% Usage:
%%%
%%%
Call one of the start - function... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/mysql/src/mysql.erl | erlang | -------------------------------------------------------------------
File : mysql.erl
See the file COPYING
Usage:
start_link(Id, Host, User, Password, Database)
start_link(Id, Host, Port, User, Password, Database)
Id is a connection group identifier. If you want to have more
than one connection to a... | Author : < >
. : MySQL client .
Created : 4 Aug 2005 by < >
Copyright ( c ) 2001 - 2004 Kungliga Tekniska Högskolan
Call one of the start - functions before any call to fetch/2
start_link(Id , Host , User , Password , Database , )
start_link(Id , Host , Port , User , Password , Database , ... |
04b95dd8368fc78b3a586b48a266a049de448fb8d21e381453399b0f255ea964 | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | MultiParam.hs | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- | Contains the different functions to run the operation multiParam
module OpenAPI.Operati... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/5d8f5da48273d006dd0e2cdb6d2425fb6b52f0c5/testing/golden-output/src/OpenAPI/Operations/MultiParam.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
| Contains the different functions to run the operation multiParam
| > GET /pet/multiparam/{status}
Operation with multiple parameters
^ Contains all available parameters of this operation (query and path parameters)
| Defines the... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module OpenAPI.Operations.MultiParam where
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
import qualified Control.Monad.Fail
import qualified Control... |
941fdecf0fb590b52e8ae71a60ac0ab7f1bb1ba3d2c23c66db1c549b28f361f1 | ocaml/MPP-language-blender | mpp.ml | (***********************************************************************)
Meta Pre Processor , a language blender
( c ) 2013 by < >
(* Licence : ISC *)
(* -support-policy/isc-license/ *)
(*************************... | null | https://raw.githubusercontent.com/ocaml/MPP-language-blender/0596bf5d50b4b36d071dc429473d039b777e7c3b/src/mpp.ml | ocaml | *********************************************************************
Licence : ISC
-support-policy/isc-license/
*********************************************************************
entry point
default action
block_name: syntactic "tool"
TODO: make loc... | Meta Pre Processor , a language blender
( c ) 2013 by < >
open Mpp_charstream
open Mpp_init
let debug =
try ignore(Sys.getenv "MPP_DEBUG") ; true with _ -> false
let () = Mpp_charstream.debug := debug
let () = Mpp_actions.debug := debug
let ignore_orphan_closing_... |
225850f8f39de05047c4dc9de4f14a8387b397cf8e3037950ad59721b5d8169d | nvim-treesitter/nvim-treesitter | folds.scm | (
[
(fenced_code_block)
(indented_code_block)
(list)
(section)
] @fold
(#trim! @fold)
)
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/2eaf18826988f921ddb39e4a2e7d23d95bb0e52a/queries/markdown/folds.scm | scheme | (
[
(fenced_code_block)
(indented_code_block)
(list)
(section)
] @fold
(#trim! @fold)
)
| |
ec257aaccd57077246a35df98d4c79d5ec04e50d8dddd678054e2a94136951fe | webyrd/n-grams-for-synthesis | test-Guile.scm | ;;
srfi-48 format test for
;;
(use-modules (srfi srfi-38)) ; for write-with-shared-structure
(include "test-tool.scm")
(include "srfi-48.scm")
(include "test-0001.scm")
| null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-48/test/test-Guile.scm | scheme |
for write-with-shared-structure | srfi-48 format test for
(include "test-tool.scm")
(include "srfi-48.scm")
(include "test-0001.scm")
|
aac49f1e4b3b7807f989f7ef947bbcc9453b46a35e3732bde4be4bab01314c66 | schmidt73/guidescan-web | routes_test.clj | (ns guidescan-web.routes-test
(:require [clojure.test :refer :all]
[guidescan-web.routes :as routes]))
| null | https://raw.githubusercontent.com/schmidt73/guidescan-web/130f189c88aadcce7a2d857943d16be54f789059/test/guidescan_web/routes_test.clj | clojure | (ns guidescan-web.routes-test
(:require [clojure.test :refer :all]
[guidescan-web.routes :as routes]))
| |
d3e3412d4cd29d7eed082e848a7685eb71099257b9b2cfd83a862676629129b2 | opennars/Narjure | term_utils.clj | (ns nal.term_utils
(:require [clojure.set :as set]
[narjure.defaults :refer :all]
[clojure.core.unify :refer [unify]]))
(defn interval?
"Is the term an interval?"
[content]
(and (sequential? content) (= (first content) :interval)))
(defn operation?
"Checks whether st is an operation,... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/nal/term_utils.clj | clojure | todo - temp function below should be in nal.clj - Patham9 to resolve
''and which indicate how intervals have to be treated as occurrence time modulators.
These are:
''Forward Interval'':
(&/,i10,a_1, ..., a_n) = (&/,a_1, ..., a_n). :/10:
''Backward Interval'':
(&/, a_1, ..., a_n, /10) = (&/, a_1, ..., a_n) . :\10:
thi... | (ns nal.term_utils
(:require [clojure.set :as set]
[narjure.defaults :refer :all]
[clojure.core.unify :refer [unify]]))
(defn interval?
"Is the term an interval?"
[content]
(and (sequential? content) (= (first content) :interval)))
(defn operation?
"Checks whether st is an operation,... |
718eae0e306d49034acfcff40295b2c64336bf60ed26c8b75e652844f51a118c | jabber-at/ejabberd | ejabberd_sm_mnesia.erl | %%%-------------------------------------------------------------------
%%% File : ejabberd_sm_mnesia.erl
Author : < >
Created : 9 Mar 2015 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_sm_mnesia.erl | erlang | -------------------------------------------------------------------
File : ejabberd_sm_mnesia.erl
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 ev... | Author : < >
Created : 9 Mar 2015 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
9a8b2f86e511e0245e7e592e6236399857ee9152fda74d88af64d4e9e9214583 | omnyway-labs/chromex-shadow-template | chromex_shadow_template.clj | (ns clj.new.chromex-shadow-template
"Generate a chromex / shadow-cljs chrome extension project."
(:require [clj.new.templates :refer [renderer project-data project-name sanitize sanitize-ns name-to-path raw-resourcer ->files]]))
(defn chromex-shadow-template
"Generate a chromex based chrome extension"
[name & ... | null | https://raw.githubusercontent.com/omnyway-labs/chromex-shadow-template/1a4569ad6024803186fabc4389307a13a769d96b/src/clj/new/chromex_shadow_template.clj | clojure | These will go away once these hacks are no longer needed | (ns clj.new.chromex-shadow-template
"Generate a chromex / shadow-cljs chrome extension project."
(:require [clj.new.templates :refer [renderer project-data project-name sanitize sanitize-ns name-to-path raw-resourcer ->files]]))
(defn chromex-shadow-template
"Generate a chromex based chrome extension"
[name & ... |
78024a9f9e5f2f6ed69f2319defad2cb6b4543359e8074defe0fe7aa1badc3cd | xxyzz/SICP | Exercise_2_47.rkt | #lang racket/base
(define (make-frame origin edge1 edge2)
(list origin edge1 edge2))
(define (origin-frame frame)
(car frame))
(define (edge1-frame frame)
(cadr frame))
(define (edge2-frame frame)
(caddr frame))
second implementation
(define (make-frame origin edge1 edge2)
(cons origin (cons ... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.2_Hierarchical_Data_and_the_Closure_Property/Exercise_2_47.rkt | racket | #lang racket/base
(define (make-frame origin edge1 edge2)
(list origin edge1 edge2))
(define (origin-frame frame)
(car frame))
(define (edge1-frame frame)
(cadr frame))
(define (edge2-frame frame)
(caddr frame))
second implementation
(define (make-frame origin edge1 edge2)
(cons origin (cons ... | |
cfab2e7ab2204ea757dba70e60469a8efbcc302243344f0f3647fa847a83e6db | axelarge/advent-of-code | day05_test.clj | (ns advent-of-code.y2019.day05-test
(:require [clojure.test :refer :all]
[advent-of-code.y2019.day05 :refer :all]
[advent-of-code.y2019.intcode :as intcode]))
(deftest test-solve1
(is (every? zero? (-> (intcode/parse-state input)
(intcode/set-input [1])
... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2019/day05_test.clj | clojure | (ns advent-of-code.y2019.day05-test
(:require [clojure.test :refer :all]
[advent-of-code.y2019.day05 :refer :all]
[advent-of-code.y2019.intcode :as intcode]))
(deftest test-solve1
(is (every? zero? (-> (intcode/parse-state input)
(intcode/set-input [1])
... | |
0dfba95c01f6d79088a94ba38da4c9ab7fef9039f7db8e427f68df8007b98787 | khinsen/leibniz | terms.rkt | #lang racket
(provide
(struct-out var)
(contract-out
[term? (any/c . -> . boolean?)]
[term.sort (term? . -> . sort-or-kind?)]
[term.has-vars? (term? . -> . boolean?)]
[term.vars (term? . -> . set?)]
[term.key (term? . -> . symbol?)]
[term.b... | null | https://raw.githubusercontent.com/khinsen/leibniz/881955b4c642114fbdc2f36ecc99582ae2371238/leibniz/terms.rkt | racket | Define a simple sort graph and signature for testing
The generic interface for terms
Substitutions are varname->term hashes describing a match.
Matching returns a sequence of all match-generating substitutions.
Readable output for terms
Operator-defined terms
Variables
Operator-defined patterns
An... | #lang racket
(provide
(struct-out var)
(contract-out
[term? (any/c . -> . boolean?)]
[term.sort (term? . -> . sort-or-kind?)]
[term.has-vars? (term? . -> . boolean?)]
[term.vars (term? . -> . set?)]
[term.key (term? . -> . symbol?)]
[term.b... |
ce0a6fc920003ccfd16d9bf277474836f1ec73eb4eb56cd40a394fcb2268cf0b | mirage/ocaml-hvsock | preemptive_detach.mli |
* Copyright ( C ) 2017 Docker Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... | null | https://raw.githubusercontent.com/mirage/ocaml-hvsock/f4f4ff02b90f2c12568140b30fb8fceeedd8e2f1/lwt_unix/preemptive_detach.mli | ocaml |
* Copyright ( C ) 2017 Docker Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... | |
f4c5b083852e9c5a0370bc973ad80fd49f910c7eb637d38903f9dccb01a76f31 | rtrusso/scp | stat-dat.scm | 'asdf
| null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/stat-dat.scm | scheme | 'asdf
| |
ab463c4506a68d1f407b0bd1f327cf55dfd0a94a5c4c76b0ba2fd785fd22a04d | binsec/haunted | conf_exploration.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
(* VERIMAG... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/path_exploration/conf_exploration.mli | ocaml | ************************************************************************
VERIMAG
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
Lesser General Public License as published by the Free Software
Foundation , version 2.1 .
See the GNU Le... |
4d75d6e0486bf38b73446e085b787eba512e4b9858fd270848fec875bf137dd1 | ssor/erlangDemos | udp_transmit_server2.erl | -module(udp_transmit_server2).
-export([loop/3,server_loop/2, start/0,stop/0,add_new_message/2,add_port/1,close_all_sockets/2]).
-export([stop_port/1,stop_all_prot/0]).
%根据配置文件接收多个端口的UDP数据,并转发给多个IP特定端口
% transmit_config.txt
以一系列端口为参数启动本地为目标地址的服务
% start_local_server() ->
% % load config
% ConfigFile = "transmit_con... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/demos/unit_demo/udp_transmit_server2.erl | erlang | 根据配置文件接收多个端口的UDP数据,并转发给多个IP特定端口
transmit_config.txt
start_local_server() ->
% load config
ConfigFile = "transmit_config.txt",
start("localhost").
以特定IP为目标发送数据启动服务
原子
监听端口 目的IP 目的端口
List = dict:to_list(Dic2),
List.
udp_transmit ! {stop_server}.
添加某个端口
add_port(Port) ->
udp_transmit ! {add,Port}.
发送消息给服务
接... | -module(udp_transmit_server2).
-export([loop/3,server_loop/2, start/0,stop/0,add_new_message/2,add_port/1,close_all_sockets/2]).
-export([stop_port/1,stop_all_prot/0]).
以一系列端口为参数启动本地为目标地址的服务
{ ok , ConfigList } = file : consult(ConfigFile ) ,
ConfigList .
start() ->
ConfigFile = "transmit_config.txt",
{ok... |
ded9daa2317137bd7c97ab22f454bd93d7ebc22dc90e9fadef6f13d758c1684c | imrehg/ypsilon | adjustment.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk adjustment)
(export gtk_adjustment_changed
gtk_adjustment_clamp_page
gtk_adjustment_configure
gtk_adjust... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtk/adjustment.scm | scheme | void gtk_adjustment_set_upper (GtkAdjustment* adjustment, gdouble upper)
void gtk_adjustment_set_value (GtkAdjustment* adjustment, gdouble value)
[end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk adjustment)
(export gtk_adjustment_changed
gtk_adjustment_clamp_page
gtk_adjustment_configure
gtk_adjust... |
19e6e76f7d00cde832e93e895894301f7a15e6b6297e95c4cd88199a59bf60f5 | Enecuum/Node | StateSpec.hs |
module Enecuum.Tests.Functional.StateSpec where
import Enecuum.Prelude
import Test.Hspec
import qualified Enecuum.Language as L
import qualified Enecuum.Domain as D
import Enecuum.Testing
import Enecuum.Testing.Wrappers
nodeAddress :: D.Address
nodeAddress = D.Address "0.0.0.4" 1000
... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/spec/Enecuum/Tests/Functional/StateSpec.hs | haskell |
module Enecuum.Tests.Functional.StateSpec where
import Enecuum.Prelude
import Test.Hspec
import qualified Enecuum.Language as L
import qualified Enecuum.Domain as D
import Enecuum.Testing
import Enecuum.Testing.Wrappers
nodeAddress :: D.Address
nodeAddress = D.Address "0.0.0.4" 1000
... | |
292fe772ccf1f6b75bfe76781279656957c034fb9d7eb9949c20a836b18cf6de | aloiscochard/machines-io | Machine.hs | # LANGUAGE CPP #
{-# LANGUAGE Rank2Types #-}
module System.IO.Machine where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.IOData (IOData, hGetChunk, hGetLine, hPut, hPutStrLn)
import Data.Machine
import Data.Word (Word8)
import System... | null | https://raw.githubusercontent.com/aloiscochard/machines-io/fb18fd7750ba694aa57c735b2ed18fbb5fcbff7b/src/System/IO/Machine.hs | haskell | # LANGUAGE Rank2Types # | # LANGUAGE CPP #
module System.IO.Machine where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.IOData (IOData, hGetChunk, hGetLine, hPut, hPutStrLn)
import Data.Machine
import Data.Word (Word8)
import System.IO (Handle, hIsEOF)
import... |
cb06f7a84da8dcda9602b73ddda26b12eccec0a0adde1d1c0c726ddb52d300c5 | synduce/Synduce | dropwhile.ml | * @synduce --no - lifting
type 'a clist = CNil | Single of 'a | Concat of 'a clist * 'a clist
type 'a list = Nil | Cons of 'a * 'a list
let rec spec = function
| Nil -> (0, 0, true)
| Cons (hd, tl) ->
let i, pos, is_first_pos = spec tl in
let cond = not hd && is_first_pos in
(i+1, (if cond then ... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/dropwhile.ml | ocaml | * @synduce --no - lifting
type 'a clist = CNil | Single of 'a | Concat of 'a clist * 'a clist
type 'a list = Nil | Cons of 'a * 'a list
let rec spec = function
| Nil -> (0, 0, true)
| Cons (hd, tl) ->
let i, pos, is_first_pos = spec tl in
let cond = not hd && is_first_pos in
(i+1, (if cond then ... | |
81ccbb5ea0ab5e12b31b040bc92fc3e24fc3c2a48f4999951720200d1c38dea9 | opencog/opencog | data_#1.scm | Test # 1
;; Anaphora is not "that" or "enough"
;; Antecedent is a noun
;; Expected result:
;; Acceptance
Connection between two clauses
(ListLink
(AnchorNode "CurrentResolution")
(WordInstanceNode "anaphor")
(WordInstanceNode "antecedent")
)
(ListLink
(AnchorNode "CurrentPronoun")
(WordInsta... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/tests/nlp/anaphora/data/propose/filter-%231/data_%231.scm | scheme | Anaphora is not "that" or "enough"
Antecedent is a noun
Expected result:
Acceptance
filter tests | Test # 1
Connection between two clauses
(ListLink
(AnchorNode "CurrentResolution")
(WordInstanceNode "anaphor")
(WordInstanceNode "antecedent")
)
(ListLink
(AnchorNode "CurrentPronoun")
(WordInstanceNode "anaphor")
)
(ListLink
(AnchorNode "CurrentProposal")
(WordInstanceNode "anteced... |
de2226483225eb972abe8115b072607274bc1e3fdf3f60d71c7169e43407112f | bozsahin/ccglab | suppress-style-warnings.lisp | ;; to suppress style warnings --load before everything else
first form is SBCL - specific , but because of declaim it is ignored by others rather than give error .
CCL is n't very chatty anyway .
-cem bozsahin
(declaim #+sbcl(sb-ext:muffle-conditions style-warning))
(setf *load-verbose* nil)
(setf *load-print* ni... | null | https://raw.githubusercontent.com/bozsahin/ccglab/fc7c4d6875bc5c1fb418f8bf2973272f9054e7e9/bin/suppress-style-warnings.lisp | lisp | to suppress style warnings --load before everything else | first form is SBCL - specific , but because of declaim it is ignored by others rather than give error .
CCL is n't very chatty anyway .
-cem bozsahin
(declaim #+sbcl(sb-ext:muffle-conditions style-warning))
(setf *load-verbose* nil)
(setf *load-print* nil)
let defs by Nikodemus Siivola ( thanks )
`(let* ((nad... |
e45fe462327138ffca57a40532ffef6c06b326cb1e97d8127cd31a2433ee5b43 | sids/nerchuko | helpers.clj | (ns nerchuko.helpers
"Functions that help with various auxiliary tasks such as converting
documents to the necessary format etc."
(:use nerchuko.utils
nerchuko.text.helpers)
(:use [clojure.contrib.duck-streams :only (spit)]
clojure.contrib.generic.functor
[clojure.contrib.seq-utils :only (... | null | https://raw.githubusercontent.com/sids/nerchuko/8aa56497dd8e93e868713dd542667a56215522fb/src/nerchuko/helpers.clj | clojure | (ns nerchuko.helpers
"Functions that help with various auxiliary tasks such as converting
documents to the necessary format etc."
(:use nerchuko.utils
nerchuko.text.helpers)
(:use [clojure.contrib.duck-streams :only (spit)]
clojure.contrib.generic.functor
[clojure.contrib.seq-utils :only (... | |
0b9fa6c22304f3b00957dd90efe6e1c8d7b74ef46f02fba4ecf835303e6b2133 | krcz/zygote | test-c.rkt | #lang s-exp "c-syntax.rkt"
(to-stdout render
(function-definition
(list 'int)
(fun-declarator
(var-name "main")
(list
(parameter-declaration (list 'int) (var-name "argc"))
(parameter-declaration (list 'char) (pointer-declarator (pointer (list (list) (list))) (var-name "argv"))))
... | null | https://raw.githubusercontent.com/krcz/zygote/1f6298f0a73fd0320bc3ba5abe5f00a805fed8fc/noizy/test-c.rkt | racket | #lang s-exp "c-syntax.rkt"
(to-stdout render
(function-definition
(list 'int)
(fun-declarator
(var-name "main")
(list
(parameter-declaration (list 'int) (var-name "argc"))
(parameter-declaration (list 'char) (pointer-declarator (pointer (list (list) (list))) (var-name "argv"))))
... | |
e2fa77bade5110b598255ba123736048d8e768bd1f788815eb09b1ddd679f8c5 | Morgawr/Muon | project.clj | (defproject muon "0.3.0-indev"
:description "Muon - Build your own self-destructible file host."
:url ""
:dependencies [[org.clojure/clojure "1.9.0"]
[compojure "1.6.1"]
[org.xerial/sqlite-jdbc "3.7.2"]
[org.clojure/java.jdbc "0.3.3"]
[com.mchang... | null | https://raw.githubusercontent.com/Morgawr/Muon/bfbd83fa787fd441a99fdc6cc516ec9fbcee9433/project.clj | clojure | (defproject muon "0.3.0-indev"
:description "Muon - Build your own self-destructible file host."
:url ""
:dependencies [[org.clojure/clojure "1.9.0"]
[compojure "1.6.1"]
[org.xerial/sqlite-jdbc "3.7.2"]
[org.clojure/java.jdbc "0.3.3"]
[com.mchang... | |
48b08f000dc7037ab7c0e42e4a4209a7bdcc79a1d83aadba5830541c71d9f1a9 | eeng/shevek | logging.clj | (ns shevek.web.logging
(:require [taoensso.timbre :as log]
[clojure.string :as str]))
(defn- filtered-params [params to-filter]
(reduce
#(if (vector? %2)
(if (get-in %1 %2) (assoc-in %1 %2 "[FILTERED]") %1)
(if (get %1 %2) (assoc %1 %2 "[FILTERED]") %1))
params
to-filter))
(d... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/web/logging.clj | clojure | (ns shevek.web.logging
(:require [taoensso.timbre :as log]
[clojure.string :as str]))
(defn- filtered-params [params to-filter]
(reduce
#(if (vector? %2)
(if (get-in %1 %2) (assoc-in %1 %2 "[FILTERED]") %1)
(if (get %1 %2) (assoc %1 %2 "[FILTERED]") %1))
params
to-filter))
(d... | |
e7b795918aa831ef626f485b39268c7d2626f7757e6950db03a6656512ca6fe0 | bluelisp/hemlock | netnews.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
;;;
;;; ******************************************... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/netnews.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
**********************************************************************
**********************************************************************
via a known NNTP server. Something should probably be done so that
Warning: Throughout this file, it may appear I should ... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
Written by
This file implements the reading of bulletin boards from within Hemlock
when the server is down Hemlock does n't hang as I suspect it will .
access... |
2fb07eb40156458e9d0390242bb150e93991622fec1c9fa0368b1a09c11bc6ab | erlang/otp | m6.erl | -module(m6).
-export([id/1, m/0, wrong/1]).
-ifdef(m6).
m() -> ?m6.
-else.
m() -> false.
-endif.
-spec wrong(float()) -> float().
wrong(X) when is_integer(X) -> X.
id(X) -> X.
| null | https://raw.githubusercontent.com/erlang/otp/1633a01279ec782273e8c100280a5d3f10ac36a8/lib/dialyzer/test/incremental_SUITE_data/m6.erl | erlang | -module(m6).
-export([id/1, m/0, wrong/1]).
-ifdef(m6).
m() -> ?m6.
-else.
m() -> false.
-endif.
-spec wrong(float()) -> float().
wrong(X) when is_integer(X) -> X.
id(X) -> X.
| |
e114923d53e6cc9bb96078fb66d0c40a3873e8d181c3bf2a77ec5c9b4df11c23 | huangjs/cl | f2cl-lbfgs.lisp | (load "/home/robert/lisp/f2cl0.l")
(load "/home/robert/lisp/f2cl1.l")
(load "/home/robert/lisp/f2cl2.l")
(load "/home/robert/lisp/f2cl3.l")
(load "/home/robert/lisp/f2cl4.l")
(load "/home/robert/lisp/f2cl5.l")
(load "/home/robert/lisp/f2cl6.l")
(load "/home/robert/lisp/f2cl7.l")
(load "/home/robert/lisp/f2cl8.l")
(load... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lbfgs/f2cl-lbfgs.lisp | lisp | (load "/home/robert/lisp/f2cl0.l")
(load "/home/robert/lisp/f2cl1.l")
(load "/home/robert/lisp/f2cl2.l")
(load "/home/robert/lisp/f2cl3.l")
(load "/home/robert/lisp/f2cl4.l")
(load "/home/robert/lisp/f2cl5.l")
(load "/home/robert/lisp/f2cl6.l")
(load "/home/robert/lisp/f2cl7.l")
(load "/home/robert/lisp/f2cl8.l")
(load... | |
6e27ec656205676adc917dec0bb7863f4d035a62ece79fcf1da1816709bf101a | aeternity/aeternity | aec_db_gc_SUITE.erl | -module(aec_db_gc_SUITE).
%% common_test exports
-export([all/0, groups/0, suite/0,
init_per_suite/1, end_per_suite/1,
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2]).
%% test case exports
-export([main_test/1,
calls_test/1]).
-include_lib("common_test... | null | https://raw.githubusercontent.com/aeternity/aeternity/2ca6f54d98e142ecdfc89677d02aab3826621f64/apps/aecore/test/aec_db_gc_SUITE.erl | erlang | common_test exports
test case exports
============================================================
Test cases
============================================================
aecore_suite_utils:mine_key_blocks(N2, ?GC_INTERVAL - H1),
==================================================
Private functions
============... | -module(aec_db_gc_SUITE).
-export([all/0, groups/0, suite/0,
init_per_suite/1, end_per_suite/1,
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2]).
-export([main_test/1,
calls_test/1]).
-include_lib("common_test/include/ct.hrl").
-define(MAX_MINED_BLOCKS... |
c770612dbbec4c7d91255ba8b37b53a157b45472615974f13c1b3d4b07b4cae2 | racket/compatibility | restart.rkt |
(module restart scheme/base
(require racket/cmdline)
(provide restart-mzscheme)
(define (restart-mzscheme init-argv adjust-flag-table argv init-namespace)
(let* ([result #t]
[args #f]
[version? #f]
[rep? #f]
[no-coll-paths? #f]
[no-init-file? #f]
[no-compiled? #f]
[scheme? #f]
... | null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/restart.rkt | racket | (when args (set! rest args)) |
(module restart scheme/base
(require racket/cmdline)
(provide restart-mzscheme)
(define (restart-mzscheme init-argv adjust-flag-table argv init-namespace)
(let* ([result #t]
[args #f]
[version? #f]
[rep? #f]
[no-coll-paths? #f]
[no-init-file? #f]
[no-compiled? #f]
[scheme? #f]
... |
2ae0204d234d5e5033584e81c7320e8c3d9d39325c8c0326ea9d46c1d0e2c390 | texmacs/tm-forge | outline.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; MODULE : tm_outline.scm
;; DESCRIPTION : Outlining module for texmacs : reorganizing texts and lists
COPYRIGHT : ( C ) 2019
;;
This software falls under the GNU general public license version 3 or later .
;; It comes WI... | null | https://raw.githubusercontent.com/texmacs/tm-forge/f10cf227f313c1e10d369f78d99f7eed1d51310a/miscellanea/outline/progs/outline.scm | scheme |
MODULE : tm_outline.scm
DESCRIPTION : Outlining module for texmacs : reorganizing texts and lists
It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
in the root directory or <-3.0.html>.
sectional tags are converted to folds, and various routines are provided to
reorganize the... | COPYRIGHT : ( C ) 2019
This software falls under the GNU general public license version 3 or later .
(texmacs-module (outline)
(:use (dynamic dynamic-drd)))
(set-preference "debug-outline" "true")
(define (debug-outline* . l)
(if (in? (get-preference "debug-outline") '("default" "#f" "false")) (for-e... |
e94a204b42eaaa6e561c38c92ff2eeea2cb8a80bedd9a6b720b25e5b57d117d3 | elbrujohalcon/witchcraft | cps.erl | -module (cps).
-compile(export_all).
-spec run() -> [pos_integer()].
run() ->
{CPs, LastSieve} =
lists:foldl(
fun(N, {Acc, Sieve}) ->
io:format("Testing ~p's rotations...", [N]),
case all_primes(N, Sieve) of
{true, NewSieve} -> io:format("in!~n"), {[N|Acc], NewSieve};
{... | null | https://raw.githubusercontent.com/elbrujohalcon/witchcraft/050e91f028a50874347fea9dc552a0e0a056018f/src/cps.erl | erlang | -module (cps).
-compile(export_all).
-spec run() -> [pos_integer()].
run() ->
{CPs, LastSieve} =
lists:foldl(
fun(N, {Acc, Sieve}) ->
io:format("Testing ~p's rotations...", [N]),
case all_primes(N, Sieve) of
{true, NewSieve} -> io:format("in!~n"), {[N|Acc], NewSieve};
{... | |
d6ed93fcc01e0fa59b6443abf258541f5b577cab2570e7fbe7d3b7acc8ae882e | wdebeaum/step | grammar.lisp | ;;;;
W::grammar
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::grammar
(SENSES
((LF-PARENT ONT::linguistic-component) ;linguistic-object)
(EXAMPLE "the grammar of the language")
(meta-data :origin task-learning :entry-date 20050926 :change-date nil :wn ("grammar%1:09:00") :comm... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/grammar.lisp | lisp |
linguistic-object) | W::grammar
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::grammar
(SENSES
(EXAMPLE "the grammar of the language")
(meta-data :origin task-learning :entry-date 20050926 :change-date nil :wn ("grammar%1:09:00") :comments nil)
)
)
)
))
|
e6e6c3083045324532a3f9526dfb2b6add6e2e0b40382096b39f658035d48eeb | theodormoroianu/SecondYearCourses | lab1.hs | import Data.List
perms = permutations [1, 2, 3]
main = do
print perms | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/Labs/lab1.hs | haskell | import Data.List
perms = permutations [1, 2, 3]
main = do
print perms | |
1f3da19990c8c24177b698d88cf97dafcb4bfe36a689668d7ed4805ff3d6c2e1 | dinosaure/hxd | hxd_lwt.ml | open Hxd
module Lwt_scheduler = Make (struct type +'a t = 'a Lwt.t end)
type error = |
let ( <.> ) f g x = f (g x)
let ok x = Ok x
let lwt_bind x f =
let open Lwt.Infix in
Lwt_scheduler.(inj (prj x >>= (prj <.> f)))
let lwt = {bind= lwt_bind; return= (fun x -> Lwt_scheduler.inj (Lwt.return x))}
let lseek =
l... | null | https://raw.githubusercontent.com/dinosaure/hxd/d9f7eb438874d6449b3d046a8736d3b62044fcfd/lib_lwt/hxd_lwt.ml | ocaml | open Hxd
module Lwt_scheduler = Make (struct type +'a t = 'a Lwt.t end)
type error = |
let ( <.> ) f g x = f (g x)
let ok x = Ok x
let lwt_bind x f =
let open Lwt.Infix in
Lwt_scheduler.(inj (prj x >>= (prj <.> f)))
let lwt = {bind= lwt_bind; return= (fun x -> Lwt_scheduler.inj (Lwt.return x))}
let lseek =
l... | |
2610af8ad14415b3cd4772254e9e54fb79754f27ab887cb45a12f6b192f9ca0d | emqx/emqx | emqx_dashboard_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/cb5314bb9ea9830a8701d0ac2c33ad06d4a13a04/apps/emqx_dashboard/test/emqx_dashboard_SUITE.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 - 2023 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(emqx_dashboard_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-import(
... |
dd95fa973d85455ffdb752facbd0a8aef7f360583ad14d6cd2a02c0023d59c71 | PEZ/rich4clojure | problem_028.clj | (ns rich4clojure.easy.problem-028
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Flatten a Sequence =
By 4Clojure user :
;; Difficulty: Easy
Tags : [ seqs core - functions ]
;;
;; Write a function which flattens a sequence.
(def restricted [flatten])
(def __ :tests-will-fail)
(comment
)
(tests
(_... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/easy/problem_028.clj | clojure | = Flatten a Sequence =
Difficulty: Easy
Write a function which flattens a sequence.
Share your solution, and/or check how others did it:
| (ns rich4clojure.easy.problem-028
(:require [hyperfiddle.rcf :refer [tests]]))
By 4Clojure user :
Tags : [ seqs core - functions ]
(def restricted [flatten])
(def __ :tests-will-fail)
(comment
)
(tests
(__ '((1 2) 3 [4 [5 6]])) := '(1 2 3 4 5 6)
(__ ["a" ["b"] "c"]) := '("a" "b" "c")
(__ '((((:a)... |
f5a156311ac376cce1d291c1f083cc01576eafbae18d93b2360b258c0794e28b | lspector/Clojush | small_or_large.clj | ;; small_or_large.clj
,
;;
Problem Source : ( / )
;;
Given an integer n in the range [ -10000 , 10000 ] , print " small " if n < 1000
and " large " if n > = 2000 ( and nothing if 1000 < = n < 2000 ) .
;;
;; input stack has input integer n
(ns clojush.problems.software.small-or-large
(:use clojush.pushgp.... | null | https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/software/small_or_large.clj | clojure | small_or_large.clj
input stack has input integer n
Atom generators
end constants
Integer ERC [-10000,10000]
end input instructions
A list of data domains for the problem. Each domain is a vector containing
should be used as training and testing cases respectively. Each "set" of
inputs is either a list or a f... | ,
Problem Source : ( / )
Given an integer n in the range [ -10000 , 10000 ] , print " small " if n < 1000
and " large " if n > = 2000 ( and nothing if 1000 < = n < 2000 ) .
(ns clojush.problems.software.small-or-large
(:use clojush.pushgp.pushgp
[clojush pushstate interpreter random util globals]... |
f1f78395b9ecfa5d8060e880daad92387ae6c52fb64f9cd82bea59ef31fed3bf | marianoguerra/erldn | erldn.erl | -module(erldn).
-export([lex_str/1, parse_str/1, to_string/1, to_erlang/1, to_erlang/2]).
lex_str(Str) -> erldn_lexer:string(Str).
parse_str(Str) ->
case lex_str(Str) of
{ok, Tokens, _} ->
case erldn_parser:parse(Tokens) of
{ok, Tree} -> {ok, Tree};
{ok, Tree... | null | https://raw.githubusercontent.com/marianoguerra/erldn/aecf2a48fa92ba81c9c1efbee3cd596b1714fb40/src/erldn.erl | erlang | -module(erldn).
-export([lex_str/1, parse_str/1, to_string/1, to_erlang/1, to_erlang/2]).
lex_str(Str) -> erldn_lexer:string(Str).
parse_str(Str) ->
case lex_str(Str) of
{ok, Tokens, _} ->
case erldn_parser:parse(Tokens) of
{ok, Tree} -> {ok, Tree};
{ok, Tree... | |
a362ad1eb7db95fdf6fbb52c3d7b1dcb04954fca970422de327baee995534665 | pflanze/chj-schemelib | fast-math.scm | Copyright 2017 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require easy
tes... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/fast-math.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
XX move
-the-fastest-way-to-divide-an-integer-by-3
| Copyright 2017 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy
test)
(defmacro (@values! v . exprs)
(assert* symbol? v)
`(begin
,@(map/iota (lambda (e i)
`(##vector-s... |
00aadcebb39aa1fe1fa19fcaea949e973569d950d7ed46b789a5ec35870871b6 | JunSuzukiJapan/cl-reex | behavior-subject-test.lisp | (defpackage behavior-subject-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :behavior-subject-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan nil)
;; blah blah blah.
(defparameter ... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/behavior-subject-test.lisp | lisp | blah blah blah. | (defpackage behavior-subject-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :behavior-subject-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan nil)
(defparameter logger (make-instan... |
b869e2289dbd4aef5cb1ed4640e2002fc70f270bc464f4b94f4097d84e49384e | DavidAlphaFox/RabbitMQ | rabbit_connection_helper_sup.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/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_connection_helper_sup.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... |
8845b1daf64ce9d01632d370905899fa12b6b2565672ed2c4f15198be66803c0 | achin/lein-parent | project.clj | (defproject lein-parent/parent-with-foo-property "0.0.1"
:description "Parent project that provides a property 'foo'"
:foo "foo") | null | https://raw.githubusercontent.com/achin/lein-parent/37630e184a37f9adc2a431f4016624b3e815f848/dev-resources/t_parent/samples/parents/with_foo_property/project.clj | clojure | (defproject lein-parent/parent-with-foo-property "0.0.1"
:description "Parent project that provides a property 'foo'"
:foo "foo") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.