_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 |
|---|---|---|---|---|---|---|---|---|
99af670b1953f3e7aa4b593b469381805fa0e41e727ffc144b9dbe73ccafdcc6 | emqx/emqx-exproto | emqx_exproto_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqx-exproto/7aff2dae106302fdcdcd0d5ce31fe90df4861013/test/emqx_exproto_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 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_exproto_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("emqx/in... |
75705a1c4ef75c56dae96a5727e7f3a14dcc57e9385a9f481d9ace52af4171b4 | ljosa/cl-png | libpng.lisp | (in-package #:png)
#+cffi-features:darwin
(push #p"/usr/X11/lib/" cffi:*foreign-library-directories*)
#+cffi-features:darwin
(push #p"/opt/local/lib/" cffi:*foreign-library-directories*)
(define-foreign-library libpng
(:darwin "libpng.dylib")
(t (:default "libpng")))
(use-foreign-library libpng)
(defparameter ... | null | https://raw.githubusercontent.com/ljosa/cl-png/11b965fe378fd0561abe3616b18ff03af5179648/libpng.lisp | lisp | Foreign function definitions.
Input/output.
Error handling.
Encode and decode PNG files. | (in-package #:png)
#+cffi-features:darwin
(push #p"/usr/X11/lib/" cffi:*foreign-library-directories*)
#+cffi-features:darwin
(push #p"/opt/local/lib/" cffi:*foreign-library-directories*)
(define-foreign-library libpng
(:darwin "libpng.dylib")
(t (:default "libpng")))
(use-foreign-library libpng)
(defparameter ... |
643ec4f42e0904109cf978ad9232d4d357926d4c832a1be6015aa51827b30eab | polymonyrks/poppyS | AutoNP.hs | # LANGUAGE OverloadedLabels #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
module AutoNP where
-- import FromPDF
import qualified Data.Text as Text
import qualified Turtle
import qualified Control.Foldl as Fold
import Lib (iVecFromFile, iVecFromFileJP, oVecToFile, oVecToFileJP, delimitAtWO2, delimitAtWO2B... | null | https://raw.githubusercontent.com/polymonyrks/poppyS/050a74e2a1a5d536c1c51397a7a845d338d19ea5/src/AutoNP.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
import FromPDF
hoge = replaceds2 !! n
return resDiff
一つだけを狙い撃ちして縮約
cmd = Turtle.fromString $ "echo " ++ "\"" ++ sens ++ "\"" ++ " | mecab"
for windows encoding
putStrLn os | # LANGUAGE OverloadedLabels #
module AutoNP where
import qualified Data.Text as Text
import qualified Turtle
import qualified Control.Foldl as Fold
import Lib (iVecFromFile, iVecFromFileJP, oVecToFile, oVecToFileJP, delimitAtWO2, delimitAtWO2By, vNub, takeFst, takeSnd, takeFstT, takeSndT, takeThdT, execShell, delimitA... |
fdc40455790c7618543b778abbd61f9fd8b095504a69d6753e61c0917379c885 | clojure-interop/java-jdk | MetalToolTipUI.clj | (ns javax.swing.plaf.metal.MetalToolTipUI
"A Metal L&F extension of BasicToolTipUI.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Sw... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/MetalToolTipUI.clj | clojure | (ns javax.swing.plaf.metal.MetalToolTipUI
"A Metal L&F extension of BasicToolTipUI.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Sw... | |
3f8cdbc2b4345b0334e3a82d245cd0c936083cb3f09a7d207dd20f56071cd59d | AccelerateHS/accelerate-llvm | Reservoir.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Data.Array.Accelerate.LLVM.PTX.Execute.Stream.Reservoir
Copyright : [ 2016 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC e... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/1da65b5951b1410b5e4e1a646fbe1b17bee780a8/accelerate-llvm-ptx/src/Data/Array/Accelerate/LLVM/PTX/Execute/Stream/Reservoir.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
|
Module : Data.Array.Accelerate.LLVM.PTX.Execute.Stream.Reservoir
License : BSD3
Stability : experimental
| The reservoir is a place to store CUDA execution streams that are currently
inactive. When a new stream is requested one is provid... | Copyright : [ 2016 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.PTX.Execute.Stream.Reservoir (
Reservoir,
new, malloc, insert,
) where
import Data.Array.Accelerate.LLVM.PTX.Context ( Context ... |
56c047781c0046774cd4fda8b50a89397147131b83faccb783f132c6045cd047 | faylang/fay | Defaults.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Default values.
module Fay.Compiler.Defaults where
import Fay.Compiler.Decl (compileDecls)
import Fay.Compiler.Exp (compileLit)
import Fay.Config
import Fay.Types
import Paths_fay
import Data.Map as M
impor... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/src/Fay/Compiler/Defaults.hs | haskell | # LANGUAGE OverloadedStrings #
| Default values.
| The data-files source directory.
| The default compiler reader value.
| The default compiler state. |
module Fay.Compiler.Defaults where
import Fay.Compiler.Decl (compileDecls)
import Fay.Compiler.Exp (compileLit)
import Fay.Config
import Fay.Types
import Paths_fay
import Data.Map as M
import Data.Set as S
faySourceDir :: IO F... |
e00a4126c3b342f581e210e3ad048aeaa2858af3025e46c6db49cc0c25f7f5ce | fredrikt/yxa | dialog_package.erl | %%%-------------------------------------------------------------------
%%% File : dialog_package.erl
@author < >
%%% @doc Basic RFC4235 implementation.
%%%
@since 8 May 2006 by < >
%%% @end
%%%-------------------------------------------------------------------
-module(dialog_package).
-behavi... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/event/dialog_package.erl | erlang | -------------------------------------------------------------------
File : dialog_package.erl
@doc Basic RFC4235 implementation.
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Standard YXA Event package exports
-... | @author < >
@since 8 May 2006 by < >
-module(dialog_package).
-behaviour(event_package).
-export([
init/0,
request/4,
is_allowed_subscribe/7,
notify_content/4,
package_parameters/2,
subscription_behaviour/3,
test/0
]).
-include("siprecords.hrl").
-include("event.hrl").
-include_lib... |
3e385ab77b0dfa45e8e57d2c9b852de4741acb7b745177e7d8d763664dfe766a | fp-works/2019-winter-Haskell-school | GolfSpec.hs | import Test.Hspec
import Golf
main :: IO ()
main =
hspec $ do
describe "Golf" $
Exercise 1 --
do
it "should return correct result for skip" $ do
skips ([] :: [Int]) `shouldBe` []
skips [1] `shouldBe` [[1]]
skips [True, False] `shouldBe` [[True, False], [F... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week3/tien/homework3/test/GolfSpec.hs | haskell | import Test.Hspec
import Golf
main :: IO ()
main =
hspec $ do
describe "Golf" $
do
it "should return correct result for skip" $ do
skips ([] :: [Int]) `shouldBe` []
skips [1] `shouldBe` [[1]]
skips [True, False] `shouldBe` [[True, False], [False]]
s... | |
85c21c14e0252dc7457fc2418bab1aa99bf503e865db23c3ada9a8f8e1940ffc | polyfy/polylith | namespaces_from_disk_test.clj | (ns polylith.clj.core.workspace-clj.namespaces-from-disk-test
(:require [clojure.test :refer :all]
[polylith.clj.core.file.interface :as file]
[polylith.clj.core.workspace-clj.namespaces-from-disk :as from-disk]))
(def suffixed-top-ns "polylith.clj.core.")
(def interface-ns "interface")
(def... | null | https://raw.githubusercontent.com/polyfy/polylith/28d8848e2048b30f8378017885d68941323b6169/components/workspace-clj/test/polylith/clj/core/workspace_clj/namespaces_from_disk_test.clj | clojure | (ns polylith.clj.core.workspace-clj.namespaces-from-disk-test
(:require [clojure.test :refer :all]
[polylith.clj.core.file.interface :as file]
[polylith.clj.core.workspace-clj.namespaces-from-disk :as from-disk]))
(def suffixed-top-ns "polylith.clj.core.")
(def interface-ns "interface")
(def... | |
e02159bfcbde2ab290aa22fa8af2bdc8703b26e3dc7120bceebb0fbd41a6856f | 8c6794b6/haskell-sc-scratch | Deserialize.hs | # LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TemplateHaskell... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/lib/Sound/SC3/Lepton/Pattern/Deserialize.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Deserializer
* Fixed type converter
* Player
|
Type synonym for expression deserializing function, for tying the knot
of higher-rank open recursion functions.
Need to ensure Random t1 = > t1 here .
v1 and v2 needs class constraints
Ne... | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TemplateHaskell #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : ... |
5fc11428d322878e8799b778f9ab95d8108aa82d3d664c2bff39474fc598f0b5 | tfausak/blunt | Script.hs | # LANGUAGE QuasiQuotes #
module Blunt.App.Script where
import Data.Function ((&))
import qualified Data.Text.Lazy as Text
import Language.Javascript.JMacro
import qualified Text.PrettyPrint.Leijen.Text as PrettyPrint
script :: Text.Text
script = js & renderJs & PrettyPrint.renderOneLine & PrettyPrint.displayT
js ::... | null | https://raw.githubusercontent.com/tfausak/blunt/a44af0e06138bae94d7fd51330eb5602e7f3d5a3/library/Blunt/App/Script.hs | haskell | # LANGUAGE QuasiQuotes #
module Blunt.App.Script where
import Data.Function ((&))
import qualified Data.Text.Lazy as Text
import Language.Javascript.JMacro
import qualified Text.PrettyPrint.Leijen.Text as PrettyPrint
script :: Text.Text
script = js & renderJs & PrettyPrint.renderOneLine & PrettyPrint.displayT
js ::... | |
f4c9deb65cf5eb38ee40ce56850d7f4e4b9799359996a9f5024446a349028259 | cryptosense/pkcs11 | p11_session_handle.ml | type t = P11_ulong.t [@@deriving eq, ord, show, yojson]
let to_string = Unsigned.ULong.to_string
let hash x = Unsigned.ULong.to_int x
| null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_session_handle.ml | ocaml | type t = P11_ulong.t [@@deriving eq, ord, show, yojson]
let to_string = Unsigned.ULong.to_string
let hash x = Unsigned.ULong.to_int x
| |
81bec26a56258862b6fa6b17c255d6dff4c9b47d9a5d98a6e0f5c34ffd3d4fb2 | casperschipper/ocaml-cisp | cisp_prince.ml | open Seq
Seq is a thunk that when forced returns a value and a thunk to get the tail
(*
this is the same as
let thunk x = fun () -> x
*)
let csr = 44100
let csrf = 44100.
let midi_input = ref ( Array.init 1024 ( fun _ - > ( 0 , 0 , 0 ) ) )
let midi_input = ref (0, 0, 0)
let thunk x () = x
let emptySt () ... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/954e4b71dca0d0af0786395d727b7a7cde5568a7/examples/cisp_backup/cisp_prince.ml | ocaml |
this is the same as
let thunk x = fun () -> x
not sure about these
static
zipped list will be lenght of shortest list
operator is a function
to get the next value
create a singleton stream
returnes the loops and the tail of the source
preferably source is infinite
choice
lets end it here
u... | open Seq
Seq is a thunk that when forced returns a value and a thunk to get the tail
let csr = 44100
let csrf = 44100.
let midi_input = ref ( Array.init 1024 ( fun _ - > ( 0 , 0 , 0 ) ) )
let midi_input = ref (0, 0, 0)
let thunk x () = x
let emptySt () = Nil
let force l = l ()
let ( |> ) x f = f x
let ( <... |
ca43e09add442b53f741397f3cf841be360d0a459a7e810cfb78d4d0350e005c | cosgroveb/jane | jane_command_worker_test.erl | -module(jane_command_worker_test).
-include_lib("eunit/include/eunit.hrl").
-include_lib("command.hrl").
help_test() ->
Commands = [
#command {
matches = "hello",
description = "says hello",
subcommands = [
#command {
matches = "world",
description = "says hello worl... | null | https://raw.githubusercontent.com/cosgroveb/jane/ef5f4187f4f4525ea9d8687bafddf4a2133dadc9/test/jane_command_worker_test.erl | erlang | -module(jane_command_worker_test).
-include_lib("eunit/include/eunit.hrl").
-include_lib("command.hrl").
help_test() ->
Commands = [
#command {
matches = "hello",
description = "says hello",
subcommands = [
#command {
matches = "world",
description = "says hello worl... | |
e748d7f96011fa15e1b50ce4eba7f1a656c5d83adf54c652d67406a96ef34e85 | BranchTaken/Hemlock | test_bit_pop_bit_clz_bit_ctz.ml | open! Basis.Rudiments
open! Basis
open U8
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{pop,clz,ctz} "
|> fmt ~alt:true ~zpad:true ~width:2L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> Uns.pp (bit_pop x)
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u8/test_bit_pop_bit_clz_bit_ctz.ml | ocaml | open! Basis.Rudiments
open! Basis
open U8
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{pop,clz,ctz} "
|> fmt ~alt:true ~zpad:true ~width:2L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> Uns.pp (bit_pop x)
... | |
e7dcdee56170dd3ced6698ac2d61031bc891bd740d6434094bc94971eb42f706 | blindglobe/clocc | gray.lisp | ;;; Gray streams
;;;
Copyright ( C ) 1999 - 2003 , 2007 by
;;; This is open-source software.
GNU Lesser General Public License ( LGPL ) is applicable :
;;; No warranty; you may copy/modify/redistribute under the same
;;; conditions with the source code.
;;; See <URL:>
;;; for details and the precise copyright doc... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/port/gray.lisp | lisp | Gray streams
This is open-source software.
No warranty; you may copy/modify/redistribute under the same
conditions with the source code.
See <URL:>
for details and the precise copyright document.
$Source: /cvsroot/clocc/clocc/src/port/gray.lisp,v $
streams because it does the necessary magic to load it withou... | Copyright ( C ) 1999 - 2003 , 2007 by
GNU Lesser General Public License ( LGPL ) is applicable :
$ I d : v 1.12 2007/09/21 16:49:37 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
#-(or allegro clisp cmu lispworks openmcl sbcl scl)
(error 'not-implemented :proc "Gray streams")
(require... |
4949de84e34caef7025a877f6ca79351abb016e054b9021da0debbdf9cb90bb3 | footprintanalytics/footprint-web | mysql.clj | (ns metabase.db.liquibase.mysql
(:require
[clojure.string :as str])
(:import
(liquibase.database Database)
(liquibase.database.core MySQLDatabase)
(liquibase.sql Sql UnparsedSql)
(liquibase.sqlgenerator SqlGeneratorFactory)
(liquibase.sqlgenerator.core AddColumnGenerator CreateTableGenerator SetCo... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/db/liquibase/mysql.clj | clojure | migrations happening before it
MySQL/MariaDB migrations that add defaults values to `timestamp` columns we've written them as plain SQL... if we | (ns metabase.db.liquibase.mysql
(:require
[clojure.string :as str])
(:import
(liquibase.database Database)
(liquibase.database.core MySQLDatabase)
(liquibase.sql Sql UnparsedSql)
(liquibase.sqlgenerator SqlGeneratorFactory)
(liquibase.sqlgenerator.core AddColumnGenerator CreateTableGenerator SetCo... |
1fac20cf6604bd1337e68cbfed1de4321a903e6130bd1220816572f17779e4fa | airbus-seclab/bincat | temps.mli |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 - 2010 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publishe... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/newspeak/temps.mli | ocaml | *
* A type for variable names that do not appear in the original source code.
* For example, variables needed to store temporary values created by the
* evaluation of C expressions with side effects.
* String litterals : filename and contents
* Return value (inside function)
* Return value (inside caller)
*... |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 - 2010 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publishe... |
c9bf64540af2fa59d49b683450bdba1e4cca59443bde275cb54edb02172ad7fe | incoherentsoftware/defect-process | Sprites.hs | module Enemy.All.Blob.Sprites
( EnemySprites(..)
, mkEnemySprites
) where
import Control.Monad.IO.Class (MonadIO)
import Enemy.Util
import FileCache
import Window.Graphics
data EnemySprites = EnemySprites
{ _airHurt :: Sprite
, _death :: Sprite
, _fall :: Sprite
... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Blob/Sprites.hs | haskell | module Enemy.All.Blob.Sprites
( EnemySprites(..)
, mkEnemySprites
) where
import Control.Monad.IO.Class (MonadIO)
import Enemy.Util
import FileCache
import Window.Graphics
data EnemySprites = EnemySprites
{ _airHurt :: Sprite
, _death :: Sprite
, _fall :: Sprite
... | |
8c31569cfb141e094f32fce9dbbacb09734541146da75b1da5f9781b78e3c261 | henrystanley/Quark | Eval.hs | module Quark.Eval (eval) where
import Quark.Type
import Quark.QVM
import Quark.QType
import Quark.Serialize
import Quark.Parse
import Quark.QuoteEval
import Quark.CoreFunc
import Quark.Errors
import qualified Data.Map.Strict as Map
import qualified Data.Sequence as Seq
import Data.Sequence ((><), (<|), (|>), viewr, vi... | null | https://raw.githubusercontent.com/henrystanley/Quark/63df61e47bedc1092c89529eedaf8ad229193f0b/Quark/Eval.hs | haskell | - Evaluation ---
main evaluation function
takes a quark vm and (assuming there aren't any errors) returns its reduction
if the top item is a runtime or core fuction, run it
if the top item is a magic interpreter command, execute it
otherwise, push the top item to the data stack
tries to call a runtime defin... | module Quark.Eval (eval) where
import Quark.Type
import Quark.QVM
import Quark.QType
import Quark.Serialize
import Quark.Parse
import Quark.QuoteEval
import Quark.CoreFunc
import Quark.Errors
import qualified Data.Map.Strict as Map
import qualified Data.Sequence as Seq
import Data.Sequence ((><), (<|), (|>), viewr, vi... |
b45d59374b1ffe414fec747100d12345bc3a045129e2328e97930cbe197a05bf | ComputerScienceHouse/csh-eval | Widgets.hs | |
Module : CSH.Eval . Frontend . Widget
Description : Reusable widgets for use in EvalFrontend pages
Copyright : , , , Computer Science House 2015
License : MIT
Maintainer :
Stability : Provisional
Portability : POSIX
Defines the web application layer of Evals .
Module ... | null | https://raw.githubusercontent.com/ComputerScienceHouse/csh-eval/d2d4bac07bfbfcdb58aa01694d422f326bd3d414/src/CSH/Eval/Frontend/Widgets.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE TypeFamilies #
# LANGUAGE OverloadedStrings #
# LANGUAGE ViewPatterns #
| A helper function to convert integers to text, to make templates that use
| A basic widget for a panel
horizontal size of the panel
widget for the title of the panel
widget for the body of ... | |
Module : CSH.Eval . Frontend . Widget
Description : Reusable widgets for use in EvalFrontend pages
Copyright : , , , Computer Science House 2015
License : MIT
Maintainer :
Stability : Provisional
Portability : POSIX
Defines the web application layer of Evals .
Module ... |
9411a7b11ac630d3e5158d0a0ae04284deb3756020bd2a748874a11d1dbdab5a | robrix/isometry | Test.hs | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
module Geometry.Transform.Test
( tests
) where
import Data.Coerce
import Data.Functor.I
import Geometry.Transform
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified H... | null | https://raw.githubusercontent.com/robrix/isometry/171b9261b8d7ea32c86ce6019c8c3973742f0349/test/Geometry/Transform/Test.hs | haskell | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
module Geometry.Transform.Test
( tests
) where
import Data.Coerce
import Data.Functor.I
import Geometry.Transform
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified H... | |
ee87adcaeac159c5af2e8d4dfabf5eafd405bdaa2a78a9220581c2da87f37865 | rd--/hsc3 | pulseCount.help.hs | -- pulseCount
let c = pulseCount (impulse ar 10 0) (impulse ar 0.4 0)
in sinOsc ar (c * 200) 0 * 0.05
-- pulseCount ; printer (silent, see console)
let b = localBuf 11 1
t = impulse ar 10 0
p = pulseCount t 0
d = demand t 0 (dbufwr (-666) b p NoLoop)
in mrg [dc ar 0,poll t p 0 (label "p")]
-- pulseCount ;... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/pulseCount.help.hs | haskell | pulseCount
pulseCount ; printer (silent, see console)
pulseCount ; printer (silent, see console) ; id | let c = pulseCount (impulse ar 10 0) (impulse ar 0.4 0)
in sinOsc ar (c * 200) 0 * 0.05
let b = localBuf 11 1
t = impulse ar 10 0
p = pulseCount t 0
d = demand t 0 (dbufwr (-666) b p NoLoop)
in mrg [dc ar 0,poll t p 0 (label "p")]
let b = localBufId 'α' 11 1
t = impulse ar 10 0
p = pulseCount t 0
... |
0cd6c875a7850504eb06d844d4eed87d475be74f505dca5e05f26b13cd7428b2 | CorticalComputer/Book_NeuroevolutionThroughErlang | substrate.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_18/substrate.erl | erlang |
All rights reserved.
io:format("InitState:~p~n",[InitState]),
io:format("reseting:~n"),
io:format("reverting:~n"),
io:format("********ERROR: Substrate Crashed:~p~n",[S])
All sensory signals received
==================================================================== Internal Functions
io:format("ANY:~p~n",[... | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(s... |
082cd3b365b012c401b1dde7234287e48681c1974f2ee7c2a2acd7d87fd1e918 | ahrefs/monorobot | request_handler.ml | open Printf
open Devkit
open Lib
let log = Log.from "request_handler"
module Action = Action.Action (Api_remote.Github) (Api_remote.Slack)
let setup_http ~ctx ~signature ~port ~ip =
let open Httpev in
let connection = Unix.ADDR_INET (ip, port) in
let%lwt () =
Httpev.setup_lwt { default with name = "monorob... | null | https://raw.githubusercontent.com/ahrefs/monorobot/d161c2d2d9ebffaebf9afdb0a89c0498b6bfd16b/src/request_handler.ml | ocaml | open Printf
open Devkit
open Lib
let log = Log.from "request_handler"
module Action = Action.Action (Api_remote.Github) (Api_remote.Slack)
let setup_http ~ctx ~signature ~port ~ip =
let open Httpev in
let connection = Unix.ADDR_INET (ip, port) in
let%lwt () =
Httpev.setup_lwt { default with name = "monorob... | |
4cc938192f92ae9c613e1acf36fae4dfda234a981f7b017e70e559e6c9961c07 | mihi-tr/csv-map | core_test.clj | (ns csv-map.core-test
(:use clojure.test
csv-map.core))
(def test-csv
(str
"a,b,c\n"
"1,2,3\n"
"4,5,6\n"
)
)
(deftest write-is-symmetric
(testing "write-csv is symmetric with parse-csv (for simple headers)"
(is (= (write-csv (parse-csv test-csv)) test-csv)))
)
(deftest write-is-symmet... | null | https://raw.githubusercontent.com/mihi-tr/csv-map/a669a8e0195213fe5e30b21ce265a37c4e09d5d1/test/csv_map/core_test.clj | clojure | (ns csv-map.core-test
(:use clojure.test
csv-map.core))
(def test-csv
(str
"a,b,c\n"
"1,2,3\n"
"4,5,6\n"
)
)
(deftest write-is-symmetric
(testing "write-csv is symmetric with parse-csv (for simple headers)"
(is (= (write-csv (parse-csv test-csv)) test-csv)))
)
(deftest write-is-symmet... | |
878af94590dc919f9b6c3041205ccd50fa5e97c30579f6a6edf7a58b1c7e1119 | yrashk/socket.io-erlang | demo_ssl.erl | #! /usr/bin/env escript
%%! -pa ../ebin ../deps/misultin/ebin ../deps/ossp_uuid/ebin ../deps/jsx/ebin ../deps/gproc/ebin
-mode(compile).
-include_lib("../include/socketio.hrl").
-compile(export_all).
-behaviour(gen_event).
%% gen_event callbacks
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
... | null | https://raw.githubusercontent.com/yrashk/socket.io-erlang/7a6c768a28cf18d58efd7abe0eb276a22dbc7974/demo/demo_ssl.erl | erlang | ! -pa ../ebin ../deps/misultin/ebin ../deps/ossp_uuid/ebin ../deps/jsx/ebin ../deps/gproc/ebin
gen_event callbacks
gen_event
| #! /usr/bin/env escript
-mode(compile).
-include_lib("../include/socketio.hrl").
-compile(export_all).
-behaviour(gen_event).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
terminate/2, code_change/3]).
main(_) ->
appmon:start(),
application:start(sasl),
application:sta... |
a177382adade0127e69087c78f69a184e83be604e40e1c47e30bef4d7d6dd964 | Ptival/chick | Parsing.hs | module Parsing
( binderP,
bindingP,
bindingsP,
parseMaybeTerm,
runParserTerm,
termP,
variableP,
)
where
import Control.Monad.Fix (fix)
import Data.Functor (($>))
import Data.Void (Void)
import Parsing.Chick.Utils (identifier, parens, rword, symbol)
import Parsing.Types (Parser)
import Parsi... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Parsing.hs | haskell | low precedence
high precedence
Binary operator parsers
unfortunately, we cannot commit after the symbol, because it could be the
prefix of something else
-- short for:
binOpRP s k selfP nextP = try do
l <- nextP
symbol s
r <- selfP
return $ k l r
Individual parsers (alphabetically)
was :
was:
-- was... | module Parsing
( binderP,
bindingP,
bindingsP,
parseMaybeTerm,
runParserTerm,
termP,
variableP,
)
where
import Control.Monad.Fix (fix)
import Data.Functor (($>))
import Data.Void (Void)
import Parsing.Chick.Utils (identifier, parens, rword, symbol)
import Parsing.Types (Parser)
import Parsi... |
5870f7f86b994d80ba63139edf762b846a36065ed7af6beeae4b0ea46e5559e6 | rollacaster/hiccup-d3 | voronoi.cljs | (ns tech.thomas-sojka.hiccup-d3.charts.voronoi
(:require ["d3" :as d3])
(:require-macros [tech.thomas-sojka.hiccup-d3.macros :as m]))
(def plain
(m/build-chart
"plain"
(fn [data]
(let [size 300
delaunay (.from d3/Delaunay (clj->js data))
voronoi (.voronoi delaunay (into-array [0 ... | null | https://raw.githubusercontent.com/rollacaster/hiccup-d3/1c124d293889793638fa65f1ab6c82b79df52b85/src/main/tech/thomas_sojka/hiccup_d3/charts/voronoi.cljs | clojure | (ns tech.thomas-sojka.hiccup-d3.charts.voronoi
(:require ["d3" :as d3])
(:require-macros [tech.thomas-sojka.hiccup-d3.macros :as m]))
(def plain
(m/build-chart
"plain"
(fn [data]
(let [size 300
delaunay (.from d3/Delaunay (clj->js data))
voronoi (.voronoi delaunay (into-array [0 ... | |
a4b71fed31e8ed6be6518da3c898d56c72409e8680719cf10c1536f56bb15359 | cdfa/frugel | Optics.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Text.Megaparsec.State.Optics where
import Optics
import Prelude hiding ( State )
import Text.Mega... | null | https://raw.githubusercontent.com/cdfa/frugel/d412673d8925a6f9eaad4e043cbd8fa46ed50aa2/scout-src/Text/Megaparsec/State/Optics.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Text.Megaparsec.State.Optics where
import Optics
import Prelude hiding ( State )
import Text.Mega... | |
69ae501364b4a0166e9aa8693b52441ffb9ca7a6feb2d0c8fd1082cd1bf86e7f | int-index/kalium | Typecheck.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Kalium.Nucleus.Scalar.Typecheck where
import Kalium.Prelude
import Kalium.Util
import Control.Exception
import Control.Monad.Reader
import Control.Monad.Except
... | null | https://raw.githubusercontent.com/int-index/kalium/0653b4229001880322acf3016de595360de726ec/src/Kalium/Nucleus/Scalar/Typecheck.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Kalium.Nucleus.Scalar.Typecheck where
import Kalium.Prelude
import Kalium.Util
import Control.Exception
import Control.Monad.Reader
import Control.Monad.Except
... | |
b809a8969d7f01c2cb80d4d84eae037f982b84c994a2412fd5f1ebc844a5330f | vlstill/hsExprTest | safety.IO+pragma.nok.hs | # LANGUAGE Trustworthy #
import System.IO.Unsafe ( unsafePerformIO )
import System.Exit ( exitSuccess )
foo = unsafePerformIO $ exitSuccess
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/safety.IO%2Bpragma.nok.hs | haskell | # LANGUAGE Trustworthy #
import System.IO.Unsafe ( unsafePerformIO )
import System.Exit ( exitSuccess )
foo = unsafePerformIO $ exitSuccess
| |
faadfb2999e0bd8b3e9b8e7936118a8c265c63f103bc0d4731ceb14f4125e735 | meain/evil-textobj-tree-sitter | textobjects.scm | ;; Blocks
((compound_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
((quote_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
((let_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
;; Conditionals
((if_statement co... | null | https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/02f8253034042d8f171bc0ef93e3538b71a29153/queries/julia/textobjects.scm | scheme | Blocks
Conditionals
Loops
Type definitions
Function definitions
Calls
Parameters
Comments | ((compound_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
((quote_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
((let_statement
. (_)? @block.inner._start
(_) @block.inner._end .)
) @block.outer
((if_statement condition: (_)
. (_)? @... |
0b4a2b94ddb4dc9c5266b5c11e1ae0d567c4933b0267921c97f20aa1bad464e4 | PEZ/rich4clojure | problem_132.clj | (ns rich4clojure.medium.problem-132
(:require [hyperfiddle.rcf :refer [tests]]))
= Insert between two items =
;; By 4Clojure user: srid
;; Difficulty: Medium
Tags : [ seqs core - functions ]
;;
Write a function that takes a two - argument predicate , a
;; value, and a collection; and returns a new collection
... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/medium/problem_132.clj | clojure | By 4Clojure user: srid
Difficulty: Medium
value, and a collection; and returns a new collection
that satisfy the predicate.
fibonacci numbers
both even or both odd
Share your solution, and/or check how others did it:
| (ns rich4clojure.medium.problem-132
(:require [hyperfiddle.rcf :refer [tests]]))
= Insert between two items =
Tags : [ seqs core - functions ]
Write a function that takes a two - argument predicate , a
where the value is inserted between every two items
(def __ :tests-will-fail)
(comment
)
(tests
'... |
753b83c711e06051b90192f465b7c2edd552511eccb29bae7c871596e145d742 | jkk/formative-demo | web.clj | (ns formative-demo.web
(:require [compojure.core :refer [defroutes GET POST ANY]]
[compojure.handler :refer [site]]
[compojure.route :as route]
[ring.middleware.stacktrace :as trace]
[ring.middleware.gzip :refer [wrap-gzip]]
[ring.adapter.jetty :as jetty]
... | null | https://raw.githubusercontent.com/jkk/formative-demo/c379800c205c29ea46f08fba9ce4d1ff5b8acb42/src/formative_demo/web.clj | clojure | :renderer :inline
"bootstrap3-horizontal"
For interactive development:
(.stop server)
(def server (-main)) | (ns formative-demo.web
(:require [compojure.core :refer [defroutes GET POST ANY]]
[compojure.handler :refer [site]]
[compojure.route :as route]
[ring.middleware.stacktrace :as trace]
[ring.middleware.gzip :refer [wrap-gzip]]
[ring.adapter.jetty :as jetty]
... |
91a7307575fcc1366edf358619f4ebd25b7a049c81d620844ca892029d817704 | FranklinChen/hugs98-plus-Sep2006 | Attributes.hs | -- #hide
module Text.XHtml.Frameset.Attributes where
import Text.XHtml.Internals
-- * Extra attributes in XHTML Frameset
frameborder :: Int -> HtmlAttr
frameborder = intAttr "frameborder"
marginheight :: Int -> HtmlAttr
marginheight = intAttr "marginheight"
marginwidth ... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/xhtml/Text/XHtml/Frameset/Attributes.hs | haskell | #hide
* Extra attributes in XHTML Frameset |
module Text.XHtml.Frameset.Attributes where
import Text.XHtml.Internals
frameborder :: Int -> HtmlAttr
frameborder = intAttr "frameborder"
marginheight :: Int -> HtmlAttr
marginheight = intAttr "marginheight"
marginwidth :: Int -> HtmlAttr
marginwidth = ... |
3ccafade592de2c1433d68235fe31e516a635037b59bcdfe094aa6603962fe64 | CardanoSolutions/kupo | MonadThrow.hs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
module Kupo.Control.MonadThrow
( MonadThrow (..)
) where
import Control.Monad.Class.MonadThrow
( MonadThrow (..)
)
| null | https://raw.githubusercontent.com/CardanoSolutions/kupo/fa37a0e569cc5d8faee925bf19f0349dac7b3990/src/Kupo/Control/MonadThrow.hs | haskell | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
module Kupo.Control.MonadThrow
( MonadThrow (..)
) where
import Control.Monad.Class.MonadThrow
( MonadThrow (..)
)
| |
cd4051e0651bbb382fd532284ce86ecdcc7a09a94eae9576fa3845e62a5131f1 | nix-community/emacs2nix | Elpa.hs |
emacs2nix - Generate Nix expressions for Emacs packages
Copyright ( C ) 2016
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) a... | null | https://raw.githubusercontent.com/nix-community/emacs2nix/860da04ca91cbb69c9b881a54248d16bdaaf9923/src/Distribution/Nix/Package/Elpa.hs | haskell | # LANGUAGE OverloadedStrings # |
emacs2nix - Generate Nix expressions for Emacs packages
Copyright ( C ) 2016
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) a... |
fdc9e0cc3a8757d31c313553c3943ea632b0bb3487ab9f9318a805c730316d68 | kowainik/stan | Toml.hs | # LANGUAGE ApplicativeDo #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
@tomland@ library integration . ' TomlCodec 's for the ' Config ' data type .
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
@tomland@ library integ... | null | https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Toml.hs | haskell | * Codecs
* Files
--------------------------------------------------------------------------
CheckFilter
--------------------------------------------------------------------------
--------------------------------------------------------------------------
---------------------------------------------------------------... | # LANGUAGE ApplicativeDo #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
@tomland@ library integration . ' TomlCodec 's for the ' Config ' data type .
Copyright: (c) 2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
@tomland@ library integ... |
888a91002c671eb2d72f95c50272755f239e487610ea1cfa3eb2092668996ba5 | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum)
(chicken io)
(chicken irregex)
(chicken string))
(define-syntax grid-ref
(syntax-rules ()
((_ grid x y)
(vector-ref (vector-ref grid x) y))))
(define-syntax grid-set!
(syntax-rules ()
((_ grid x y n)
(vector-set! (vector-ref grid x) y n))))
(define (parse-chunk ... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/b0a0a6a6ac5b9c4210d35ee3f371268df594c431/src/096/solution.scm | scheme | (import
(chicken fixnum)
(chicken io)
(chicken irregex)
(chicken string))
(define-syntax grid-ref
(syntax-rules ()
((_ grid x y)
(vector-ref (vector-ref grid x) y))))
(define-syntax grid-set!
(syntax-rules ()
((_ grid x y n)
(vector-set! (vector-ref grid x) y n))))
(define (parse-chunk ... | |
f57fc8782cbaaee2966b43653e2063d761b538d6f4b445f7f417c6e5b46621a5 | redbadger/karma-tracker | date_selector.cljs | (ns karma-tracker-ui.views.date-selector
(:require [re-frame.core :as re-frame]
[karma-tracker-ui.routes :as routes]
[karma-tracker-ui.views.format :as format]
[karma-tracker-ui.views.svg :as svg]))
(defn current-date []
(let [date (re-frame/subscribe [:current-date])]
(fn [... | null | https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/ui/src/cljs/karma_tracker_ui/views/date_selector.cljs | clojure | (ns karma-tracker-ui.views.date-selector
(:require [re-frame.core :as re-frame]
[karma-tracker-ui.routes :as routes]
[karma-tracker-ui.views.format :as format]
[karma-tracker-ui.views.svg :as svg]))
(defn current-date []
(let [date (re-frame/subscribe [:current-date])]
(fn [... | |
bd88ef2d7543c94d8f6ae4476382ea923a2d0e94ef8380a2eac5ffd54ccee813 | jepsen-io/mongodb | list_append_test.clj | (ns jepsen.mongodb.list-append-test
(:require [clojure [pprint :refer [pprint]]
[test :refer :all]]
[jepsen [checker :as checker]
[util :as util]]
[jepsen.mongodb.list-append :as la]))
(deftest stale-read-test
; Making sure that we can catch stale re... | null | https://raw.githubusercontent.com/jepsen-io/mongodb/09c9ebc1ac0e7a603462fa05399b68f57dad9be9/test/jepsen/mongodb/list_append_test.clj | clojure | Making sure that we can catch stale reads with our checker
(pprint results) | (ns jepsen.mongodb.list-append-test
(:require [clojure [pprint :refer [pprint]]
[test :refer :all]]
[jepsen [checker :as checker]
[util :as util]]
[jepsen.mongodb.list-append :as la]))
(deftest stale-read-test
(let [ax1 {:index 0, :time 0, :process ... |
cebe66eaccca46a38a44b440305a45f0e2697297c8655ecbd9cad5adf997e6d6 | haslab/HAAP | IO.hs |
HAAP : Haskell Automated Assessment Platform
This module provides basic IO functionalities .
HAAP: Haskell Automated Assessment Platform
This module provides basic IO functionalities.
-}
# LANGUAGE BangPatterns , StandaloneDeriving , FlexibleContexts , DeriveGeneric , ScopedTypeVariables #
module HAAP.IO wher... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/IO.hs | haskell | optional config file
run silently without printing to stderr or stdout
input file or handle for processes
run inside a cabal sandbox (with given config file) or not; relative to the current path
escape shell characters or not
additional environment variables
paths to add to $PATH
environment command (such as en... |
HAAP : Haskell Automated Assessment Platform
This module provides basic IO functionalities .
HAAP: Haskell Automated Assessment Platform
This module provides basic IO functionalities.
-}
# LANGUAGE BangPatterns , StandaloneDeriving , FlexibleContexts , DeriveGeneric , ScopedTypeVariables #
module HAAP.IO wher... |
216a9c86ba04978836c113126a1af54c209b6c7cf061adf4aff565735b8e51d2 | GumTreeDiff/cgum | lexer_parser.ml |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/parsing_c/lexer_parser.ml | ocaml | parse_typedef_fix
parse_typedef_fix2
have far more .failed without this
Used by parse_c when do some error recovery. The parse error may
* have some bad side effects on typedef hash, so recover this.
|
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... |
6acc2acf8ac121020f9869405cefc9c363f19cdaa0a7c6d0f64c8de847f969ee | byulparan/cl-collider | DistortionPlugins.lisp | (in-package #:sc)
(defugen (crossover-distortion "CrossoverDistortion")
(in &optional (amp .5) (smooth .5) (mul 1.0) (add 0.0))
((:ar (madd (multinew new 'ugen in amp smooth) mul add))))
(defugen (smooth-decimator "SmoothDecimator")
(in &optional (rate 44100.0) (smoothing .5) (mul 1.0) (add 0))
((:ar (mad... | null | https://raw.githubusercontent.com/byulparan/cl-collider/1ad7f59c36acb61987e65973b77c5deb180285b1/ugens/SC3plugins/DistortionPlugins.lisp | lisp | (in-package #:sc)
(defugen (crossover-distortion "CrossoverDistortion")
(in &optional (amp .5) (smooth .5) (mul 1.0) (add 0.0))
((:ar (madd (multinew new 'ugen in amp smooth) mul add))))
(defugen (smooth-decimator "SmoothDecimator")
(in &optional (rate 44100.0) (smoothing .5) (mul 1.0) (add 0))
((:ar (mad... | |
175e6ce3b6f1f8bf387948cb14b0bdb0ede54fd6cfc6c245010e9a04d5c4d0a0 | noloop/cacau | base.lisp | (in-package #:noloop.cacau)
(defun cacau-logo ()
(format t "~a~%~%" (cacau-string-color "<=> Cacau <=>" "red"
:background "yellow"
:style "underline")))
(defun separation-bar (&optional color)
(format t "~%~a~%" (cacau-string-co... | null | https://raw.githubusercontent.com/noloop/cacau/ba0fb36a284ded884f1dab0bd3f0f41ec14e3038/src/reporters/base.lisp | lisp | (in-package #:noloop.cacau)
(defun cacau-logo ()
(format t "~a~%~%" (cacau-string-color "<=> Cacau <=>" "red"
:background "yellow"
:style "underline")))
(defun separation-bar (&optional color)
(format t "~%~a~%" (cacau-string-co... | |
989d366b96a4943967ea56399a96ed0f026e5b4e86596f219ff6da928a9174cd | acieroid/overscore | training.clj | ;;; Define and load the training set data
(ns overscore.recognition.classification.training
(:use overscore.utils
overscore.recognition.segmentation.segment)
(:import java.awt.image.BufferedImage
javax.imageio.ImageIO
java.io.File))
(defrecord training-data [class width height data])
... | null | https://raw.githubusercontent.com/acieroid/overscore/71649b37c415482b6c4ab150290ef0719649d359/src/overscore/recognition/classification/training.clj | clojure | Define and load the training set data
white (not active)
black (active) | (ns overscore.recognition.classification.training
(:use overscore.utils
overscore.recognition.segmentation.segment)
(:import java.awt.image.BufferedImage
javax.imageio.ImageIO
java.io.File))
(defrecord training-data [class width height data])
(def training-set (atom []))
(defn split... |
38458865ac81a9ad39cd13868136a730f0dc1a4d4ebdfaae6f790cd195b9a578 | MassD/99 | p61.ml | (*
Count the leaves of a binary tree. (easy)
A leaf is a node with no successors. Write a function count_leaves to count them.
*)
type 'a bt = Empty | Node of 'a * 'a bt * 'a bt
let rec count_leaves = function
| Empty -> 0
| Node (_,Empty,Empty) -> 1
| Node (_,l,r) -> (count_leaves l) + (count_leaves r)
let... | null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/55-69-binary-tress/p61.ml | ocaml |
Count the leaves of a binary tree. (easy)
A leaf is a node with no successors. Write a function count_leaves to count them.
|
type 'a bt = Empty | Node of 'a * 'a bt * 'a bt
let rec count_leaves = function
| Empty -> 0
| Node (_,Empty,Empty) -> 1
| Node (_,l,r) -> (count_leaves l) + (count_leaves r)
let _ = count_leaves (Node (1,Node (2,Empty,Empty),Empty))
|
370269b2cd58eb07ef15ce4ab0f9b1aae7c04eb195bca176b8010dd1c87a1939 | softwarelanguageslab/maf | R5RS_scp1_flip2-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((make-flip (lambda ()
(let ((state 0))
(lambda ()
(if (= state 0) (set! state 1) (set! state 0))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_flip2-2.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((make-flip (lambda ()
(let ((state 0))
(lambda ()
(if (= state 0) (set! state 1) (set! state 0))
state))))
(flip (make-flip)))
... |
958e2994b2afec9dd7f3539e6e10290728f40348690ec96cdf37745f94aecf65 | RolfRolles/PandemicML | AVM2trait_slot.mli | open AVM2Pervasives
type t =
{
slot_id: u30;
type_name: u30;
vindex: u30;
vkind: u8;
}
val parse : prim_parser -> t | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/AVM2/AVM2trait_slot.mli | ocaml | open AVM2Pervasives
type t =
{
slot_id: u30;
type_name: u30;
vindex: u30;
vkind: u8;
}
val parse : prim_parser -> t | |
53ead9b6b583210f5c6734fdd85c475b80c35a31ce4ddd5687e1b4c3b447e497 | haskell-game/sdl2-gfx | Rotozoom.hs | |
Module : SDL.Rotozoom
Copyright : ( c ) 2015
License : MIT
Maintainer :
Stability : experimental
Bindings to @SDL2_gfx@ 's surface rotation and zoom functionality .
Module : SDL.Rotozoom
Copyright : (c) 2015 Siniša Biđin
License : MIT
Maintainer :
Stability : exp... | null | https://raw.githubusercontent.com/haskell-game/sdl2-gfx/8532ccf52602e983aef4cb1bf5af3dbd1e76256e/src/SDL/Rotozoom.hs | haskell | # LANGUAGE LambdaCase #
| Desired rotation in degrees.
| A dimension scaling factor.
| Same as 'rotozoom', but applies different horizontal and vertical scaling
factors.
The 'Zoom' arguments are the horizontal and vertical zoom, respectively.
| A surface size, packing width and height.
| Given the 'Size' of... | |
Module : SDL.Rotozoom
Copyright : ( c ) 2015
License : MIT
Maintainer :
Stability : experimental
Bindings to @SDL2_gfx@ 's surface rotation and zoom functionality .
Module : SDL.Rotozoom
Copyright : (c) 2015 Siniša Biđin
License : MIT
Maintainer :
Stability : exp... |
04093ed0df8ee2ea66fcef1837a2d651eb71fa40cfb9227102d513f6914d5ab3 | ttuegel/sparse-linear | test-feast.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module Main where
import qualified Data.Vector.Storable as V
import qualified Data.Vector.Unboxed as U
import Test.Hspec
import Test.QuickCheck
import Data.Matrix.Sparse
import Numeric.LinearAlgebra.Feast
(~==) :: (IsReal a, Eq a, Fractional a, Fractional (RealOf... | null | https://raw.githubusercontent.com/ttuegel/sparse-linear/e10453c04e0fa13ba3e943122a7d5902279fa70d/feast/tests/test-feast.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
module Main where
import qualified Data.Vector.Storable as V
import qualified Data.Vector.Unboxed as U
import Test.Hspec
import Test.QuickCheck
import Data.Matrix.Sparse
import Numeric.LinearAlgebra.Feast
(~==) :: (IsReal a, Eq a, Fractional a, Fractional (RealOf... | |
8374bdfb5063df8686d4cfe839d91f428dcd618bc7b0850544ebfa22cb964097 | schmidt73/guidescan-web | jobs.clj | (ns guidescan-web.query.jobs
"This namespaces exposes a JobQueue component that asynchronously performs
gRNA query jobs in the background."
(:require [guidescan-web.query.process :refer [process-query]]
[failjure.core :as f]
[taoensso.timbre :as timbre]
[com.stuartsierra.compon... | null | https://raw.githubusercontent.com/schmidt73/guidescan-web/c99be757a27c84ca7733de646aa06dc7e047cd61/src/guidescan_web/query/jobs.clj | clojure | could have used atom but easier to use ref | (ns guidescan-web.query.jobs
"This namespaces exposes a JobQueue component that asynchronously performs
gRNA query jobs in the background."
(:require [guidescan-web.query.process :refer [process-query]]
[failjure.core :as f]
[taoensso.timbre :as timbre]
[com.stuartsierra.compon... |
12d3c2349062d1478f6a12a6bc78d6e8ba595428c44d9e1da1f721ea516bedc1 | open-telemetry/opentelemetry-erlang-api | ot_span.erl | %%%------------------------------------------------------------------------
Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang-api/41cb700d60a7dcfdb4165aca73634bbe1c07a33f/src/ot_span.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 o... | Copyright 2019 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ot_span).
-export([get_ctx/2,
trace_id/1,
span_id/1,
tracestate/1,
is_recording/2,
... |
ab3475ce078673fcabcbc401d28da28e1b156b0b88fa4d9ec75d8e2b81e997b1 | anmonteiro/ocaml-h2 | h2_lwt_unix.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/1aea7e0aebb2c440dc35ef35ca15d87d44799f4e/lwt-unix/h2_lwt_unix.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | |
775a7894a462ed1cc5a34e2161ea51c19feced2eba6c19456d23a013038bba18 | antono/guix-debian | which.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/which.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages which)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (... |
4da565cb1ae539d258c22a00a2f167e2c3ce8d5c7057dfd994f852e2887d14ae | OCamlPro/scilint | tyxml_js_manip.mli |
val alert: string -> unit
val confirm: string -> bool
val log: ('a, unit, string, unit) format4 -> 'a
val debug: ('a, unit, string, unit) format4 -> 'a
val error: ('a, unit, string, unit) format4 -> 'a
val js_log: 'a -> unit
val js_debug: 'a -> unit
val js_error: 'a -> unit
val reload: unit -> unit
module Manip : ... | null | https://raw.githubusercontent.com/OCamlPro/scilint/9d9ddd8e1630ddeae7f4f875bce62b2f65ec17d8/src/common/tyxml_js_manip.mli | ocaml |
val alert: string -> unit
val confirm: string -> bool
val log: ('a, unit, string, unit) format4 -> 'a
val debug: ('a, unit, string, unit) format4 -> 'a
val error: ('a, unit, string, unit) format4 -> 'a
val js_log: 'a -> unit
val js_debug: 'a -> unit
val js_error: 'a -> unit
val reload: unit -> unit
module Manip : ... | |
1231790dda9b4f4803f6c0969c24ecd9f80f4c6461a2ae8fdd46a6a87202b80e | dmillett/political-canvas | chicago.clj | (ns political_canvas.shared.data.us.il.cook.chicago
(:use [political_canvas.shared.data.refdata.schema]
[political_canvas.shared.data.model.region]))
(def ward1 {:name "Ward 1" :type "LOCAL-CITY"
44 precincts
:boundaries [[] [] []] ; Explore geometric shapes (area), otherwise use lat-lon pairs
... | null | https://raw.githubusercontent.com/dmillett/political-canvas/ec59a065b832277ec06f80e67977eee196a6a194/src/political_canvas/shared/data/us/il/cook/chicago.clj | clojure | Explore geometric shapes (area), otherwise use lat-lon pairs
I am not in favor categorizing ethnicities, but worth a discussion
name type description electected postal languages population boundaries
type street postal region country coordinates
| (ns political_canvas.shared.data.us.il.cook.chicago
(:use [political_canvas.shared.data.refdata.schema]
[political_canvas.shared.data.model.region]))
(def ward1 {:name "Ward 1" :type "LOCAL-CITY"
44 precincts
:contact_info {:email ""}
:address {:state "IL" :city "Chicago" :postal []... |
04a5d07a3d5f8cb3685434ad66471c831f48cf96b466b6f50456c9c30e5464fd | jaked/orpc | server.ml | module Server =
struct
let boards = [|
got these from Gnome Sudoku
"500640908002000000900002000800320010040105080060078005000200009000000700304089006";
"071600900400000301000802070050000400200105003003000090010204000608000002004009150";
"07630590800100000000200103000051070020000000500307800009040030000... | null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/examples/sudoku/server.ml | ocaml | XXX handle gzip
allow all built-in logging styles
... all ways of workload management | module Server =
struct
let boards = [|
got these from Gnome Sudoku
"500640908002000000900002000800320010040105080060078005000200009000000700304089006";
"071600900400000301000802070050000400200105003003000090010204000608000002004009150";
"07630590800100000000200103000051070020000000500307800009040030000... |
131492d381541e503ed565d077687bcbb95ce171dcf3db7f50525ee6549ad0e4 | autotaker/smopeck | ValidatorSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Smopeck.Spec.ValidatorSpec where
import Control.Monad.Except
import Data.Aeson
import Data.Either
import qualified Data.Map as M
import Smopeck.Mock.Location
import Smopeck.Spec.Exp
import Smopeck.Spec.L... | null | https://raw.githubusercontent.com/autotaker/smopeck/7e4ab8bf716125783ccaaf84076c992c2bca5c7f/test/Smopeck/Spec/ValidatorSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module Smopeck.Spec.ValidatorSpec where
import Control.Monad.Except
import Data.Aeson
import Data.Either
import qualified Data.Map as M
import Smopeck.Mock.Location
import Smopeck.Spec.Exp
import Smopeck.Spec.Lattice
import Smopeck.Spe... |
eb76fdfd564f0c46089de10fba5b57834392e5550d4ae3afa825e8869fa7e4ce | bakul/s9fes | runtime-stats.scm | Scheme 9 from Empty Space , Unix Function Library
By , 2010 , 2012 , 2018
; In the public domain
;
; (runtime-stats procedure <option> ...) ==> list
;
; Measure the runtime of the unary PROCEDURE when applied to
; a range of values (see below). RUNTIME-STATS returns a list
; containing the data it gathered. Ea... | null | https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/ext/sys-unix/runtime-stats.scm | scheme | In the public domain
(runtime-stats procedure <option> ...) ==> list
Measure the runtime of the unary PROCEDURE when applied to
a range of values (see below). RUNTIME-STATS returns a list
containing the data it gathered. Each entry of the list has
the following form:
total number of vector cells allocated ... | Scheme 9 from Empty Space , Unix Function Library
By , 2010 , 2012 , 2018
( value ( seconds microsecs ) conses nodes )
VALUE is the valued passed to the procedure . The sum of SECONDS
and MICROSECS is the time the procedure took to complete .
CONSES and NODES are the number of cons cells and the ... |
3314c004d68a36fcca4e106b65d6ef2a94a12a03b177e66bb58713cc711c1657 | BranchTaken/Hemlock | test_some_if.ml | open! Basis.Rudiments
open! Basis
open Option
let test () =
List.iter [false; true] ~f:(fun b ->
let a = 42L in
File.Fmt.stdout
|> Fmt.fmt "some_if "
|> Bool.pp b
|> Fmt.fmt " "
|> Uns.pp a
|> Fmt.fmt " -> "
|> (pp Uns.pp) (some_if b a)
|> Fmt.fmt "\n"
|> ignore
)
let _ = t... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/option/test_some_if.ml | ocaml | open! Basis.Rudiments
open! Basis
open Option
let test () =
List.iter [false; true] ~f:(fun b ->
let a = 42L in
File.Fmt.stdout
|> Fmt.fmt "some_if "
|> Bool.pp b
|> Fmt.fmt " "
|> Uns.pp a
|> Fmt.fmt " -> "
|> (pp Uns.pp) (some_if b a)
|> Fmt.fmt "\n"
|> ignore
)
let _ = t... | |
1127da6f1cf5effa8d94d33d5fd529b450176391066d57a9e84cab3131804978 | garrigue/labltk | canvas_bind.ml | ##ifdef CAMLTK
let bind widget tag eventsequence action =
tkCommand [|
cCAMLtoTKwidget widget_canvas_table widget;
TkToken "bind";
cCAMLtoTKtagOrId tag;
cCAMLtoTKeventSequence eventsequence;
begin match action with
| BindRemove -> TkToken ""
| BindSet (what, f) ->
let cbId = regis... | null | https://raw.githubusercontent.com/garrigue/labltk/2cbb92a8c0feacdd8ee69976f3f45a7cf81f805c/builtin/canvas_bind.ml | ocaml | ##ifdef CAMLTK
let bind widget tag eventsequence action =
tkCommand [|
cCAMLtoTKwidget widget_canvas_table widget;
TkToken "bind";
cCAMLtoTKtagOrId tag;
cCAMLtoTKeventSequence eventsequence;
begin match action with
| BindRemove -> TkToken ""
| BindSet (what, f) ->
let cbId = regis... | |
b9d87dd47c340692f75ed4d281a55a4e2236f3642aba832aabd8a1e7ad9f84d5 | RedHatQE/katello.auto | distributors.clj | (ns katello.tests.distributors
(:refer-clojure :exclude [fn])
(:require [katello :as kt]
(katello [tasks :refer :all]
[rest :as rest]
[ui :as ui]
[navigation :as nav]
[ui-common :as common]
[notifica... | null | https://raw.githubusercontent.com/RedHatQE/katello.auto/79fec96581044bce5db5350d0da325e517024962/src/katello/tests/distributors.clj | clojure | (ns katello.tests.distributors
(:refer-clojure :exclude [fn])
(:require [katello :as kt]
(katello [tasks :refer :all]
[rest :as rest]
[ui :as ui]
[navigation :as nav]
[ui-common :as common]
[notifica... | |
c6b128352e0a8ed9d6164a900acab7d0a64299efc54fcd730c29ea3cb8d93f27 | rtoy/cmucl | type-boot.lisp | ;;; -*- Log: code.log; Package: C -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/code/type-boot.lisp $")
;... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/code/type-boot.lisp | lisp | -*- Log: code.log; Package: C -*-
**********************************************************************
**********************************************************************
Some initialization hacks that we need to get the type system started up
enough so that we can define the types used to define types... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/code/type-boot.lisp $")
(in-package "C")
(intl:textdomain "cmucl")
(deftype inlinep ()
'(member :inline :maybe-inline :notinline nil))
(deftyp... |
f95b1d2e68568443ef33cc5f0fee0a7994852007879bc193164514663c3a7b24 | dfordivam/tenjinreader | ReviewState.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module ReviewState
(SrsReviewType(..)
, syncResultWithServer
, RecogReview
, ProdReview
, Revie... | null | https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/frontend/src/ReviewState.hs | haskell | # LANGUAGE OverloadedStrings #
Left True -> No Mistake
Left False -> Did Mistake
Get the pending item based on the review state
How to fetch reviews from reviewQ and send to review widget
After doing a review whether success or failure fetch a new review
if reviewQ empty then do this whenever reviewQ becomes non ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module ReviewState
(SrsReviewType(..)
, syncResultWithServer
, RecogReview
, ProdReview
, ReviewStateEvent(..)
, SrsWidgetState(... |
376f42339921129b6646e5f9ea1f940fd3879e2c895cb220ba95e5acb1a0c446 | emilaxelsson/syntactic | WellScopedTests.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
module WellScopedTests where
import Test.Tasty
import Test.Tasty.Golden
import Test.Tasty.QuickCheck
import Data.ByteString.Lazy.UTF8 (fromString)
import Language.Syntactic
import Language.Syntactic.Functional.WellScoped
import qualified WellScoped as WS
... | null | https://raw.githubusercontent.com/emilaxelsson/syntactic/c51258ed96d4e9704e5842ce15667e7d3e5b77d7/tests/WellScopedTests.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE ScopedTypeVariables #
module WellScopedTests where
import Test.Tasty
import Test.Tasty.Golden
import Test.Tasty.QuickCheck
import Data.ByteString.Lazy.UTF8 (fromString)
import Language.Syntactic
import Language.Syntactic.Functional.WellScoped
import qualified WellScoped as WS
ex1 a = let b = a+4 in ... |
24774b003c3f4df0d4ec9810eafe8c01414b1b1ad0c15d43e60e06a2bada199e | aspiwack/peppermint-prover | Compile.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE EmptyCase #
# ... | null | https://raw.githubusercontent.com/aspiwack/peppermint-prover/203dbabcc6392a869fca7ae71320cac1a62ecc05/refined-experiment/app/Compile.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE ConstraintKinds #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
- Q: How do I lower this language?
it's much of the same thing, with a more dedicated syntax. So we have the
same problems in compiling with continuations, that call/cc is... | # LANGUAGE DataKinds #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# L... |
fc1a1bd27e7a583972f7726faedb6576e93f8dce887fd66b8ea63e7970448b84 | TrustInSoft/tis-kernel | callgraph_api.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/callgraph/callgraph_api.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
93b64d40038aab86cb9275ecb85a2e0c13af6f5ae61440c77b6737669e7ab1db | footprintanalytics/footprint-web | catch_exceptions.clj | (ns metabase.query-processor.middleware.catch-exceptions
"Middleware for catching exceptions thrown by the query processor and returning them in a friendlier format."
(:require [clojure.tools.logging :as log]
[metabase.query-processor.context :as qp.context]
[metabase.query-processor.error-t... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/catch_exceptions.clj | clojure | TODO - consider moving this into separate middleware as part of a try-catch setup so queries running in a
non-userland context can still have sane Exceptions
recurse until we find the innermost nested named error, which is the reason
we actually failed
Extract the message if applicable
TODO - we should probably c... | (ns metabase.query-processor.middleware.catch-exceptions
"Middleware for catching exceptions thrown by the query processor and returning them in a friendlier format."
(:require [clojure.tools.logging :as log]
[metabase.query-processor.context :as qp.context]
[metabase.query-processor.error-t... |
99ad3ecae1deb0213e69b7a748d310f0f7a0298603eab494f9a7f6f29dee6338 | ocamllabs/vscode-ocaml-platform | esy.mli | * Provide an interface to Esy .
The functions in this module either use the result of esy commands , or use
the filesystem to get the state of esy configurations .
The functions in this module either use the result of esy commands, or use
the filesystem to get the state of esy configurations. *)
... | null | https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/300e2be30839a05c79218af4d7e4a87818fb368e/src/esy.mli | ocaml | * Return the list of installed packages in the given opam switch.
* Return the list of root packages in the given opam switch.
Root packages are packages that have been installed by the user, as opposed
to packages that have been installed as a dependency of another package.
* Execute an esy sub-command with... | * Provide an interface to Esy .
The functions in this module either use the result of esy commands , or use
the filesystem to get the state of esy configurations .
The functions in this module either use the result of esy commands, or use
the filesystem to get the state of esy configurations. *)
... |
0113e3b139bf64ba78c72857f0a7f0036a962237c55aea22814b7cbf05c65bc8 | dselsam/arc | DSpec.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE StrictData #-... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Synth/Spec/DSpec.hs | haskell | # LANGUAGE StrictData # | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Synth.Spec.DSpec wh... |
223fc5da99f5092b8a4da064a9fb5a40a3663118a9ef1d6b2f85aefe717d19b8 | klutometis/clrs | bucket-sort.scm | (define (bucket-sort fortuita)
(let* ((n (length fortuita))
(buckets (make-vector n '())))
(loop ((for fortuitum index (in-list fortuita))
(let bucket-index (exact-floor (* n fortuitum))))
(vector-set! buckets
bucket-index
(cons fortuitum... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/8.4/bucket-sort.scm | scheme | (define (bucket-sort fortuita)
(let* ((n (length fortuita))
(buckets (make-vector n '())))
(loop ((for fortuitum index (in-list fortuita))
(let bucket-index (exact-floor (* n fortuitum))))
(vector-set! buckets
bucket-index
(cons fortuitum... | |
4b1b1baa1a97c177fae164225475e76a6218c0962ac810bca231eac0bdb8fc6f | tonyg/rmacs | timing.rkt | #lang racket/base
(provide time*
profile*)
(require profile)
(define-syntax-rule (time* label exp ...)
(let ((saved-output-port (current-output-port)))
(parameterize ((current-output-port (current-error-port)))
(time
(begin0 (parameterize ((current-output-port saved-output-port)) exp ...)... | null | https://raw.githubusercontent.com/tonyg/rmacs/8c99dd5dfa22f1f34707bbe957de268dc6a7a632/rmacs/timing.rkt | racket | #lang racket/base
(provide time*
profile*)
(require profile)
(define-syntax-rule (time* label exp ...)
(let ((saved-output-port (current-output-port)))
(parameterize ((current-output-port (current-error-port)))
(time
(begin0 (parameterize ((current-output-port saved-output-port)) exp ...)... | |
da767ab92bc6d00cc6f3a7beedbc7aa61373ebc98a82ee8b001569056d6531b9 | magnolia-lang/magnolia-lang | Parser.hs | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Magnolia.Parser (parsePackage, parsePackageHead, parseReplCommand) where
import Control.Monad.Combinators.Expr
import Control.Monad.Except (void, when)
import Data.Functor (($>))
import Data.Maybe (isJust, isNothing)
import Data.Void
import Text.Megaparsec
i... | null | https://raw.githubusercontent.com/magnolia-lang/magnolia-lang/1c5a968f21e43d2807d53000a693a620b862e5b6/src/lib/Magnolia/Parser.hs | haskell | === exception handling utils ===
=== repl parsing utils ===
TODO: fix repl to use fully qualified names
=== package head parsing utils ===
TODO: find type for imports
TODO: error out if package name is different from filepath?
=== package parsing utils ===
TODO: make expr
Statements
"Expressions"
unary ops
... | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Magnolia.Parser (parsePackage, parsePackageHead, parseReplCommand) where
import Control.Monad.Combinators.Expr
import Control.Monad.Except (void, when)
import Data.Functor (($>))
import Data.Maybe (isJust, isNothing)
import Data.Void
import Text.Megaparsec
i... |
88bf2433044c0153eb9ccd322d9727d28f8a7453491a901befcc49cad0cfe1a1 | lathe/punctaffy-for-racket | info.rkt | #lang info
(define collection "punctaffy")
(define deps (list "base"))
(define build-deps
(list
"lathe-comforts-lib"
"parendown-lib"
"profile-lib"
"punctaffy-lib"
"rackunit-lib"))
| null | https://raw.githubusercontent.com/lathe/punctaffy-for-racket/35e8f8e2c24aeb616b15ef55539c3bf54421ced6/punctaffy-test/info.rkt | racket | #lang info
(define collection "punctaffy")
(define deps (list "base"))
(define build-deps
(list
"lathe-comforts-lib"
"parendown-lib"
"profile-lib"
"punctaffy-lib"
"rackunit-lib"))
| |
1195ae8d9165fcf8e3559802c340d0a9258fe664f9a49c378b62ae975e2c2696 | mzp/min-caml | emit.ml | open Asm
external gethi : float -> int32 = "gethi"
external getlo : float -> int32 = "getlo"
すでに Save された変数の集合
let stackmap = ref [] (* Save された変数のスタックにおける位置 *)
let save x =
stackset := S.add x !stackset;
if not (List.mem x !stackmap) then
stackmap := !stackmap @ [x]
let savef x =
stackset := S.add x !s... | null | https://raw.githubusercontent.com/mzp/min-caml/cf1180792a2a0bc895ba17a0052e3b6f4a74e444/arch/PowerPC/emit.ml | ocaml | Save された変数のスタックにおける位置
関数呼び出しのために引数を並べ替える (register shuffling)
remove identical moves
find acyclic moves
no acyclic moves; resolve a cyclic move
命令列のアセンブリ生成
各命令のアセンブリ生成
末尾でなかったら計算結果を dest にセット
退避の仮想命令の実装
復帰の仮想命令の実装
末尾だったら計算結果を第一レジスタにセット
関数呼び出しの仮想命令の実装
末尾呼び出し
末尾呼び出し | open Asm
external gethi : float -> int32 = "gethi"
external getlo : float -> int32 = "getlo"
すでに Save された変数の集合
let save x =
stackset := S.add x !stackset;
if not (List.mem x !stackmap) then
stackmap := !stackmap @ [x]
let savef x =
stackset := S.add x !stackset;
if not (List.mem x !stackmap) then
... |
260c7530f087206130962274ef30dae3ef7b4c70968e52a500a3defa706546df | Gadjib/ocamlhomeworks | p1.ml | type tree = N of int*tree*tree | L;;
let main n =
let t = ref L and
rec f t n =
if n = 0 then Lef else f | null | https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/8%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/CW%202019.04.19/p1.ml | ocaml | type tree = N of int*tree*tree | L;;
let main n =
let t = ref L and
rec f t n =
if n = 0 then Lef else f | |
735febfe7c2e64714841f0ee24dea669ab5cd38af4225e720987d74bd8d2f104 | abailly/hs-word2vec | Window.hs | -- | Utilities for manipulating windows of lists (eg. random subsequence of a list around some element)
module Window(slidingWindows) where
import System.Random(randomR,getStdGen,RandomGen,mkStdGen)
-- |Select a window of size around word
--
-- >>> selectWindow 1 ("abc",'d', "efg")
-- ('d',"d")
> > > selectWindow 2 ... | null | https://raw.githubusercontent.com/abailly/hs-word2vec/894e401325dbb7c35c45e9ed546b0914f93c900f/src/Window.hs | haskell | | Utilities for manipulating windows of lists (eg. random subsequence of a list around some element)
|Select a window of size around word
>>> selectWindow 1 ("abc",'d', "efg")
('d',"d")
('d',"ade")
('d',"bade")
('d',"badfe")
('d',"de")
('d',"d")
('d',"bad")
|Generate random sliding windows over a given sent... | module Window(slidingWindows) where
import System.Random(randomR,getStdGen,RandomGen,mkStdGen)
> > > selectWindow 2 ( " abc",'d ' , " efg " )
( ' " )
> > > selectWindow 3 ( " abc",'d ' , " efg " )
> > > selectWindow 4 ( " abc",'d ' , " efg " )
> > > selectWindow 5 ( " abc",'d ' , " efg " )
> > > selectWin... |
c9561c5996aadab7da1f19191089d6c3bff7fe8930e0ad5fd2e5ed224185f9b1 | triffon/fp-2019-20 | 06--fast-pow-iter.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # Задача 6
Напишете итеративен вариант на ` fast - pow ` от миналото упражнение
(define (fast-pow-iter x n) void)
(run-tests (test-suite "count-digits tests"
(check-eq? (fast-pow-iter 10 4) 10000)
(check-... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/02--recursive-and-iterative-processes/06--fast-pow-iter.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
# # # Задача 6
Напишете итеративен вариант на ` fast - pow ` от миналото упражнение
(define (fast-pow-iter x n) void)
(run-tests (test-suite "count-digits tests"
(check-eq? (fast-pow-iter 10 4) 10000)
(check-... | |
aea5e8bef9efb96a0f7da6718ae3ca4754e0758681469fb07e24168348ff9b33 | ravichugh/djs | pervasives.ml |
(******************************************************************************)
let succ : : x : INT - > INT = fun x - > ( plus x 1 )
let unary_minus : : x : INT - > INT = fun x - > ( minus 0 x )
let succ :: x:INT -> INT = fun x -> (plus x 1)
let unary_minus :: x:INT -> INT = fun x -> (minus 0 x)
*)
( * 9... | null | https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/prims/other/pervasives.ml | ocaml | ****************************************************************************
9/18 changed type to match the structure that elimBoolFlag requires
(implies (= b false) (= v true)))} =
(* TODO change the types of l_and and l_or
would want these as primitives for evaluation, but doesn'... |
let succ : : x : INT - > INT = fun x - > ( plus x 1 )
let unary_minus : : x : INT - > INT = fun x - > ( minus 0 x )
let succ :: x:INT -> INT = fun x -> (plus x 1)
let unary_minus :: x:INT -> INT = fun x -> (minus 0 x)
*)
( * 9/18 changed type to match the structure that elimBoolFlag requires
let neg : : ... |
fc6b166b6354c25817cdf4d2125c2a035d8d8a9070257e24af4861740bc112e2 | yapsterapp/er-cassandra | uuid.clj | (ns er-cassandra.uuid
(:require
[clj-time.coerce :as tc]
[clj-uuid :as uuid])
(:import
[java.util UUID]
[com.datastax.driver.core.utils UUIDs]
[clojure.lang IPersistentVector IPersistentMap]))
(defn time->start-of-timeuuid
[t]
(-> t
tc/to-long
UUIDs/startOf))
(defn time->end-of-time... | null | https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/uuid.clj | clojure | (ns er-cassandra.uuid
(:require
[clj-time.coerce :as tc]
[clj-uuid :as uuid])
(:import
[java.util UUID]
[com.datastax.driver.core.utils UUIDs]
[clojure.lang IPersistentVector IPersistentMap]))
(defn time->start-of-timeuuid
[t]
(-> t
tc/to-long
UUIDs/startOf))
(defn time->end-of-time... | |
152c0526b7a618c3c3dd7050e02065ca5f54f68b8e9f8a416a6f4fea034abe62 | project-oak/hafnium-verification | astToRangeMap.ml |
* 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/clang/astToRangeMap.ml | ocaml | Builds a clang procedure, following the format required to match with profiler samples:
C Functions: name, mangled name optional
ObjC Methods: mangled_name
ObjC Blocks: mangled_name
C++ methods: mangled_name (For us mangled name is optional, but if it is not there then we can't match the method) |
* 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
08a63b1ae92e87df95aa954a84af42b8ce8a91af58f102e111b9a64dd652c46e | RuiL1904/Block-Knight-LI1 | Tarefa4_2021li1g033_Spec.hs | module Tarefa4_2021li1g033_Spec where
import Test.HUnit
import LI12122
import Tarefa3_2021li1g033
import Tarefa4_2021li1g033
import Fixtures
testsT4 =
test
[ "Tarefa 4 - Teste Move m1e1 Oeste" ~: Jogo m1r (Jogador (5, 3) Oeste False) ~=? moveJogador m1e1 AndarEsquerda
, "Tarefa 4 - Teste Move m1e1 Este" ~:... | null | https://raw.githubusercontent.com/RuiL1904/Block-Knight-LI1/84330a7691b407189771e53a4cd543fdb592bc2b/tests/Tarefa4_2021li1g033_Spec.hs | haskell | module Tarefa4_2021li1g033_Spec where
import Test.HUnit
import LI12122
import Tarefa3_2021li1g033
import Tarefa4_2021li1g033
import Fixtures
testsT4 =
test
[ "Tarefa 4 - Teste Move m1e1 Oeste" ~: Jogo m1r (Jogador (5, 3) Oeste False) ~=? moveJogador m1e1 AndarEsquerda
, "Tarefa 4 - Teste Move m1e1 Este" ~:... | |
7bdb6f1cd88da9a11fc464107bc8d44eec73081cd7d0bc6e04d8f4f61da3069b | racket/gui | wxme-stream.rkt | #lang racket/base
(require racket/class
racket/contract
racket/match
racket/math
mred/private/wxme/stream
(for-syntax racket/base))
(define wrong-cnt 0)
(define test-cnt 0)
(define-syntax (expect stx)
(syntax-case stx ()
[(_ a b #:extra-stuff e)
#`(expect/proc #... | null | https://raw.githubusercontent.com/racket/gui/640852cda9d5dc854b169f1e3139d2f4a74efdcd/gui-test/tests/gracket/wxme-stream.rkt | racket | ----------------------------------------
Stream out base
----------------------------------------
Stream in base
----------------------------------------
Stream writing
----------------------------------------
Stream reading
this is in the old format, without an id at
the start of the bytes
this is in the ne... | #lang racket/base
(require racket/class
racket/contract
racket/match
racket/math
mred/private/wxme/stream
(for-syntax racket/base))
(define wrong-cnt 0)
(define test-cnt 0)
(define-syntax (expect stx)
(syntax-case stx ()
[(_ a b #:extra-stuff e)
#`(expect/proc #... |
1842cf75ea9a9b2e14f176286d00ad17dd1ebc7122c00120066672025d0b8033 | SNePS/SNePS2 | updatect.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Copyright ( C ) 1984 - -2013 Research Foundation of
;; State University of New York
Version : $ I d : updatect.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/fns/updatect.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
State University of New York
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for t... |
Copyright ( C ) 1984 - -2013 Research Foundation of
Version : $ I d : updatect.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " basis , WITHOUT WARRANTY OF ANY... |
45dc2cad6b5e2ff7b8d51708133aafd795209070cb9ff31c43e7d15cd7010e02 | Deducteam/zenon_modulo | watch.ml | Copyright 2005 INRIA
Version.add "$Id$";;
open Printf;;
open Expr;;
open Llproof;;
open Namespace;;
module HE = Hashtbl.Make (Expr);;
let hyp_names = (HE.create 37 : string HE.t);;
let used = (Hashtbl.create 37 : (string, unit) Hashtbl.t);;
let test n = Hashtbl.mem used n;;
let add n = if not (test n) then Ha... | null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/watch.ml | ocaml | Copyright 2005 INRIA
Version.add "$Id$";;
open Printf;;
open Expr;;
open Llproof;;
open Namespace;;
module HE = Hashtbl.Make (Expr);;
let hyp_names = (HE.create 37 : string HE.t);;
let used = (Hashtbl.create 37 : (string, unit) Hashtbl.t);;
let test n = Hashtbl.mem used n;;
let add n = if not (test n) then Ha... | |
883d843a815b288713f9200a1af4548071165f1de401a24c9d85d6b6a2ac54ff | LexiFi/dead_code_analyzer | baz.mli | val z : int
val t : int
val u : int
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/baz.mli | ocaml | val z : int
val t : int
val u : int
| |
89b24736af72358b6c1082b7b268c15913c6530f5294e1721f60bb9fc2e0456b | pfeodrippe/pitoco | instrument.clj | (ns pitoco.instrument
(:require
[clojure.pprint :as pprint]
[clojure.string :as str]
[pitoco.core :as pit]
[clojure.java.io :as io])
(:import
(java.time LocalDateTime)))
(defn find-vars
"Find vars in your project according to one or more of the following queries:
- `:namespaces` (collection of n... | null | https://raw.githubusercontent.com/pfeodrippe/pitoco/b96d2830050f646b6340a075558f92f1695bb415/src/pitoco/instrument.clj | clojure | (ns pitoco.instrument
(:require
[clojure.pprint :as pprint]
[clojure.string :as str]
[pitoco.core :as pit]
[clojure.java.io :as io])
(:import
(java.time LocalDateTime)))
(defn find-vars
"Find vars in your project according to one or more of the following queries:
- `:namespaces` (collection of n... | |
be41e0c9dc480c1cbac5e309c30e32f36c0ccb9454d2736454139140600cb016 | alan-j-hu/camyll | url.mli | val relativize : src:string -> dest:string -> string
(** If [dest] begins with /, returns a URL equivalent to [dest] relative to URL
[src]. If [dest] does not begin with /, returns [dest]. *)
| null | https://raw.githubusercontent.com/alan-j-hu/camyll/7caa78b2930e77c40c3906f383a5264a99588821/src/url.mli | ocaml | * If [dest] begins with /, returns a URL equivalent to [dest] relative to URL
[src]. If [dest] does not begin with /, returns [dest]. | val relativize : src:string -> dest:string -> string
|
74c710d4f0dcd761f5ed06d7cf57352fa1e63028c4b16b2e04cf44fd28ac3b56 | google/lisp-koans | variables-parameters-constants.lisp | Copyright 2013 Google Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans-solved/variables-parameters-constants.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(defun test-variable-assignment-with-setf ()
(let (var_name_1 (var_name_2 "Michael"))
(and
(equalp var_name_2 "Michael")
new values may be assigned to variables with setf
(setf var_name_2 "Janet")
(eq... |
65ac25618d0bf7961df600e3502fa5c1bdd09b6bdfc08a1c25a90a3f094d10e3 | jumarko/clojure-experiments | processes.clj | (ns clojure-experiments.java.processes
"Experiments with OS processes.
See `ProcessHandle` javadoc: "
(:require [clojure.string :as str]
[clojure.java.shell :as sh]
[signal.handler :as signal]))
(defn process-info
"Accepts an instance of java.lang.ProcessHandle
and converts it to a m... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/31bc9c552b67a4da95f0d3159af50acddfd4f157/src/clojure_experiments/java/processes.clj | clojure | when-class macro copied from clojure.core because it's private
=> [{:arguments ["log" "--graph" "--stat"],
:command "/usr/local/bin/git",
:total-cpu-duration nil,
:user "jumar"}]
- this signal could be useful for asynchronouse reaping of zombies
Creating sub-processes
the sub-processes won't be... | (ns clojure-experiments.java.processes
"Experiments with OS processes.
See `ProcessHandle` javadoc: "
(:require [clojure.string :as str]
[clojure.java.shell :as sh]
[signal.handler :as signal]))
(defn process-info
"Accepts an instance of java.lang.ProcessHandle
and converts it to a m... |
0a1e1fb91a03b137f6214dfd5b0feca8e4129531116b1c5f8c5d9572c9651715 | ygmpkk/house | IORef.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.IORef
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/IORef.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.IORef
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------... | Copyright : ( c ) The University of Glasgow 2001
Mutable references in the IO monad .
module Data.IORef
(
* IORefs
abstract , instance of : ,
#if !defined(__PARALLEL_HASKELL__) && defined(__GLASGOW_HASKELL__)
#endif
) where
#ifdef __HUGS__
import Hugs.IORef
#endif
#ifdef __GLASGOW_HASKELL__
impo... |
c306d714f0204aaff7bf31eaef09c280867905dbc94b5b1311454d4926e7cb86 | abdulapopoola/SICPBook | Ex1.18.scm | (define (double x) (* 2 x))
(define (halve x) (/ x 2))
(define (fast-mult a x n)
(cond ((= 0 n) a)
((even? n) (fast-mult a (double x) (halve n)))
((odd? n) (fast-mult (+ a x) x (- n 1)))))
(fast-mult 0 2 10)
| null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%201/1.2/Ex1.18.scm | scheme | (define (double x) (* 2 x))
(define (halve x) (/ x 2))
(define (fast-mult a x n)
(cond ((= 0 n) a)
((even? n) (fast-mult a (double x) (halve n)))
((odd? n) (fast-mult (+ a x) x (- n 1)))))
(fast-mult 0 2 10)
| |
a49b401d61385f567d38cb852362351bb54f1efcd595a1ae1a4543d790b6416f | PacktWorkshops/The-Clojure-Workshop | repl.clj | (require '[clojure.test :as test :refer [is are deftest run-tests]])
(def booking [1425, "Bob Smith", "Allergic to unsalted peanuts only", [[48.9615, 2.4372], [37.742, -25.6976]], [[37.742, -25.6976], [48.9615, 2.4372]]])
; (deftest exercise301-test
( is (= " 1425 [ [ 48.9615 2.4372 ] [ 37.742 -25.6976 ] ] [ [ ... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter03/tests/Exercise3.01/repl.clj | clojure | (deftest exercise301-test | (require '[clojure.test :as test :refer [is are deftest run-tests]])
(def booking [1425, "Bob Smith", "Allergic to unsalted peanuts only", [[48.9615, 2.4372], [37.742, -25.6976]], [[37.742, -25.6976], [48.9615, 2.4372]]])
( is (= " 1425 [ [ 48.9615 2.4372 ] [ 37.742 -25.6976 ] ] [ [ 37.742 -25.6976 ] [ 48.9615 ... |
b9d51f150bb72e79f2af3c524deebc201682cc0f62c82d0ccacd45733149c268 | tatut/specql | project.clj | (defproject specql/specql "20190301"
:description "PostgreSQL spec query language"
:license {:name "MIT License"}
:url "/"
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/java.jdbc "0.7.0"]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]
... | null | https://raw.githubusercontent.com/tatut/specql/33870ddc22cac4be9084956f899576a67030f434/project.clj | clojure | (defproject specql/specql "20190301"
:description "PostgreSQL spec query language"
:license {:name "MIT License"}
:url "/"
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/java.jdbc "0.7.0"]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]
... | |
83aea0a65a0b7108bcab5f745f28333fa8a5e8201c1c6ef83ae6e66427e872a8 | SquidDev/illuaminate | term.ml | module Converter = struct
type 'a t =
| Atom : 'a Parser.t * ('a -> Sexp.raw) -> 'a t
| List : 'a t -> 'a list t
let rec get_parser : type a. a t -> a Parser.t = function
| Atom (p, _) -> p
| List c -> get_parser c |> Parser.list
let rec get_printer : type a. a t -> a -> Sexp.raw = function
... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/9809ecc15af058ed91f0916bb3d90646107e2ab8/src/config/term.ml | ocaml | Write 'prev' lines between the previous entry and this one.
Comment
Value
Missing cases | module Converter = struct
type 'a t =
| Atom : 'a Parser.t * ('a -> Sexp.raw) -> 'a t
| List : 'a t -> 'a list t
let rec get_parser : type a. a t -> a Parser.t = function
| Atom (p, _) -> p
| List c -> get_parser c |> Parser.list
let rec get_printer : type a. a t -> a -> Sexp.raw = function
... |
39a92fcb5b88b50223ca9d785b5cf8181675d59628821b1c7253d15ac893b0c1 | ivanperez-keera/dunai | WXText.hs | {-# LANGUAGE Arrows #-}
-- Part of this code is taken and adapted from:
-- #Hello_world_in_wxHaskell
--
-- NOTE: Currently, there exists a problem with implementing push-based
-- evaluation.
--
-- Ideas: using some monad or another arrow-based mechanism to remember
-- values and not push unless its necessary. Maybe usi... | null | https://raw.githubusercontent.com/ivanperez-keera/dunai/99091c3391c0ba15e9075579e0b73c5660e994c2/dunai-examples/keerahails/WXText.hs | haskell | # LANGUAGE Arrows #
Part of this code is taken and adapted from:
#Hello_world_in_wxHaskell
NOTE: Currently, there exists a problem with implementing push-based
evaluation.
Ideas: using some monad or another arrow-based mechanism to remember
values and not push unless its necessary. Maybe using arrow transformer... | instead of monad transformers , like suggested ?
module Main where
import Prelude hiding ((.))
import Control.Category
import Control.Monad
import Data.IORef
import Data.Maybe
import Data.MonadicStreamFunction hiding (trace)
import Data.MonadicStreamFunction.InternalCore
import Debug.Trace
import Graphics.UI.WX
ma... |
89322a07f725bf34b2b4e0ce37f97dfb8026bd673f32afdaed3ea56913ee647b | Lisp-Stat/lisp-stat | absorbtion.lisp | (defvar iron (list 61 175 111 124 130 173 169 169 160 224 257 333 199))
(defvar aluminum (list 13 21 24 23 64 38 33 61 39 71 112 88 54))
(defvar absorbtion (list 4 18 14 18 26 26 21 30 28 36 65 62 40))
| null | https://raw.githubusercontent.com/Lisp-Stat/lisp-stat/a95bbd3e45c944fc8711721a042f5b1705bfea82/data/absorbtion.lisp | lisp | (defvar iron (list 61 175 111 124 130 173 169 169 160 224 257 333 199))
(defvar aluminum (list 13 21 24 23 64 38 33 61 39 71 112 88 54))
(defvar absorbtion (list 4 18 14 18 26 26 21 30 28 36 65 62 40))
| |
4e13612cd939fbc92e9f2e72d774d5d3b2fe5311c36f2c164b95dbe982bfa732 | korya/efuns | dynsyms.mli | (***********************************************************************)
(* *)
(* ____________ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toplevel/dynsyms.mli | ocaml | *********************************************************************
____________
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val install_modules : (Emitcode.reloc_info * int) list -> unit
val map : unit -> Symtable.global_ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.