_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 |
|---|---|---|---|---|---|---|---|---|
84cb2b1ce1e886275d8911f18b8f34ea7c15daa5d6c61c19df1c43e05ef82d3b | xh4/web-toolkit | entity-json.lisp | (in-package :http)
(defclass json-entity (entity)
((string
:initarg :string
:initform nil)
(json
:initarg :json
:initform nil
:reader entity-json)))
(defun make-json-entity (json-value &key header status method uri version)
(check-type json-value (or json:object json:array))
(let ((string... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/entity-json.lisp | lisp | (in-package :http)
(defclass json-entity (entity)
((string
:initarg :string
:initform nil)
(json
:initarg :json
:initform nil
:reader entity-json)))
(defun make-json-entity (json-value &key header status method uri version)
(check-type json-value (or json:object json:array))
(let ((string... | |
764a3be3cfbbe593ad8f9e36f1006135cf540c733272ab95b95dff34e47d8028 | SamB/coq | retroknowledge.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/kernel/retroknowledge.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i
aliased type for clari... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
type... |
3de0ca1bdbbd320bb633a1ff56801f0fe73af171e8516155df22d6a5628dccbb | NorfairKing/habitscipline | EntrySpec.hs | # LANGUAGE TypeApplications #
module Habitscipline.Data.EntrySpec
( spec,
)
where
import qualified Data.Map as M
import Habitscipline.Data.Entry
import Habitscipline.Data.Entry.Gen ()
import Habitscipline.Data.Habit.Gen ()
import Test.Syd
import Test.Syd.Validity
import Test.Syd.Validity.Aeson
spec :: Spec
spec ... | null | https://raw.githubusercontent.com/NorfairKing/habitscipline/56637f324fbdf9c7983c2180fcdea89518e27500/habitscipline-data-gen/test/Habitscipline/Data/EntrySpec.hs | haskell | # LANGUAGE TypeApplications #
module Habitscipline.Data.EntrySpec
( spec,
)
where
import qualified Data.Map as M
import Habitscipline.Data.Entry
import Habitscipline.Data.Entry.Gen ()
import Habitscipline.Data.Habit.Gen ()
import Test.Syd
import Test.Syd.Validity
import Test.Syd.Validity.Aeson
spec :: Spec
spec ... | |
dfcb17268bd253436b48a89ebec017cf701dc6e606950d5406f6f1b747fed646 | tonyg/kali-scheme | closure.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Closures
(define closure-rtd (make-record-type 'closure '(template env)))
(define closure? (record-predicate closure-rtd))
(define make-closure (record-constructor closure-rtd... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/alt/closure.scm | scheme | Closures | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define closure-rtd (make-record-type 'closure '(template env)))
(define closure? (record-predicate closure-rtd))
(define make-closure (record-constructor closure-rtd '(template... |
2e7614d24aeb2778f5b1e02f771de97c15ff4a8288cd45017e0b3479ccfe578f | marianoguerra/immutant-recipes | process.clj | (ns storm.immutant.clj.process
(:require [cheshire.core :as json]
[clojure.tools.logging :as log])
(:import [storm.immutant.java HornetQJmsProvider HornetQJmsConnectionType
EventTupleProducer]
[backtype.storm StormSubmitter LocalCluster Constants Config]
[backtype.storm... | null | https://raw.githubusercontent.com/marianoguerra/immutant-recipes/6b05ad77f91826e8613421de5bee337fc1cc65d0/storm-integration/storm/src/clj/storm/immutant/clj/process.clj | clojure | Consume tuples from a HornetQ JMS Queue
Create the JMS sprout
Configure it
Send tuples to a HornetQ JMS Topic
do the processing here
Define the bolt that will do the work
Define the bolt that will do the work when a tick happens
Create the topology | (ns storm.immutant.clj.process
(:require [cheshire.core :as json]
[clojure.tools.logging :as log])
(:import [storm.immutant.java HornetQJmsProvider HornetQJmsConnectionType
EventTupleProducer]
[backtype.storm StormSubmitter LocalCluster Constants Config]
[backtype.storm... |
7a8b553ce3ea77b0d98f58f0c53871b25e529103e20d42610b1b3721e25fd8e9 | janestreet/base_quickcheck | test_shrinker.ml | open! Import
module Example = struct
let natural_number_shrinker =
Shrinker.create (function
| 0 -> Sequence.empty
| n -> Sequence.singleton (n - 1))
;;
end
open Example
type 'a t = 'a Shrinker.t
let create = Shrinker.create
let shrink = Shrinker.shrink
let%expect_test "create & shrink" =
Lis... | null | https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/test/src/test_shrinker.ml | ocaml | open! Import
module Example = struct
let natural_number_shrinker =
Shrinker.create (function
| 0 -> Sequence.empty
| n -> Sequence.singleton (n - 1))
;;
end
open Example
type 'a t = 'a Shrinker.t
let create = Shrinker.create
let shrink = Shrinker.shrink
let%expect_test "create & shrink" =
Lis... | |
9da3cf08589fb208fc1dc40ad364fddbd40c0da9dea1517083d1485a6b4385a7 | 3b/cl-opencl-3b | opencl-glut.lisp | (in-package #:opencl-opengl-examples)
;;; cl-glut:window with extra stuff for managing cl resources
(defclass loaded-program-data ()
((id :accessor id :initarg :program-id)
(kernels :initform (make-hash-table :test 'equal) :accessor kernels)))
;;; separate class, so we can get :around method order right for
;;;... | null | https://raw.githubusercontent.com/3b/cl-opencl-3b/b40781e3d049d59ce3bba02ec6e55be708996d53/examples/opencl-glut.lisp | lisp | cl-glut:window with extra stuff for managing cl resources
separate class, so we can get :around method order right for
glut:display-window, and hopefully at some point reuse some for a
list of strings, symbols, or functions denoting program sources
strings are literal source
symbols are assumed to have source in ... | (in-package #:opencl-opengl-examples)
(defclass loaded-program-data ()
((id :accessor id :initarg :program-id)
(kernels :initform (make-hash-table :test 'equal) :accessor kernels)))
glop version as well
(defclass opencl-window-mixin ()
((program-sources :accessor program-sources)
(platform :initform (or ... |
44451dcddb68a79df19d6a7228abdc0430a472d8dc0058b8b6e71051cc95f300 | gedge-platform/gedge-platform | lager_console_backend.erl | Copyright ( c ) 2011 - 2012 , 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless r... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/lager/src/lager_console_backend.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
@doc Console backend for lager... | Copyright ( c ) 2011 - 2012 , 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS O... |
7b412d8ce9cde400eabc40fa627032aae18fffb4109ee7718ed09c5a2e1172b0 | ThoughtWorksInc/stonecutter | client_seed.clj | (ns stonecutter.test.db.client-seed
(:require [midje.sweet :refer :all]
[clauth.client :as cl-client]
[stonecutter.db.client-seed :as cs]
[stonecutter.db.mongo :as m]
[clauth.store :as cl-store]))
(def client-store (m/create-memory-store))
(background
(before :facts... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/db/client_seed.clj | clojure | (ns stonecutter.test.db.client-seed
(:require [midje.sweet :refer :all]
[clauth.client :as cl-client]
[stonecutter.db.client-seed :as cs]
[stonecutter.db.mongo :as m]
[clauth.store :as cl-store]))
(def client-store (m/create-memory-store))
(background
(before :facts... | |
22c02dbc489174fd29dcf859d2028f0d09a21fc38d4e2365f6e6fc0e1b362813 | seniverse/kube_dist | kube_proxy_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 distribut... | null | https://raw.githubusercontent.com/seniverse/kube_dist/ba9930f5b640e49052a17a311c503e34ab47b052/src/kube_proxy_sup.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kube_proxy_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SE... |
6d31954de72772b8b250d391b5d9e6b9e32c6306f80f62132c1fc88a203679e0 | 7max/log4cl | logging-macros.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
Copyright ( c ) 2012 , . All rights reserved .
;;;
This file is licensed to You under the Apache License , Version 2.0
( the " License " ) ; you may not use this file except in compliance
with the License . You may obtain a copy of the Li... | null | https://raw.githubusercontent.com/7max/log4cl/d6293f9f1b6b8871b0a4417c4bb22afb9910b97f/src/logging-macros.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
you may not use this file except in compliance
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
lim... | Copyright ( c ) 2012 , . All rights reserved .
This file is licensed to You under the Apache License , Version 2.0
with the License . You may obtain a copy of the License at
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package #:log4cl)
(defmacro with-log-indent ((&optional (in... |
57c01212dd03edf68c1d4936b63fabb2c702308e892fcff849f1256effc32450 | 8c6794b6/guile-tjit | ir-immediate.scm | ANF IR for immediates and statically allocated non - immediates
Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/trace/ir-immediate.scm | scheme |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... | ANF IR for immediates and statically allocated non - immediates
Copyright ( C ) 2015 , 2016 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floo... |
7ac131127dc293539bb40ece85e0e2652b6458b07087d57100ff0ea304e30df8 | janestreet/sexp | parser.mli | open! Core
val parse_exn : string -> Query.t
| null | https://raw.githubusercontent.com/janestreet/sexp/56e485b3cbf8a43e1a8d7647b0df31b27053febf/sexp_app/pattern/parser.mli | ocaml | open! Core
val parse_exn : string -> Query.t
| |
6377c3db95b5ce84283c452fdbd0120523e6f1230f125340c2d9e1241e2784ef | technomancy/leiningen | project.clj | This is Leiningen 's own project configuration . See doc / TUTORIAL.md
;; file as well as sample.project.clj for help writing your own.
(defproject leiningen "2.9.10"
:description "Automate Clojure projects without setting your hair on fire."
:url ""
:license {:name "Eclipse Public License"
:url "-... | null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/project.clj | clojure | file as well as sample.project.clj for help writing your own.
needed for pom
needed for test
needed for new
needed for uberjar
needed for repl
needed for change
which hasn't bumped commons-codec in its most recent version.
org.apache.maven.wagon/wagon-http -> org.apache.maven.wagon/wagon-http-shared ->
-> org... | This is Leiningen 's own project configuration . See doc / TUTORIAL.md
(defproject leiningen "2.9.10"
:description "Automate Clojure projects without setting your hair on fire."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
If you update these , update resources / leiningen /... |
ef7b89a97c5002893a59f4bffd026baa15a57702751f2c3d18e9204b951ed34f | openworkload/swm-core | wm_http.erl | -module(wm_http).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([add_route/2]).
-include("../../lib/wm_log.hrl").
-record(mstate, {routes = #{} :: map(), spool :: string()}).
-define(DEFAULT_HTTPS_PORT, 8443).
%... | null | https://raw.githubusercontent.com/openworkload/swm-core/084082d427972afdb434147b20953e61dbeda8c5/src/srv/http/wm_http.erl | erlang | ============================================================================
Module API
============================================================================
============================================================================
Server callbacks
=======================================================... | -module(wm_http).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([add_route/2]).
-include("../../lib/wm_log.hrl").
-record(mstate, {routes = #{} :: map(), spool :: string()}).
-define(DEFAULT_HTTPS_PORT, 8443).
... |
debdc6d7c9b3fd7df9de542ee8b5cc6ba8b83234d03e7c599109a6f3d4b65590 | passivsystems/protean | request.clj | (ns protean.core.transformation.request
"Building Ring requests."
(:require [clojure.string :as s]
[protean.config :as conf]
[protean.utils :as u]
[protean.api.codex.document :as d]
[protean.api.protocol.http :as h]
[protean.api.protocol.protean :as pp]
[protean.api.transformation.coerce :as... | null | https://raw.githubusercontent.com/passivsystems/protean/5e9a9a83428899a42c45af019c86bd961d890f92/src/protean/core/transformation/request.clj | clojure | (ns protean.core.transformation.request
"Building Ring requests."
(:require [clojure.string :as s]
[protean.config :as conf]
[protean.utils :as u]
[protean.api.codex.document :as d]
[protean.api.protocol.http :as h]
[protean.api.protocol.protean :as pp]
[protean.api.transformation.coerce :as... | |
b3958d12cfc39df355862bf15589e4bb67b8b629acc0420647362607af6038c9 | cbaggers/varjo | deftype.lisp | (in-package :varjo.internals)
(in-readtable :fn.reader)
(defmacro define-vari-type (name args type-form
&key valid-metadata-kinds)
(check-args-for-constant-names :type name args)
(let ((ephemeral (null type-form))
(valid-metadata-kinds (listify valid-metadata-kinds)))
(asser... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/varjo.internals/deftype.lisp | lisp | If this ↑↑↑↑↑ changes then v-type-eq has to change too. | (in-package :varjo.internals)
(in-readtable :fn.reader)
(defmacro define-vari-type (name args type-form
&key valid-metadata-kinds)
(check-args-for-constant-names :type name args)
(let ((ephemeral (null type-form))
(valid-metadata-kinds (listify valid-metadata-kinds)))
(asser... |
f6a6743c2545bd889ee3da206142f326db076d2e75a7fbecca36f987866064fd | synduce/Synduce | Tuples.ml | open Base
open RType
(* ============================================================================================= *)
(* TUPLE TYPES *)
(* ============================================================================================= *... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/src/lang/Tuples.ml | ocaml | =============================================================================================
TUPLE TYPES
============================================================================================= | open Base
open RType
Tuple types need to be managed for interfacing with SMT solvers . The following functions provide
tools to add datatype declarations to SMTLIB files , parse reponses , and in general manage the tuple
types that can be encountered in the program .
tools to add datatype declaration... |
8ca2b3dc777fe002264f6df81e2ace949fc4ff0260f814336f94a8039c2fd826 | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define blurb (quote ("Language levels for the Programming Languages: Application and Interpretation textbook"))) (define homepage "/~sk/Publications/Books/ProgLangs/") (define deps (quote ("plai-doc" "plai-lib" "base"))) (define pkg-desc "Tea... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/plai/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define blurb (quote ("Language levels for the Programming Languages: Application and Interpretation textbook"))) (define homepage "/~sk/Publications/Books/ProgLangs/") (define deps (quote ("plai-doc" "plai-lib" "base"))) (define pkg-desc "Tea... | |
32302866a4e71edc45541cb08650d71b3ad10e4bdba1ea07c30365fb017d4723 | esl/MongooseIM | mod_muc_mnesia.erl | %%%----------------------------------------------------------------------
%%% Based on file mod_muc.
%%%
%%% Original header and copyright notice:
%%%
Author : < >
Purpose : MUC support ( XEP-0045 )
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free software; you can re... | null | https://raw.githubusercontent.com/esl/MongooseIM/dda03c16c83f5ea9f5c9b87c3b36c989813b9250/src/mod_muc_mnesia.erl | erlang | ----------------------------------------------------------------------
Based on file mod_muc.
Original header and copyright notice:
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,
bu... | Author : < >
Purpose : MUC support ( XEP-0045 )
ejabberd , Copyright ( C ) 2002 - 2011 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
Fou... |
67e5889eb1f8c2b2cfade5c626513a55c1c0cd1c8d4cd0220b026e583df2368b | phantomics/april | packages.lisp | (defpackage maxpc.input
(:documentation
"The generic _input_ interface allows extensions to parse other _types_ of
_input sources_. To add a new _input source type_, {make-input} has to be
specialized on that _type_. The following methods have to be defined for
_inputs_:
+ {input-empty-p}
+ {i... | null | https://raw.githubusercontent.com/phantomics/april/622daea3a046511c49dc86f6b4d4525b61a2d66f/maxpc-apache/packages.lisp | lisp | (defpackage maxpc.input
(:documentation
"The generic _input_ interface allows extensions to parse other _types_ of
_input sources_. To add a new _input source type_, {make-input} has to be
specialized on that _type_. The following methods have to be defined for
_inputs_:
+ {input-empty-p}
+ {i... | |
4398b929007194b05a10bd9e3d0fd75e8604fbf1e95cc95170d95ec777b4606f | haskell-servant/servant | BasicAuthSpec.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANG... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant-client/test/Servant/BasicAuthSpec.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -freduction - depth=100 #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Servant.BasicAuthSpec (spec) where
imp... |
0d23ec7f562e3ff22c2c9c238b621456f28c9a51b58286a942e829a2d0b3623a | tonyrog/pacman | pacman_ghost.erl | @author < >
( C ) 2016 ,
%%% @doc
%%% Ghost driver
%%% @end
Created : 5 Sep 2016 by < >
-module(pacman_ghost).
-export([start/1,start/2,start/3,start/4]).
-record(state,
{
id :: integer(),
position :: {integer(),integer()},
color = 1 :: 1|2|3|4,
speed = 1 :: 1|2|3|4|6|8,
scared ... | null | https://raw.githubusercontent.com/tonyrog/pacman/39f32a55612666ea6f1f82d6b8aa94e263026627/src/pacman_ghost.erl | erlang | @doc
Ghost driver
@end
simple ghost
1 -
hit a wall must make a decision
junction is decision points | @author < >
( C ) 2016 ,
Created : 5 Sep 2016 by < >
-module(pacman_ghost).
-export([start/1,start/2,start/3,start/4]).
-record(state,
{
id :: integer(),
position :: {integer(),integer()},
color = 1 :: 1|2|3|4,
speed = 1 :: 1|2|3|4|6|8,
scared = false,
style = random :: random ... |
3b87c9c15cdbe5d07c4c75f76e1397538a4bd26457c88d46a17869ca30c5a7e0 | mbenelli/gambit-sqlite3 | sqlite3-common.scm | ;; Gambit-c's sqlite3 binding. High-level interface.
;;
Copyright ( c ) 2008 , < >
;; 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 th... | null | https://raw.githubusercontent.com/mbenelli/gambit-sqlite3/18dc75386508b35a806b06ffe65149f27f0db1d4/sqlite3-common.scm | scheme | Gambit-c's sqlite3 binding. High-level interface.
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 condit... | Copyright ( c ) 2008 , < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDERS OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT
(define sqlite3 #f)
(let ()
... |
eccc2992ab759716d72fcf1348b6e6da348a8ffcf80bff2d4c9076fe588507be | xapix-io/axel-f | operator_test.cljc | (ns axel-f.operator-test
(:require [axel-f.excel :as af]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest range-operator
(t/is (= '(0 1 2)
((af/compile "0 : 3"))))
(t/is (= '(0 1 2)
((af/compile "foo[0 : 3]") {:foo [0 1 2 3 ... | null | https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/test/axel_f/operator_test.cljc | clojure | (ns axel-f.operator-test
(:require [axel-f.excel :as af]
#?(:clj [clojure.test :as t]
:cljs [cljs.test :as t :include-macros true])))
(t/deftest range-operator
(t/is (= '(0 1 2)
((af/compile "0 : 3"))))
(t/is (= '(0 1 2)
((af/compile "foo[0 : 3]") {:foo [0 1 2 3 ... | |
37e88636d27ab369f69a54b8ddf29e940c2ce6bcf4c8c8c61e7d39aee221dab3 | AbstractMachinesLab/caramel | raw_compat.mli | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/merlin_specific/411/raw_compat.mli | ocaml | Used only in context.ml | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
fd0bdaadb613d153b3f0f799c233c5d1d3cbd6b1914093969018549d08a21445 | cosmos72/hyperluminal-mem | compiler.lisp | ;; -*- lisp -*-
;; This file is part of Hyperluminal-mem.
Copyright ( c ) 2013 - 2015
;;
;; This library is free software: you can redistribute it and/or
modify it under the terms of the Lisp Lesser General Public License
;; (), known as the LLGPL.
;;
;; This library is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/cosmos72/hyperluminal-mem/29c23361260e3a94fb1e09f3fdeab469b035504d/abcl/compiler.lisp | lisp | -*- lisp -*-
This file is part of Hyperluminal-mem.
This library is free software: you can redistribute it and/or
(), known as the LLGPL.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PU... |
Copyright ( c ) 2013 - 2015
modify it under the terms of the Lisp Lesser General Public License
(in-package :hyperluminal-mem-abcl)
(defconstant +jclass-int-array+ (java:jclass-of (java:jnew-array "int" 0)))
(defconstant +jclass-long-array+ (java:jclass-of (java:jnew-array "long" 0)))
(defconstant +sap=>b... |
22648d0bc7fd2e291ae32e2859892223bde651f09fa499d89473f567f985e6ad | mirleft/ocaml-tls | tls_async.mli | open! Core
open! Async
* Low - level API for working with TLS sessions .
Most applications should use the high - level API below
Most applications should use the high-level API below *)
module Session = Session
* Helper functions for [ Async_unix]-specific IO operations commonly used with X509
certifi... | null | https://raw.githubusercontent.com/mirleft/ocaml-tls/9a26701a077ee750496173a853207d4f520467de/async/tls_async.mli | ocaml | * defaults to [10_000]. | open! Core
open! Async
* Low - level API for working with TLS sessions .
Most applications should use the high - level API below
Most applications should use the high-level API below *)
module Session = Session
* Helper functions for [ Async_unix]-specific IO operations commonly used with X509
certifi... |
2578718547f333d174cf1ee52bca1cee08e42e6f48e101479a15411efd90777f | juxt/iota | runner.cljs | (ns juxt.runner
(:require [doo.runner :refer-macros [doo-tests]]
[juxt.iota-test]))
(doo-tests 'juxt.iota-test)
| null | https://raw.githubusercontent.com/juxt/iota/3f7ebc694c219f9472f2039bfedc3a4e0cd69dfa/test/juxt/runner.cljs | clojure | (ns juxt.runner
(:require [doo.runner :refer-macros [doo-tests]]
[juxt.iota-test]))
(doo-tests 'juxt.iota-test)
| |
979638599624955078f233a6641cf2f8b9d88baa9641afc8c91f6cb2602b3875 | DomainDrivenArchitecture/dda-serverspec-crate | fact.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-serverspec-crate/0a2fd8cdd54a9efc3aad9e141098c2bf01d40861/main/src/dda/pallet/dda_serverspec_crate/infra/core/fact.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-serverspec-crate.infra.core.fact
(:require
[schema.core :as s]
[dda.pallet.commons.fact :as fact]))
(... |
c2bb17fb1e69ed9bb9a77612bcb6f6cbcb6de503d17ee856a84f92f411bef3ee | KavehYousefi/Esoteric-programming-languages | main.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program implements an interpreter for the esoteric programming
language " " , invented by the Esolang user " " .
;;
;; --------------------------------------------------------------------
;;
Author :
Date : 2022 - 07 - 0... | null | https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/27b6ebe5086cd23c31b6fcd6a5ba3c74b0a8a4dc/BRUH/BRUH_001/main.lisp | lisp |
This program implements an interpreter for the esoteric programming
--------------------------------------------------------------------
Sources:
-> ""
-- Declaration of types. -- ;;
-------------------------------------------------------
-------------------... | language " " , invented by the Esolang user " " .
Author :
Date : 2022 - 07 - 06
(deftype list-of (&optional (element-type T))
"The ``list-of'' type defines a list of zero or more elements, each
member of which conforms to the ELEMENT-TYPE, defaulting to ``T''."
(let ((predicate (gensym)))
(... |
5a646cbb8dc8bc4e0717e501e4a16996c1b6b614161690f9cca2b88ff67f928d | juspay/atlas | Validation.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Utils/Validation.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | |
f34e598ad09f228087b21272516cb016a581861ef2c68c9ca9ae064c67b33a1e | ocsigen/js_of_ocaml | gh1349.ml | Js_of_ocaml tests
* /
* Copyright ( C ) 2022 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the L... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/4b1253d25c7539a73305f4320a945ee9751abfee/compiler/tests-compiler/gh1349.ml | ocaml | Js_of_ocaml tests
* /
* Copyright ( C ) 2022 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the L... | |
cf48780abab649b585d02731f300e2859eea427b0b61de647b87d3c3c8b91ead | scheme-live/live | output.scm | "asd" | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-structure-lonely-string/output.scm | scheme | "asd" | |
e801da7a830363cdc744a8c0937025d999d31fa7711318eb4e02483e63a3104e | darkleaf/publicator | list_test.clj | (ns publicator.web.responders.post.list-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.responders.base :as responders.base]
[publicator.use-cases.test.factories :as factories]
[publicator.use-cases.interactors.post.list :as interactor]
[publicator.use-cases.test.fakes ... | null | https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/web/test/publicator/web/responders/post/list_test.clj | clojure | (ns publicator.web.responders.post.list-test
(:require
[publicator.utils.test.instrument :as instrument]
[publicator.web.responders.base :as responders.base]
[publicator.use-cases.test.factories :as factories]
[publicator.use-cases.interactors.post.list :as interactor]
[publicator.use-cases.test.fakes ... | |
f4cb2c008405d791525deb8c8cb0dd6d0449baaf99584b77aff3a2b6888ed575 | tweag/ormolu | dollar-chains-1-out.hs | module Main where
foo =
fmap escapeLeadingDollar
. dropPaddingSpace
. dropWhileEnd T.null
. fmap (T.stripEnd . T.pack)
. lines
$ unpackHDS docStr
foo =
when (GHC.xopt Cpp dynFlags && not cfgTolerateCpp) $
throwIO (OrmoluCppEnabled path)
foo =
bar $
baz $
quux
x =
case l of ... | null | https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/infix/dollar-chains-1-out.hs | haskell | module Main where
foo =
fmap escapeLeadingDollar
. dropPaddingSpace
. dropWhileEnd T.null
. fmap (T.stripEnd . T.pack)
. lines
$ unpackHDS docStr
foo =
when (GHC.xopt Cpp dynFlags && not cfgTolerateCpp) $
throwIO (OrmoluCppEnabled path)
foo =
bar $
baz $
quux
x =
case l of ... | |
542c581e187cc139a4a69584b2352aad838b8afa682b4d8a16c1d5323e254854 | rm-hull/turmites | server.clj | (ns turmites.server
(:require [noir.server :as server]
[ring.middleware.gzip :as deflate]))
(server/load-views "src/turmites/views")
(defn -main [& m]
(alter-var-root #'*read-eval* (constantly false))
(let [mode (keyword (or (first m) :dev))
port (read-string (get (System/getenv) "PORT" "808... | null | https://raw.githubusercontent.com/rm-hull/turmites/63d6824005671f5b957f5d5e630eb81d9e507a0d/src/turmites/server.clj | clojure | (ns turmites.server
(:require [noir.server :as server]
[ring.middleware.gzip :as deflate]))
(server/load-views "src/turmites/views")
(defn -main [& m]
(alter-var-root #'*read-eval* (constantly false))
(let [mode (keyword (or (first m) :dev))
port (read-string (get (System/getenv) "PORT" "808... | |
4d84355578cc018f142cadf088299d958032f831d74f60e088f8e3f919bee152 | jguhlin/ODG | annotation_test.clj | (ns UTR-import.annotation-test
(:use clojure.test
UTR-import.annotation))
| null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/test/UTR_import/annotation_test.clj | clojure | (ns UTR-import.annotation-test
(:use clojure.test
UTR-import.annotation))
| |
0a2c1803a1166e8b9c8da551c11425f1001ab32cceea7128db775c9834aa0760 | schibsted/spid-tech-docs | toc_test.clj | (ns spid-docs.pimp.toc-test
(:require [spid-docs.pimp.toc :refer :all]
[midje.sweet :refer :all]))
(fact
"It creates a table of contents from the h2 headers in .main"
(create-toc (str "<spid-toc></spid-toc>"
"<div class=\"main\">"
"<h2 id=\"heading-1\">Heading 1</... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/test/spid_docs/pimp/toc_test.clj | clojure | (ns spid-docs.pimp.toc-test
(:require [spid-docs.pimp.toc :refer :all]
[midje.sweet :refer :all]))
(fact
"It creates a table of contents from the h2 headers in .main"
(create-toc (str "<spid-toc></spid-toc>"
"<div class=\"main\">"
"<h2 id=\"heading-1\">Heading 1</... | |
f717850fe6b51b472f3014241bb7fad36135e4672d4e16b2936419785834a9ee | alyssa-p-hacker/SchemeBBS | templates.scm |
(define doctype "HTML PUBLIC \"ISO/IEC 15445:2000//DTD HyperText Markup Language//EN\"")
(define (main-template title page #!optional class)
`((doctype ,doctype)
(html
(head (title ,title)
(meta (@ (content "text/html; charset=UTF-8") (http-equiv "Content-Type")))
(meta (@ (name "view... | null | https://raw.githubusercontent.com/alyssa-p-hacker/SchemeBBS/7a5506e7fad22472e1e94671b4fabfce6432199a/templates.scm | scheme | (samp ,(string-append (number->string (- n 1)) " posts omitted") )))))
,(if (not (null? threads)) |
(define doctype "HTML PUBLIC \"ISO/IEC 15445:2000//DTD HyperText Markup Language//EN\"")
(define (main-template title page #!optional class)
`((doctype ,doctype)
(html
(head (title ,title)
(meta (@ (content "text/html; charset=UTF-8") (http-equiv "Content-Type")))
(meta (@ (name "view... |
d1291129117325eb33627a79c15cc8de82e5240ffa460e179d04f34cd3a057a8 | evansb/cis194-hw | HW01Tests.hs | CIS 194 , Spring 2015
--
-- Test cases for HW 01
module HW01Tests where
import HW01
import Testing
-- Exercise 1 -----------------------------------------
testLastDigit :: (Integer, Integer) -> Bool
testLastDigit (n, d) = lastDigit n == d
testDropLastDigit :: (Integer, Integer) -> Bool
testDropLastDigit (n, d) =... | null | https://raw.githubusercontent.com/evansb/cis194-hw/7ee2bc5e45a6c61d021b43e19ded66a0899f9c33/spring_2015/hw1/HW01Tests.hs | haskell |
Test cases for HW 01
Exercise 1 -----------------------------------------
---------------------------------------
---------------------------------------
---------------------------------------
---------------------------------------
---------------------------------------
All Tests --------------------------------... | CIS 194 , Spring 2015
module HW01Tests where
import HW01
import Testing
testLastDigit :: (Integer, Integer) -> Bool
testLastDigit (n, d) = lastDigit n == d
testDropLastDigit :: (Integer, Integer) -> Bool
testDropLastDigit (n, d) = dropLastDigit n == d
test :: (Eq a, Show a) => String -> (b -> a) -> [(b, a)] -> ... |
276ae224c90f1698b4a1111d8dfa848a81fba006d839f77703f7c2f0098fbfce | dyzsr/ocaml-selectml | ocaml_compilers.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/ocamltest/ocaml_compilers.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Ocamltest_stdlib
class compiler
~(name : string)
~(flags : string)
~(directory : string)
~(exit_... |
6c8e0a347d282a2e0f07f6adc255405c86ad6fa6078fc852df9c4235a1060435 | monadbobo/ocaml-core | linux_ext.mli | (** Interface to Linux-specific system calls *)
* { 2 sysinfo }
module Sysinfo : sig
* Result of sysinfo syscall ( man 2 sysinfo )
type t =
{ uptime : Span.t; (** time since boot *)
* load average over the last minute
* load average over the last 5 minutes
* load average over the last 15 minutes
total_ra... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/linux_ext.mli | ocaml | * Interface to Linux-specific system calls
* time since boot
* total usable main memory
* available memory size
* amount of shared memory
* memory used by buffers
* total swap page size
* available swap space
* number of current processes
* Total high memory size
* Available high memory size
* Memory unit si... |
* { 2 sysinfo }
module Sysinfo : sig
* Result of sysinfo syscall ( man 2 sysinfo )
type t =
* load average over the last minute
* load average over the last 5 minutes
* load average over the last 15 minutes
} with sexp, bin_io
val sysinfo : (unit -> t) Or_error.t
end
* { 2 Filesystem functions }
* [ sendfi... |
094446cd2c9a72fce9e1db3f041208ab5af18ad6b2867170f87b09175304d6eb | PacktPublishing/Haskell-High-Performance-Programming | lazypat.hs | -- file: lazypat.hs
server :: [Int] -> [Int]
server (y:ys) = process y : server ys
where process n = n ^ 2
client :: Int -> [Int] -> [Int]
client initial ~(x:xs) = initial : client (next x) xs
where next n = n `mod` 65534
requests :: [Int]
requests = client initial responses
where initial = 2
responses :: [... | null | https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter04/lazypat.hs | haskell | file: lazypat.hs |
server :: [Int] -> [Int]
server (y:ys) = process y : server ys
where process n = n ^ 2
client :: Int -> [Int] -> [Int]
client initial ~(x:xs) = initial : client (next x) xs
where next n = n `mod` 65534
requests :: [Int]
requests = client initial responses
where initial = 2
responses :: [Int]
responses = ser... |
03e1be88a98aa6840a9f262a9d855505075a1c3deb304e198172e64fcccd335b | flavioc/cl-meld | parallel.lisp | (in-package :cl-meld)
(deftuple setcolor (:type-addr :type-int :type-int :type-int) :action :linear)
(deftuple setedgelabel (:type-addr :type-addr :type-string) :action :linear)
(deftuple write-string (:type-addr :type-string) :action :linear)
(deftuple setColor2 (:type-addr :type-int) :action)
(deftuple stop-program ... | null | https://raw.githubusercontent.com/flavioc/cl-meld/8bfedb30137a15bfd94c6cfafe0a5107a050dd35/models/parallel.lisp | lisp | (in-package :cl-meld)
(deftuple setcolor (:type-addr :type-int :type-int :type-int) :action :linear)
(deftuple setedgelabel (:type-addr :type-addr :type-string) :action :linear)
(deftuple write-string (:type-addr :type-string) :action :linear)
(deftuple setColor2 (:type-addr :type-int) :action)
(deftuple stop-program ... | |
b72e09f02675ea79687382eefdfe3c87a526887623d89e22548ad56b23ed63d0 | dongcarl/guix | security-token.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2018 Arun Isaac < >
Copyright © 2020 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published b... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/services/security-token.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2018 Arun Isaac < >
Copyright © 2020 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu services security-token)
#:us... |
ec4512e8bddc15564554fd9fed0fa934dbdf716888118c2099fac0c3f4a26305 | lingnand/VIMonad | Properties.hs | import Test.QuickCheck
-- Our QC instances and properties.
import Instances
import Properties.Delete
import Properties.Failure
import Properties.Floating
import Properties.Focus
import Properties.GreedyView
import Properties.Insert
import Properties.Screen
import Properties.Shift
import Properties.Stack
import Propert... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/xmonad/tests/Properties.hs | haskell | Our QC instances and properties.
tall layout
full layout
resize hints | import Test.QuickCheck
import Instances
import Properties.Delete
import Properties.Failure
import Properties.Floating
import Properties.Focus
import Properties.GreedyView
import Properties.Insert
import Properties.Screen
import Properties.Shift
import Properties.Stack
import Properties.StackSet
import Properties.Swap
... |
10e14ad8048e3be101222792945962883a760e79fa0b4ea02db846b8fc7d8768 | mauricioszabo/repl-tooling | interactive_test.cljs | (ns repl-tooling.editor-integration.renderer.interactive-test
(:require [clojure.string :as str]
[repl-tooling.editor-integration.renderer.interactive :as int]
; [reagent.core :as r]
[repl-tooling.integration.fake-editor :as fake]
[clojure.test]
; [check.cor... | null | https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/test/repl_tooling/editor_integration/renderer/interactive_test.cljs | clojure | [reagent.core :as r]
[check.core :refer [check]]
[check.async-old :refer [async-test]] | (ns repl-tooling.editor-integration.renderer.interactive-test
(:require [clojure.string :as str]
[repl-tooling.editor-integration.renderer.interactive :as int]
[repl-tooling.integration.fake-editor :as fake]
[clojure.test]
[check.async :refer [check async-test testing]]... |
054e4e7b8119e471e5794a6d2ed69130db96a2be3a6d26f0037bff329f41c426 | perkss/tinklj | config.clj | (ns tinklj.config
(:import (com.google.crypto.tink.config TinkConfig)
(com.google.crypto.tink Registry)
(com.google.crypto.tink.aead AeadConfig)
(com.google.crypto.tink.daead DeterministicAeadConfig)
(com.google.crypto.tink.mac MacConfig)
(com.google.crypto.tink.... | null | https://raw.githubusercontent.com/perkss/tinklj/5bd65782c1dbf5112952d76ab7db1efe986fbe1a/src/tinklj/config.clj | clojure | (ns tinklj.config
(:import (com.google.crypto.tink.config TinkConfig)
(com.google.crypto.tink Registry)
(com.google.crypto.tink.aead AeadConfig)
(com.google.crypto.tink.daead DeterministicAeadConfig)
(com.google.crypto.tink.mac MacConfig)
(com.google.crypto.tink.... | |
1e2dd04c2b820fb4c850e44b4a3ebac7383180907e6fbba0a76b92b0f77b071c | wireapp/wire-server | Client.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero Genera... | null | https://raw.githubusercontent.com/wireapp/wire-server/7cd0a9c1dc423f87d46ad86fccaced93c6147fb1/services/brig/src/Brig/Federation/Client.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have... |
f87b1e61f4ccf1b772c635eba551fbf83d33315dafb78ab5cb7951e2a3ce6f32 | ProjectMAC/propagators | data.scm | ;;; ----------------------------------------------------------------------
Copyright 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/or modif... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/examples/selectors/data.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the GNU Gene... |
bc82fcb12a57fa231bff7c12d5355e0564386401a2ce022ac949995f9d2b08c1 | grin-compiler/grin | Test.hs | # LANGUAGE QuasiQuotes , ViewPatterns #
module Test.ExtendedSyntax.New.Test where
import Data.Text (Text, pack)
import Data.Bifunctor (second)
import Control.Monad (forM_, forM)
import Test.Hspec (Spec, describe)
import Grin.ExtendedSyntax.TH (expr)
import Grin.ExtendedSyntax.Grin (Exp, Name)
import Grin.ExtendedSy... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Test/ExtendedSyntax/New/Test.hs | haskell | NOTE: These contexts contain some names. Make sure not to use these in your test code! | # LANGUAGE QuasiQuotes , ViewPatterns #
module Test.ExtendedSyntax.New.Test where
import Data.Text (Text, pack)
import Data.Bifunctor (second)
import Control.Monad (forM_, forM)
import Test.Hspec (Spec, describe)
import Grin.ExtendedSyntax.TH (expr)
import Grin.ExtendedSyntax.Grin (Exp, Name)
import Grin.ExtendedSy... |
5dbcac581b8406d59ee50f7364e5fdb5d55df55eb2b253f17a03ee323feb6ed5 | binsec/binsec | lreader.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/disasm/lreader.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
9d4c839d95a233006113c43bdbe9051d16383157976d7392d6b2d41afcd895c9 | mikelevins/folio2 | series-package.lisp | ;;;; ***********************************************************************
;;;;
Name : package.lisp
;;;; Project: folio2 - Functional idioms for Common Lisp
;;;; Purpose: series package
;;;; Author: mikel evins
Copyright : 2015 by mikel evins
;;;;
;;;; ***************************... | null | https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/series-package.lisp | lisp | ***********************************************************************
Project: folio2 - Functional idioms for Common Lisp
Purpose: series package
Author: mikel evins
*********************************************************************** | Name : package.lisp
Copyright : 2015 by mikel evins
(in-package :cl-user)
(defpackage :net.bardcode.folio2.series
(:use :cl :net.bardcode.folio2.as :net.bardcode.folio2.make)
(:import-from :fset :wb-seq)
(:import-from :series :foundation-series :cotruncate :subseries)
(:import-from :net.bar... |
e6e41e3a5ed120f1c118205df5e42d8b86bcf717f242b14a09861fc16fc2eb4c | haskell-lisp/yale-haskell | type-macros.scm |
;;; This file also contains some random globals for the type checker:
(define-walker type ast-td-type-walker)
;;; Some pre-defined types
(define *bool-type* '())
(define *char-type* '())
(define *string-type* '())
(define *int-type* '())
(define *integer-type* '())
(define *rational-type* '())
These two globals a... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/type/type-macros.scm | scheme | This file also contains some random globals for the type checker:
Some pre-defined types
passing lots of stuff in each function call.
Used by the defaulting mechanism
Used in error handling & recovery
This associates a type checker function with an ast type. The variable
`object' is bound to the value being typ... |
(define-walker type ast-td-type-walker)
(define *bool-type* '())
(define *char-type* '())
(define *string-type* '())
(define *int-type* '())
(define *integer-type* '())
(define *rational-type* '())
These two globals are used throughout the typechecker to avoid
(define *placeholders* '())
(define *non-generic-tyv... |
7da86e27f8bbfd94fa054d22170c31800b7aeb616870ab7bea213a55c5cbe2cd | satos---jp/mincaml_self_hosting | lib_sinint.ml | let scale = create_array 24 0.0
let theta = create_array 24 0.0
let init_scale_theta = (
scale.(0) <- 1.0;
scale.(1) <- 0.5;
scale.(2) <- 0.25;
scale.(3) <- 0.125;
scale.(4) <- 0.0625;
scale.(5) <- 0.03125;
scale.(6) <- 0.015625;
scale.(7) <- 0.0078125;
scale.(8) <- 0.00390625;
scale.(9) <- 0.001953125;
scale.(10) <- ... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/lib/ml/lib_sinint.ml | ocaml | let scale = create_array 24 0.0
let theta = create_array 24 0.0
let init_scale_theta = (
scale.(0) <- 1.0;
scale.(1) <- 0.5;
scale.(2) <- 0.25;
scale.(3) <- 0.125;
scale.(4) <- 0.0625;
scale.(5) <- 0.03125;
scale.(6) <- 0.015625;
scale.(7) <- 0.0078125;
scale.(8) <- 0.00390625;
scale.(9) <- 0.001953125;
scale.(10) <- ... | |
1ce7b0b40b5cc3048cfd11f6e48b609b4ec92b96c399d2be64a7ee3689757a7a | korya/efuns | shape.ml | (***********************************************************************)
(* *)
xlib for
(* *)
Fabrice Le Fessant , projet Para / SOR , INRIA Rocq... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/xlib/shape.ml | ocaml | *********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Xtypes
open Xbuffer
open Display
open Xproto
module Ol... |
34ecd1cc5f86ffa2a0aea934ff483800c158479b7ba560a89e1f6c906290c42a | haskell-mafia/mismi | MismiTypes.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
module Mismi.EC2.Core.MismiTypes (
InstanceId (..)
, UserData (..)
, SecurityGroupName (..)
, SecurityGroupId (..)
, LoadBalancer (..)
, AvailabilityZone (..)
, ImageId (.... | null | https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-ec2-core/src/Mismi/EC2/Core/MismiTypes.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
module Mismi.EC2.Core.MismiTypes (
InstanceId (..)
, UserData (..)
, SecurityGroupName (..)
, SecurityGroupId (..)
, LoadBalancer (..)
, AvailabilityZone (..)
, ImageId (..)
, EC2Market (..)
, MismiSpot... |
4f37e21859c9c21e5ce9641942fa24d8ed5586ceaf3f3d4f932f52b054a866d6 | ml4tp/tcoq | geninterp.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/engine/geninterp.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Dynamic types for toplevel values.... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Interpretation functions fo... |
45f4580899334b8b5ccf39b4295949cd2f60406ffa5a8cc1281e6cb06642e7a4 | rescript-lang/rescript-compiler | js_of_lam_block.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the Licens... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/js_of_lam_block.ml | ocaml | TODO: it would be even better, if the [tag_info] contains more information
about immutablility
| _, ( Tuple | Variant _ ) -> (\** TODO: check with inline record *\)
E.arr Immutable
(E.small_int ?comment:(Lam_compile_util.comment_of_tag_info tag_info) tag
:: args)
| _, _ ->
E.a... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the Licens... |
a962a7d5c7a6e30ec5d819d62aaca957c1708c0c588695be58808d394d3e5712 | heraldry/heraldicon | reader.cljs | (ns heraldicon.reader.blazonry.reader
(:require
[heraldicon.reader.blazonry.parser :as parser]
[heraldicon.reader.blazonry.process.core :as process]
[heraldicon.reader.blazonry.transform.core :as transform]
[heraldicon.reader.blazonry.transform.tincture :as tincture]))
(defn read [data parser]
(when da... | null | https://raw.githubusercontent.com/heraldry/heraldicon/f3298ed0b3394f8db78c4e5e548adc61cd9a256d/src/heraldicon/reader/blazonry/reader.cljs | clojure | (ns heraldicon.reader.blazonry.reader
(:require
[heraldicon.reader.blazonry.parser :as parser]
[heraldicon.reader.blazonry.process.core :as process]
[heraldicon.reader.blazonry.transform.core :as transform]
[heraldicon.reader.blazonry.transform.tincture :as tincture]))
(defn read [data parser]
(when da... | |
12d07e170b8d64f994c3e338cca66505902a75d2fe91719aae75e0e3f015a80b | CompSciCabal/SMRTYPRTY | mark_and_sweep_collector.rkt | #lang plai/collector
; Improve the trivial collector to perform a mark-and-sweep collection
; To avoid worrying about fragmentation issues primitives are promoted to
; the same size as cons cells
(define heap-ptr 'uninitialized-heap-ptr)
(define (cell:width)
3)
(define (cell:set! cell tag f r)
(let ([addr cell... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/experiments/scott/garbage_collector/plai/tests/gc/good-collectors/mark_and_sweep_collector.rkt | racket | Improve the trivial collector to perform a mark-and-sweep collection
To avoid worrying about fragmentation issues primitives are promoted to
the same size as cons cells
calling heap-offset before init-allocator is called gives 'undefined
number -> boolean
number -> any
number -> number
function number -> boolea... | #lang plai/collector
(define heap-ptr 'uninitialized-heap-ptr)
(define (cell:width)
3)
(define (cell:set! cell tag f r)
(let ([addr cell])
(begin
(heap-set! addr tag)
(heap-set! (+ 1 addr) f)
(heap-set! (+ 2 addr) r)
addr)))
(define (cell:set-tag! cell tag)
(begin
(heap-set... |
ef8fb120ce1d1bce6e5aae3eb2f3bb1244c14436cfd9911713aa0617af90b442 | haskell/lsp | FoldingRange.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.FoldingRange where
import qualified Data.Aeson as A
import Data.Aeson.TH
import Data.Text (Text)
import ... | null | https://raw.githubusercontent.com/haskell/lsp/4a8f16fe7ceea273f46ec7420e6fa4fc5528091e/lsp-types/src/Language/LSP/Types/FoldingRange.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
-------------------------------------
| Whether implementation supports dynamic registration for folding range
providers. If this is set to `true` the client supports the new
`(FoldingRangeProviderOptions & TextDocumentRegistrationOptio... | # LANGUAGE DuplicateRecordFields #
module Language.LSP.Types.FoldingRange where
import qualified Data.Aeson as A
import Data.Aeson.TH
import Data.Text (Text)
import Language.LSP.Types.Common
import Language.LSP.Types.Progress
import ... |
b8d9b27ba9930bfb50954000061798e325d322df94d0120a13e51944544a5552 | vseloved/rutils | string.lisp | ;; For license see LICENSE
(in-package #:rutils.string)
(named-readtables:in-readtable rutils-readtable)
(eval-when (:compile-toplevel)
(declaim #.+default-opts+))
(declaim (inline white-char-p fmt strjoin blankp))
(defun strcat (&rest string-designators)
"CONCATENATE all the strings in STRING-DESIGNATORS."
... | null | https://raw.githubusercontent.com/vseloved/rutils/db3c3f4ae897025b5f0cd81042ca147da60ca0c5/core/string.lisp | lisp | For license see LICENSE
(define-setf-expander substr (string start &optional end &environment env)
"Like (SETF SUBSEQ), but for SUBSTR."
(multiple-value-bind (dummies vals newval setter getter)
(get-setf-expansion 'string env)
(let (len
(when (minusp start)
start (+ len start))... |
(in-package #:rutils.string)
(named-readtables:in-readtable rutils-readtable)
(eval-when (:compile-toplevel)
(declaim #.+default-opts+))
(declaim (inline white-char-p fmt strjoin blankp))
(defun strcat (&rest string-designators)
"CONCATENATE all the strings in STRING-DESIGNATORS."
(let ((*print-pretty* nil)
... |
c9a3e774fac2dd44798f61df5fe742c89b7eab06464ea9cf0d676939bed04130 | elaforge/karya | Speed_test.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Derive.Call.Speed_test where
import qualified Derive.Call.Speed as Speed
import qualified Derive.DeriveT as DeriveT
import qualified Derive.DeriveTest as DeriveTest
import qualifie... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/Call/Speed_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
Float imprecision doesn't cause the end to be omitted.
Float imprecision doesn't cause the end to be omitted. | Copyright 2013
module Derive.Call.Speed_test where
import qualified Derive.Call.Speed as Speed
import qualified Derive.DeriveT as DeriveT
import qualified Derive.DeriveTest as DeriveTest
import qualified Derive.ScoreT as ScoreT
import qualified Perform.Signal as Signal
import qualified Ui.Ui as Ui
import ... |
9c09c2de9c3cc261244741ad40d0c3cb62251e6cf4de2bd99e869ea10457d179 | mirage/mirage | main.ml | Geneated by functoria_test
let (>>=) x f = f x
let return x = x
let run x = x
module App_make__4 = App.Make(Key_gen)(Info_gen)
let sys__1 = lazy (
return Sys.argv
)
let key_gen__2 = lazy (
let __sys__1 = Lazy.force sys__1 in
__sys__1 >>= fun _sys__1 ->
return (Functoria_runtime.with_argv (List.map fst K... | null | https://raw.githubusercontent.com/mirage/mirage/7e36d793ad8bd34beb51bbba62a39aa035f7e297/test/functoria-runtime/main.ml | ocaml | Geneated by functoria_test
let (>>=) x f = f x
let return x = x
let run x = x
module App_make__4 = App.Make(Key_gen)(Info_gen)
let sys__1 = lazy (
return Sys.argv
)
let key_gen__2 = lazy (
let __sys__1 = Lazy.force sys__1 in
__sys__1 >>= fun _sys__1 ->
return (Functoria_runtime.with_argv (List.map fst K... | |
c32917e08c70d3fcb3e29e2fc2ea7b6544db8c007be1f8b9ce07561844c6f69e | dom96/SimpleIRC | Spec.hs | module Main (main) where
import Test.Hspec.Monadic
import qualified CoreSpec
main :: IO ()
main = hspecX $ do
describe "Core" CoreSpec.spec
| null | https://raw.githubusercontent.com/dom96/SimpleIRC/ee5ab54fcff9ae974458a9394a2484709724e9dc/tests/Spec.hs | haskell | module Main (main) where
import Test.Hspec.Monadic
import qualified CoreSpec
main :: IO ()
main = hspecX $ do
describe "Core" CoreSpec.spec
| |
50aa18d8e6e84aed8c1892d238c70beb94df7633577b2824933e0a5288c8f201 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.lesson-builder.widgets.object-form.video-form.views
(:require
[webchange.lesson-builder.widgets.object-form.common.views :refer [component-wrapper]]
[webchange.ui.index :as ui]))
(defn- volume-component
[{:keys [data on-change]}]
(let [value (get data :volume 0.5)
handle-change #(on... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/724b12a6630bfd1bb4b868ece08f68841602eab5/src/cljs/webchange/lesson_builder/widgets/object_form/video_form/views.cljs | clojure | (ns webchange.lesson-builder.widgets.object-form.video-form.views
(:require
[webchange.lesson-builder.widgets.object-form.common.views :refer [component-wrapper]]
[webchange.ui.index :as ui]))
(defn- volume-component
[{:keys [data on-change]}]
(let [value (get data :volume 0.5)
handle-change #(on... | |
1fca8f4840505ecec93d1a7b23a6b588339a767efe083cd11137aeb0df8a0432 | mfikes/fifth-postulate | ns439.cljs | (ns fifth-postulate.ns439)
(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/ns439.cljs | clojure | (ns fifth-postulate.ns439)
(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... | |
341bbb72c7244bcef392da103def9efe3fc2245d277e32ce72e0762694a20676 | goblint/analyzer | uninit.ml | (** Local variable initialization analysis. *)
module M = Messages
module AD = ValueDomain.AD
module IdxDom = ValueDomain.IndexDomain
module Offs = ValueDomain.Offs
open Prelude.Ana
open Analyses
module Spec =
struct
include Analyses.DefaultSpec
module Addr = ValueDomain.Addr
module D = ValueDomain.AddrSetDo... | null | https://raw.githubusercontent.com/goblint/analyzer/3fc209f2b3bdcc44c40e3c30053a2fa64368ff2e/src/analyses/uninit.ml | ocaml | * Local variable initialization analysis.
Variables and address expressions
Binary operators
The address operators, we just check the accesses under them
Most casts are currently just ignored, that's probably not a good idea!
Accesses during the evaluation of an lval, not the lval itself!
list accessed addr... |
module M = Messages
module AD = ValueDomain.AD
module IdxDom = ValueDomain.IndexDomain
module Offs = ValueDomain.Offs
open Prelude.Ana
open Analyses
module Spec =
struct
include Analyses.DefaultSpec
module Addr = ValueDomain.Addr
module D = ValueDomain.AddrSetDomain
module C = ValueDomain.AddrSetDomain
... |
3151982bc7e645ee81b7f155c598978598069db969e21d01f33131b99cfbb51a | mhjort/clj-gatling | simulations.clj | (ns metrics-simulation.simulations
(:require [clojure.core.async :refer [chan go >!]]
[org.httpkit.client :as http]))
(def base-url ":8888")
(defn- http-get [url _]
(let [response (chan)
check-status (fn [{:keys [status]}]
(go (>! response (= 200 status))))]
(http/ge... | null | https://raw.githubusercontent.com/mhjort/clj-gatling/224375060c22fe6e2be823960cc4dce6fb9b222c/examples/metrics-simulation/src/metrics_simulation/simulations.clj | clojure | (ns metrics-simulation.simulations
(:require [clojure.core.async :refer [chan go >!]]
[org.httpkit.client :as http]))
(def base-url ":8888")
(defn- http-get [url _]
(let [response (chan)
check-status (fn [{:keys [status]}]
(go (>! response (= 200 status))))]
(http/ge... | |
9216fffeacef6fa5a6a58da1afb2e76051f5ef14f8b9bbb7de7b2cb9188ec9de | ecraven/r7rs-benchmarks | Gerbil-prelude.scm | prelude: :scheme/r7rs
;; (declare (not safe)) ;; do not use unsafe optimizations
(export main)
| null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Gerbil-prelude.scm | scheme | (declare (not safe)) ;; do not use unsafe optimizations | prelude: :scheme/r7rs
(export main)
|
c59432263136ce32e3a0164f7fbd147ca89f5ba4ee7b7206d18a3d998be81d76 | ixmatus/prizm | Transform.hs | {-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Prizm.Color.Transform
Copyright : ( C ) 2013 Parnell Springmeyer
-- License : BSD3
Maintainer : Parnell Springmeyer < >
-- Stability : stable
---------------... | null | https://raw.githubusercontent.com/ixmatus/prizm/8baceff70b44a14bc67bac9efdd5270620567cec/src/Data/Prizm/Color/Transform.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Data.Prizm.Color.Transform
License : BSD3
Stability : stable
---------------------------------------------------------------------------
^ Nth place to round a number to
^ Number to ... | Copyright : ( C ) 2013 Parnell Springmeyer
Maintainer : Parnell Springmeyer < >
module Data.Prizm.Color.Transform where
import Control.Applicative
| Round a number to the decimal place .
-> Double
roundN n num = (fromInteger $ round $ num * (10^n)) / (10.0^^n)
providing a list of ... |
e561f8a9d9f613bd835f8b82b15c83269fe18671abe2ed9349ea2cc6239614ea | racket/typed-racket | log.rkt | #lang typed/racket/base
(make-log-receiver (make-logger) 'error)
(make-log-receiver (make-logger) 'error 'hi)
;; the expr should type check
;; (make-log-receiver (make-logger) 'error 'hi 'fatal)
(make-log-receiver (make-logger) 'error 'hi 'fatal 'world)
| null | https://raw.githubusercontent.com/racket/typed-racket/db16eb39bf0eb1ea247f94a04baab4c4ca90f628/typed-racket-test/succeed/log.rkt | racket | the expr should type check
(make-log-receiver (make-logger) 'error 'hi 'fatal) | #lang typed/racket/base
(make-log-receiver (make-logger) 'error)
(make-log-receiver (make-logger) 'error 'hi)
(make-log-receiver (make-logger) 'error 'hi 'fatal 'world)
|
711bab828a924cba77efb244729cf86018f4a4ff9526f68f4dc48428de1433e8 | OCamlPro/drom | git.ml | (**************************************************************************)
(* *)
Copyright 2020 OCamlPro & Origin Labs
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/git.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 OCamlPro & Origin Labs
GNU Lesser General Public License version 2.1 , with the special
let user () =
match Misc.call_get_fst_line "git config --get user.name" with
| Some user -> user
| None -> raise Not_found
let email () =
match Misc.call_get_fst... |
e157dfbd0ca8203175252718bed8de9c6787289927abc487f797ede815c31617 | evilmartians/foundry | symtab.ml | open Unicode.Std
type t = (string, unit) Hashtbl.t
let create () =
Hashtbl.create 10
let copy symtab =
Hashtbl.copy symtab
let add symtab name =
let rec find_name name suffix =
let name' =
if name = "" then (string_of_int suffix)
else name ^ "." ^ (string_of_int suffix)
in
if Hashtbl.m... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/src/support/symtab.ml | ocaml | open Unicode.Std
type t = (string, unit) Hashtbl.t
let create () =
Hashtbl.create 10
let copy symtab =
Hashtbl.copy symtab
let add symtab name =
let rec find_name name suffix =
let name' =
if name = "" then (string_of_int suffix)
else name ^ "." ^ (string_of_int suffix)
in
if Hashtbl.m... | |
37ab98170d7422682e8c1ca8bb5f25c37592d05ad92bbd61468380553f7ef398 | coq-community/coqffi | conflicts.mli | module Cstr : sig
type t = A of int
type u = A
end
module Fields : sig
type t = { f : int }
type u = { f : int }
end
module Type : sig
type t
val t : t
end
module Parent : sig
type t
module Child : sig
val t : t
end
end
val t : Parent.t
module Kw : sig
val set : int -> unit
type t = ... | null | https://raw.githubusercontent.com/coq-community/coqffi/38f7c9862b1ad03c3143ca825891ce06212e885e/examples/src/conflicts.mli | ocaml | module Cstr : sig
type t = A of int
type u = A
end
module Fields : sig
type t = { f : int }
type u = { f : int }
end
module Type : sig
type t
val t : t
end
module Parent : sig
type t
module Child : sig
val t : t
end
end
val t : Parent.t
module Kw : sig
val set : int -> unit
type t = ... | |
cb5f4a2fbc09add061444e55c6da63472bc8c44b1e2b57e5df8d2e7714804a2e | roman01la/minimax | model.clj | (ns fg.model
(:require [clojure.java.io :as io]
[fg.material :as mat]
[minimax.assimp.texture :as t]
[minimax.objects.group :as obj.group]
[minimax.objects.mesh :as obj.mesh]
[minimax.util.scene :as util.scene])
(:import (org.joml Matrix4f)
(org... | null | https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/fg/model.clj | clojure | single mesh node — mesh
multi mesh node (mesh with multiple materials) — group
reset local transform on child meshes | (ns fg.model
(:require [clojure.java.io :as io]
[fg.material :as mat]
[minimax.assimp.texture :as t]
[minimax.objects.group :as obj.group]
[minimax.objects.mesh :as obj.mesh]
[minimax.util.scene :as util.scene])
(:import (org.joml Matrix4f)
(org... |
fa677d93f9079826372f60b9705e3706b111863af8cc19f1dc60595c924d36a9 | AbstractMachinesLab/caramel | lsp_gen.ml | module Typescript = Typescript
module Ocaml = Ocaml
module Cinaps = Cinaps
module Markdown = Markdown
let print_ml = Cinaps.print_ml
let print_mli = Cinaps.print_mli
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/lsp/bin/lsp_gen.ml | ocaml | module Typescript = Typescript
module Ocaml = Ocaml
module Cinaps = Cinaps
module Markdown = Markdown
let print_ml = Cinaps.print_ml
let print_mli = Cinaps.print_mli
| |
df9e09a095f4a9d512944c698fcb6d6632fb4ebc3e9397e2f56c71388104d908 | michiakig/sicp | ex-4.16-internal-defines.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 4 Section 1 The Metacircular Evaluator
;;;; SECTION 4.1.6 Internal Definitions
Exercise 4.16
predicates and selectors for " regular " definitions like ( define a 1 )
(define (define? e) (tagged-list? e 'define))
(define (define-var e) (cadr e))
(de... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch4/ex-4.16-internal-defines.scm | scheme | Structure and Interpretation of Computer Programs
SECTION 4.1.6 Internal Definitions
and procedure definition syntactic sugar (define (foo x) ...)
(b) - implementation of the method for interpreting internal definitions
procedure is created, not when it is applied | Chapter 4 Section 1 The Metacircular Evaluator
Exercise 4.16
predicates and selectors for " regular " definitions like ( define a 1 )
(define (define? e) (tagged-list? e 'define))
(define (define-var e) (cadr e))
(define (define-exp e) (caddr e))
(define (proc-define? e) (list? (cadr e)))
(define (proc-define... |
e0196bc665466ba5512e022d4404a6ef4e622b0bcbecd8eb2125a617210ae2b0 | EFanZh/EOPL-Exercises | exercise-7.20.rkt | #lang eopl
;; Exercise 7.20 [★★] Modify the unifier so that it calls apply-subst-to-type only on type variables, rather than on
;; its arguments.
;; Grammar.
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-7.20.rkt | racket | Exercise 7.20 [★★] Modify the unifier so that it calls apply-subst-to-type only on type variables, rather than on
its arguments.
Grammar.
Data structures - expressed values.
Data structures - environment.
Data structures - type environment.
Data structures - substitution.
Data structures - answer.
Inferrer.
I... | #lang eopl
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
[number ("-" digit (arbno digit)) number]))
(define the-grammar
'([program (e... |
7e94f5ac0cb363e020f69a5915851a6970574b4828fc61f88f3ef859ec2550cf | mabragor/llvm-bitcode | llvm-bitcode-reader.lisp |
(in-package llvm-bitcode)
(cl-interpol:enable-interpol-syntax)
;; OK, let's gradually grow this file, so that at each stage we can interactively test
;; what we add.
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-enum block-ids
(block-info 1) (module first-application-block-id) paramattr param... | null | https://raw.githubusercontent.com/mabragor/llvm-bitcode/ee275ab5a6f37b1a4635dbca5b8c71f6a1f183b3/llvm-bitcode-reader.lisp | lisp | OK, let's gradually grow this file, so that at each stage we can interactively test
what we add.
Maybe ERRORing is the default behavior -- I shouldn't explicitly write it down
TODO : numbers (codes) of blocks are defined elsewhere
TODO : global cleanup upon exit from this routine
:on-repeat :error :on-undefined-r... |
(in-package llvm-bitcode)
(cl-interpol:enable-interpol-syntax)
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-enum block-ids
(block-info 1) (module first-application-block-id) paramattr paramattr-group constants function
identification value-symtab metadata metadata-attachment
type use... |
0ee9ec4ec4fdcca2a12f9f1fbbd8e1807c063dd8b3a06ea28458709ef7c3132a | rschlaikjer/erlang-atrace-flamegraphs | aflame_sup.erl | -module(aflame_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
%%====================================================================
%% API functions
%%====================================================================
start_lin... | null | https://raw.githubusercontent.com/rschlaikjer/erlang-atrace-flamegraphs/e1818100c9cae4eedf6d37c6ee2b094312938c8f/src/aflame_sup.erl | erlang | API
Supervisor callbacks
====================================================================
API functions
====================================================================
====================================================================
Supervisor callbacks
=================================================... | -module(aflame_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
Children = [
{
aflame_pars... |
b8117a10246fd03bb7d48c3b7662da37330c3abbd06302f067686d3cbdb52757 | Clozure/ccl-tests | subtypep-real.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Feb 18 18:38:55 2003
Contains : Tests of SUBTYPEP on REAL types .
(in-package :cl-test)
(compile-and-load "types-aux.lsp")
SUBTYPEP on real types
(deftest subtypep.real.1
(loop for tp1 in '((real 10) (real 10 *)
(real 10 20)
(real (10) 20... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/subtypep-real.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Tue Feb 18 18:38:55 2003
Contains : Tests of SUBTYPEP on REAL types .
(in-package :cl-test)
(compile-and-load "types-aux.lsp")
SUBTYPEP on real types
(deftest subtypep.real.1
(loop for tp1 in '((real 10) (real 10 *)
(real 10 20)
(real (10) 20)
(real 10 (20))
... |
268b699dd8e4bffb5969287dc45541c2a23df148b2bf397501654aab16320baa | input-output-hk/rscoin-haskell | UserCommons.hs | # LANGUAGE ViewPatterns #
module Bench.RSCoin.UserCommons
( benchUserTransactions
, executeTransaction
, finishBankPeriod
, initializeBank
, initializeUser
, userThread
, userThreadWithPath
) where
import Control.Lens ((^.))
impor... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/bench/Bench/RSCoin/UserCommons.hs | haskell | | Finishes current bank period.
| Create user in `bankMode` and send coins to every user.
| Do `txNum` transactions to random address. | # LANGUAGE ViewPatterns #
module Bench.RSCoin.UserCommons
( benchUserTransactions
, executeTransaction
, finishBankPeriod
, initializeBank
, initializeUser
, userThread
, userThreadWithPath
) where
import Control.Lens ((^.))
impor... |
45779593d01c33a4708144e06cb75b198a5e978ed9623d66d82897a1c553f445 | ygmpkk/house | ParseUtils.hs | -- #hide
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.ParseUtils
Copyright : ( c ) The GHC Team , 1997 - 2000
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portabi... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/haskell-src/Language/Haskell/ParseUtils.hs | haskell | #hide
---------------------------------------------------------------------------
|
Module : Language.Haskell.ParseUtils
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------... | Copyright : ( c ) The GHC Team , 1997 - 2000
Utilities for the parser .
module Language.Haskell.ParseUtils (
HsType - > P ( HsName,[HsType ] )
HsExp - > [ HsFieldUpdate ] - > P HsExp
HsQualType - > P ( HsContext , HsName,[HsName ] )
HsQualType - > P ( HsContext , HsName,[HsName ] )
HsQualType - > P... |
b7357b6ad0ffda583263ebd4516ce8299011e77fb2b65c1307d12aca267b12ea | haroldcarr/learn-haskell-coq-ml-etc | Z_FullPolySpec.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Z_FullPolySpec where
import Z_FullPoly.Core
import Z_FullPoly.Syntax
------------------------------------------------------------------------------
import Protolude
import Test.Hspec
spec :: Spec
spec = ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/f2ce69e9f80a32dc12de2b0d6bfbbcdc32534792/foundations/book/2002-TAPL-2005-ATAPL/tapl/test/Z_FullPolySpec.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------- | # LANGUAGE NoImplicitPrelude #
module Z_FullPolySpec where
import Z_FullPoly.Core
import Z_FullPoly.Syntax
import Protolude
import Test.Hspec
spec :: Spec
spec = describe "Z_FullPoly"
eval1Test
eval1Test :: Spec
eval1Test = describe "eval1" $
it "1" $
same a termSubst... |
3d757ab08ba6df43de170fa6951f9768a23dec53a609b316d76654447b7cfed8 | ghcjs/jsaddle-dom | Window.hs | module JSDOM.Custom.Window (
module Generated
, openDatabase
) where
import Prelude ()
import Prelude.Compat
import Control.Monad.IO.Class (MonadIO(..))
import JSDOM.Types
(withCallback, Callback(..), MonadDOM, ToJSString, Database, DatabaseCallback(..))
import JSDOM.Generated.Window as Generated hiding... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Custom/Window.hs | haskell | module JSDOM.Custom.Window (
module Generated
, openDatabase
) where
import Prelude ()
import Prelude.Compat
import Control.Monad.IO.Class (MonadIO(..))
import JSDOM.Types
(withCallback, Callback(..), MonadDOM, ToJSString, Database, DatabaseCallback(..))
import JSDOM.Generated.Window as Generated hiding... | |
d1de2895ae1afbde2def672c704f56e043d5680020e53c539c7e5a2edc62c6b9 | lolepezy/rpki-prover | RrdpPerf.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLabels #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE QuasiQuotes #-}
import Colog hiding (extract)
import Colog
import Control.Concurrent.STM
import Control.Lens ((^.), (&))
import Control.Monad
import ... | null | https://raw.githubusercontent.com/lolepezy/rpki-prover/1dfcc7e947460777ea952d99c9001aafeb51c37f/perf/rrdp/RrdpPerf.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE OverloadedLabels #
# LANGUAGE QuasiQuotes #
testDeltaLoad
testSnapshotLoad
clean up tmp directory if it's not empty
Set capabilities to the values from the CLI or to all available CPUs,
(disregard the HT issue for now it needs more testing).
tested cases it seems ... | # LANGUAGE RecordWildCards #
import Colog hiding (extract)
import Colog
import Control.Concurrent.STM
import Control.Lens ((^.), (&))
import Control.Monad
import Control.Monad.IO.Class
import Control.Lens ((^.))
import Data.... |
c1a1626a4d9a3e3ebda07f9d6bd33b29a7a2f5149e70c7d1c9135a839313b864 | langston-barrett/CoverTranslator | MyPrelude.hs | module MyPrelude where
import Property
{- Prelude -}
my_null :: [a] -> Bool
my_null [] = True
my_null (x:xs) = False
my_append :: [a] -> [a] -> [a]
my_append [] ys = ys
my_append (x:xs) ys = x : my_append xs ys
-- naive implementation of reverse
my_reverse :: [a] -> [a]
my_reverse [] = []
my_reverse (x:... | null | https://raw.githubusercontent.com/langston-barrett/CoverTranslator/4172bef9f4eede7e45dc002a70bf8c6dd9a56b5c/examples/queue/MyPrelude.hs | haskell | Prelude
naive implementation of reverse
End Prelude | module MyPrelude where
import Property
my_null :: [a] -> Bool
my_null [] = True
my_null (x:xs) = False
my_append :: [a] -> [a] -> [a]
my_append [] ys = ys
my_append (x:xs) ys = x : my_append xs ys
my_reverse :: [a] -> [a]
my_reverse [] = []
my_reverse (x:xs) = my_append (my_reverse xs) [x]
prop_my_appe... |
19a28f8890e8faee4568afca161e97ae29748e665a5269371d08e67bbc3b93d2 | LambdaHack/LambdaHack | StartM.hs | -- | Operations for starting and restarting the game.
module Game.LambdaHack.Server.StartM
( initPer, reinitGame, gameReset, applyDebug
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, sampleTrunks, sampleItems
, mapFromFuns, resetFactions, populateDungeon, findEntryPoss
#endif
) where
import Prelude ()
... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/d1c429d729c503790c44dca43a8e57ae6354f801/engine-src/Game/LambdaHack/Server/StartM.hs | haskell | | Operations for starting and restarting the game.
* Internal operations
This state is quite small, fit for transmition to the client.
The biggest part is content, which needs to be updated in clients
at this point to keep them in sync with changes on the server.
Thanks to the following, for any item with not hid... | module Game.LambdaHack.Server.StartM
( initPer, reinitGame, gameReset, applyDebug
#ifdef EXPOSE_INTERNAL
, sampleTrunks, sampleItems
, mapFromFuns, resetFactions, populateDungeon, findEntryPoss
#endif
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Control.Monad.Trans.State.Str... |
a91ab3edecac13deec655abc1b89bf004c25640eb426c437e3895d178bc0b55e | scheme/scsh | tty.scm | ;;; My comments:
- We have a lot of NeXT - specific stuff . More importantly , what is the
Linux , Solaris , and HP - UX specific stuff ?
;;;
;;; - I would suggest totally flushing the ttychars vector from the interface
in favor of individual slots in the TTY - INFO record . Keep the vec
in the implementa... | null | https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/tty.scm | scheme | My comments:
- I would suggest totally flushing the ttychars vector from the interface
hand as being indices into the vector. We could *also* expose the
vector if we liked.
-Olin
Terminal Control for the Scheme Shell
tty-info records
I have to fake out my record package so I can define my very own
MA... | - We have a lot of NeXT - specific stuff . More importantly , what is the
Linux , Solaris , and HP - UX specific stuff ?
in favor of individual slots in the TTY - INFO record . Keep the vec
in the implementation , and define the TTY - INFO : EOL , etc . procs by
Copyright ( c ) 1995 by .
Rehacked ... |
094aac37d66f8a0e804f0d217ae43a0bbdb600496da47492b435b73a4de1eeda | bluegraybox/examples | fizzbuzz_3.erl | #!/usr/local/bin/escript
-mode(compile).
main([]) ->
Out = fizzbuzz(100, 1, []),
print(Out);
main([MaxStr]) ->
{Max, _} = string:to_integer(MaxStr),
Out = fizzbuzz(Max, 1, []),
print(Out).
fizzbuzz(Max, X, Out) when X > Max ->
lists:reverse(Out);
fizzbuzz(Max, X, Out) when ((X rem 3) == 0) an... | null | https://raw.githubusercontent.com/bluegraybox/examples/20f238be10e2e987687d7289b2f4897cc7d95abd/fizzbuzz/fizzbuzz_3.erl | erlang | #!/usr/local/bin/escript
-mode(compile).
main([]) ->
Out = fizzbuzz(100, 1, []),
print(Out);
main([MaxStr]) ->
{Max, _} = string:to_integer(MaxStr),
Out = fizzbuzz(Max, 1, []),
print(Out).
fizzbuzz(Max, X, Out) when X > Max ->
lists:reverse(Out);
fizzbuzz(Max, X, Out) when ((X rem 3) == 0) an... | |
9714130c7f27387f4c2d982bdc91011b69aaff7c411aca9a6f349a8b4204725d | RichiH/git-annex | Kqueue.hs | BSD kqueue file modification notification interface
-
- Copyright 2012 < >
-
- License : BSD-2 - clause
-
- Copyright 2012 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE ForeignFunctionInterface #
module Utility.DirWatcher.Kqueue (
Kqueue,
initKqueue,
stopKqueue,
waitChange,
Change... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/DirWatcher/Kqueue.hs | haskell | Enough information to uniquely identify a file in a directory,
- but not too much.
relative to the parent directory
included to notice file replacements
A directory, and its last known contents.
Builds a map of directories in a tree, possibly pruning some.
- Opens each directory in the tree, and records its cu... | BSD kqueue file modification notification interface
-
- Copyright 2012 < >
-
- License : BSD-2 - clause
-
- Copyright 2012 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE ForeignFunctionInterface #
module Utility.DirWatcher.Kqueue (
Kqueue,
initKqueue,
stopKqueue,
waitChange,
Change... |
150984f3b4348da6ea7ffe476b4eba5715cb55e7678dec3f387f00ab7f70c514 | JoelSanchez/ventas | repl.clj | (ns repl
(:require
[clojure.tools.namespace.repl :as tn]
[mount.core :as mount]
[ventas.system :as system]
[ventas.server :as server]
[compojure.core :refer [GET defroutes]]
[shadow.cljs.devtools.server :as shadow.server]
[shadow.cljs.devtools.api :as shadow.api]
[hiccup.core :as hiccup]
[v... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/dev/clj/repl.clj | clojure | (ns repl
(:require
[clojure.tools.namespace.repl :as tn]
[mount.core :as mount]
[ventas.system :as system]
[ventas.server :as server]
[compojure.core :refer [GET defroutes]]
[shadow.cljs.devtools.server :as shadow.server]
[shadow.cljs.devtools.api :as shadow.api]
[hiccup.core :as hiccup]
[v... | |
cf6f4109943b6b1f6b12159ec22ba799cb53c604c3785c0ecb67e6166a9b1903 | uim/uim | lazy-load.scm | ;;; lazy-load.scm: Lazy IM loading support
;;;
Copyright ( c ) 2005 - 2013 uim Project
;;;
;;; 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 . Redistributions of source code must ... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/lazy-load.scm | scheme | lazy-load.scm: Lazy IM loading support
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the... | Copyright ( c ) 2005 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
21553145a59bcc9353ac8aa93c5100e5c947a73ca30362f6c900c215491e04da | mflatt/sirmail | repl.rkt | #lang racket/base
(require racket/gui/base
racket/class
racket/sandbox
syntax/modread
pict
pict/snip)
(provide execute-message-repls)
;; previous evaluation status:
(struct state (texts ; old result, to enable a no-op shortcut
kinds ; also old result
... | null | https://raw.githubusercontent.com/mflatt/sirmail/5a08636d126ea04b5c903ab42a6e7eb2b143d864/sirmail/repl.rkt | racket | previous evaluation status:
old result, to enable a no-op shortcut
also old result
custodian to shut down
represents a change to message content due to evaluation:
Check for changes between ```s, and adjust results in the editor
via evaluation as needed
No change to code; same state
Failure thunk:
get all seq... | #lang racket/base
(require racket/gui/base
racket/class
racket/sandbox
syntax/modread
pict
pict/snip)
(provide execute-message-repls)
(struct insert (start end editor new?))
(define (execute-message-repls editor show-error call-as-background start-pos s)
(define p (ope... |
1b3b9b886e72974b12d405391e7f4659203fcf741f1ca62aa60de69b9ec717bc | generateme/cljplot | scale.clj | (ns cljplot.scale
(:require [fastmath.core :as m]
[fastmath.interpolation :as i]
[fastmath.stats :as s]
[java-time :as dt])
(:import [clojure.lang IFn]
[java.time LocalDateTime]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive... | null | https://raw.githubusercontent.com/generateme/cljplot/1eb865439653c95940be18421298c574b7ce8db6/src/cljplot/scale.clj | clojure | continuous -> continuous
How much millis per each duration
date time data set
continuous->discrete
ordinal
inverse
ticks
scale/ticks factory
recalculate everything, keep format
recalculate ticks | (ns cljplot.scale
(:require [fastmath.core :as m]
[fastmath.interpolation :as i]
[fastmath.stats :as s]
[java-time :as dt])
(:import [clojure.lang IFn]
[java.time LocalDateTime]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive... |
56b90f7b9d5d49d6dd012c996c63c610bdd2463ed4614a4ff742f3b95309a29f | aantron/markup.ml | error.ml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
open Common
type t =
[ `Decoding_error of string * string
| `Bad_token of string * string * string
| `Unexpected_eoi of string
| `Bad_document of string
... | null | https://raw.githubusercontent.com/aantron/markup.ml/420aaa3d38d90ed84d1d7157840f7df5f3b5b349/src/error.ml | ocaml | This file is part of Markup.ml , released under the MIT license . See
LICENSE.md for details , or visit .
LICENSE.md for details, or visit . *)
open Common
type t =
[ `Decoding_error of string * string
| `Bad_token of string * string * string
| `Unexpected_eoi of string
| `Bad_document of string
... | |
271a4a804d7a96d9068360a910c3ce45e8b16be0f71e38faaf25ce6bbd4c6129 | mcapodici/badlanguage | Data.hs | module Parser.Data where
import Data.Text (Text)
data Operator
= Add
| Multiply
| And
| Or
| If
| Set
| Get
| Do
| Eq
| Neq
| While
| Print
| Input
deriving Show
data Expression
= Sub Operator [Expression]
| Terminal LTerminal
deriving Show
data LTermi... | null | https://raw.githubusercontent.com/mcapodici/badlanguage/dcf4662907671a9eb00ba5c0be98de9e81c7d8da/src/Parser/Data.hs | haskell | module Parser.Data where
import Data.Text (Text)
data Operator
= Add
| Multiply
| And
| Or
| If
| Set
| Get
| Do
| Eq
| Neq
| While
| Print
| Input
deriving Show
data Expression
= Sub Operator [Expression]
| Terminal LTerminal
deriving Show
data LTermi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.