_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 |
|---|---|---|---|---|---|---|---|---|
73d24817c351a99c4b951d7b20dacf6886895377ff51b93e7843cbecdafd74ff | wireless-net/erlang-nommu | supervisor_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2014 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/supervisor_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 1996 - 2014 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(supervisor_SUITE).
-include_lib("... |
c319c9b5df031a531ea4e08f071c7341d1953da631390f9176b318d5baee7c68 | cmeiklejohn/riak_pg | riak_pg_delete_fsm.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 . 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 ... | null | https://raw.githubusercontent.com/cmeiklejohn/riak_pg/32d46bc1909144cea93b8b98a652a00f6520ffdb/src/riak_pg_delete_fsm.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 . 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 OF ANY
@author < >
2013 .
... |
6b13b65a4f27d951ab4d958865363fcdb21ef70a2cab97294ae78f0b793eee22 | Bannerets/camlproto | Err.ml | open! Base
open Printf
module Parse = struct
type t' =
| BangInPartAppl
| UnderscoreInConstrAppl
| UnterminatedComment
| OcamllexError of string
| MenhirError
type t = Loc.t * t'
exception Err of t
let err ltuple t = raise (Err (Loc.make ltuple, t))
let show_t' = function
| BangIn... | null | https://raw.githubusercontent.com/Bannerets/camlproto/de41d876e00d69598dd20ca8953eda17ce999332/src/tl/lib/Err.ml | ocaml | open! Base
open Printf
module Parse = struct
type t' =
| BangInPartAppl
| UnderscoreInConstrAppl
| UnterminatedComment
| OcamllexError of string
| MenhirError
type t = Loc.t * t'
exception Err of t
let err ltuple t = raise (Err (Loc.make ltuple, t))
let show_t' = function
| BangIn... | |
d8d66bc0ce903886e5c6f45e5b55440cdd258c3bd6d72c8b3c867e34f1c4a00e | degree9/uikit-hl | icon.cljs | (ns uikit-hl.icon
(:require [hoplon.core :as h]
[uikit-hl.core :as uk]
["uikit/dist/js/uikit-icons" :as icons]))
Init UIkit Icons ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
(.use uk/uikit icons)
;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/icon.cljs | clojure | ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
| (ns uikit-hl.icon
(:require [hoplon.core :as h]
[uikit-hl.core :as uk]
["uikit/dist/js/uikit-icons" :as icons]))
(.use uk/uikit icons)
(defmulti uk-icon! h/kw-dispatcher :default ::default)
(defn format-icon [icon]
(str "uk-icon-" icon))
(defmethod h/do! ::default
[elem kw v]
(uk-ico... |
4dcaf99cd03fba7213ffb52da141e2431cf697c361133bb21db9f2e2a4e51d9a | angavrilov/ecl-compute | loop-level.lisp | ;;; -*- mode:lisp; indent-tabs-mode: nil; -*-
(in-package fast-compute)
(use-std-readtable)
(defparameter *minlevel-cache* (make-hash-table))
Level comparison ; NIL = infinity
(defun min-level (a b)
(cond
((null a) b)
((null b) a)
(t (min a b))))
(defun level< (a b)
(and a (or (null b) (< a b))))... | null | https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/expr/loop-level.lisp | lisp | -*- mode:lisp; indent-tabs-mode: nil; -*-
NIL = infinity
Active loop level calculation
Split multiple-arity sums and products by loop level |
(in-package fast-compute)
(use-std-readtable)
(defparameter *minlevel-cache* (make-hash-table))
(defun min-level (a b)
(cond
((null a) b)
((null b) a)
(t (min a b))))
(defun level< (a b)
(and a (or (null b) (< a b))))
(defun level> (a b)
(and b (or (null a) (> a b))))
(defun temporary-level (ex... |
f2464c398e84bda5c5f60a530d7d3ef586d5510b1316cf1a514c77eb4e98e51a | dmitryvk/sbcl-win32-threads | shared.lisp | ;;;; stuff which is not specific to any particular build phase, but
;;;; used by most of them
;;;;
Note : It 's specifically not used when bootstrapping PCL , because
;;;; we do SAVE-LISP after that, and we don't want to save extraneous
;;;; bootstrapping machinery into the frozen image which will
;;;; subsequently b... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/cold/shared.lisp | lisp | stuff which is not specific to any particular build phase, but
used by most of them
we do SAVE-LISP after that, and we don't want to save extraneous
bootstrapping machinery into the frozen image which will
subsequently be used as the mother of all Lisp sessions.
more information.
public domain. The software is... | Note : It 's specifically not used when bootstrapping PCL , because
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
SB - COLD holds stuff used to build the initial SBCL ... |
09f217cc681d8e61dbbbebd1b36d851f2e49f02bba26071c9a83b0afeb5c5dba | imandra-ai/imandra-ros | pcl_msgs_to_json.ml | open Json_utils;;
open Basic_types_to_json;;
open Ros_messages.Pcl_msgs;;
let modelCoefficients_to_json x = [
( "modelCoefficients_header" , x.modelCoefficients_header |> Std_msgs_to_json.header_to_json );
( "modelCoefficients_values" , x.modelCoefficients_values |> (mklist float32_to_json) );
] |> assoc_f... | null | https://raw.githubusercontent.com/imandra-ai/imandra-ros/e1380c267ee319dd4f86c4b54e0b270bc0738796/imandra_model/src-messages-pp/pcl_msgs_to_json.ml | ocaml | open Json_utils;;
open Basic_types_to_json;;
open Ros_messages.Pcl_msgs;;
let modelCoefficients_to_json x = [
( "modelCoefficients_header" , x.modelCoefficients_header |> Std_msgs_to_json.header_to_json );
( "modelCoefficients_values" , x.modelCoefficients_values |> (mklist float32_to_json) );
] |> assoc_f... | |
c25397da160edda5fd31afa2b94491c7cab388094ab78188b33183520072e68e | ghc/ghc | power.hs | module Main where
foreign import ccall "power2" power2 :: Int -> Int
main = print $ power2 4
| null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/testsuite/tests/rts/linker/T11223/power.hs | haskell | module Main where
foreign import ccall "power2" power2 :: Int -> Int
main = print $ power2 4
| |
63a909d8d37234917c01a5056c56dbbd7839788a2cdc8544296430a3e0d8641b | victorvianna/mini-gcc | ertlinterp.mli |
* { 2 Interprète de code ERTL }
val program: Ertltree.file -> int64
* interprète un programme ERTL , à partir de la fonction [ main ] ;
renvoie la valeur renvoyée par [ main ]
renvoie la valeur renvoyée par [main] *)
| null | https://raw.githubusercontent.com/victorvianna/mini-gcc/04659816d0a1097ae12b57243572fff9e91c0b13/ertlinterp.mli | ocaml |
* { 2 Interprète de code ERTL }
val program: Ertltree.file -> int64
* interprète un programme ERTL , à partir de la fonction [ main ] ;
renvoie la valeur renvoyée par [ main ]
renvoie la valeur renvoyée par [main] *)
| |
3cbfd1e136794111e6217bfd914e5747559816585eff7e8cbced864fdc95553f | OCamlPro/ez_api | ezReq.ml | (**************************************************************************)
(* *)
Copyright 2018 - 2022 OCamlPro
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/ez_api/5253f7dd8936e923290aa969ee43ebd3dc6fce2d/src/request/js/nodejs/ezReq.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2018 - 2022 OCamlPro
GNU Lesser General Public License version 2.1 , with the special
include EzNodeJS
|
5cef467c00c47f5b1a904a47baa7c49f3473282bfbe30af469b02d65945942ca | VisionsGlobalEmpowerment/webchange | icon_presentation.cljs | (ns webchange.ui-framework.components.icon.icon-presentation)
(def data
[:svg {:width "24"
:height "24"
:viewBox "0 0 24 24"
:stroke "#D99BFF"
:xmlns ""
:class-name "stroke-colored"
:fill "none" :stroke-width "2" :stroke-linecap "round"... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fba105e71bc3bf196bcb5eeb900f2742cd4f964c/src/cljs/webchange/ui_framework/components/icon/icon_presentation.cljs | clojure | (ns webchange.ui-framework.components.icon.icon-presentation)
(def data
[:svg {:width "24"
:height "24"
:viewBox "0 0 24 24"
:stroke "#D99BFF"
:xmlns ""
:class-name "stroke-colored"
:fill "none" :stroke-width "2" :stroke-linecap "round"... | |
799a5f8323cbc26f257f2554a5166f6005df3e1e23af0f69f80a0333aa9a0568 | basho/riak_test | riak_test_lager_backend.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/src/riak_test_lager_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 permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(riak_test_lager_backen... |
20a15522bfb9861a5c9b85b40c6427b4e60ce3e3777d8b3678fb8b9baaf23e41 | shayne-fletcher/zen | poly_var.ml | " It 's an FVar , , but not as we know it ... "
type poly_var =
| Nil
| W of int
| Num of float
| Str of string
| Bool of bool
| Array of (poly_var list*int*int)
;;
let poly_var_is_empty : poly_var -> bool =
fun x -> x = Nil
;;
exception Poly_var_cast_error of string ;;
let poly_var_as... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/cpp/poly_var/poly_var.ml | ocaml | Test
Test parser | " It 's an FVar , , but not as we know it ... "
type poly_var =
| Nil
| W of int
| Num of float
| Str of string
| Bool of bool
| Array of (poly_var list*int*int)
;;
let poly_var_is_empty : poly_var -> bool =
fun x -> x = Nil
;;
exception Poly_var_cast_error of string ;;
let poly_var_as... |
8dcbb45a26c84987aa87fdc7ea33bec1b97c51ef1a682607cb20f9174b88e554 | rurban/clisp | loop.lisp | ;; ANSI CL Loop
( LOOP { loop - clause } * ) , CLtL2 p. 163,709 - 747
;; <-1.html>
;; <>
1991 - 2004
1999 - 2011 , 2017
(in-package "COMMON-LISP")
(export '(loop loop-finish))
(pushnew ':loop *features*)
(in-package "SYSTEM")
;;; ---- Parser auxiliary functions ----
;; (loop-keywordp obj) determines wheth... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/loop.lisp | lisp | ANSI CL Loop
<-1.html>
<>
---- Parser auxiliary functions ----
(loop-keywordp obj) determines whether OBJ is a loop keyword,
<-1-1-2.html>
The entire form (LOOP ...).
(loop-syntax-error loop-keyword) reports a syntax error.
---- Destructuring ----
<-1-1-7.html>
(destructure-vars pattern) returns the list of ... | ( LOOP { loop - clause } * ) , CLtL2 p. 163,709 - 747
1991 - 2004
1999 - 2011 , 2017
(in-package "COMMON-LISP")
(export '(loop loop-finish))
(pushnew ':loop *features*)
(in-package "SYSTEM")
and then returns the appropriate unique symbol , otherwise NIL .
(defun loop-keywordp (obj)
(and (symbolp obj)
... |
258947f2492bb9f4482c1072a56fd8a7e57ebf650490bd1d87023d9f22813031 | vii/teepeedee2 | superquote.lisp | (in-package #:tpd2.lib)
(defmacro unquote (form)
(warn "Not in a superquote form: ~A" form)
form)
(defmacro unquote-splice (form)
(warn "Not in a superquote form: ~A" form)
form)
(defun superquote-function-go (form)
(typecase form
(list (case (first form)
(unquote-splice (second form))
... | null | https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/lib/superquote.lisp | lisp | (in-package #:tpd2.lib)
(defmacro unquote (form)
(warn "Not in a superquote form: ~A" form)
form)
(defmacro unquote-splice (form)
(warn "Not in a superquote form: ~A" form)
form)
(defun superquote-function-go (form)
(typecase form
(list (case (first form)
(unquote-splice (second form))
... | |
354691290a494c4b7c71820b433f6e8d77f5b2e2b468d7fb3a7392b3d181c2fc | clojure-interop/aws-api | EncodingSchemeEnum.clj | (ns com.amazonaws.util.EncodingSchemeEnum
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util EncodingSchemeEnum]))
(def BASE16
"Enum Constant.
type: com.amazonaws.util.EncodingSchemeEnum"
EncodingSchemeEnum/BASE16)
(def BASE32
"Enum Constant.
type: com.amazonaws.util.Encodin... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.util/src/com/amazonaws/util/EncodingSchemeEnum.clj | clojure | (ns com.amazonaws.util.EncodingSchemeEnum
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util EncodingSchemeEnum]))
(def BASE16
"Enum Constant.
type: com.amazonaws.util.EncodingSchemeEnum"
EncodingSchemeEnum/BASE16)
(def BASE32
"Enum Constant.
type: com.amazonaws.util.Encodin... | |
3465f3d5dec6730f395e529df71eeecab7326c8b9c0a8f8736eb4eabbfa62fdc | juhakaremo/clj-containment-matchers | diff.clj | (ns clj-containment-matchers.diff
(:require [clojure.set :as set]))
(declare diff)
(defn- value-mismatch [x y] [x y nil])
(defn- value-match [x y] [nil nil x])
(defn- diff-map [x y]
(let [diff-by-key (fn [k]
(let [[x* y* xy] (diff (get x k) (get y k))]
[(when x* {k ... | null | https://raw.githubusercontent.com/juhakaremo/clj-containment-matchers/081b44f6de2305d93b3f4158562baeab1f5cec28/src/clj_containment_matchers/diff.clj | clojure | (ns clj-containment-matchers.diff
(:require [clojure.set :as set]))
(declare diff)
(defn- value-mismatch [x y] [x y nil])
(defn- value-match [x y] [nil nil x])
(defn- diff-map [x y]
(let [diff-by-key (fn [k]
(let [[x* y* xy] (diff (get x k) (get y k))]
[(when x* {k ... | |
b1461bcd78725162843182422ddef139bf92efe5a7d66ebcd166f914c9b35cef | arttuka/reagent-material-ui | man_2_two_tone.cljs | (ns reagent-mui.icons.man-2-two-tone
"Imports @mui/icons-material/Man2TwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def man-2-two-tone (create-svg-ico... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/man_2_two_tone.cljs | clojure | (ns reagent-mui.icons.man-2-two-tone
"Imports @mui/icons-material/Man2TwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def man-2-two-tone (create-svg-ico... | |
105f008c1eb2e6703e3c3e9b450d355b13fecb6e16ecc37f2a78428e2cfba14d | sbcl/sbcl | encap.impure.lisp |
(defun tryit (fname)
(sb-int:encapsulate
fname
'foomfa
(lambda (realfun &rest args)
(apply realfun args)))
(assert (sb-int:encapsulated-p fname 'foomfa))
(assert (not (sb-int:encapsulated-p fname 'nope)))
(sb-int:unencapsulate fname 'no-such-encapsulation)
(assert (sb-int:encapsulated-p fname '... | null | https://raw.githubusercontent.com/sbcl/sbcl/4b2f6c81873de551673d3887659f14bbce9812d7/tests/encap.impure.lisp | lisp |
(defun tryit (fname)
(sb-int:encapsulate
fname
'foomfa
(lambda (realfun &rest args)
(apply realfun args)))
(assert (sb-int:encapsulated-p fname 'foomfa))
(assert (not (sb-int:encapsulated-p fname 'nope)))
(sb-int:unencapsulate fname 'no-such-encapsulation)
(assert (sb-int:encapsulated-p fname '... | |
3e49a2e1c1a478f83edcdcf55a8581e8689d17f2a5cd259085c5db27404ecdeb | nasa/PRECiSA | MapRealPVSLangASTTest.hs | -- Notices:
--
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
-- Disclaimers
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO... | null | https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/tests/MapRealPVSLangASTTest.hs | haskell | Notices:
Disclaimers | Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT... |
f73b142e74d10319bc19f2f14f1169747ecbdc50c62f96bc87d5a10a6e3d9014 | EgorDm/fp-pacman | World.hs | module Game.Structure.World (
World(..),
Updateable(..),
Renderable(..),
Resetable(..),
addAgent,
addAgents
) where
import Debug.Trace
import Data.List
import System.Random
import Engine.Graphics.Base
import Engine.Core.Base
import Game.Structure.Internal(World(..))
import Game.Input.Base
impor... | null | https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Game/Structure/World.hs | haskell | Data structures
Classes
Instances
Functions
| Adds agent to world. Also sets position based on the markers in the level
| Add multiple agents to the world | module Game.Structure.World (
World(..),
Updateable(..),
Renderable(..),
Resetable(..),
addAgent,
addAgents
) where
import Debug.Trace
import Data.List
import System.Random
import Engine.Graphics.Base
import Engine.Core.Base
import Game.Structure.Internal(World(..))
import Game.Input.Base
impor... |
3865362c9dfa04a894a6c3bf822cb69da49ef803a8e8d447a2051ac1a4b6519a | Vetd-Inc/vetd-app | stack_renewal_reminders.cljs | (ns vetd-admin.pages.stack-renewal-reminders
(:require [vetd-app.buyers.components :as bc]
[vetd-app.common.components :as cc]
[vetd-app.ui :as ui]
[vetd-app.util :as util]
[vetd-app.docs :as docs]
[reagent.core :as r]
[re-frame.core :as rf]
... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/admin/vetd_admin/pages/stack_renewal_reminders.cljs | clojure | Components | (ns vetd-admin.pages.stack-renewal-reminders
(:require [vetd-app.buyers.components :as bc]
[vetd-app.common.components :as cc]
[vetd-app.ui :as ui]
[vetd-app.util :as util]
[vetd-app.docs :as docs]
[reagent.core :as r]
[re-frame.core :as rf]
... |
c432507922dec9527bc9526b25b1c0dac41b15eb3b162265df1c2cc6e42849a1 | braintripping/lark | coords.cljs | (ns lark.structure.coords
(:refer-clojure :exclude [- + > < >= <= =])
(:require [clojure.core :as core]
[clojure.spec.alpha :as s]
[spell-spec.alpha :as ss]
[lark.tree.reader :as rd]
[lark.tree.node :as n]))
(s/def ::coord (s/and vector?
(s/coll... | null | https://raw.githubusercontent.com/braintripping/lark/95038a823068681c39453c46a309a3514cf48800/tools/test/lark/structure/coords.cljs | clojure | pos is outside of base node
pos has been adjusted within a newline node, needs to move to correct line | (ns lark.structure.coords
(:refer-clojure :exclude [- + > < >= <= =])
(:require [clojure.core :as core]
[clojure.spec.alpha :as s]
[spell-spec.alpha :as ss]
[lark.tree.reader :as rd]
[lark.tree.node :as n]))
(s/def ::coord (s/and vector?
(s/coll... |
fb732018bfb5be0826b408b65c4af17d51749959b65552e4f49576b2b3866de8 | disteph/cdsat | basic.mli | (*****************)
(* Basic modules *)
(*****************)
open Format
open Interfaces_basic
module IntSort : sig
include PHCons
val reveal : t -> int*Sorts.t
val build : int*Sorts.t -> t
val isDefined : t -> bool
end
module IntMap : Map.S with type key = int
module IdMon : MonadType with type 'a t = 'a... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/top.mld/basic.mli | ocaml | ***************
Basic modules
*************** |
open Format
open Interfaces_basic
module IntSort : sig
include PHCons
val reveal : t -> int*Sorts.t
val build : int*Sorts.t -> t
val isDefined : t -> bool
end
module IntMap : Map.S with type key = int
module IdMon : MonadType with type 'a t = 'a
module MakeCollection
(OT: sig
type... |
1437593319405448b47b24aacad332b186879f9185578e39dc341136ad6863d7 | gedge-platform/gedge-platform | prometheus_vm_memory_collector.erl | %% @doc
%% Collects information about memory dynamically allocated
by the Erlang emulator using
< a href=" / doc / man / erlang.html#memory-0 " >
%% erlang:memory/0
%% </a>, also provides basic (D)ETS statistics.
%%
%% ==Exported metrics==
%% <ul>
%% <li>
%% `erlang_vm_memory_atom_bytes_total{usage="free|us... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/prometheus/src/collectors/vm/prometheus_vm_memory_collector.erl | erlang | @doc
Collects information about memory dynamically allocated
erlang:memory/0
</a>, also provides basic (D)ETS statistics.
==Exported metrics==
<ul>
<li>
`erlang_vm_memory_atom_bytes_total{usage="free|used"}'<br/>
Type: gauge.<br/>
The total amount of memory currently allocated for atoms.
... | by the Erlang emulator using
< a href=" / doc / man / erlang.html#memory-0 " >
The total amount of memory currently allocated for the Erlang processes .
that is not directly related to any Erlang process .
-module(prometheus_vm_memory_collector).
-export([deregister_cleanup/1,
collect_mf/2]).... |
9a373d1f5770dbf275e12bf9d38a9678ffaa0f7ce41fab6a75ccf950364594ff | mfikes/fifth-postulate | ns57.cljs | (ns fifth-postulate.ns57)
(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 (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns57.cljs | clojure | (ns fifth-postulate.ns57)
(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 (xs... | |
52224f30a657e409b1c892527cb658b2af5e09421b2cec776278ce04f32c5964 | clojurecup2014/parade-route | refs.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/refs.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.test-clojure.refs
(:use clojure.test))
|
a745d3072593e08ebc58338f8c22c7409890512872a4ae9ed1540e7bb1792207 | 8c6794b6/haskell-sc-scratch | BankersDeque.hs | # LANGUAGE NoImplicitPrelude #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading
/purely functional data structure/ , by .
This codes contains banker 's deque , from figure 5.2 .
Modul... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/FP/PFDS/Deque/BankersDeque.hs | haskell | | Invariants:
^ Threshold Constant
^ Front
^ Length of front
^ Rear
^ Length of rear | # LANGUAGE NoImplicitPrelude #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading
/purely functional data structure/ , by .
This codes contains banker 's deque , from figure 5.2 .
Modul... |
5c249f2457511b3eacf992e793da469f1dcf129af84a7481c0de7552a6881313 | soulomoon/SICP | Exercise4.64.scm | Exercise 4.64 : mistakenly deletes the outranked - by rule ( 4.4.1 ) from the data base . When he realizes this , he quickly reinstalls it . Unfortunately , he makes a slight change in the rule , and types it in as
; (rule (outranked-by ?staff-person ?boss)
; (or (supervisor ?staff-person ?boss)
; (and (ou... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.64.scm | scheme | (rule (outranked-by ?staff-person ?boss)
(or (supervisor ?staff-person ?boss)
(and (outranked-by ?middle-manager
?boss)
(supervisor ?staff-person
?middle-manager))))
After answering, the system goes into an infinite loop. Explain why. | Exercise 4.64 : mistakenly deletes the outranked - by rule ( 4.4.1 ) from the data base . When he realizes this , he quickly reinstalls it . Unfortunately , he makes a slight change in the rule , and types it in as
Just after types this information into the system , comes by to find out who outranks . He is... |
1d66227c541759b5454916cfac2f1f5fb515f2cefdd95a458104a70ff6c51d8c | Chattered/proplcf | Sequent.hs | # LANGUAGE DeriveFunctor #
-- | Embed a sequent calculus for propositional logic
module Sequent (module Utils
,Sequent, assms, concl, sequent, seqThm
,assume, charge, discharge, weaken
,mp
,inst1, inst2, inst3, instM
,matchMPInst) where
import... | null | https://raw.githubusercontent.com/Chattered/proplcf/dddfb1f5717207c3c65bc6a31619d04db3c14c09/Sequent.hs | haskell | | Embed a sequent calculus for propositional logic
| A sequent has the form Γ ⊦ P
| concl Γ ⊦ P yields P
| Turn a sequent into a theorem by discharging all assumptions
| Turn a theorem into a sequent of no assumptions.
| assume P yields {P} ⊦ P
A conversion to move the mth hypothesis up n places
Add a hypothesi... | # LANGUAGE DeriveFunctor #
module Sequent (module Utils
,Sequent, assms, concl, sequent, seqThm
,assume, charge, discharge, weaken
,mp
,inst1, inst2, inst3, instM
,matchMPInst) where
import Data.List
import Data.Maybe
import qualified Bootstr... |
28685160af9bcc2a920a9588c9642911035eb73fb4a68b5aee0c51f4d40d31dc | matterhorn-chat/matterhorn | ChannelList.hs | module Matterhorn.State.ChannelList
( updateSidebar
, updateWindowTitle
, toggleChannelListVisibility
, showChannelInSidebar
)
where
import Prelude ()
import Matterhorn.Prelude
import Brick.Main ( getVtyHandle, invalidateCache, invalidateCacheEntry )
import qualified Data.HashM... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/56ddbc012685b1e3dc50feca716f63b5d810f37a/src/Matterhorn/State/ChannelList.hs | haskell | # SOURCE #
| Update the sidebar for the specified team state only, or all team
states if not given a specific team ID.
In either case, schedule user status fetches for all users mentioned
in the current team's sidebar. (This should be safe because all
sidebars should contain the same user list.)
Schedule the cur... | module Matterhorn.State.ChannelList
( updateSidebar
, updateWindowTitle
, toggleChannelListVisibility
, showChannelInSidebar
)
where
import Prelude ()
import Matterhorn.Prelude
import Brick.Main ( getVtyHandle, invalidateCache, invalidateCacheEntry )
import qualified Data.HashM... |
4318a6f0efb8787daf91d75c9ae19f7f6f5f1a23bd67df586b62f36f1d33aa51 | codinuum/cca | diffast.ml |
Copyright 2012 - 2022 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/3d97b64a5c23ff97c08455ac604ccb9fed471d91/src/ast/analyzing/diffast.ml | ocaml | let _ = options#set_split_hunk_flag!!!!!
setters
options#set_strip_empty_flag;
"-splithunk", Arg.Unit (fun () -> options#set_split_hunk_flag), "\tsplit delta hunks";!!!!!
output
delta
"-dump:delta:out", Arg.String set_dump_delta_out, "FILE\tdump delta into file";
"-dump:delta:rev", Arg.Unit set_dump_rev_del... |
Copyright 2012 - 2022 Codinuum Software Lab < >
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 wri... |
357798ac440cc6ca136f7652ccb830f3e6a9e483c27e80deefa1101e0434445b | abid-mujtaba/haskell-cas | Fractional.hs | -- | Makes Expr an instance of the Fractional class which gives us access to the (/) division operator.
module Expr.Fractional
(
(/)
)
where
import Expr (Expr(Atom, Inv))
Since Fractional is a sub - class of , needs to be an instance of before it can be an instance of Fractional
instance Frac... | null | https://raw.githubusercontent.com/abid-mujtaba/haskell-cas/077b4b7fb4366818dc1f76348d288bab260be968/src/Expr/Fractional.hs | haskell | | Makes Expr an instance of the Fractional class which gives us access to the (/) division operator. | module Expr.Fractional
(
(/)
)
where
import Expr (Expr(Atom, Inv))
Since Fractional is a sub - class of , needs to be an instance of before it can be an instance of Fractional
instance Fractional Expr where
(/) = divide
fromRational = error "Undefined: Not needed for CAS"
... |
7205884281f89f85e61a052c4aed7942d5c8c5b8c95dd77e0af04e0efeb6e0c8 | Kakadu/fp2022 | helper.ml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Type
exception Malformed of string
let rec print_list to_string = function
| [] -> ()
| h :: t ->
print_string (to_string h);
print_string " ";
print_list to_string t
;;
let rec print_list_newlin... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0eb49bf60d173287607678159465c425cdf699be/SQLyd/lib/helper.ml | ocaml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Type
exception Malformed of string
let rec print_list to_string = function
| [] -> ()
| h :: t ->
print_string (to_string h);
print_string " ";
print_list to_string t
;;
let rec print_list_newlin... | |
9bdd27ab65d97e1f989ebe68df034d25e70f9c7c31af4455a6d853bffe852152 | cky/guile | module-2.scm | ;;; examples/modules/module-2.scm -- Module system demo.
;;; Commentary:
Module 2 of the module demo program .
Author :
Date : 2001 - 05 - 29
;;; Code:
(define-module (module-2))
(export foo bar braz)
(define (foo)
(display "module-2 foo")
(newline))
(define (bar)
(display "module-2 bar")
(newli... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/examples/modules/module-2.scm | scheme | examples/modules/module-2.scm -- Module system demo.
Commentary:
Code:
End of file. |
Module 2 of the module demo program .
Author :
Date : 2001 - 05 - 29
(define-module (module-2))
(export foo bar braz)
(define (foo)
(display "module-2 foo")
(newline))
(define (bar)
(display "module-2 bar")
(newline))
(define (braz)
(display "module-2 braz")
(newline))
|
616a31bffcc29ca4ac05e09a9aaa8dd25db58c5fbae41c7ebf44279a074a84ce | GillianPlatform/Gillian | Cmd.ml | (**************************************************************)
(**************************************************************)
(** GIL Commmands **)
(**************************************************************)
(***********************************************************... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/5087455da889cb52fdf7aa4fb83ca5e943fe5f37/GillianCore/GIL_Syntax/Cmd.ml | ocaml | ************************************************************
************************************************************
* GIL Commmands *
************************************************************
************************************************************
* Skip ... |
module SS = Containers.SS
type logic_bindings_t = string * (string * Expr.t) list [@@deriving yojson]
type 'label t = 'label TypeDef__.cmd =
| Call of
string * Expr.t * Expr.t list * 'label option * logic_bindings_t option
| ECall of string * Expr.t * Expr.t list * 'label option
| Apply of string * Expr... |
da8e8d849d5c48d1aa7f4b958cd22ad664f700ccec373e50e2b586613fadc490 | anurudhp/CPHaskell | b.hs | -- AC
import Control.Arrow ((>>>))
import qualified Data.Set as S
type SetInt = S.Set Int
main :: IO ()
main =
interact $
lines >>> drop 1 >>> process >>> unlines
process :: [String] -> [String]
process [] = []
process (ns : xs) = let n = read ns in solve n (take n xs) : process (drop n xs)
solve :: Int -> ... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/codeforces/1327/b.hs | haskell | AC |
import Control.Arrow ((>>>))
import qualified Data.Set as S
type SetInt = S.Set Int
main :: IO ()
main =
interact $
lines >>> drop 1 >>> process >>> unlines
process :: [String] -> [String]
process [] = []
process (ns : xs) = let n = read ns in solve n (take n xs) : process (drop n xs)
solve :: Int -> [String... |
d2c1a8cb2e1982b3691fea697c60ad5e9fb1fcc1db83aefdb9b432a4e5a2e949 | rubenbarroso/EOPL | 6-checker.scm | (let ((time-stamp "Time-stamp: <2001-05-11 11:00:35 dfried>"))
(eopl:printf "6-checker.scm ~a~%" (substring time-stamp 13 29)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Type Checker ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define type-of-program
(lambda (... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/6-checker.scm | scheme |
; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
these tests either succeed or raise an error
love that abstract interpretation!
object stuff begins here
type env for body and procs
typechecking list expressions ;;;;;;;;;;;;;;;;
making this more flexible can be an exercise.
ditto here.
types of new expressions ;;;;;;;;;;;;;;;;... | (let ((time-stamp "Time-stamp: <2001-05-11 11:00:35 dfried>"))
(eopl:printf "6-checker.scm ~a~%" (substring time-stamp 13 29)))
(define type-of-program
(lambda (pgm)
(cases program pgm
(a-program (c-decls exp)
(statically-elaborate-class-decls! c-decls)
(type-of-expression exp (empty-ten... |
63ba0b90177a13ecba18cba979d926c9b094d32a959d5a6367a8e67d56734d67 | g-andrade/locus | locus_shared_bitarray.erl | Copyright ( c ) 2021 - 2023
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/locus/c731b1a4a819e998c60d90a0484e75e36966aa8c/src/locus_shared_bitarray.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright not... | Copyright ( c ) 2021 - 2023
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
e5a22e013391415f854b1c9df5265e0af85a5cc48fe5b32128927662ccb8091a | uwplse/PUMPKIN-PATCH | factoring.mli | --- The Factoring Component ---
open Constr
open Environ
open Evd
open Stateutils
* Factors are a list of environment - type pairs , where the environment
* contains all necessary assumptions . This is essentially a way
* to avoid DeBruijn problems while reasoning about factors with hypotheses
* that de... | null | https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/core/components/factoring/factoring.mli | ocaml |
* Given a term, if the term is a function with type
* X -> Z, find factors through which it passes
* (e.g., [H : X, F : X -> Y, G : Y -> Z] where trm = G o F)
* Reconstruct factors as a user-friendly list of terms
* Apply factors to reconstruct a single term
| --- The Factoring Component ---
open Constr
open Environ
open Evd
open Stateutils
* Factors are a list of environment - type pairs , where the environment
* contains all necessary assumptions . This is essentially a way
* to avoid DeBruijn problems while reasoning about factors with hypotheses
* that de... |
a0aef13bbb773d044a20c1808c222254ee641a252654d6b756e9cacb5e87c8f8 | Hendrick/avenue | core_test.clj | (ns avenue.core-test
(:require [clojure.test :refer [deftest testing is]]
[compojure.core :refer [GET POST]]
[avenue.core :refer [page xhr form-post check-auth]]))
(defn create-ring-request [uri middleware-params]
(merge {:request-method :get
:uri uri
:params {}}
... | null | https://raw.githubusercontent.com/Hendrick/avenue/e2ab19c56d8cd0e195fd674cb1c1f3466660205a/test/avenue/core_test.clj | clojure | FIXME: this check could probably be stronger
can we find a way to test this without printing to stdout? | (ns avenue.core-test
(:require [clojure.test :refer [deftest testing is]]
[compojure.core :refer [GET POST]]
[avenue.core :refer [page xhr form-post check-auth]]))
(defn create-ring-request [uri middleware-params]
(merge {:request-method :get
:uri uri
:params {}}
... |
2653fa244cce661f541b037ece3382a4c8ad87d26c51940cccd9bde4067b1a82 | gren-lang/compiler | Compile.hs | module Compile
( Artifacts (..),
compile,
)
where
import AST.Canonical qualified as Can
import AST.Optimized qualified as Opt
import AST.Source qualified as Src
import Canonicalize.Module qualified as Canonicalize
import Data.Map qualified as Map
import Data.Name qualified as Name
import Gren.Interface qualifi... | null | https://raw.githubusercontent.com/gren-lang/compiler/dfe645f819a27dcaf8c5bb179a7f5d1590d802b1/compiler/src/Compile.hs | haskell | module Compile
( Artifacts (..),
compile,
)
where
import AST.Canonical qualified as Can
import AST.Optimized qualified as Opt
import AST.Source qualified as Src
import Canonicalize.Module qualified as Canonicalize
import Data.Map qualified as Map
import Data.Name qualified as Name
import Gren.Interface qualifi... | |
efab22e0535c58da5bcd4eb72536d995efb764f515271036647bd9a00e72716b | MrEbbinghaus/Todoish | todo_ws.cljs | (ns todoish.todo-ws
(:require [nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[todoish.models.todo :as todo]
[todoish.ui.components.new-todo-field :as new-todo-field]
[todoish.ui.root :as r]))
(ws/defcard todo-card
(ct.fulcro/fulc... | null | https://raw.githubusercontent.com/MrEbbinghaus/Todoish/42c5a8e575c19937e4ed3332b738e5f35e847f07/src/workspaces/todoish/todo_ws.cljs | clojure | (ns todoish.todo-ws
(:require [nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[todoish.models.todo :as todo]
[todoish.ui.components.new-todo-field :as new-todo-field]
[todoish.ui.root :as r]))
(ws/defcard todo-card
(ct.fulcro/fulc... | |
2dd145796c8b9a17b60ca695547ccd87aa9ac6489b65568000a450babe9c07f7 | tonsky/advent2018 | day6.clj | (ns advent2018.day6
(:require
[clojure.string :as str]
[clojure.set :as set]
[clojure.walk :as walk]
[advent2018.core :refer :all]))
(def input (slurp "inputs/day6"))
(def lines (str/split input #"\n"))
(def coords (map #(-> % (str/split #", ") (->> (mapv parse-long))) lines))
(def min-x (reduce min... | null | https://raw.githubusercontent.com/tonsky/advent2018/6f8d15bf37a150a288e3447df7766c362f7086e9/src/advent2018/day6.clj | clojure | (ns advent2018.day6
(:require
[clojure.string :as str]
[clojure.set :as set]
[clojure.walk :as walk]
[advent2018.core :refer :all]))
(def input (slurp "inputs/day6"))
(def lines (str/split input #"\n"))
(def coords (map #(-> % (str/split #", ") (->> (mapv parse-long))) lines))
(def min-x (reduce min... | |
c62b17b8ee8f5d73c59aead0e5558b4996c38ebc12091d187643e048772d615c | karlhof26/gimp-scheme | mm1-vintage-look.0.3_0.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
; (at your option) any later v... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/4e3a2867f21998c89ecc540f19cf12bcce575312/mm1-vintage-look.0.3_0.scm | scheme | The GIMP -- an image manipulation program
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of... | Copyright ( C ) 1995 and
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
Copyright ( C ) 2008 info[at]mmip.net
(define (mm1-vintage-look img
... |
50867dc7c2990e09d975a2785dd8648d135d72d92537a9c65ea575f0cd1e75dd | kitlang/kit | Binding.hs | module Kit.Compiler.Binding where
import Kit.Ast
{-
Bindings are used as part of each Module's interface; they map names to type
definitions, of which none of the types have been resolved yet. This allows
other modules to look up the type and find a type variable to reference,
which should eventually resolve ... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/Binding.hs | haskell |
Bindings are used as part of each Module's interface; they map names to type
definitions, of which none of the types have been resolved yet. This allows
other modules to look up the type and find a type variable to reference,
which should eventually resolve to the correct type.
Types in these bindings will ... | module Kit.Compiler.Binding where
import Kit.Ast
data Binding a b
= VarBinding (VarDefinition a b)
| FunctionBinding (FunctionDefinition a b)
| TypeBinding (TypeDefinition a b)
| TraitBinding (TraitDefinition a b)
| EnumConstructor (EnumVariant a b)
| RuleSetBinding (RuleSet a b)
| ExprBinding a
| Mod... |
6a4343c3087e0a9ba41948719c8e0738b653c9e8fe45118e6a97d45ddc3523bd | eponai/sulolive | ui.clj | (ns eponai.server.ui
(:require
[eponai.common.ui-namespaces]
[om.next :as om]
[om.dom :as dom]
[datascript.core :as datascript]
[eponai.server.ui.html :as html]
[eponai.common.database :as db]
[eponai.client.parser.merge :as merge]
[eponai.client.parser.mutate]
[eponai.client.parse... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/server/ui.clj | clojure | We don't need to query for datascript/schema since
we've already set up the datascript instance.
The query is static, so we might as well just compute it once. | (ns eponai.server.ui
(:require
[eponai.common.ui-namespaces]
[om.next :as om]
[om.dom :as dom]
[datascript.core :as datascript]
[eponai.server.ui.html :as html]
[eponai.common.database :as db]
[eponai.client.parser.merge :as merge]
[eponai.client.parser.mutate]
[eponai.client.parse... |
9baff1b10b5b9c6d76c8b1229c45d6264329acc7e55019790d9982e8b0949cc2 | static-analysis-engineering/codehawk | jCHTNode.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpoly/jCHTNode.mli | ocaml | jchpre
jchpre | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
aa7c6b8b5ac68f3687ca97070af2b212e46406b1ba2e83365a40681cdc21941b | ghc/testsuite | tcfail049.hs | module ShouldFail where
f x = g x
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail049.hs | haskell | module ShouldFail where
f x = g x
| |
dfb8c5f6bcd4df88fd93434d89bd61af4a88dcffd09c6a32fb44172e0da07199 | jyh/metaprl | itt_int_arith.ml | doc <:doc<
@module[Itt_int_arith]
This module defines @hrefconv[normalizeC] and @hreftactic[arithT].
@noindent @hrefconv[normalizeC] converts polynomials to the canonical form.
@noindent @hreftactic[arithT] proves simple inequalities.
@docoff
-------------------------------------------------------... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_int_arith.ml | ocaml |
Display
******************************************************
* ARITH
******************************************************
unused
let identity x = x
unused
let main_labels = ""::main_labels
else
on_main_subgoals tl
raise (Invalid_argument "Itt_int_arith: branching is not supported yet")
let pos,... | doc <:doc<
@module[Itt_int_arith]
This module defines @hrefconv[normalizeC] and @hreftactic[arithT].
@noindent @hrefconv[normalizeC] converts polynomials to the canonical form.
@noindent @hreftactic[arithT] proves simple inequalities.
@docoff
-------------------------------------------------------... |
a7062f50402361bcbcca25cf493cdf1f2d10e9946a145599afe3c4a0bb351b44 | casperschipper/ocaml-cisp | cisp1.ml | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
type data = {c1: int; p: pitch; c2: int}
let currentState = ref {c1= 0; p= Pitch 0; c2= 0}
let pitchControl3 =
let ( let* ) x f = Reader.bind f x in
let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in
... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/vpnPatch/cisp1.ml | ocaml | create trigger from note On
write state ref
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
turn back into raw midi | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
type data = {c1: int; p: pitch; c2: int}
let currentState = ref {c1= 0; p= Pitch 0; c2= 0}
let pitchControl3 =
let ( let* ) x f = Reader.bind f x in
let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in
... |
82a2cb891e2d49e829af1937ecb2bd9d6b7cf6293eea787ca36ba20fc9d09531 | janestreet/universe | ppx_let_expander.ml | open Base
open Ppxlib
open Ast_builder.Default
module List = struct
include List
let reduce_exn l ~f =
match l with
| [] -> invalid_arg "List.reduce_exn"
| hd :: tl -> fold_left tl ~init:hd ~f
;;
end
module Extension_name = struct
type t =
| Sub
| Sub_open
| Bind
| Bind_open
|... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_let/expander/ppx_let_expander.ml | ocaml | s/rhs/tmp_var
s/lhs/tmp_var
Build expression [both E1 (both E2 (both ...))]
Build pattern [(P1, (P2, ...))]
Temporary hack tentatively detecting that the parser
has expanded `let x : t = e` into `let x : t = (e : t)`.
For reference, here is the relevant part of the parser:
... | open Base
open Ppxlib
open Ast_builder.Default
module List = struct
include List
let reduce_exn l ~f =
match l with
| [] -> invalid_arg "List.reduce_exn"
| hd :: tl -> fold_left tl ~init:hd ~f
;;
end
module Extension_name = struct
type t =
| Sub
| Sub_open
| Bind
| Bind_open
|... |
1492db1e880bb63b43aa0d6096f16a41690bcac649d0561a72aa5cbd3643e178 | cgrand/enliven | model.clj | (ns enliven.html.model
(:require
[clojure.string :as str]
[enliven.text.model :as text]
[enliven.core.lenses :as lens]))
;; html-specific segments
(lens/deflens classes [class-attr classes]
:fetch
(zipmap (re-seq #"\S+" (or class-attr "")) (repeat true))
:putback
(some->> classes (keep (fn [[... | null | https://raw.githubusercontent.com/cgrand/enliven/f40d91bd3ba1b9523ea743cd541bd98e298e2e62/src/enliven/html/model.clj | clojure | html-specific segments
not the right place
not the right place | (ns enliven.html.model
(:require
[clojure.string :as str]
[enliven.text.model :as text]
[enliven.core.lenses :as lens]))
(lens/deflens classes [class-attr classes]
:fetch
(zipmap (re-seq #"\S+" (or class-attr "")) (repeat true))
:putback
(some->> classes (keep (fn [[k v]] (when v k))) seq (st... |
e811a59e4856fdc4ecdb74739812686f6e0a2a96adfa1181305fbd7e0ed2f49b | camfort/camfort | Monad.hs |
Copyright 2016 , , , , 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
distribute... | null | https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/src/Camfort/Specification/Units/Monad.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Defines the monad for the units-of-measure modules
** State Helpers
*** Getters
*** Modifiers
** Runners
------------------------------------------------
helper functions
| Generate a number guaranteed to be unique in the current analysis.
--------------------------------------... |
Copyright 2016 , , , , 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
distribute... |
398626e630bb9e53cbf5fe0700aa3282ecca95135cdb0827ed00b38a0ece50f3 | danieljharvey/mimsa | Utils.hs | module Language.Mimsa.Core.Utils (mapWithIndex, setMapMaybe, mapKeys, filterMapKeys, addNumbersToMap) where
import Data.Bifunctor
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as S
-- I give in, it is time to throw all these things... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/core/src/Language/Mimsa/Core/Utils.hs | haskell | I give in, it is time to throw all these things in a file
useful to break apart maps where
key is a sum type | module Language.Mimsa.Core.Utils (mapWithIndex, setMapMaybe, mapKeys, filterMapKeys, addNumbersToMap) where
import Data.Bifunctor
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as S
mapWithIndex :: (Int -> a -> b) -> [a] -> [b]
map... |
b6442109e8744e0824f2d801f91859388b75d8e2182bc638eb56cfd3e3df3ac9 | rabbitmq/rabbitmq-event-exchange | unit_SUITE.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(unit_SUITE).
-include_lib("common_test/i... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-event-exchange/2fd6cd3ffb704c1cf0c0726c071dbb038844f5af/test/unit_SUITE.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(unit_SUITE).
-include_lib("common_test/include... | |
5d0644a723279fd828ef03e1ee6110713af6c5b587cd3b28dd42a1b24f540580 | flavioc/cl-hurd | copy.lisp |
(asdf:operate 'asdf:load-op 'hurd)
(use-package 'hurd)
;;
;; This file tries to mimick in Lisp the copy.c program
;; from The Hurd Hacking Guide (-guide/hhg.html)
;;
(defun write-block (dst data)
(let ((total (length data))
(total-written 0))
(loop until (= total total-written)
do (let ((err... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/examples/copy.lisp | lisp |
This file tries to mimick in Lisp the copy.c program
from The Hurd Hacking Guide (-guide/hhg.html)
To run:
(copy-file "myfile-a" "myfile-b") |
(asdf:operate 'asdf:load-op 'hurd)
(use-package 'hurd)
(defun write-block (dst data)
(let ((total (length data))
(total-written 0))
(loop until (= total total-written)
do (let ((err (io-write dst
(subseq data total-written))))
(if (or (null err... |
4dd3469412afd1964c5ae554c4cc1e6d20a6ada7ee972733e505d1bf7f433b34 | rabbitmq/rabbitmq-tracing | rabbit_tracing_sup.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-tracing/85af9285bef54c1689757b3161035b21389dca2d/src/rabbit_tracing_sup.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights re... |
cdfe8f3e0c24bdd87aaaa7a6a99820f732930e6ce00a8650eeeaf29beae0b993 | ahrefs/devkit | unsafeBitSet.mli |
This is reduced copy of ExtLib . BitSet with removed safety checks and auto - resize code to get some more speed of it .
It is about 15 % faster than the original implementation .
Update 2 : converted to bigarray
This is reduced copy of ExtLib.BitSet with removed safety checks and auto-resize code to ... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/unsafeBitSet.mli | ocaml | * Create an empty bitset with an initial size (in number of bits).
* [set s n] sets the nth-bit in the bitset [s] to true.
* [unset s n] sets the nth-bit in the bitset [s] to false.
* [put s v n] sets the nth-bit in the bitset [s] to [v].
* [toggle s n] changes the nth-bit value in the bitset [s].
* [is_set s n] r... |
This is reduced copy of ExtLib . BitSet with removed safety checks and auto - resize code to get some more speed of it .
It is about 15 % faster than the original implementation .
Update 2 : converted to bigarray
This is reduced copy of ExtLib.BitSet with removed safety checks and auto-resize code to ... |
5d486464e85974ea37b2c9a4a144f5f78adbd584f4430d4e1610ff09eb722646 | buildsome/buildsome | Sigint.hs | module Lib.Sigint (withInstalledSigintHandler) where
import Control.Concurrent.Async (withAsyncWithUnmask)
import Control.Concurrent.MVar
import Control.Exception (uninterruptibleMask)
import Control.Monad (void)
import Lib.Exception (bracket)
import Lib.Once (once)
import System.Posix.ByteString (Handler(..), keyboar... | null | https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/Lib/Sigint.hs | haskell | uses interruptible cleanups | module Lib.Sigint (withInstalledSigintHandler) where
import Control.Concurrent.Async (withAsyncWithUnmask)
import Control.Concurrent.MVar
import Control.Exception (uninterruptibleMask)
import Control.Monad (void)
import Lib.Exception (bracket)
import Lib.Once (once)
import System.Posix.ByteString (Handler(..), keyboar... |
84b40689e50cefdca5cb7ddc47ce7317a234158e7b2557cd9872955f01b54023 | lread/sci-test | core.clj | ;; portions copied from babashka.impl.clojure.core
(ns sci-test.impl.clojure.core
{:no-doc true}
(:refer-clojure :exclude [future read+string])
(:require [sci-test.impl.common :as common]
[clojure.string :as str]
[sci.core :as sci]
[sci.impl.copy-vars :refer [copy-core-var]]))... | null | https://raw.githubusercontent.com/lread/sci-test/34d9a1156fb68bdc0a726b24c8e210c36c1fe9f9/src/sci_test/impl/clojure/core.clj | clojure | portions copied from babashka.impl.clojure.core |
(ns sci-test.impl.clojure.core
{:no-doc true}
(:refer-clojure :exclude [future read+string])
(:require [sci-test.impl.common :as common]
[clojure.string :as str]
[sci.core :as sci]
[sci.impl.copy-vars :refer [copy-core-var]]))
(defn time*
"Evaluates expr and prints the time... |
19cc2cd901bc3769e50271c7e291c5faa6ca2cefb45401860ed7c5d8d524bde0 | karen/haskell-book | DifferenceLists.hs | module DifferenceLists where
import Criterion.Main
newtype DList a = DL { unDL :: [a] -> [a] }
empty :: DList a
empty = DL id
{-# INLINE empty #-}
singleton :: a -> DList a
singleton x = DL (x:)
# INLINE singleton #
toList :: DList a -> [a]
toList (DL f) = f []
infixr `cons`
cons :: a -> DList a -> DList a
cons x... | null | https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch28/DifferenceLists.hs | haskell | # INLINE empty # | module DifferenceLists where
import Criterion.Main
newtype DList a = DL { unDL :: [a] -> [a] }
empty :: DList a
empty = DL id
singleton :: a -> DList a
singleton x = DL (x:)
# INLINE singleton #
toList :: DList a -> [a]
toList (DL f) = f []
infixr `cons`
cons :: a -> DList a -> DList a
cons x xs = DL ((x:) . unDL... |
0dc80d525bae252b983c67bd4bab60485e164a6fe2ad55600bdddab0fdf46ac1 | johnwhitington/camlpdf | pdfgraphics.ml | (* \chaptertitle{Pdfgraphics}{Structured Graphics} *)
open Pdfutil
open Pdfio
type fpoint = float * float
type winding_rule = EvenOdd | NonZero
type segment =
| Straight of fpoint * fpoint
| Bezier of fpoint * fpoint * fpoint * fpoint
(* Each segment list may be marked as a hole or not. *)
type hole = Hole | No... | null | https://raw.githubusercontent.com/johnwhitington/camlpdf/cee7dc2e3604d6e47a358584a14a2efebb31dc9d/pdfgraphics.ml | ocaml | \chaptertitle{Pdfgraphics}{Structured Graphics}
Each segment list may be marked as a hole or not.
A [subpath] is either closed or open.
A [subpath] is the pair of a hole and a list of segments.
FIXME: This should be colourspace
The /ca value
r Name, font
The main type for a graphic. It must be kept paired... | open Pdfutil
open Pdfio
type fpoint = float * float
type winding_rule = EvenOdd | NonZero
type segment =
| Straight of fpoint * fpoint
| Bezier of fpoint * fpoint * fpoint * fpoint
type hole = Hole | Not_hole
type closure = Closed | Open
type subpath = hole * closure * segment list
A path is made from a nu... |
8bcedfd9f9ce7a27e90efb65de4784e73c4f117861eb0cf91710b0a2bf392d15 | lhope/cl-bayesnet | tries.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; tries - trie implementation for compiling Arithmetic Circuits.
;;
Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
;;
;; This file is part of cl-bayesnet - a Common Lisp Bayesian Network
Inferenc... | null | https://raw.githubusercontent.com/lhope/cl-bayesnet/3834f6ec27a297054e9b2f67220161682d63109d/src/tries.lisp | lisp |
tries - trie implementation for compiling Arithmetic Circuits.
This file is part of cl-bayesnet - a Common Lisp Bayesian Network
This file is licensed under the terms of the LLGPL.
This library is free software; you can redistribute it and/or modify
This library is distributed in the hope that it will be use... | Copyright ( c ) 2007 - 2013 , < > .
Copyright other contributors as noted in the file .
Inference Engine .
it under the terms of the Lisp Lesser General Public License version
3 , which consists of the GNU Lesser General Public License , either
version 3 or ( at your option ) any later version , as publ... |
00d4800fa40517bf541c07529be9fd7bfd2a6564b26a4a5c67ac141ed71c8041 | gadfly361/reagent-figwheel | actions.cljs | (ns {{ns-name}}.models.app.navigation.actions
(:require
[bide.core :as bide]
[{{ns-name}}.router :as router]
[{{ns-name}}.models.app.navigation.model :as nav-model]))
(defn- scroll-to-top []
(.scroll js/window 0 0))
(defn set-page! [app-state page-key]
(let [nav-cursor (nav-model/app-state->cursor app... | null | https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/gadfly/src/app/models/app/navigation/actions.cljs | clojure | (ns {{ns-name}}.models.app.navigation.actions
(:require
[bide.core :as bide]
[{{ns-name}}.router :as router]
[{{ns-name}}.models.app.navigation.model :as nav-model]))
(defn- scroll-to-top []
(.scroll js/window 0 0))
(defn set-page! [app-state page-key]
(let [nav-cursor (nav-model/app-state->cursor app... | |
0a71c7c36bf5dd2c6b7ec192af4db9f721f2ad7429c8d6a84f52b6a3308b2747 | janestreet/universe | attr_intf.ml | open! Js_of_ocaml
module type S = sig
(** This type covers both properties and attributes, despite the name. *)
type t
(** [create name value] creates a simple string-only attribute *)
val create : string -> string -> t
(** [create_float name float] creates a simple float-only attribute *)
val create_flo... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/virtual_dom/src/attr_intf.ml | ocaml | * This type covers both properties and attributes, despite the name.
* [create name value] creates a simple string-only attribute
* [create_float name float] creates a simple float-only attribute
* [string_property name value] creates a simple string-only property
* [bool_property name value] creates a simple bool-... | open! Js_of_ocaml
module type S = sig
type t
val create : string -> string -> t
val create_float : string -> float -> t
val string_property : string -> string -> t
val bool_property : string -> bool -> t
val property : string -> Js.Unsafe.any -> t
val on : string -> (#Dom_html.event Js.t -> Event.t... |
5ad78a8d3db862bd536e718b40eac62d0246b8c720ff4b8119fe89f304d91b7b | lpeterse/haskell-ssh | Encoding.hs | # LANGUAGE LambdaCase , RankNTypes #
module Network.SSH.Encoding where
import Control.Applicative
import Control.Monad ( when )
import qualified Data.ByteArray as BA
import qualified Data.ByteString as BS
import qualified Data.ByteString.Short a... | null | https://raw.githubusercontent.com/lpeterse/haskell-ssh/d1a614b6bf30c4932ee5a66efcae6e71680b4819/src/hssh-internal/Network/SSH/Encoding.hs | haskell | # INLINEABLE getWord8 #
# INLINEABLE getTrue # | # LANGUAGE LambdaCase , RankNTypes #
module Network.SSH.Encoding where
import Control.Applicative
import Control.Monad ( when )
import qualified Data.ByteArray as BA
import qualified Data.ByteString as BS
import qualified Data.ByteString.Short a... |
35c24583be49ab7ef78c8a329b0dccef54d5969206dfd0fa074a72e19776e36d | camlp5/camlp5 | pa_pragma.ml | (* camlp5r *)
(* pa_pragma.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
#load "q_MLast.cmo";
#qmod "ctyp,Type";
#qmod "extended_longident,LI";
(* expressions evaluated in the context of the preprocessor *)
(* syntax at toplevel: #pragma <expr> *)
open Printf;
open Versdep;
value string_of_obj_t... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/etc/pa_pragma.ml | ocaml | camlp5r
pa_pragma.ml,v
expressions evaluated in the context of the preprocessor
syntax at toplevel: #pragma <expr> | Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
#load "q_MLast.cmo";
#qmod "ctyp,Type";
#qmod "extended_longident,LI";
open Printf;
open Versdep;
value string_of_obj_tag x =
if Obj.is_block (Obj.repr x) then
let t = Obj.tag (Obj.repr x) in
"tag = " ^ string_of_int t ^
(if t = 0 then " size =... |
3de7c40b6ec958427f9cc7f7bf8b58693cbaf6b0a6e08f25e2dc640b187e1cb3 | aplusbi/reflow | ringbuffer.ml | type t = { buffer: string; mutable curr: int; length: int; mutable full: bool };;
let create len = {buffer = String.create len; curr = 0; length = len; full = false};;
let rec unix_read fd rb = match (rb.length - rb.curr) with
| amt when amt <= 0 -> rb.curr <- 0;
if not rb.full then
rb.full <- true;
u... | null | https://raw.githubusercontent.com/aplusbi/reflow/771c901077a9a46485e54bd824c68959c964ed04/ringbuffer.ml | ocaml | type t = { buffer: string; mutable curr: int; length: int; mutable full: bool };;
let create len = {buffer = String.create len; curr = 0; length = len; full = false};;
let rec unix_read fd rb = match (rb.length - rb.curr) with
| amt when amt <= 0 -> rb.curr <- 0;
if not rb.full then
rb.full <- true;
u... | |
b0d95140a9db84b31eda5547701692157bf36ca94d4ca19ece2e4092ffcae5c1 | ucsd-progsys/liquid-fixpoint | Trie.hs | module Language.Fixpoint.Utils.Trie
*
Trie (..)
, Branch (..)
-- * Constructors
, empty
, insert
, fromList
-- * Visitors
, fold
, foldM
)
where
import qualified Data.List as L
import Language.Fixpoint.Types.PrettyPrint
import qualified Language.Fixpoint.Misc as Misc
type Key = Int
t... | null | https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/31eb9977fa1842ad3ac28e9e1ad95a8d6644a2b5/src/Language/Fixpoint/Utils/Trie.hs | haskell | * Constructors
* Visitors
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------------------------------... | module Language.Fixpoint.Utils.Trie
*
Trie (..)
, Branch (..)
, empty
, insert
, fromList
, fold
, foldM
)
where
import qualified Data.List as L
import Language.Fixpoint.Types.PrettyPrint
import qualified Language.Fixpoint.Misc as Misc
type Key = Int
type Path = [Key]
newtype Trie a
= Nod... |
aa6ba9f34228c5bb42e1f794f43d607b9e7f2063bd0b2588db20693297bf3f80 | Zilliqa/scilla-compiler | Uncurry.ml |
This file is part of scilla .
Copyright ( c ) 2019 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... | null | https://raw.githubusercontent.com/Zilliqa/scilla-compiler/ac42584ec49a25c917a5ec4e6404b0c953b8e711/src/astlowering/Uncurry.ml | ocaml | Split the sequence of applications (which have currying semantics) into
* multiple UCS.App expressions, each having non-currying semantics.
Transform each library entry.
Function to flatten patterns in a library.
translate_in the library tree.
Recursion libs.
Translate fields and their initializat... |
This file is part of scilla .
Copyright ( c ) 2019 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... |
db075c128fbf53e93d12ecfa797607c91fce799c3b1083086e789d8ec311cef8 | OCamlPro/ocaml-top | tools.mli | (**************************************************************************)
(* *)
(* Copyright 2013 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-top/abf1df76f08c5773d4d8884aee9c750a8847f16c/src/tools.mli | ocaml | ************************************************************************
Copyright 2013 OCamlPro
All rights reserved. This... | the GNU Public License version 3.0 .
module Ops: sig
val (@@) : ('a -> 'b) -> 'a -> 'b
val (|>) : 'a -> ('a -> 'b) -> 'b
end
val debug_enabled: bool
val debug: ('a, out_channel, unit) format -> 'a
val printexc: exn -> string
exception Recoverable_error of string
val recov... |
a101f9ec364f8a23e4319633dfc7a4fdc8a973799d6be70dcbfc2ade41f9fb53 | kofigumbs/elm-beam | Paths_elm_compiler.hs | module Paths_elm_compiler (module Paths_elm_beam) where
import Paths_elm_beam
| null | https://raw.githubusercontent.com/kofigumbs/elm-beam/e998e5715ac2f8b3c3c13c8d94c9191d1a1d0540/src/Paths_elm_compiler.hs | haskell | module Paths_elm_compiler (module Paths_elm_beam) where
import Paths_elm_beam
| |
e0ad38f5fcd832c78dbbdacac5cb7ce5270f311593ef742807ae0ca1f9c56b01 | nominolo/lambdachine | Num.hs | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , CPP #
module GHC.Num (module GHC.Num, module GHC.Integer) where
import GHC.Base
import GHC.Integer
#define DIGITS 18
#define BASE 1000000000000000000
infixl 7 *
infixl 6 +, -
default () -- Double isn't available yet,
... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/libraries/base/GHC/Num.hs | haskell | Double isn't available yet,
and we shouldn't be using defaults anyway
| Unary negation.
| Absolute value.
| Sign of a number.
The functions 'abs' and 'signum' should satisfy the law:
> abs x * signum x == x
or @1@ (positive).
| Conversion from an 'Integer'.
An integer literal represents the application of t... | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , CPP #
module GHC.Num (module GHC.Num, module GHC.Integer) where
import GHC.Base
import GHC.Integer
#define DIGITS 18
#define BASE 1000000000000000000
infixl 7 *
infixl 6 +, -
class Num a where
(+), (-), (*) :: a -> a -> a
ne... |
159fc29350d98615f93d75602a640e8f4e2bfa5e92c1fb1555450c96ec453078 | merijn/timeit | TimeIt.hs | module System.TimeIt(timeIt, timeItShow, timeItNamed, timeItT) where
import System.CPUTime
import Text.Printf
import Control.Monad.IO.Class (MonadIO(liftIO))
-- | Wrap a 'MonadIO' computation so that it prints out the execution time.
timeIt :: MonadIO m => m a -> m a
timeIt = timeItNamed "CPU time"
-- | Like 'timeIt'... | null | https://raw.githubusercontent.com/merijn/timeit/48fa1829c2ccbf83cef570542b4e432c45a29d2e/System/TimeIt.hs | haskell | | Wrap a 'MonadIO' computation so that it prints out the execution time.
| Like 'timeIt', but uses the 'show' rendering of @a@ as label for the
timing.
@since 2.0
| Like 'timeIt', but uses the 'String' as label for the timing.
@since 2.0
as well as the result value. | module System.TimeIt(timeIt, timeItShow, timeItNamed, timeItT) where
import System.CPUTime
import Text.Printf
import Control.Monad.IO.Class (MonadIO(liftIO))
timeIt :: MonadIO m => m a -> m a
timeIt = timeItNamed "CPU time"
timeItShow :: (MonadIO m, Show a) => m a -> m a
timeItShow ioa = do
(t, a) <- timeItT ioa
... |
b3d675a9d2766619203604f8989debe4780d2fd09fc30029abe2ccb9d2fe5544 | filipesilva/create-cljs-app | messages.cljs | (ns create-cljs-app.messages
(:require ["chalk" :refer [blue green red yellow]]))
(defn begin-msg [abs-path]
(.log js/console (str "\nCreating a new CLJS app in " (green abs-path) ".")))
(defn install-packages-msg []
(.log js/console "\nInstalling packages. This might take a couple of minutes."))
(defn init-gi... | null | https://raw.githubusercontent.com/filipesilva/create-cljs-app/7e991032cadebf95ac2b69dbbf0fa3e747d63460/src/create_cljs_app/messages.cljs | clojure | (ns create-cljs-app.messages
(:require ["chalk" :refer [blue green red yellow]]))
(defn begin-msg [abs-path]
(.log js/console (str "\nCreating a new CLJS app in " (green abs-path) ".")))
(defn install-packages-msg []
(.log js/console "\nInstalling packages. This might take a couple of minutes."))
(defn init-gi... | |
325d0ffbe618ade47916f23180a125000aaae54496e682690763b58625c309bf | kowainik/learn4haskell | Spec.hs | module Main (main) where
import Test.Hspec (hspec)
import Test.Chapter1
import Test.Chapter2
import Test.Chapter3
import Test.Chapter4
main :: IO ()
main = hspec $ do
chapter1
chapter2
chapter3
chapter4
| null | https://raw.githubusercontent.com/kowainik/learn4haskell/2447123585200bbae2f3df7431a858ba558cc700/test/Spec.hs | haskell | module Main (main) where
import Test.Hspec (hspec)
import Test.Chapter1
import Test.Chapter2
import Test.Chapter3
import Test.Chapter4
main :: IO ()
main = hspec $ do
chapter1
chapter2
chapter3
chapter4
| |
7d542fcb2e49b1da0560a8d1280cf83dd9bff36bbc21616b06d41987c7197bd3 | philopon/apiary | Internal.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Web.Apiary.Authentica... | null | https://raw.githubusercontent.com/philopon/apiary/7da306fcbfcdec85d073746968298de4540d7235/apiary-authenticate/src/Web/Apiary/Authenticate/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Web.Apiary.Authenticate.Internal where
import Control.Applicative((<$>), (<*>))
import Cont... |
bd7f760034836d381d6d9fa01af359612749f40882dda67ea806e2d13eb02008 | blindglobe/clocc | allegro.lisp | ;;; -*- Mode: CLtL -*-
;;; allegro.lisp --
Franz Inc. implementation dependencies .
Copyright ( c ) 2000 , all rights reserved .
;;; This software is released under the terms of the GNU Lesser General
;;; Public License (LGPL, see file COPYING for details).
(in-package "CL.EXT.CONFIGURATION")
;;; Directory ut... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/port/configuration/impl-dependent/allegro.lisp | lisp | -*- Mode: CLtL -*-
allegro.lisp --
This software is released under the terms of the GNU Lesser General
Public License (LGPL, see file COPYING for details).
Directory utilities
end of file -- allegro.lisp -- |
Franz Inc. implementation dependencies .
Copyright ( c ) 2000 , all rights reserved .
(in-package "CL.EXT.CONFIGURATION")
(defmethod current-directory-namestring ((cl-implementation cl.env:allegro))
(namestring (excl:current-directory)))
DEFSYSTEM utilities
(defmethod find-system ((sys symbol)
(cl ... |
1d0436de346245380dee9684ce321ae72763b537ed174a07d36d2bc134576fbc | ds-wizard/engine-backend | List_POST_CloneUuid.hs | module Wizard.Specs.API.Questionnaire.List_POST_CloneUuid (
list_post_cloneUuid,
) where
import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS
import qualified Data.UUID as U
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/test/Wizard/Specs/API/Questionnaire/List_POST_CloneUuid.hs | haskell | ------------------------------------------------------------------------
POST /questionnaires?cloneUuid={qtnUuid}
------------------------------------------------------------------------
----------------------------------------------------
----------------------------------------------------
---------------------... | module Wizard.Specs.API.Questionnaire.List_POST_CloneUuid (
list_post_cloneUuid,
) where
import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS
import qualified Data.UUID as U
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith... |
805b81415d9e87e400fe9d179a5257f5af9a8761240c95c5e337fd05a66077bf | parapluu/Concuerror | after_test_reduced.erl | -module(after_test_reduced).
-export([after_test_reduced/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
after_test_reduced() ->
Parent = self(),
spawn(fun() -> Parent ! ok2 end),
spawn(fun() -> Parent ! ok2 end),
allow_but_wait(2,1),
receive
deadlock -> ok
end.
a... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/after_test_reduced.erl | erlang | -module(after_test_reduced).
-export([after_test_reduced/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
after_test_reduced() ->
Parent = self(),
spawn(fun() -> Parent ! ok2 end),
spawn(fun() -> Parent ! ok2 end),
allow_but_wait(2,1),
receive
deadlock -> ok
end.
a... | |
c9c4df5c9f07c6835a4abc8cb80eeb6f4a283290c0685e501b1a4c74d7c2468c | klutometis/clrs | 15-3.scm | (require-extension syntax-case srfi-11 check)
(require '../15/chapter)
(import chapter-15)
(let ((X "algorithm")
(Y "altruistic"))
(let-values (((cost op) (edit-distance X Y)))
(check (ops op (- (string-length X) 1) (- (string-length Y) 1)) =>
'((insert . #\c) (replace . #\i) (replace . #\t)
... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/15/15-3.scm | scheme | (require-extension syntax-case srfi-11 check)
(require '../15/chapter)
(import chapter-15)
(let ((X "algorithm")
(Y "altruistic"))
(let-values (((cost op) (edit-distance X Y)))
(check (ops op (- (string-length X) 1) (- (string-length Y) 1)) =>
'((insert . #\c) (replace . #\i) (replace . #\t)
... | |
94701655f2889cde4d7e9fdb70902aac34b47a14eaca08e77b6ae8a7f168eb3e | degree9/enterprise | service_bus.cljs | (ns degree9.azure.service-bus
(:require ["@azure/service-bus" :as sbus]
[degree9.object :as obj]))
; ;; Service Bus Receive Mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
( def receive - mode ( obj / get sbus " " ) )
;
; (def peek-lock (.-peekLock receive-mode))
;
; (def receive-delete (.-r... | null | https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/azure/service_bus.cljs | clojure | ;; Service Bus Receive Mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def peek-lock (.-peekLock receive-mode))
(def receive-delete (.-receiveAndDelete receive-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Azure Service Bus ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | (ns degree9.azure.service-bus
(:require ["@azure/service-bus" :as sbus]
[degree9.object :as obj]))
( def receive - mode ( obj / get sbus " " ) )
(defn service-bus [conn]
(sbus/ServiceBusClient. conn))
(defn sender [sbus name]
(.createSender sbus name))
(defn send-messages [sender message]
(.s... |
dcb55dda40eec2e99a471000f72a9b026553676b4ef2fcce44b6c83dd5e331d9 | abdulapopoola/SICPBook | 5.21.scm | #lang planet neil/sicp
(define (count-leaves tree)
(cond ((null? tree) 0)
((not (pair? tree)) 1)
(else
(+ (count-leaves (car tree))
(count-leaves (cdr tree))))))
(define count-leaves-machine
(make-machine
'(continue tree tmp val) ;registers
(list (list 'null? null?... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%205/5.3/5.21.scm | scheme | registers
ops
controller-text
B USING explicit counter
registers
ops
controller-text | #lang planet neil/sicp
(define (count-leaves tree)
(cond ((null? tree) 0)
((not (pair? tree)) 1)
(else
(+ (count-leaves (car tree))
(count-leaves (cdr tree))))))
(define count-leaves-machine
(make-machine
(list 'pair? pair?)
(list 'not not)
(... |
8beb7f4a7c10f5853eb111390a63f49302cf6344616ebec58ba77f87928b9270 | lambdaisland/kaocha-cucumber | jvm_test.clj | (ns lambdaisland.cucumber.jvm-test
(:require [clojure.test :refer :all]
[lambdaisland.cucumber.gherkin :as gherkin]
[lambdaisland.cucumber.jvm :as jvm]
[lambdaisland.cucumber.jvm.types :as types])
(:import cucumber.api.event.Event
cucumber.api.SnippetType
[c... | null | https://raw.githubusercontent.com/lambdaisland/kaocha-cucumber/b4d36f5e5b65cae123503909cbab22d5dc6083a3/test/unit/lambdaisland/cucumber/jvm_test.clj | clojure | Write code here
The last argument is a vector of vectors of strings.
As usual everything here is private. Just checking that it least it
does not blow up. | (ns lambdaisland.cucumber.jvm-test
(:require [clojure.test :refer :all]
[lambdaisland.cucumber.gherkin :as gherkin]
[lambdaisland.cucumber.jvm :as jvm]
[lambdaisland.cucumber.jvm.types :as types])
(:import cucumber.api.event.Event
cucumber.api.SnippetType
[c... |
ad8dd9bc3f1c17ed627d6ec46aa8f611fdfd624cce6b622e867283cbba3f6257 | informatimago/lisp | graph.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(defpackage "COM.INFORMATIMAGO.LANGUAGE.C11.GRAPH"
(:use "COMMON-LISP"
"COM.INFORMATIMAGO.COMMON-LISP.CESARUM.FILE"
"COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST"
"COM.INFORMATIMAGO.COMMON-LISP.CESA... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/c11/graph.lisp | lisp | ; dot -Kfdp -Tps c11.dot > c11.ps & & open c11.ps
(cardinal (nodes *graph*))
(cardinal (edges *graph*)) | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(defpackage "COM.INFORMATIMAGO.LANGUAGE.C11.GRAPH"
(:use "COMMON-LISP"
"COM.INFORMATIMAGO.COMMON-LISP.CESARUM.FILE"
"COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST"
"COM.INFORMATIMAGO.COMMON-LISP.CESA... |
98c48b756b01a51d8d4658f1997e2f13f9c8b89f4391afaf3ffcffba2d304d21 | karamellpelle/grid | Helpers.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/GUI/Widget/Helpers.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.GUI.Widget.Helpers
(
wiIsTouched,... |
b98d022736090572d6a93f1101a49516a71c640f18ca4f7e107f69d23de2a6ec | yangyang5214/asciicast2mp4 | screen.cljc | (ns asciinema.vt.screen
(:refer-clojure :exclude [print])
(:require [schema.core :as s #?@(:cljs [:include-macros true])]))
(def Tabs #?(:clj clojure.lang.PersistentTreeSet :cljs cljs.core/PersistentTreeSet))
(def Charset (s/pred ifn?))
(def Cursor {:x s/Num
:y s/Num
:visible s/Bool})
... | null | https://raw.githubusercontent.com/yangyang5214/asciicast2mp4/5404a53ae331d44abfada6002b9affac76073418/asciinema-player/vt/src/asciinema/vt/screen.cljc | clojure | field accessors
modes
scrolling
cursor
margins
buffers
tabs
charsets
printing
clearing/erasing
inserting
deleting
lines
resetting | (ns asciinema.vt.screen
(:refer-clojure :exclude [print])
(:require [schema.core :as s #?@(:cljs [:include-macros true])]))
(def Tabs #?(:clj clojure.lang.PersistentTreeSet :cljs cljs.core/PersistentTreeSet))
(def Charset (s/pred ifn?))
(def Cursor {:x s/Num
:y s/Num
:visible s/Bool})
... |
3bbac161b87d39efdd3881134582490a0cc9de82d83e2ea081c2864f82d51a16 | cyverse-archive/DiscoveryEnvironmentBackend | c200_2015063001.clj | (ns facepalm.c200-2015063001
(:use [korma.core]))
(def ^:private version
"The destination database version."
"2.0.0:20150630.01")
(defn- increase-external-job-id-column-width
[]
(println "\t* Increasing the width of the `external_id` field in the `job_steps` table")
(exec-raw "ALTER TABLE job_steps ALTER ... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/de-database-schema/src/main/conversions/v2.0.0/c200_2015063001.clj | clojure | (ns facepalm.c200-2015063001
(:use [korma.core]))
(def ^:private version
"The destination database version."
"2.0.0:20150630.01")
(defn- increase-external-job-id-column-width
[]
(println "\t* Increasing the width of the `external_id` field in the `job_steps` table")
(exec-raw "ALTER TABLE job_steps ALTER ... | |
186fc11ee3bf455466e9e8e35cb9e270b367f51687640f163bda036f815f6f15 | basho/riak_dt | riak_dt_map.erl | %% -------------------------------------------------------------------
%%
riak_dt_map : OR - Set schema based multi CRDT container
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not... | null | https://raw.githubusercontent.com/basho/riak_dt/11571d45e8bbc19908040c7c7ee65274cba4e134/src/riak_dt_map.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 permissi... | riak_dt_map : OR - Set schema based multi CRDT container
Copyright ( c ) 2007 - 2013 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
... |
a3f9c93e1bb98a26e0551305b9884b4ac3abc3ca8829c897b31f9c133a6e56b8 | masaeedu/monadoptics | Types.hs | module Types where
import Data.Functor.Const
import Data.Functor.Compose
type F = (* -> *)
type HP = F -> F -> *
type (~>) f g = forall x. f x -> g x
infixr 1 ~>
newtype (f :~> g) = Nat { runNat :: forall x. f x -> g x }
newtype (f :*: g) a = Product { runProduct :: (f a, g a) }
type Product = (:*:)
newtype (f :+... | null | https://raw.githubusercontent.com/masaeedu/monadoptics/7f306246afb262d63b0d13ad14d312acaeffc96c/lib/Types.hs | haskell | module Types where
import Data.Functor.Const
import Data.Functor.Compose
type F = (* -> *)
type HP = F -> F -> *
type (~>) f g = forall x. f x -> g x
infixr 1 ~>
newtype (f :~> g) = Nat { runNat :: forall x. f x -> g x }
newtype (f :*: g) a = Product { runProduct :: (f a, g a) }
type Product = (:*:)
newtype (f :+... | |
498ef8d25f7041eefd826d969a0e051d89af8c6fe4ddc54baea533190c4dd255 | nextjournal/clerk | rule_30.clj | # Rule 30 🕹
;; Let's explore cellular automata in a Clerk Notebook. We start by requiring the custom viewers.
(ns rule-30
(:require [nextjournal.clerk :as clerk]))
(def viewers
[{:pred number?
:render-fn '#(vector :div.inline-block {:style {:width 16 :height 16}
:... | null | https://raw.githubusercontent.com/nextjournal/clerk/94dfb96138cfc549c3e4c0948f6ebf71380a4676/notebooks/rule_30.clj | clojure | Let's explore cellular automata in a Clerk Notebook. We start by requiring the custom viewers.
Finally, we can evolve the board. | # Rule 30 🕹
(ns rule-30
(:require [nextjournal.clerk :as clerk]))
(def viewers
[{:pred number?
:render-fn '#(vector :div.inline-block {:style {:width 16 :height 16}
:class (if (pos? %) "bg-black" "bg-white border-solid border-2 border-black")})}
{:pred (every-p... |
0d591ffff5c04b16a8eab236fd6bbdea89e6e7cbb799004ff88364d0fa852d49 | wilkerlucio/presentation-data-navigation-with-pathom3 | v1.clj | (ns com.wsscode.presentations.pathom3-data-nav.twitter.v1
(:require [com.wsscode.pathom3.connect.operation :as pco]
[cheshire.core :as json]
[meander.epsilon :as m]
[com.wsscode.pathom3.format.eql :as pf.eql]
[com.wsscode.pathom3.connect.indexes :as pci]
[co... | null | https://raw.githubusercontent.com/wilkerlucio/presentation-data-navigation-with-pathom3/70fa8a7f8a0fcda5bf5e4a11956b938466e8add7/src/main/com/wsscode/presentations/pathom3_data_nav/twitter/v1.clj | clojure | inputs are always maps
outputs are always maps
region query demo tweet view
quote tweets count not available
endregion
region query demo relevant user
new fields
endregion
region query demo user view
user birthday isn't available
endregion | (ns com.wsscode.presentations.pathom3-data-nav.twitter.v1
(:require [com.wsscode.pathom3.connect.operation :as pco]
[cheshire.core :as json]
[meander.epsilon :as m]
[com.wsscode.pathom3.format.eql :as pf.eql]
[com.wsscode.pathom3.connect.indexes :as pci]
[co... |
9ab6eabd5d8ea5dd0eae15696969a488f43025872b7d5192cbcfe71d5c35d6c4 | uhc/uhc | Class.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/top/Implementation/TypeGraph/Class.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
---------------------------------------------------------------------------
construct ... |
module Top.Implementation.TypeGraph.Class where
import Top.Types
import Top.Implementation.TypeGraph.Basics
import qualified Data.Set as S
import Data.List (nub)
import Top.Util.IntErr (internalError)
class TypeGraph graph info | graph -> info where
addTermGraph :: OrderedTypeSynonyms -> Int -> Tp -... |
b6c01fb9c3d9e191dee667f2ec98d27932808006db0d21443b25f025a8591f9b | binsec/binsec | smtlib_pp.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/smtlib/smtlib_pp.ml | 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... |
991781836b3f23f1a27db0d6c632e7f8474de6feb640afee4f5eeb8693bf3a63 | racket/racket7 | modcollapse.rkt | #lang racket/base
(require syntax/modcollapse)
(define (check got expected)
(unless (equal? got expected)
(error 'check "failed: ~s vs. ~s" got expected)))
(define here-dir (find-system-path 'temp-dir))
(define here (build-path here-dir "dummy.rkt"))
(define self (module-path-index-join #f #f))
(check (collap... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test/tests/syntax/modcollapse.rkt | racket | #lang racket/base
(require syntax/modcollapse)
(define (check got expected)
(unless (equal? got expected)
(error 'check "failed: ~s vs. ~s" got expected)))
(define here-dir (find-system-path 'temp-dir))
(define here (build-path here-dir "dummy.rkt"))
(define self (module-path-index-join #f #f))
(check (collap... | |
3d246c4f654f5eab4389576a8953e5e22ef2dfdb18c4784fdb5936d21436ec0b | inaka/fiar | fiar_match_repo.erl | -module (fiar_match_repo).
-type status() :: {won_by, fiar_match:player()}
| drawn
| {next_player, fiar_match:player()}.
-export_type([status/0]).
-export([ start/2
, get_match/2
, play/3
, get_matches/1
, delete_match/2
, current_matches/1
... | null | https://raw.githubusercontent.com/inaka/fiar/76bd812c37ebbeb15536068fd802acf430617aff/src/models/fiar_match_repo.erl | erlang | -module (fiar_match_repo).
-type status() :: {won_by, fiar_match:player()}
| drawn
| {next_player, fiar_match:player()}.
-export_type([status/0]).
-export([ start/2
, get_match/2
, play/3
, get_matches/1
, delete_match/2
, current_matches/1
... | |
a9202cd030798619fce0a132907cdcfba9d83191bdf491c5695b6880160e2494 | imitator-model-checker/imitator | PTA2TikZ.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Author :
* ... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/PTA2TikZ.ml | ocaml | **********************************************************
* Constants
**********************************************************
***********************************************************
Functions
***********************************************************
Get the model
* Proper form for constraints
Do some re... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Author :
* ... |
f9b96c59d31d3b261802a3088b4d2bc049b704bf42ab2f261b3b9c38f0c4daaf | s-cerevisiae/leetcode-racket | 203-remove-linked-list-elements.rkt | #lang racket
(require "list-node.rkt")
(define (remove-elements head target)
(match head
[#f #f]
[(list-node (== target) next)
(remove-elements next target)]
[(list-node val next)
(list-node val (remove-elements next target))]))
| null | https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/276b07bef3f1d29db61531e25e03d77a04cde0e3/203-remove-linked-list-elements.rkt | racket | #lang racket
(require "list-node.rkt")
(define (remove-elements head target)
(match head
[#f #f]
[(list-node (== target) next)
(remove-elements next target)]
[(list-node val next)
(list-node val (remove-elements next target))]))
| |
3e38c645ba06fdab95c9f1bb7c4cf753cc517f0d2ae90b6737a614d5bf54610c | lspector/Clojush | tagged_code_macros.clj | (ns clojush.experimental.tagged-code-macros
(:use [clojush.util]
[clojush.random]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; tagged-code macros
(defn tagged-code-macro?
"Retruns true if i is a tagged-code macro call."
[i]
(and (map? i)
(:t... | null | https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/experimental/tagged_code_macros.clj | clojure |
tagged-code macros
possibly grab arguments from tag space and push them on the code stack
push additional args, if any
execute the code instruction
possibly tag results | (ns clojush.experimental.tagged-code-macros
(:use [clojush.util]
[clojush.random]))
(defn tagged-code-macro?
"Retruns true if i is a tagged-code macro call."
[i]
(and (map? i)
(:tagged_code_macro i)))
(defn handle-tag-code-macro
"Given a tagged-code macro call and a push state, this returns ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.