_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 |
|---|---|---|---|---|---|---|---|---|
90ba3275798489ff100b90df53160f50baf3c1f43f3f6e88aeedccc87dcbc232 | rpav/ninja-sphere | title.lisp | (in-package :ninja-sphere)
(defclass title-screen (screen)
((im :initform nil)
(fstyle :initform nil)
(text :initform nil)))
(defmethod initialize-instance :after ((g title-screen) &key &allow-other-keys)
(with-slots (fstyle text im) g
(multiple-value-bind (w h) (window-size)
(declare (ignorable w... | null | https://raw.githubusercontent.com/rpav/ninja-sphere/f6708d9ab209a831c7e7df3f12d32ecc4afe0426/src/ui/title.lisp | lisp | (in-package :ninja-sphere)
(defclass title-screen (screen)
((im :initform nil)
(fstyle :initform nil)
(text :initform nil)))
(defmethod initialize-instance :after ((g title-screen) &key &allow-other-keys)
(with-slots (fstyle text im) g
(multiple-value-bind (w h) (window-size)
(declare (ignorable w... | |
f2d8075b455e18a179c2c922de1d1af257689bf309eba3f8dd384fafe5d3caff | joeltg/mit-scheme-kernel | comm.scm | (import-from "../../shared"
print
session-comms
comm-target
comm-id)
(import-from "../utils" asss)
(define comm-targets '())
(define (add-comm-target! comm-target)
(set! comm-targets (cons comm-target comm-targets)))
(define make-comm-target list)
(define comm-target-name first)
(define comm-target-open seco... | null | https://raw.githubusercontent.com/joeltg/mit-scheme-kernel/b8ed3443a075e46567570062d73d3eb775b8743f/src/kernel/comm/comm.scm | scheme | (import-from "../../shared"
print
session-comms
comm-target
comm-id)
(import-from "../utils" asss)
(define comm-targets '())
(define (add-comm-target! comm-target)
(set! comm-targets (cons comm-target comm-targets)))
(define make-comm-target list)
(define comm-target-name first)
(define comm-target-open seco... | |
ebabcd3c108d8c5166d8bbf8498563c9c331ff199f58d885e208db20c491896b | Apress/practical-webdev-haskell | Auth.hs |
module Domain.Auth (
-- * Types
Auth(..),
Email,
mkEmail,
Password,
mkPassword,
UserId,
VerificationCode,
SessionId,
RegistrationError(..),
EmailVerificationError(..),
LoginError(..),
-- * Ports
AuthRepo(..),
EmailVerificationNotif(..),
SessionRepo(..),
-- * Use cases
register,
... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/03/src/Domain/Auth.hs | haskell | * Types
* Ports
* Use cases |
module Domain.Auth (
Auth(..),
Email,
mkEmail,
Password,
mkPassword,
UserId,
VerificationCode,
SessionId,
RegistrationError(..),
EmailVerificationError(..),
LoginError(..),
AuthRepo(..),
EmailVerificationNotif(..),
SessionRepo(..),
register,
verifyEmail,
login,
resolveSessionId,
... |
3ddd5c72e154740bcbd87280f6812cc748ca66c4ddab436a5fe2de5361ee7764 | bsless/clj-fast | project.clj | (defproject clj-fast.profile "0.0.0-SNAPSHOT"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[com.clojure-goes-fast/clj-async-profiler "0.4.0"]]
:repl-options {:init-ns clj-fast.profile})
| null | https://raw.githubusercontent.com/bsless/clj-fast/18544c36d45f180d00f76403e2a75391ae7a9040/extra/clj-fast.profile/project.clj | clojure | (defproject clj-fast.profile "0.0.0-SNAPSHOT"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[com.clojure-goes-fast/clj-async-profiler "0.4.0"]]
:repl-options {:init-ns clj-fast.profile})
| |
82b1bc874336d4f44eb40d3b40f50c7bbb121485945542b7079bc20aa10aa81f | trchopan/scheduled-blocks | Main.hs | module Main where
import Application.HistoryBlocks ( HistoryBlocksArgs
( HistoryBlocksArgs
)
, historyBlocks
... | null | https://raw.githubusercontent.com/trchopan/scheduled-blocks/7913cc21a5c1014de94f093c8e8314146b2df6cf/app/Main.hs | haskell | Check concurrent | module Main where
import Application.HistoryBlocks ( HistoryBlocksArgs
( HistoryBlocksArgs
)
, historyBlocks
... |
36e329fbe62ece1ea82d9c9d5a74740b3382328d2affb93299fd04e023a5c9b8 | pflanze/chj-schemelib | string-util-4.scm | Copyright 2013 - 2018 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require (fi... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/string-util-4.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
too early for cj-inline
TEST see string-util-2
TEST see string-util-2 | Copyright 2013 - 2018 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require (fixnum inc)
define-macro-star)
(export string-empty? (macro %string-empty?)
string-every
string-first-line)
(in... |
c120a60e8a45b66dcaa2ac0a7410165987e4f835c7f3f89798993cc7c4ce01b0 | cloudant-labs/hastings | hastings_sup.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/cloudant-labs/hastings/a69ce0991134cf0e7c3889c35b8d4edb2ad89d14/src/hastings_sup.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(hastings_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?M... |
bcab54dfd95e81172f7f17ee3bfb87d7fd7003a0ef544d7592a4316fc330bf17 | freizl/dive-into-haskell | 1.hs | module Main where
--
-- ?? diff (>>=) with (.)
-- (.) could glue functions together, why need (>>=)
--
? ? how ` [ 1,2,3 ] > > [ 5,6 ] ` being parsed
-- it produces [5,6,5,6,5,6]
-- check the primitive implementation of (>>)
-
instance [ ] where
( x : xs ) > > = f = f x + + ( xs > > = f )
[ ... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/monad/1.hs | haskell |
?? diff (>>=) with (.)
(.) could glue functions together, why need (>>=)
it produces [5,6,5,6,5,6]
check the primitive implementation of (>>)
}
----------------------------
---------------------------- | module Main where
? ? how ` [ 1,2,3 ] > > [ 5,6 ] ` being parsed
-
instance [ ] where
( x : xs ) > > = f = f x + + ( xs > > = f )
[ ] > > = f = [ ]
return x = [ x ]
fail s = [ ]
because of this instance definiation ,
` return 2 ` to be a type of ` ( Monad a , b ) ... |
b6297d4fa4dd4ddb282e1532cb2c9c924351e02a4fb54416c4aebdf7a0613bc1 | maximedenes/native-coq | ppdecl_proof.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/decl_mode/ppdecl_proof.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Errors
open Util
open Pp... |
fb951541653aa5d5d6da78547e03022f989d7b232f8da81d771243e38c8263e1 | dalaing/little-languages | Int.hs | module Type.Component.Int where
import Control.Lens
class AsTyInt t where
_TyInt :: Prism' t ()
| null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/prototypes/classy/src/Type/Component/Int.hs | haskell | module Type.Component.Int where
import Control.Lens
class AsTyInt t where
_TyInt :: Prism' t ()
| |
cdcdfd2cbc696d3f76612d99160f4cedd183736187a030db1f30bce559951312 | bmeurer/ocaml-arm | map.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/map.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ Id$
module type OrderedType =
s... |
1b2ad4118df2fb404181d251e62bafd4f816ed1ae8ab270c2717d38a9b29fd8a | ekmett/machines | Source.hs | {-# LANGUAGE Rank2Types #-}
# LANGUAGE FlexibleInstances #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Machine.Source
Copyright : ( C ) 2012
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisiona... | null | https://raw.githubusercontent.com/ekmett/machines/d76bb4cf5798b495f1648c5f5075209e81e11eac/src/Data/Machine/Source.hs | haskell | # LANGUAGE Rank2Types #
---------------------------------------------------------------------------
|
Module : Data.Machine.Source
License : BSD-style (see the file LICENSE)
Stability : provisional
--------------------------------------------------------------------------
* Sources
$setup
--------... | # LANGUAGE FlexibleInstances #
Copyright : ( C ) 2012
Maintainer : < >
Portability : Rank-2 Types
module Data.Machine.Source
(
Source, SourceT
, source
, repeated
, cycled
, cap
, plug
, iterated
, replicated
, enumerateFromTo
, unfold
, unfoldT
) where
import Control.... |
18eae4c77353b2f902f6e40cc79618bc61b42e0c26ee42318597ba7efb887cc5 | metosin/reitit | exception_test.cljc | (ns reitit.exception-test
(:require [clojure.spec.alpha :as s]
[clojure.test :refer [are deftest is]]
[reitit.core :as r]
[reitit.dev.pretty :as pretty]
[reitit.exception :as exception]
[reitit.spec :as rs])
#?(:clj
(:import (clojure.lang ExceptionInf... | null | https://raw.githubusercontent.com/metosin/reitit/e5bd1237400dcd25f211fc2999b38e6fe1e9033b/test/cljc/reitit/exception_test.cljc | clojure | (ns reitit.exception-test
(:require [clojure.spec.alpha :as s]
[clojure.test :refer [are deftest is]]
[reitit.core :as r]
[reitit.dev.pretty :as pretty]
[reitit.exception :as exception]
[reitit.spec :as rs])
#?(:clj
(:import (clojure.lang ExceptionInf... | |
f700efca85d03c2c4efd3fd84b8b44094fb8464f5c4ea60c15a8d2cb26c4f1f1 | BrunoBonacci/rdt | project.clj | (defn ver [] "0.5.0-alpha4")
(defn ts [] (System/currentTimeMillis))
(defn jdk [] (clojure.string/replace (str (System/getProperty "java.vm.vendor") "-" (System/getProperty "java.vm.version")) #" " "_"))
(defproject com.brunobonacci/rdt #=(ver)
:description "RDT - REPL-Driven tests"
:url ""
:license {:name "A... | null | https://raw.githubusercontent.com/BrunoBonacci/rdt/c0ef9c40759668d4610df0fc578d0d5730959b3c/project.clj | clojure | (defn ver [] "0.5.0-alpha4")
(defn ts [] (System/currentTimeMillis))
(defn jdk [] (clojure.string/replace (str (System/getProperty "java.vm.vendor") "-" (System/getProperty "java.vm.version")) #" " "_"))
(defproject com.brunobonacci/rdt #=(ver)
:description "RDT - REPL-Driven tests"
:url ""
:license {:name "A... | |
c76c23e76b97d3728836000b964e36ed99ba9bc8d4781538be22b915dd9fa9ed | jesperes/aoc_erlang | aoc2015_day06.erl | -module(aoc2015_day06).
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 6,
name = "Probably a Fire Hazard",
expected = ... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/95bb044a7b199ee215be9f0206e5ed5e10077a31/src/2015/aoc2015_day06.erl | erlang | on/off
brightness | -module(aoc2015_day06).
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 6,
name = "Probably a Fire Hazard",
expected = ... |
0c8e2b8dc87f86cd4cd82e32403405bb1f5b2bcfabdb3a47f9c08405e51db0ff | AndreaCrotti/elo | seed_test.clj | (ns byf.seed-test
(:require [byf.seed :as sut]
[honeysql.core :as sql]
[clojure.java.jdbc :as jdbc]
[clojure.test :refer [deftest testing is use-fixtures]]
[byf.db :as db]))
(use-fixtures :each db/wrap-test-db-call)
(defn- count-table
[t]
(:count
(first
(db... | null | https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/test/clj/byf/seed_test.clj | clojure | (ns byf.seed-test
(:require [byf.seed :as sut]
[honeysql.core :as sql]
[clojure.java.jdbc :as jdbc]
[clojure.test :refer [deftest testing is use-fixtures]]
[byf.db :as db]))
(use-fixtures :each db/wrap-test-db-call)
(defn- count-table
[t]
(:count
(first
(db... | |
cd659be6a70b67c9afe1a41aedf1dc4a46bd33586f8ce1c47c8f538aa2519c66 | MaartenFaddegon/Hoed | Main.hs | module Main where
import Syntax
import Parser
import Interpreter
import Machine
import Compiler
main = do
source <- getContents
let prog = parse source
putStrLn "interpreted:"
print (obey prog)
putStrLn "compiled:"
print (exec (compile prog))
| null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/afp02Exercises/Compiler/parassign/Main.hs | haskell | module Main where
import Syntax
import Parser
import Interpreter
import Machine
import Compiler
main = do
source <- getContents
let prog = parse source
putStrLn "interpreted:"
print (obey prog)
putStrLn "compiled:"
print (exec (compile prog))
| |
b9c34986fb5f07a2aaf4515a123639ce0083fcb3c18cb07e1e46b4cc5d56b632 | metabase/metabase | util.clj | (ns metabase.driver.util
"Utility functions for common operations on drivers."
(:require
[clojure.core.memoize :as memoize]
[clojure.set :as set]
[clojure.string :as str]
[metabase.config :as config]
[metabase.db.connection :as mdb.connection]
[metabase.driver :as driver]
[metabase.models.setti... | null | https://raw.githubusercontent.com/metabase/metabase/f1fa503fa31657ac7009e44fdf4053ec3cf07442/src/metabase/driver/util.clj | clojure | This is normally set via the env var `MB_DB_CONNECTION_TIMEOUT_MS`
otherwise defaults to returning `false` if a connection cannot be
actually if we are going to `throw-exceptions` we'll rethrow the original but attempt to humanize the message
first
+----------------------------------------------------------------... | (ns metabase.driver.util
"Utility functions for common operations on drivers."
(:require
[clojure.core.memoize :as memoize]
[clojure.set :as set]
[clojure.string :as str]
[metabase.config :as config]
[metabase.db.connection :as mdb.connection]
[metabase.driver :as driver]
[metabase.models.setti... |
e657742ba224eac27d1794936cf49594be8773606e270c070bcc0949f7b556a4 | offby1/anagrams | anagrams.scm | (define (all-anagrams-internal bag dict)
(define rv '())
(let loop ((dict dict))
(if (null? dict)
rv
(let ((key (caar dict))
(words (cdar dict)))
(let ((smaller-bag (subtract-bags bag key)))
(define pruned
(filter (lambda (entry) (subtract-bags ... | null | https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/scheme48/anagrams.scm | scheme | (define (all-anagrams-internal bag dict)
(define rv '())
(let loop ((dict dict))
(if (null? dict)
rv
(let ((key (caar dict))
(words (cdar dict)))
(let ((smaller-bag (subtract-bags bag key)))
(define pruned
(filter (lambda (entry) (subtract-bags ... | |
950b03e5c3be9bbfada72291989c063d957ece3026a68fd97a396207c174b447 | webnf/webnf | project.clj | (defproject webnf.deps/contrib "0.1.19-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:description "Depend on projects covered by clojure's CA"
:dependencies [[org.clojure/algo.generic "0.1.2"]
[org.clojure/algo.monads "0.1.5"]
[com.google.code.findbugs/jsr305 "_" :upgrade false]
... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/deps.contrib/project.clj | clojure | (defproject webnf.deps/contrib "0.1.19-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:description "Depend on projects covered by clojure's CA"
:dependencies [[org.clojure/algo.generic "0.1.2"]
[org.clojure/algo.monads "0.1.5"]
[com.google.code.findbugs/jsr305 "_" :upgrade false]
... | |
c88beed4b81f0cfd5056bd33d8865b7020d644e20be81f7d072fa3080f516a02 | expipiplus1/vulkan | VK_HUAWEI_subpass_shading.hs | {-# language CPP #-}
-- | = Name
--
-- VK_HUAWEI_subpass_shading - device extension
--
-- == VK_HUAWEI_subpass_shading
--
-- [__Name String__]
-- @VK_HUAWEI_subpass_shading@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
370
--
-- [__Revision__]
2
--
-- [__Ext... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/095bcc6195c6f30e167945f6d3d15e8fdb7aa386/src/Vulkan/Extensions/VK_HUAWEI_subpass_shading.hs | haskell | # language CPP #
| = Name
VK_HUAWEI_subpass_shading - device extension
== VK_HUAWEI_subpass_shading
[__Name String__]
@VK_HUAWEI_subpass_shading@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @... | 370
2
- Requires support for Vulkan 1.0
-
2021 - 06 - 01
-
- , Huawei
- , Huawei
- , Huawei
This extension allows applications to execute a subpass shading pipeline
subpass shading pipeline is a pipeline with the compute pipeline
to... |
6fe35b9efd7d4edaccef8528be75e08adb6358d3b2e41c6bcc61c1bcf4f3572d | gebi/jungerl | ssh_io.erl | %%% File : ssh_io.erl
Author : < >
%%% Description : Interaction module
Created : 23 Sep 2004 by < >
-module(ssh_io).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-export([read_password/1, read_line/1]).
-export([verify_host/1]).
-export([verification_error/3]).
-import(lists, [reverse/1]).
read_line(Pro... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ssh/src/ssh_io.erl | erlang | File : ssh_io.erl
Description : Interaction module
Hook for handling verification error
FIXME: no echo! | Author : < >
Created : 23 Sep 2004 by < >
-module(ssh_io).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-export([read_password/1, read_line/1]).
-export([verify_host/1]).
-export([verification_error/3]).
-import(lists, [reverse/1]).
read_line(Prompt) when list(Prompt) ->
io:get_line(list_to_atom(Prompt)... |
a0339a19d71fa4424358cae03279c2c1ae653acd31f811c97474aa521d67f1aa | Calsign/p5ml | dict.ml |
(* Press a key to see a different circle appear. *)
open P5.Gtkc
let keys = [
("a", ((100., 100.), gray 255));
("b", ((200., 100.), rgb 255 0 0));
("c", ((500., 500.), rgb 0 255 0));
]
module DictSketch : Sketch = struct
include Base
type state = (vector * color) Dict.t
let display = `Size (1200, 600)... | null | https://raw.githubusercontent.com/Calsign/p5ml/65a379a941a7c1c99e6d43fa4a171cd4d68d4e88/examples/dict.ml | ocaml | Press a key to see a different circle appear. |
open P5.Gtkc
let keys = [
("a", ((100., 100.), gray 255));
("b", ((200., 100.), rgb 255 0 0));
("c", ((500., 500.), rgb 0 255 0));
]
module DictSketch : Sketch = struct
include Base
type state = (vector * color) Dict.t
let display = `Size (1200, 600)
let setup conf =
List.fold_left (fun d (k, v... |
27dcedfa850bad2e1b9b2f3503ac4d431ab0f10a93099d82f8fadc6bde9a12f9 | hasktorch/hasktorch | StdString.hs | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Torch.Internal.Managed.Type.StdString where
import... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Managed/Type/StdString.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Torch.Internal.Managed.Type.StdString where
import Foreign.C.String
import Foreign.C.... |
bb91a1c8c73c5e1e40b6e32d93f5fe2e8bfa6f6d122646340adf7e4080e7e565 | nervous-systems/balonius | munge.cljc | (ns ^:no-doc balonius.munge
(:require [balonius.util :as util]
[clojure.string :as str])
#? (:clj (:import [java.text SimpleDateFormat]
[java.util Date TimeZone])
:cljs (:require-macros [balonius.munge])))
(defn ->currency [x]
(keyword (str/upper-case (name x))))
#? (:clj... | null | https://raw.githubusercontent.com/nervous-systems/balonius/cf93925f2e0ffe0a76f845194d1949cf1c2626f1/src/balonius/munge.cljc | clojure | (ns ^:no-doc balonius.munge
(:require [balonius.util :as util]
[clojure.string :as str])
#? (:clj (:import [java.text SimpleDateFormat]
[java.util Date TimeZone])
:cljs (:require-macros [balonius.munge])))
(defn ->currency [x]
(keyword (str/upper-case (name x))))
#? (:clj... | |
71215267370e6aa2f95bddff72f7dc71100378e769509e0b6b301a8976aeda90 | haskell/attoparsec | Common.hs | # LANGUAGE CPP , FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module QC.Common
(
ASCII(..)
, parseBS
, parseT
, toLazyBS
, toStrictBS
, Repack
, repackBS
, repackBS_
, repackT
, repackT_
, liftOp
) where
#if !MIN_VERSION_base(4,8,0)
import Control.Appl... | null | https://raw.githubusercontent.com/haskell/attoparsec/85510bdf2c0a42daaf2ab5ef126d5d94a648993a/tests/QC/Common.hs | haskell | This should really be a dependency on the random package :-( | # LANGUAGE CPP , FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module QC.Common
(
ASCII(..)
, parseBS
, parseT
, toLazyBS
, toStrictBS
, Repack
, repackBS
, repackBS_
, repackT
, repackT_
, liftOp
) where
#if !MIN_VERSION_base(4,8,0)
import Control.Appl... |
6f2ef57df69154360210ee8d3c8835a6d324acfe75e16a9bd5c4671b8666c383 | tommaisey/aeon | bytevector.scm | ;; bytevector -> (port -> any) -> any
(define with-input-from-bytevector
(lambda (b f)
(let* ((p (open-bytevector-input-port b))
(r (f p)))
(close-port p)
r)))
;; bytevector -> int -> int -> bytevector
(define bytevector-section
(lambda (v l r)
(let* ((n (- r l))
(w (make-bytevector n 0... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/sosc/src/bytevector.scm | scheme | bytevector -> (port -> any) -> any
bytevector -> int -> int -> bytevector
bytevector -> byte -> int
Tree bytevector -> bytevector
number a => (bytevector -> int -> a -> ()) -> int -> a
number a => (bytevector -> int -> a -> ()) -> int -> a | (define with-input-from-bytevector
(lambda (b f)
(let* ((p (open-bytevector-input-port b))
(r (f p)))
(close-port p)
r)))
(define bytevector-section
(lambda (v l r)
(let* ((n (- r l))
(w (make-bytevector n 0)))
(bytevector-copy! v l w 0 n)
w)))
(define bytevector-find-index... |
8eba1c929671a42e3f5bf2ba5f96f027a8e827462443c88eb5a5242e3863577b | fission-codes/fission | Ed25519.hs | module Fission.CLI.Key.Ed25519 (parseSecretKey) where
import Crypto.Error
import qualified Crypto.PubKey.Ed25519 as Ed25519
import qualified Data.ByteArray as ByteArray
import Fission.Prelude
import Fission.Key.Error as Key
parseSecretKey ::
( MonadRaise m
, Raises ... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-cli/library/Fission/CLI/Key/Ed25519.hs | haskell | module Fission.CLI.Key.Ed25519 (parseSecretKey) where
import Crypto.Error
import qualified Crypto.PubKey.Ed25519 as Ed25519
import qualified Data.ByteArray as ByteArray
import Fission.Prelude
import Fission.Key.Error as Key
parseSecretKey ::
( MonadRaise m
, Raises ... | |
31f1ba3cebe34d3c3a3f9a08f07714a54474324ebaa829a957eac2682ab8d889 | openbadgefactory/salava | layout.clj | (ns salava.rtl.layout
(:require [salava.core.helper :refer [dump]]))
(defn html-attributes [ctx]
(let [user-lang (keyword (get-in ctx [:user :language] "en"))
dir (if (some #(= % user-lang) (get-in ctx [:config :rtl :rtl-languages])) "rtl" "ltr")]
{:dir dir}))
| null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/rtl/layout.clj | clojure | (ns salava.rtl.layout
(:require [salava.core.helper :refer [dump]]))
(defn html-attributes [ctx]
(let [user-lang (keyword (get-in ctx [:user :language] "en"))
dir (if (some #(= % user-lang) (get-in ctx [:config :rtl :rtl-languages])) "rtl" "ltr")]
{:dir dir}))
| |
d6e902d1ae3f1783d82a20a8ebee5cfe713a1378bab5f13573c27ed1fdb074ce | ygmpkk/house | StringQueries.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.StringQueries
Copyright : ( c ) 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : po... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/StringQueries.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.StringQueries
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------... | Copyright : ( c ) 2003
This module corresponds to parts of section 6.1.11 ( Pointer and String
Queries ) of the OpenGL 1.4 specs .
module Graphics.Rendering.OpenGL.GL.StringQueries (
vendor, renderer, glVersion, glExtensions
) where
import Control.Monad ( liftM )
import Foreign.C.String ( peekCString ... |
222b645caf35e7f23aaca3d5b45fc7111c54f94972eca342d66169a66b249a2d | reagent-project/reagent-cookbook | core.cljs | (ns bootstrap-datepicker.core
(:require
[reagent.dom :as rdom]
[reagent.core :as reagent]))
(defn home-render []
[:input {:type "text" :placeholder "click to show datepicker"}])
(defn home-did-mount [this]
(.datepicker (js/$ (rdom/dom-node this)) (clj->js {:format "dd/mm/yyyy"})))
(defn home []
... | null | https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/recipes/bootstrap-datepicker/src/cljs/bootstrap_datepicker/core.cljs | clojure | (ns bootstrap-datepicker.core
(:require
[reagent.dom :as rdom]
[reagent.core :as reagent]))
(defn home-render []
[:input {:type "text" :placeholder "click to show datepicker"}])
(defn home-did-mount [this]
(.datepicker (js/$ (rdom/dom-node this)) (clj->js {:format "dd/mm/yyyy"})))
(defn home []
... | |
1ec37d85d8003faab4ea535a4aea0ece782a0d55bd10afd6afd4cfb4f5d88823 | michaelklishin/monger | cache.clj | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
;;
;; The APL v2.0:
;;
;; ----------------------------------------------------------------------------------
Copyright ( c ) 2011 - 2018 , , and the ClojureWerkz Team
;;
Licensed unde... | null | https://raw.githubusercontent.com/michaelklishin/monger/9f3d192dffb16da011f805355b87ae172c584a69/src/clojure/monger/cache.clj | clojure |
The APL v2.0:
----------------------------------------------------------------------------------
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 CONDIT... | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
Copyright ( c ) 2011 - 2018 , , and the ClojureWerkz Team
distributed under the License is distributed on an " AS IS " BASIS ,
The EPL v1.0 :
Copyright ( c ) 2011 - 2018 , , ... |
7f57ff76c1577419050a63e9606136d90bf08a35610616ff985b61fec1e53b95 | csabahruska/jhc-components | Stdio.hs | # OPTIONS_JHC -fno - prelude -fffi #
module System.C.Stdio where
import Jhc.Basics
import Jhc.Type.C
import Jhc.Type.Ptr
type FILE = Ptr CFile
foreign import ccall "stdio.h fopen" c_fopen :: Ptr CChar -> Ptr CChar -> IO FILE
foreign import ccall "stdio.h popen" c_popen :: Ptr CChar -> Ptr... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/jhc/System/C/Stdio.hs | haskell | # OPTIONS_JHC -fno - prelude -fffi #
module System.C.Stdio where
import Jhc.Basics
import Jhc.Type.C
import Jhc.Type.Ptr
type FILE = Ptr CFile
foreign import ccall "stdio.h fopen" c_fopen :: Ptr CChar -> Ptr CChar -> IO FILE
foreign import ccall "stdio.h popen" c_popen :: Ptr CChar -> Ptr... | |
4b2a066dc56564a721e84e5cc799ec6163d351af029b7ff1d3337a20195a4cf7 | GoNZooo/gotyno-hs | Main.hs | # LANGUAGE TemplateHaskell #
module Main where
import Library
import Options.Applicative.Simple
import qualified Paths_gotyno_hs
import Qtility
import Types hiding (Parser)
-- This `main` function just delegates to the library's definition of `main`
main :: IO ()
main = do
let programDescription = "Compile type de... | null | https://raw.githubusercontent.com/GoNZooo/gotyno-hs/2024f455f17458514ecac8c4a3b120b67927eb4f/app/Main.hs | haskell | This `main` function just delegates to the library's definition of `main` | # LANGUAGE TemplateHaskell #
module Main where
import Library
import Options.Applicative.Simple
import qualified Paths_gotyno_hs
import Qtility
import Types hiding (Parser)
main :: IO ()
main = do
let programDescription = "Compile type definitions into encoders/decoders for languages"
(options, ()) <-
simple... |
9109d9d2b0debca38ba3a544fd1d5dc6c59f73ed4ba09c94b6e19300c68fa45a | janestreet/core_unix | bench_time_date_ofday.ml | This module adds benchmarks for various patterns of converting between times and
date / ofday pairs that may trigger different kinds of caching . In order to maintain
uniformity , we build lists of input values that set up the expected cache transitions
when iterated forward and backward , then create ... | null | https://raw.githubusercontent.com/janestreet/core_unix/59d04e163b49c7eeef9d96fccb2403fd49c44505/time_float_unix/bench/bench_time_date_ofday.ml | ocaml | a set of time zone transitions to keep in mind when reading below | This module adds benchmarks for various patterns of converting between times and
date / ofday pairs that may trigger different kinds of caching . In order to maintain
uniformity , we build lists of input values that set up the expected cache transitions
when iterated forward and backward , then create ... |
91fea1046e7a59d3b71b47fea679c8050430122d192013e03ed660966a0a4219 | chaoxu/fancy-walks | 60.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List hiding (union)
import Data.List.Ordered (minus,union)
import Data.Int
import Data.Maybe
import Data.Ord
primes :: [Int]
primes = 2: 3: [5,7..] `minus` foldr union' []
[ [p*p,p*p+2*p..] | p <- tail primes ]
where
union' (q:qs) xs = q : union qs xs
isPrime :: Int -> ... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/60.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List hiding (union)
import Data.List.Ordered (minus,union)
import Data.Int
import Data.Maybe
import Data.Ord
primes :: [Int]
primes = 2: 3: [5,7..] `minus` foldr union' []
[ [p*p,p*p+2*p..] | p <- tail primes ]
where
union' (q:qs) xs = q : union qs xs
isPrime :: Int -> Bool
isPrime = test prim... |
5b813ee833c2943b825542f7324cd8623e64a3da523f128b3b641e1f7229ce9e | reanimate/reanimate | doc_overlapT.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Transition
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ overlapT 0.5 fadeT drawBox drawCircle
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_overlapT.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Transition
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ overlapT 0.5 fadeT drawBox drawCircle
|
283e1592342dee9cbe72144b5d55b1eae272c426139ce0072c0f68aba3745350 | satos---jp/mincaml_self_hosting | test_header.ml | let print_char x = print_char (Char.chr x)
from -caml/blob/master/min-rt/miniMLRuntime.ml
let read_token () =
let rec read_token_rec ok acc =
try
let c = input_char stdin in
(match c with
| ' ' | '\t' | '\r' | '\n' -> (
if ok then acc
else read_token_rec false ""
)
| _ -> rea... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/test_header.ml | ocaml | let print_char x = print_char (Char.chr x)
from -caml/blob/master/min-rt/miniMLRuntime.ml
let read_token () =
let rec read_token_rec ok acc =
try
let c = input_char stdin in
(match c with
| ' ' | '\t' | '\r' | '\n' -> (
if ok then acc
else read_token_rec false ""
)
| _ -> rea... | |
1b26f274de376635e98ac5f4588db29c12f581e0f25213ae8a4b4a341694e759 | LdBeth/keim | ho-op.lisp | ;;; -*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*-
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;; ;;
Copyright ( C ) 1993 by AG Siekmann , , ; ;
Universitaet des Saarlandes , Saarbr... | null | https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/term/ho-op.lisp | lisp | -*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;
;
;
All rights reserved. ;;
For information about th... |
(in-package :keim)
(mod~defmod hop :uses (abstr appl mod pos sym term top type )
:documentation "Higher-order functionality of terms."
:exports (
hop~matrix
hop~binder
hop~rename-bound-variables
hop~rename-bound-variables-aux
hop~beta-redex-p
hop~beta-normfor... |
1e87da371e29a909941379aa41f3a015534c61630beef13c73ff9836f638e9f9 | tomjridge/mini-btree | exhaustive.ml | (** Exhaustive testing
Set up a B-tree with very small parameters; test against a reference
map implementation.
*)
open Mini_btree
open Util
open Btree_impl_intf
module S = struct
type k=int
type v=int
type r=int
(* let constants = {max_leaf_keys=2;max_branch_keys=2} *)
let constants = {max_leaf_keys=... | null | https://raw.githubusercontent.com/tomjridge/mini-btree/ffb0f3e5ad0e4b1ad441612b5d3ed6c17d766baf/test/exhaustive.ml | ocaml | * Exhaustive testing
Set up a B-tree with very small parameters; test against a reference
map implementation.
let constants = {max_leaf_keys=2;max_branch_keys=2}
* Wellformedness check
within bounds
ks are ordered
wf holds for subtrees
within bounds
ks are ordered
n is the fuel parameter; o agrees w... |
open Mini_btree
open Util
open Btree_impl_intf
module S = struct
type k=int
type v=int
type r=int
let constants = {max_leaf_keys=3;max_branch_keys=3}
let k_cmp = { k_cmp=Int.compare }
end
module Btree = Mini_btree.Make_with_hashtbl.Make(S)
module Oracle = Map.Make(struct type t = int let compare = Int.co... |
4b7dc3dcf9b6965f51dc5653c32477f427fe1c41f0079a6c1e3e191810f160e6 | abs/connection_pool | mysql_pool.erl | %
( c ) Rdio 2011
%
-module(mysql_pool).
-export([initialize/2, close/1,
num_connections/0,
spec/1, spec/2]).
-export([details/1]).
-define(PING_INTERVAL, 50000).
num_connections() -> 15.
atom_to_host('') -> "127.0.0.1";
atom_to_host(Host) -> atom_to_list(Host).
atom_to_port('') -> 3306;
atom... | null | https://raw.githubusercontent.com/abs/connection_pool/cf864a647b322d636a79550c60957828885ef2d5/src/mysql_pool.erl | erlang |
out:
[
mysql_host = string(),
mysql_port = integer(),
mysql_user = string(),
mysql_password = string(),
mysql_database = string(),
fun mysql_log/4 = function()
] | ( c ) Rdio 2011
-module(mysql_pool).
-export([initialize/2, close/1,
num_connections/0,
spec/1, spec/2]).
-export([details/1]).
-define(PING_INTERVAL, 50000).
num_connections() -> 15.
atom_to_host('') -> "127.0.0.1";
atom_to_host(Host) -> atom_to_list(Host).
atom_to_port('') -> 3306;
atom_to_... |
28230982b93ef1a7cb571b7d4276156e2d96e564c60420925cc274ee71df44b9 | songyahui/AlgebraicEffect | hip.ml |
exception Foo of string
open Parsetree
open Asttypes
open Rewriting
open Pretty
let rec input_lines file =
match try [input_line file] with End_of_file -> [] with
[] -> []
| [line] -> (String.trim line) :: input_lines file
| _ -> failwith "Weird input_line return value"
;;
let rec shaffleZIP li1 li2 =
... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/421afc58ed355f2ce1ada7e77733d7642c328815/parsing/hip.ml | ocaml | label:T -> ...
?label:T -> ...
| Pconst_integer (i, Some m) ->
paren (first_is '-' i) (fun f (i, m) -> pp f "%s%c" i m) f (i,m)
| Pconst_float (i, None) ->
paren (first_is '-' i) (fun f -> pp f "%s") f i
| Pconst_float (i, Some m) ->
paren (first_is '-' i) (fun f (i,m) -> pp f "%s%c" i m) f (i,m)
... |
exception Foo of string
open Parsetree
open Asttypes
open Rewriting
open Pretty
let rec input_lines file =
match try [input_line file] with End_of_file -> [] with
[] -> []
| [line] -> (String.trim line) :: input_lines file
| _ -> failwith "Weird input_line return value"
;;
let rec shaffleZIP li1 li2 =
... |
b38164e8e6e15a4aaa8dc4519900f2130c95d19a2505ed4df5c1f9aabad0a2c8 | turtl/api | schema.lisp | (ql:quickload :turtl)
(vom:config t :info)
(vom:config :cl-rethinkdb :warn)
(vom:config :turtl :debug)
(in-package :turtl)
(defun apply-schema ()
(as:with-event-loop ()
;; set up the database schema
(vom:info "Applying DB schema...")
(catcher
(alet* ((report-main (apply-db-schema *db-schema*))
... | null | https://raw.githubusercontent.com/turtl/api/20ab4cc91128921300913b885eb1e201a5e0fc3f/schema.lisp | lisp | set up the database schema | (ql:quickload :turtl)
(vom:config t :info)
(vom:config :cl-rethinkdb :warn)
(vom:config :turtl :debug)
(in-package :turtl)
(defun apply-schema ()
(as:with-event-loop ()
(vom:info "Applying DB schema...")
(catcher
(alet* ((report-main (apply-db-schema *db-schema*))
(report-analytics (when... |
3c56354eaee0aec5230fefacefd7999def831bf3b01bececea691d5698f0bb87 | neeraj9/hello-erlang-rump | uwiki_sup.erl | %%%-------------------------------------------------------------------
@author nsharma
( C ) 2016 ,
%%% @doc
%%%
%%% @end
Copyright ( c ) 2016 , < > .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the followi... | null | https://raw.githubusercontent.com/neeraj9/hello-erlang-rump/304d2f0faaef64677de22d9a3495297e08d90a3f/apps/uwiki/src/uwiki_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
... | @author nsharma
( C ) 2016 ,
Copyright ( c ) 2016 , < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVI... |
fcd97f660d3d07bc59258f3d676cd4956b39b7dba4332ae47efdb7f60510b663 | ScrambledEggsOnToast/tetris-hs | Input.hs | # LANGUAGE RankNTypes , Arrows #
module Input where
import Prelude hiding ((.), id)
import Control.Category
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Class
import Control.Monad.IO.Class
import Graphics.UI.GLFW as G
import Control.Wire.Core
import FRP.Netwire
import Control.Wire.Unsafe.Event (Event... | null | https://raw.githubusercontent.com/ScrambledEggsOnToast/tetris-hs/bf5ef6a380a7e5786e7fca445b71e01275948d34/Input.hs | haskell | # LANGUAGE RankNTypes , Arrows #
module Input where
import Prelude hiding ((.), id)
import Control.Category
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Class
import Control.Monad.IO.Class
import Graphics.UI.GLFW as G
import Control.Wire.Core
import FRP.Netwire
import Control.Wire.Unsafe.Event (Event... | |
4aff946e85626bd066285ab874c453177c210305f2ee4eb406892b2d4f21a6dc | janestreet/ppx_css | inline_css_example_lib.mli | module Style :
module type of
[%css
stylesheet {|
.foo #foo #bar {
background: 5;
red: blue;
}
|}]
val app : string
| null | https://raw.githubusercontent.com/janestreet/ppx_css/dea318e6997caafb57b72eeb64b6fa8e4900fa05/inline_css/example/lib/inline_css_example_lib.mli | ocaml | module Style :
module type of
[%css
stylesheet {|
.foo #foo #bar {
background: 5;
red: blue;
}
|}]
val app : string
| |
0789dac7f1903697f926e99eb9e5d84d8f86b071dc706735962558e20150aec9 | DrearyLisper/aoc-2022 | day05.ml | open Base
open Stdio
input.txt
[ B ] [ N ] [ H ]
[ V ] [ P ] [ T ] [ V ] [ P ]
[ W ] [ C ] [ T ] [ S ] [ H ] [ N ]
[ T ] [ J ] [ Z ] [ M ] [ N ] [ F ] [ L ]
[ Q ] [ W ] [ N ] [ J ] [ T ] [ Q ] [ R ] [ B ]
[ N ] [ B ] [ Q ] [ R ] ... | null | https://raw.githubusercontent.com/DrearyLisper/aoc-2022/80b593e88e5048f3e720af41c6849f8d833e196d/05/day05.ml | ocaml | exception Exception of string
dune exec --display quiet --no-print-directory ./day05.exe | open Base
open Stdio
input.txt
[ B ] [ N ] [ H ]
[ V ] [ P ] [ T ] [ V ] [ P ]
[ W ] [ C ] [ T ] [ S ] [ H ] [ N ]
[ T ] [ J ] [ Z ] [ M ] [ N ] [ F ] [ L ]
[ Q ] [ W ] [ N ] [ J ] [ T ] [ Q ] [ R ] [ B ]
[ N ] [ B ] [ Q ] [ R ] ... |
cbf42926d61c7c9c2b8109cf993513a3c920f04942433019332b09b5d4c413f1 | Gbury/ocaml-cgroups | CGCpuset.mli |
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 :
* Redistributions of source code must retain the above copyright notice , this
list of conditions and the follo... | null | https://raw.githubusercontent.com/Gbury/ocaml-cgroups/448ec091c3407136e641bcbcc8fc99e4a7376461/subsystems/CGCpuset.mli | ocaml |
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 :
* Redistributions of source code must retain the above copyright notice , this
list of conditions and the follo... | |
a2b0eceac31e03eef93be7769d066d74ac9d711765e437461f27bc77c00c2301 | bobzhang/fan | testloc.ml |
open FanUtil;
let n = "h" and s = "c";
let _loc = FanLoc.ghost ;
#default_quotation
"expr" ;;
with "expr" {:expr| $(anti:mk_anti ~c:"expr" n s) |};
with "expr" {:expr| $(tup: {| $(anti:mk_anti ~c:"expr" n s) |}) |};
(* let u = (\* with "expr" *\) fun *)
[ { @loc| fun [ $ ( pat : veryverylong ) -... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/loc/testloc.ml | ocaml | let u = (\* with "expr" *\) fun
(\* $(agh: ghsogh) *\)
(\* $(a:b) *\)
(\* $a:b *\)
(\* $(aghosghoshgohohoghos:c) *\)
(\* $`g:b *\)
(\* a $u *\)
(\* {@loc| fun [ $(veryverylong) -> y]|} *\)
(\* {| fun [ $(veryverylong) -> y]|} *\)
(\* {:ctyp| `$i |} *\)
(\* $i *\)
(\* $(a:b) *\)
(\... |
open FanUtil;
let n = "h" and s = "c";
let _loc = FanLoc.ghost ;
#default_quotation
"expr" ;;
with "expr" {:expr| $(anti:mk_anti ~c:"expr" n s) |};
with "expr" {:expr| $(tup: {| $(anti:mk_anti ~c:"expr" n s) |}) |};
[ { @loc| fun [ $ ( pat : veryverylong ) - > y]| } - > 2 ] ;
with "expr" {| ... |
5824686446e1b8c8ef12437c71d15769363bfc386632260ea314bcb40f85183a | rhaberkorn/ermacs | edit_var.erl | %%% This module implements "setq"-like variables. But, this seems a bit
%%% distasteful because of concurrent updates and so on. Maybe there is
%%% better way to do variables in general (or just program-internal
%%% variables).
-module(edit_var).
-export([start_link/0]).
-export([lookup/1, lookup/2, set/2, add_to_list... | null | https://raw.githubusercontent.com/rhaberkorn/ermacs/35c8f9b83ae85e25c646882be6ea6d340a88b05b/src/edit_var.erl | erlang | This module implements "setq"-like variables. But, this seems a bit
distasteful because of concurrent updates and so on. Maybe there is
better way to do variables in general (or just program-internal
variables).
----------------------------------------------------------------------
API
----------------------------... |
-module(edit_var).
-export([start_link/0]).
-export([lookup/1, lookup/2, set/2, add_to_list/2]).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-define(TABLE, edit_mem_var).
start_link() ->
gen_server:start_link({local, edit_var}, edit_var, []... |
387a471a6b72e4c4310e67a8aec7a438c81cd90063b4264b247e18ae02fa9aee | squint-cljs/squint | hello.cljs | ;; translated from
(set! js/window.title "Hello")
(def canvas js/window.canvas)
(def keep-drawing true)
(js/window.addEventListener
:click (fn [event]
(js/console.log "Clicked on" event.x event.y)))
(declare draw)
(js/window.addEventListener
:keydown (fn [event]
(js/console.log "Key down:"... | null | https://raw.githubusercontent.com/squint-cljs/squint/acb432cefa9bfd76556f3f263d9738e6752198fb/examples/windowjs/hello.cljs | clojure | translated from |
(set! js/window.title "Hello")
(def canvas js/window.canvas)
(def keep-drawing true)
(js/window.addEventListener
:click (fn [event]
(js/console.log "Clicked on" event.x event.y)))
(declare draw)
(js/window.addEventListener
:keydown (fn [event]
(js/console.log "Key down:" event.key)
... |
a187e28938e7b516e2b425a75c6c4a592e87a46f49863e9eba660c644a2094e6 | ghc/testsuite | tcrun002.hs | -- !!! space leak from overloading !!!
module Main where
-- This program develops a space leak if sfoldl isn't compiled with some
-- care. See comment about polymorphic recursion in TcMonoBinds.lhs
import System.Environment (getArgs)
import GHC.IO
sfoldl :: (a -> Int -> a) -> a -> [Int] -> a
sfoldl f z [] = z
sfold... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/tcrun002.hs | haskell | !!! space leak from overloading !!!
This program develops a space leak if sfoldl isn't compiled with some
care. See comment about polymorphic recursion in TcMonoBinds.lhs
# SCC "sfoldl1" #
# SCC "fzx" # | module Main where
import System.Environment (getArgs)
import GHC.IO
sfoldl :: (a -> Int -> a) -> a -> [Int] -> a
sfoldl f z [] = z
main = IO (\s -> case print (sfoldl (+) (0::Int) [1..200000]) of { IO a -> a s })
|
21dee335a9ac72df2e1efa7536a316a17f9d4a792d93aa71cc4a4bc27773babe | Javran/advent-of-code | Day15.hs | module Javran.AdventOfCode.Y2016.Day15 (
) where
import Javran.AdventOfCode.NumberTheory
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day15 deriving (Generic)
type Disc = (Int, Int, Int)
discP :: ReadP Disc
discP =
(,,)
<$> (string "Disc #" *> decimal... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2016/Day15.hs | haskell | module Javran.AdventOfCode.Y2016.Day15 (
) where
import Javran.AdventOfCode.NumberTheory
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP hiding (count, get, many)
data Day15 deriving (Generic)
type Disc = (Int, Int, Int)
discP :: ReadP Disc
discP =
(,,)
<$> (string "Disc #" *> decimal... | |
3e259426b3644527aef41611dc7ca163b32159cf2845be2c55fc5f0f2695d92c | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
-- Test error message we report when a non-buildable target is
-- requested to be built
TODO : We can give a better error message here , see # 3858 .
NB : Do NOT test on cabal - install , as we fail differently
-- in that case
main = setupTest $ do
setup "configure" []
assertOutput... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildTargetErrors/setup.test.hs | haskell | Test error message we report when a non-buildable target is
requested to be built
in that case | import Test.Cabal.Prelude
TODO : We can give a better error message here , see # 3858 .
NB : Do NOT test on cabal - install , as we fail differently
main = setupTest $ do
setup "configure" []
assertOutputContains "the component is marked as disabled"
=<< fails (setup' "build" ["not-buildable-exe"])
|
69807dd17a1aecff235444f18e6d0d121a77bb637e6f76254bbd85001ed1d78a | google/proto-lens | Nested.hs | -- Copyright 2016 Google Inc. All Rights Reserved.
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
{-# LANGUAGE OverloadedStrings #-}
-- | A benchmark to measure the difference between nesting fields in a repeated
-- submessage vs.... | null | https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens-benchmarks/benchmarks/Nested.hs | haskell | Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
# LANGUAGE OverloadedStrings #
| A benchmark to measure the difference between nesting fields in a repeated
submessage vs. putting repeated f... |
module Main (main) where
import Data.Int (Int32)
import Data.ProtoLens.BenchmarkUtil (protoBenchmark, benchmarkMain)
import Criterion.Main (Benchmark)
import Data.Text (Text)
import Lens.Family ((&), (.~))
import Data.ProtoLens.Message (defMessage)
import Proto.Nested
import Proto.Nested_Fields
defaultNumValues :: I... |
dcfffbff2c0328c355b7110b6487b64fb7f4dda5d61d9ce97abab9808746daf3 | exercism/haskell | Tests.hs | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE TupleSections #
import Test.Hspec (Spec, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import School (add, empty, grade, sorted)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spe... | null | https://raw.githubusercontent.com/exercism/haskell/74b5163d3835653410076d0a6a720eabc2c528b6/exercises/practice/grade-school/test/Tests.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE TupleSections #
import Test.Hspec (Spec, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import School (add, empty, grade, sorted)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spe... | |
473babda2f38a3c4a42131b02519958023818db43da2d05db69fd87b66edcd4c | nyu-acsys/drift | inductive6.ml |
let f g x =
if x > 0 then
g x
else
1
let decr x = x - 1
let main (n:unit(*-:{v:Unit | unit}*)) =
assert(f decr 3 > 0) | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/first/inductive6.ml | ocaml | -:{v:Unit | unit} |
let f g x =
if x > 0 then
g x
else
1
let decr x = x - 1
assert(f decr 3 > 0) |
b73f124ae9d3c90eda19fc419e7075fd50269ac305cb5cfea3e4220fb25355b6 | ergenekonyigit/trendcat | hnews-list.cljs | (ns trendcat.components.hnews-list
(:require [reagent.core :as r]
[clojure.string :as str]
[trendcat.db :refer [app-state get-item]]
[trendcat.actions :refer [get-hnews-stories]]))
(defn score [item]
[:div
{:style {:min-width "70px"
:display "flex"
:a... | null | https://raw.githubusercontent.com/ergenekonyigit/trendcat/6e12fa78df75f1421a1c32c88bd27ac11a599d86/src/trendcat/components/hnews-list.cljs | clojure | (ns trendcat.components.hnews-list
(:require [reagent.core :as r]
[clojure.string :as str]
[trendcat.db :refer [app-state get-item]]
[trendcat.actions :refer [get-hnews-stories]]))
(defn score [item]
[:div
{:style {:min-width "70px"
:display "flex"
:a... | |
97e5f69bf7e7eda4d059c798d7d0e52bd116f884b3c68ea55ce2ec0d692145cc | frenchy64/fully-satisfies | project.clj | (defproject io.github.frenchy64/fully-satisfies "1.9.1-SNAPSHOT"
:description "A variant of clojure.core/satisfies? that checks all methods are implemented."
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:url "-satisfies"
:dependencies [[org.clojure/clojure... | null | https://raw.githubusercontent.com/frenchy64/fully-satisfies/e901fba79e26079376f372a13854716d3e320c25/project.clj | clojure | (defproject io.github.frenchy64/fully-satisfies "1.9.1-SNAPSHOT"
:description "A variant of clojure.core/satisfies? that checks all methods are implemented."
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:url "-satisfies"
:dependencies [[org.clojure/clojure... | |
bc7eb4ecfda488444b0ccff79afcc5690f0240ce312ed17da9e2429d009b37bb | Engil/Toolboy | timers.ml | open Machine
let get_mode m =
if Uint8.proj m.timers.tac land 4 != 0 then
match Uint8.proj m.timers.tac land 3 with
| 0 -> Some 64
| 1 -> Some 1
| 2 -> Some 4
| 3 -> Some 16
| _ -> None
else
None
let tick m m_cycles =
m.timers.sub <- m.timers.sub + m_cycles;
if m.timers.sub >= ... | null | https://raw.githubusercontent.com/Engil/Toolboy/04fcda69a8b1c79a68fe316a1e85d70c93238a0c/lesserboy/timers.ml | ocaml | open Machine
let get_mode m =
if Uint8.proj m.timers.tac land 4 != 0 then
match Uint8.proj m.timers.tac land 3 with
| 0 -> Some 64
| 1 -> Some 1
| 2 -> Some 4
| 3 -> Some 16
| _ -> None
else
None
let tick m m_cycles =
m.timers.sub <- m.timers.sub + m_cycles;
if m.timers.sub >= ... | |
42fd94a2df1e33b6b98eaa9a0320c8f2fc03ab47a5320124eb2948780014692a | mkurtak/clj-salt-api | api_test.clj | Copyright ( c )
;; All rights reserved.
(ns salt.api-test
(:require [clojure.test :refer [deftest is testing]]
[salt.api :as api]
[salt.core :as s]
[salt.test-utils :as u]))
(deftest login-test
(testing "login-request custom params"
(is (u/submap? {:url "-master/login"
... | null | https://raw.githubusercontent.com/mkurtak/clj-salt-api/6c6889640c1dc8717f4268202d05d330f6a6d162/test/src/salt/api_test.clj | clojure | All rights reserved. | Copyright ( c )
(ns salt.api-test
(:require [clojure.test :refer [deftest is testing]]
[salt.api :as api]
[salt.core :as s]
[salt.test-utils :as u]))
(deftest login-test
(testing "login-request custom params"
(is (u/submap? {:url "-master/login"
:meth... |
222ea8bbdadccf5c48f0b60649a9c0ae767e657dde6db6c452b5d4f4a8221b46 | rems-project/lem | pattern_syntax.mli | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/pattern_syntax.mli | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
0ef31e067487d9d39c162b7a1c9375dcb7dc3bec981824259da6e6789020cc8e | iskandr/parakeet-retired | BaseCommon.ml | (* pp: -parser o pa_macro.cmo *)
include Std
let ($) f x = f x
let (>>=) x f = f x
let ignore x = ()
let compose f g = fun x -> f (g x)
let id x = x
let debug msg =
IFDEF DEBUG THEN Printf.printf "%s\n" msg; END;
()
exception SourcedError of string * SrcInfo.t
exception StaticError of string
(*
returns a ... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Base/BaseCommon.ml | ocaml | pp: -parser o pa_macro.cmo
returns a function unit -> int, which increments its internal counter
after every call
|
include Std
let ($) f x = f x
let (>>=) x f = f x
let ignore x = ()
let compose f g = fun x -> f (g x)
let id x = x
let debug msg =
IFDEF DEBUG THEN Printf.printf "%s\n" msg; END;
()
exception SourcedError of string * SrcInfo.t
exception StaticError of string
let mk_gen () =
let curr = ref 0 in
fun ()... |
4c7f462c599ee269275a769c6478c5b2813c3512af2d8fb6f08b2ebcac3a89c8 | hbrouwer/pdrt-sandbox | Input.hs | |
Module : Data . PDRS.Input
Copyright : ( c ) and
License : Apache-2.0
Maintainer : ,
Stability : provisional
Portability : portable
PDRS input
Module : Data.PDRS.Input
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.0
Mainta... | null | https://raw.githubusercontent.com/hbrouwer/pdrt-sandbox/4937424013b6a11bac4cd5444d3e173420fab98a/src/Data/PDRS/Input.hs | haskell | |
Module : Data . PDRS.Input
Copyright : ( c ) and
License : Apache-2.0
Maintainer : ,
Stability : provisional
Portability : portable
PDRS input
Module : Data.PDRS.Input
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.0
Mainta... | |
72f7c334e4145077b72846e4c2adc9738b4fd6b5a97b50ab87ed0a8199d39c7a | haskell-tls/hs-tls | Struct.hs | {-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- |
Module : Network . TLS.Struct
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
the Struct module contains all definitions and values of the TLS protocol
--
module Network.TLS.Struc... | null | https://raw.githubusercontent.com/haskell-tls/hs-tls/c2fc6f308bb7144d99dfe8b5431144ab5bd49ceb/core/Network/TLS/Struct.hs | haskell | # OPTIONS_HADDOCK hide #
# LANGUAGE DeriveDataTypeable #
|
License : BSD-style
Stability : experimental
Portability : unknown
currently supported by the library. Nor should they be, they're are either
unwise, obsolete or both. There's no point in conveying these to the user
in the client certificate re... | Module : Network . TLS.Struct
Maintainer : < >
the Struct module contains all definitions and values of the TLS protocol
module Network.TLS.Struct
( Version(..)
, ConnectionEnd(..)
, CipherType(..)
, CipherData(..)
, ExtensionID
, ExtensionRaw(..)
, CertificateType(..)
,... |
7b77d0f3ff6d1281328edbb833106a7c914ec738a0294b98f825a6cf2cc63d3f | shirok/Gauche | md5.scm | ;;;
;;; md5 - MD5 message-digest
;;;
Copyright ( c ) 2002 - 2003 , All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the ... | null | https://raw.githubusercontent.com/shirok/Gauche/c02924d134bf2cf6ceb09e38bcd137d016a9826f/ext/digest/md5.scm | scheme |
md5 - MD5 message-digest
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 of conditions and the following disclaimer.
... | Copyright ( c ) 2002 - 2003 , All rights reserved .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module rfc.md5
(ex... |
a459b0c13e4865cb25820514bbaebab66d586a94686170b29ca9e5106547bf1c | gsakkas/rite | 0122.ml | CaseG VarG [(ConsPatG EmptyPatG EmptyPatG,Nothing,VarG)]
match x with
| x' :: xs -> x'
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0122.ml | ocaml | CaseG VarG [(ConsPatG EmptyPatG EmptyPatG,Nothing,VarG)]
match x with
| x' :: xs -> x'
| |
34aacac5fdee935f5ce680a213e009f1d9e5d11f14a90132708a48501e3b4657 | chikeabuah/recess | info.rkt | #lang info
(define collection "recess")
(define deps '("base" "draw-lib" "graph" "gui-lib" "htdp-lib" "lux" "mode-lambda" "pict-lib" "raart" "struct-define"))
(define build-deps '("scribble-lib" "racket-doc"))
(define pkg-desc "TBA")
(define version "0.1")
(define pkg-authors '(chike))
(define compile-omit-paths '("exa... | null | https://raw.githubusercontent.com/chikeabuah/recess/d88e8474086dfdaf5af4ea6d12c4665f71dd78cc/info.rkt | racket | #lang info
(define collection "recess")
(define deps '("base" "draw-lib" "graph" "gui-lib" "htdp-lib" "lux" "mode-lambda" "pict-lib" "raart" "struct-define"))
(define build-deps '("scribble-lib" "racket-doc"))
(define pkg-desc "TBA")
(define version "0.1")
(define pkg-authors '(chike))
(define compile-omit-paths '("exa... | |
4148e0149a4ca7ec59c1f92fd288a6133829485a392b5199982965287550df94 | igrep/typesafe-precure | Profiles.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
{-# LANGUAGE OverloadedStrings #-}
module ACME.PreCure.Textbook.StarTwinkle.Profiles where
import Data.String (IsString)
import ACME.PreCure.Index.Types
girls :: [Girl]
girls =
[ mkGirl "Hikaru Hoshina" "星奈 ひかる"
, mkGirl "Lala H... | null | https://raw.githubusercontent.com/igrep/typesafe-precure/fc94f5f2c0ca8d8acc0b8eabe890a85bc305d7b3/src/ACME/PreCure/Textbook/StarTwinkle/Profiles.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -fno - warn - missing - signatures #
module ACME.PreCure.Textbook.StarTwinkle.Profiles where
import Data.String (IsString)
import ACME.PreCure.Index.Types
girls :: [Girl]
girls =
[ mkGirl "Hikaru Hoshina" "星奈 ひかる"
, mkGirl "Lala Hagoromo" "羽衣 ララ"
, mkGirl "Elena... |
83127ebf04317cb7ecb9632304ccf93a18c29e14f1a33bab0929603124c062f4 | xvw/quasar | util.mli | (** Useful generic functions *)
* { 2 Tools to work with functions }
(** Identity function, [id x] returns [x]. *)
val id : 'a -> 'a
* Reverse the order of arguments for 2 - arity function .
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
* Produce a function that returns its first argument .
[ const a b ] retu... | null | https://raw.githubusercontent.com/xvw/quasar/a414d32ded53562802893590e2996bb8daeb0cf3/src/js/util.mli | ocaml | * Useful generic functions
* Identity function, [id x] returns [x].
* [f $ x] is equal to [f x] with low-pred |
* { 2 Tools to work with functions }
val id : 'a -> 'a
* Reverse the order of arguments for 2 - arity function .
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
* Produce a function that returns its first argument .
[ const a b ] returns always [ a ] .
[const a b] returns always [a].
*)
val const : 'a -... |
49d255e4e070e31a9188011f18659be056a2f5a9495e9016992c9deb8900196f | kawu/dawg | Dynamic.hs | # LANGUAGE RecordWildCards #
| The module implements /directed acyclic word graphs/ ( DAWGs ) internaly
-- represented as /minimal acyclic deterministic finite-state automata/.
-- The implementation provides fast insert and delete operations
which can be used to build the structure .
module Data.DAWG.Dynamic
... | null | https://raw.githubusercontent.com/kawu/dawg/1bb3d139aece1610eab255949951e21cb07648ff/src/Data/DAWG/Dynamic.hs | haskell | represented as /minimal acyclic deterministic finite-state automata/.
The implementation provides fast insert and delete operations
* Query
* Construction
** Insertion
** Deletion
* Conversion
| Return node with the given identifier.
Evaluate the 'G.insert' function within the monad.
| Leaf node with no child... | # LANGUAGE RecordWildCards #
| The module implements /directed acyclic word graphs/ ( DAWGs ) internaly
which can be used to build the structure .
module Data.DAWG.Dynamic
(
* type
DAWG
, lookup
, numStates
, numEdges
, empty
, fromList
, fromListWith
, fromLang
, insert
, insertWith
, delete
, assocs... |
0aa25fb97f60289a4e251c2b2a5f36896d71fdbf3bff5e77442bf3e7eb9c544a | OCamlPro/ocplib-json-typed | json_repr.mli | (************************************************************************)
(* ocplib-json-typed *)
(* *)
(* Copyright 2014 OCamlPro *)
(* ... | null | https://raw.githubusercontent.com/OCamlPro/ocplib-json-typed/0d9e9cde74c7c50aa6d053990b46f5930c80de54/src/json_repr.mli | ocaml | **********************************************************************
ocplib-json-typed
Copyright 2014 OCamlPro
... | Public License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version ,
* { 2 Abstraction over JSON representations }
type 'a view =
[ `O of (string * 'a) list
| `A of 'a list
| `Bool of bool
| `Float of float
| `String of string
... |
380a8ec60eec88aeb9264119d78b811862e00f3e894f2850faec04c418f8f5b5 | mneise/org-ui | core.cljs | (ns org-ui.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [om.core :as om :include-macros true]
[chord.client :refer [ws-ch]]
[cljs.core.async :refer [<! >! put! close! chan]]
[sablono.core :as html :refer-macros [html]]
[cljs-uuid-utils... | null | https://raw.githubusercontent.com/mneise/org-ui/0e1e82c4c628297e4fcf285e3e7e53e9f72ce10c/src/cljs/org_ui/core.cljs | clojure |
WebSocket
Handler
Views | (ns org-ui.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [om.core :as om :include-macros true]
[chord.client :refer [ws-ch]]
[cljs.core.async :refer [<! >! put! close! chan]]
[sablono.core :as html :refer-macros [html]]
[cljs-uuid-utils... |
24fab696a16b36eb3b6de26b5a51f78cb899b171fe21a18ea37493bc9b729cbb | wooga/ebloomd | ebloomd_app.erl | @license The FreeBSD License
2012 Wooga GmbH
-module (ebloomd_app).
-compile ([export_all]).
-behaviour (application).
-export ([start/2, stop/1]).
% Callback starting the backend.
start(_StartType, _StartArgs) ->
% Start ranch as well.
ebloomd_sup:start_link().
% Just `ok`.
stop(_State) -> ok.
| null | https://raw.githubusercontent.com/wooga/ebloomd/ca24885bdbab9e6f01221b1f26b6b8064149206a/src/ebloomd_app.erl | erlang | Callback starting the backend.
Start ranch as well.
Just `ok`. | @license The FreeBSD License
2012 Wooga GmbH
-module (ebloomd_app).
-compile ([export_all]).
-behaviour (application).
-export ([start/2, stop/1]).
start(_StartType, _StartArgs) ->
ebloomd_sup:start_link().
stop(_State) -> ok.
|
734fd140e4bc94727dfcc889d8dd6b047f3749c7d5805ba6c36d9c015d64f3c7 | pflanze/chj-schemelib | oo-lib-s8vector.scm | Copyright 2014 - 2018 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require oo-... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/oo-lib-s8vector.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version. | Copyright 2014 - 2018 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require oo-vector-lib)
(include "cj-standarddeclares.scm")
(def-oo-vector-lib-for s8vector)
|
3320cf72138bbd96a6acecd6af3fbf1d1b321978832003e18e0593ae4c21286f | zoomhub/zoomhub | TileOverlap.hs | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module ZoomHub.Types.DeepZoomImage.TileOverlap
( TileOverlap (..),
fromString,
fromInteger,
)
where
import Data.Aeson (FromJSON (parseJSON), ToJSON, Value (Number), toJ... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/src/ZoomHub/Types/DeepZoomImage/TileOverlap.hs | haskell | Show
JSON
PostgreSQL / Squeal
TODO: What if database value is not a valid? | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module ZoomHub.Types.DeepZoomImage.TileOverlap
( TileOverlap (..),
fromString,
fromInteger,
)
where
import Data.Aeson (FromJSON (parseJSON), ToJSON, Value (Number), toJ... |
1b0caeedcdd58aa911d957574513a36264dc6dff863665565a2beca8750e4ebe | agda/agda | Either.hs |
module Internal.Utils.Either ( tests ) where
import Agda.Utils.Either
import Internal.Helpers
------------------------------------------------------------------------------
prop_allRight :: Eq b => [Either t b] -> Bool
prop_allRight xs =
allRight xs ==
if all isRight xs then
Just $ map (\ (Right x) -> ... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/Utils/Either.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------
* All tests
---------------------------------------------------------------------- |
module Internal.Utils.Either ( tests ) where
import Agda.Utils.Either
import Internal.Helpers
prop_allRight :: Eq b => [Either t b] -> Bool
prop_allRight xs =
allRight xs ==
if all isRight xs then
Just $ map (\ (Right x) -> x) xs
else
Nothing
( ASR 2018 - 01 - 06 ) Since the property has... |
d949d46d92f45fba3c0ee20a0b17a6db23937db56b0b1c86e105b2ad02f2ed45 | 8c6794b6/guile-tjit | x-paraffins.scm | ;;; paraffins from racket benchmarks.
;;; PARAFFINS -- Compute how many paraffins exist with N carbon atoms.
(define (gen n)
(let* ((n/2 (quotient n 2))
(radicals (make-vector (+ n/2 1) '(H))))
(define (rads-of-size n)
(let loop1 ((ps
(three-partitions (- n 1)))
... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/x-paraffins.scm | scheme | paraffins from racket benchmarks.
PARAFFINS -- Compute how many paraffins exist with N carbon atoms. |
(define (gen n)
(let* ((n/2 (quotient n 2))
(radicals (make-vector (+ n/2 1) '(H))))
(define (rads-of-size n)
(let loop1 ((ps
(three-partitions (- n 1)))
(lst
'()))
(if (null? ps)
lst
(let* ((p (car ps))
... |
fd98dd1f486e192a533a53e697c9698ecc86702cc443ce289cefb46d1e51b883 | diagrams/diagrams-lib | Align.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
Module : Diagrams . TwoD.Align
Copyright : ( c ) 2011 diagrams - lib team ( see LICENSE )
-- License : BSD-style (see LI... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/TwoD/Align.hs | haskell | # LANGUAGE ConstraintKinds #
---------------------------------------------------------------------------
|
License : BSD-style (see LICENSE)
Maintainer :
The basic idea is that alignment is achieved by moving diagrams'
local origins relative to their envelopes or traces (or some other
sort of boundary).... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
Module : Diagrams . TwoD.Align
Copyright : ( c ) 2011 diagrams - lib team ( see LICENSE )
Alignment combinators specialized for two dimensions . See
" Diagrams . Align " for more general alignment combinators .
their tops , we first ... |
2ac83ef355604213d5eec03157dc6f6e8a13b98de96a433df8d42b33234eed9f | dyzsr/ocaml-selectml | pr7851.ml | (* TEST
* expect
*)
Leo 's version
module F(X : sig type t end) = struct
type x = X.t
type y = X.t
type t = E of x
type u = t = E of y
end;;
module M = F(struct type t end);;
module type S = module type of M;;
[%%expect{|
module F :
functor (X : sig type t end) ->
sig type x = X.t type y = X.t typ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules/pr7851.ml | ocaml | TEST
* expect
Also check the original version |
Leo 's version
module F(X : sig type t end) = struct
type x = X.t
type y = X.t
type t = E of x
type u = t = E of y
end;;
module M = F(struct type t end);;
module type S = module type of M;;
[%%expect{|
module F :
functor (X : sig type t end) ->
sig type x = X.t type y = X.t type t = E of x type u = t... |
3a24ab46a53989ad9a5ff50a325b2849854b372a93a85f8f6ecd6adce5362fa2 | 2600hz/kazoo | kzd_webhooks.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_webhooks.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzd_webhooks).
-export([new/0]).
-export([custom_data/1, custom_data/2, set_custom_data/2]).
-export([ena... |
a67804794235dddf938fa77d2709f034be69879923084e1b5ecdd612d145c40b | herd/herdtools7 | arch_litmus.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/6d781eb91debffdf56998171862a18e40908c3c5/litmus/arch_litmus.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
63cc4d4924af7e5c1c4ac8103723d93bdee8ad11b89f1d12132c4d3bfa9665f5 | cicakhq/potato | slashcommand.lisp | (in-package :potato.slashcommand)
(declaim #.potato.common::*compile-decl*)
(defun validate-command-name (cmd)
(unless (stringp cmd)
(potato.core:raise-web-parameter-error "Command must be a string: ~s" cmd))
(unless (cl-ppcre:scan "^[a-zA-Z0-9]+$" cmd)
(potato.core:raise-web-parameter-error "Illegal comm... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/slashcommand.lisp | lisp | the session that issues the command.
ELSE: All headers set, forward the message to the client
Default slashcommand processor
| (in-package :potato.slashcommand)
(declaim #.potato.common::*compile-decl*)
(defun validate-command-name (cmd)
(unless (stringp cmd)
(potato.core:raise-web-parameter-error "Command must be a string: ~s" cmd))
(unless (cl-ppcre:scan "^[a-zA-Z0-9]+$" cmd)
(potato.core:raise-web-parameter-error "Illegal comm... |
9fc21b3d9504d3e4b25f7c1ab2e9fea6e560805a70fe91e5f8b8054d95709f4d | b0-system/brzo | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let copy src dst =
Log.info (fun m -> m "cp %S %S" src dst);
OS.File.read src >>= fun content ->
let content = strf "# 1 %S\n%s" src content in
OS.File.write dst content
let ocaml_conditional c =
let maj, min, _, _ = Conf.OCaml.version (Conf.OC... | null | https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let copy src dst =
Log.info (fun m -> m "cp %S %S" src dst);
OS.File.read src >>= fun content ->
let content = strf "# 1 %S\n%s" src content in
OS.File.write dst content
let ocaml_conditional c =
let maj, min, _, _ = Conf.OCaml.version (Conf.OC... | |
63a23b83be66a087639ef0b04aaf1b619beb997ac930899aa4929f4c34caceb9 | facebook/infer | IssuesTest.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/2d5280c64fff3da21cd40cfa04409d7a7eab45c1/infer/src/integration/IssuesTest.ml | 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
... | |
71442b6b1df81244d0b26d44358c36fd88022ec432145964d0df4d49312c1b54 | lambdabot/lambdabot | Djinn.hs | # LANGUAGE PatternGuards #
# LANGUAGE FlexibleContexts #
Copyright ( c ) 2005
GPL version 2 or later ( see )
Written : Mon Dec 12 10:16:56 EST 2005
| A binding to Djinn .
module Lambdabot.Plugin.Haskell.Djinn (djinnPlugin) where
import Lambdabot.Config.Haskell
import Lambdabot.Logging
import Lambdabot.... | null | https://raw.githubusercontent.com/lambdabot/lambdabot/de01f362c7a8fc6f85c37e604168dcccb1283a0e/lambdabot-haskell-plugins/src/Lambdabot/Plugin/Haskell/Djinn.hs | haskell | | We can accumulate an interesting environment
prelude
gratuitous invocation at startup to let the user know if the command is missing
get the prelude
TODO: don't swallow errors here
!
check the args, reject them if they start with a colon (ignoring whitespace)
Normal commands
Augment environment. Have it chec... | # LANGUAGE PatternGuards #
# LANGUAGE FlexibleContexts #
Copyright ( c ) 2005
GPL version 2 or later ( see )
Written : Mon Dec 12 10:16:56 EST 2005
| A binding to Djinn .
module Lambdabot.Plugin.Haskell.Djinn (djinnPlugin) where
import Lambdabot.Config.Haskell
import Lambdabot.Logging
import Lambdabot.... |
29451c5bd0c8936440d206e212bd2e096cfbc164fc9115dfce197aae851e9801 | markmandel/brute-play-pong | desktop_launcher.clj | (ns brute-play-pong.core.desktop-launcher
(:use brute-play-pong.core)
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
[org.lwjgl.input Keyboard])
(:gen-class))
(defn run-game
"Run the game and return the LWJGL instance"
[]
(Keyboard/enableR... | null | https://raw.githubusercontent.com/markmandel/brute-play-pong/f10c7939e867f913cb35e4155768975fa0f93060/desktop/src/brute_play_pong/core/desktop_launcher.clj | clojure | (ns brute-play-pong.core.desktop-launcher
(:use brute-play-pong.core)
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
[org.lwjgl.input Keyboard])
(:gen-class))
(defn run-game
"Run the game and return the LWJGL instance"
[]
(Keyboard/enableR... | |
530926375f31ad2a8f1eebad68920d971d143f6b8ed639f35d4017879cc49794 | freizl/har | Browser.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module HAR.Browser where
import Data.Aeson.TH
import Data.Text (Text)
data Browser = Browser { name :: Text
, version :: Text
, comment :: Maybe Text
} de... | null | https://raw.githubusercontent.com/freizl/har/a913690972ac27666d31427e7c607ad088c289f0/src/HAR/Browser.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module HAR.Browser where
import Data.Aeson.TH
import Data.Text (Text)
data Browser = Browser { name :: Text
, version :: Text
, comment :: Maybe Text
} deriving (Show)
$(deriveJSON default... |
0302534ff6e3ed13222d54588f0aca40a370566c855d6990b5d535ad58c51d63 | scrintal/heroicons-reagent | lock_closed.cljs | (ns com.scrintal.heroicons.solid.lock-closed)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 00... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/lock_closed.cljs | clojure | (ns com.scrintal.heroicons.solid.lock-closed)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 00... | |
8858903b549c16015a3096d5db28668d1cc7f6f7679a92bcc379536eb5e83a23 | naveensundarg/prover | sorts.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: sorts.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Software distri... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/sorts.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: sorts.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific langua... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
7c356cb8b2c7d2f8c37eae344e23a7eed180a551cbb08eb0d450b0a871ad3dd6 | wireapp/wire-server | UserSpec.hs | module Test.Spar.Scim.UserSpec where
import Arbitrary ()
import Brig.Types.Intra
import Brig.Types.User
import Control.Monad.Except (runExceptT)
import Data.Handle (parseHandle)
import Data.Id
import Imports
import Polysemy
import Polysemy.TinyLog
import Spar.Scim.User (deleteScimUser)
import Spar.Sem.BrigAccess
impor... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/spar/test/Test/Spar/Scim/UserSpec.hs | haskell | module Test.Spar.Scim.UserSpec where
import Arbitrary ()
import Brig.Types.Intra
import Brig.Types.User
import Control.Monad.Except (runExceptT)
import Data.Handle (parseHandle)
import Data.Id
import Imports
import Polysemy
import Polysemy.TinyLog
import Spar.Scim.User (deleteScimUser)
import Spar.Sem.BrigAccess
impor... | |
04e2d2b835319f86203092b9fce3c05de18467020eafb0b8e91bc9748869b5d2 | stevenvar/OMicroB | display-soluce.ml | open Avr
let cs = PIN12
let dc = PIN4
let rst = PIN6
let button_smile = PIN7
let button_frown = PIN8
type emotion = Smile | Frown | Nothing
let smile () =
Oled.draw 39 24 true;
Oled.draw 38 23 true;
Oled.draw 37 22 true;
Oled.draw 61 24 true;
Oled.draw 62 23 true;
Oled.draw 63 22 true
let fr... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/ddfbe47c478e6042f6f78397d48ba6dc545c1d37/tests/tuto_3_serialdisplay/display-soluce.ml | ocaml | open Avr
let cs = PIN12
let dc = PIN4
let rst = PIN6
let button_smile = PIN7
let button_frown = PIN8
type emotion = Smile | Frown | Nothing
let smile () =
Oled.draw 39 24 true;
Oled.draw 38 23 true;
Oled.draw 37 22 true;
Oled.draw 61 24 true;
Oled.draw 62 23 true;
Oled.draw 63 22 true
let fr... | |
3410cace36c29f0aefb9236fb0deea5a02d95cd4813f6c67c8ba2adfdde25d85 | utkarshkukreti/reaml | 7.ml | let[@reaml.component] _foo () = ()
| null | https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/ppx/tests/failing/7.ml | ocaml | let[@reaml.component] _foo () = ()
| |
844a4e574647883969449df83c663459d6a60e1e9dd78d5fd51fffde3a8c0767 | FranklinChen/hugs98-plus-Sep2006 | PolyOff.hs |
PolyOff.hs ( adapted from polyoff.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2006 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates polygon offset to draw a shaded polygon and... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/PolyOff.hs | haskell | sphere with a magenta material with a specular highlight.
specify initial properties
create display list with sphere
initialize lighting and depth buffer
mode, and handle input events.
we have to do this *after* createWindow, otherwise we have no OpenGL context |
PolyOff.hs ( adapted from polyoff.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2006 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates polygon offset to draw a shaded polygon and... |
7c6af1e11287311706d758c52d517e6afc0446f5e81ba025ce7b7fde7cfa2a23 | Metaxal/MrEd-Designer | widgets.rkt | #lang racket/gui
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
;; # ============================================================================== #
;; # widgets.rkt ... | null | https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/widgets.rkt | racket | # ============================================================================== #
# widgets.rkt #
# ============================================================================== #
# ... | #lang racket/gui
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# -Designer #
# Copyright ( C ) , 2010 #... |
9fbdc0d9374442ebb7f9c788bec4a867405fc7bb159bd21436e7ef59fcabd26d | dhilst/brlang | interpreter.ml | open Ast
module StringMap = Map.Make(String)
type env = int StringMap.t
let lookup env k : int = StringMap.find k env
let extend env k v = StringMap.add k v env
let empty : env = StringMap.empty
let rec eval env = function
| Var a -> lookup env a
| Int i -> i
| BinOp (Add, Int a, Int b) -> a + b
| BinOp (Mu... | null | https://raw.githubusercontent.com/dhilst/brlang/5b219fb3731a127fc0dc7ca36bf1fc1f6e4e6b96/lib/interpreter.ml | ocaml | open Ast
module StringMap = Map.Make(String)
type env = int StringMap.t
let lookup env k : int = StringMap.find k env
let extend env k v = StringMap.add k v env
let empty : env = StringMap.empty
let rec eval env = function
| Var a -> lookup env a
| Int i -> i
| BinOp (Add, Int a, Int b) -> a + b
| BinOp (Mu... | |
83be327f9e500c57ed2bcbb21aec26f9361dd4e39a6298375541766ad47d3aba | input-output-hk/cardano-explorer | Error.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Explorer.Node.Error
( ExplorerInvariant (..)
, ExplorerNodeError (..)
, annotateInvariantTx
, bsBase16Encode
, explorerError
, explorerInvariant
, liftLookupFail
, renderExplorerInvariant
, renderExplorerNodeError
) where
imp... | null | https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-explorer-node/src/Explorer/Node/Error.hs | haskell | # LANGUAGE OverloadedStrings #
Lifted from cardano-explorer/src/Explorer/Web/Server/Util.hs
Probably should be in cardano-explorer-db | # LANGUAGE NoImplicitPrelude #
module Explorer.Node.Error
( ExplorerInvariant (..)
, ExplorerNodeError (..)
, annotateInvariantTx
, bsBase16Encode
, explorerError
, explorerInvariant
, liftLookupFail
, renderExplorerInvariant
, renderExplorerNodeError
) where
import qualified Cardano.Chain.UTxO as... |
8dd024b8820b293f2886f23833184c7e2178572b5a6d2f93a3976636f7d8eaa7 | stain/owl2jsonld | app.clj | (ns owl2jsonld.app
(:use owl2jsonld.core)
(:require
[clojure.tools.cli :refer [parse-opts]]
[clojure.java.io :refer [as-file output-stream writer]]
[clojure.string :as string]
[cheshire.core :refer [generate-stream]]
)
(:gen-class))
(def cli-options
[ ; When changing, remember to also up... | null | https://raw.githubusercontent.com/stain/owl2jsonld/eceecba017f4c7256b3f1c77d263c00cc99f6b16/src/owl2jsonld/app.clj | clojure | When changing, remember to also update README.md
["-n" "--no-imports" "Exclude all OWL-imported concepts"]
["-e" "--embed" "Embed ontology definition serialized as JSON-LD"]
Default if none mentioned, both on
Trailing newline
Handle help and error conditions | (ns owl2jsonld.app
(:use owl2jsonld.core)
(:require
[clojure.tools.cli :refer [parse-opts]]
[clojure.java.io :refer [as-file output-stream writer]]
[clojure.string :as string]
[cheshire.core :refer [generate-stream]]
)
(:gen-class))
(def cli-options
["-a" "--all-imports" "Include al... |
5e421ee09f68118cd962201d59a32ba049a6fce5e666630d7b585efae9a00bb3 | glguy/advent2017 | Advent.hs | module Advent where
import System.Environment
import Text.Printf
import Text.Megaparsec (many, parse, parseErrorTextPretty, Parsec, eof, setInput, anySingle)
import Text.Megaparsec.Char (newline)
import Text.Megaparsec.Char.Lexer (decimal, signed)
import Text.Megaparsec.Error (errorBundlePretty)
import Data.Void
impor... | null | https://raw.githubusercontent.com/glguy/advent2017/fed4592b076d255297dbddf2a183c70d6d0acfa4/common/Advent.hs | haskell |
If a filename is provided in the command line that will be used as the
input file.
^ day number
| Run a parser with 'parseLines' on the input file.
| Run a parser on each line of the input file. Each line will be parsed
in isolation. The parser must consume the whole line.
>>> parseLines (Control.Applicativ... | module Advent where
import System.Environment
import Text.Printf
import Text.Megaparsec (many, parse, parseErrorTextPretty, Parsec, eof, setInput, anySingle)
import Text.Megaparsec.Char (newline)
import Text.Megaparsec.Char.Lexer (decimal, signed)
import Text.Megaparsec.Error (errorBundlePretty)
import Data.Void
impor... |
ae173847a6662102eef222a460d29190d234f11794e3c1b9a384045f755ad9fd | Eonblast/Scalaxis | dht_node_join.erl | 2007 - 2011 Zuse Institute Berlin
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
d... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/dht_node_join.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(dht_node_join).
-author('').
-vsn('$Id$').
-define(TRACE(X,Y), ok).
-define(TRACE_SEND(Pid, Msg), ?TRACE("[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.