_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 |
|---|---|---|---|---|---|---|---|---|
ffe66b4476593327ea4ea226c80fdbdfb28b47a3b493d7ef095916eba870b56a | futurice/haskell-mega-repo | Library.hs | # LANGUAGE DataKinds #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Futurice.App.Library.Types.Library where
import Data.Aeson
import Data.Aeson.Types (toJSONK... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/library-app/src/Futurice/App/Library/Types/Library.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators # | # LANGUAGE DataKinds #
# LANGUAGE InstanceSigs #
# LANGUAGE TemplateHaskell #
module Futurice.App.Library.Types.Library where
import Data.Aeson
import Data.Aeson.Types (toJSONKeyText)
import Data.Swagger
import Database.PostgreSQL.Simple.FromField
import Database.PostgreSQL.Simple... |
09450a678662a2551c4e54026e1cf4a39cf84b6fbd487118f6a66f5ce4b24b17 | uwplse/synapse | superopt-test.rkt | #lang s-exp rosette
(require
"../opsyn/metasketches/imetasketch.rkt" "../opsyn/metasketches/superoptimization.rkt"
"../opsyn/metasketches/cost.rkt"
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt"
"util.rkt"
rackunit "test-runner.rkt")
(curren... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/test/superopt-test.rkt | racket | Tests the correctness of M0. | #lang s-exp rosette
(require
"../opsyn/metasketches/imetasketch.rkt" "../opsyn/metasketches/superoptimization.rkt"
"../opsyn/metasketches/cost.rkt"
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt"
"util.rkt"
rackunit "test-runner.rkt")
(curren... |
484b3396272e091bd6371e3555a3a62ddfa00dcc2cd6c3c64766a9cac82dcafa | gilbertw1/clipbot | weather.clj | (ns clipbot.plugins.weather
(:require [clipbot.plugin :as plugin]
[clj-http.client :as http]))
(def fing-weather-url "/")
(defn match [s rx]
(->> s (re-seq rx) first second))
(defn get-weather [place]
(let [html (-> fing-weather-url (http/get {:query-params {:where place} :headers {:User-Agent "Moz... | null | https://raw.githubusercontent.com/gilbertw1/clipbot/ef9516ceee58e860493f1f9cb6cb0bc2169c3d7c/resources/plugins/weather.clj | clojure | (ns clipbot.plugins.weather
(:require [clipbot.plugin :as plugin]
[clj-http.client :as http]))
(def fing-weather-url "/")
(defn match [s rx]
(->> s (re-seq rx) first second))
(defn get-weather [place]
(let [html (-> fing-weather-url (http/get {:query-params {:where place} :headers {:User-Agent "Moz... | |
1a330428f70179a4ff761be13ad503cf135ec20c09cdd99996b3ac826d53eaaa | Chaddai/CurveProject | CurveGenerator.hs | # LANGUAGE TemplateHaskell , ViewPatterns , FlexibleInstances #
module Math.CurveGenerator
(CurveInput(..)
, CurveOptions(..)
, GridOptions(..)
, AxisOptions(..)
, TangentsOptions(..)
, CGConfig(..)
, PointInfo(..)
, Curve(..)
, saveConfig
, loadConf... | null | https://raw.githubusercontent.com/Chaddai/CurveProject/f1b22f29ce7939123469ded14ef68756f93ad714/high-school-plotting/src/Math/CurveGenerator.hs | haskell | All major input types and the configuration that holds them all
| CurveFunction { func :: String, wantTangents :: [Double] }
Allowed curveStyle : solid, dashed, dotted | # LANGUAGE TemplateHaskell , ViewPatterns , FlexibleInstances #
module Math.CurveGenerator
(CurveInput(..)
, CurveOptions(..)
, GridOptions(..)
, AxisOptions(..)
, TangentsOptions(..)
, CGConfig(..)
, PointInfo(..)
, Curve(..)
, saveConfig
, loadConf... |
6117a49f9ca19c91bf95f2191c9ed472a5c4f47152f8901f6095e3ba5bd2680f | aveltras/sessionula | Map.hs | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Sessionula.Backend.Map where
import Data.IORef (IORef, atomicModifyIORef', newIORef,
readIORef)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import qualified Data.Set ... | null | https://raw.githubusercontent.com/aveltras/sessionula/9b25861f93f2c673d56447eb4292eb4ca1677d53/sessionula/src/Sessionula/Backend/Map.hs | haskell | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Sessionula.Backend.Map where
import Data.IORef (IORef, atomicModifyIORef', newIORef,
readIORef)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import qualified Data.Set ... | |
7f2b473097e0c2a4498d22d30741a3308a5829bab7835438b06e9176ae2af6fe | fccm/glMLite | quaternions.ml | (** Quaternions *)
(* OpenGL:Tutorials:Using Quaternions to represent rotation *)
(* from: :Tutorials:Using_Quaternions_to_represent_rotation *)
Content is available under GNU Free Documentation License 1.2
(* *)
History log of the document , and authors :
26 - 05 - 2006 11:39 Tannin ( Initial post )
26 - 05 -... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/toolbox/quaternions/quaternions.ml | ocaml | * Quaternions
OpenGL:Tutorials:Using Quaternions to represent rotation
from: :Tutorials:Using_Quaternions_to_represent_rotation
there are only float calculations in this module
Don't normalize if we don't have to
We need to get the inverse of a quaternion to properly apply a
quaternion-rotation to a vec... | Content is available under GNU Free Documentation License 1.2
History log of the document , and authors :
26 - 05 - 2006 11:39 Tannin ( Initial post )
26 - 05 - 2006 ( typo )
25 - 07 - 2006 19:05 ( Just what is a quaternion ? )
25 - 07 - 2006 19:06 81.174.37.6 ( Just what is a quaternion ? )
30 - 07 - ... |
d7bb098f3a0381e908dacd7927fed6233536b8b4b015a8345fe9e56cdbf5b8eb | 1Jajen1/Brokkr | Vector.hs | # LANGUAGE FunctionalDependencies #
module Util.Linear.Vector (
VectorSpace(..)
, (|-|)
) where
class VectorSpace k v | v -> k where
(|+|) :: v -> v -> v
(|*|) :: k -> v -> v
(|-|) :: (Num k, VectorSpace k v) => v -> v -> v
(|-|) l r = l |+| ((-1) |*| r)
| null | https://raw.githubusercontent.com/1Jajen1/Brokkr/5c128a47c7123e576b4e415048d58c2ab3f4a0aa/src/Util/Linear/Vector.hs | haskell | # LANGUAGE FunctionalDependencies #
module Util.Linear.Vector (
VectorSpace(..)
, (|-|)
) where
class VectorSpace k v | v -> k where
(|+|) :: v -> v -> v
(|*|) :: k -> v -> v
(|-|) :: (Num k, VectorSpace k v) => v -> v -> v
(|-|) l r = l |+| ((-1) |*| r)
| |
c78bf89d57bb656ae0de101c72206418febf45fd2aeeed49003d0e274169ad74 | russell/cl-git | buffer.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*-
;; cl-git is a Common Lisp interface to git repositories.
Copyright ( C ) 2011 - 2022 < >
;;
;; 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 ... | null | https://raw.githubusercontent.com/russell/cl-git/db84343e6b756b26fc64877583b41e887bd74602/src/buffer.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 -*-
cl-git is a Common Lisp interface to git repositories.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;... |
Copyright ( C ) 2011 - 2022 < >
as published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
(in-package #:cl-git)
(define-foreign-type buffer (git-pointer)
nil
(:actual-type ... |
6a7c6cb9426c07c5c68a7915f1562fa00fba80d1fd43118c9d053fdd659fcdaf | clash-lang/clash-compiler | KnownCase.hs | # OPTIONS_GHC -Wno - overlapping - patterns #
{-# LANGUAGE OverloadedStrings #-}
-- Case alternatives should be selected by the partial evalautor when they
-- can be statically determined. This means we need to show that each type of
-- pattern can be correctly identified (Data, Literal, Default). In these tests
-- we... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/PartialEvaluation/KnownCase.hs | haskell | # LANGUAGE OverloadedStrings #
Case alternatives should be selected by the partial evalautor when they
can be statically determined. This means we need to show that each type of
pattern can be correctly identified (Data, Literal, Default). In these tests
we give top entities which
* syntactically start with a ca... | # OPTIONS_GHC -Wno - overlapping - patterns #
will is a list of the first 10 Catalan numbers ) .
module KnownCase where
import Control.Monad (unless)
import Clash.Prelude
import Clash.Backend
import Clash.Core.PartialEval
import Clash.Core.Name
import Clash.Core.Subst
import Clash.Core.Term
import Clash.Core.TyCo... |
ad0036c93520a4f9ad0f3ed10afbaf152889cd7d27a09c5901f9f17601a32c51 | haskell/statistics | Kendall.hs | # LANGUAGE BangPatterns , FlexibleContexts #
-- |
-- Module : Statistics.Correlation.Kendall
--
-- Fast O(NlogN) implementation of
< 's tau > .
--
This module implements 's tau form b which allows ties in the data .
This is the same formula used by other statistical packages , e.g. , R , matlab .
--
-- > ... | null | https://raw.githubusercontent.com/haskell/statistics/d018625f33e8b01911674bffdfcf541415cc3455/Statistics/Correlation/Kendall.hs | haskell | |
Module : Statistics.Correlation.Kendall
Fast O(NlogN) implementation of
> \tau = \frac{n_c - n_d}{\sqrt{(n_0 - n_1)(n_0 - n_2)}}
* References
$references
calculate number of tied pairs in a sorted vector
Implementation of Knight's merge sort (adapted from vector-algorithm). This
function is used to ... | # LANGUAGE BangPatterns , FlexibleContexts #
< 's tau > .
This module implements 's tau form b which allows ties in the data .
This is the same formula used by other statistical packages , e.g. , R , matlab .
where n_0 = n(n-1)\/2 , n_1 = number of pairs tied for the first quantify ,
n_2 = number of pairs ... |
6fe5ecfe5238b30c5345fc006c2e83e83c0d59d28c9bf965ac6e17f63c8e0ee2 | lambdacube3d/lambdacube-gl | HelloEmbedded.hs | # LANGUAGE PackageImports , LambdaCase , OverloadedStrings #
import "GLFW-b" Graphics.UI.GLFW as GLFW
import qualified Data.Map as Map
import qualified Data.Vector as V
import LambdaCube.GL as LambdaCubeGL -- renderer
import LambdaCube.GL.Mesh as LambdaCubeGL
import Codec.Picture as Juicy
import LambdaCube.Compiler ... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-gl/bcd2c642d1282646d0022fc0da1d2ccaa7b40ab4/examples/HelloEmbedded.hs | haskell | renderer
compiler
--------------------------------------------------
See: -started
--------------------------------------------------
setup render data
load image and upload texture
check schema compatibility
update graphics input
render
geometry data: triangles | # LANGUAGE PackageImports , LambdaCase , OverloadedStrings #
import "GLFW-b" Graphics.UI.GLFW as GLFW
import qualified Data.Map as Map
import qualified Data.Vector as V
import LambdaCube.GL.Mesh as LambdaCubeGL
import Codec.Picture as Juicy
main :: IO ()
main = do
compile hello.lc to graphics pipeline descriptio... |
298a75025fbf30e3ca04562e6d3e3ab3fbfd50a57673d00ccf89463e4f9f08aa | gldubc/cast-machine | syntax.ml | (** Writing a functor for type/epxressions **)
open Primitives
open Types
open Types.Print
module type Gradual_Type = sig
type var = Types.var
type b = Types.b
type t = Types.t (* static type *)
type tau = Types.t (* dynamic type *)
type subst = Types.subst
val subst_single : t -> var * t -> ... | null | https://raw.githubusercontent.com/gldubc/cast-machine/34d79c324cd0a9aff52865ead19e74126b96daaa/src/syntax.ml | ocaml | * Writing a functor for type/epxressions *
static type
dynamic type
ceil and floor functions
blame labels
| Unit
blame label
| Unit
| TwoCast of e * tau * tau
for now no product, let and type abstraction
| `Prd of e * e
| `Pi1 of e
| `Pi2 of e
| `TMu of al _,pha_vector * e
| `TApp of e * t_v... | open Primitives
open Types
open Types.Print
module type Gradual_Type = sig
type var = Types.var
type b = Types.b
type subst = Types.subst
val subst_single : t -> var * t -> t
val ceil : tau -> t
val floor : tau -> t
val result : tau -> tau -> tau
end
module CDuce_Gradual_Types : Gradual_... |
7f62af2bf0d10af17e144191a2cd393f31981c290a22fb6a0602a978e929b149 | S8A/htdp-exercises | ex451.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-intermediate-lambda-reader.ss" "lang")((modname ex451) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex451.rkt | racket | about the language level of this file in a form that our tools can easily process.
A Table is a structure:
(make-table N [N -> Number])
Table N -> Number
looks up the ith value in array of t
Table -> N
finds the smallest index for a root of the table t
assumes that the table is monotonically increasing
Table... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex451) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct table [length array])
(define table1 (m... |
1e36bf703aad9b8183803a18e9a283a828e780210026f8dc2d126846c3498e40 | Trundle/idris-go | CodegenGo.hs | {-# LANGUAGE OverloadedStrings #-}
module IRTS.CodegenGo (codegenGo) where
import Control.Monad.Trans.State.Strict (State, evalState, gets)
import Data.Char (isAlphaNum, ord)
import Data.Int (Int64)
import qualified Data.Map.Strict ... | null | https://raw.githubusercontent.com/Trundle/idris-go/9510b7b41b7fec03ca8d71f7f6b160e259da829c/src/IRTS/CodegenGo.hs | haskell | # LANGUAGE OverloadedStrings #
This solely exists so the strconv import is used even if the program
doesn't use the LIntStr primitive.
self call, simply goto to the entry again
Not a tail call, but we might call a function that needs to be trampolined
the filtered lines might have made some other lines obsolete, f... |
module IRTS.CodegenGo (codegenGo) where
import Control.Monad.Trans.State.Strict (State, evalState, gets)
import Data.Char (isAlphaNum, ord)
import Data.Int (Int64)
import qualified Data.Map.Strict as M
import Data.... |
18490c62368992ceeff31ff0883f04e683abf1907c5c4e8b8e87d68f047e799d | chrix75/clj-javafx | project.clj | (defproject clj-javafx "0.1.0-SNAPSHOT"
:description "A Clojure wrapper for JavaFX 2.x"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[local.oracle/javafxrt "2.2.3"]]
:aot [clj-javafx.application clj-javafx.componen... | null | https://raw.githubusercontent.com/chrix75/clj-javafx/8d7e9f7ac1c06caa5b8e2ce43b568e7b5581a896/project.clj | clojure | (defproject clj-javafx "0.1.0-SNAPSHOT"
:description "A Clojure wrapper for JavaFX 2.x"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[local.oracle/javafxrt "2.2.3"]]
:aot [clj-javafx.application clj-javafx.componen... | |
adbb52bbf7c6d38cca6fc8c7d3558b5f6c012ff9c7862187263cabf00017bafa | facebook/pyre-check | dependencyGraphTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/536e4a2c008726d0ce5589eaef681166923b6183/source/interprocedural/test/dependencyGraphTest.ml | ocaml | Ensure that we don't include UnrelatedToC.foo here.
If we didn't weaken literals, the call would be a method("str.format") instead of override
here.
Basic case.
Transitive case.
Basic override.
Transitive overrides.
Strongly connected components are handled fine. |
* 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... |
0df4022e5a80bdc6b7889ed6ee1a1a11a01b186a58c55e3fdbd1fb1a07ca8f0c | DanielG/cabal-helper | Parsec.hs | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2018 < >
--
SPDX - License - Identifier : Apache-2.0
--
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... | null | https://raw.githubusercontent.com/DanielG/cabal-helper/0e9df088226d80669dd0882ed743bca871dce61c/src/CabalHelper/Compiletime/Compat/Parsec.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0 | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2018 < >
SPDX - License - Identifier : Apache-2.0
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
# LANGUAGE CPP #
module CabalHelper.Compiletime.Compat.Parsec
( absorbParsecFailure
, eitherPars... |
f20291496da580ee2e7db9a547c2b5256b5d42c4981b97e9a71c6b0613fda2b2 | LightTable/LightTable | navigate.cljs | (ns lt.objs.sidebar.navigate
"Provide sidebar for finding and opening files"
(:require [lt.object :as object]
[lt.objs.workspace :as workspace]
[lt.objs.context :as ctx]
[lt.objs.sidebar.command :as cmd]
[lt.objs.files :as files]
[lt.objs.notifos :as notif... | null | https://raw.githubusercontent.com/LightTable/LightTable/57f861ae5b33d21ef8c7d064dd026a2b1a98fa87/src/lt/objs/sidebar/navigate.cljs | clojure | TODO: this is terribly inefficient | (ns lt.objs.sidebar.navigate
"Provide sidebar for finding and opening files"
(:require [lt.object :as object]
[lt.objs.workspace :as workspace]
[lt.objs.context :as ctx]
[lt.objs.sidebar.command :as cmd]
[lt.objs.files :as files]
[lt.objs.notifos :as notif... |
398945556887d3115fb300b9cf3c2aa17676fc33aee5da958db29c73d008a196 | dvcrn/markright | codemirror.cljs | (ns markright.components.codemirror
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom :include-macros true]
[goog.dom :as gdom]))
(defonce local-state (atom {}))
(defn fill-codemirror [_]
(let [cm (aget (. js/document (getElementsByClassName "CodeMirror")) 0)
cmg (ag... | null | https://raw.githubusercontent.com/dvcrn/markright/531a47524474d5c2945148e33d397d0c70171cb5/src/cljs/markright/components/codemirror.cljs | clojure | Ignore overwriting if force-overwrite is not true
This is because the cursor would jump if we overwrite
the entire thing with every keypress. Not good, no no | (ns markright.components.codemirror
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom :include-macros true]
[goog.dom :as gdom]))
(defonce local-state (atom {}))
(defn fill-codemirror [_]
(let [cm (aget (. js/document (getElementsByClassName "CodeMirror")) 0)
cmg (ag... |
796b6b7effa1f2d5eec3ec594f34c1740010d8291fee548c8e2dd25e4e246f2d | alexandergunnarson/quantum | logic.cljc | (ns
^{:doc "Logic-related functions. fn-not, fn-and, splice-or,
ifn, whenf1, rcomp, fn->, condpc, and the like. Extremely useful
and used everywhere in the quantum library."
:attribution "alexandergunnarson"}
quantum.core.logic
(:refer-clojure :exclude
[= and not or ifs
if-let whe... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/logic.cljc | clojure | TODO: ; cond-not, for :pre
Java String `switch` is implemented using a map8
not 1 0 ; complement
conjunction
stroke
disjunction
's arrow
xor 0 1 1 0
===== Logical operators ===== ;;
===== Function-logical operators ===== ;;
______________________________________________________________________... | (ns
^{:doc "Logic-related functions. fn-not, fn-and, splice-or,
ifn, whenf1, rcomp, fn->, condpc, and the like. Extremely useful
and used everywhere in the quantum library."
:attribution "alexandergunnarson"}
quantum.core.logic
(:refer-clojure :exclude
[= and not or ifs
if-let whe... |
299356617851cb7156b883bb5ae0f4ee8cd022d43e2bbe078287b73cbe9d5b68 | squirrel-prover/squirrel-prover | lowEquivSequent.mli | * Equivalence sequents ,
or more accurately global sequents whose conclusion
is a global meta - formula .
or more accurately global sequents whose conclusion
is a global meta-formula. *)
module SE = SystemExpr
(*------------------------------------------------------------------*)
include LowSequ... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/3cf8b728424cabfb39cf41eba52d53f02a86f358/src/lowEquivSequent.mli | ocaml | ------------------------------------------------------------------
------------------------------------------------------------------
* Initialize a sequent with the given components.
At most one hypothesis can be given, which will be named "H":
this is intended to ease simple cases like observational
equiv... | * Equivalence sequents ,
or more accurately global sequents whose conclusion
is a global meta - formula .
or more accurately global sequents whose conclusion
is a global meta-formula. *)
module SE = SystemExpr
include LowSequent.S with
type hyp_form = Equiv.global_form and
type conc_form = ... |
e7cb3a59715ee63b483ea82ca19f706c554a618be7386eea629586458f136bdc | TrustInSoft/tis-interpreter | rformat.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/rformat.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
e2319baab09ec16d0847ef299a5ec34a2cd1e195bc48577ad4bca589865dadc7 | binsec/binsec | loader_pe.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/loader/loader_pe.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
816a7015fa42058a6b13a177bb224ae583ad373db4ce655f24ecb624b48617bb | 2600hz/kazoo | ecallmgr_originate.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
@author
@author
%%%
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... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/ecallmgr/src/ecallmgr_originate.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
=============================================================================
API
===================================================================... | ( C ) 2012 - 2020 , 2600Hz
@author
@author
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(ecallmgr_originate).
-behaviour(gen_listener).
-export([start_link/2]).
-export([... |
921f991ca2afae7063bf5713c618efd3d4faec5cd5a777e820eba03f4388b0c7 | travelping/ergw | 3gpp_qos.erl | -module('3gpp_qos').
-export([decode/1, encode/1]).
-include("include/3gpp.hrl").
%%====================================================================
%% API
%%====================================================================
decode(<<_:2, DelayClass:3, ReliabilityClass:3,
PeakThroughput:4, _:1, PrecedenceCl... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/3gpp_qos.erl | erlang | ====================================================================
API
====================================================================
===================================================================
===================================================================
pad binary to specific length
-> -qu... | -module('3gpp_qos').
-export([decode/1, encode/1]).
-include("include/3gpp.hrl").
decode(<<_:2, DelayClass:3, ReliabilityClass:3,
PeakThroughput:4, _:1, PrecedenceClass:3,
_:3, MeanThroughput:5,
TrafficClass:3, DeliveryOrder:2, DeliveryOfErroneorousSDU:3,
MaxSDUsize:8,
MaxBitRateUpLink:8,
MaxBitRateDown... |
3f371df43c07c6d8a2c3114b44c3d89b43c861b34a414babfc8d3869cf525517 | erlang/corba | property_SUITE.erl | %%----------------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2000 - 2016 . 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 obtai... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/cosProperty/test/property_SUITE.erl | erlang | ----------------------------------------------------------------------
%CopyrightBegin%
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 A... | Copyright Ericsson AB 2000 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(property_SUITE).
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
-inclu... |
d703cc618292e17a73136625c7241476adc684103532d658ee8eb06c6b1a51f9 | SonarQubeCommunity/sonar-erlang | erlcount_counter2.erl | -module(erlcount_counter2).
-behaviour(gen_server).
-export([start_link/4]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {dispatcher, ref, file, re}).
start_link(DispatcherPid, Ref, FileName, Regex) ->
gen_server:start_link(?MODULE, [Dispatche... | null | https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/sonar-erlang-plugin/src/test/resources/org/sonar/plugins/erlang/erlcount/.eunit/erlcount_counter2.erl | erlang | ============================================
Comment 0
--------------------------------------------
-------------------------------------
======================================
======================================
Comment
---------------------------------------
Comment3 | -module(erlcount_counter2).
-behaviour(gen_server).
-export([start_link/4]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {dispatcher, ref, file, re}).
start_link(DispatcherPid, Ref, FileName, Regex) ->
gen_server:start_link(?MODULE, [Dispatche... |
463dd3810cf0ecd392cd186e684ab659402dc80ac8473966b13e9b8164fe9313 | heraldry/heraldicon | tooltip.cljs | (ns heraldicon.frontend.tooltip
(:require
[heraldicon.frontend.language :refer [tr]]))
(defn- tooltip [message & {:keys [element width class center? style]
:or {element [:i.ui-icon.fas.fa-question-circle]
class "info"}}]
(when message
[:div.tooltip ... | null | https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/frontend/tooltip.cljs | clojure | (ns heraldicon.frontend.tooltip
(:require
[heraldicon.frontend.language :refer [tr]]))
(defn- tooltip [message & {:keys [element width class center? style]
:or {element [:i.ui-icon.fas.fa-question-circle]
class "info"}}]
(when message
[:div.tooltip ... | |
1b3cc49a4b17701afbfc7b2e708e359358be56a854477373466f595bc5320f3c | lambdaisland/glogi | print.cljs | (ns lambdaisland.glogi.print
(:require [lambdaisland.glogi :as glogi]
[goog.object :as gobj]))
;; -tomorrow-scheme/blob/master/tomorrow.yaml
(def colors
{:white "#ffffff"
:gray1 "#e0e0e0"
:gray2 "#d6d6d6"
:gray3 "#8e908c"
:gray4 "#969896"
:gray5 "#4d4d4c"
:gray6 ... | null | https://raw.githubusercontent.com/lambdaisland/glogi/431f535c1683500126254ae79eb3ba8ffe07ab92/src/lambdaisland/glogi/print.cljs | clojure | -tomorrow-scheme/blob/master/tomorrow.yaml
non-standard map implementation | (ns lambdaisland.glogi.print
(:require [lambdaisland.glogi :as glogi]
[goog.object :as gobj]))
(def colors
{:white "#ffffff"
:gray1 "#e0e0e0"
:gray2 "#d6d6d6"
:gray3 "#8e908c"
:gray4 "#969896"
:gray5 "#4d4d4c"
:gray6 "#282a2e"
:black "#1d1f21"
:red ... |
06ec471d51d08a5ad4fa6d5a962ccca3d82971b0f222096f437e899fc9ef1618 | ygrek/mldonkey | syslog.mli | syslog(3 ) routines for ocaml
Copyright ( C ) 2002 < >
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option )... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/lib/syslog.mli | ocaml | * These are loosely based on the unix syslog(3) function and
relatives.
* The priority of the error.
* the type of a syslog connection
* Close the log. @raise Syslog_error on error | syslog(3 ) routines for ocaml
Copyright ( C ) 2002 < >
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option )... |
4df211f5c39bfac95642fc18e1aed57e9b04781a049a323793ea6293a9fbe63b | jlollis/sicp-solutions | 1.03.scm | #lang sicp
Exercise 1.3
(define (square x) (* x x))
(define (sumsquares x y) (+ (square x) (square y)))
(define (sqsumlargest a b c)
(cond
((and (>= a c) (>= b c)) (sumsquares a b))
((and (>= b a) (>= c a)) (sumsquares b c))
((and (>= a b) (>= c b)) (sumsquares a c)))... | null | https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Chapter%201%20Exercises/1.03.scm | scheme | #lang sicp
Exercise 1.3
(define (square x) (* x x))
(define (sumsquares x y) (+ (square x) (square y)))
(define (sqsumlargest a b c)
(cond
((and (>= a c) (>= b c)) (sumsquares a b))
((and (>= b a) (>= c a)) (sumsquares b c))
((and (>= a b) (>= c b)) (sumsquares a c)))... | |
7c8588e0d28d06090d5a75b340d2fa2b36823e52beeefdf3995c07b5aa79072a | symphonyoss/clj-symphony | user_connection.clj | ;
Copyright 2017 Fintech Open Source Foundation
SPDX - License - Identifier : Apache-2.0
;
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 applicab... | null | https://raw.githubusercontent.com/symphonyoss/clj-symphony/6efcb46c931d48ec7abccfd3b891436fb3261d46/src/clj_symphony/user_connection.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 pe... | Copyright 2017 Fintech Open Source Foundation
SPDX - License - Identifier : Apache-2.0
distributed under the License is distributed on an " AS IS " BASIS ,
(ns clj-symphony.user-connection
"Operations related to user connections and requests for those connections.
In Symphony, a user connection is an explici... |
8b707d5619ecc4a5411970e0268d7b700f83e15a9b20dfddbc2e4e1402ae0233 | PaulRivier/kiwi | Pandoc.hs | # LANGUAGE FlexibleContexts , OverloadedStrings #
module Kiwi.Pandoc where
import Control.Applicative ((<|>))
import Control.Monad.Writer.Lazy (runWriter, tell)
import qualified Data.Map as M
import Data.Maybe (fromMaybe, catMaybes)
import qualified Data.Text as T
import qualified Data.T... | null | https://raw.githubusercontent.com/PaulRivier/kiwi/fa6974af68809f59a39cb1458f58b082d0e552b3/src/Kiwi/Pandoc.hs | haskell | chemin des images
reste
setId :: T.Text -> P.Attr -> P.Attr
absolute link
relative link
absolute link
relative link | # LANGUAGE FlexibleContexts , OverloadedStrings #
module Kiwi.Pandoc where
import Control.Applicative ((<|>))
import Control.Monad.Writer.Lazy (runWriter, tell)
import qualified Data.Map as M
import Data.Maybe (fromMaybe, catMaybes)
import qualified Data.Text as T
import qualified Data.T... |
30a7f301281bf5e8bd7d68a114bb75d371ff6e217e84fe242aeffdaeccf015d8 | liqd/thentos | Action.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module Thentos.Adhocracy3.Action
( a3ServiceId
, activate
, addUser
, externalUrlOfDefaultPersona
, login
, makeExternalUrl
... | null | https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-adhocracy/src/Thentos/Adhocracy3/Action.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
(confirmed), a persona is created in thentos together with a corresponding adhocracy user in A3
that corresponds to that persona.
FIXME Which path should we return here, considering that no A3 user exists yet?!
FIXME We correctly return... | # LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module Thentos.Adhocracy3.Action
( a3ServiceId
, activate
, addUser
, externalUrlOfDefaultPersona
, login
, makeExternalUrl
, resetPassword
) where
import Control.Lens ((^.))
import Control.Monad.Except (... |
b129e5465fd12bc7d4d1960016ed9c5d41fbd6b7fd440e09f9e0e0ae6db6301b | haskell-beam/beam | Ord.hs | # LANGUAGE UndecidableInstances #
| Defines classen ' ' and ' SqlOrd ' that can be used to perform equality
-- and comparison operations on certain expressions.
--
In particular , any ' Beamable ' value over ' QGenExpr ' or any ' QGenExpr '
-- object can be compared for equality and inequality using the '(=... | null | https://raw.githubusercontent.com/haskell-beam/beam/4ed616fdd9f0431a8ce634733bd6d43fed05b173/beam-core/Database/Beam/Query/Ord.hs | haskell | and comparison operations on certain expressions.
object can be compared for equality and inequality using the '(==.)' and
'(/=.)' operators respectively.
Simple (scalar) 'QGenExpr's can be compared using the '(<.)', '(>.)',
'(<=.)', and '(>=.)' operators respectively.
The "Quantified Comparison Sy... | # LANGUAGE UndecidableInstances #
| Defines classen ' ' and ' SqlOrd ' that can be used to perform equality
In particular , any ' Beamable ' value over ' QGenExpr ' or any ' QGenExpr '
Or , for example , @x > ALL(SELECT .. ) @ can be written
module Database.Beam.Query.Ord
( SqlEq(..), SqlEqQuantified(..),... |
222ad43728ce43e7ff2966ef0609e5d8446ff377a5939b9216705055ca86dac2 | clj-puredata/clj-puredata | parse.clj | (ns clj-puredata.parse
"Facilites for parsing hiccup-style PureData node definitions into Clojure maps, and automatically generating connection entities as needed."
(:require [clojure.test :as t]
[clj-puredata.common :refer :all]
[clj-puredata.layout :as l]))
(defonce counter (atom 0))
(de... | null | https://raw.githubusercontent.com/clj-puredata/clj-puredata/bb4879891b4960fee0fc511d4289a967ff0be393/src/clj_puredata/parse.clj | clojure | (if (other? from-node) from-node (:id from-node))
if :outlet is defined, use it, else use 0
(connection? form) form
circular connections
connecting to nodes ahead of their definition
(connect-to to-node from-node1 from-node2 from-node3 ...)
(connect-from from-node to-node1 to-node2 to-node3 | (ns clj-puredata.parse
"Facilites for parsing hiccup-style PureData node definitions into Clojure maps, and automatically generating connection entities as needed."
(:require [clojure.test :as t]
[clj-puredata.common :refer :all]
[clj-puredata.layout :as l]))
(defonce counter (atom 0))
(de... |
830c345d0a9c5906c9563ab96bdbe646bcc8abe0767353085a4d2fccd9eb722b | ngerakines/mochevent | mochevent_request.erl | Copyright ( c ) 2007 Mochi Media , Inc.
Copyright ( c ) 2009 < >
%%
%% 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 rig... | null | https://raw.githubusercontent.com/ngerakines/mochevent/f526222357308b580835ad1bc61362a50ed1251b/src/mochevent_request.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2007 Mochi Media , Inc.
Copyright ( c ) 2009 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY O... |
7fe29ba282d350451c19000c14f75e3017cfa0826be04f114c6c3640ecc8099c | iijlab/direct-hs | Client.hs | {-# LANGUAGE CPP #-}
# LANGUAGE RecordWildCards #
module Web.Direct.Client
( Client
, clientRpcClient
, clientLoginInfo
, clientChannels
, sendMessage
, uploadFile
, newClient
, setDomains
, getDomains
, modifyTalkRooms
, setTalkRooms
, getTalkRooms
, set... | null | https://raw.githubusercontent.com/iijlab/direct-hs/2422fd6fe008109e8dfb74f31d65b0d5a0330788/direct-hs/src/Web/Direct/Client.hs | haskell | # LANGUAGE CPP #
* Hooks when some changes are made in talk room members.
* re-exporting
--------------------------------------------------------------
| Direct client.
--------------------------------------------------------------
- | Getting acquaintances and me. The head of the list is myself.
-------... | # LANGUAGE RecordWildCards #
module Web.Direct.Client
( Client
, clientRpcClient
, clientLoginInfo
, clientChannels
, sendMessage
, uploadFile
, newClient
, setDomains
, getDomains
, modifyTalkRooms
, setTalkRooms
, getTalkRooms
, setMe
, getMe
, setAcquainta... |
f4dc9ee29bf9e0f6a0b6930646bbccf6107683948bf2149108150d1de6b3b67e | DSiSc/why3 | ml_printer.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/mlw/ml_printer.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
* { 2 Library for code used by different printers }
open Format
open Pdriver
open Expr
open Ident
open Te... |
f46c918b088dd04d3416f05fc6e3937f6868767b9967c85d7c13f6c57582930e | factorhouse/shortcut | project.clj | (defproject io.operatr/shortcut "0.1.0"
:description "Shortcut by Operatr.IO"
:min-lein-version "2.9.0"
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/tools.logging "1.1.0"]
[org.clojure/core.async "1.3.622"]
[org.clojure/tools.reader "1.3.6"]
... | null | https://raw.githubusercontent.com/factorhouse/shortcut/f58496b74fe16dbe31fc58ff1de7e420f8248112/project.clj | clojure | (defproject io.operatr/shortcut "0.1.0"
:description "Shortcut by Operatr.IO"
:min-lein-version "2.9.0"
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/tools.logging "1.1.0"]
[org.clojure/core.async "1.3.622"]
[org.clojure/tools.reader "1.3.6"]
... | |
09a513efd04b9ddf926f37e6978a26358177314876188961ed447be96c398e21 | nuvla/api-server | credential_template_totp_2fa.clj | (ns sixsq.nuvla.server.resources.credential-template-totp-2fa
"
This resource allows nuvla server to store generated TOTP secret in `credential`
. A token allows server to authenticate a user.
"
(:require
[sixsq.nuvla.auth.utils.acl :as acl-utils]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq... | null | https://raw.githubusercontent.com/nuvla/api-server/504512e622e1bd677cbfe2c8b3c15524c2bc8ffe/code/src/sixsq/nuvla/server/resources/credential_template_totp_2fa.clj | clojure |
resource
initialization: register this credential-template
multimethods for validation
| (ns sixsq.nuvla.server.resources.credential-template-totp-2fa
"
This resource allows nuvla server to store generated TOTP secret in `credential`
. A token allows server to authenticate a user.
"
(:require
[sixsq.nuvla.auth.utils.acl :as acl-utils]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq... |
3c56ee504fdcad800c0458aaaa5fddd45aaa7dc711d2bd6668b122b572360903 | ocaml-multicore/ocaml-tsan | scheduling.ml | # 2 "asmcomp/arm64/scheduling.ml"
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/asmcomp/arm64/scheduling.ml | ocaml | ************************************************************************
OCaml
... | # 2 "asmcomp/arm64/scheduling.ml"
, projet Gallium , INRIA Rocquencourt
Copyright 2013 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
The " open ! " directive below is necessary because , although
t... |
a4c028d05f60f21be2c03ab0f187642cccc0473fb07f71d409bf2d4bb64bd777 | edalorzo/learning-clojure | replace_addition.clj | (ns learn.macros.basics.replace-addition)
(comment
There are two phases : read and eval
;; We can get in the middle of reading to change
;; the output data structures before they are evaled.
(let [expression (read-string "(+ 1 2 3 4 5)")]
(let [changed (cons (read-string "*")
(res... | null | https://raw.githubusercontent.com/edalorzo/learning-clojure/b5db63d8e783767a85af19ccb8dbf4d4e0f53d62/src/learn/macros/basics/replace_addition.clj | clojure | We can get in the middle of reading to change
the output data structures before they are evaled.
We cannot simply type the expression (+ 1 2 3 4 5)
because it would be evaulated right away, so to
suppress the evaluation of a list we must quote it.
there ia reader macro to simplify quoting | (ns learn.macros.basics.replace-addition)
(comment
There are two phases : read and eval
(let [expression (read-string "(+ 1 2 3 4 5)")]
(let [changed (cons (read-string "*")
(rest expression))]
(eval changed)))
(let [expression (quote (+ 1 2 3 4 5))]
(let [changed (cons ... |
c581651e7eef5185920da91d3dc98c0f46092a1b86d8bf7dd0821f9806714334 | rpav/spell-and-dagger | quadtree.lisp | ;;; - NOTICE - NOTICE - NOTICE -
;;;
;;; This was taken from some other code I had laying around for a
;;; quadtree; it was not written during the jam. It may have been
;;; modified though.
;;;
;;; - NOTICE - NOTICE - NOTICE -
(in-package :game)
;; Quadtree
(defclass qt-node ()
((size :initform nil :initarg :si... | null | https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/quadtree.lisp | lisp | - NOTICE - NOTICE - NOTICE -
This was taken from some other code I had laying around for a
quadtree; it was not written during the jam. It may have been
modified though.
- NOTICE - NOTICE - NOTICE -
Quadtree |
(in-package :game)
(defclass qt-node ()
((size :initform nil :initarg :size)
(center-point :initform nil :initarg :at)
(quads :initform (make-array 4 :initial-element nil))
(objects :initform nil)))
(defclass quadtree ()
((top-node)
(max-depth :initform 3 :initarg :max-depth)
(object-node :initfo... |
b041cfded0a2cac11fb56d9450b2c63b49bd8194561c9a03f55891c568e1fbdb | solita/mnt-teet | map_styles.cljs | (ns teet.map.map-styles
(:require [teet.theme.theme-colors :as theme-colors]))
(defn map-controls
([] (map-controls {}))
([{:keys [position right]
:or {position :top
right "80px"}}]
(merge
{:background-color "white"
:max-width "40vw"
:position :absolute
:right right
:z-i... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/map/map_styles.cljs | clojure | (ns teet.map.map-styles
(:require [teet.theme.theme-colors :as theme-colors]))
(defn map-controls
([] (map-controls {}))
([{:keys [position right]
:or {position :top
right "80px"}}]
(merge
{:background-color "white"
:max-width "40vw"
:position :absolute
:right right
:z-i... | |
de8c118fd6edb4fbb554026b0145f02edd04420e53b11f15682d86687a524978 | jwiegley/notes | sequence.hs | module Main where
import Criterion
import Criterion.Main
import Control.Monad hiding (sequence)
import Prelude hiding (sequence)
import System.IO.Unsafe
-- | Evaluate each action in the sequence from left to right,
-- and collect the results.
sequence :: Monad m => [m a] -> m [a]
# INLINE sequence #
sequence ms = go ... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/sequence.hs | haskell | | Evaluate each action in the sequence from left to right,
and collect the results.
-- | Evaluate each action in the sequence from left to right,
-- and ignore the results.
{-# INLINE sequence_ #-}
# INLINE sequence' #
, bench "sequence_" $ nf stress sequence_
, bench "sequence_'" $ nf stress sequence_' | module Main where
import Criterion
import Criterion.Main
import Control.Monad hiding (sequence)
import Prelude hiding (sequence)
import System.IO.Unsafe
sequence :: Monad m => [m a] -> m [a]
# INLINE sequence #
sequence ms = go (return []) ms
where
go z [] = z
go z (m:ms) =... |
402244133ed96e64f7cf6c862f74392dd7cf53316856c170306c2b9539394100 | 3b/3bgl-misc | demo.lisp | #++(asdf:load-systems '3bgl-misc)
(defpackage #:embed-test
(:use :cl :basecode))
(in-package #:embed-test)
(defparameter *command* "xterm -fn 10x20 -b 0 -into ~d &")
(defclass embed-test (basecode-glop
perspective-projection
basecode-clear
fps-graph ... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/xembed/demo.lisp | lisp | move input focus back to main window on mouse click for now | #++(asdf:load-systems '3bgl-misc)
(defpackage #:embed-test
(:use :cl :basecode))
(in-package #:embed-test)
(defparameter *command* "xterm -fn 10x20 -b 0 -into ~d &")
(defclass embed-test (basecode-glop
perspective-projection
basecode-clear
fps-graph ... |
fd3590097a4cb293ad0c9ff5fef77bbff1e73aa11e7fd09ab09539870d6c161d | janestreet/merlin-jst | parmatch.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/typing/parmatch.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Types
open Typedtree
Utilities for building patterns
let make_pat de... |
bf54cd907190864552b3f5751ab6baeb262c911ac38603099ae4d282f9bb7e3e | mejgun/haskell-tdlib | AvailableReaction.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.AvailableReaction where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ReactionType as ReactionType
import qualified Utils as U
-- |
| Represents an available reaction @type Type of the reaction @needs_premium ... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/e5c8059a74f88073b27dbfafb6908de0729af110/src/TD/Data/AvailableReaction.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
|
| |
module TD.Data.AvailableReaction where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ReactionType as ReactionType
import qualified Utils as U
| Represents an available reaction @type Type of the reaction @needs_premium True , if Telegram Premium is needed to send ... |
64a090f1e10b999046bae4978b0f9d8a33fc73048397732ae29ed5d1defb0e47 | daigotanaka/mern-cljs | express.cljs | (ns mern-utils.express
(:require-macros
[cljs.core.async.macros :refer [go]]
[mern-utils.macros :refer [node-require]])
(:require
[cljs.core.async :as async :refer [put!]]
[cljs.nodejs :as nodejs]
[clojure.string :as string]
[cognitect.transit :as transit]
[mern-utils.backend-lib :refer ... | null | https://raw.githubusercontent.com/daigotanaka/mern-cljs/a9dedbb3b622f96dd0b06832733b4fd961e6437d/example/common/checkouts/mern_utils/src/mern_utils/express.cljs | clojure | I don't know why it requires println to make map run :( | (ns mern-utils.express
(:require-macros
[cljs.core.async.macros :refer [go]]
[mern-utils.macros :refer [node-require]])
(:require
[cljs.core.async :as async :refer [put!]]
[cljs.nodejs :as nodejs]
[clojure.string :as string]
[cognitect.transit :as transit]
[mern-utils.backend-lib :refer ... |
a88c73833c54dd3f1155c4da766c44927ca5e92dd64cec9c6784fc49f4bd63da | bobzhang/fan | bench1.ml | (* let _ = *)
(* function *)
(* | 550543360 *)
(* |803846675 *)
(* |483739668 *)
(* |131103253 *)
(* |939042348 *)
(* |190501942 *)
(* |318291514 *)
(* |1000574016 *)
(* |600187987 *)
(* |1035971165 *)
(* |258923636 *)
(* ... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/suites/bench1.ml | ocaml | let _ =
function
| 550543360
|803846675
|483739668
|131103253
|939042348
|190501942
|318291514
|1000574016
|600187987
|1035971165
|258923636
|231714422
|916095096
... | |72534754
|424948034
let f v =
(fun (s : string) ->
function
| 550543360 -> s = "functor"
| 803846675 -> s = "private"
| 483739668 -> s = "sig"
| 131103253 -> s = "include"
| 939042348 -> s = "exception"
| 190501942 -> s = "i... |
660c1f07ce5e4a90f038274575f608bf9341a75b9947c9c4ff7f0de3e8b2d50c | hypirion/haskell-transducers | Conduit.hs | {-# LANGUAGE DeriveFunctor, RankNTypes #-}
module Data.Transducer.Conduit
( toConduit
) where
import Data.Transducer
import Data.Conduit
-- Yields the bs it receives
conduitYielder :: Monad m => Reducer () b (Conduit a m b)
conduitYielder = stateless run
where run m x = m >> yield x
conduitAwaiter :: Monad m ... | null | https://raw.githubusercontent.com/hypirion/haskell-transducers/7913c3bef9b5d3a30f48b878fbb9ff1675deb3ac/src/Data/Transducer/Conduit.hs | haskell | # LANGUAGE DeriveFunctor, RankNTypes #
Yields the bs it receives |
module Data.Transducer.Conduit
( toConduit
) where
import Data.Transducer
import Data.Conduit
conduitYielder :: Monad m => Reducer () b (Conduit a m b)
conduitYielder = stateless run
where run m x = m >> yield x
conduitAwaiter :: Monad m => (Reducer s a (Conduit a m b)) -> Conduit a m b
conduitAwaiter (Reduce... |
157fc9f102c92f8dd68c5e27dc892594c7ef165790281a738fa0f82476fca338 | zellige/zellige | Simplify.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | null | https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Simplify.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
module Data.Geometry.Simplify where
import qualified Data.Aeson as Aeson
import qualified Da... |
46836d8287b9014bfb49e5f185bc948a25299c3cb1b0d2252a833642627ffb36 | binsec/haunted | hashamt.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/base/hashamt.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
aed018d206ddfe2e6d8ffe1d20be34bc6ce680a847708061baa3543c881527ec | penrose/geometric-queries | MathUtils.hs | # LANGUAGE AllowAmbiguousTypes , NoMonomorphismRestriction #
module MathUtils where
to use this module , functions need to be constrained into Autofloat first
---- constants ----
eps = 0.1 ** 8
posInf = 1 / 0
negInf = -1 / 0
---- helper functions ----
eq a b = abs (a-b) < eps
isInf x = x == 1/0 || x == -1/0
ne... | null | https://raw.githubusercontent.com/penrose/geometric-queries/79676192b2740e7bed39535611db8949b7846e14/rewrite-incomplete/MathUtils.hs | haskell | -- constants ----
-- helper functions ----
scalar-vector multiplication
transformations | # LANGUAGE AllowAmbiguousTypes , NoMonomorphismRestriction #
module MathUtils where
to use this module , functions need to be constrained into Autofloat first
eps = 0.1 ** 8
posInf = 1 / 0
negInf = -1 / 0
eq a b = abs (a-b) < eps
isInf x = x == 1/0 || x == -1/0
neg v = map (\x->(-x)) v
add v1 v2 = map (\(a,b)... |
ee9a477649958f61a1c72af33c9f4463ab3f2dd1be07431eba775b07370e07ae | b0-system/b0 | b00_htmlg.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_htmlg.ml | ocaml | Output
N.B. we also escape @'s since ocamldoc trips over them.
Predefined element constructors
Convenience
FIXME Ideally we would like the read to be in write.
The write fun return a future but this has other impacts.
FIXME maybe get rid of that. | ---------------------------------------------------------------------------
Copyright ( c ) 2016 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
028a3cccdb547230ca7d3fd8060d5aaaade92c2634738f8e19f405cf53833ade | zenspider/schemers | exercise.2.97.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.97
;; ;; a. Implement this algorithm as a procedure `reduce-terms' that
takes two term lists ` n ' and ` d ' as arguments and returns a
;; list `nn', `dd', which are `n' and `d' reduced to lowest
;; terms via ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.97.scm | scheme | ;; a. Implement this algorithm as a procedure `reduce-terms' that
list `nn', `dd', which are `n' and `d' reduced to lowest
terms via the algorithm given above. Also write a procedure
`reduce-poly', analogous to `add-poly', that checks to see if
strips off the variable and passes the problem ... | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.97
takes two term lists ` n ' and ` d ' as arguments and returns a
the two polys have the same variable . If so , ` reduce - poly '
` reduce - terms ' , then reattaches the variable to the two term
... |
7cfcd0db36caa668eccfb5d49a0a474ad3a594d3d1eae4b7750d76beb425024c | ghc/ghc | PatriciaTree.hs | # LANGUAGE BangPatterns , ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
-- |An efficient implementation of 'Data.Graph.Inductive.Graph.Graph'
using big - endian ( i.e. " Data . IntMap " ) .
--
-- This module provides the following specialised functions to gain
more performance , using GHC 's RULES pragma :
--... | null | https://raw.githubusercontent.com/ghc/ghc/d87f28d810b9c536ca4db7f363163e6d0dd6c93c/compiler/GHC/Data/Graph/Inductive/PatriciaTree.hs | haskell | |An efficient implementation of 'Data.Graph.Inductive.Graph.Graph'
This module provides the following specialised functions to gain
* 'Data.Graph.Inductive.Graph.insNode'
* 'Data.Graph.Inductive.Graph.insEdge'
* 'Data.Graph.Inductive.Graph.gmap'
* 'Data.Graph.Inductive.Graph.nmap'
* 'Data.Graph.Inductive.G... | # LANGUAGE BangPatterns , ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
using big - endian ( i.e. " Data . IntMap " ) .
more performance , using GHC 's RULES pragma :
Code is from Hackage ` fgl ` package version 5.7.0.3
module GHC.Data.Graph.Inductive.PatriciaTree
( Gr
, UGr
)
where
impor... |
92698438f17b802eb3dc092466a78ae4ddd1cccd9d35c81c3265f23e8dbf5960 | cyppan/grape | default_sort.clj | (ns grape.hooks.default-sort)
(def hooks
{:pre-read (fn [{:keys [config]} resource request query]
(if (get-in query [:opts :sort?])
(let [query-sort (:sort query)
resource-sort (:default-sort resource)
config-sort (:default-sort config)]
... | null | https://raw.githubusercontent.com/cyppan/grape/62488a335542fc58fc9126b8d5ff7fccdd16f1d7/src/grape/hooks/default_sort.clj | clojure | (ns grape.hooks.default-sort)
(def hooks
{:pre-read (fn [{:keys [config]} resource request query]
(if (get-in query [:opts :sort?])
(let [query-sort (:sort query)
resource-sort (:default-sort resource)
config-sort (:default-sort config)]
... | |
cf9267631607c36581157c31bbe3fc6eaf84d1ebd2dd37f7bb2155ebd239be50 | nomeata/haskell-candid | Infer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Codec.Candid.Infer where
import qualified Data.Vector as V
import Control.Monad
import Data.Void
import Data.List
import Prettyprinter
import Codec.Candid.Types
inferTypes :: [Value] -> Either String [Type Void]
inferTypes = mapM inferTyp
inferTyp... | null | https://raw.githubusercontent.com/nomeata/haskell-candid/87a4f01eb9cb93c827a0a7f5f29af0ee19135308/src/Codec/Candid/Infer.hs | haskell | # LANGUAGE OverloadedStrings #
no principal type
no principal type
Maybe do type checking?
the reflexive cases
The shorthands
failure | # LANGUAGE TupleSections #
module Codec.Candid.Infer where
import qualified Data.Vector as V
import Control.Monad
import Data.Void
import Data.List
import Prettyprinter
import Codec.Candid.Types
inferTypes :: [Value] -> Either String [Type Void]
inferTypes = mapM inferTyp
inferTyp :: Value -> Either String (Type Vo... |
54db0924471a358e938b5cfb69d0f85ea9ad1fdb8a19f70f687511cd56cb567f | OCamlPro/OCamlPro-OCaml-Branch | boyer.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/tests/misc/boyer.ml | ocaml | *********************************************************************
Objective Caml
... | , 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 Q Public License version 1.0 .
$ I d : boyer.ml 7017 2005 - 08 - 12 ... |
067ac1795cdb2007a5185c99a40398b9d675fd2d05071e8c8d696199aaef299d | 1Jajen1/Brokkr | Position.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
module Util.Position (
Position(..)
, pattern Position
, Falling(..)
) where
import Data.Word
import Foreign.Storable
import FlatParse.Basic (empty)
import Util.Binary
import Util.Linear.V3
import Util... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/1c93519fdc3490091205e8499ed04cd1fee66192/src/Util/Position.hs | haskell | # COMPLETE Position # | # LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE UndecidableInstances #
module Util.Position (
Position(..)
, pattern Position
, Falling(..)
) where
import Data.Word
import Foreign.Storable
import FlatParse.Basic (empty)
import Util.Binary
import Util.Linear.V3
import Util... |
96442ad84a56919792c2e7e0f20c898cbc553cc21c5906cd60694f7262685026 | binaryage/cljs-devtools | logging.clj | (ns devtools-sample.logging)
(defmacro log [& args]
`(.log js/console ~@args))
(defmacro info [& args]
`(.info js/console ~@args))
| null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/examples/lein/src/demo/devtools_sample/logging.clj | clojure | (ns devtools-sample.logging)
(defmacro log [& args]
`(.log js/console ~@args))
(defmacro info [& args]
`(.info js/console ~@args))
| |
9c151dc1130dc792f55f568e527e1177c0e8ba1f102c2352206be0cdd133b7a5 | graphql-erlang/graphql | graphql_type_string.erl | -module(graphql_type_string).
-export([
type/0
]).
type()-> #{
kind => 'SCALAR',
name => 'String',
ofType => null,
description => <<
"The `String` scalar type represents textual data, represented as UTF-8",
"character sequences. The String type is most often used by GraphQL to",
"represent free-... | null | https://raw.githubusercontent.com/graphql-erlang/graphql/feef75d955e3404c3c8e4500b1e2c4d4821c1dc6/src/types/graphql_type_string.erl | erlang | -module(graphql_type_string).
-export([
type/0
]).
type()-> #{
kind => 'SCALAR',
name => 'String',
ofType => null,
description => <<
"The `String` scalar type represents textual data, represented as UTF-8",
"character sequences. The String type is most often used by GraphQL to",
"represent free-... | |
b4696753be7cbdf32cca8fb66f40fbf885d9665a2df1f83e29e6a474b947778c | quicklisp/quicklisp-controller | package.lisp | package.lisp
(defpackage #:quicklisp-controller
(:use #:cl
#:westbrook)
(:export #:setup-directories)
(:shadowing-import-from #:sb-ext
#:run-program
#:process-exit-code
#:process-output
#:process-close)
(... | null | https://raw.githubusercontent.com/quicklisp/quicklisp-controller/9fc95237f0f2f86cafc3afb2f1e7666610e8561b/package.lisp | lisp | package.lisp
(defpackage #:quicklisp-controller
(:use #:cl
#:westbrook)
(:export #:setup-directories)
(:shadowing-import-from #:sb-ext
#:run-program
#:process-exit-code
#:process-output
#:process-close)
(... | |
0ae31f7600ada56408c0c33512b454107ca7e13b806e0fae2da483876168eb83 | int28h/HaskellTasks | 0001.hs | main = putStrLn "Hello, world!" | null | https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0001.hs | haskell | main = putStrLn "Hello, world!" | |
fd21a3b0f4ea4374b71034b94fb3b1043f295013f5d943930d81c0e18e6d2bda | basho/riak_core | riak_core_bucket_type.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_bucket_type.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
{ @li... |
efcc4e3a6db690d2f71eecf15e59261fc715d350a3c5f7e8b513ef315a22b58b | haskell/vector | minimumBy.hs | import qualified Data.Vector as U
import Data.Bits
main = print . U.minimumBy (\x y -> GT) . U.map (*2) . U.map (`shiftL` 2) $ U.replicate (100000000 :: Int) (5::Int)
| null | https://raw.githubusercontent.com/haskell/vector/4c87e88f07aad166c6ae2ccb94fa539fbdd99a91/old-testsuite/microsuite/minimumBy.hs | haskell | import qualified Data.Vector as U
import Data.Bits
main = print . U.minimumBy (\x y -> GT) . U.map (*2) . U.map (`shiftL` 2) $ U.replicate (100000000 :: Int) (5::Int)
| |
e4bcd547bc9b5350b6fce57e1f0b5830d288af912992b0277cfd90552384ebba | spawnfest/eep49ers | wxListCtrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2011 - 2016 . 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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/api_gen/wx_extra/wxListCtrl.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2011 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
<<EXPORT:SortItems sortItems/2 SortItems:EXPORT>>
<<SortItems
-spec sortItems(This::wxListCtrl(), SortCallBack) -> ... |
8e451e9db58e2c289c50922fe4dc2a566d6eabf63c849506c59bdd28e612c84f | Clozure/ccl | gtk-minesweeper.lisp | -*-Mode : LISP ; Package : ( MINESWEEPER : USE ( CL CCL ) ) -*-
;;;
Copyright ( C ) 2001 Clozure Associates
;;;
This is a GTK+-based MineSweeper game , derived from a C program
developed by and published in " Developing Linux Programs
with GTK+ and GDK " , ( c ) 1999 New Riders Publishing .
;;;
;;; Anyone ... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/gtk-minesweeper.lisp | lisp | Package : ( MINESWEEPER : USE ( CL CCL ) ) -*-
Anyone who wants to use this code for any purpose is free to do so.
In doing so, the user acknowledges that this code is provided "as is",
without warranty of any kind, and that no other party is legally or
otherwise responsible for any consequences of its use.
... | Copyright ( C ) 2001 Clozure Associates
This is a GTK+-based MineSweeper game , derived from a C program
developed by and published in " Developing Linux Programs
with GTK+ and GDK " , ( c ) 1999 New Riders Publishing .
(defpackage "MINESWEEPER"
(:use "CL" "CCL")
(:export "MINESWEEPER"))
(in-package "... |
6404b1de0b3387bdd28af34912d8a3cabfe1f112759ad26c28d5c86f25b12e4d | penpot/penpot | svg_raw.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.shapes.svg-raw
(:require
[app.main.refs :as refs]
[app.main.ui.shapes.shape ... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/shapes/svg_raw.cljs | clojure |
Copyright (c) KALEIDOS INC | 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 /.
(ns app.main.ui.workspace.shapes.svg-raw
(:require
[app.main.refs :as refs]
[app.main.ui.shapes.shape :refer [shape-container]]
[app... |
364cb161c719a64a138c30820363cf3c69ba47663a317e2fa0023c54af7bdd76 | xnning/EvEff | Ctl.hs | # LANGUAGE GADTs , -- match on for type equality
ExistentialQuantification -- forall b ans . Yield ...
#
ExistentialQuantification -- forall b ans. Yield ...
#-}
|
Description : Internal module for type - safe multi - prompt control
Copyright : ( c ) 2... | null | https://raw.githubusercontent.com/xnning/EvEff/c003c04f05c89e8680dc6b2604dc313cd7dea1c8/src/Control/Ev/Ctl.hs | haskell | match on for type equality
forall b ans . Yield ...
forall b ans. Yield ...
* Markers
prompt marker
* Control monad
multi-prompt control monad
* Unsafe primitives for "Control.Ev.Eff"
IORef that gets restored per resumption
-----------------------------------------------------
Assume some way to generate a... | #
#-}
|
Description : Internal module for type - safe multi - prompt control
Copyright : ( c ) 2020 , Microsoft Research ; ;
License : MIT
Maintainer : ;
Stability : Experimental
Primitive module that implements type safe multi - prompt control .
Used by the " Control . Ev . Eff " mod... |
3f1125c117019726a71ff697695717d909aca26260845cc2fd7ee78fce711f07 | TrustInSoft/tis-kernel | value_parameters.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/value_parameters.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
fb2f5f7e695b426fbb92fcae2a2f6ffdd0c2826ea3d3164a0594afbb3b94180d | bumptech/nitro-haskell | Distributed.hs | {-# LANGUAGE OverloadedStrings #-}
import System.Nitro
import Control.Monad (void, forever)
import Control.Concurrent (forkIO, threadDelay)
import Data.ByteString.Char8 as BS
serverThread s i = forever $ do
fr <- recv s []
threadDelay 1000000
frBack <- bstrToFrame (BS.pack $ "Hi it's thread #" ++ (show i))... | null | https://raw.githubusercontent.com/bumptech/nitro-haskell/937415d361193bab86545d0bc784830b29573474/examples/Distributed.hs | haskell | # LANGUAGE OverloadedStrings # | import System.Nitro
import Control.Monad (void, forever)
import Control.Concurrent (forkIO, threadDelay)
import Data.ByteString.Char8 as BS
serverThread s i = forever $ do
fr <- recv s []
threadDelay 1000000
frBack <- bstrToFrame (BS.pack $ "Hi it's thread #" ++ (show i))
reply s fr frBack []
rpc = wi... |
10bcc687c58f2092b20e464dae7961a6220036ad2831461d67be06d79be12e5d | lehins/massiv | ManifestSpec.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
module Test.Massiv.Array.ManifestSpec (spec) where
import Data.ByteString as S
import Data.ByteString.Builder as S
import Data.ByteString.Lazy as SL
import Data.Mas... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-test/tests/Test/Massiv/Array/ManifestSpec.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
module Test.Massiv.Array.ManifestSpec (spec) where
import Data.ByteString as S
import Data.ByteString.Builder as S
import Data.ByteString.Lazy as SL
import Data.Mas... | |
ee4c42c3a2eebf5843acb693858a9d6b103085fb1aa15cf33cbd493fdc9a5d3b | softwarelanguageslab/maf | R5RS_various_infinite-3-1.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
((lambda (x) (x x)) (lambda (y) (<change> () (display (y y))) (<change> () (y y)) (y y))) | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_infinite-3-1.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 2
* swaps : 0
((lambda (x) (x x)) (lambda (y) (<change> () (display (y y))) (<change> () (y y)) (y y))) |
76d3512574095bbc51c6da88bee74fd328bcc538a1d0e39aa1d1a51c71e95e8c | cram2/cram | coupling.lisp | Regression test COUPLING for GSLL , automatically generated
;;
Copyright 2009
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Found... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/coupling.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test COUPLING for GSLL , automatically generated
Copyright 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy... |
8de7002bcaa27d0e7f96252240380d55ec5dd5068c29aed7358a9823c46eb86a | maoe/lifted-async | Safe.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
|
Module : Control... | null | https://raw.githubusercontent.com/maoe/lifted-async/922f5469acb09d66e4dbb996167f963cc811d52a/src/Control/Concurrent/Async/Lifted/Safe.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
* Asynchronous actions
** Spawning
** Spawning with automatic 'cancel'ation
** Quering 'Async's
** Waiting for multiple 'Async's
** Linking
* Convenient utilities
| Generalized version of 'A.async'.
| Generalized version of 'A.withAsync'.
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
|
Module : Control . Concurrent . Async . Lifted . Safe
Copyright : Copyright ( C ) 2012 - 2018 M... |
ef682c6c536ff8a4ec34e60384b97017650c2c2aaf97f5e8e396444c7116d0df | facebook/infer | ObjCDispatchModels.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/2e3b33f21214653742967e5e1ab3235cc6d43e41/infer/src/IR/ObjCDispatchModels.ml | ocaml | We assume that for these modelled functions, the block passed as parameter doesn't
have arguments, so we only pass the captured variables. |
* 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
... |
f08b12cbaf8d400e381e44bac921a41ebd318aa2129996ea3d92b3acd34d9db4 | evilbinary/scheme-lib | logical.scm | ;;;; "logical.scm", bit access and operations for integers for Scheme
Copyright ( C ) 1991 , 1993 , 2001 , 2003 , 2005
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and underst... | null | https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/slib/logical.scm | scheme | "logical.scm", bit access and operations for integers for Scheme
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I a... | Copyright ( C ) 1991 , 1993 , 2001 , 2003 , 2005
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(define logical:boole-xor
'#(#(0 1 2 3 4 5 6 7 8 9 10 11 12... |
6cfb4ed4081862efe84b55b79b0d9afa9233add5dd74ff3c4fb2a34db1ec6314 | kosmikus/multirec | TH.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE PatternGuards #
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Generics.MultiRec.TH
Copyright : ( c ) 2008 - -2010 U... | null | https://raw.githubusercontent.com/kosmikus/multirec/10ea901f0e1067bbe3632b1fab34103c83eeff0f/src/Generics/MultiRec/TH.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE CPP #
---------------------------------------------------------------------------
|
Module : Generics.MultiRec.TH
License : BSD3
Stability : experimental
Portability : non-portable
automatically generate the boilerpl... | # LANGUAGE TemplateHaskell #
# LANGUAGE PatternGuards #
Copyright : ( c ) 2008 - -2010 Universiteit Utrecht
Maintainer :
This module contains Template Haskell code that can be used to
module Generics.MultiRec.TH
( deriveAll,
deriveConstructors,
deriveFamily, deriveSystem,
derivePF,
... |
396113644da268adc5a07d1ac9ed9fec362b59a14f03bc7a3b74b7b78395b3fd | gator1/jepsen | project.clj | (defproject jepsen.galera "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main jepsen.galera.test
:dependencies [[org.clojure/clojure "1.8.0"]
[jepsen "0.1.5"]
[honeysql "0.6.1"]
... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/galera/project.clj | clojure | (defproject jepsen.galera "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main jepsen.galera.test
:dependencies [[org.clojure/clojure "1.8.0"]
[jepsen "0.1.5"]
[honeysql "0.6.1"]
... | |
d4d6fd3f4c10ac0120fae95c6482dc4ebc6c485c4c56d63529ad894777f466ae | scarvalhojr/haskellbook | section22.5.hs |
newtype Reader r a = Reader { runReader:: r -> a }
ask :: Reader a a
ask = Reader id
| null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter22/section22.5.hs | haskell |
newtype Reader r a = Reader { runReader:: r -> a }
ask :: Reader a a
ask = Reader id
| |
027f35d7d9a6e447a015613b25373eb41e99559ce583805c93deb91a842529af | offby1/rudybot | reloadable.rkt | #lang racket/base
;; based on handin-server/private/reloadable
(require syntax/moddep)
(provide reload-module)
(define (reload-module modspec path [notifier #f])
;; the path argument is not needed (could use resolve-module-path here), but
;; its always known when this function is called
(let* ([name ((current-... | null | https://raw.githubusercontent.com/offby1/rudybot/74773ce9c1224813ee963f4d5d8a7748197f6963/reloadable.rkt | racket | based on handin-server/private/reloadable
the path argument is not needed (could use resolve-module-path here), but
its always known when this function is called
only notify, it's fine to reset the file timer, since there's no point
in attempting to reload it yet again until it is edited.
pulls out a value from a... | #lang racket/base
(require syntax/moddep)
(provide reload-module)
(define (reload-module modspec path [notifier #f])
(let* ([name ((current-module-name-resolver) modspec #f #f #t)])
(when notifier (notifier "(re)loading module from ~a" modspec))
(parameterize ([current-module-declare-name name]
... |
13a37951d8e990c9b110cfda0ee685ea868ee7b4a814231455144b0360fadb16 | yrashk/erlang | snmpc_mib_to_hrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/snmp/src/compile/snmpc_mib_to_hrl.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpc_mib_to_hrl).
-include_lib("... |
493b7a7ac7ec0ad3a39acd376342d33d2dd2b8a87775b1eb802070bcd3708b60 | camlp5/camlp5 | camlp5_top.ml | (* camlp5r *)
(* camlp5_top.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
#load "q_MLast.cmo";
open Parsetree;
open Lexing;
open Versdep;
open Camlp5_top_funs;
Toploop.parse_toplevel_phrase.val := wrapped_toplevel_phrase ;
Toploop.parse_use_file.val :=
wrap use_file (fun lb -> lb.lex_curr_pos ... | null | https://raw.githubusercontent.com/camlp5/camlp5/9e8155f8ae5a584bbb4ad96d10d6fec63ed8204c/top/camlp5_top.ml | ocaml | camlp5r
camlp5_top.ml,v | Copyright ( c ) INRIA 2007 - 2017
#load "pa_macro.cmo";
#load "q_MLast.cmo";
open Parsetree;
open Lexing;
open Versdep;
open Camlp5_top_funs;
Toploop.parse_toplevel_phrase.val := wrapped_toplevel_phrase ;
Toploop.parse_use_file.val :=
wrap use_file (fun lb -> lb.lex_curr_pos - lb.lex_start_pos)
;
Pcaml.warning... |
6f60624322388d2850f296da15a14307046809971c5be1133871289f8ac785f0 | fp-works/2019-winter-Haskell-school | LogAnalysisSpec.hs | import Test.Hspec
import Log
import LogAnalysis
main :: IO ()
main =
hspec $ do
let infoLog = "I 29 la la la"
let warningLog = "W 823 warning message"
let errorLog = "E 2 562 help help"
let unknownLog = "This is an unknown log"
let log1 = LogMessage Info 1 "log 1"
... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week2/tien/homework2/test/LogAnalysisSpec.hs | haskell |
Excercise 3 --
| import Test.Hspec
import Log
import LogAnalysis
main :: IO ()
main =
hspec $ do
let infoLog = "I 29 la la la"
let warningLog = "W 823 warning message"
let errorLog = "E 2 562 help help"
let unknownLog = "This is an unknown log"
let log1 = LogMessage Info 1 "log 1"
... |
ccd56196517898ea58b5e86bd55e64a18d5edab7fea9d73374564c2d7e8c5965 | Kappa-Dev/KappaTools | rule_modes.ml | type arity = Usual | Unary | Unary_refinement
type direction = Direct | Op
module RuleModeIdS:
SetMap.S with type elt = int * arity * direction
=
SetMap.Make
(struct
type t = int * arity * direction
let compare = compare
let print _ _ = ()
end)
module RuleModeIdSet = RuleModeIdS.Set
m... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/symmetries/rule_modes.ml | ocaml | type arity = Usual | Unary | Unary_refinement
type direction = Direct | Op
module RuleModeIdS:
SetMap.S with type elt = int * arity * direction
=
SetMap.Make
(struct
type t = int * arity * direction
let compare = compare
let print _ _ = ()
end)
module RuleModeIdSet = RuleModeIdS.Set
m... | |
ffffeddecf3f30075eaa4f9e40403dab4b38f23e2d98508476d9ab8a86b544d2 | hatashiro/line | Types.hs | {-|
This module is to define aliases commonly used in other modules.
-}
module Line.Messaging.Common.Types (
-- * General types
ID,
URL,
-- * LINE API types
ChannelSecret,
ChannelAccessToken,
) where
import qualified Data.Text as T
-- | A type alias to specify an identifier of something.
type ID = T.Te... | null | https://raw.githubusercontent.com/hatashiro/line/3b5ddb0b98e5937d86157308512c1c96cd49c86a/src/Line/Messaging/Common/Types.hs | haskell | |
This module is to define aliases commonly used in other modules.
* General types
* LINE API types
| A type alias to specify an identifier of something.
| A type alias to specify a URL.
| A type alias to specify a channel secret. About issueing and using the
channel secret, please refer to corresponding LINE do... |
module Line.Messaging.Common.Types (
ID,
URL,
ChannelSecret,
ChannelAccessToken,
) where
import qualified Data.Text as T
type ID = T.Text
type URL = T.Text
type ChannelSecret = T.Text
type ChannelAccessToken = T.Text
|
ae26f2a8bfc1e8f4cdf5145b74bda32b9c47c667b39cf34abd6390b37dd51a04 | argp/bap | check.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/tests/check.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
open Grap... |
53050c5553534fea39ca2b8282bb7ca88630dd7ed04f4889304eba0f70a55983 | shentufoundation/deepsea | test2.ml | open Sast
let _ =
let lexbuf = Lexing.from_channel stdin in
let program = Parser.program Scanner.token lexbuf in
let sprogram = Semant.check program in
print_endline (string_of_sprogram sprogram)
| null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/OpenSC/src/test2.ml | ocaml | open Sast
let _ =
let lexbuf = Lexing.from_channel stdin in
let program = Parser.program Scanner.token lexbuf in
let sprogram = Semant.check program in
print_endline (string_of_sprogram sprogram)
| |
9c59b97be7a64f1bde0e45f758afcba1f8d13ef380c513a0c4753f420b473b36 | brownplt/LambdaS5 | fixpoint.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/ocamlgraph-1.8.1/src/fixpoint.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
Copyrig... |
38755bff62a8f26857de4f554c56f81a478a90e81fb7106a9b9aab66c303c671 | Decentralized-Pictures/T4L3NT | client_baking_blocks.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_delegate/client_baking_blocks.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
e1aa8eb535a1cb83f0a8eef0c497d1bff532a402235e02343ad426bacfe5f2bc | janestreet/ecaml | marker.mli | * A [ Marker.t ] specifies a position in a buffer relative to the surrounding text . A
marker changes its offset from the beginning of the buffer automatically whenever text
is inserted or deleted , so that it stays with the two characters on either side of it .
[ ( Info - goto - node " ( " ) ]
... | null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/marker.mli | ocaml | * [(describe-function 'marker-buffer)]
[(Info-goto-node "(elisp)Information from Markers")]
* [(describe-function 'marker-insertion-type)]
[(Info-goto-node "(elisp)Marker Insertion Types")]
* [(describe-function 'marker-position)]
[(Info-goto-node "(elisp)Information from Markers")]
* [(describe-function... | * A [ Marker.t ] specifies a position in a buffer relative to the surrounding text . A
marker changes its offset from the beginning of the buffer automatically whenever text
is inserted or deleted , so that it stays with the two characters on either side of it .
[ ( Info - goto - node " ( " ) ]
... |
7fac928a3f398aabd1e3af12abc2b31137f5cf1933608416743d5fe482b1d69e | degree9/enterprise | client.clj | (ns degree9.env.client)
(defmacro define [name & [default]]
`('goog-define ~name ~default))
| null | https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/env/client.clj | clojure | (ns degree9.env.client)
(defmacro define [name & [default]]
`('goog-define ~name ~default))
| |
13dbf9078678661eb27ab089bf68deb934ccda5673972d0ccf8940c0c2438254 | S8A/htdp-exercises | ex502.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-intermediate-lambda-reader.ss" "lang")((modname ex502) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex502.rkt | racket | about the language level of this file in a form that our tools can easily process.
creates a palindrome from s0
extracts the last item from the list
removes the last item from the list
creates a palindrome from s0
creates a palindrome from s and a
accumulator a is the reverse of s0 without the items
in s | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex502) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
[ NEList - of 1String ] - > [ NEList - of 1String ]
(... |
2e8d46afffa73542e15e9d8ef9a999495e702baf57a3b3c2c70d84edb0da5bae | babashka/nbb | core.cljs | (ns print-cli-args.core
(:require [clojure.string :as str]))
(def cmd-line-args (not-empty (js->clj (.slice js/process.argv 2))))
(println "Your command line arguments:"
(or (some->> cmd-line-args (str/join " "))
"None"))
| null | https://raw.githubusercontent.com/babashka/nbb/2ce6c0a4673342e92637fb28b432c6bc801fc5db/doc/publish/print-cli-args/src/print_cli_args/core.cljs | clojure | (ns print-cli-args.core
(:require [clojure.string :as str]))
(def cmd-line-args (not-empty (js->clj (.slice js/process.argv 2))))
(println "Your command line arguments:"
(or (some->> cmd-line-args (str/join " "))
"None"))
| |
429648a8464fdd85569b0279db64bb05066a4aeb5d2e660215ede016b7fc212c | exercism/haskell | ArmstrongNumbers.hs | module ArmstrongNumbers (armstrong) where
armstrong :: Integral a => a -> Bool
armstrong = error "You need to implement this function."
| null | https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/armstrong-numbers/src/ArmstrongNumbers.hs | haskell | module ArmstrongNumbers (armstrong) where
armstrong :: Integral a => a -> Bool
armstrong = error "You need to implement this function."
| |
44a7737c12c789b2a7a23038f9b9c8f9853623a513c3841fba7ed2ba32380ca3 | silky/quipper | And_rev.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
and_gate :: (Qubit, Qubit) -> Cir... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/And_rev.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
====================================================================== | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
and_gate :: (Qubit, Qubit) -> Circ (Qubit)
and_gate (a, b) = do
c <- qinit False
qnot_at c `controlled` [a, b]
return c
and_list :: [Qubit] -> Circ Qubit
and_list [] = do
c <- qinit True
return c
and_list [q] = do
... |
9a1f41b230d4d72f115161bb97ddae31600517983fe06ff4c5b6669cdc5f624c | MastodonC/kixi.datastore | s3.clj | (ns kixi.datastore.filestore.s3
(:require [amazonica.core :as aws]
[amazonica.aws.s3 :as s3]
[amazonica.aws.s3transfer :as s3t]
[byte-streams :as bs]
[clojure.core.async :as async :refer [go]]
[com.stuartsierra.component :as component]
[kixi.data... | null | https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/filestore/s3.clj | clojure | LEGACY
NEW | (ns kixi.datastore.filestore.s3
(:require [amazonica.core :as aws]
[amazonica.aws.s3 :as s3]
[amazonica.aws.s3transfer :as s3t]
[byte-streams :as bs]
[clojure.core.async :as async :refer [go]]
[com.stuartsierra.component :as component]
[kixi.data... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.