_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 |
|---|---|---|---|---|---|---|---|---|
93ad2c2cc03da712c8d6e7001ac6fc041876c6b92615f5c052896a388f0dce16 | janestreet/memtrace_viewer | filtered_trace.ml | open! Core
open Memtrace_viewer_common
let predicate_matches ~loc_cache (pred : Filter.Location_predicate.t) call_site =
let data = Location.Cache.get_call_site_data loc_cache call_site in
let defname = Data.Call_site.defname data in
match pred with
| Defname_related { relation; rhs } ->
(match relation w... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/280d57dd520ed755497169e46b5fd0b11401d482/server/src/filtered_trace.ml | ocaml | * Is an object allocated at this time eligible to pass the filter?
* Is an allocation with the given size eligible to pass the filter?
* Is an object with the given lifetime eligible to pass the filter?
* Is an allocation with the given backtrace eligible to pass the filter?
* Is an object collected at this time el... | open! Core
open Memtrace_viewer_common
let predicate_matches ~loc_cache (pred : Filter.Location_predicate.t) call_site =
let data = Location.Cache.get_call_site_data loc_cache call_site in
let defname = Data.Call_site.defname data in
match pred with
| Defname_related { relation; rhs } ->
(match relation w... |
5bf89253e0ad160e96f4e4e8fceae0ae39aff17ca3cc68b8347251de1e82f4aa | alanz/ghc-exactprint | Common.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Test.Common (
RoundtripReport (..)
, Report... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/3b36f5d0a498e31d882fe111304b2cf5ca6cad22/tests/Test/Common.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------
let (GHC.L l p) = top
let pristine = removeSpaces expected
Do not remove this line!
inconsistent = if null consistency then Nothing else Just consistency
---------... | # LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Test.Common (
RoundtripReport (..)
, Report
, ParseFailure(..)
, ReportType(..)
, roundTripTes... |
0cdeddc6c21a7ba5e3b6fa783e7a27f2072d76acde1b1a46852f9fca5101737b | openmusic-project/openmusic | edition.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/musicproject/editor/scoreeditor/edition.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
aafcd9a332755007900b610b191f1cedc76a1f91f67242447d5002182ba2d725 | camllight/camllight | eval.mli | #open "syntaxe";;
type valeur =
Val_nombre of int
| Val_booléenne of bool
| Val_paire of valeur * valeur
| Val_nil
| Val_cons of valeur * valeur
| Val_fermeture of fermeture
| Val_primitive of valeur -> valeur
and fermeture =
{ Définition: (motif * expression) list;
mutable Environnement: ... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/examples/minicaml/eval.mli | ocaml | #open "syntaxe";;
type valeur =
Val_nombre of int
| Val_booléenne of bool
| Val_paire of valeur * valeur
| Val_nil
| Val_cons of valeur * valeur
| Val_fermeture of fermeture
| Val_primitive of valeur -> valeur
and fermeture =
{ Définition: (motif * expression) list;
mutable Environnement: ... | |
423fb0b00ff4901f9c000e16e823c4a8f3f7a0f92a007d9e117a2bbee1c440f4 | ShamoX/cash | delim_7.ml | (***********************************************************************)
(* Cash *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ShamoX/cash/aa97231154c3f64c9d0a62823e1ed71e32ab8718/delim_7.ml | ocaml | *********************************************************************
Cash
under the terms of the GNU Lesser Gene... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
Cash is based on , by .
type handle_delim =
[ Trim
| Peek
| Concat ]
va... |
94a0ce7b1f6c8e167888fc18c46a547dc4b26844616848b9172b92a829218292 | cedlemo/OCaml-GI-ctypes-bindings-generator | Notebook.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val append_page :
t -> Widget.t ptr -> Widget.t ptr option -> int32
val append_page_menu :
t -> Widget.t ptr -> Widget.t ptr option -> Widget.t ptr option -> int32
val detach_tab :
t -> Widget.t ptr -> unit
val get_action_widget :
t -> P... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Notebook.mli | ocaml | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val append_page :
t -> Widget.t ptr -> Widget.t ptr option -> int32
val append_page_menu :
t -> Widget.t ptr -> Widget.t ptr option -> Widget.t ptr option -> int32
val detach_tab :
t -> Widget.t ptr -> unit
val get_action_widget :
t -> P... | |
e2128c6db9d765920c83648dfd0c6bed20bb21152949927cc802632436d889b5 | mit-plv/riscv-semantics | ExecuteA64.hs | # LANGUAGE ScopedTypeVariables #
module Spec.ExecuteA64 where
import Spec.Decode
import Spec.Machine
import Utility.Utility
import Spec.VirtualMemory
import Control.Monad
import Data.Bits
import Prelude
execute :: forall p t. (RiscvMachine p t) => InstructionA64 -> p ()
-- begin ast
execute (Lr_d rd rs1 aqrl) = do
a... | null | https://raw.githubusercontent.com/mit-plv/riscv-semantics/1c0da3cac9d3f8dd813d26c0d2fbaccbb2210313/src/Spec/ExecuteA64.hs | haskell | begin ast
TODO: Eventually stop cheating.
end ast | # LANGUAGE ScopedTypeVariables #
module Spec.ExecuteA64 where
import Spec.Decode
import Spec.Machine
import Utility.Utility
import Spec.VirtualMemory
import Control.Monad
import Data.Bits
import Prelude
execute :: forall p t. (RiscvMachine p t) => InstructionA64 -> p ()
execute (Lr_d rd rs1 aqrl) = do
a <- getRegist... |
063659e91ff1fc640c12f9ccff9a61259614087a7d8b1c50ea0dfc57034469ef | koto-bank/lbge | render-asset-handlers.lisp | (in-package :lbge.asset)
;;; Shader source
(define-asset shader-source ()
((source :initarg :source)))
(define-asset-handler shader-source (manager key)
(let ((file-path (find-path-by-path-key manager key)))
(log:debug "File path ~S" file-path)
(log:debug "Asset key ~S" key)
(unless file-path
(r... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/base/asset/render-asset-handlers.lisp | lisp | Shader source
Image
Texture
Material
Sources is a list in format
(:vertex <vertex-source>
:fragment <fragment-source>) | (in-package :lbge.asset)
(define-asset shader-source ()
((source :initarg :source)))
(define-asset-handler shader-source (manager key)
(let ((file-path (find-path-by-path-key manager key)))
(log:debug "File path ~S" file-path)
(log:debug "Asset key ~S" key)
(unless file-path
(return (make-asset ... |
782891cb27d8a557a388f6ee4e1c89d269cc04fa2eb6409d39abd4c1276442af | taylorwood/advent-of-code | 5.clj | (ns advent-of-code.2016.5
(:require [clojure.string :as cs])
(:import (java.security MessageDigest)))
(defn md5 [txt]
(->> (.digest (doto (MessageDigest/getInstance "MD5")
(.update (.getBytes txt))))
(map #(format "%02x" %))
(apply str)))
solve part 1
(pmap #(md5 (str "abb... | null | https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2016/5.clj | clojure | is `pos` not already figured out?
extra credit progressive answer printing | (ns advent-of-code.2016.5
(:require [clojure.string :as cs])
(:import (java.security MessageDigest)))
(defn md5 [txt]
(->> (.digest (doto (MessageDigest/getInstance "MD5")
(.update (.getBytes txt))))
(map #(format "%02x" %))
(apply str)))
solve part 1
(pmap #(md5 (str "abb... |
f97b1d0b90785ca4f6cb6dfc043e6ba1d18df44f452ff17877f36a80379da8c0 | ralph-schleicher/open-location-code | tests.lisp | ;;; tests.lisp --- test procedure.
Copyright ( C ) 2019
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of source code must retain the above copyright
;; notice, this list of con... | null | https://raw.githubusercontent.com/ralph-schleicher/open-location-code/69c30b9f8e711c25e7a90c1de87501f845f5ca79/tests.lisp | lisp | tests.lisp --- test procedure.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
... |
Copyright ( C ) 2019
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT
(in-package :common... |
253c971ad501307432982920ea2cd8a4c35880fac44ccbe70263126db41dfbf1 | facebookincubator/hsthrift | HsStdTuple.hs | Copyright ( c ) Facebook , Inc. and its affiliates .
# LANGUAGE TemplateHaskell #
module Foreign.CPP.HsStruct.HsStdTuple
( deriveHsStdTupleUnsafe
, HsStdTuple(..)
) where
import Data.List (foldl')
import Control.Monad (forM, unless)
import Foreign
import Language.Haskell.TH
import Foreign.CPP.Addressable
imp... | null | https://raw.githubusercontent.com/facebookincubator/hsthrift/8816d3fdd03c4d15ee8cde4ef2e88eeb0b2be1bb/common/util/Foreign/CPP/HsStruct/HsStdTuple.hs | haskell | c_peek* FFI call
N peeks
tuple construction
Ptr () -> Ptr () -> <<< all tuple types >>> -> IO ()
Ptr () -> Ptr () -> <<< all tuple types >>> -> IO () | Copyright ( c ) Facebook , Inc. and its affiliates .
# LANGUAGE TemplateHaskell #
module Foreign.CPP.HsStruct.HsStdTuple
( deriveHsStdTupleUnsafe
, HsStdTuple(..)
) where
import Data.List (foldl')
import Control.Monad (forM, unless)
import Foreign
import Language.Haskell.TH
import Foreign.CPP.Addressable
imp... |
2331e8707267d4b74896074ac655e58e72a1d1248a2cf717be5b91a69c238e89 | Concordium/concordium-client | Spec.hs | module Main where
import Test.Hspec
import qualified DataTests.DoubleWordSpec
import qualified SimpleClientTests.CliSpec
main :: IO ()
main = hspec $ parallel $ do
SimpleClientTests.CliSpec.tests
DataTests.DoubleWordSpec.tests
| null | https://raw.githubusercontent.com/Concordium/concordium-client/2ae3b56c384ac6803ec96a078e5d99de14b42ce2/test/Spec.hs | haskell | module Main where
import Test.Hspec
import qualified DataTests.DoubleWordSpec
import qualified SimpleClientTests.CliSpec
main :: IO ()
main = hspec $ parallel $ do
SimpleClientTests.CliSpec.tests
DataTests.DoubleWordSpec.tests
| |
140f5b7830902164154979c8438eaf0ada87278c07337431553960e99ab829b8 | albertoruiz/easyVision | graph.hs | # LANGUAGE TupleSections #
-- experiments with spectral graph matching
import Classifier.ToyProblems ( sshape )
import Classifier ( addNoise, boxAttr, preprocess )
import Util.Misc ( vec )
import Util.Debug(debug)
import Util.Gaussian ()
import Numeric.LinearAlgebra
import Vision.GUI.Simple
import Image ( Point(Point... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/patrec/graph.hs | haskell | experiments with spectral graph matching
-------------------------------------------------------------------------
randomIO
data matrix
similarity matrix
graph (or s)
laplacian and eigenvectors in columns
RW
-------------------------------------------------------------------- | # LANGUAGE TupleSections #
import Classifier.ToyProblems ( sshape )
import Classifier ( addNoise, boxAttr, preprocess )
import Util.Misc ( vec )
import Util.Debug(debug)
import Util.Gaussian ()
import Numeric.LinearAlgebra
import Vision.GUI.Simple
import Image ( Point(Point) )
import Graphics.UI.GLUT
( vertex, re... |
c4eaab13befdde85e27ca5c65f0712572af1c0bd5ffe074520d986e821f80f11 | mirage/alcotest | fail_with.ml | let test_lwt _switch () = Lwt.fail_with "should fail"
let () =
let open Alcotest_lwt in
Lwt_main.run
@@ run ~record_backtrace:false __FILE__
[
( "all",
[
test_case "one" `Quick test_lwt;
test_case "two" `Quick (fun _ () -> Lwt.return_unit);
] );
... | null | https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/test/e2e/alcotest-lwt/failing/fail_with.ml | ocaml | let test_lwt _switch () = Lwt.fail_with "should fail"
let () =
let open Alcotest_lwt in
Lwt_main.run
@@ run ~record_backtrace:false __FILE__
[
( "all",
[
test_case "one" `Quick test_lwt;
test_case "two" `Quick (fun _ () -> Lwt.return_unit);
] );
... | |
353d415540521911ed35b15f81642b2f7aa2ab07ebd142a2f028fd13c948cb5a | ublubu/shapes | Contact.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
|
This is the backbone of the physics engine .
The functions here find contacts between o... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/src/Physics/Solvers/Contact.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
| Calculate all contacts for the current frame.
^ the world
^ list of contacts between shapes (in descending order of 'ObjectFeatureKey' because the caches are ordered)
| Update a pair of shapes based on the sol... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
|
This is the backbone of the physics engine .
The functions here find contacts between objects and generate and solve constraints for these contacts .
It exploits temporal coherence of the scene by cachi... |
54ba241bdd63f56a2b56d50f5d0838cd06649bd3cc058f152c6ad1e4ce8d5110 | tuscland/lw-dns-sd | browse.lisp | -*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
DNS Service Discovery for LispWorks .
Copyright ( c ) 2013 , . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the ... | null | https://raw.githubusercontent.com/tuscland/lw-dns-sd/2ae7e54b8bc3a89d267c2e91b083cd154bb1187d/examples/browse.lisp | lisp | mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
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,
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
exp... |
DNS Service Discovery for LispWorks .
Copyright ( c ) 2013 , . All rights reserved .
software distributed under the License is distributed on an " AS
Example code for asynchronous service browsing using the CAPI
to integrate DNS - SD with the CAPI .
( CL - USER::BROWSER - EXAMPLE )
(load (curren... |
eb5c5272868d6bba3453a223cfbf3579476a4b74715e35f5e4d3bbe753892c26 | 5outh/textlunky | Player.hs | # LANGUAGE TemplateHaskell #
module Types.Player(
Player(..),
playerSnippet,
alive,
moveToEntity
) where
import Data.Default
import Control.Lens
import Data.List(intercalate)
import Data.Direction
import Types.Consumable
import Types.Item
import Types.Block
import Types.Enemy
import Types.Jewel
import Types.Gr... | null | https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Types/Player.hs | haskell | | Passive items
| Current Item in hands
| Kali favor
| Starting Player
| Full show, exclude favor since it's a hidden stat
| Information to show on each round
--- Extras -----
What when the player moves onto another an entity?
whip or whatever on the current spot and move out of the way
before this fir... | # LANGUAGE TemplateHaskell #
module Types.Player(
Player(..),
playerSnippet,
alive,
moveToEntity
) where
import Data.Default
import Control.Lens
import Data.List(intercalate)
import Data.Direction
import Types.Consumable
import Types.Item
import Types.Block
import Types.Enemy
import Types.Jewel
import Types.Gr... |
a7f8a319211c33108e07f93566cd7242611c15a5251a680c2b9ce52ad31963d4 | mu-chaco/ReWire | Mangle.hs | # LANGUAGE Trustworthy #
module ReWire.Core.Mangle (mangle) where
this is from the ghc package
import Data.Text (Text, pack, unpack)
-- TODO: text version of this?
mangle :: Text -> Text
mangle = pack . zEncodeString . unpack
| null | https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Core/Mangle.hs | haskell | TODO: text version of this? | # LANGUAGE Trustworthy #
module ReWire.Core.Mangle (mangle) where
this is from the ghc package
import Data.Text (Text, pack, unpack)
mangle :: Text -> Text
mangle = pack . zEncodeString . unpack
|
45699297d99ba5b0bdad8ce69aa382b11ec63066a03d1731b8fae7af5a1271ca | awakesecurity/language-ninja | DocTests.hs | -*- coding : utf-8 ; mode : ; -*-
-- File: tests/Tests.hs
--
-- License:
-- Copyright 2017 Awake Security
--
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
--
-- ... | null | https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/tests/DocTests.hs | haskell | File: tests/Tests.hs
License:
Copyright 2017 Awake Security
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND... | -*- coding : utf-8 ; mode : ; -*-
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Main (main) where
import qualified Build_doctests as DC
import Data.Foldable (traverse_)
import Test.... |
e12357efb6b5f3ed848bbaf31496f10d3bd6065cceda09d5d3b27c2686321019 | alex-hhh/data-frame | histogram.rkt | #lang racket/base
;; histogram.rkt -- histograms and histogram plots for data frames
;;
;; This file is part of data-frame -- -hhh/data-frame
Copyright ( c ) 2018 < >
;;
;; This program is free software: you can redistribute it and/or modify it
;; under the terms of the GNU Lesser General Public License as publis... | null | https://raw.githubusercontent.com/alex-hhh/data-frame/70e6e274e3c207ca22eeefda00f3af9f30c8282a/private/histogram.rkt | racket | histogram.rkt -- histograms and histogram plots for data frames
This file is part of data-frame -- -hhh/data-frame
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
option) any later version.
This program is distribu... | #lang racket/base
Copyright ( c ) 2018 < >
the Free Software Foundation , either version 3 of the License , or ( at your
You should have received a copy of the GNU Lesser General Public License
(require plot/no-gui
plot/utils
racket/contract
racket/list
racket/match
... |
c8d4fb0f078bc7ed00efc2b360ad744b3d2933e6c59cc87bf514f359ccd31e40 | skrah/minicaml | test12.ml | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
let _ =
let a = ref 0
in for i = 0 to 100 do
a := !a + 1; ()
done
| null | https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/test/test12.ml | ocaml | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
let _ =
let a = ref 0
in for i = 0 to 100 do
a := !a + 1; ()
done
| |
afd8320a5c418226358e9e79bd9d6e0db312638c838ac562f3f259505b338c0b | peterholko/pax_server | army.erl | Author :
Created : Feb 4 , 2009
%% Description: TODO: Add description to army
-module(army).
-behaviour(gen_server).
%%
%% Include files
%%
-include("game.hrl").
-include("common.hrl").
-include("schema.hrl").
-include_lib("stdlib/include/qlc.hrl").
%%
%% Exported Functions
%%
-export([move/3, attack/2, claim/2... | null | https://raw.githubusercontent.com/peterholko/pax_server/62b2ec1fae195ff915d19af06e56a7c4567fd4b8/src/army.erl | erlang | Description: TODO: Add description to army
Include files
Exported Functions
API Functions
Do nothing
Do nothing
Update subscription model
Toggle observedByList perception has been updated due to state change.
Local Functions
Move army coordinates
Add a trigger due to move
Set any newly discovered tiles... | Author :
Created : Feb 4 , 2009
-module(army).
-behaviour(gen_server).
-include("game.hrl").
-include("common.hrl").
-include("schema.hrl").
-include_lib("stdlib/include/qlc.hrl").
-export([move/3, attack/2, claim/2, battle_get_info/1, destroyed/1,
unit_transfered/1, combat/2, get_state/1]).
-export([... |
9fb4fc3ac57ef49b44743b91fbe654c59e46f32d079d0296d5efd07447fad7d2 | jumper149/go | Message.hs | module Message ( handleWS
) where
import Miso.WebSocket
import qualified Go.Run.Message as G
import Lobby.Operation
import Operation
handleWS :: WebSocket G.ServerMessage -> Operation
handleWS (WebSocketMessage msg) = case msg of
G.ServerMessageFail m -> WriteError... | null | https://raw.githubusercontent.com/jumper149/go/603e61f64e8e7c890bbc914fef6033b5ed7dd005/client/Message.hs | haskell | module Message ( handleWS
) where
import Miso.WebSocket
import qualified Go.Run.Message as G
import Lobby.Operation
import Operation
handleWS :: WebSocket G.ServerMessage -> Operation
handleWS (WebSocketMessage msg) = case msg of
G.ServerMessageFail m -> WriteError... | |
73b6fd6c95ed89a1d7644e2a87c89028ae03b2842ebbd1504564fb04aaaeb2c7 | RedPRL/asai | FileReader.mli | include Reader.S
| null | https://raw.githubusercontent.com/RedPRL/asai/51f3350b19f9214370d65edfc5c61fe92df1fbb7/src/file/FileReader.mli | ocaml | include Reader.S
| |
e97839fc9cd3cb089d488692c0dbf7b450edbd76c42419226ecdebc776c92f0e | jrm-code-project/LISP-Machine | nupi-tape.lisp | ;;; -*- Mode:LISP; Package:SYSTEM-INTERNALS; Base:8 -*-
(defvar nupi-tape-physical-unit #x18)
(defun nupi-tape-rewind ()
(let ((rqb (get-disk-rqb)))
(nupi-disk-command rqb #x20 nupi-tape-physical-unit 0 0 nil)
(return-disk-rqb rqb)))
(defun nupi-tape-write-filemark ()
(let ((rqb (get-disk-rqb)))
(nup... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io/nupi-tape.lisp | lisp | -*- Mode:LISP; Package:SYSTEM-INTERNALS; Base:8 -*-
got file mark before finishing transfer, or something like that |
(defvar nupi-tape-physical-unit #x18)
(defun nupi-tape-rewind ()
(let ((rqb (get-disk-rqb)))
(nupi-disk-command rqb #x20 nupi-tape-physical-unit 0 0 nil)
(return-disk-rqb rqb)))
(defun nupi-tape-write-filemark ()
(let ((rqb (get-disk-rqb)))
(nupi-disk-command rqb #x25 nupi-tape-physical-unit 0 0 nil)... |
7e5d7bb7eacf38626d3145ccbcd549126479489b2ee9026b6ec5ebf7aeb75e3d | andorp/bead | I18N.hs | module Bead.View.Translation.I18N where
import Text.Printf (printf)
import Bead.View.Translation.Base
-- The I18N is a mapping from a given translation key
-- to the actual translation of the message
type I18N = Translation String -> String
-- | The Translation Message represents a message that
-- can be rendered ou... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Translation/I18N.hs | haskell | The I18N is a mapping from a given translation key
to the actual translation of the message
| The Translation Message represents a message that
can be rendered out the the UI, the message could
Translate the parametrized message with the given localization | module Bead.View.Translation.I18N where
import Text.Printf (printf)
import Bead.View.Translation.Base
type I18N = Translation String -> String
be a normal message or a parametrized one
data TransMsg
= TransMsg (Translation String)
| TransPrmMsg (Translation String) String
| TransPrm2Msg (Translation String) ... |
0737e0356056ae4caeb6815e51350e89b4afda1c3e61437581739a75d6e26167 | dreixel/syb | Paradise.hs | module Paradise (tests) where
{-
This test runs the infamous PARADISE benchmark,
which is the HELLO WORLD example of generic programming,
i.e., the "increase salary" function is applied to
a typical company just as shown in the boilerplate paper.
-}
import Test.Tasty.HUnit
import Data.Generics
import CompanyDataty... | null | https://raw.githubusercontent.com/dreixel/syb/4806afeb2ea824a3ea9969e23ca2c9569cd20d84/tests/Paradise.hs | haskell |
This test runs the infamous PARADISE benchmark,
which is the HELLO WORLD example of generic programming,
i.e., the "increase salary" function is applied to
a typical company just as shown in the boilerplate paper.
Increase salary by percentage
"interesting" code for increase | module Paradise (tests) where
import Test.Tasty.HUnit
import Data.Generics
import CompanyDatatypes
increase :: Double -> Company -> Company
increase k = everywhere (mkT (incS k))
incS :: Double -> Salary -> Salary
incS k (S s) = S (s * (1+k))
tests = increase 0.125 genCom @=? output
output = C [D "Research" (E (... |
36ce7c79503d543f717c21daefde6b37f9f0ed6295ea0efb3fb45c40086201aa | zadean/xqerl | fn_QName_SUITE.erl | -module('fn_QName_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['ExpandedQNameConstructFunc001'/1]).
-export(['ExpandedQNameConstructFunc002'/1]).
-ex... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_QName_SUITE.erl | erlang | -module('fn_QName_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['ExpandedQNameConstructFunc001'/1]).
-export(['ExpandedQNameConstructFunc002'/1]).
-ex... | |
95055e50db1c2972562eac31a34aec224dfcc944a5ca64d5c27027fd48c5efc5 | vasyaod/parental-control | WindowsHomeCommand.hs | {-# LANGUAGE OverloadedStrings #-}
module WindowsHomeCommand where
import Config
import Exec
import System.Process
import System.Exit
import System.IO
import Text.Format
import Text.Printf
import Hledger.Utils.String
import Data.List
-- Thanks to
-- and PR -control/issues/4
--
-- The next command returns list of a... | null | https://raw.githubusercontent.com/vasyaod/parental-control/b51b0c8b7e5983b266fdcd59d8d1c5e657bb1156/schedule-daemon/src/WindowsHomeCommand.hs | haskell | # LANGUAGE OverloadedStrings #
Thanks to
and PR -control/issues/4
The next command returns list of authorized in the system
> wmic COMPUTERSYSTEM GET USERNAME
the command returns
UserName
nellie-book\yasha
The next command allows to log out a user
> shutdown /l
The following command allows to send a ... |
module WindowsHomeCommand where
import Config
import Exec
import System.Process
import System.Exit
import System.IO
import Text.Format
import Text.Printf
import Hledger.Utils.String
import Data.List
> msg : 10 " Test "
runKillCommand :: Exec m => Commands -> String -> m ()
runKillCommand commands userName = ... |
5dc0d71aff2615cfbd109b7e2180848b319629d7c59a85f4361fa79c0a1c0a46 | mbenke/zpf2013 | IORef2.hs | import Data.IORef
import Control.Concurrent
incRef :: IORef Int -> IO ()
incRef var = do { val <- readIORef var
; threadDelay 1000
; writeIORef var (val+1) }
main = do
px <- newIORef 0
forkIO $ incRef px
forkIO $ incRef px
threadDelay 3000
readIORef px >>= print | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Concur/IORef2.hs | haskell | import Data.IORef
import Control.Concurrent
incRef :: IORef Int -> IO ()
incRef var = do { val <- readIORef var
; threadDelay 1000
; writeIORef var (val+1) }
main = do
px <- newIORef 0
forkIO $ incRef px
forkIO $ incRef px
threadDelay 3000
readIORef px >>= print | |
dbcae78d9dbf6ad619b4fe74f56e87ed30feee0d156c0687d264ef1238fd7766 | janestreet/ppx_csv_conv | ppx_csv_conv_deprecated.ml | open Base
open Ppxlib
open Ast_builder.Default
let extension_name = "csv"
let unsupported_type_error_msg ~name =
Printf.sprintf "The type %s is not natively supported in the csv camlp4 extension" name
;;
let useless_merge_recursive _log ~field_name:_ ~tp:_ ast = ast
let edot ~loc path_opt id =
pexp_ident
~l... | null | https://raw.githubusercontent.com/janestreet/ppx_csv_conv/9f7628490dcb83098b46295d7b3db8b5230c2029/src/ppx_csv_conv_deprecated.ml | ocaml | * Generate the list of fields contained in a flattened record type
Generate the specification of the headers as a tree. This is useful to generate headers
consisting of multiple rows, each field grouping those below.
* Generate the some type using a csv row (a list of strings) | open Base
open Ppxlib
open Ast_builder.Default
let extension_name = "csv"
let unsupported_type_error_msg ~name =
Printf.sprintf "The type %s is not natively supported in the csv camlp4 extension" name
;;
let useless_merge_recursive _log ~field_name:_ ~tp:_ ast = ast
let edot ~loc path_opt id =
pexp_ident
~l... |
7b06d9e6f17675aaa52f0228bc860a31842e5a7ceb99066e6690f9b10bf79e51 | yesodweb/serversession | Internal.hs | -- | Internal module exposing the guts of the package. Use at
-- your own risk. No API stability guarantees apply.
--
-- @UndecidableInstances@ is required in order to implement @Eq@,
@Ord@ , @Show@ , etc . on data types that have @Decomposed@
-- fields, and should be fairly safe.
module Web.ServerSession.Core.Inte... | null | https://raw.githubusercontent.com/yesodweb/serversession/bdede5fb660890df670f103d64a5e69024b13e57/serversession/src/Web/ServerSession/Core/Internal.hs | haskell | | Internal module exposing the guts of the package. Use at
your own risk. No API stability guarantees apply.
@UndecidableInstances@ is required in order to implement @Eq@,
fields, and should be fairly safe.
--------------------------------------------------------------------
the session data type this session I... | @Ord@ , @Show@ , etc . on data types that have @Decomposed@
module Web.ServerSession.Core.Internal
( SessionId(..)
, checkSessionId
, generateSessionId
, AuthId
, Session(..)
, SessionMap(..)
, IsSessionData(..)
, DecomposedSession(..)
, Storage(..)
, StorageException(..)
, State(..)
, cre... |
7c55189d998e41e408cf8a9f21ceb18011b1cdb5f1a66949dcbd7ce0b9f8cc9b | clojure-emacs/refactor-nrepl | s_expressions_test.clj | (ns refactor-nrepl.s-expressions-test
(:require
[clojure.test :as t]
[refactor-nrepl.s-expressions :as sut]))
(def file-content (slurp "testproject/src/com/example/sexp_test.clj"))
(def weird-file-content ";; some weird file
;; not even clojure
;; perhaps? no parens!")
(def file-content-with-set ";; with s... | null | https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/f7858784220ccd354a19155a9044cc3ceb34660e/test/refactor_nrepl/s_expressions_test.clj | clojure | some weird file
not even clojure
perhaps? no parens!")
with set
some other stuff
unhelpful comment ) | (ns refactor-nrepl.s-expressions-test
(:require
[clojure.test :as t]
[refactor-nrepl.s-expressions :as sut]))
(def file-content (slurp "testproject/src/com/example/sexp_test.clj"))
#{foo bar baz}
(foobar baz)")
(def file-content-with-uneval "#_ foo
(foobar baz)")
(def binding-location [3 8])
(def set-loca... |
81433c9bf8be83098bace9f904eb2a5cffcd895398aac9dc5f3453daaee7ed04 | facebook/infer | Subtype.mli |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/facebook/infer/4ee1c2a8e783ee770b61547a38ff1715d6ed75fe/infer/src/IR/Subtype.mli | ocaml | * The Smallfoot Intermediate Language: Subtypes
* denotes the current type only
* denotes the current type and any subtypes
* equality ignoring flags in the subtype |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
c4346cf405c622e3c89653cf166b3ccc1e50f22aa2356909143d1837df3beee5 | tezos/tezos-mirror | commitment_sig.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 TriliTech < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/1b26ce0f9c2a9c508a65c45641a0a146d9b52fc7/src/proto_016_PtMumbai/lib_sc_rollup_node/commitment_sig.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER... |
6b80897c557c41ae2e27f77a43d2c0f29c0c3912d064b8e951ff9a24e9620b0d | mirage/ocaml-rpc | client_server_test.ml | (** This test verifies that the client and server functions generated by the
IDL interoperate correctly *)
open Idl.Exn
let test_call_core () =
let server =
let module Server = Test_common.Test_interface.Interface (GenServer ()) in
Server.add (fun a b -> a + b);
Server.sub (fun a b -> a - b);
Ser... | null | https://raw.githubusercontent.com/mirage/ocaml-rpc/2ac81a2fb20775fdd7637a193a3c573f34a9cb08/tests/lib/client_server_test.ml | ocaml | * This test verifies that the client and server functions generated by the
IDL interoperate correctly | open Idl.Exn
let test_call_core () =
let server =
let module Server = Test_common.Test_interface.Interface (GenServer ()) in
Server.add (fun a b -> a + b);
Server.sub (fun a b -> a - b);
Server.mul (fun a b -> a * b);
Server.div (fun a b -> a / b);
Server.ping (fun () -> "OK");
server Ser... |
dd3c00825b6282f9ca5929d44b9ae28852b837454ff8faa5f7f4936ae001c6eb | mistupv/cauder | cauder_wx_dialog.erl | -module(cauder_wx_dialog).
%% API
-export([start_session/2, stop_session/1]).
-export([edit_binding/2]).
-export([choose_message/2]).
-export([drop_files/2]).
-export([about/1]).
% TODO Remove
-elvis([{elvis_style, nesting_level, #{ignore => [cauder_wx_dialog, start_session, 2]}}]).
-include("cauder.hrl").
-include(... | null | https://raw.githubusercontent.com/mistupv/cauder/c9bfb72a4aed70979e53f4b3ca4a085a19b6c195/src/cauder_wx_dialog.erl | erlang | API
TODO Remove
------------------------------------------------------------------------------
@doc Shows a dialog where the use can choose the execution mode, with the
required information in each case.
----- Content ----- %%
-----
----- Buttons ----- %%
-----
-----
-------------------------------------------... | -module(cauder_wx_dialog).
-export([start_session/2, stop_session/1]).
-export([edit_binding/2]).
-export([choose_message/2]).
-export([drop_files/2]).
-export([about/1]).
-elvis([{elvis_style, nesting_level, #{ignore => [cauder_wx_dialog, start_session, 2]}}]).
-include("cauder.hrl").
-include("cauder_message.hrl")... |
dbef2f228c85cff1be3994a3931bbafd7abc6d9e6843ae839727ce1bb71daeb5 | vadimbakaev/flatmap.io | DevelMain.hs | -- | Running your app inside GHCi.
--
-- This option provides significantly faster code reload compared to
@yesod devel@. However , you do not get automatic code reload
-- (which may be a benefit, depending on your perspective). To use this:
--
1 . Start up GHCi
--
-- $ stack ghci h-map:lib --no-load --work-dir .st... | null | https://raw.githubusercontent.com/vadimbakaev/flatmap.io/766069a8b1317a1e5a4546f3358d04c3c901f693/app/DevelMain.hs | haskell | | Running your app inside GHCi.
This option provides significantly faster code reload compared to
(which may be a benefit, depending on your perspective). To use this:
$ stack ghci h-map:lib --no-load --work-dir .stack-work-devel
> :l app/DevelMain.hs
> DevelMain.update
> :r
> DevelMain.update
You ... | @yesod devel@. However , you do not get automatic code reload
1 . Start up GHCi
2 . Load this module
3 . Run @update@
4 . Your app should now be running , you can connect at :3000
5 . Make changes to your code
6 . After saving your changes , reload by running :
or manually @touch@ another Haskell module... |
1c9ff05cc18791ace508586c39ef91ccfda87c761b85d14884d31ff17bcbf7f7 | rowangithub/DOrder | 16_tacas06.ml |
* From " A Practical and Complete Approach to Predicate Refinement " by
* From "A Practical and Complete Approach to Predicate Refinement" by McMillan TACAS'06
*)
let rec loop x y (i:int) (j:int) =
if (x <> 0) then
loop (x-1) (y-1) i j
else if (i = j) then assert (y = 0)
else ()
let main i j =
let x... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/16_tacas06.ml | ocaml |
* From " A Practical and Complete Approach to Predicate Refinement " by
* From "A Practical and Complete Approach to Predicate Refinement" by McMillan TACAS'06
*)
let rec loop x y (i:int) (j:int) =
if (x <> 0) then
loop (x-1) (y-1) i j
else if (i = j) then assert (y = 0)
else ()
let main i j =
let x... | |
e88e7b6b4f086d664789e377d23f8968e731cdb6e22b1586b0c3a39f4f940474 | ivanjovanovic/sicp | e-2.2.scm | Exercise 2.2 .
;
; Consider the problem of representing line segments in a plane. Each segment is
; represented as a pair of points: a starting point and an ending point. Define a constructor
; make-segment and selectors start-segment and end-segment that define the representation of
; segments in terms of points. Fu... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/2.1/e-2.2.scm | scheme |
Consider the problem of representing line segments in a plane. Each segment is
represented as a pair of points: a starting point and an ending point. Define a constructor
make-segment and selectors start-segment and end-segment that define the representation of
segments in terms of points. Furthermore, a point can... | Exercise 2.2 .
(load "../common.scm")
(define (print-point p)
(display "(")
(display (x-point p))
(display ",")
(display (y-point p))
(display ")")
(newline))
of abstraction first , so we do not deal with details of implementation
(define (make-segment sp ep)
(cons sp ep))
(define (start-segment ... |
3a9dbfdb6281f783676431f2c8bd21fd57c05baab2025d4652020097487d87fd | byorgey/AoC | 18Fused.hs | # LANGUAGE FlexibleContexts #
import Control.Arrow
import Text.Parsec hiding (State)
import Text.Parsec.Expr
import Text.Parsec.Language (emptyDef)
import Text.Parsec.String
import qualified Text.Parsec.Token as T
main = interact $
lines >>> applyAll [so... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2020/18/18Fused.hs | haskell | ----------------------------------------------------------
----------------------------------------------------------
---------------------------------------------------------- | # LANGUAGE FlexibleContexts #
import Control.Arrow
import Text.Parsec hiding (State)
import Text.Parsec.Expr
import Text.Parsec.Language (emptyDef)
import Text.Parsec.String
import qualified Text.Parsec.Token as T
main = interact $
lines >>> applyAll [so... |
77ef08519af590340aa5445d02df4dfb53781557d4d5ec377ff22f4c58039a2d | Simre1/haskell-game | NonDet.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE NoPolyKinds #
# OPTIONS_HADDOCK not - home #
module Polysemy.Internal.NonDet where
------------------------------------------------------------------------------
-- | An effect corresponding to the 'Control.Applicative.Alternative' typec... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/src/Polysemy/Internal/NonDet.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveFunctor #
----------------------------------------------------------------------------
| An effect corresponding to the 'Control.Applicative.Alternative' typeclass. | # LANGUAGE NoPolyKinds #
# OPTIONS_HADDOCK not - home #
module Polysemy.Internal.NonDet where
data NonDet m a
= Empty
| Choose (m a) (m a)
|
bf245c5830e32fe2d0f7c5df9545279b8c7a4fb60600d63a909cab1977496f96 | b1412/clojure-web-admin | excel.clj | (ns clojure-web.common.excel
(:require
[clojure-web.metadata-kit :refer [has-feature?]]
[clojure-web.db.entity
:refer
[get-all-columns-with-comment]]
[excel-templates.build :refer [render-to-file]]
[taoensso.timbre :as log]
[korma.core :refer [select]]))
(defn to-excel-data [entity-data column... | null | https://raw.githubusercontent.com/b1412/clojure-web-admin/018161dcdb364cc168d6f5a56ceb798005a0701f/src/clj/clojure_web/common/excel.clj | clojure | (ns clojure-web.common.excel
(:require
[clojure-web.metadata-kit :refer [has-feature?]]
[clojure-web.db.entity
:refer
[get-all-columns-with-comment]]
[excel-templates.build :refer [render-to-file]]
[taoensso.timbre :as log]
[korma.core :refer [select]]))
(defn to-excel-data [entity-data column... | |
4e9da48f935d19084bcb152c619f3fd1e22eaf4b657e3ac72d28f14e84b9edde | nikita-volkov/hasql-cursor-query | Transactions.hs | module Hasql.CursorQuery.Transactions
(
cursorQuery,
)
where
import Hasql.CursorQuery.Private.Transactions
| null | https://raw.githubusercontent.com/nikita-volkov/hasql-cursor-query/d249b02abac2ee8b77d4e0bd90f7a5d8c5161f83/library/Hasql/CursorQuery/Transactions.hs | haskell | module Hasql.CursorQuery.Transactions
(
cursorQuery,
)
where
import Hasql.CursorQuery.Private.Transactions
| |
9c07d9a419983d38d15b0e5bcf556be76d58f7adf769d0020d8b0f05b4419215 | SuYi1995/game_server | util.erl | %%%-------------------------------------------------------------------
%%% @author sy
( C ) 2019 , < COMPANY >
%%% @doc
%%% 通用工具模块
%%% @end
Created : 30 . 9月 2019 10:47
%%%-------------------------------------------------------------------
-module(util).
-include("common.hrl").
%% 数据库辅助相关
-export([
batch_ins... | null | https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/util/util.erl | erlang | -------------------------------------------------------------------
@author sy
@doc
通用工具模块
@end
-------------------------------------------------------------------
数据库辅助相关
列表 [lists, proplists]
----------------------------------------------------------
数据处理相关
---------------------------------------------------... | ( C ) 2019 , < COMPANY >
Created : 30 . 9月 2019 10:47
-module(util).
-include("common.hrl").
-export([
batch_insert/5,
batch_insert/6,
batch_insert/7,
insert_values/4,
insert_values/5,
insert_values/6,
format_values/2
]).
-export([
prop_get_value/2,
prop_get_value/3,
prop... |
97e93e33bb2e270bf8df4592487b54276551920ca9f30550835415d208d680ee | srid/ema | Spec.hs | module Main where
-- | Filler module so cabal will be happy that there's a main-is
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/srid/ema/61faae56aa0f3c6ca815f344684cc566f6341662/ema-generics/test/type-errors/Spec.hs | haskell | | Filler module so cabal will be happy that there's a main-is | module Main where
main :: IO ()
main = pure ()
|
49a71a26293a6e9de0ec3966fbceec81ca06ee3a86b2f1ccd23024d691edaa12 | stumpwm/stumpwm-contrib | package.lisp | package.lisp
(defpackage #:swm-pomodoro
(:use #:cl #:stumpwm)
(:export #:*bell-sound-file*
#:*sound-play-command*))
(in-package :swm-pomodoro)
(defvar status-message nil
"Status message for dashboard, as well as for StumpWM modeline
when `notifications` are on.")
(defvar notifications-loaded
(... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/c4cad24328502d8f2973db62f67c9788852c821c/util/pomodoro/package.lisp | lisp | package.lisp
(defpackage #:swm-pomodoro
(:use #:cl #:stumpwm)
(:export #:*bell-sound-file*
#:*sound-play-command*))
(in-package :swm-pomodoro)
(defvar status-message nil
"Status message for dashboard, as well as for StumpWM modeline
when `notifications` are on.")
(defvar notifications-loaded
(... | |
50c44491f1014346ecc3a04ca356b85f3dead289874e771290e2cf93f08fde84 | mflatt/sirmail | pref.rkt | (module pref mzscheme
(require mzlib/class
framework
mred
mzlib/list
mzlib/string
mzlib/etc
net/head)
;; IMPORTANT! All preferences operations outside this
;; file should go through the following exports.
;; DO NOT use preferences:... elsewhere.
(provide get-pref put-pref
show-pr... | null | https://raw.githubusercontent.com/mflatt/sirmail/5a08636d126ea04b5c903ab42a6e7eb2b143d864/sirmail/pref.rkt | racket | IMPORTANT! All preferences operations outside this
file should go through the following exports.
DO NOT use preferences:... elsewhere.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Preference Definitions ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
u... | (module pref mzscheme
(require mzlib/class
framework
mred
mzlib/list
mzlib/string
mzlib/etc
net/head)
(provide get-pref put-pref
show-pref-dialog
add-preferences-menu-items)
(define (string-or-false? x) (or (not x) (string? x)))
(define (ip-string? x) (and (string? x)
... |
1da16886f96726dccca9b4fe5619ac4c48ed44cd1332f5d4a19a218b2a1c1654 | clojure-interop/java-jdk | MultiScrollBarUI.clj | (ns javax.swing.plaf.multi.MultiScrollBarUI
"A multiplexing UI used to combine ScrollBarUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiScrollBarUI]))
(defn ->multi-scroll-bar-ui
"Constructor."
(^MultiScrollBa... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/multi/MultiScrollBarUI.clj | clojure | (ns javax.swing.plaf.multi.MultiScrollBarUI
"A multiplexing UI used to combine ScrollBarUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiScrollBarUI]))
(defn ->multi-scroll-bar-ui
"Constructor."
(^MultiScrollBa... | |
6d508c9eaa0ce471e4bd0ddbe0aa7bee3ce31953985f3e3521a52b5e895a9134 | haskell/vector | sum-ratio.hs | import qualified Data.Vector as U
import Data.Ratio
main = print . U.sum $ U.replicate (100000000 :: Int) (1 % 2 :: Rational)
| null | https://raw.githubusercontent.com/haskell/vector/4c87e88f07aad166c6ae2ccb94fa539fbdd99a91/old-testsuite/microsuite/sum-ratio.hs | haskell | import qualified Data.Vector as U
import Data.Ratio
main = print . U.sum $ U.replicate (100000000 :: Int) (1 % 2 :: Rational)
| |
295f1182ad44a04e2ef794381620047d73bb3a14c4149417df64034493545751 | S8A/htdp-exercises | ex187.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex187) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex187.rkt | racket | about the language level of this file in a form that our tools can easily process.
(make-gp String Number)
scored a maximum of s points
- '()
sorts a list of game players by their score in descending order
inserts player p into the sorted list of players
is player A's score greater than or equal to player B's | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex187) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings ... |
43823b7c566ecd48188172db548ae18616a0f241d059e0a9937fcc56cceeb072 | hammerlab/biokepi | hisat.ml | open Biokepi_run_environment
open Common
module Remove = Workflow_utilities.Remove
module Configuration = struct
type t = {
name : string;
version : [`V_0_1_6_beta | `V_2_0_2_beta];
}
let to_json {name; version}: Yojson.Basic.json =
`Assoc [
"name", `String name;
"version",
(match ... | null | https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/bfx_tools/hisat.ml | ocaml | open Biokepi_run_environment
open Common
module Remove = Workflow_utilities.Remove
module Configuration = struct
type t = {
name : string;
version : [`V_0_1_6_beta | `V_2_0_2_beta];
}
let to_json {name; version}: Yojson.Basic.json =
`Assoc [
"name", `String name;
"version",
(match ... | |
e9600e620a4e940abb909517b982473cad6831a98210ca56c677ba66629128ad | DavidAlphaFox/RabbitMQ | crashing_queues.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-test/test/src/crashing_queues.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.
Since it's conv... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module(... |
164dc0183402356ad0cc3617cf4a4cbbe9571fb00f62b895bc0e8798b26f1af5 | Leapsight/plum_db | plum_db_partitions_sup.erl | %% =============================================================================
%% plum_db_partitions_sup.erl -
%%
Copyright ( c ) 2017 - 2021 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the Li... | null | https://raw.githubusercontent.com/Leapsight/plum_db/76f4d5113ed26cce4b38ce504f6965a2bcda95ed/src/plum_db_partitions_sup.erl | erlang | =============================================================================
plum_db_partitions_sup.erl -
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANT... | Copyright ( c ) 2017 - 2021 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(plum_db_partitions_sup).
-behaviour(supervisor).
-export([get_db_info/1]).
-export([set_db_info/2])... |
50cc25c57edfd6519629b061c1c794c5f0a56ead7c4c2c68d988122a64b86ed3 | onyx-platform/onyx | entry.clj | (ns onyx.log.entry)
(defn create-log-entry [kw args]
{:fn kw :args args})
| null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/log/entry.clj | clojure | (ns onyx.log.entry)
(defn create-log-entry [kw args]
{:fn kw :args args})
| |
e29033bea3e98da7da95e2bad1768046c9a7fcc39e73bf2f56f5b98469cd6144 | OCamlPro/OCamlPro-OCaml-Branch | odoc_ast.ml | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/ocamldoc/odoc_ast.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Asttypes
open Type... |
b03e400268177d9b899aa90288cfebd07eabd9221cef13c4ba2f3d2c5b19d614 | Elzair/nazghul | special.scm | ;;----------------------------------------------------------------------------
Special -- one - off stuff that needs to be kern - loaded and does n't really fit
;; anywhere else.
;;----------------------------------------------------------------------------
(kern-mk-sprite-set 'ss_special 32 32 3 3 0 0 "gfx/special.... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/template/lib/special.scm | scheme | ----------------------------------------------------------------------------
anywhere else.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
generator that invokes it.
---------------------------------------------... | Special -- one - off stuff that needs to be kern - loaded and does n't really fit
(kern-mk-sprite-set 'ss_special 32 32 3 3 0 0 "gfx/special.png")
(kern-mk-sprite 's_gold_skull ss_special 1 0 #f 0)
(kern-mk-sprite 's_power_core ss_special 1 1 #f 0)
generator -- procedure invoked by a step trigger to create
A... |
a1ccfd78e25a54be0e30f33639349843a7cd1233276f8be6d029a6d01bd4bd8f | scverif/scverif | ilexport.mli | (* Copyright 2019 - NXP *)
SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications
val serialize_mvcheck: Scv.scvcheckkind -> Ileval.state -> Ileval.initial -> Il.macro -> unit
val serialize_mvprog: Ileval.state -> Ileval.initial -> Il.macro -> unit
| null | https://raw.githubusercontent.com/scverif/scverif/307a17b61a2286fb7009d434825f9245caebfddc/src/ilexport.mli | ocaml | Copyright 2019 - NXP | SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications
val serialize_mvcheck: Scv.scvcheckkind -> Ileval.state -> Ileval.initial -> Il.macro -> unit
val serialize_mvprog: Ileval.state -> Ileval.initial -> Il.macro -> unit
|
0c6d1cdff01f242e9d2a6ff08201ae8869179df446a08454eda816a3a8bebcb5 | gbwey/predicate-typed | doctests.hs | import Test.DocTest
main :: IO ()
main = doctest ["src","-XNoStarIsType"]
--main = doctest ["src","--verbose","-XNoStarIsType"]
stack exec doctest -- " src / Predicate.hs "
-- stack exec doctest -- src
| null | https://raw.githubusercontent.com/gbwey/predicate-typed/51f8d51f662722e1109d2ff35644aea1e0371b42/doctest/doctests.hs | haskell | main = doctest ["src","--verbose","-XNoStarIsType"]
" src / Predicate.hs "
stack exec doctest -- src | import Test.DocTest
main :: IO ()
main = doctest ["src","-XNoStarIsType"]
|
6a8517bc8ce650ab75de2e3768b5f44843e667e4f6af437016eba201bc46dd04 | EveryTian/Haskell-Codewars | reversed-strings.hs | -strings
module Solution where
solution :: String -> String
solution = reverse
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/8kyu/reversed-strings.hs | haskell | -strings
module Solution where
solution :: String -> String
solution = reverse
| |
18d159e0246402e15dada2d3cd31eb1c0c9ca90f4ca8a5d47f205549c67777d1 | opencog/opencog | getChildren.scm | ;; Returning children associated with current target.
(define getChildren
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$relationshipNode")
(TypeChoice
(TypeNode "DefinedLinguisticRelationshipNode")
(TypeNode "P... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/getChildren.scm | scheme | Returning children associated with current target. |
(define getChildren
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$relationshipNode")
(TypeChoice
(TypeNode "DefinedLinguisticRelationshipNode")
(TypeNode "PrepositionalRelationshipNode")
)
... |
5d4f7fb3730ece5adef4b1c9d18d12d6271772809c534dcf6a8556b10aa378e7 | monadfix/ormolu-live | PprColour.hs | module PprColour where
import GhcPrelude
import Data.Maybe (fromMaybe)
import Util (OverridingBool(..), split)
import Data.Semigroup as Semi
-- | A colour\/style for use with 'coloured'.
newtype PprColour = PprColour { renderColour :: String }
instance Semi.Semigroup PprColour where
PprColour s1 <> PprColour s2 = ... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/utils/PprColour.hs | haskell | | A colour\/style for use with 'coloured'.
| Allow colours to be combined (e.g. bold + red);
In case of conflict, right side takes precedence.
| Parse the colour scheme from a string (presumably from the @GHC_COLORS@
environment variable). | module PprColour where
import GhcPrelude
import Data.Maybe (fromMaybe)
import Util (OverridingBool(..), split)
import Data.Semigroup as Semi
newtype PprColour = PprColour { renderColour :: String }
instance Semi.Semigroup PprColour where
PprColour s1 <> PprColour s2 = PprColour (s1 <> s2)
instance Monoid PprColou... |
cb2d5bc42d4c074c0c6f393209aca37d1fbdf1b54fd50a99419b776e2c1310d0 | clojure-garden/clojure-garden | subs.cljs | (ns platform.ui.components.footer.subs
(:require
[clojure.string :as str]
[platform.ui.utils.string :refer [format]]
[re-frame.core :as rf]))
(rf/reg-sub
::copyright
(fn [_ _]
"© 2021 Freshcode LTD. All rights reserved."))
(rf/reg-sub
::version
:<- [:app/build-meta]
(fn [{:keys [version ... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/9c58ce33f91aeab5f7bd0d16647ecc450ba8967f/modules/frontend/src/platform/ui/components/footer/subs.cljs | clojure | (ns platform.ui.components.footer.subs
(:require
[clojure.string :as str]
[platform.ui.utils.string :refer [format]]
[re-frame.core :as rf]))
(rf/reg-sub
::copyright
(fn [_ _]
"© 2021 Freshcode LTD. All rights reserved."))
(rf/reg-sub
::version
:<- [:app/build-meta]
(fn [{:keys [version ... | |
af6eb561c62630f060dc3cc2e20e1c2663e6369aa7680d7cbd49ebb7ac0800af | informatimago/lisp | package-fun.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : package.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; See defpackage documentation string.
;;;;
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/lisp-reader/package-fun.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
See defpackage documentation string.
Removed " Z " prefix to CL
symbol names; shadowed and exported them.
packages ca... | FILE : package.lisp
USER - INTERFACE :
< XACH > < > ,
< PJB > < >
MODIFICATIONS
2012 - 04 - 03 < PJB > Completed corrections to pass package ansi - tests .
2012 - 03 - 30 < PJB > Added checks , made the API conforming to CL .
make - load - form for packages should ... |
68cbc6543615f4c2152cd9ad67605e5ded60f53bfba19ba9151aa3384dcc2700 | bvaugon/ocapic | display.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/goblet/display.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Pic;;
open Types;;
set_bit IRCF1;;
set_bit IRCF0;;
set_bit PLLEN;;
module Disp = Lcd.Connect (
struct
let bus_size = Lcd.Eight
let e = LATA0
let rs = LATA1
le... |
040770b997d02f5999a15d17003ef1f0db920b337c74376788891650523e93a9 | bytekid/mkbtt | slDebug.ml | type verbosity_t =
QUIET | INFO | DEBUG | TRACE;;
let verbosity = ref QUIET;;
let parse_verbosity = function
"quiet" | "0" -> QUIET
| "info" | "1" -> INFO
| "debug" | "2" | "" -> DEBUG
| "trace" | "3" -> TRACE
| x -> failwith ("Unable to parse debug level: " ^ x)
;;
let set_verbosity s =
verbosit... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/slothrop/slDebug.ml | ocaml | type verbosity_t =
QUIET | INFO | DEBUG | TRACE;;
let verbosity = ref QUIET;;
let parse_verbosity = function
"quiet" | "0" -> QUIET
| "info" | "1" -> INFO
| "debug" | "2" | "" -> DEBUG
| "trace" | "3" -> TRACE
| x -> failwith ("Unable to parse debug level: " ^ x)
;;
let set_verbosity s =
verbosit... | |
32a2e7d436a3e94fc0839e61fa1e10c167e9183ea82cd09f42024d549606ffb3 | herd/herdtools7 | RISCVArch_jingle.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/jingle/RISCVArch_jingle.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2019 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
4045f399ed83628f9a12c150e8ab44a56be160f544305682f47465ea46c0c835 | babashka/nbb | example.cljs | (ns script
(:require ["chalk$default" :as chalk]
["console$log" :as log]))
Combine styled and normal strings
(log (chalk/blue "hello") (str " world" (chalk/red "!")))
;; Compose multiple styles using the chainable API
(log (chalk/blue.bgRed.bold "Hello world!"))
;; Pass in multiple arguments
(log (ch... | null | https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/examples/chalk/example.cljs | clojure | Compose multiple styles using the chainable API
Pass in multiple arguments | (ns script
(:require ["chalk$default" :as chalk]
["console$log" :as log]))
Combine styled and normal strings
(log (chalk/blue "hello") (str " world" (chalk/red "!")))
(log (chalk/blue.bgRed.bold "Hello world!"))
(log (chalk/blue "Hello" "World!" "Foo" "bar" "biz" "baz"))
Nest styles
(log (chalk/re... |
0106e8a664718161f9f9a4f76c82c789e3a3fa1a54fe5a1ab05784e89a01f4ea | johnwhitington/ocamli | exercise07.ml | let rec for_all f l =
match l with
[] -> true
| h::t -> f h && for_all f t
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%206/exercise07.ml | ocaml | let rec for_all f l =
match l with
[] -> true
| h::t -> f h && for_all f t
| |
4a8ecfee5ad63479a546ca711b9056608936614c3b341ea3f3e70a4463d3db7e | cofree-coffee/cofree-bot | Env.hs | | Subroutine for fetching Client Session data from the Environment .
module Options.Env
( fromEnv,
readEnv,
)
where
--------------------------------------------------------------------------------
import Data.Functor.Barbie
import Data.Functor.Compose
import Data.Text (Text)
import Data.Text qualified as Te... | null | https://raw.githubusercontent.com/cofree-coffee/cofree-bot/2466a444f17c560bfbadcad328f8a8c08d8da896/cofree-bot/src/Options/Env.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------ | | Subroutine for fetching Client Session data from the Environment .
module Options.Env
( fromEnv,
readEnv,
)
where
import Data.Functor.Barbie
import Data.Functor.Compose
import Data.Text (Text)
import Data.Text qualified as Text
import Options.Types
import System.Environment (lookupEnv)
readEnv :: (Text ... |
5337dfd4568702a9841bfc19e1976273dc648e821ec0d85a8c6b079de6b64e33 | W-Net-AI/LISP-CV | package.lisp | ;;; -*- mode: lisp; indent-tabs: nil -*-
(defpackage :gc
(:nicknames #:gc #:t)
(:use #:cffi #:common-lisp #:swank #:trivial-garbage #:lisp-executable)
(:shadow #:abs)
(:export
Macros
#:alloc
Interop
#:c-string-to-string
#:c-string
CFFI
#:alloc
;; Vectors
#:vector-char
#:ma... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/gc/package.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
Vectors
DEFGENERIC
Functions and methods used to
re-import shadowed symbols.
core - Basic Structures
core - Dynamic Structures
core - Operations on Arrays
core - Drawing Functions
core - XML/YAML Persistence
imgproc - Image Filtering
imgproc - Geometric Image Transforma... |
(defpackage :gc
(:nicknames #:gc #:t)
(:use #:cffi #:common-lisp #:swank #:trivial-garbage #:lisp-executable)
(:shadow #:abs)
(:export
Macros
#:alloc
Interop
#:c-string-to-string
#:c-string
CFFI
#:alloc
#:vector-char
#:make-vector-char
#:c-arr-to-vec-char
#:seq-to-ve... |
23f35b13eaf38eec7f30e1865845cff3f97374101971b451c3a1cfe63a521562 | tisnik/clojure-examples | core_test.clj | (ns enlive7.core-test
(:require [clojure.test :refer :all]
[enlive7.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/enlive7/test/enlive7/core_test.clj | clojure | (ns enlive7.core-test
(:require [clojure.test :refer :all]
[enlive7.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
42cbce7b78c0022b200a4e15bb57e6a86934106ec464c66b6683628b64b5a12f | ahrefs/atd | json.mli | (**
Mapping from ATD to JSON
*)
type ocaml_adapter = {
normalize : string;
restore : string;
}
* Association between languages and for that language .
The specification of each json adapter is language - specific .
The specification of each json adapter is language-specific. *)
type json_adapter... | null | https://raw.githubusercontent.com/ahrefs/atd/e9cccc28aaeca9926be49682101653ae3960d8f2/atd/src/json.mli | ocaml | *
Mapping from ATD to JSON
* A module implementing [normalize] and [restore].
* tbd
max decimal places
<json name=...>
* The different kinds of ATD nodes with their json-specific options. |
type ocaml_adapter = {
normalize : string;
restore : string;
}
* Association between languages and for that language .
The specification of each json adapter is language - specific .
The specification of each json adapter is language-specific. *)
type json_adapter = {
ocaml_adapter : ocaml_adapt... |
24561eb30d395feddc4070c560e64c9e8587b916fcdecfce9db087b9ed3eee24 | ocaml/odoc | link.ml | Second round of resolution tackles references and forward paths
open Odoc_model
open Lang
module Id = Paths.Identifier
module Opt = struct
let map f = function Some x -> Some (f x) | None -> None
end
(** Equivalent to {!Comment.synopsis}. *)
let synopsis_from_comment (docs : Component.CComment.docs) =
match doc... | null | https://raw.githubusercontent.com/ocaml/odoc/a52dd8e960f99b38162d40311a9c4512d5741d43/src/xref2/link.ml | ocaml | * Equivalent to {!Comment.synopsis}.
If there is no doc, look at the expansion.
* Raise a warning when a label explicitly set by the user collides. This
warning triggers even if one of the colliding labels have been automatically
generated.
Looking for an identical identifier but a different location.
In... | Second round of resolution tackles references and forward paths
open Odoc_model
open Lang
module Id = Paths.Identifier
module Opt = struct
let map f = function Some x -> Some (f x) | None -> None
end
let synopsis_from_comment (docs : Component.CComment.docs) =
match docs with
| ({ value = #Comment.nestable_bl... |
304afd072a73325e4f0866fae497272680aaa9697abd4d32837c34404dda6a89 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | Stack.hs | import Control.Monad.State
type Stack = [Int]
pop :: State Stack Int
pop = state $ \(x:xs) -> (x,xs)
peek :: State Stack Int
peek = state $ \(x:xs) -> (x,x:xs)
push :: Int -> State Stack ()
push i = state $ \xs -> ((), i:xs)
addStack :: State Stack ()
addStack = do
a1 <- pop
a2 <- pop... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C12/Stack.hs | haskell | import Control.Monad.State
type Stack = [Int]
pop :: State Stack Int
pop = state $ \(x:xs) -> (x,xs)
peek :: State Stack Int
peek = state $ \(x:xs) -> (x,x:xs)
push :: Int -> State Stack ()
push i = state $ \xs -> ((), i:xs)
addStack :: State Stack ()
addStack = do
a1 <- pop
a2 <- pop... | |
0d3b90b52c1e3c6547fcb46a8359f388a2755632b57a6394ed6ddad8d3006351 | facebookarchive/duckling_old | finance.clj | (
"intersect (X cents)" ;
[(dim :amount-of-money) (dim :amount-of-money #(= (:unit %) "cent"))]
(compose-money %1 %2)
; #(not (:number-prefixed %)
"₩"
#"\₩|원|(?i)KRW"
{:dim :unit
:unit "KRW"}
"$"
#"\$|달러|불"
{:dim :unit
:unit "$"} ; ambiguous
"cent"
#"(?i)cents?|센[트|츠]|c|¢" ; to... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/ko/rules/finance.clj | clojure |
#(not (:number-prefixed %)
ambiguous
to do:localize the corpus and rules per language
not ambiguous
Australian Dollar Currency
Emirates Currency | (
[(dim :amount-of-money) (dim :amount-of-money #(= (:unit %) "cent"))]
(compose-money %1 %2)
"₩"
#"\₩|원|(?i)KRW"
{:dim :unit
:unit "KRW"}
"$"
#"\$|달러|불"
{:dim :unit
"cent"
{:dim :unit
:unit "cent"}
"€"
#"€|유로|(?i)EURO?"
{:dim :unit
"£"
#"£|파운드|영국파운드"
{:dim :unit... |
80c560f1c3ca40c570189c96ced7ada6512719fea2ad75c5b66e34c5d4bc7c19 | mlemerre/l-lang | cpsllvm.ml | Copyright 2012 - 2013 .
For List.fold_left_with_index .
i \section{Module } i
s This module translates a term written in CPS representation to
LLVM instructions in SSA form .
The CPS representation stems from the paper " Compiling with
continuations , continued " by . In particular this
rep... | null | https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/llvm/cpsllvm.ml | ocaml | We extend the existing, "environment" module. This allows access to
existing variables.
Note: Base will be (in the future) Cps.
\subsection*{Creating and accessing memory objects}
s Store [llvalue] in heap-allocated memory.
s Unbox a [llvalue] of type [lltype].
s Retrieve an element from a tuple.
s Creat... | Copyright 2012 - 2013 .
For List.fold_left_with_index .
i \section{Module } i
s This module translates a term written in CPS representation to
LLVM instructions in SSA form .
The CPS representation stems from the paper " Compiling with
continuations , continued " by . In particular this
rep... |
2b8c7e665290124c1bb80499f8c03313532c06fe3bdf824cb4e6990f7bdc27a8 | jkrivine/tl_interpreter | c.mli | (** This is an interface file. It provides the low-level APIs for writing smart contracts and interacting with the chain. *)
* The API is divided into [ Program ] , which contains Solidity - like facilities ,
and [ Chain ] , which is about submitting transactions to the chain . They
share [ Monad ] and [ E... | null | https://raw.githubusercontent.com/jkrivine/tl_interpreter/c967c6578dd4491a6930c9842a0709fbc5939496/lib/c.mli | ocaml | * This is an interface file. It provides the low-level APIs for writing smart contracts and interacting with the chain.
* Generic state+exception monad
* A command to be executed in a chain environment
may return a value of type ['a].
* When a command [c] has no argument, it should be used as [c] in the
... |
* The API is divided into [ Program ] , which contains Solidity - like facilities ,
and [ Chain ] , which is about submitting transactions to the chain . They
share [ Monad ] and [ Echo ] as common interfaces .
and [Chain], which is about submitting transactions to the chain. They
share [Monad] a... |
a9bca5be6782843be5e572f4cb29d7b9f34126b0c0c2a8da7d76a9797b48b1f8 | lispnik/iup | tree.lisp | ;;; Generated from org-mode, do not edit
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "iup-controls" "uiop")))
(defpackage #:iup-examples.tree
(:use #:common-lisp)
(:export #:tree))
(in-package #:iup-examples.tree)
(defun get-dir (pathname)
(assert (uiop:directory-pathname-p ... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/tree.lisp | lisp | Generated from org-mode, do not edit |
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "iup-controls" "uiop")))
(defpackage #:iup-examples.tree
(:use #:common-lisp)
(:export #:tree))
(in-package #:iup-examples.tree)
(defun get-dir (pathname)
(assert (uiop:directory-pathname-p pathname))
(loop for pathname in (uiop:... |
11b3bcf89e6e1858f154292cd15878d4863ad80fd2616f0590a47874f2db3d1f | ocaml/Zarith | timings.ml | open Printf
(* Timing harness harness *)
let time fn arg =
let start = Sys.time() in
let rec time accu =
let qty = fn arg in
let duration = Sys.time() -. start in
let qty = float qty in
if duration >= 1.0
then duration /. (accu +. qty)
else time (accu +. qty)
in time 0.0
let time_repeat... | null | https://raw.githubusercontent.com/ocaml/Zarith/39df015463f2797256dfb12440ed8f6c2dfd59cc/tests/timings.ml | ocaml | Timing harness harness
Basic arithmetic operations
Factorial
Fibonacci
Takeushi | open Printf
let time fn arg =
let start = Sys.time() in
let rec time accu =
let qty = fn arg in
let duration = Sys.time() -. start in
let qty = float qty in
if duration >= 1.0
then duration /. (accu +. qty)
else time (accu +. qty)
in time 0.0
let time_repeat rep fn arg =
time (fun () ... |
d57cf2063e768065a655e9fa2434ebddf70f0457340acba4224bbf108e657e91 | RichiH/git-annex | Ssh.hs | git - annex assistant webapp configurator for ssh - based remotes
-
- Copyright 2012 - 2015 < >
-
- Licensed under the GNU AGPL version 3 or higher .
-
- Copyright 2012-2015 Joey Hess <>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
# LANGUAGE QuasiQuotes , TemplateHaskell , Overload... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/WebApp/Configurators/Ssh.hs | haskell | Is a repository a new one that's being created, or did it already exist
and is just being added.
untested
canonicalize input hostname if it had no dot
unchecked
The directory is implicitly in home, so remove any leading ~/
reason why it's not usable
To enable a remote that uses ssh as its transport,
- parse a... | git - annex assistant webapp configurator for ssh - based remotes
-
- Copyright 2012 - 2015 < >
-
- Licensed under the GNU AGPL version 3 or higher .
-
- Copyright 2012-2015 Joey Hess <>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
# LANGUAGE QuasiQuotes , TemplateHaskell , Overload... |
9fd4318a8b7e2f5707217640291b84561dc71703681e6a6ec350f16656e8e521 | facebook/flow | keywords.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/f7d50bb772462888b27b5dbf9acf7d079eb1ff5f/src/services/autocomplete/keywords.ml | ocaml | TODO: include `of`, `in`, and `instanceof`. We don't currently autocomplete at positions where those are valid.
true, false, and null are not included here, because we already suggest those when we have type info |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
86f2abb45fe4f9487b5c22c549e6aa1e3f9df9cc0b914f148822d19b8b95537c | FlowerWrong/mblog | my_fac_server.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/my_fac_server.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(my_fac_server).
-export([loop/0]).
loop() ->
receive
{From, {fac, N}} ->
From ! {self(), fac(N)},
loop();
{become, Something} ->
Something()
end.
fac(0) -> 1;
fac(N) -> N * fac(N-... |
2da70b65546f6c0b25632861fe8930e8b586cdba6ad2f946d91fb3e386ea4f6d | tatut/clj-chrome-devtools | core.clj | (ns clj-chrome-devtools.core
(:require [clj-chrome-devtools.impl.connection :as connection]))
(def current-connection connection/current-connection)
(defn set-current-connection!
"Set the globally used current connection"
[c]
(reset! connection/current-connection c))
(def connect connection/connect)
| null | https://raw.githubusercontent.com/tatut/clj-chrome-devtools/0bb4cd7e4de7cc4a4255588fee309f688013fb09/src/clj_chrome_devtools/core.clj | clojure | (ns clj-chrome-devtools.core
(:require [clj-chrome-devtools.impl.connection :as connection]))
(def current-connection connection/current-connection)
(defn set-current-connection!
"Set the globally used current connection"
[c]
(reset! connection/current-connection c))
(def connect connection/connect)
| |
7d46b4eba2d65e113983e6cd484a31181e767064b90536502a5fa63bd2ced5f9 | atgreen/lisp-openshift | x86-64-vm.lisp | x86-64-vm.lisp -- VOP definitions SBCL
(cl:in-package :sb-vm)
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
(:args (array :scs (descriptor-reg))
(bound :scs (any-reg))
(index :scs (any-reg)))
(:arg-types simple-array-unsigned-byte-8 positive-fixnum tagg... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/nibbles-20120407-git/sbcl-opt/x86-64-vm.lisp | lisp | We want to check the conditions:
0 <= INDEX
0 <= INDEX + OFFSET
(INDEX + OFFSET) < BOUND
INDEX <_u BOUND
INDEX + OFFSET <_u BOUND
If INDEX + OFFSET <_u BOUND, though, INDEX must be less than
already been assured by higher-level machinery. | x86-64-vm.lisp -- VOP definitions SBCL
(cl:in-package :sb-vm)
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
(:args (array :scs (descriptor-reg))
(bound :scs (any-reg))
(index :scs (any-reg)))
(:arg-types simple-array-unsigned-byte-8 positive-fixnum tagg... |
ebc840bdd415913ee928631d9050cbdbb8e6aae01d6f29a4d5cc39bd317ceea0 | eckyputrady/haskell-scotty-realworld-example-app | JWT.hs | module Feature.User.JWT where
import ClassyPrelude
import Platform.JWT
import Feature.Auth.Types
import Data.Has
import Jose.Jwt
import Jose.Jwa
import qualified Data.Aeson as Aeson
import Data.Time.Clock.POSIX (getPOSIXTime)
generateToken :: (JWT r m) => UserId -> m Token
generateToken userId = do
jwks <- asks $ e... | null | https://raw.githubusercontent.com/eckyputrady/haskell-scotty-realworld-example-app/366a1eec021fb1bfcbc2d8e0485b59cbedba10e5/src/Feature/User/JWT.hs | haskell | module Feature.User.JWT where
import ClassyPrelude
import Platform.JWT
import Feature.Auth.Types
import Data.Has
import Jose.Jwt
import Jose.Jwa
import qualified Data.Aeson as Aeson
import Data.Time.Clock.POSIX (getPOSIXTime)
generateToken :: (JWT r m) => UserId -> m Token
generateToken userId = do
jwks <- asks $ e... | |
98fedde3a14547f8f665dce6e3909369007ea35942bd0facb60137a281821aba | aptmcl/rosetta | main.rkt | #lang typed/racket/base/no-check
(require (for-syntax racket/base))
(require (for-syntax racket/syntax))
(require (for-syntax racket/list))
(require racket/math)
(require "base/coord.rkt")
(require "base/utils.rkt")
(require "base/shapes.rkt")
(require (prefix-in autocad: "autocad/backend.rkt"))
(require (prefix-in rhi... | null | https://raw.githubusercontent.com/aptmcl/rosetta/38aeafd730f93edaec7474106e84dae6d8bc1261/main.rkt | racket | a given moment, used only during shape creation
a given moment, used only during shape acquisition
(render-backend-dir (backend-name out))
(start-backend in)
(unless (eq? in out)
(start-backend out))
(case op
[(none) (void)]
[(delete)
(delete-all-shapes)
(void)])
#;(delayed-mode)
(imme... | #lang typed/racket/base/no-check
(require (for-syntax racket/base))
(require (for-syntax racket/syntax))
(require (for-syntax racket/list))
(require racket/math)
(require "base/coord.rkt")
(require "base/utils.rkt")
(require "base/shapes.rkt")
(require (prefix-in autocad: "autocad/backend.rkt"))
(require (prefix-in rhi... |
df201b752b53f82bb689e2615fdb777b53c2a39092948393262eccfa16369129 | Quid2/flat | Memory.hs | # LANGUAGE BangPatterns #
# LANGUAGE MagicHash #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
{- |
Memory access primitives.
Includes code from the [store-core](-core) package.
-}
module Flat.Memory
( chunksToByteString
, chunksToByteArray
, ByteArray
, pokeByteArray
, pokeByteString
, uns... | null | https://raw.githubusercontent.com/Quid2/flat/f0a3a0139fbe34074f4b0e7223a2fc767a1b1471/src/Flat/Memory.hs | haskell | |
Memory access primitives.
Includes code from the [store-core](-core) package.
, minusPtr l')
|Copy bytestring to given pointer, returns new pointer
^ sourcePtr
^ sourceLen
| # LANGUAGE BangPatterns #
# LANGUAGE MagicHash #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
module Flat.Memory
( chunksToByteString
, chunksToByteArray
, ByteArray
, pokeByteArray
, pokeByteString
, unsafeCreateUptoN'
, minusPtr
, peekByteString
)
where
import Control.Mon... |
eda74d5478337e9918c73a0f9067b0d4e45d4a6e9f0bd31d3c932d8e6fb1b65d | gebi/jungerl | epp_dodger.erl | %% =====================================================================
epp_dodger - bypasses the Erlang preprocessor .
%%
Copyright ( C ) 2001
%%
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
published by the Free Soft... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/syntax_tools/src/epp_dodger.erl | erlang | =====================================================================
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful... | epp_dodger - bypasses the Erlang preprocessor .
Copyright ( C ) 2001
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307
USA
$ Id$
@doc < code > e... |
37259a86690ab563af47946d46f735287a5dcaf1bdae28c7025ed043140e9d17 | lindenbaum/hinterface | Epmd.hs | {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use camelCase" #-}
module Foreign.Erlang.Epmd
( -- * List registered nodes
epmdNames,
NamesResponse (..),
-- * Looking up nodes
lookupNode,
-- * Registering nodes
registerNode,
NodeRegistration (nr_creation),
mkTestingN... | null | https://raw.githubusercontent.com/lindenbaum/hinterface/e49810b5984486cebad6fa06dba0f2c7f2bfd2fa/src/Foreign/Erlang/Epmd.hs | haskell | # OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Use camelCase" #
* List registered nodes
* Looking up nodes
* Registering nodes
------------------------------------------------------------------------------
------------------------------------------------------------------------------
---------------------... |
module Foreign.Erlang.Epmd
epmdNames,
NamesResponse (..),
lookupNode,
registerNode,
NodeRegistration (nr_creation),
mkTestingNodeRegistration,
)
where
import Util . IOExtra
import Control.Monad (when)
import Control.Monad.Logger
import Data.Binary
import Data.Binary.Get
import Data.Bina... |
3e7dd5910aaf2e3e9bd3bc44582fd643a9b8d95684274eb07725e04554fea2b8 | ekmett/guanxi | Vec.hs | # language BlockArguments #
{-# language TupleSections #-}
# language PatternSynonyms #
module Vec where
import Control.Monad.Primitive
import Control.Monad.ST
import Data.Bits
import Data.Primitive.Types
import Data.Primitive.PrimArray
import Data.Primitive.MutVar
import Ref
-- transient
data Vec s a = Vec {-# unpac... | null | https://raw.githubusercontent.com/ekmett/guanxi/e267f4210a9c10d0091371ea9b028b7d6fa8b9f3/src/Vec.hs | haskell | # language TupleSections #
transient
# unpack #
# unpack #
non-backtracking writes by default
# inline newVec #
doesn't change shape
# inline writeVec #
# inline sizeVec #
this would play the role of std::vector, non-transient non-thread-safe version
not thread safe
safe backtracking operations:
newVector
read... | # language BlockArguments #
# language PatternSynonyms #
module Vec where
import Control.Monad.Primitive
import Control.Monad.ST
import Data.Bits
import Data.Primitive.Types
import Data.Primitive.PrimArray
import Data.Primitive.MutVar
import Ref
newtype s a = ( MVar s ( Slab s a ) )
pattern DEFAULT_SIZE :: Int... |
e64cbfa1ada4a048844d201a23af12931b3bfdce4526b02a6cc1e66c237f6ef4 | emqx/emqx | emqx_gateway_schema.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/969cbecf91cd71f3f4a0d83f6fa4a9f45329645e/apps/emqx_gateway/src/emqx_gateway_schema.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_gateway_schema).
-behaviour(hocon_schema).
-dialyzer(no_return).
-dialyzer(no_mat... |
efa948b61054c5c386f2d46c50fa2a678bb89681eb917ac20fa0b345683297a0 | yjqww6/drcomplete | main.rkt | #lang racket/base
(provide register-drcomplete-plugin)
(define (register-drcomplete-plugin #:def def #:def-rank [def-rank 4]
#:int int #:int-rank [int-rank 4])
(log-message (current-logger)
'info
'drcomplete-plugin
""
(c... | null | https://raw.githubusercontent.com/yjqww6/drcomplete/b3f7390149e8d006c92b8a8a4da1593da547e235/drcomplete-base/main.rkt | racket | #lang racket/base
(provide register-drcomplete-plugin)
(define (register-drcomplete-plugin #:def def #:def-rank [def-rank 4]
#:int int #:int-rank [int-rank 4])
(log-message (current-logger)
'info
'drcomplete-plugin
""
(c... | |
c3002a3de9e367be83c12381c93c611f162facc81c55c4915ebc48c2b1778d7c | tkonolige/dbignore | Test.hs | {-# OPTIONS_GHC -Wall -fwarn-tabs #-}
# LANGUAGE CPP
, MultiParamTypeClasses
, FlexibleInstances
, FlexibleContexts
, TypeSynonymInstances
#
, MultiParamTypeClasses
, FlexibleInstances
, FlexibleContexts
, TypeS... | null | https://raw.githubusercontent.com/tkonolige/dbignore/237a03f9cdc82af882e3f8ccbfd4115000a8bb1d/bytestring-trie/test/Data/Trie/Test.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
|
Copyright : Copyright (c) 2008--2011 wren gayle romano
License : BSD3
Maintainer :
Stability : provisional
Testing 'Trie's.
--------------------------------------------------------------
import quali... | # LANGUAGE CPP
, MultiParamTypeClasses
, FlexibleInstances
, FlexibleContexts
, TypeSynonymInstances
#
, MultiParamTypeClasses
, FlexibleInstances
, FlexibleContexts
, TypeSynonymInstances
#-}
... |
c7183d14e9829fd4881c133290a1ad4f0df45170c3a8ba7c6d58981305b5237c | johnstonskj/rml-core | data-sets.rkt | #lang racket/base
;;
;; Racket Machine Learning - Core.
;;
~ 2018 .
;;
(provide iris-data-set small-data-set)
;; ---------- Requirements
(require rml/data)
;; ---------- Implementation
(define iris-data-set
(load-data-set (path->string (collection-file-path "test/iris_training_data.csv" "rml"))
... | null | https://raw.githubusercontent.com/johnstonskj/rml-core/8f3ca8b47e552911054f2aa12b296dbf40dad637/rml/test/data-sets.rkt | racket |
Racket Machine Learning - Core.
---------- Requirements
---------- Implementation | #lang racket/base
~ 2018 .
(provide iris-data-set small-data-set)
(require rml/data)
(define iris-data-set
(load-data-set (path->string (collection-file-path "test/iris_training_data.csv" "rml"))
'csv
(list
(make-feature "sepal-length" #:index 0)
... |
65cc08c59f7449e3c2d9b8e0cfd903ce93b997fbc739faea3a13f86ece11553f | chameco/Hitman | project.clj | (defproject hitman "0.1.0"
:description "a clojure markdown engine"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[hiccup "1.0.4"]
[instaparse "1.2.2"]
[me.raynes/fs "1.4.4"]]
:scm ... | null | https://raw.githubusercontent.com/chameco/Hitman/8ccf13cd8ade058d204aa7c1f311e5f17793aab9/project.clj | clojure | (defproject hitman "0.1.0"
:description "a clojure markdown engine"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[hiccup "1.0.4"]
[instaparse "1.2.2"]
[me.raynes/fs "1.4.4"]]
:scm ... | |
28ccc9bd295004a6c11ae75449fe9dffea5748bb10b32a000c0ec407a14e8e0c | danieljharvey/mimsa | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Repl.Main
( repl,
)
where
import Control.Monad.Except
import Control.Monad.Logger
import Data.Text (Text)
import qualified Data.Text as T
import Language.Mimsa.Core
import Language.Mimsa.Types.Error
import Language.Mimsa.Types.Project
import ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/564c32cc28d990c9e686f63533a9e30c3736aee4/repl/repl/Repl/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module Repl.Main
( repl,
)
where
import Control.Monad.Except
import Control.Monad.Logger
import Data.Text (Text)
import qualified Data.Text as T
import Language.Mimsa.Core
import Language.Mimsa.Types.Error
import Language.Mimsa.Types.Project
import Language.Mimsa.Types.Store.RootPath... |
f9cfea9ced97907e26634e8a5bdb7b93d17cc0ca6877f300976db455a2790096 | FranklinChen/hugs98-plus-Sep2006 | Points.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Points
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : po... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/Points.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.Points
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
----------------------------------------------... | Copyright : ( c ) 2002 - 2005
This module corresponds to section 3.3 ( Points ) of the OpenGL 1.5 specs .
module Graphics.Rendering.OpenGL.GL.Points (
pointSize,
pointSizeRange, pointDistanceAttenuation,
pointFadeThresholdSize,
*
pointSmooth,
pointSprite,
aliasedPointSizeRange, sm... |
a901fe17eba03341efdfa17b75851a26ced9fb8afcb7bc9e0051520bbba23cd2 | samrocketman/home | strdflash.scm | (define (apply-strdflash-effect img logo-layer noisev bcolor npix scolor numframe)
(let* ( (width (car (gimp-drawable-width logo-layer)))
(height (car (gimp-drawable-height logo-layer)))
(tmpLayer)
(txtLayer)
(newLayer)
(nframe)
(cnt)
)
(gimp-context-push)
(script-fu-util-image-resi... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/strdflash.scm | scheme | (define (apply-strdflash-effect img logo-layer noisev bcolor npix scolor numframe)
(let* ( (width (car (gimp-drawable-width logo-layer)))
(height (car (gimp-drawable-height logo-layer)))
(tmpLayer)
(txtLayer)
(newLayer)
(nframe)
(cnt)
)
(gimp-context-push)
(script-fu-util-image-resi... | |
f0628d0176cc046aafc1d7f487728d496d873733bc00f4f56d756dc17684e1d9 | BranchTaken/Hemlock | ordmap.mli | (** Ordered map. *)
type ('k, 'v, 'cmp) t
include MapIntf.SOrd with type ('k, 'v, 'cmp) t := ('k, 'v, 'cmp) t
(* Exposed for testing purposes only. *)
val fmt_internals: ?alt:bool -> ?width:int64
-> ('v -> (module Fmt.Formatter) -> (module Fmt.Formatter)) -> ('k, 'v, 'cmp) t
-> (module Fmt.Formatter) -> (module ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a21b462fe7f70475591d2ffae185c91552bf6372/bootstrap/src/basis/ordmap.mli | ocaml | * Ordered map.
Exposed for testing purposes only. |
type ('k, 'v, 'cmp) t
include MapIntf.SOrd with type ('k, 'v, 'cmp) t := ('k, 'v, 'cmp) t
val fmt_internals: ?alt:bool -> ?width:int64
-> ('v -> (module Fmt.Formatter) -> (module Fmt.Formatter)) -> ('k, 'v, 'cmp) t
-> (module Fmt.Formatter) -> (module Fmt.Formatter)
val validate: ('k, 'v, 'cmp) t -> unit
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.