_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 |
|---|---|---|---|---|---|---|---|---|
40bb9ff04484e8b5a045576dce1a646b6961a29e2f4b18aeb49899bfd574d37a | mokus0/gamma | GammaTests.hs | # LANGUAGE ImplicitParams #
module GammaTests where
import Reference
import Control.Applicative
import Data.Complex
import Math.Gamma
import Test.Framework (testGroup, Test)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
gammaSign x
| x > 0 = 1
| otherwise = case proper... | null | https://raw.githubusercontent.com/mokus0/gamma/8c9bb99b9af1d2f3026bb7ed3899fdf2ff0113e7/test/src/GammaTests.hs | haskell | There may be tighter bounds to be found but I haven't
been able to derive them yet. | # LANGUAGE ImplicitParams #
module GammaTests where
import Reference
import Control.Applicative
import Data.Complex
import Math.Gamma
import Test.Framework (testGroup, Test)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
gammaSign x
| x > 0 = 1
| otherwise = case proper... |
cff3a7fbb01a6cddcc128251ef34ebb8d22330a6989491a84a8f7c6f43caefcf | borgeby/jarl | state.cljc | (ns jarl.state
(:require [taoensso.timbre :as log]
[jarl.runtime.environment :as environment]
[jarl.time :as time]
[jarl.utils :as utils]))
(defn- upsert-local [value stack index]
(let [upsert (fn [aggregate [stack-index stack-path stack-value]] ; we process the stack bottom->... | null | https://raw.githubusercontent.com/borgeby/jarl/f7f69ce69b250856fd4b33ef764d0a3c22808113/core/src/main/cljc/jarl/state.cljc | clojure | we process the stack bottom->top
if builtin-context has been provided already, use that | (ns jarl.state
(:require [taoensso.timbre :as log]
[jarl.runtime.environment :as environment]
[jarl.time :as time]
[jarl.utils :as utils]))
(defn- upsert-local [value stack index]
(if (= stack-index index)
(do (log/tracef "with-stack hit for <%d... |
a9d13b4adddac21a18765a182519214a6799a34bd194053763ae147df1866ecb | elastic/eui-cljs | icon_app_users_roles.cljs | (ns eui.icon-app-users-roles
(:require ["@elastic/eui/lib/components/icon/assets/app_users_roles.js" :as eui]))
(def appUsersRoles eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_app_users_roles.cljs | clojure | (ns eui.icon-app-users-roles
(:require ["@elastic/eui/lib/components/icon/assets/app_users_roles.js" :as eui]))
(def appUsersRoles eui/icon)
| |
c43167df7a8b4d55d8a05a92cca6400407d7e33cdef301afd0fe083e2bf001a9 | YoshikuniJujo/test_haskell | TaocpFree.hs | # , LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module HeapSort.TaocpFree where
import Control.Monad.ST
import Data.Foldable
import Data.Array.ST
import Data.Bool
import System.Random
mkSample :: (Int, Int) -> IO [Int]
mkSample r = do
g <- newStdGen
let (n, g') = randomR (0, 100) g
pure . take n $ ran... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/d2ada5a9e5d8ba3d09e83c7d6e7638d0300a9eba/tribial/mastodon/heapsort/src/HeapSort/TaocpFree.hs | haskell | # , LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module HeapSort.TaocpFree where
import Control.Monad.ST
import Data.Foldable
import Data.Array.ST
import Data.Bool
import System.Random
mkSample :: (Int, Int) -> IO [Int]
mkSample r = do
g <- newStdGen
let (n, g') = randomR (0, 100) g
pure . take n $ ran... | |
838175d9f165b58009bc519821df25b53225472cddb19786f8e72f770cc24e40 | haskell-opengl/OpenGLRaw | BGRA.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
Module : Graphics . GL.EXT.BGRA
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/BGRA.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums | # LANGUAGE PatternSynonyms #
Module : Graphics . GL.EXT.BGRA
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.BGRA (
glGetEXTBGRA,
gl_EXT_bgra,
pattern GL_BGRA_EXT,
pattern GL_BGR_EXT
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Tokens
|
58ccb49c8056578ec78b4dc8f1c9cb24ed720362b7fe42e2052ef33a23b85a38 | BU-CS320/Fall-2018 | TypeclassProblems.hs | module TypeclassProblems where
type classes have some rules , people call these rules " Laws "
for instance the following should be true for any Eq instance
-- Reflexive: for all x. x == x
Symmetric : for all x , y. x = = y iff y = = x
Transitive : for all x , y , if x = = y and y = = z then x = ... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week4/hw/src/TypeclassProblems.hs | haskell | Reflexive: for all x. x == x
let's break some laws
= ..
give an example where "example /= example"
= ..
give an examples where "examplex' == exampley'" but "exampley' /= examplex'"
let's break the Transitive law
= ..
give an examples where "examplex'' == exampley''" and exampley'' == examplez''" b... | module TypeclassProblems where
type classes have some rules , people call these rules " Laws "
for instance the following should be true for any Eq instance
Symmetric : for all x , y. x = = y iff y = = x
Transitive : for all x , y , if x = = y and y = = z then x = = z
let 's break the Refle... |
55bbbd6ec9fa14e1e04c59a69c9c38fad05c8a3251c6a279d48d005d294d33fa | mbj/stratosphere | VpcConfigProperty.hs | module Stratosphere.SageMaker.ModelExplainabilityJobDefinition.VpcConfigProperty (
VpcConfigProperty(..), mkVpcConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.V... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelExplainabilityJobDefinition/VpcConfigProperty.hs | haskell | module Stratosphere.SageMaker.ModelExplainabilityJobDefinition.VpcConfigProperty (
VpcConfigProperty(..), mkVpcConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.V... | |
9feca200cf4d24e742d6a7b76c0288016c4ac171b7633b669e22ae53febd5c55 | monstasat/janus-ocaml | api.ml | open Js_of_ocaml
open Js_of_ocaml_lwt
open Lwt.Infix
open Utils
open Webrtc
type 'a frame = 'a XmlHttpRequest.generic_http_frame
type error_ext =
{ response : string option
; error : string option
; timeout : int option
}
and error = string * error_ext option
let make_error ?timeout ?error ?response ?message... | null | https://raw.githubusercontent.com/monstasat/janus-ocaml/b68e8b23a95dead8bd6921206ad8c1fe64e25e30/lib/jsoo/api.ml | ocaml | Misc
* A numeric error code
* A verbose string describing the cause of the failure
* The plugin's unique package name
* An opaque JSON object that is plugin specific
Messages
Required
Optional
* Unique numeric plugin handle identifier
* A JSON object containing the info coming from the plugin
* Unique num... | open Js_of_ocaml
open Js_of_ocaml_lwt
open Lwt.Infix
open Utils
open Webrtc
type 'a frame = 'a XmlHttpRequest.generic_http_frame
type error_ext =
{ response : string option
; error : string option
; timeout : int option
}
and error = string * error_ext option
let make_error ?timeout ?error ?response ?message... |
b14cfe65758cc00ca2fd216c241a32ec700deb67db568e940289a5cd67dbdce9 | PacktPublishing/HaskellCookbook | Main.hs | module Main where
fib n = fiblist !! n
fiblist = 0 : 1 : zipWith (+) fiblist (tail fiblist)
main :: IO ()
main = do
let fib10k = fib 10000
putStrLn $ "10000th fibonacci number is " ++ (show fib10k)
| null | https://raw.githubusercontent.com/PacktPublishing/HaskellCookbook/27e146b6d91c008a7b1d06eda4ea63fe8a8cdb04/Ch_2-Getting_Functional/fibonacci-infinite/src/Main.hs | haskell | module Main where
fib n = fiblist !! n
fiblist = 0 : 1 : zipWith (+) fiblist (tail fiblist)
main :: IO ()
main = do
let fib10k = fib 10000
putStrLn $ "10000th fibonacci number is " ++ (show fib10k)
| |
1d719a8a3c194318272eac84b3dbfbf940178c45bdc5d02c55634a296b7684c6 | nilenso/kulu-backend | model.clj | (ns kulu-backend.organizations.model
(:require [kulu-backend.db :as db]
[honeysql.core :as sql]
[kulu-backend.tokens.model :as tokens]
[kulu-backend.organizations-users.model :as org-user]
[kulu-backend.users.model :as user]
[honeysql.helpers :as h-sql]))
(... | null | https://raw.githubusercontent.com/nilenso/kulu-backend/0b404f76643e77219432dcbffa681172a61e591b/src/kulu_backend/organizations/model.clj | clojure | TODO: this should return an organization record instead and not the join table | (ns kulu-backend.organizations.model
(:require [kulu-backend.db :as db]
[honeysql.core :as sql]
[kulu-backend.tokens.model :as tokens]
[kulu-backend.organizations-users.model :as org-user]
[kulu-backend.users.model :as user]
[honeysql.helpers :as h-sql]))
(... |
8c6ba6cc561b99bb6a9c415ea6f7784027379ab8c39c670855389e42b07635c0 | atomvm/atomvm_rebar3_plugin | atomvm_app.erl | %%
%% Copyright (c) {{copyright_year}} {{author_email}}
%% 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 License at
%%
%% -2.0
%%
%% Unless required by applicable law... | null | https://raw.githubusercontent.com/atomvm/atomvm_rebar3_plugin/d23ff2af6b9fdf1bbb6abe9938888143f35042a2/priv/atomvm_app.erl | erlang |
Copyright (c) {{copyright_year}} {{author_email}}
All rights reserved.
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 exp... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module({{name}}).
-export([start/0]).
start() ->
ok.
|
041943ed31201529e65fb4db1dfa1d36efb04c03e0b91cc8a07158a875c97bd5 | facebook/infer | cMethod_trans.mli |
* 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/facebook/infer/afdf367d0120a78cb4dc8b29ee8f2f8a108573a6/infer/src/clang/cMethod_trans.mli | ocaml |
* 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
... | |
4f8512d7dd4d909e1174ddaaa4957eded0cdf426a996b310c7907a61b132d6b7 | bldl/magnolisp | test-modules-4.rkt | #lang magnolisp/2014
(require "lib-modules-1.rkt")
(typedef int (#:annos foreign))
(function (f x) #an(^(fn int int) export)
(int->self x))
(f 1)
| null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-modules-4.rkt | racket | #lang magnolisp/2014
(require "lib-modules-1.rkt")
(typedef int (#:annos foreign))
(function (f x) #an(^(fn int int) export)
(int->self x))
(f 1)
| |
acabdee3c2a10d21dd8840df6a7635953f5d6632ca4ffc4db25fa8445034377d | tmfg/mmtis-national-access-point | git.clj | (ns ote.tools.git
"Tools for Git in build process"
(:require [clojure.java.shell :as sh]
[clojure.string :as str]))
(defmacro current-revision-sha []
{:current-revision-sha (str/trim (:out (sh/sh "git" "rev-parse" "HEAD")))})
| null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/clj/ote/tools/git.clj | clojure | (ns ote.tools.git
"Tools for Git in build process"
(:require [clojure.java.shell :as sh]
[clojure.string :as str]))
(defmacro current-revision-sha []
{:current-revision-sha (str/trim (:out (sh/sh "git" "rev-parse" "HEAD")))})
| |
6f90d29bd6cbff97f4245e1ab359f295f1e9d5ebce88e52333af592eecd279f7 | lambdaisland/kanban | core_test.cljs | (ns kanban.core-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [cljs.test]))
(deftest example-passing-test
(is (= 1 1)))
| null | https://raw.githubusercontent.com/lambdaisland/kanban/c00c95ebfe67463efd8630b49362509c29ab6327/test/cljs/kanban/core_test.cljs | clojure | (ns kanban.core-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [cljs.test]))
(deftest example-passing-test
(is (= 1 1)))
| |
f825fb61e859d317fa7010bd51c656cf9385ad4eb95d754c2d22c110b9f4ac05 | HugoPeters1024/hs-sleuth | Tree.hs | # LANGUAGE TemplateHaskell #
module Tree where
import Debug.Trace
import Test.Inspection
import HsComprehension.Plugin (dumpThisModule)
dumpThisModule
data Tree a
= Leaf a
| Node (Tree a) (Tree a)
deriving Show
# Rules
" mapTree / mapTree " forall mapTree f ( t ) = mapTree ( f . ) t ;
... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/app/Tree.hs | haskell | # LANGUAGE TemplateHaskell #
module Tree where
import Debug.Trace
import Test.Inspection
import HsComprehension.Plugin (dumpThisModule)
dumpThisModule
data Tree a
= Leaf a
| Node (Tree a) (Tree a)
deriving Show
# Rules
" mapTree / mapTree " forall mapTree f ( t ) = mapTree ( f . ) t ;
... | |
6e534fbc3396082d10394be5821ab7e2ce2d191fc8647df3cf8ce91e3f35967c | brendanhay/gogol | Get.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Accounts/Get.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Retrieves a Merchant Center account.
* Resource
** Constructing a Request
| V1 error format.
| OAuth access token.
| The ID of the account.
| Upload protocol for media (e.g. \"raw\", \"multipart\").
| The ID of the accou... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
783bb9c16c249608a2ee8e2f19e0f41d7bf74b24f670647faa0fc723bcaa8cb3 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | FreeMonad2.hs | {-# LANGUAGE GADTs , KindSignatures #-}
import Control.Monad
data Interaction :: * -> * where
Return :: a -> Interaction a
Say :: String -> (() -> Interaction b) -> Interaction b
Ask :: (String -> Interaction b) -> Interaction b
instance Functor Interaction where
fmap f (Return a) = Return (f a)
f... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C14/FreeMonad2.hs | haskell | # LANGUAGE GADTs , KindSignatures # | import Control.Monad
data Interaction :: * -> * where
Return :: a -> Interaction a
Say :: String -> (() -> Interaction b) -> Interaction b
Ask :: (String -> Interaction b) -> Interaction b
instance Functor Interaction where
fmap f (Return a) = Return (f a)
fmap f (Say str fu) = Say str (\() -> fma... |
d486a5ec8174419791c630d4561432746a06b05de0a7cdda2656e4d6876f0aee | VisionsGlobalEmpowerment/webchange | wave_utils.cljs | (ns webchange.ui.components.audio-wave.wave-utils
(:require
[webchange.ui.components.audio-wave.wave-core :as core]))
(def get-duration core/get-duration)
(def load-blob core/load-blob)
(def play core/play)
(def stop core/stop)
(defn add-region
[wave-surfer region-data]
(->> (clj->js region-data)
(c... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/02f2690a2763453a491f038283e1639a7eeda593/src/cljs/webchange/ui/components/audio_wave/wave_utils.cljs | clojure | (ns webchange.ui.components.audio-wave.wave-utils
(:require
[webchange.ui.components.audio-wave.wave-core :as core]))
(def get-duration core/get-duration)
(def load-blob core/load-blob)
(def play core/play)
(def stop core/stop)
(defn add-region
[wave-surfer region-data]
(->> (clj->js region-data)
(c... | |
a85e077027f04e95aa3320a442203bc0c676af97406ad1666320314d7959006c | typedclojure/typedclojure | analyzer.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/1b791b9e5f3e907f9cf1d504a7798c9bf2a04e8f/typed/clj.analyzer/src/typed/clj/analyzer.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns typed.clj.analyzer
(:refer-clojure :exclude [macroexpand-1])
(:require [clojure.core.memoize :as memo]
[typed.cljc.analyzer :as ana]
[typed.cljc.analyzer.ast :as ast]
[typed.cljc.analyzer :as common]
[typed.clj... |
9b8310e05ef7825b664f1b49224abed673f903686eba226802959c08a6beff5e | tsloughter/grpcbox | grpcbox_client.erl | %%%-------------------------------------------------------------------
%% @doc grpc client
%% @end
%%%-------------------------------------------------------------------
-module(grpcbox_client).
-export([unary/6,
unary/5,
stream/4,
stream/5,
send/2,
recv_headers/1,
... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/a5aa6e918a2ddbff40e8ebb3c12b1453fe953e03/src/grpcbox_client.erl | erlang | -------------------------------------------------------------------
@doc grpc client
@end
-------------------------------------------------------------------
different from an `error' in that it isn't from the grpc layer
no input: bidrectional
input given, stream response
this is sent by h2_connection after the s... |
-module(grpcbox_client).
-export([unary/6,
unary/5,
stream/4,
stream/5,
send/2,
recv_headers/1,
recv_headers/2,
recv_data/1,
recv_data/2,
recv_trailers/1,
recv_trailers/2,
close_and_recv/1,
close_send/1]).
-... |
a6fde42316a683c42305642e36aca9b0c25fc1e4f3890ed31eb146aa740a2aad | yesodweb/yesod | Feed.hs | -------------------------------------------------------------------------------
--
Module : Yesod . Feed
Copyright :
-- License : as-is
--
Maintainer : < >
-- Stability : Stable
-- Portability : Portable
--
Generic Feed and Feed Entry data types that can be used as either an
... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-newsfeed/Yesod/Feed.hs | haskell | -----------------------------------------------------------------------------
License : as-is
Stability : Stable
Portability : Portable
-----------------------------------------------------------------------------
generating a feed of external links. | Module : Yesod . Feed
Copyright :
Maintainer : < >
Generic Feed and Feed Entry data types that can be used as either an
Rss feed or an Atom feed ( or both , or other ) .
Atom spec : < (standard ) >
Rss spec : < -specification >
module Yesod.Feed
( newsFeed
, newsFeedText
... |
238aa2c7cc45af8d19e3c60ffc6a100c9d0733f5898d1faac065192b6ceb8110 | facebook/pyre-check | refinement.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/536e4a2c008726d0ce5589eaef681166923b6183/source/analysis/refinement.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
9dee2ecf29eeaf2871ab4ac289236b707c1ff2378c6b393af9405b7f7620ddbc | leondavi/NErlNet | sourceStatem.erl | %%%-------------------------------------------------------------------
@author kapelnik
( C ) 2021 , Nerlnet
%%% @doc
%%%
%%% @end
Created : 14 . Apr 2021 9:57 AM
%%%-------------------------------------------------------------------
-module(sourceStatem).
-author("kapelnik").
-behaviour(gen_statem).
%% API
-e... | null | https://raw.githubusercontent.com/leondavi/NErlNet/0c3c6fb7fe2ef7d398987cfaedcb185050293bb1/src_erl/Communication_Layer/http_Nerlserver/src/source/sourceStatem.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_statem callbacks
===================================================================
API
===================================================================
@d... | @author kapelnik
( C ) 2021 , Nerlnet
Created : 14 . Apr 2021 9:57 AM
-module(sourceStatem).
-author("kapelnik").
-behaviour(gen_statem).
-export([start_link/1]).
-export([init/1, format_status/2, state_name/3, handle_event/4, terminate/3,
code_change/4, callback_mode/0, idle/3, castingData/3, sendSamples/1... |
26d6081b79993ce9b6d6d62ea1348d76c3f4414d6673c307db15a1b53e516227 | Enecuum/Node | Interpreter.hs | module Enecuum.Core.CoreEffect.Interpreter where
import Enecuum.Prelude
import Enecuum.Core.ControlFlow.Interpreter (runControlFlow)
import Enecuum.Core.FileSystem.Interpreter (runFileSystemL)
import qualified Enecuum.Core.Language as L
import Enecuum.Core.Logge... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/CoreEffect/Interpreter.hs | haskell | | Interprets core effect.
| Runs core effect language. | module Enecuum.Core.CoreEffect.Interpreter where
import Enecuum.Prelude
import Enecuum.Core.ControlFlow.Interpreter (runControlFlow)
import Enecuum.Core.FileSystem.Interpreter (runFileSystemL)
import qualified Enecuum.Core.Language as L
import Enecuum.Core.Logge... |
ef85d5926eb5f8a81a206651282c99189a968577fcc2787f50885e5a5b5aee0a | AdRoll/rebar3_hank | test_app_SUITE.erl | %%% @doc Test module for the app in general
-module(test_app_SUITE).
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export([with_warnings/1, without_warnings/1]).
all() ->
[with_warnings, without_warnings].
init_per_testcase(_, Config) ->
hank_test_utils:init_per_testcase(Config, "test_app").
e... | null | https://raw.githubusercontent.com/AdRoll/rebar3_hank/6a67d1c6f60241d9102a509152d322021da0ad15/test/test_app_SUITE.erl | erlang | @doc Test module for the app in general
@doc In a project where there are things to report, hank should return error
@doc In a project where all rules run cleanly, hank should return OK
Run hank
We might add more in the future and we don't want this test to fail
just because of that.
each result looks like path/... | -module(test_app_SUITE).
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export([with_warnings/1, without_warnings/1]).
all() ->
[with_warnings, without_warnings].
init_per_testcase(_, Config) ->
hank_test_utils:init_per_testcase(Config, "test_app").
end_per_testcase(_, Config) ->
hank_test_... |
d0bf5c187fdb1573418c002f6df5d6a5265fb2992b65f9af1555902ad2c5e758 | aksh-at/rss-to-email | mailer.clj | (ns datomic.ion.rsstoemail.mailer
(:use [hiccup.core])
(:require
[ses-mailer.core :as m]
[datomic.ion.rsstoemail.auth :as auth]
[datomic.ion.rsstoemail.utils :as u]
[clojure.string :as str])
(:import (com.amazonaws.auth DefaultAWSCredentialsProviderChain)))
;; Constants.
(def from-email "\"RSS To Em... | null | https://raw.githubusercontent.com/aksh-at/rss-to-email/8303440aabfeecfdae00e5e3720950c5113450b1/src/datomic/ion/rsstoemail/mailer.clj | clojure | Constants.
Helpers.
Update notifications.
Send subscription confirmation.
Send manage confirmation. | (ns datomic.ion.rsstoemail.mailer
(:use [hiccup.core])
(:require
[ses-mailer.core :as m]
[datomic.ion.rsstoemail.auth :as auth]
[datomic.ion.rsstoemail.utils :as u]
[clojure.string :as str])
(:import (com.amazonaws.auth DefaultAWSCredentialsProviderChain)))
(def from-email "\"RSS To Email\" <>")
(d... |
ef8ee468d1809f1cbcfa1d1cf2474ee3378cbbf0311d8e009f1c0675b6780680 | reagent-project/reagent-template | core_spec.cljs | (ns {{project-ns}}.core-spec
(:require-macros [speclj.core :refer [describe it should= should should-not]])
(:require [speclj.core]
[reagent.core :as reagent :refer [atom]]
[reagent.dom :as rdom]
[{{project-ns}}.core :as rc]))
(def isClient (not (nil? (try (.-document js/window... | null | https://raw.githubusercontent.com/reagent-project/reagent-template/c769c6806540a9faafec36c27b07a1c86ae5eff7/resources/leiningen/new/reagent/spec/cljs/reagent/core_spec.cljs | clojure | (ns {{project-ns}}.core-spec
(:require-macros [speclj.core :refer [describe it should= should should-not]])
(:require [speclj.core]
[reagent.core :as reagent :refer [atom]]
[reagent.dom :as rdom]
[{{project-ns}}.core :as rc]))
(def isClient (not (nil? (try (.-document js/window... | |
4f7f3c3d998bfb733e561a75d18d072d74985cf64a91b32b90fbb676cde9203f | potatosalad/erlang-jose | jose_jwa_xchacha20_poly1305.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
@doc XChaCha : eXtended - nonce ChaCha and AEAD_XChaCha20_Poly1305
%%% See -irtf-cfrg-... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/jose_jwa_xchacha20_poly1305.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
See -irtf-cfrg-xchacha
@end
-------------------------------------------------------------------
jose_xchacha20_poly1305 callbacks
====================================================================
jose_chacha20_poly... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
@doc XChaCha : eXtended - nonce ChaCha and AEAD_XChaCha20_Poly1305
Created : 14 Sep 2019 by < >
-module(jose_jwa_xchacha20_poly1305).
-behaviour(jose_xchacha20_poly1305).
-export([d... |
004768e693408107391a42985c376d5b88f3084911c05fd65ec06bcba60dcb1f | planetfederal/signal | geointersects.clj | Copyright 2016 - 2017 Boundless ,
;;
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
distribute... | null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/predicate/geointersects.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2016 - 2017 Boundless ,
distributed under the License is distributed on an " AS IS " BASIS ,
(ns signal.predicate.geointersects
(:require [signal.predicate.protocol :as proto]
[xy.relation :as relations]
[xy.geojson :as geojson]
[clojure.data.json :as json]))
(def ... |
24c35efc2121818a8b0240fba816309f6e419e3e45d94382b2819f4276ce3acb | ghcjs/ghcjs | eval.hs | # LANGUAGE PatternSynonyms #
module Main where
pattern P x y <- [x, y]
f (P True True) = True
f _ = False
g [True, True] = True
g _ = False
main = do
mapM_ (print . f) tests
putStrLn ""
mapM_ (print . g) tests
where
tests = [ [True, True]
, [True, False]
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/patsyn/eval.hs | haskell | , False:undefined | # LANGUAGE PatternSynonyms #
module Main where
pattern P x y <- [x, y]
f (P True True) = True
f _ = False
g [True, True] = True
g _ = False
main = do
mapM_ (print . f) tests
putStrLn ""
mapM_ (print . g) tests
where
tests = [ [True, True]
, [True, False]
... |
078474d9b0870f288d4cf321143386c0172014745427deda037e8aea3959d673 | WhatsApp/eqwalizer | apply_none.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(apply_none).
-compile([export_all, nowarn_export_all]).
-spec mk_fun() -> fun((term()) -> ter... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/eqwalizer/test_projects/check/src/apply_none.erl | erlang |
the LICENSE file in the root directory of this source tree. | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(apply_none).
-compile([export_all, nowarn_export_all]).
-spec mk_fun() -> fun((term()) -> term()).
mk_fun() ->
Fun = erlang:error(not_implemented),
Fun.
... |
3dc4ca410258819cf4f9ae4eb36d89b9b8b4cbbfce2be1a4c770d9e2b3f0e24f | AbstractMachinesLab/caramel | printtyp.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/typing/409/printtyp.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module M = Misc.String.Map
module S = Misc.String.Set
open Misc
open Ctype
open Format
open Longident
open Path
open ... |
77205f02e6649ee0e747ea7cbe00576e44ff3ec0a482700d16ef05a7769244ce | bmillwood/pointfree | Test.hs | module Main (main) where
import Test.HUnit
import Test.QuickCheck
import Plugin.Pl.Common
import Plugin.Pl.Transform
import Plugin.Pl.Parser
import Plugin.Pl.PrettyPrinter
import Plugin.Pl.Optimize
import Data.Char (isSpace)
import System.IO (hSetBuffering, stdout, BufferMode(NoBuffering))
import System.Environment... | null | https://raw.githubusercontent.com/bmillwood/pointfree/06843d746d50128ba1a35f04f72000cb23f940f6/test/Test.hs | haskell | Let isn't generated by arbitrary, so we can probably ignore it
unitTest "foldr (++) []" ["join"],
unitTest "flip flip [] . ((:) .)" ["(return .)"],
unitTest "let (x,y) = (1,2) in y" ["2"],
unitTest "\\xs -> [f x | x <- xs, p x]" ["map f . filter p"],
What were they smoking when they decided >> should be infixl
yay! | module Main (main) where
import Test.HUnit
import Test.QuickCheck
import Plugin.Pl.Common
import Plugin.Pl.Transform
import Plugin.Pl.Parser
import Plugin.Pl.PrettyPrinter
import Plugin.Pl.Optimize
import Data.Char (isSpace)
import System.IO (hSetBuffering, stdout, BufferMode(NoBuffering))
import System.Environment... |
a6793c0afa3d84969499d14cf76231d22e2b64bac70a2f6434962fca7a77357c | joergen7/cf_reference | cfl-reduction.rkt | #lang racket/base
;;-----------------------------------------------------------------------------
;;
Semantic reference of the distributed programming
;; language
;;
Copyright 2016 - 2019 < >
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in comp... | null | https://raw.githubusercontent.com/joergen7/cf_reference/911f71744891f52b3caae7073695a042ade0cf99/cfl-reduction.rkt | racket | -----------------------------------------------------------------------------
language
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... | #lang racket/base
Semantic reference of the distributed programming
Copyright 2016 - 2019 < >
distributed under the License is distributed on an " AS IS " BASIS ,
(require redex
"cfl-syntax-dynamic.rkt")
(provide cfl->)
(define cfl->
(reduction-relation
cfl-d
#:domain p
(~> (app (λ ... |
838e827bceec5392d524374cd3a32bbe64d10993c7eeee791a1ffb43b1be7903 | glondu/belenios | accounts.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/5306402c15c6a76438b13b8b9da0f45d02a0563d/src/web/server/common/accounts.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2023
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
530089d94876b211a190b288bd2e4f0a547ea94bc62ecc7be1143d9d579175a7 | mlabs-haskell/bot-plutus-interface | Server.hs | # LANGUAGE AllowAmbiguousTypes #
module BotPlutusInterface.Server (
app,
getTxFromFile,
initState,
WebSocketEndpoint,
ActivateContractEndpoint,
RawTxEndpoint,
TxIdCapture (TxIdCapture),
) where
import BotPlutusInterface.Contract (runContract)
import BotPlutusInterface.Files (txFileName, txIdToText)
impo... | null | https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/a1f1d0ec7112b5ecde5ac31471c1a75b67b9dd9d/src/BotPlutusInterface/Server.hs | haskell | | Mock API Schema, stripped endpoints that we don't use in this project
Endpoints are split up so it is easier to test them. In particular servant-client
use servant-client to test the other endpoints
Combined websocket (subscription protocol)
Start a new instance.
| Mock websocket handler (can only send Contract... | # LANGUAGE AllowAmbiguousTypes #
module BotPlutusInterface.Server (
app,
getTxFromFile,
initState,
WebSocketEndpoint,
ActivateContractEndpoint,
RawTxEndpoint,
TxIdCapture (TxIdCapture),
) where
import BotPlutusInterface.Contract (runContract)
import BotPlutusInterface.Files (txFileName, txIdToText)
impo... |
d28868321a5745f5f0fe3dc18b3da0201606e7a5ecc88c7cd3134e591b5b784c | contivero/hasmin | Hasmin.hs | -----------------------------------------------------------------------------
-- |
-- Module : Hasmin
Copyright : ( c ) 2017
-- License : BSD3
-- Stability : experimental
-- Portability : unknown
--
-- Recommended module to use the library.
--
---------------------------------------------------------... | null | https://raw.githubusercontent.com/contivero/hasmin/2a7604159b51e69c5e9c564dce53cb3ab09ae22b/src/Hasmin.hs | haskell | ---------------------------------------------------------------------------
|
Module : Hasmin
License : BSD3
Stability : experimental
Portability : unknown
Recommended module to use the library.
---------------------------------------------------------------------------
* Using the library
$use
| ... | Copyright : ( c ) 2017
module Hasmin (
minifyCSS
, minifyCSSWith
, module Hasmin.Config
) where
import Control.Monad.Reader (runReader)
import Data.Attoparsec.Text (parseOnly)
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text (Text)
import qualified Data.Text.Lazy as TL
import Hasm... |
976e19333a790ec60fc239873f478c2af5c1dfb14689476737aa690f98b46d6f | jfeser/castor | join_opt_test.ml | open Collections
module A = Abslayout
let () = Logs.Src.set_level Join_opt.src (Some Warning)
module Config = struct
let cost_conn = Db.create "postgresql"
let conn = cost_conn
let validate = false
let param_ctx = Map.empty (module Name)
let params = Set.empty (module Name)
let verbose = false
let simpl... | null | https://raw.githubusercontent.com/jfeser/castor/432ba569fb36f0a79883e647336b9a4700ebdf38/test/join_opt/join_opt_test.ml | ocaml | open Collections
module A = Abslayout
let () = Logs.Src.set_level Join_opt.src (Some Warning)
module Config = struct
let cost_conn = Db.create "postgresql"
let conn = cost_conn
let validate = false
let param_ctx = Map.empty (module Name)
let params = Set.empty (module Name)
let verbose = false
let simpl... | |
372bb0582643e0d41f04fcf0c418276986ae8a973b517f7c1fc68c1b1358e0fc | antoszka/fv | fv.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
fv.lisp -- ( c ) 2010 , 2011 , 2015
;;;
;;; This is my personal invoicing program, might only be useful in its
current form in the Polish VAT - invoice area .
;;;
(in-package #:fv)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; for now, the useful... | null | https://raw.githubusercontent.com/antoszka/fv/8e05ef8c250bf73966c3a4c0062446e3f49996b0/fv.lisp | lisp |
This is my personal invoicing program, might only be useful in its
for now, the useful public interface of this is limited to:
(add-to-db) used in conjunction with:
(make-client)
(make-item)
(make-invoice) used in conjunction with:
(select-by-nick ...) or
(adjust-key (select-by-nick ...))
... | fv.lisp -- ( c ) 2010 , 2011 , 2015
current form in the Polish VAT - invoice area .
(in-package #:fv)
TODO ( in order of priority ):
* interactive mode ( text UI ) with browsing clients / items ( KINDA DONE with qa- * functions )
* curses / tk / clim GUI
* client / server ( with android client )
:... |
372012c29eff4e4c618d8cd09e0cc09df2eeff688c6c6196845d37d71bff9dcd | erlyaws/yaws | wiki_plugin_backlinks.erl | %%% File : wiki_plugin_backlinks.erl
Author : < >
%%% Description : This plugin can show the list of backlinks inline
Created : 20 Oct 2003 by
%%% <>
-module(wiki_plugin_backlinks).
-export([run/2]).
run(Page, _ArgList) ->
TODO :
This is working if there is only one virtua... | null | https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/applications/wiki/src/wiki_plugin_backlinks.erl | erlang | File : wiki_plugin_backlinks.erl
Description : This plugin can show the list of backlinks inline
<>
A way to handle this cleanly is needed. | Author : < >
Created : 20 Oct 2003 by
-module(wiki_plugin_backlinks).
-export([run/2]).
run(Page, _ArgList) ->
TODO :
This is working if there is only one virtual server .
{ok, _Gconf, [[Sconf|_Others]]} = yaws_api:getconf(),
Root = yaws:sconf_docroot(Sconf),
AllRefs = wiki_utils:getallr... |
34bcf2de8ef2202fbf01bdd997550fe0cde2f8efe39e03f051f9ee3041a66f91 | gregcman/sucle | package.lisp | (defpackage #:window
(:use #:cl #:utility)
(:export
#:*scroll-x*
#:*scroll-y*)
(:export
#:get-proc-address
#:init
#:poll
#:wrapper
#:update-display
#:set-vsync
#:push-dimensions
#:set-caption)
(:export
#:get-mouse-out
#:get-mouse-position
#:mouse-locked?
#:mouse-fre... | null | https://raw.githubusercontent.com/gregcman/sucle/258be4ac4daaceea06a55f893227584d3772bb47/src/window/package.lisp | lisp | [FIXME] This? | (defpackage #:window
(:use #:cl #:utility)
(:export
#:*scroll-x*
#:*scroll-y*)
(:export
#:get-proc-address
#:init
#:poll
#:wrapper
#:update-display
#:set-vsync
#:push-dimensions
#:set-caption)
(:export
#:get-mouse-out
#:get-mouse-position
#:mouse-locked?
#:mouse-fre... |
ae21808b2b5cc060b31ec95da4baebab54efba81118617bd7ad89a808127bbce | stepcut/plugins | Main.hs | --
-- Test if we can load a module with a hierarchical name from some weird
path . Tests our the module name handling in the .hi file parser .
--
module Main where
import System.Plugins
main = do
status <- load "../A/B/C/Module.o" [".."] [] "symbol"
case status of
LoadFailure ers -... | null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/hier/hier2/prog/Main.hs | haskell |
Test if we can load a module with a hierarchical name from some weird
| path . Tests our the module name handling in the .hi file parser .
module Main where
import System.Plugins
main = do
status <- load "../A/B/C/Module.o" [".."] [] "symbol"
case status of
LoadFailure ers -> mapM_ putStrLn ers
LoadSuccess _ v -> print (v :: String)
|
8f45c7cf10f494cd1eb4e69c31f8840edd15bc80346174d8ee933c0994ac4d2f | oakes/defexample | example.clj | (ns dynadoc.example
(:require [clojure.spec.alpha :as s :refer [fdef]]
[clojure.core.specs.alpha]))
(s/def ::doc string?)
(s/def ::ret any?)
(s/def ::with-card :clojure.core.specs.alpha/local-name)
(s/def ::with-callback :clojure.core.specs.alpha/local-name)
(s/def ::with-focus :clojure.core.specs.alpha/... | null | https://raw.githubusercontent.com/oakes/defexample/c6b8de8f910c51293a269652a5ae9bc0aa2320d3/src/dynadoc/example.clj | clojure | (ns dynadoc.example
(:require [clojure.spec.alpha :as s :refer [fdef]]
[clojure.core.specs.alpha]))
(s/def ::doc string?)
(s/def ::ret any?)
(s/def ::with-card :clojure.core.specs.alpha/local-name)
(s/def ::with-callback :clojure.core.specs.alpha/local-name)
(s/def ::with-focus :clojure.core.specs.alpha/... | |
c4cb73a1a95ac674cf4a9ea3020f5b6ee1184f5b52f1aec6e19516305b179c91 | tolbrino/hotwheels | client_proxy.erl | Copyright ( c ) 2009 Oortle , Inc
%%% Permission is hereby granted, free of charge, to any person
%%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without restriction ,
%%% including without limitation the rights to use, copy, modify, merge, ... | null | https://raw.githubusercontent.com/tolbrino/hotwheels/8dca95a1f8e80e9d09c39158577588b40663a313/src/client_proxy.erl | erlang | Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be included
OR IMPLIE... | Copyright ( c ) 2009 Oortle , Inc
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
in all copies or substantial portions of the Software .
... |
7138892048f2b44c32470f0b83f5484cd2b45c0c68ee713f1b94e1f098933a0b | autolwe/autolwe | CaseRules.mli | (* * Derived rules for dealing with [add_test], [case_ev], and [except]. *)
open Tactic
open TheoryTypes
val t_rexcept_maybe : int option -> (ParserTypes.parse_expr list) option -> tactic
val t_case_ev_maybe : tactic
val t_guard_maybe : tactic
val print_cases : theory_state -> theory_state * string
| null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Derived/CaseRules.mli | ocaml | * Derived rules for dealing with [add_test], [case_ev], and [except]. |
open Tactic
open TheoryTypes
val t_rexcept_maybe : int option -> (ParserTypes.parse_expr list) option -> tactic
val t_case_ev_maybe : tactic
val t_guard_maybe : tactic
val print_cases : theory_state -> theory_state * string
|
2726518b0db316a317877c9a2f6f896d19785033055b644ed4b2a9265c348da0 | RunOrg/RunOrg | build.ml | (* © 2013 RunOrg *)
type t = {
css : string ;
js : string ;
i18n : (string * string) list ;
}
(* Read the contents of a file at the specified path relative to the
provided directory. *)
let read_file dir path =
let real_path = List.fold_left Filename.concat dir path in
let chan = open_in real_path... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/plang/build.ml | ocaml | © 2013 RunOrg
Read the contents of a file at the specified path relative to the
provided directory.
Read and parse the contents of a template file, returns a
(path, ast) pair. |
type t = {
css : string ;
js : string ;
i18n : (string * string) list ;
}
let read_file dir path =
let real_path = List.fold_left Filename.concat dir path in
let chan = open_in real_path in
try
let length = in_channel_length chan in
let buffer = String.create length in
really_input ch... |
3b336e69d288bffee6f9c373cc6f4b7ada6657fc91b01a9afaf21ba1e1ca9f89 | bsaleil/lc | stratunified.scm | ;;---------------------------------------------------------------------------
;;
Copyright ( c ) 2015 , . All rights reserved .
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; 1. Redistributions of so... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/stratunified.scm | scheme | ---------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list ... | Copyright ( c ) 2015 , . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(define (strat-get-options)
strat-options)
(... |
76e2d7a42b488dec6a5a6d4de77c0d873d97b59d9eec1b19c6df67c8002ea25f | xray-tech/xorc-xray | handler.clj | (ns re.handler
(:require [ataraxy.response :as response]
[integrant.core :as ig]))
(defmethod ig/init-key :re.handler/health [_ _]
(fn [_]
[::response/ok "ok"]))
| null | https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/src/re/handler.clj | clojure | (ns re.handler
(:require [ataraxy.response :as response]
[integrant.core :as ig]))
(defmethod ig/init-key :re.handler/health [_ _]
(fn [_]
[::response/ok "ok"]))
| |
c78f14d5be494b4b2160cd7a33eefdbd4504fe95c0e72666e8d3826d6603e9b7 | lemmih/lhc | RTS.hs | module RTS (linkRTS) where
import Control.Monad (unless)
import Paths_lhc (getDataFileName)
import System.Directory (findExecutable, getTemporaryDirectory)
import System.Exit (ExitCode (..))
import System.FilePath ((</>))
import System.Process... | null | https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/src/RTS.hs | haskell | Compile the RTS (written in c) with clang and link the files directly
into the target code.
--------------------------------------------------------------------
Helpers | module RTS (linkRTS) where
import Control.Monad (unless)
import Paths_lhc (getDataFileName)
import System.Directory (findExecutable, getTemporaryDirectory)
import System.Exit (ExitCode (..))
import System.FilePath ((</>))
import System.Process... |
274d3486de1e72a5ea51ac9a78e4f1ccc335205120e226bd2338cf21d6eca35a | kappelmann/engaging-large-scale-functional-programming | Exercise05.hs | module Exercise05 where
import Data.Set (Set, member, insert, empty)
import qualified Data.Set
import Data.List (filter, null, nub)
--import Debug.Trace
type Pos = (Int,Int)
data Dir = U | R | D | L deriving (Eq, Show, Ord, Read)
showMaze :: Int -> Int -> [Pos] -> Pos -> Pos -> String
showMaze h w rocks start flag ... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/05/uploads/funktionalefeinis/Exercise05.hs | haskell | import Debug.Trace
| trace ("search " ++ show pos ++ " " ++ show len ++ " " ++ show exp) False = undefined
nicht links
nicht hoch
| module Exercise05 where
import Data.Set (Set, member, insert, empty)
import qualified Data.Set
import Data.List (filter, null, nub)
type Pos = (Int,Int)
data Dir = U | R | D | L deriving (Eq, Show, Ord, Read)
showMaze :: Int -> Int -> [Pos] -> Pos -> Pos -> String
showMaze h w rocks start flag = unlines [ [showPos ... |
45960945a4ccaf088102e5da9fce3d014c83e04b4d8078e4a90f05b46ce9c5f1 | ayamada/clan | project.clj | ;; this is dummy project to install dependencies for local repos.
(load-file "../../project-common.clj")
(defproject-depinst)
| null | https://raw.githubusercontent.com/ayamada/clan/4fe76a2670b2c6fa71bc955a365109c6401d65e6/depinst/project.clj | clojure | this is dummy project to install dependencies for local repos. |
(load-file "../../project-common.clj")
(defproject-depinst)
|
cc145054abe8f0026ea4c7b5882606ef0ee07faa26c5166330c7a7db11b1a4ac | reactiveml/rml | driver.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/driver.ml | ocaml | o1
o2
o3
inlining may reveal new tailcall opt
flow simple to keep information for furture tailcall opt | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
ff55a8d8fc82e9ddf5b1fa241318de4f99777ec2f02c2d8c2ea6bd1d1fdbcd06 | jbracker/supermonad | Main.hs |
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
-- Needed for programming on the type level...
# LANGUAGE UndecidableInstances #
-- Use the supermo... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/applicative/bankers/Main.hs | haskell | # LANGUAGE GADTs #
Needed for programming on the type level...
Use the supermonad plugin.
# OPTIONS_GHC -fplugin Control.Super.Monad.Plugin #
Natural numbers on the type level.
type-level.
Check if n is lesser or equal to m.
Counting structure for the process resources and their maximum uses.
Data type to descri... |
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE RebindableSyntax #
module Main where
import Data.Proxy
import Control.Supe... |
8c066055016a307c7e512abbd47093641822752977bd95d13ced4a0b8a169ed5 | HugoPeters1024/hs-sleuth | RealFloat.hs | # LANGUAGE CPP , OverloadedStrings #
# LANGUAGE Trustworthy #
-- |
-- Module: Data.Text.Lazy.Builder.RealFloat
Copyright : ( c ) The University of Glasgow 1994 - 2002
-- License: see libraries/base/LICENSE
--
-- Write a floating point value to a 'Builder'.
module Data.Text.Lazy.Builder.RealFloat
(
FP... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/src/Data/Text/Lazy/Builder/RealFloat.hs | haskell | |
Module: Data.Text.Lazy.Builder.RealFloat
License: see libraries/base/LICENSE
Write a floating point value to a 'Builder'.
| Control the rendering of floating point numbers.
^ Scientific notation (e.g. @2.3e123@).
^ Standard decimal notation.
@9,999,999@, and scientific notation otherwise.
using standar... | # LANGUAGE CPP , OverloadedStrings #
# LANGUAGE Trustworthy #
Copyright : ( c ) The University of Glasgow 1994 - 2002
module Data.Text.Lazy.Builder.RealFloat
(
FPFormat(..)
, realFloat
, formatRealFloat
) where
import Data.Array.Base (unsafeAt)
import Data.Array.IArray
import Data.Text.Intern... |
72f6bbf5f736c60c6fe2a50fbf38ec48baac6e4d46d6985dd0d25426a5347c57 | dvanhorn/ralist | tree.rkt | #lang racket
(require ;planet/version
rackunit)
(require/expose data/ralist ;(this-package-in main)
(#;build-tree node? make-node node-val node-left node-right
tree-val tree-ref tree-update
tree-map tree-map/n))
(define one 'a)
(define th... | null | https://raw.githubusercontent.com/dvanhorn/ralist/8f830a01463c547d2588671e76202cfe566a3fb1/data/ralist/tests/tree.rkt | racket | planet/version
(this-package-in main)
build-tree node? make-node node-val node-left node-right
(check-equal? (build-tree 1 (lambda (i) i)) 0)
(check-equal? (build-tree 1 (lambda (i) 'x)) | #lang racket
rackunit)
tree-val tree-ref tree-update
tree-map tree-map/n))
(define one 'a)
(define three (make-node 'a 'b 'c))
(define seven
(make-node 'a
(make-node 'b 'c 'd)
(make-node 'e 'f 'g)))
(define/provide-test-su... |
73a79f87d3bb08d0361f4cbab5ad42ced0854dd353013125d7f6354a6f18e6a0 | samoht/camloo | float.scm | ;; Le module
(module
__caml_float
(import
__caml_arg
__caml_baltree
__caml_char
__caml_eq
__caml_exc
__caml_fchar
__caml_filename
__caml_fstring
__caml_fvect
__caml_genlex
__caml_hashtbl
__caml_int
__caml_io
__caml_lexing
__caml_list
__caml_map
__... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/runtime/Llib.bootstrap/float.scm | scheme | Le module
Les variables globales
Les expressions globales | (module
__caml_float
(import
__caml_arg
__caml_baltree
__caml_char
__caml_eq
__caml_exc
__caml_fchar
__caml_filename
__caml_fstring
__caml_fvect
__caml_genlex
__caml_hashtbl
__caml_int
__caml_io
__caml_lexing
__caml_list
__caml_map
__caml_pair
... |
5fe3ba25cdb8d808f7f159a12d061394fdf679a057f313db05b800c29d9bf20b | petertseng/adventofcode-hs-2022 | 08_treetop_tree_house.hs | import AdventOfCode (readInputFile)
import Data.Array.Unboxed ((!), UArray, bounds, indices, listArray)
import Data.Char (digitToInt)
import Data.List (findIndex)
type Pos = (Int, Int)
type Trees = UArray Pos Int
countTrees :: (a -> a -> a) -> (Int -> [Int] -> a) -> Trees -> Pos -> a
countTrees op countDir trees (y,... | null | https://raw.githubusercontent.com/petertseng/adventofcode-hs-2022/87f7ddff5dceff978d1887af61861e378ac02bfd/bin/08_treetop_tree_house.hs | haskell | import AdventOfCode (readInputFile)
import Data.Array.Unboxed ((!), UArray, bounds, indices, listArray)
import Data.Char (digitToInt)
import Data.List (findIndex)
type Pos = (Int, Int)
type Trees = UArray Pos Int
countTrees :: (a -> a -> a) -> (Int -> [Int] -> a) -> Trees -> Pos -> a
countTrees op countDir trees (y,... | |
63f401a4c9487868a3a590a37d077d03a0b764cd4c6165763bb87c0b2c925aa6 | mirage/irmin | control_file.ml |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/eddf51783b4d97e14b4f79d6330a96918f880c6b/src/irmin-pack/unix/control_file.ml | ocaml | TODO: create specific error
TODO: make this a more specific error
The data must fit inside a single page for atomic updates of the file.
This is only true for some file systems. This system will have to be
reworked for [V4].
Since the control file is expected to fit in a page,
[read_all_to_s... |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... |
7b7aad3a659b1b5895b086df4330bf5d991608bbac8bdfd92ff05bf8371c8477 | TrustInSoft/tis-interpreter | fval.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/abstract_interp/fval.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
cd20ae55ead02b11247827b1dcdb4e854a8f9a721038262af6db1d28858471ce | bytekid/mkbtt | unfolding.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/nontermination/unfolding.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** EXCEPTION... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
822283706c8123f3f2028be447e61e528a211cfa250409ba84ca8d52ac723c3f | tobias/dynapath | project.clj | (defproject org.tcrawley/dynapath "1.1.1-SNAPSHOT"
:description "An abstraction for modifiable/readable class loaders."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:deploy-repositories {"releases"
{:url "/"
:creds :gpg}
... | null | https://raw.githubusercontent.com/tobias/dynapath/e82106dfcdc77f0091915f3bde76a99d4d8a6e1a/project.clj | clojure | (defproject org.tcrawley/dynapath "1.1.1-SNAPSHOT"
:description "An abstraction for modifiable/readable class loaders."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:deploy-repositories {"releases"
{:url "/"
:creds :gpg}
... | |
b9eefd1cf215568d4e7b4e533c728e1176062b99ace11627fbcfd32111807ef0 | tlaplus/tlapm | isar_case.ml | Copyright 2009 INRIA
open Printf;;
obsolete functions ( ? )
let print_case_expr n other oc =
assert ( n > 0 ) ;
fprintf oc " CASE c1x - > e1x " ;
if n > 1 then for i = 2 to n do
fprintf oc " [ ] c%dx - > e%dx " i i ;
done ;
if other then fprintf oc " [ ] OTHER - > oth " ;
; ;
l... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/isar_case.ml | ocaml | ===================== test functions ================== | Copyright 2009 INRIA
open Printf;;
obsolete functions ( ? )
let print_case_expr n other oc =
assert ( n > 0 ) ;
fprintf oc " CASE c1x - > e1x " ;
if n > 1 then for i = 2 to n do
fprintf oc " [ ] c%dx - > e%dx " i i ;
done ;
if other then fprintf oc " [ ] OTHER - > oth " ;
; ;
l... |
6692df2272f4472d47d86b84aa36a049d260469ac307675831781d906842fcc8 | jiangpengnju/htdp2e | ex114.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex114) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/itemizations_and_structures/ex114.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design predicates for the following data definitions from the preceding section.
– (make-aim UFO Tank)
– (make-fired UFO Tank Missile)
interpretation represents the state of the space invader game
Any -> Boolean
– a negative numbe... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex114) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
SIGS , Coordinate ( ex 107 ) , and VAnimal .
A SIGS is one ... |
2bffed0cce6c44a8f2b9ab23efcfaa9bda461df5999a28e4f5b3a0d88a04d32e | AshleyYakeley/Truth | Tuple.hs | module Changes.Core.Types.Database.Tuple where
import Changes.Core.Import
import Changes.Core.Types.Database
data TupleTableSel tablesel row where
MkTupleTableSel :: tablesel colsel -> TupleTableSel tablesel (AllOf colsel)
class TupleDatabaseType (dbType :: Type) where
type TupleDatabaseTypeRowWitness dbType... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/9296c5fe5c311be11f237714229c78319e9431bb/Changes/changes-core/lib/Changes/Core/Types/Database/Tuple.hs | haskell | module Changes.Core.Types.Database.Tuple where
import Changes.Core.Import
import Changes.Core.Types.Database
data TupleTableSel tablesel row where
MkTupleTableSel :: tablesel colsel -> TupleTableSel tablesel (AllOf colsel)
class TupleDatabaseType (dbType :: Type) where
type TupleDatabaseTypeRowWitness dbType... | |
61fc20588252f2a216b9757c26788dcf830110a81bf0a83d4215ddb5e9f88465 | Clozure/ccl-tests | unread-char.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Jan 18 20:05:36 2004
Contains : Tests of UNREAD - CHAR
(in-package :cl-test)
(deftest unread-char.1
(with-input-from-string
(*standard-input* "abc")
(values
(read-char)
(unread-char #\a)
(read-char)
(read-char)
(unread-char #\b)
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/unread-char.lsp | lisp | -*- Mode: Lisp -*-
Error tests | Author :
Created : Sun Jan 18 20:05:36 2004
Contains : Tests of UNREAD - CHAR
(in-package :cl-test)
(deftest unread-char.1
(with-input-from-string
(*standard-input* "abc")
(values
(read-char)
(unread-char #\a)
(read-char)
(read-char)
(unread-char #\b)
(read-char)
(read... |
79a4795cca9fe476d9f37eab5ecdf576e3af0c7d57d5eedadc0aaacccc113502 | conal/lambda-ccc | Ty.hs | # LANGUAGE TypeOperators , GADTs , KindSignatures , TypeSynonymInstances #
# LANGUAGE PatternGuards , ConstraintKinds #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP
------------... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Unused/Ty.hs | haskell | TEMP
TEMP
--------------------------------------------------------------------
|
Module : LambdaCCC.Ty
License : BSD3
Maintainer :
Stability : experimental
Typed types
--------------------------------------------------------------------
| Typed type representation
Inferred type:
f1 a... | # LANGUAGE TypeOperators , GADTs , KindSignatures , TypeSynonymInstances #
# LANGUAGE PatternGuards , ConstraintKinds #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
Copyright : ( c ) 2013 Tabula , Inc.
module LambdaCCC.Ty
( Ty(..),HasTy(..), tyEq', tyEq2'
, HasTy2,HasTy3,HasTy4
, HasTyJt(..), ... |
980bb53e10deb95f68b9b8f846852782698d36e38c9e0e36aceb527b25f5cfb6 | lucian303/corenlpd | handler.clj | (ns corenlpd.test.handler
(:use clojure.test
ring.mock.request
corenlpd.handler))
(deftest test-app
(testing "/parse"
(let [response (app (request :get "/parse?text=This+is+a+test."))]
(is (= 200 (:status response)))))
(testing "/parse-with-pos"
(let [response (app (request :get "/... | null | https://raw.githubusercontent.com/lucian303/corenlpd/51454aaa0cbed40f0bea7d9be47aac5d224e31ef/test/corenlpd/test/handler.clj | clojure | (ns corenlpd.test.handler
(:use clojure.test
ring.mock.request
corenlpd.handler))
(deftest test-app
(testing "/parse"
(let [response (app (request :get "/parse?text=This+is+a+test."))]
(is (= 200 (:status response)))))
(testing "/parse-with-pos"
(let [response (app (request :get "/... | |
7195dfc19320f264da67d403358a94105473ba11f08caa6436def57b7f555c3d | dainiusjocas/lucene-grep | grep.clj | (ns lmgrep.grep
(:require [clojure.java.io :as io]
[jsonista.core :as json]
[lmgrep.fs :as fs]
[lmgrep.lucene :as lucene]
[lmgrep.analysis :as analysis]
[lmgrep.unordered :as unordered])
(:import (java.io File)))
(set! *warn-on-reflection* true)
(defn re... | null | https://raw.githubusercontent.com/dainiusjocas/lucene-grep/eaebdc6999a3047af0eee5926abaa637a642b4fd/src/lmgrep/grep.clj | clojure | (ns lmgrep.grep
(:require [clojure.java.io :as io]
[jsonista.core :as json]
[lmgrep.fs :as fs]
[lmgrep.lucene :as lucene]
[lmgrep.analysis :as analysis]
[lmgrep.unordered :as unordered])
(:import (java.io File)))
(set! *warn-on-reflection* true)
(defn re... | |
2fd23e8771c77fe627f0fef88aa8cb58df00caf9cb9bb230c0ab7aea2c3a6465 | B-Lang-org/bsc | SimDomainInfo.hs | module SimDomainInfo where
import ListUtil(mapFst)
import ASyntax(AId, AExpr, AClock(..), ARuleId)
import Wires(ClockDomain)
import ErrorUtil(internalError)
import PPrint
import qualified Data.Map as M
-- ---------------
-- Id for indexing into the domain map.
The APackage lists domains by number . Rather tha... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/SimDomainInfo.hs | haskell | ---------------
Id for indexing into the domain map.
unique numbers, we'll store a domain by the instance name and the number
in that instance. If a domain of an instance is the same as its parent,
then we use the parent Id as the index and forget the child Id.
---------------
Mapping from a clock to its domain... | module SimDomainInfo where
import ListUtil(mapFst)
import ASyntax(AId, AExpr, AClock(..), ARuleId)
import Wires(ClockDomain)
import ErrorUtil(internalError)
import PPrint
import qualified Data.Map as M
The APackage lists domains by number . Rather than reassigning new
type DomainId = (AId, ClockDomain)
( ... |
0a8a30fd479aa9c1d270f7effdb60e348bb1e39cfc6e8632b18b6717e89153c3 | ckirkendall/enfocus | syntax.clj | (ns enfocus.enlive.syntax)
(declare sel-to-string)
(defn sel-to-str [input]
(let [item (first input)
rest (rest input)
end (if (empty? rest) '(()) (sel-to-str rest))]
(cond
(keyword? item) (map #(conj % (name item)) end)
(string? item) (map #(conj % item) end)
(set? item) (reduce (... | null | https://raw.githubusercontent.com/ckirkendall/enfocus/54ee5d1ec4c1fd603d4766caac07bfc482f65abb/src/clj/enfocus/enlive/syntax.clj | clojure | (ns enfocus.enlive.syntax)
(declare sel-to-string)
(defn sel-to-str [input]
(let [item (first input)
rest (rest input)
end (if (empty? rest) '(()) (sel-to-str rest))]
(cond
(keyword? item) (map #(conj % (name item)) end)
(string? item) (map #(conj % item) end)
(set? item) (reduce (... | |
19a45eaa08fff54342a5ff32fa5358dd53dee5990659b3a61350f1e94f8dfa6f | rbuchmann/samak | runtime.cljc | (ns samak.runtime
#?@
(:clj
[(:require
[clojure.core.async :as a :refer [<! >! chan go go-loop close! put!]]
[samak.runtime.stores :as stores]
[samak.runtime.servers :as servers]
[samak.helpers :as helpers]
[samak.tools :refer [fail log]]
[samak.trace :as trace]
[samak.pipes :... | null | https://raw.githubusercontent.com/rbuchmann/samak/ab98d1a180ee02c6cd784962b3c03e473a6d481b/src/samak/runtime.cljc | clojure | (println "found: " id fn)
(println "wrap-in" wrapped target)
This covers the ::n/def case as well
Applying the transformation and wrap network
(map (partial api/network network-name) forms))
Evaluation - Dumb and without dependency resolution for now | (ns samak.runtime
#?@
(:clj
[(:require
[clojure.core.async :as a :refer [<! >! chan go go-loop close! put!]]
[samak.runtime.stores :as stores]
[samak.runtime.servers :as servers]
[samak.helpers :as helpers]
[samak.tools :refer [fail log]]
[samak.trace :as trace]
[samak.pipes :... |
293674bf24c4f145c9e815f6f6715720e84c3f87b35a14ee1672ae1936b60d88 | informatimago/lisp | xterm.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : xterm.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; XXX
;;;;
< PJB > < >
MODIFICATIONS
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/editor/xterm.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
XXX
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program i... | FILE : xterm.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2015 - 03 - 16 < PJB > Added this header .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of... |
9f7a035b71db669c0f81a4732c18011fd8d215f621ad405b752ebe9d907feb72 | BrewLLM/bosquet | user.clj | (ns user
(:require [nextjournal.clerk :as clerk]))
;; start Clerk's built-in webserver on the default port 7777, opening the browser when done
#_(clerk/serve! {:browse? true})
;; or let Clerk watch the given `:paths` for changes
(clerk/serve! {:watch-paths ["notebook"]})
(comment
(clerk/show! "notebook/use_guide... | null | https://raw.githubusercontent.com/BrewLLM/bosquet/7ac01ab1b459d4350bf6daede49a86f3a359c945/dev/user.clj | clojure | start Clerk's built-in webserver on the default port 7777, opening the browser when done
or let Clerk watch the given `:paths` for changes | (ns user
(:require [nextjournal.clerk :as clerk]))
#_(clerk/serve! {:browse? true})
(clerk/serve! {:watch-paths ["notebook"]})
(comment
(clerk/show! "notebook/use_guide.clj")
(clerk/show! "notebook/wedding_guest_example.clj"))
|
b6a90275d85f987322ea0e5bdc238bedd9d86e0ba4c8ce513527be089a8ab41f | argp/bap | viewGraph_select.ml | (**************************************************************************)
(* *)
ViewGraph : a library to interact with graphs in ocaml and lablgtk2
(* *)
Copyright (... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/view_graph/viewGraph_select.ml | ocaml | ************************************************************************
This software is free soft... | ViewGraph : a library to interact with graphs in ocaml and lablgtk2
Copyright ( C ) 2008 -
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
let debug format =
if true
... |
c6d42b592a6e11ed2b67ba6d4637bbc45d7f85ac30fce05a871d71ff91c70f35 | music-suite/music-suite | Score.hs | module Music.Score
( module Music.Score.Part,
module Music.Score.Pitch,
module Music.Score.Dynamics,
module Music.Score.Articulation,
module Music.Score.Slide,
module Music.Score.Tremolo,
module Music.Score.StaffNumber,
module Music.Score.Technique,
module Music.Score.Text,
module ... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Score.hs | haskell | module Music.Score
( module Music.Score.Part,
module Music.Score.Pitch,
module Music.Score.Dynamics,
module Music.Score.Articulation,
module Music.Score.Slide,
module Music.Score.Tremolo,
module Music.Score.StaffNumber,
module Music.Score.Technique,
module Music.Score.Text,
module ... | |
bb11eabe6ad31885a85880bd76d1a85429b7e05b633f0c1574dccdb8fcf3bb14 | potatosalad/erlang-jose | jose_jwe_alg_dir.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 23 Jul 2015 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwe/jose_jwe_alg_dir.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_jwe callbacks
jose_jwe_alg callbacks
API
Types
====================================================================
jose_jwe callb... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 23 Jul 2015 by < >
-module(jose_jwe_alg_dir).
-behaviour(jose_jwe).
-behaviour(jose_jwe_alg).
-include("jose_jwk.hrl").
-export([from_map/1]).
-export([to_map/2]).
-export([... |
66a8f57f84ce7d909e52aab467ff6f7b46395f64da12a90dbac8602cdd76eae6 | yetanalytics/datasim | profile_test.clj | (ns com.yetanalytics.datasim.input.profile-test
(:require [clojure.test :refer [deftest testing is]]
[com.yetanalytics.datasim.protocols :as p]
[com.yetanalytics.datasim.input.profile :refer [map->Profile]]
[com.yetanalytics.pan :as pan]
[com.yetanalytics.datasim.io :as... | null | https://raw.githubusercontent.com/yetanalytics/datasim/684fdefed81972093b56556d7f60a637457a6a06/src/test/com/yetanalytics/datasim/input/profile_test.clj | clojure | (ns com.yetanalytics.datasim.input.profile-test
(:require [clojure.test :refer [deftest testing is]]
[com.yetanalytics.datasim.protocols :as p]
[com.yetanalytics.datasim.input.profile :refer [map->Profile]]
[com.yetanalytics.pan :as pan]
[com.yetanalytics.datasim.io :as... | |
893c4fcd9e018ca12b88c36b664ec5e8ee7de30ea1a2988dedbb58955f135922 | Twinside/Eq | Cleanup.hs | module Language.Eq.Algorithm.Cleanup ( cleanup
, cleanupFormulaPrim
, cleanupRules ) where
import Language.Eq.Types
import Language.Eq.Polynome
import Language.Eq.FormulaIterator
import Language.Eq.Algorithm.Utils
import Data.Ratio
import qualified L... | null | https://raw.githubusercontent.com/Twinside/Eq/60105372d55420735b722245db7021c239c812f4/Language/Eq/Algorithm/Cleanup.hs | haskell | --------------------------------------------
-- '+'
--------------------------------------------
| Addition rules, everything
concerning the '+' operator
What's the point?
x + (-y) <=> x - y
--------------------------------------------
-- '-'
-------------------------------------------... | module Language.Eq.Algorithm.Cleanup ( cleanup
, cleanupFormulaPrim
, cleanupRules ) where
import Language.Eq.Types
import Language.Eq.Polynome
import Language.Eq.FormulaIterator
import Language.Eq.Algorithm.Utils
import Data.Ratio
import qualified L... |
59cce4b34540959a117ac6f00835e57967d9b8032a55f1330997ffb02803a103 | nineties-retro/sps | sps-assert.scm | (defmacro sps:assert (expr)
`(let ((sjb:expr ,expr))
(if (or (and (integer? sjb:expr) (zero? sjb:expr)) (not sjb:expr))
(error 'assertion-failure ',expr))))
| null | https://raw.githubusercontent.com/nineties-retro/sps/bf15b415f4cdf5d6d69ae2f39c250db2090c0817/scm/sps-assert.scm | scheme | (defmacro sps:assert (expr)
`(let ((sjb:expr ,expr))
(if (or (and (integer? sjb:expr) (zero? sjb:expr)) (not sjb:expr))
(error 'assertion-failure ',expr))))
| |
4727be1f05137351585b642ca3d7f6fe668440de3d6f42b339752d8e2cdb0f3d | nuvla/api-server | utils.clj | (ns sixsq.nuvla.db.es.common.utils
(:require
[sixsq.nuvla.db.utils.common :as cu]))
(def default-index-prefix "nuvla-")
(defn id->index
([id]
(id->index default-index-prefix id))
([index-prefix id]
(->> id cu/split-id first (str index-prefix))))
(defn collection-id->index
([collection-id]
(co... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/db/es/common/utils.clj | clojure | (ns sixsq.nuvla.db.es.common.utils
(:require
[sixsq.nuvla.db.utils.common :as cu]))
(def default-index-prefix "nuvla-")
(defn id->index
([id]
(id->index default-index-prefix id))
([index-prefix id]
(->> id cu/split-id first (str index-prefix))))
(defn collection-id->index
([collection-id]
(co... | |
c2c6bc8121471ed472dfcfd6e01f2d753d15812a5aca923a4ffc96283f5ee765 | aria42/flare | train.clj | (ns flare.train
(:require
[clojure.pprint :as pprint]
[clojure.spec.alpha :as s]
[flare.model :as model]
[flare.compute :as compute]
[flare.core :as flare]
[flare.report :as report]
[flare.optimize :as optimize]
[flare.graph :as graph]
[flare.module :as module]))
(s/def ::train-opts
(s/k... | null | https://raw.githubusercontent.com/aria42/flare/9c7d90bf7bd876a154e705dd78645eb5c69ae590/src/flare/train.clj | clojure | side-effect to update gradients | (ns flare.train
(:require
[clojure.pprint :as pprint]
[clojure.spec.alpha :as s]
[flare.model :as model]
[flare.compute :as compute]
[flare.core :as flare]
[flare.report :as report]
[flare.optimize :as optimize]
[flare.graph :as graph]
[flare.module :as module]))
(s/def ::train-opts
(s/k... |
eea73d6ef82d10f40750c7f11f20a07a10745916712e70399020cfb071df8e46 | astrada/ocaml-extjs | ext_button_Button.mli | * Create simple buttons with this component . Customi ...
{ % < p > Create simple buttons with this component . include < a href="#!/api / Ext.button . Button - cfg - iconAlign " rel="Ext.button . Button - cfg - iconAlign " class="docClass">aligned</a >
< a href="#!/api / Ext.button . Button - cfg - iconCls "... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_button_Button.mli | ocaml | * {% <p>True if this button is hidden.</p> %}
Defaults to: [false]
* {% <p>The <a href="#!/api/Ext.menu.Menu" rel="Ext.menu.Menu" class="docClass">Menu</a> object associated with this Button when configured with the <a href="#!/api/Ext.button.Button-cfg-menu" rel="Ext.button.Button-cfg-menu" class="docCla... | * Create simple buttons with this component . Customi ...
{ % < p > Create simple buttons with this component . include < a href="#!/api / Ext.button . Button - cfg - iconAlign " rel="Ext.button . Button - cfg - iconAlign " class="docClass">aligned</a >
< a href="#!/api / Ext.button . Button - cfg - iconCls "... |
262a07539463d8125840f77bc5d699cd244637c7311e453a49714c629f401ce5 | ilitirit/manardb | box.lisp | (in-package #:manardb)
(with-constant-tag-for-class (tag mm-box)
(defun-speedy unbox-box (index)
(with-pointer-slots (ptr)
((mpointer tag index) mm-box)
(mptr-to-lisp-object ptr))))
(with-constant-tag-for-class (element-tag mm-box)
(defun-speedy make-marray (length &key
(initial-element nil i... | null | https://raw.githubusercontent.com/ilitirit/manardb/6791f3569acd42b723ce82051cc8e2e3ee42a671/src/box.lisp | lisp | XXXX these things are really awful and should be redone much more nicely | (in-package #:manardb)
(with-constant-tag-for-class (tag mm-box)
(defun-speedy unbox-box (index)
(with-pointer-slots (ptr)
((mpointer tag index) mm-box)
(mptr-to-lisp-object ptr))))
(with-constant-tag-for-class (element-tag mm-box)
(defun-speedy make-marray (length &key
(initial-element nil i... |
7b809cec55e0be46eb44676d4c5a0ef4510730ef301e5dd6558bdaad65ff20a6 | mirage/ocaml-gnt | gnt.mli |
* Copyright ( c ) 2010 < >
* Copyright ( C ) 2012 - 2014 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* T... | null | https://raw.githubusercontent.com/mirage/ocaml-gnt/a82286873c94e2a20b4cea9df66fc4093fcbbe06/lib/gnt.mli | ocaml | * Type of a grant table index, called a grant reference in
Xen's terminology.
* A connection to the grant device, needed for mapping/unmapping
* Open a connection to the grant device. This must be done before any
calls to map or unmap.
* Close a connection to the grant device. Any future calls to map or
... |
* Copyright ( c ) 2010 < >
* Copyright ( C ) 2012 - 2014 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* T... |
57cf0620e52e4de7b2ff9be27f01860e00138031d37547d3075b26a298125110 | fetburner/Coq2SML | type_errors.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/checker/type_errors.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type errors.
Fixpoints
CoFixpoi... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Env... |
35bb0be4c4294789b4564892b5943e3c6fdca8324c3e91b6640d01c8ddfd29e6 | avsm/ocaml-ssh | ounix.mli | (** Set or unset the TCP_NODELAY flag on a fd *)
val set_tcp_nodelay : Unix.file_descr -> bool -> unit
* Set the multicast TTL on an fd to x
val set_ip_multicast_ttl : Unix.file_descr -> int -> unit
(** Set the IP_MULTICAST_LOOP on an fd to x *)
val set_ip_multicast_loop : Unix.file_descr -> int -> unit
(** Add the ... | null | https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/ounix/ounix.mli | ocaml | * Set or unset the TCP_NODELAY flag on a fd
* Set the IP_MULTICAST_LOOP on an fd to x
* Add the fd to the multicast group with address addr
* Convert socket address into a string | val set_tcp_nodelay : Unix.file_descr -> bool -> unit
* Set the multicast TTL on an fd to x
val set_ip_multicast_ttl : Unix.file_descr -> int -> unit
val set_ip_multicast_loop : Unix.file_descr -> int -> unit
val join_multicast_group : Unix.file_descr -> Unix.inet_addr -> unit
val string_of_sockaddr : Unix.sockaddr... |
dd9f65b855a4953baf599202e113c74b0dc0bf3718fe88b8a349b9d87bdd28ef | filipesilva/datafire | tests.cljs | (ns datafire.tests
(:require [cljs.test :refer [is async]]
[cljs.core.async :refer [go <!]]
[async-interop.interop :refer [<p!]]
[devcards.core :refer [deftest]]
[datafire.core :as df]
[datafire.samples :refer [data schema]]
[datafire.test-helper... | null | https://raw.githubusercontent.com/filipesilva/datafire/84bc3fd0fca563ff0aeaba6cfcdd95dc314ebc75/src/test/datafire/tests.cljs | clojure | (ns datafire.tests
(:require [cljs.test :refer [is async]]
[cljs.core.async :refer [go <!]]
[async-interop.interop :refer [<p!]]
[devcards.core :refer [deftest]]
[datafire.core :as df]
[datafire.samples :refer [data schema]]
[datafire.test-helper... | |
67e26dee493b92f90ad29059cd283ea43b8ba9574ecd9effe98659bee0570f55 | YoshikuniJujo/markdown2svg | JPG.hs | # LANGUAGE QuasiQuotes , TypeFamilies , PackageImports , DoAndIfThenElse #
module Image.JPG (isJPG, jpgSize) where
import Control.Applicative
import Control.Arrow
import "monads-tf" Control.Monad.State
import Data.Maybe
import Data.Monoid
import File.Binary
import File.Binary.Instances
import File.Binary.Instances.... | null | https://raw.githubusercontent.com/YoshikuniJujo/markdown2svg/a4a53d2f669c124684e8beee5c1c271d9699f952/src/Image/JPG.hs | haskell | # LANGUAGE QuasiQuotes , TypeFamilies , PackageImports , DoAndIfThenElse #
module Image.JPG (isJPG, jpgSize) where
import Control.Applicative
import Control.Arrow
import "monads-tf" Control.Monad.State
import Data.Maybe
import Data.Monoid
import File.Binary
import File.Binary.Instances
import File.Binary.Instances.... | |
fc15316c15f3cb66d085ca1471f860c68d4b8ca00805ebf2e295ef132debdbe3 | copton/ocram | SybTest.hs | import Data.Data
import Language.C.Pretty
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
import Language.C.Data.Node
import Language.C.Parser (parseC)
import Data.Generics
import Data.ByteString.Char8 (pack)
import Language.C.Data.Position (position)
import Control.Monad.State
count :: CStat -> Int
co... | null | https://raw.githubusercontent.com/copton/ocram/c7166eab0187868a52a61017c6d3687e5a1a6162/try/syb/SybTest.hs | haskell | import Data.Data
import Language.C.Pretty
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
import Language.C.Data.Node
import Language.C.Parser (parseC)
import Data.Generics
import Data.ByteString.Char8 (pack)
import Language.C.Data.Position (position)
import Control.Monad.State
count :: CStat -> Int
co... | |
06b892d462a6d23e24413f8eecb8681384d8a7c13aa50b9ceb2929bc2d63320a | nginformatica/fungo | fungo.ml | type 'a predicate =
'a -> bool
let always x _ = x
let apply_to x f = f x
let both f g x = f x && g x
let complement (f : 'a predicate) (x : 'a) : bool = not (f x)
let compose f g x = f (g x)
let converge f (g, h) x =
f (g x) (h x)
let either f g x = f x || g x
let flip f first second = f second first
let i... | null | https://raw.githubusercontent.com/nginformatica/fungo/98f0050ce714b2964db79daf058628d133f38289/lib/fungo.ml | ocaml | type 'a predicate =
'a -> bool
let always x _ = x
let apply_to x f = f x
let both f g x = f x && g x
let complement (f : 'a predicate) (x : 'a) : bool = not (f x)
let compose f g x = f (g x)
let converge f (g, h) x =
f (g x) (h x)
let either f g x = f x || g x
let flip f first second = f second first
let i... | |
0d6918563e61da31282371eab0ebf7dae83c5e5c2ee1805a6c7330f4c2c34355 | janestreet/core_unix | ocaml_c_utils.ml | (** This library does not contain any OCaml code; it only contains C code. *)
| null | https://raw.githubusercontent.com/janestreet/core_unix/a051098a918b950e9d0a5da7248f1bbfb51388e5/ocaml_c_utils/src/ocaml_c_utils.ml | ocaml | * This library does not contain any OCaml code; it only contains C code. | |
5f89afcbe9434059d7399848da68e22cfb38aab10fcc271960fc56f205074902 | hstreamdb/hstream | Utils.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
module HStream.Gossip.Utils where
import Control.Concurrent
import Control.Concurre... | null | https://raw.githubusercontent.com/hstreamdb/hstream/35b2284d122202a6ad7efc98e6c6304b68a0e49d/hstream-gossip/src/HStream/Gossip/Utils.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
------------------------------------------------------------------------------ | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module HStream.Gossip.Utils where
import Control.Concurrent
import Control.Concurrent.STM (STM, TQueue, TVar,
atomically, newTVar,
... |
6dc2ce7268e28b8ae987e30a560449d6003524e0abe32c8620f86593f7135360 | S8A/htdp-exercises | ex216.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex216) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex216.rkt | racket | about the language level of this file in a form that our tools can easily process.
Graphical constants
width in base units
A Direction is one of the following:
(make-worm Direction Posn)
interpretation combines the position of the worm in a grid
in which it's moving
main: Number -> WormState
renders the worm... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex216) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "itunes.rkt"... |
fe28cb85fc6fe5220f523fad13e808d9d374c9c03a043fc3808eeb43fb19f36e | edicl/cl-gd | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - GD ; Base : 10 -*-
$ Header : /usr / local / cvsrep / gd / util.lisp , v 1.16 2009/11/23 17:05:39 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modificat... | null | https://raw.githubusercontent.com/edicl/cl-gd/0e1812a38f93ece0c3b183a92be6e440cecfd7e6/util.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - GD ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... | $ Header : /usr / local / cvsrep / gd / util.lisp , v 1.16 2009/11/23 17:05:39 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :cl-gd)
... |
527610eed508e7da76e8a30d85e7ebb3dc56c83a99c940cf6d28fe5ebb311f2f | robert-strandh/SICL | package-shadowing-symbols-defun.lisp | (cl:in-package #:sicl-package)
(defun package-shadowing-symbols (package-designator)
(let ((package (package-designator-to-package package-designator)))
(copy-list (shadowing-symbols package))))
| null | https://raw.githubusercontent.com/robert-strandh/SICL/65d7009247b856b2c0f3d9bb41ca7febd3cd641b/Code/Package/package-shadowing-symbols-defun.lisp | lisp | (cl:in-package #:sicl-package)
(defun package-shadowing-symbols (package-designator)
(let ((package (package-designator-to-package package-designator)))
(copy-list (shadowing-symbols package))))
| |
92c2a0355c4cdaa92b3a08daf1f5cb7bf84faf06cedfa499054aa3942f51bf99 | merijn/Belewitte | Types.hs | # OPTIONS_GHC -fno - prof - auto #
{-# LANGUAGE DeriveLift #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeSynonymInstances #-}
module Types
( AllowNewer(..)
, CommitId(... | null | https://raw.githubusercontent.com/merijn/Belewitte/55722e6374a7820b0d5925bc98cbd1686d4265a7/benchmark-analysis/src/Types.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances # | # OPTIONS_GHC -fno - prof - auto #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
module Types
( AllowNewer(..)
, CommitId(..)
, HashDigest
, Hash(..)
, ImplType(..)
, Percentage
, getPercentage
, mkP... |
60e6ee0178338eaaf3ae0e157ea95c0fdb0191bca96aea49c15d6dc6b0916b3e | cmsc430/www | compile-expr.rkt | #lang racket
(provide (all-defined-out))
(require "ast.rkt"
"types.rkt"
"lambdas.rkt"
"fv.rkt"
"utils.rkt"
"compile-ops.rkt"
"compile-datum.rkt"
a86/ast)
;; Registers used
(define rax 'rax) ; return
(define rbx 'rbx) ; heap
(define rsp 'rsp) ; stack
(defin... | null | https://raw.githubusercontent.com/cmsc430/www/ad689ce49eaa12270ff56c595e69a4cbff12e0b2/langs/mountebank/compile-expr.rkt | racket | Registers used
return
heap
stack
arg
Expr CEnv Bool -> Asm
Id CEnv -> Asm
(compile-app-nontail f es c)
The return address is placed above the arguments, so callee pops
arguments and return address is next frame
fetch the code label
return value
Copy the values of given free variables into the heap at given ... | #lang racket
(provide (all-defined-out))
(require "ast.rkt"
"types.rkt"
"lambdas.rkt"
"fv.rkt"
"utils.rkt"
"compile-ops.rkt"
"compile-datum.rkt"
a86/ast)
(define (compile-e e c t?)
(match e
[(Quote d) (compile-datum d)]
[(Eof) ... |
d5326e57b124985d5ff8968b0ef19c3d64178c9e1baa53417b12accccf999017 | Quid2/zm | BLOB.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
|Binary Large OBjects ( )
module ZM.Type.BLOB
( BLOB(..)
, UTF8Encoding(..)
, UTF16LEEncoding(..)
, FlatEncoding(..)
, NoEncoding(..)
)
where
import Control.DeepSeq
import Flat
import Data.Model
import ... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/src/ZM/Type/BLOB.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
|UTF-8 Encoding
|Flat encoding |
|Binary Large OBjects ( )
module ZM.Type.BLOB
( BLOB(..)
, UTF8Encoding(..)
, UTF16LEEncoding(..)
, FlatEncoding(..)
, NoEncoding(..)
)
where
import Control.DeepSeq
import Flat
import Data.Model
import ZM.Type.Array
|A BLOB is binary value encoded according to... |
97d8e56473d3fe6d6012a40cf9cba9eae0148bc2b859d368fa79cc04016463d7 | inaka/beam_olympics | simple_task2.erl | -module(simple_task2).
-behaviour(bo_task).
-export([ description/0
, spec/0
, score/0
, timeout/0
, tests/0
, solution/1
]).
-spec description() -> binary().
description() -> <<"Always return 2">>.
-spec spec() -> bo_task:spec().
spec() -> #{input => [<<"_">>], outpu... | null | https://raw.githubusercontent.com/inaka/beam_olympics/9b16afd54f25c0996430139e9646c3cfdfbdf86b/test/simple_task2.erl | erlang | -module(simple_task2).
-behaviour(bo_task).
-export([ description/0
, spec/0
, score/0
, timeout/0
, tests/0
, solution/1
]).
-spec description() -> binary().
description() -> <<"Always return 2">>.
-spec spec() -> bo_task:spec().
spec() -> #{input => [<<"_">>], outpu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.