_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
d271f324e66cb4b2cc34ee3c5897e3735ebc5d1246f7d78e2c6fa1a5f0da2cc2
haskell-works/hw-xml
Token.hs
module HaskellWorks.Data.Xml.Succinct.Cursor.Token ( xmlTokenAt ) where import Data.ByteString (ByteString) import HaskellWorks.Data.Bits.BitWise import HaskellWorks.Data.Drop import HaskellWorks.Data.Positioning import HaskellWorks.Data.RankSelect.Base.Rank1 import HaskellWorks.Dat...
null
https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/src/HaskellWorks/Data/Xml/Succinct/Cursor/Token.hs
haskell
module HaskellWorks.Data.Xml.Succinct.Cursor.Token ( xmlTokenAt ) where import Data.ByteString (ByteString) import HaskellWorks.Data.Bits.BitWise import HaskellWorks.Data.Drop import HaskellWorks.Data.Positioning import HaskellWorks.Data.RankSelect.Base.Rank1 import HaskellWorks.Dat...
8f198dca86810b95996f02ef48f619fae67e181ce6e8a16ad0041ab5bf8bc004
nrnrnr/qc--
one02RtlRec.ml
module M(Instruction : One02Constructors.S) = struct exception Error let (&&) x y = Base.lgand x y module RP = Rtl.Private module B = Bits module BO = Bitops let defaultOfInstruction rtl = (match rtl with | RP.Rtl [(RP.Const (RP.Bool true), RP.Store (RP.Cell...
null
https://raw.githubusercontent.com/nrnrnr/qc--/ec56191b669729e7ce8181a2bd97a912842ea716/tdpe/one02RtlRec.ml
ocaml
module M(Instruction : One02Constructors.S) = struct exception Error let (&&) x y = Base.lgand x y module RP = Rtl.Private module B = Bits module BO = Bitops let defaultOfInstruction rtl = (match rtl with | RP.Rtl [(RP.Const (RP.Bool true), RP.Store (RP.Cell...
bbf629efd4c34e93576dcdf493e69dc9c74aa839ef66282eeb7b07db36e41a2b
SchornacklabSLCU/amfinder
amfCallback.mli
AMFinder - amfCallback.mli * * MIT License * Copyright ( c ) 2021 * * 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 lim...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/amfCallback.mli
ocaml
* Event manager. * Magnifier. * Captures a snapshot of the magnified view. * Predictions. * Window events. * Arrow keys move cursor. * Letter change annotations. * Saves current image. * Events affecting the current tile displayed in the drawing area. * Updates the current tile after a mouse click. * Updates ...
AMFinder - amfCallback.mli * * MIT License * Copyright ( c ) 2021 * * 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 lim...
a0fcae6fa748f8c668da7571be35e47af846b9e7585b6bafbe7258c86e1c4450
peterschwarz/clj-gpio
poll.cljc
(ns gpio.poll #?(:clj (:require [clojure.core.async :as a :refer [go-loop]] [clojure.core.async.impl.protocols :as p]) :cljs (:require [cljs.nodejs :as nodejs])) #?(:clj (:import [io.bicycle.epoll EventPolling EventPoller PollEvent]))) #?( :clj (do (def ^:private POLLING_CONFIG (bit...
null
https://raw.githubusercontent.com/peterschwarz/clj-gpio/88fedec2605f6ff6713bfca382a9451538e99fe2/src/main/clojure/gpio/poll.cljc
clojure
(ns gpio.poll #?(:clj (:require [clojure.core.async :as a :refer [go-loop]] [clojure.core.async.impl.protocols :as p]) :cljs (:require [cljs.nodejs :as nodejs])) #?(:clj (:import [io.bicycle.epoll EventPolling EventPoller PollEvent]))) #?( :clj (do (def ^:private POLLING_CONFIG (bit...
ca3a5bcf4c1bb46bb3bda06d44effc105ad992437961bcd4c2a43af7d2aa14ed
ksaveljev/yampa-2048
Types.hs
module Types ( InputEvent , Tile(..) , Row , Column , Board(..) , GameState(..) , GameStatus(..) , Direction(..) , GameInput ) where import System.Random (StdGen) import FRP.Yampa (Event) import qualifi...
null
https://raw.githubusercontent.com/ksaveljev/yampa-2048/c436e59cd6de3ef024f4f8cf9ddfdef9facd5529/src/Types.hs
haskell
module Types ( InputEvent , Tile(..) , Row , Column , Board(..) , GameState(..) , GameStatus(..) , Direction(..) , GameInput ) where import System.Random (StdGen) import FRP.Yampa (Event) import qualifi...
ff9601a08ab004d27da81ef4465af3d4ae7bf0862d38d7cd4a2e85e9440b4408
psholtz/MIT-SICP
exercise1-22-stats.scm
;; ;; Code for calculating statistics. ;; ;; Includes procedures for calculating the "average" and "standard deviation" ;; of a set of numbers. Used (in this context) for calculating the distributions ;; in timing when finding large primes. ;; ;; PRIME TESTING PROCEDURES ( 1.22 ) ;; (define (smallest-divisor n) ...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-22-stats.scm
scheme
Code for calculating statistics. Includes procedures for calculating the "average" and "standard deviation" of a set of numbers. Used (in this context) for calculating the distributions in timing when finding large primes. STATISTICS PROCEDURES avg : list -> float average value of a list of numbers R...
PRIME TESTING PROCEDURES ( 1.22 ) (define (smallest-divisor n) (find-divisor n 2)) (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-divisor) (else (find-divisor n (+ test-divisor 1))))) (define (divides? a b) (= (remainder b a) 0)) (define (square x)...
6f5548dadc9435f117d398e4990a68ee12a32595e7f02bb21aad16cb028633be
TempusMUD/cl-tempus
magic.lisp
(in-package #:tempus) (defparameter +saving-throws+ #2A( PARA 0 - 10 11 - 20 21 - 30 31 - 40 41 - 50 46 46 46 46 46 46 46 46 46 46 45 44 43 42 41 40 39 38 37 36 35 35) ROD 0 - 10 11 - 20 21 - 30 31 - 40 41 - 50 20 20 20 20 20 20 20 20 20 20 0 0 0 0 0 0 ...
null
https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/actions/magic.lisp
lisp
BREATH SPELL CHEM PSIONIC physic Negative save modifiers make saving throws better! primary barb secondary barb primary barb secondary barb primary barb secondary barb primary barb secondary barb primary barb secondary barb
(in-package #:tempus) (defparameter +saving-throws+ #2A( PARA 0 - 10 11 - 20 21 - 30 31 - 40 41 - 50 46 46 46 46 46 46 46 46 46 46 45 44 43 42 41 40 39 38 37 36 35 35) ROD 0 - 10 11 - 20 21 - 30 31 - 40 41 - 50 20 20 20 20 20 20 20 20 20 20 0 0 0 0 0 0 ...
cb55f710785c9820e4b1afbb7600a9870dbac9c1029d5411c4fe1c543a22d10e
benoitc/hackney
hackney_socks5.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. %%% @doc socks 5 transport -module(hackney_socks5). -export([messages/1, connect/3, connect/4, recv/2, recv/3, send/2, setopts/2, controlling_process/2, peername/1, clo...
null
https://raw.githubusercontent.com/benoitc/hackney/6e79b2bb11a77389d3ba9ff3a0828a45796fe7a8/src/hackney_socks5.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc Atoms used to identify messages in {active, once | true} mode. get the proxy host and port from the options filter connection options upgrade the tcp connection @doc Receive a packet from a socket in passive mode. @see gen_tcp:recv/3 @doc Send a packet...
This file is part of hackney released under the Apache 2 license . @doc socks 5 transport -module(hackney_socks5). -export([messages/1, connect/3, connect/4, recv/2, recv/3, send/2, setopts/2, controlling_process/2, peername/1, close/1, shutdown/2, sockname/1]). -define(TIMEOUT, infinity). -t...
b7c7688388ef3bc03011c2d9bd292840f1f4281f515735a5ba47dee14ba9bfeb
elastic/eui-cljs
theme_amsterdam.cljs
(ns eui.theme-amsterdam (:require ["@elastic/eui/lib/themes/amsterdam/theme.js" :as eui])) (def EuiThemeAmsterdam eui/EuiThemeAmsterdam) (def euiThemeAmsterdam eui/euiThemeAmsterdam) (def AMSTERDAM_NAME_KEY eui/AMSTERDAM_NAME_KEY)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/theme_amsterdam.cljs
clojure
(ns eui.theme-amsterdam (:require ["@elastic/eui/lib/themes/amsterdam/theme.js" :as eui])) (def EuiThemeAmsterdam eui/EuiThemeAmsterdam) (def euiThemeAmsterdam eui/euiThemeAmsterdam) (def AMSTERDAM_NAME_KEY eui/AMSTERDAM_NAME_KEY)
65096c8beabab67c0fb193a6f55e1b7e0d625b19b002ee1d8854f04419424825
Leberwurscht/Diaspora-User-Directory
sksdump.ml
(************************************************************************) This file is part of SKS . SKS is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or (...
null
https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/sksdump.ml
ocaml
********************************************************************** *********************************************************************
This file is part of SKS . SKS is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distributed in ...
cc466a9ba77c77b45f945a7b14f8c42408e2758306985e6afeed47ce994fd924
henrikurms/tail2futhark
AST.hs
module Tail2Futhark.Futhark.AST where newtype Program = Program [FunDecl] -- | Boolean is true if entry point. data FunDecl = FunDecl Bool Type Ident [TypeSizeParam] [Arg] Exp data DimDecl = AnyDim | NamedDim Ident | ConstDim Int deriving (Show, Eq, Ord) data Type = IntT | Int8T | F...
null
https://raw.githubusercontent.com/henrikurms/tail2futhark/505c0c98eec1d93834671b12c041cb873133aff1/src/Tail2Futhark/Futhark/AST.hs
haskell
| Boolean is true if entry point.
module Tail2Futhark.Futhark.AST where newtype Program = Program [FunDecl] data FunDecl = FunDecl Bool Type Ident [TypeSizeParam] [Arg] Exp data DimDecl = AnyDim | NamedDim Ident | ConstDim Int deriving (Show, Eq, Ord) data Type = IntT | Int8T | F32T | F64T | Bool...
afe86b2d75f29bdebeea9c49e34aa2d6accacf195771ce39ed1b33411bd4f3f9
rigetti/rpcq
package.lisp
;;;; src/package.lisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Copyright 2018 Rigetti Computing ;;;; 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 cop...
null
https://raw.githubusercontent.com/rigetti/rpcq/3a734718d5c2bb7ed57ad612e2c7158736d1a650/src/package.lisp
lisp
src/package.lisp Copyright 2018 Rigetti Computing 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 ...
distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and (defpackage #:rpcq (:use #:cl #:alexandria #:yason) (:export #:defmessage #:serialize #:deserialize #:clear-messages #:pytho...
683af98ad617ce1a91bbb5d69178ef5472b1fbe08df812aa9d2ae682bdae6aa9
blindglobe/common-lisp-stat
unittests-lstypes.lisp
;;; -*- mode: lisp -*- ;;; File: unittests-lstypes.lisp Author : < > Copyright : ( c)2008 , . License : BSD , see LICENSE.BSD file for details . Purpose : unit - tests for lispstat typing . Time - stamp : < 2009 - 04 - 02 16:13:25 tony > Creation : < 2008 - 05 - 09 14:16:56 ton...
null
https://raw.githubusercontent.com/blindglobe/common-lisp-stat/0c657e10a4ee7e8d4ef3737f8c2d4e62abace2d8/src/unittests/unittests-lstypes.lisp
lisp
-*- mode: lisp -*- File: unittests-lstypes.lisp What is this talk of 'release'? Klingons do not make software 'releases'. Our software 'escapes', leaving a bloody trail of designers and quality assurance people in its wake. check-nonneg-fixnum (run-tests :suite 'lisp-stat-ut-types) (describe (run-tests...
Author : < > Copyright : ( c)2008 , . License : BSD , see LICENSE.BSD file for details . Purpose : unit - tests for lispstat typing . Time - stamp : < 2009 - 04 - 02 16:13:25 tony > Creation : < 2008 - 05 - 09 14:16:56 tony > (in-package :lisp-stat-unittests) (deftestsuite lisp-st...
cff9a8ee6bd6bd5c05b09c2165555bbddeed98c047449581efafc8e35ac768a5
nshepperd/funn
Blob.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module AI.Funn.CL.Blob ( Bl...
null
https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/CL/Blob.hs
haskell
# LANGUAGE RankNTypes # Classes -- freeBlob :: MonadIO m => BlobT q a n -> m () Arithmetic operations --
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module AI.Funn.CL.Blob ( BlobT(..), Blob, MBlob, crea...
3cb48407394ca68d22c7fecaa8d95eb589d7a661d45bf845679c5bfcf1fc49c8
TheLortex/mirage-monorepo
flow.mli
* Flows are used to represent byte streams , such as open files and network sockets . A { ! source } provides a stream of bytes . A { ! sink } consumes a stream . A { ! two_way } can do both . To read structured data ( e.g. a line at a time ) , wrap a source using { ! } . A {!source} provides a ...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/flow.mli
ocaml
* {2 Reading} * Sources can offer a list of ways to read them, in order of preference. * [read_exact src dst] keeps reading into [dst] until it is full. @raise End_of_file if the buffer could not be filled. * [string_source s] is a source that gives the bytes of [s]. * [cstruct_source cs] is a source that gives...
* Flows are used to represent byte streams , such as open files and network sockets . A { ! source } provides a stream of bytes . A { ! sink } consumes a stream . A { ! two_way } can do both . To read structured data ( e.g. a line at a time ) , wrap a source using { ! } . A {!source} provides a ...
26a9755d40663e3b8fd7fd5e663dcbe84618aeabbd502616794d542d7d934d3a
tjammer/raylib-ocaml
shapes_collision_area.ml
let width = 800 let height = 450 let screen_upper_limit = 40.0 let setup () = let open Raylib in init_window width height "raylib [shapes] example - collision area"; let box_a = Rectangle.create 10.0 (Float.of_int ((get_screen_height () / 2) - 50)) 200.0 100.0 in let box_a_speed_x = 4.0 in ...
null
https://raw.githubusercontent.com/tjammer/raylib-ocaml/76955c30d0a776138daeb93bfc73b104aefc6f6d/examples/shapes/shapes_collision_area.ml
ocaml
Move box if not paused Bounce box on x screen limits Update player-controlled-box (box02) Make sure Box B does not go out of move area limits Check boxes collision Pause Box A movement
let width = 800 let height = 450 let screen_upper_limit = 40.0 let setup () = let open Raylib in init_window width height "raylib [shapes] example - collision area"; let box_a = Rectangle.create 10.0 (Float.of_int ((get_screen_height () / 2) - 50)) 200.0 100.0 in let box_a_speed_x = 4.0 in ...
5f6412230c7189b9c645265c728d144b4e76c2385671eb967f563c952b234c0c
dterei/SafeHaskellExamples
GHCIOArray.hs
module GHCIOArray where import GHC.IOArray bad1 = unsafeReadIOArray bad2 = unsafeWriteIOArray
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/deprecate/GHCIOArray.hs
haskell
module GHCIOArray where import GHC.IOArray bad1 = unsafeReadIOArray bad2 = unsafeWriteIOArray
3bbb3b56ee4825286ec4456a424d37e22ce07158bb76cf186f1e622d8b6e2923
jaredponn/Fly-Plane-Fly
Physics.hs
# LANGUAGE InstanceSigs # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # module Physics where import Control.Monad.State import Control.Lens import Linear.V2 import GameVars import PlayerManager import TimeManager import Logger class Monad m => Physics m where applyGrav :: m () setGrav ...
null
https://raw.githubusercontent.com/jaredponn/Fly-Plane-Fly/8e250f29216f2f75dac2dd0235a2b0243d601620/src/Physics.hs
haskell
converts the gravity into velocity allows the addition of any given velocity number to the current velocity applies the velocity to the position by using dt to update the y position applies the velocity to the position by using dt to update the y position
# LANGUAGE InstanceSigs # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # module Physics where import Control.Monad.State import Control.Lens import Linear.V2 import GameVars import PlayerManager import TimeManager import Logger class Monad m => Physics m where applyGrav :: m () setGrav ...
15e47d5ccc164497f40b3282a53f49bcea3801464e87670cea16252c48d3131d
rbkmoney/fistful-server
ff_range.erl
%%% %%% Ranges w/ optional bounds on ordered types. -module(ff_range). -type range(T) :: {maybe(bound(T)), maybe(bound(T))}. -type bound(T) :: {exclusive | inclusive, ord(T)}. -type maybe(T) :: infinity | T. % totally ordered -type ord(T) :: T. -export_type([range/1]). -export_type([bound/1]). -export([intersect/2...
null
https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_core/src/ff_range.erl
erlang
Ranges w/ optional bounds on ordered types. totally ordered Tests
-module(ff_range). -type range(T) :: {maybe(bound(T)), maybe(bound(T))}. -type bound(T) :: {exclusive | inclusive, ord(T)}. -type maybe(T) :: infinity | T. -type ord(T) :: T. -export_type([range/1]). -export_type([bound/1]). -export([intersect/2]). -export([contains/2]). -spec intersect(range(T), range(T)) -> ra...
dcecb34af8c21f91601b19f2e5361c0c286ddd75c56e9d74aa0ab35eb92cf76a
ijvcms/chuanqi_dev
player_foe_db.erl
%%%------------------------------------------------------------------- @author yubing ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 10 . 十二月 2015 19:32 %%%------------------------------------------------------------------- -module(player_foe_db). %% API -export([ select_row/1, select_all/1, inser...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/relationship/player_foe_db.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ====================================================================
@author yubing ( C ) 2015 , < COMPANY > Created : 10 . 十二月 2015 19:32 -module(player_foe_db). -export([ select_row/1, select_all/1, insert/1, update/2, delete/1 ]). -include("record.hrl"). -include("cache.hrl"). -include("common.hrl"). select_row({PlayerId, TPlayerId}) -> case db:select_row(player_foe, ...
62fe3548d582861a4213c5a9771dd3262fdd7aa7ef8868d55d5897031c1ff047
alvatar/spheres
circular-vector.scm
;;!!! A very simple fixed-size circular vector .author Per Eckerdal .author , 2015 (define-type circular-vector constructor: make-circular-vector-internal (vec read-only:) pos) (define* (make-circular-vector size (init 0)) (make-circular-vector-internal (make-vector size init) 0)) (define (circ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/structure/circular-vector.scm
scheme
!!! A very simple fixed-size circular vector
.author Per Eckerdal .author , 2015 (define-type circular-vector constructor: make-circular-vector-internal (vec read-only:) pos) (define* (make-circular-vector size (init 0)) (make-circular-vector-internal (make-vector size init) 0)) (define (circular-vector-length v) (vector-length (circ...
b7fd18d1825b236c18bfb04a6b689d736f970915b9f59831029a45f3eb047e95
fluent/fluent-logger-erlang
fluent.erl
-module(fluent). -export([start/0, stop/0]). -spec start() -> ok | {error, term()}. start() -> application:start(fluent). -spec stop() -> ok. stop() -> application:stop(fluent).
null
https://raw.githubusercontent.com/fluent/fluent-logger-erlang/dae01a5a010d21916515212e5b41d2411e84277c/src/fluent.erl
erlang
-module(fluent). -export([start/0, stop/0]). -spec start() -> ok | {error, term()}. start() -> application:start(fluent). -spec stop() -> ok. stop() -> application:stop(fluent).
05f6d7e2bf2ce0b497d2ea7aac14110e16ad96f1c26f2de9281523b0f4ff4939
racehub/om-bootstrap
block.cljs
#_ (:require [om-bootstrap.button :as b] [om-tools.dom :include-macros true]) (d/div {:class "well" :style {:max-width 400 :margin "0 auto 10px"}} (b/button {:bs-style "primary" :bs-size "large" :block? true} "Block level button") (b/button {:bs-size "la...
null
https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/button/block.cljs
clojure
#_ (:require [om-bootstrap.button :as b] [om-tools.dom :include-macros true]) (d/div {:class "well" :style {:max-width 400 :margin "0 auto 10px"}} (b/button {:bs-style "primary" :bs-size "large" :block? true} "Block level button") (b/button {:bs-size "la...
a95eee561277e321cc7f7cec188b31200b88bb7daf8b696e5f2c94314056e51e
fetburner/Coq2SML
coqmktop.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/scripts/coqmktop.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Objects to link environment Bui...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * coqmktop is a script to lin...
d6401b1c65f3acd682c8c4443de87072faea2c9b79b3c652b47bba492a17aad7
SOwens/example-compiler
compile.ml
* Example compiler * Copyright ( C ) 2015 - 2017 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any ...
null
https://raw.githubusercontent.com/SOwens/example-compiler/b155e89c7d9d0ae6ec671ae9cb4356c78dda7ab7/src/compile.ml
ocaml
The main driver for the compiler executable. Command-line arguments Build a main function that just runs the initialisation of all of the globals
* Example compiler * Copyright ( C ) 2015 - 2017 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any ...
18fd575c2ae12cf0b2f963fba2a34e075efe1c5a83403ab87d31c88fc2f9da6b
vollmerm/racket-ga
sinbowl.rkt
#lang racket ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; sinbowl.rkt , 2013 ; ; This is an example. It shows how you can call racket-ga from another Racket module, including how to define ; an evaulation function and a reporting function....
null
https://raw.githubusercontent.com/vollmerm/racket-ga/00722449976563a42c10e774b9e74b55b1f717a0/sinbowl.rkt
racket
sinbowl.rkt This is an example. It shows how you can call racket-ga from another Racket module, including how to define an evaulation function and a reporting function. print out the results print out the results
#lang racket , 2013 The following code attempts to minimize the " sinbowl " function , which is f(x ) = ( 0.1 * ) ) - sin(x ) (require "population.rkt") (require "parallel-population.rkt") (define evaluate '(lambda (lst) (let ((sinbowl (lambda (value) (- (* (abs value) 0.1) (sin value))))) (sinbowl (car...
647cbb16e47963e17725d5d58c56d2f8270367a9b17aec6b8f8328bc35d1f3f8
babashka/process
project.clj
(defproject babashka/process "0.4.16" :description "Clojure library for shelling out / spawning subprocesses" :url "" :scm {:name "git" :url ""} :license {:name "EPL-1.0" :url "-1.0/"} :dependencies [[org.clojure/clojure "1.9.0"] [babashka/fs "0.2.12"]] :deploy-repositor...
null
https://raw.githubusercontent.com/babashka/process/011c3dcbd370bbf0a54e3a9c4fb5777a62a29441/project.clj
clojure
(defproject babashka/process "0.4.16" :description "Clojure library for shelling out / spawning subprocesses" :url "" :scm {:name "git" :url ""} :license {:name "EPL-1.0" :url "-1.0/"} :dependencies [[org.clojure/clojure "1.9.0"] [babashka/fs "0.2.12"]] :deploy-repositor...
3fce54725e0e47bcdae3aee308b0692f8bbf426406bfbe3b4a27fad963d26919
circuithub/rel8
Table.hs
# language AllowAmbiguousTypes # # language DataKinds # {-# language DefaultSignatures #-} {-# language FlexibleContexts #-} # language FlexibleInstances # # language FunctionalDependencies # {-# language ScopedTypeVariables #-} # language StandaloneKindSignatures # # language TypeApplications # {-# language TypeFamili...
null
https://raw.githubusercontent.com/circuithub/rel8/119c825e552b9ee3728992f545afda61e07d7625/src/Rel8/Table.hs
haskell
# language DefaultSignatures # # language FlexibleContexts # # language ScopedTypeVariables # # language TypeFamilies # # language UndecidableInstances # base rel8 types that have a finite number of columns. Each of these columns contains data under a shared context, and contexts describe how to interpret the cont...
# language AllowAmbiguousTypes # # language DataKinds # # language FlexibleInstances # # language FunctionalDependencies # # language StandaloneKindSignatures # # language TypeApplications # module Rel8.Table ( Table ( Columns, Context, fromColumns, toColumns , FromExprs, fromResult, toResult , Tra...
41ab72c6569acb329dc08523cf876c30492137f52d28ebb548bdf4ee606e2a3f
Ptival/chick
Branch.hs
{ - # LANGUAGE FlexibleInstances # - } { - # LANGUAGE MultiParamTypeClasses # - } -- {-# OPTIONS_GHC -fno-warn-orphans #-} module PrettyPrinting . Chick . Branch -- ( -- ) -- where import Control . . Reader import Data . Default import Language ( Language ( Chick ) ) import PrettyPrinting . Chick ....
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/PrettyPrinting/Chick/Branch.hs
haskell
{-# OPTIONS_GHC -fno-warn-orphans #-} ( ) where import Term.Term instance PrettyPrintableUnannotated 'Chick (Branch α Variable) where prettyDocU b = do precs <- ask
{ - # LANGUAGE FlexibleInstances # - } { - # LANGUAGE MultiParamTypeClasses # - } module PrettyPrinting . Chick . Branch import Control . . Reader import Data . Default import Language ( Language ( Chick ) ) import PrettyPrinting . Chick . Term as PPChick import PrettyPrinting . PrettyPrintable imp...
9b876f2f17fb94fe67c012c43ec4dc7939567ae6fd01ada94308c3b37c18f225
ocaml-omake/omake
lm_string_util.mli
(* * Faster comparison function for strings *) val string_compare : string -> string -> int (* * Check whether the string has a substring. * * equal_substring s1 off s2 * * Check whether s2 is a substring of s1 at offset off. * No exceptions raised. *) val equal_substring : string -> int -> string -> bool ...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_string_util.mli
ocaml
* Faster comparison function for strings * Check whether the string has a substring. * * equal_substring s1 off s2 * * Check whether s2 is a substring of s1 at offset off. * No exceptions raised. * Hex representation of a string. * Find a char in a string. * Find/replace in a string * Membe...
val string_compare : string -> string -> int val equal_substring : string -> int -> string -> bool * Check whether the first string is a prefix of the second . * Check whether the first string is a prefix of the second. *) val is_string_prefix : string -> string -> bool val unhex : char -> int val hexify : s...
927d999eda7a960f0c1e1f06e8ce0d19bfa6c4fc133f661dbb97501fafcdc730
namachan10777/scad-ml
rotMatrix.ml
type t = float array array let of_row_list_exn l = if List.length l = 3 then ( let mat = Array.make_matrix 3 3 0. in let set_row i (c0, c1, c2) = mat.(i).(0) <- c0; mat.(i).(1) <- c1; mat.(i).(2) <- c2 in List.iteri set_row l; mat ) else failwith "Rotation matrix must have 3...
null
https://raw.githubusercontent.com/namachan10777/scad-ml/ea7bef5e532e65112b190b2c1316fe240abd65c1/lib/rotMatrix.ml
ocaml
type t = float array array let of_row_list_exn l = if List.length l = 3 then ( let mat = Array.make_matrix 3 3 0. in let set_row i (c0, c1, c2) = mat.(i).(0) <- c0; mat.(i).(1) <- c1; mat.(i).(2) <- c2 in List.iteri set_row l; mat ) else failwith "Rotation matrix must have 3...
75eb760a98e476e5ba9fc208d916a2d34d73a068d75c2335099ab5fdc392c4bb
ygrek/mldonkey
gui_uploads.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/gui/gui_uploads.ml
ocaml
* The box with uploads info fuck the object oriented style: how do I copy something to the console ???? ignore (self#misc#grab_selection `PRIMARY); self#misc#add_selection_target ~target:"string" `PRIMARY; ignore (self#misc#connect#selection_get (fun sel ~info ~time -> lprintf ...
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
a324c55c7595b6a1812f4ead84a32ef4eba287e2c16c47dcae83b8eac7542d19
cyverse-archive/DiscoveryEnvironmentBackend
user_session_queries.clj
(ns kameleon.user-session-queries (:use [kameleon.core] [kameleon.entities] [kameleon.uuids] [kameleon.misc-queries] [korma.core])) (defn user-sessions-seq "Returns all of the sessions associated with the given username. Should only be a single item. Doesn't validate that the use...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/kameleon/src/kameleon/user_session_queries.clj
clojure
(ns kameleon.user-session-queries (:use [kameleon.core] [kameleon.entities] [kameleon.uuids] [kameleon.misc-queries] [korma.core])) (defn user-sessions-seq "Returns all of the sessions associated with the given username. Should only be a single item. Doesn't validate that the use...
9d8d6b6ae19c0119bee9fe5ba4c6f98d7fc8c6b1dcd251ba34344e83ae35b463
ghc/nofib
Env.hs
module Env (Env, initEnv, lookupEnv, enterEnv) where import Ast import BasicNumber -- environment is a list of variable bindings. type Env = [(String, BasicExp)] -- initial environment initEnv :: Env -> Env initEnv _ = [("$prec", (Numb 20))] -- environment lookup lookupEnv :: String -> Env -> BasicExp lookupEnv str...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/symalg/Env.hs
haskell
environment is a list of variable bindings. initial environment environment lookup enter a new element to the environment, remove the duplicate if exists.
module Env (Env, initEnv, lookupEnv, enterEnv) where import Ast import BasicNumber type Env = [(String, BasicExp)] initEnv :: Env -> Env initEnv _ = [("$prec", (Numb 20))] lookupEnv :: String -> Env -> BasicExp lookupEnv str [] = BSError lookupEnv str ((s,bexp):es) = if s==str then bexp else lookupEnv str ...
ca08e08efe904817e3c20b0f1e217d53fdbad99cfe6807fa3b2b20e8136c9625
jeapostrophe/opencl
DwtHaar1D.rkt
#lang racket (require opencl/c "../atiUtils/utils.rkt" ffi/unsafe ffi/cvector ffi/unsafe/cvector) (define setupTime -1) (define totalKernelTime -1) (define devices #f) (define context #f) (define commandQueue #f) (define program #f) (define kernel #f) (define signalLength (arithmeti...
null
https://raw.githubusercontent.com/jeapostrophe/opencl/f984050b0c02beb6df186d1d531c4a92a98df1a1/tests/opencl/samples/atiSamples/DwtHaar1D/DwtHaar1D.rkt
racket
#lang racket (require opencl/c "../atiUtils/utils.rkt" ffi/unsafe ffi/cvector ffi/unsafe/cvector) (define setupTime -1) (define totalKernelTime -1) (define devices #f) (define context #f) (define commandQueue #f) (define program #f) (define kernel #f) (define signalLength (arithmeti...
92828e7fecae081431a3080bc84172d4adeba2c439d3b0b345be80f38ce7ffb4
motoshira/lib_for_competitive_programming
splay-tree.lisp
;;; ;;; bof ;;; (defpackage splay-tree (:use #:cl) (:nicknames #:sp) (:shadow #:merge #:remove #:length #:replace) (:export #:node #:ops #:make-ops #:make-simple-ops #:ref #:length #:merge #:split ...
null
https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/b2f8fa44ec8fc34a05a60eca6b8f3160a0509540/experimental/splay-tree.lisp
lisp
bof helpers data structure accessors helpers nodeがroot pがroot zig-zig zig-zag main MEMO typing of value would be little effect for performance... others
(defpackage splay-tree (:use #:cl) (:nicknames #:sp) (:shadow #:merge #:remove #:length #:replace) (:export #:node #:ops #:make-ops #:make-simple-ops #:ref #:length #:merge #:split #:insert ...
9d4d6e3736c21d7a6d41bdde1273e438685296386d9b016f900173b1a1a8503a
sids/nerchuko
helpers.clj
(ns nerchuko.examples.newsgroups.helpers (:use [nerchuko helpers utils] nerchuko.text.helpers) (:use [clojure.contrib.duck-streams :only (read-lines)] [clojure.contrib.str-utils :only (str-join)] [clojure.contrib.seq-utils :only (frequencies)])) (defn- get-files "Given a seq of directorie...
null
https://raw.githubusercontent.com/sids/nerchuko/8aa56497dd8e93e868713dd542667a56215522fb/src/nerchuko/examples/newsgroups/helpers.clj
clojure
gets rid of the header
(ns nerchuko.examples.newsgroups.helpers (:use [nerchuko helpers utils] nerchuko.text.helpers) (:use [clojure.contrib.duck-streams :only (read-lines)] [clojure.contrib.str-utils :only (str-join)] [clojure.contrib.seq-utils :only (frequencies)])) (defn- get-files "Given a seq of directorie...
9569c8c6458867e94dc4ff41dda66010521bcb3910c298bfd790b19e622081c4
windorg/app-old
Static.hs
module Web.Controller.Static where import qualified Data.ByteString.Lazy as LBS import Network.HTTP.Types (status200) import Network.HTTP.Types.Header (hContentType) import Network.Wai (responseLBS) import Web.Controller.Prelude import Web.View.Static.Welcome instance Controller StaticController where action Welc...
null
https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Web/Controller/Static.hs
haskell
module Web.Controller.Static where import qualified Data.ByteString.Lazy as LBS import Network.HTTP.Types (status200) import Network.HTTP.Types.Header (hContentType) import Network.Wai (responseLBS) import Web.Controller.Prelude import Web.View.Static.Welcome instance Controller StaticController where action Welc...
af7d742ad81b1285d22e9af0288d527443fad9f003d5a4f93aa1ed7efbec53ae
skruger/ClusterSupervisor
service_manager_app.erl
-module(service_manager_app). -behaviour(application). %% -------------------------------------------------------------------- %% Include files %% -------------------------------------------------------------------- %% -------------------------------------------------------------------- %% Behavioural exports %% ---...
null
https://raw.githubusercontent.com/skruger/ClusterSupervisor/92db35944c3da1efdaa8b0b84cc701ad23ee1281/src/service_manager_app.erl
erlang
-------------------------------------------------------------------- Include files -------------------------------------------------------------------- -------------------------------------------------------------------- Behavioural exports -------------------------------------------------------------------- ---...
-module(service_manager_app). -behaviour(application). -export([ start/2, stop/1 ]). -export([]). Macros Records Returns : { ok , Pid } | { ok , Pid , State } | start(_Type, StartArgs) -> case service_manager_sup:start_link(StartArgs) of {ok, Pid} -> {ok, Pid}; E...
8a82e6412d2f62e054dd0d499020e24b3804c9eebca14748f026394e30955010
bscarlet/llvm-general
MemoryBuffer.hs
{-# LANGUAGE ForeignFunctionInterface #-} module LLVM.General.Internal.FFI.MemoryBuffer where import LLVM.General.Prelude import Foreign.Ptr import Foreign.C import LLVM.General.Internal.FFI.LLVMCTypes data MemoryBuffer foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWi...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/Internal/FFI/MemoryBuffer.hs
haskell
# LANGUAGE ForeignFunctionInterface #
module LLVM.General.Internal.FFI.MemoryBuffer where import LLVM.General.Prelude import Foreign.Ptr import Foreign.C import LLVM.General.Internal.FFI.LLVMCTypes data MemoryBuffer foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile :: Ptr CChar -> Ptr (Ptr Me...
05e302d80a24d2d6720d5155a4f1c0c9e1a4a43258c3573f1fa4cab8b33dfdb1
spell-music/csound-expression
BoxModel.hs
# Language DeriveFunctor , CPP # module Csound.Typed.Gui.BoxModel( Rect(..), Offset(..), AbsScene(..), Scene(..), draw, hor, ver, sca, margin, padding, space, prim, appendContext, cascade, boundingRect, zeroRect ) where import Control.Monad import Control.Monad.Trans.State.Strict import Data.Default d...
null
https://raw.githubusercontent.com/spell-music/csound-expression/b2ebcfc7f7cf62d5e67779fea0aacefa3724db74/csound-expression-typed/src/Csound/Typed/Gui/BoxModel.hs
haskell
| A rectangle. no need to scale the rect we use scaling factor in the groups (hor/ver) --------------------------------------------- cascading update of the context --------------------------------------------- calculate bounding rect
# Language DeriveFunctor , CPP # module Csound.Typed.Gui.BoxModel( Rect(..), Offset(..), AbsScene(..), Scene(..), draw, hor, ver, sca, margin, padding, space, prim, appendContext, cascade, boundingRect, zeroRect ) where import Control.Monad import Control.Monad.Trans.State.Strict import Data.Default d...
cf019c437acd8e6fb378446e3ed975141e186697b9f207fc0f45a4aaf36b69db
kupl/LearnML
patch.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let rec eval2 (e : exp) : int = ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub22/patch.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let rec eval2 (e : exp) : int = ...
bd9cf43e5fa8e1bd5631b6735275770abffa1031ab81516fefdd45a3a7fc93bc
SOwens/example-compiler
constProp.ml
* Example compiler * Copyright ( C ) 2015 - 2017 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any ...
null
https://raw.githubusercontent.com/SOwens/example-compiler/b155e89c7d9d0ae6ec671ae9cb4356c78dda7ab7/src/constProp.ml
ocaml
Decides whether evaluating an expression might have a side-effect Array bound check failure The called function could do something Statically evaluate an expression according to the identifier values in env, don't try to follow constants in arrays. Operates in a single bottom-up pass. Doesn't do anything w...
* Example compiler * Copyright ( C ) 2015 - 2017 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any ...
140057039bafa3bbeba59cb1a02290c78b2f3ef0fab06c9f9001a67f6aafdbc4
herbelin/coq-hh
refiner.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/proofs/refiner.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * The refiner (handles primitive rul...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Term open Sign open Evd ...
77f162bdce114be46d615084430add8cad5abf39041719d12b9c2fc36b67f609
karlhof26/gimp-scheme
script-fu-pan-to-bow.scm
Pan to Bow , V1.0 ; , ( c ) 2009 ; ; DESCRIPTION: Takes a wide panoramic image and bends it into a ; rainbow-shaped image in a way that preserves scale and aspect ratio. ; ONE MOTIVATION : On image hosting sites like flickr , images are ; displayed according to their largest linear dimension, so large ; aspect-r...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/1dc7b78920df8e55621b43ad8cd11322feb8146c/script-fu-pan-to-bow.scm
scheme
DESCRIPTION: Takes a wide panoramic image and bends it into a rainbow-shaped image in a way that preserves scale and aspect ratio. displayed according to their largest linear dimension, so large aspect-ratio shots end up with very little real estate. By bending the image into a semi (or full) circle, you can g...
Pan to Bow , V1.0 , ( c ) 2009 ONE MOTIVATION : On image hosting sites like flickr , images are In particular , you want width / height > angle / 114.6 . For instance , for default 180 - degree bow , width / height > 1.57 and if I create an image from scratch , and save it as an .xcf file , This script w...
1d66c9c0d0b1033289db301844e7b1273ca70c50434b7589788566b236467d7a
ocaml/dune
alias.ml
open Stdune open Dune_engine type t = { name : Dune_engine.Alias.Name.t ; recursive : bool ; dir : Path.Source.t ; contexts : Dune_rules.Context.t list } let pp { name; recursive; dir; contexts = _ } = let open Pp.O in let s = (if recursive then "@" else "@@") ^ Path.Source.to_string (Pa...
null
https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/bin/alias.ml
ocaml
open Stdune open Dune_engine type t = { name : Dune_engine.Alias.Name.t ; recursive : bool ; dir : Path.Source.t ; contexts : Dune_rules.Context.t list } let pp { name; recursive; dir; contexts = _ } = let open Pp.O in let s = (if recursive then "@" else "@@") ^ Path.Source.to_string (Pa...
467561ee77c618bd0c46b8c7ae18fc4c9aafeee700d4f6acf84729a179409bff
EgorDm/fp-pacman
MainMenu.hs
module Game.Menu.MainMenu ( mainMenu ) where import Engine.Base import Graphics.Gloss.Game import Game.UI.Base import Game.Context.SwitchRoom import Game.Context.Room import Game.Menu.MenuShared playButtonF (EventKey (SpecialKey KeyEnter) Up _ _) b = b{itemSwitch = RoomSwitch "classic" ReloadRoom} playButtonF _ b...
null
https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Game/Menu/MainMenu.hs
haskell
module Game.Menu.MainMenu ( mainMenu ) where import Engine.Base import Graphics.Gloss.Game import Game.UI.Base import Game.Context.SwitchRoom import Game.Context.Room import Game.Menu.MenuShared playButtonF (EventKey (SpecialKey KeyEnter) Up _ _) b = b{itemSwitch = RoomSwitch "classic" ReloadRoom} playButtonF _ b...
f9129038127bcbbb38e52e5f2a5b9aae249129db30a3d6cdebceb392e2f542a6
dapphub/dapptools
Main.hs
{-# Language OverloadedStrings #-} import Jays (jays) import System.Environment (getArgs) import System.Exit (exitFailure, exitSuccess) import System.IO (stdout, stderr) import System.Posix.IO (stdInput) import System.Posix.Terminal (queryTerminal) import Data.Text (pack) import Data.Monoid ((<>)) import qualified ...
null
https://raw.githubusercontent.com/dapphub/dapptools/beaaeb6a6ad1cde22989bd088b10bdd06718b73f/src/jays/Main.hs
haskell
# Language OverloadedStrings # This is just for compatibility with jshon versioning
import Jays (jays) import System.Environment (getArgs) import System.Exit (exitFailure, exitSuccess) import System.IO (stdout, stderr) import System.Posix.IO (stdInput) import System.Posix.Terminal (queryTerminal) import Data.Text (pack) import Data.Monoid ((<>)) import qualified Data.ByteString.Lazy.Char8 as BS m...
d0fbff42f466e4706f17118d7764d2434281d25e857778a277a96fc463b5ea5c
arcfide/oleg
ssax-warn-vanilla.scm
(define (ssax:warn port msg . other-msg) (apply cerr (cons (string-append (string #\newline) "Warning: ") (cons msg other-msg))))
null
https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/lib/ssax-warn-vanilla.scm
scheme
(define (ssax:warn port msg . other-msg) (apply cerr (cons (string-append (string #\newline) "Warning: ") (cons msg other-msg))))
91bb26787b115b9385fcba0b491003e7af0c045c3b8a555ff36dc5d22169a887
ndmitchell/catch
Template.hs
module Train.Template(Template, templateInit, templateGet) where import Train.Type import Train.Reduce import Train.Fixp import System.IO import Data.BDD import General.General import Data.IORef import Data.Char import Data.List import Control.Monad import Hite data Template = Template ZHite Handle (IORef [(Req, Re...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Train/Template.hs
haskell
need to make it more abstract, and then more concrete, to satisfy the cache can do it more efficiently, a fixp cut
module Train.Template(Template, templateInit, templateGet) where import Train.Type import Train.Reduce import Train.Fixp import System.IO import Data.BDD import General.General import Data.IORef import Data.Char import Data.List import Control.Monad import Hite data Template = Template ZHite Handle (IORef [(Req, Re...
c2254b45b43368602a6e214695a9c84364aa133345174444a2c1706fc856a1f2
facebookarchive/pfff
arith_status.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/arith_status.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : arith_status.ml 11156 2011 - 07 - 27 14...
270c8cb4d33bdab417e9d812eafb02d6b25048a61854d8d7873b041a70c91471
AccelerateHS/accelerate
Scan.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Array.Accelerate.Test.NoFib.Prelude.Scan ...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Test/NoFib/Prelude/Scan.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ConstraintKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # | Module : Data.Array.Accelerate.Test.NoFib.Prelude.Scan License : BSD3 Stability : experimental don't generate too many segments don't ...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # Copyright : [ 2009 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.Test.NoFib.Prelude.Scan ( test_scanl, test_scanlSeg, test_scanl1, test_scanl1Seg, test_...
649dde11b18f2b6f3dd5aa992874af56059d69321b0f81ce9b68f2a68b271813
tmprender/texy
sast.ml
(* Semantically-checked Abstract Syntax Tree and functions for printing it *) open Ast type sexpr = typ * sx and sx = SLiteral of int | SFliteral of string | SWordLit of string | SCharLit of char | SBoolLit of bool | SConbin of sexpr | SBincon of sexpr | SBitflip of sexpr | SShiftup of sexpr * ...
null
https://raw.githubusercontent.com/tmprender/texy/e9bf4c9195aa7b590e8c5f3f7291f6e6005071b6/sast.ml
ocaml
Semantically-checked Abstract Syntax Tree and functions for printing it Pretty-printing functions
open Ast type sexpr = typ * sx and sx = SLiteral of int | SFliteral of string | SWordLit of string | SCharLit of char | SBoolLit of bool | SConbin of sexpr | SBincon of sexpr | SBitflip of sexpr | SShiftup of sexpr * sexpr | SShiftdown of sexpr * sexpr | SConcat of sexpr * sexpr | SArrAcc ...
cc86b8ec4bfb7deaeaa309389a806ea0392fa15815bf9822db29f9416e34ae01
dlowe-net/orcabot
bitcoin.lisp
(in-package #:orcabot) (define-condition bitcoin-error () ((message :accessor message-of :initarg :message))) (defmethod print-object ((object bitcoin-error) stream) (print-unreadable-object (object stream) (format stream "~a" (message-of object)))) (defvar *bitcoin-request-cache* nil) (defvar *bitcoin-reque...
null
https://raw.githubusercontent.com/dlowe-net/orcabot/bf3c799337531e6b16086e8105906cc9f8808313/src/bitcoin.lisp
lisp
(in-package #:orcabot) (define-condition bitcoin-error () ((message :accessor message-of :initarg :message))) (defmethod print-object ((object bitcoin-error) stream) (print-unreadable-object (object stream) (format stream "~a" (message-of object)))) (defvar *bitcoin-request-cache* nil) (defvar *bitcoin-reque...
d9b5cd6f164415836f62de3c95e795baaabc29745d8d3ac36d750cbee8917301
ztellman/lamina
query.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by...
null
https://raw.githubusercontent.com/ztellman/lamina/07c3fb84fdb3f4a4892c0bdbe3abf28788bdeb29/src/lamina/query.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns lamina.query (:use [potemkin] [lamina core]) (:require [lamina.time :as time] [lamina.query.core :as c] [lamina.query.parse :as p] [lamina.query.struct :as s] [lamina.query.operators :as o])) (import-vars [lamina.query.core def-q...
7a3b974c7a62c567e21583d54dd15f70ec0d3e9303ed1a8bf82a02dab6263a82
commercialhaskell/stack
Main.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import qualified Data.ByteString.Char8 as C8 import Data.FileEmbed import Data.List import Unlisted main :: IO () main = do putStrLn ("main " ++ show foo ++ " " ++ show em...
null
https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/32-unlisted-module/files/src/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Main where import Control.Monad import qualified Data.ByteString.Char8 as C8 import Data.FileEmbed import Data.List import Unlisted main :: IO () main = do putStrLn ("main " ++ show foo ++ " " ++ show embedded) when ("FAIL" `C8.isPref...
a505d9fe8dde77af0db22d6bc45e7f28475bd14d9aeb4020441b4df5e0d14632
janestreet/memtrace_viewer_with_deps
app.mli
open! Core_kernel open Bonsai_web open Memtrace_viewer_common val component : data:Data.t Bonsai.Value.t -> server_state:Server_state.t Bonsai.Value.t -> inject_outgoing:(Action.t -> Vdom.Event.t) Bonsai.Value.t -> Vdom.Node.t Bonsai.Computation.t
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/client/app.mli
ocaml
open! Core_kernel open Bonsai_web open Memtrace_viewer_common val component : data:Data.t Bonsai.Value.t -> server_state:Server_state.t Bonsai.Value.t -> inject_outgoing:(Action.t -> Vdom.Event.t) Bonsai.Value.t -> Vdom.Node.t Bonsai.Computation.t
2a7e88c1cd8ba17bb97545397c891801ee757741e94734ec76ff70a03d244edb
jrm-code-project/LISP-Machine
interpreter-macros.lisp
-*- Mode : LISP ; Package : INTERPRETER ; : CL ; ; Lowercase : T -*- ;;; ;;; ;;; INTERPRETER MACROS ;;; defun , defvar , defparameter , defconstant ;;; ;;; Something like this eventually belongs in SI: for use by the interpreter and ;;; the compiler. DEFUN ;;; ;;; (defun foo (args) body) does the following: ;...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/rauen/interpreter-macros.lisp
lisp
Package : INTERPRETER ; : CL ; ; Lowercase : T -*- INTERPRETER MACROS Something like this eventually belongs in SI: for use by the interpreter and the compiler. (defun foo (args) body) does the following: Raises an error if foo is not a symbol. If the new evaluator is installed and active, puts #'(lambd...
defun , defvar , defparameter , defconstant DEFUN (defmacro defun (name lambda-list &body function-body) (cond ((not (symbolp name)) `(FERROR "~S is an invalid function identifier." ',name)) ((and (boundp 'user::*use-old-evaluator*) (not user::*use-old-evaluator*)) (multiple-value-bind...
78555b6010cf08078cea484e382fb7d0df5a27fe9a9aef86be888b77e1a057b5
TatriX/cl-sdl2-tutorial
04-key-presses.lisp
(defpackage #:sdl2-tutorial-04-key-presses (:use :cl) (:export :run) (:import-from :sdl2-tutorial-utils :asset-pathname)) (in-package :sdl2-tutorial-04-key-presses) (defparameter *screen-width* 640) (defparameter *screen-height* 480) (defmacro with-window-surface ((window surface) &body body) `(sdl2:with-ini...
null
https://raw.githubusercontent.com/TatriX/cl-sdl2-tutorial/ac3613160df0120c4b12de6f7989add0e81c9e63/04-key-presses.lisp
lisp
reduce cpu usage clean up
(defpackage #:sdl2-tutorial-04-key-presses (:use :cl) (:export :run) (:import-from :sdl2-tutorial-utils :asset-pathname)) (in-package :sdl2-tutorial-04-key-presses) (defparameter *screen-width* 640) (defparameter *screen-height* 480) (defmacro with-window-surface ((window surface) &body body) `(sdl2:with-ini...
099a7f2d3bb66dd904c33ae6758420976e4f63e19e76903e9907caab81c126df
EdAyers/Robotone
Main.hs
module Main ( main ) where import Prelude hiding ((/)) import Control.Arrow import Control.Monad import Control.Applicative import Data.Maybe import Data.Either import qualified Data.Map as Map import Data.Map (Map) import Data.List import Control.Monad.Logic import Control.Monad.Trans.State.Lazy import Control.M...
null
https://raw.githubusercontent.com/EdAyers/Robotone/1cdcde674a54a47c382fef2b060d50b35361f120/app/Main.hs
haskell
-------------------------------------------------------------------------------------------------- Deletion move 1 move 5 move 6 move 8 Applying Suspension -------------------------------------------------------------------------------------------------- -----------------------------------------------------------------...
module Main ( main ) where import Prelude hiding ((/)) import Control.Arrow import Control.Monad import Control.Applicative import Data.Maybe import Data.Either import qualified Data.Map as Map import Data.Map (Map) import Data.List import Control.Monad.Logic import Control.Monad.Trans.State.Lazy import Control.M...
4ea22b8c9ca2d4856b32fa574dae14e5cc53cb2f966bfcce227e40069f8dbd1b
casperschipper/ocaml-cisp
ivo.ml
module S = Lo.Server module R = Result type preset = | Preset of { start: float ; slicedur: float ; rate: float ; bufnum: int ; amp: float ; pan: float } type data = Lo.Message.data let of_data = function | `Int32 n -> string_of_int n | `Float f |`Double f -> Printf...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/712c1c1860fe16867b11228e8c1aeb9640b8ce69/examples/ivo.ml
ocaml
module S = Lo.Server module R = Result type preset = | Preset of { start: float ; slicedur: float ; rate: float ; bufnum: int ; amp: float ; pan: float } type data = Lo.Message.data let of_data = function | `Int32 n -> string_of_int n | `Float f |`Double f -> Printf...
d1780156ac9188d0dde9ee4261a0b710102c4d8b9cf4275273033a46152098d2
lopec/LoPEC
netMonitor.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2009 , %%% @doc information about the network statistics on the system . %%% @end Created : 26 Oct 2009 by < > %%%------------------------------------------------------------------- -module(netMonitor). %% API -exp...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/slave/src/netMonitor.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== API =================================================================== --------------------------...
@author < > ( C ) 2009 , information about the network statistics on the system . Created : 26 Oct 2009 by < > -module(netMonitor). -export([get_net_stats/0]). ( ) - > { Up , Down } @todo make get_net_stats ( ) paramterized by interface name , get_net_stats() -> case os:cmd("uname") -- "\n...
dd7d1ed0b577e8dd3a32e63fced3ce531d967bd5576096bd90fcc02c192a5a3c
mbj/stratosphere
SlotProperty.hs
module Stratosphere.Lex.Bot.SlotProperty ( module Exports, SlotProperty(..), mkSlotProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.Lex.Bot.MultipleValuesSettingProperty as Exports import {-#...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lex/gen/Stratosphere/Lex/Bot/SlotProperty.hs
haskell
# SOURCE # # SOURCE # # SOURCE #
module Stratosphere.Lex.Bot.SlotProperty ( module Exports, SlotProperty(..), mkSlotProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data SlotProperty = SlotPro...
0230ead12d2e86339623f552d79c86298ffb83ad69b05567e8f2c4e62a23a4bb
djblue/portal
parallel.clj
(ns tasks.parallel (:require [org.httpkit.server :as http] [tasks.tools :refer [*opts*]])) (def ^:private ^:dynamic *sessions* nil) (defn- create-sessions [] (atom (with-meta [] {:stdio [] :results {} :done (promise)}))) (defn- new-session [sessions] (-> sessions (swap! vary-meta update :stdi...
null
https://raw.githubusercontent.com/djblue/portal/da1b63849f5761f5b3e4db8d695c43c529c76daa/dev/tasks/parallel.clj
clojure
(ns tasks.parallel (:require [org.httpkit.server :as http] [tasks.tools :refer [*opts*]])) (def ^:private ^:dynamic *sessions* nil) (defn- create-sessions [] (atom (with-meta [] {:stdio [] :results {} :done (promise)}))) (defn- new-session [sessions] (-> sessions (swap! vary-meta update :stdi...
3f563091e21a80651a27f3fd397165e5cb9d31f92d3107fcc90b40bd576493a6
haskell-tls/hs-tls
X509.hs
-- | -- Module : Network.TLS.X509 -- License : BSD-style Maintainer : < > -- Stability : experimental -- Portability : unknown -- -- X509 helpers -- module Network.TLS.X509 ( CertificateChain(..) , Certificate(..) , SignedCertificate , getCertificate , isNullCertificateChain , ...
null
https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Network/TLS/X509.hs
haskell
| Module : Network.TLS.X509 License : BSD-style Stability : experimental Portability : unknown X509 helpers | Certificate and Chain rejection reason | Certificate Usage callback possible returns values. ^ usage of certificate accepted ^ usage of certificate rejected
Maintainer : < > module Network.TLS.X509 ( CertificateChain(..) , Certificate(..) , SignedCertificate , getCertificate , isNullCertificateChain , getCertificateChainLeaf , CertificateRejectReason(..) , CertificateUsage(..) , CertificateStore , ValidationCache , excepti...
7ad1224910e17f67c7eb3dd3e11d4d346516c26c737f41b145cb8beb3cfc1f5f
glutamate/bugpan
TestBugpan.hs
-- automatically generated by BNF Converter module Main where import System.IO ( stdin, hGetContents ) import System.Environment ( getArgs, getProgName ) import System.Exit ( exitFailure, exitSuccess ) import BNFC.LexBugpan import BNFC.ParBugpan import BNFC.SkelBugpan import BNFC.PrintBugpan import BNFC.AbsBugpan im...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/BNFC/TestBugpan.hs
haskell
automatically generated by BNF Converter
module Main where import System.IO ( stdin, hGetContents ) import System.Environment ( getArgs, getProgName ) import System.Exit ( exitFailure, exitSuccess ) import BNFC.LexBugpan import BNFC.ParBugpan import BNFC.SkelBugpan import BNFC.PrintBugpan import BNFC.AbsBugpan import BNFC.LayoutBugpan import BNFC.ErrM ...
66a58dda49c584cf121cb4030a0eecba7c3b536272e4ceffc357b473ad1412b6
qiao/sicp-solutions
4.06.scm
(define (let? exp) (tagged-list? exp 'let)) (define (let-bindings exp) (cadr exp)) (define (let-body exp) (cddr exp)) (define (binding-var binding) (car binding)) (define (binding-exp binding) (cdr binding)) (define (let->combination exp) (let ((bindings (let-bindings exp)) (body (let-body exp))) (cons (...
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter4/4.06.scm
scheme
(define (let? exp) (tagged-list? exp 'let)) (define (let-bindings exp) (cadr exp)) (define (let-body exp) (cddr exp)) (define (binding-var binding) (car binding)) (define (binding-exp binding) (cdr binding)) (define (let->combination exp) (let ((bindings (let-bindings exp)) (body (let-body exp))) (cons (...
2bbe74f3d9428901c9033df2e0de53325acac201bda1a21d3a901af32289052f
TrustInSoft/tis-kernel
cabs2cil_Utility.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/typing/cabs2cil_Utility.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 Copyright ( C ) 2001 - 2003 < > ...
130da2bce229374576d5a52aa592f5699926a7e87911f599b7d6a4855ca63ab8
ygmpkk/house
Toolbar.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Process.Toolbar Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- ---------------------------------------------------...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/Process/Toolbar.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Process.Toolbar License : BSD-style Maintainer : Stability : provisional Portability : portable ---------------------------------------------------------------------------
Copyright : ( c ) 2002 module Graphics.UI.ObjectIO.Process.Toolbar(openToolbar) where import Graphics.UI.ObjectIO.CommonDef import Graphics.UI.ObjectIO.Process.IOState import Graphics.UI.ObjectIO.Window.SDISize import Graphics.UI.ObjectIO.StdGUI import Graphics.UI.ObjectIO.StdProcessAttribute import Graphic...
f4b5596ee381f47d458394c6c8fbaeaf803c7c9e71c2fb8052a903bede8ff6a6
dundalek/closh
core_test.cljc
(ns closh.core-test (:require [clojure.test :refer [deftest is are]] [closh.test-util.util :refer [null-file with-tempfile with-tempfile-content create-fake-writer get-fake-writer str-fake-writer]] [clojure.string :as str] [closh.zero.reader :as reader] [closh.zero.buil...
null
https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/test/closh/core_test.cljc
clojure
process to process - redirect stdout process to fn - collect stdout process to sequence - split lines sequence to fn sequence to sequence sequence to process - join items string to process string to sequence sequential cmd helper to invoke command name by value Make sure updating PATH is reflected for execut...
(ns closh.core-test (:require [clojure.test :refer [deftest is are]] [closh.test-util.util :refer [null-file with-tempfile with-tempfile-content create-fake-writer get-fake-writer str-fake-writer]] [clojure.string :as str] [closh.zero.reader :as reader] [closh.zero.buil...
e65b7961e5a63cd0685f48a5ade7adf7e54a9cb68526a47b19ebf5b3b04d9cd3
avsm/mirage-duniverse
quota_interface.ml
include Namespace.Unsupported let ( |> ) a b = b a let read t (perms: Perms.t) (path: Store.Path.t) = Perms.has perms Perms.CONFIGURE; match Store.Path.to_string_list path with | [] -> "" | "default" :: [] -> "" | "entries-per-domain" :: [] -> "" | "number-of-entries" :: [] -> "" | "number-of-registered-w...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/xenstore/server/quota_interface.ml
ocaml
include Namespace.Unsupported let ( |> ) a b = b a let read t (perms: Perms.t) (path: Store.Path.t) = Perms.has perms Perms.CONFIGURE; match Store.Path.to_string_list path with | [] -> "" | "default" :: [] -> "" | "entries-per-domain" :: [] -> "" | "number-of-entries" :: [] -> "" | "number-of-registered-w...
1a7c985ff371960f59144d726d0be8a57daca2285c38397107cc118db3b99294
jimcrayne/jhc
Printf.hs
----------------------------------------------------------------------------- -- | -- Module : Text.Printf Copyright : ( c ) , 2004 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- A C printf like format...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/lib/haskell-extras/Text/Printf.hs
haskell
--------------------------------------------------------------------------- | Module : Text.Printf License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable A C printf like formatter. ------------------------------------------------...
Copyright : ( c ) , 2004 module Text.Printf( printf, hPrintf, PrintfType, HPrintfType, PrintfArg, IsChar ) where import Data.Char import Numeric(showEFloat, showFFloat, showGFloat) import System.IO character @%@ , followed by one or more of the following flags : > 0 pad with zeroes rath...
9012996f12fa89984053970acccd7d41e354abef84dc427f6f38d126d13158e6
xh4/web-toolkit
fallback.lisp
(in-package #:trivial-backtrace) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (fboundp 'impl-map-backtrace) (defun impl-map-backtrace (func) (declare (ignore func)))) (unless (fboundp 'print-backtrace-to-stream) (defun print-backtrace-to-stream (stream) (format stream "~&back...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/trivial-backtrace-20190710-git/dev/fallback.lisp
lisp
(in-package #:trivial-backtrace) (eval-when (:compile-toplevel :load-toplevel :execute) (unless (fboundp 'impl-map-backtrace) (defun impl-map-backtrace (func) (declare (ignore func)))) (unless (fboundp 'print-backtrace-to-stream) (defun print-backtrace-to-stream (stream) (format stream "~&back...
7c47fe9da7468f54b96f6f9840c6f9b304961150adebcc4defe4dc19a0ec7992
picrin-scheme/picrin
282.scm
(import (scheme base) (picrin test)) (test-begin) (test "-0.1" (substring (number->string -0.1) 0 4)) (test "-0.9" (substring (number->string -0.9) 0 4)) (test "-1.0" (substring (number->string -1.0) 0 4)) (test "-1.1" (substring (number->string -1.1) 0 4)) (test-end)
null
https://raw.githubusercontent.com/picrin-scheme/picrin/2af16bc88fbfca2efafd27ca9e5006d73c06f6fb/t/issue/282.scm
scheme
(import (scheme base) (picrin test)) (test-begin) (test "-0.1" (substring (number->string -0.1) 0 4)) (test "-0.9" (substring (number->string -0.9) 0 4)) (test "-1.0" (substring (number->string -1.0) 0 4)) (test "-1.1" (substring (number->string -1.1) 0 4)) (test-end)
d38bce598e747687d334e751453ea168273247da25caf3fc9e028a467917612c
gedge-platform/gedge-platform
ranch_acceptor.erl
Copyright ( c ) 2011 - 2021 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_acceptor.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 - 2021 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(ranch_acceptor). -export([start_link/5]). -e...
063237c6165deae1a8b590f45c6755d5dbfaf28f9d2e65ddf77b88801e9a84c7
cljfx/cljfx
e27_selection_models.clj
(ns e27-selection-models (:require [cljfx.api :as fx] [cljfx.ext.list-view :as fx.ext.list-view] [cljfx.ext.tab-pane :as fx.ext.tab-pane] [cljfx.ext.table-view :as fx.ext.table-view] [cljfx.ext.tree-view :as fx.ext.tree-view]) (:import [javafx.scene.control Tab TreeIt...
null
https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e27_selection_models.clj
clojure
clean up renderer on file reload Programatically setting tabs is somewhat buggy in JavaFX, so for demonstration purposes :selection-capabilities controls the selection model: - #{:read} the tab changes just based on the current state - #{:write} the tab changes just based the user selection (eg. clicking) - #{:re...
(ns e27-selection-models (:require [cljfx.api :as fx] [cljfx.ext.list-view :as fx.ext.list-view] [cljfx.ext.tab-pane :as fx.ext.tab-pane] [cljfx.ext.table-view :as fx.ext.table-view] [cljfx.ext.tree-view :as fx.ext.tree-view]) (:import [javafx.scene.control Tab TreeIt...
bfca4ad29b2213f2ab556464f5a7851403a2ce0c5f1b13889779635f5b722222
well-typed/large-records
HList.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE GADTs # {-# LANGUAGE TypeOperators #-} module Bench.HList ( HList(..) -- * Conversions , hlistToListAny , SomeHList(..) , hlistFromListAny , hlistToNP , hlistFromNP -- * Examples , exampleRec0 , exampleRec1 , exampleRec2 , exampleRec3 ...
null
https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/lib/Bench/HList.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # * Conversions * Examples ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} ---...
# LANGUAGE GADTs # module Bench.HList ( HList(..) , hlistToListAny , SomeHList(..) , hlistFromListAny , hlistToNP , hlistFromNP , exampleRec0 , exampleRec1 , exampleRec2 , exampleRec3 , exampleRec4 , exampleRec5 ) where import Data.SOP.BasicFunctors import Data.SOP.NP (NP) import...
7a9fe55a489522a65b7d87693598de8dfb92c15cec15a28acb461b36e2042837
braidchat/braid
core.cljc
(ns braid.base.core (:require [braid.base.api :as base] #?@(:cljs [[braid.base.client.router :as router] [braid.base.client.events :as events] [braid.base.client.socket :as socket] [re-frame.core :refer [dispatch]]] :clj [[braid.base.server.initial-data...
null
https://raw.githubusercontent.com/braidchat/braid/64e5587ec9161ea130da3821e8d276aad389801b/src/braid/base/core.cljc
clojure
FIXME :set-login-state! defined in chat
(ns braid.base.core (:require [braid.base.api :as base] #?@(:cljs [[braid.base.client.router :as router] [braid.base.client.events :as events] [braid.base.client.socket :as socket] [re-frame.core :refer [dispatch]]] :clj [[braid.base.server.initial-data...
37042c0eddaa514ab230a617e00d4d5dbbfc8da078070446cf2e733a519db2fb
evturn/haskellbook
26.09-lift-more.hs
import Control.Monad.Trans.Class ----------------------------------------------------------------------------- 1 . newtype EitherT e m a = EitherT { runEitherT :: m (Either e a) } instance MonadTrans (EitherT e) where lift = EitherT . fmap Right -------------------------------------------------------...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/26/26.09-lift-more.hs
haskell
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
import Control.Monad.Trans.Class 1 . newtype EitherT e m a = EitherT { runEitherT :: m (Either e a) } instance MonadTrans (EitherT e) where lift = EitherT . fmap Right 2 . newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } instance MonadTrans (StateT s) where lift m = StateT $ \s -> ...
37667e7990c5bd7d52ae7f6150258743be58fa256b3c74b66d24b636de328168
NicklasBoto/funQ
TestCore.hs
module TestCore ( QState(..), applyTwice, run', addState, applyGate', cnot', getRandQbit, (~=), (#=), genBits, qrun, p8mat, QM, QM.run, getState, QBit, get, liftM, module Lib.Core, module Lib.Gates, module Lib.Internal.Gates ) where ...
null
https://raw.githubusercontent.com/NicklasBoto/funQ/c9c5359660a430a75af6c9c8d5ffe9431c89f91b/test/TestCore.hs
haskell
TODO: would like TestCore to import everything needed for testing in all other files so just they have to import TestCore and that's it Arbitrary instance for QState, not very pretty :) | Applies a given gate twice to a given qubit. Returns state before and after the operations helper function to run QM computat...
module TestCore ( QState(..), applyTwice, run', addState, applyGate', cnot', getRandQbit, (~=), (#=), genBits, qrun, p8mat, QM, QM.run, getState, QBit, get, liftM, module Lib.Core, module Lib.Gates, module Lib.Internal.Gates ) where ...
ed0f52ebad640ec299bad3bdaed445ba1a14c485247f9edfb2b40ff61dfc8715
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:ni...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/purl-org/net/vocab/2004/07/visit/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "#" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:nicknames) (:export "Canad...
b4fc1acea930eb57cef8546f1e3e63fd60a1e4a2b86d41b3886a38d821c403e1
corecursive/sicp-study-group
ex01_18.scm
* Exercise 1.18 :* Using the results of * Note Exercise 1 - 16 : : and * Note Exercise 1 - 17 : : , devise a procedure that generates an iterative process for multiplying two integers in terms of adding , ;; doubling, and halving and uses a logarithmic number of steps.(4) (define (double a) (* a ...
null
https://raw.githubusercontent.com/corecursive/sicp-study-group/d87da159d16d09493fd500f736c186edfeecfb83/plundaahl/exercises/ex01_18.scm
scheme
doubling, and halving and uses a logarithmic number of steps.(4)
* Exercise 1.18 :* Using the results of * Note Exercise 1 - 16 : : and * Note Exercise 1 - 17 : : , devise a procedure that generates an iterative process for multiplying two integers in terms of adding , (define (double a) (* a 2)) (define (halve a) (/ a 2)) (define (mult a b) (define (even? a) ...
0502e29418479c8fce6651f1d6a277c876f237030833d4742a87444b4e73d7e4
ocaml-community/obus
nm_ip6_config.ml
* nm_ip6_config.ml * ---------------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * nm_ip6_config.ml * ---------------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 *) include OBus_proxy.Private open Nm_interfaces.Org_freedesktop_NetworkManager_IP6Config let addresses pr...
null
https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/bindings/network-manager/nm_ip6_config.ml
ocaml
* nm_ip6_config.ml * ---------------- * Copyright : ( c ) 2010 , < > * Licence : BSD3 * nm_ip6_config.ml * ---------------- * Copyright : (c) 2010, Jeremie Dimino <> * Licence : BSD3 *) include OBus_proxy.Private open Nm_interfaces.Org_freedesktop_NetworkManager_IP6Config let addresses pr...
cd1d7e90548f942ac9c97e475577cbc491b97d68eceb2f4ee99aa40661ced98b
kupl/LearnML
patch.ml
let rec iter ((n : int), (f : int -> int)) : int -> int = match n with | 0 -> fun (__s5 : int) -> __s5 | _ -> fun (__s6 : int) -> iter (n - 1, f) (f __s6)
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub37/patch.ml
ocaml
let rec iter ((n : int), (f : int -> int)) : int -> int = match n with | 0 -> fun (__s5 : int) -> __s5 | _ -> fun (__s6 : int) -> iter (n - 1, f) (f __s6)
ed16e291c0cf142ff5f0b54772b94aab4e4471382383e277c2ddaa3d2bbc8961
runeksvendsen/restful-payment-channel-server
Close.hs
module PayChanServer.Handler.Close where import AppPrelude.Types import PayChanServer.Types import PayChanServer.Util import qualified PayChanServer.Config.Types as Conf import qualified RBPCP.Types as RBPCP import qualified PayChanServer.DB as DB import ChanStore.Interface as...
null
https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/src/PayChanServer/Handler/Close.hs
haskell
Decide what to do based on channel state: open/half-open/closed Write response
module PayChanServer.Handler.Close where import AppPrelude.Types import PayChanServer.Types import PayChanServer.Util import qualified PayChanServer.Config.Types as Conf import qualified RBPCP.Types as RBPCP import qualified PayChanServer.DB as DB import ChanStore.Interface as...
0c4a89482780a8c26da4dd78d5ab314aaaeaca628a4a59daf30551e78749dc31
caisah/sicp-exercises-and-examples
ex_01.11.scm
A function f is defined by the rule that f(n ) = n if n < 3 and f(n ) = f(n-1 ) + 2f(n-2 ) + 3f(n-3 ) if n > = 3 . Write a procedure that computes ;; f by means of a recursive process. Write a procedure that computes f by means of ;; an iterative process. ; Recursive (define (f n) (cond ((= n 1) 1) ((=...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/1.2.2-tree_recursion/ex_01.11.scm
scheme
f by means of a recursive process. Write a procedure that computes f by means of an iterative process. Recursive Iterative
A function f is defined by the rule that f(n ) = n if n < 3 and f(n ) = f(n-1 ) + 2f(n-2 ) + 3f(n-3 ) if n > = 3 . Write a procedure that computes (define (f n) (cond ((= n 1) 1) ((= n 2) 2) ((= n 3) 3) (else (+ (f (- n 1)) (* 2 (f (- n 2))) (* 3 (f (- ...
8877064a61c5d4e0805421cc7fa6798badcf34ef9dd09e14ff9280aae26b7939
TakaiKinoko/Cornell_CS3110_OCaml
08foldleft.ml
(** sum: walk across a list of integers and sum them, we could store the current sum in the accumulator *) let rec sum accum = function | [] -> accum | hd::tl -> sum (hd + accum) tl let rec concat accum = function | [] -> accum | hd::tl -> concat (accum^hd) tl (** summarize *) let rec fold_left a...
null
https://raw.githubusercontent.com/TakaiKinoko/Cornell_CS3110_OCaml/0a830bc50a5e39f010074dc289161426294cad1d/Chap4_Higher_order_programming/08foldleft.ml
ocaml
* sum: walk across a list of integers and sum them, we could store the current sum in the accumulator * summarize * ocaml signature: val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
let rec sum accum = function | [] -> accum | hd::tl -> sum (hd + accum) tl let rec concat accum = function | [] -> accum | hd::tl -> concat (accum^hd) tl let rec fold_left accum f = function | [] -> accum | hd::tl -> fold_left (f accum hd) f tl let sum' = fold_left 0 (+) let concat' = f...
2a20bfb71f7dd0ca276b46af083ab6cf8b6fe0eaa820e30d46c60a1ee59f2cf1
scrintal/heroicons-reagent
window.cljs
(ns com.scrintal.heroicons.outline.window) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/window.cljs
clojure
(ns com.scrintal.heroicons.outline.window) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
46a326213f812995daff3f92d7f12a8b4f6e708f9f959e11e45fc045c3861746
lancelet/wgpu-hs
WGPUStoreOp.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # -- This file was generated by wgpu-raw-hs-codegen on: 2021 - 08 - 25T10:02:03.522705 -- Using wgpu-native git hash: b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu - native ( ) m...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/42d7931cdd793970bf4844906b382d908bbb196f/wgpu-raw-hs/src/WGPU/Raw/Generated/Enum/WGPUStoreOp.hs
haskell
This file was generated by wgpu-raw-hs-codegen on: Using wgpu-native git hash:
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # 2021 - 08 - 25T10:02:03.522705 b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu - native ( ) module WGPU.Raw.Generated.Enum.WGPUStoreOp where import Data.Word (Word32) import For...
f0cb37429261d597b4d2938c5d7a4e5b8760f44373e8abb38b7f384c1ae16f30
HaskellZhangSong/Introduction_to_Haskell_2ed_source
Generic1.hs
# LANGUAGE DeriveGeneric , TypeOperators , TypeFamilies , KindSignatures , DefaultSignatures , FlexibleContexts # TypeOperators, TypeFamilies, KindSignatures, DefaultSignatures, ...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C17/Generic1.hs
haskell
type family Rep1 (f :: * -> *) :: * -> * | product (a,b) :*: in GHC.Generic | sum (Left a | Right b) :+: in GHC.Generic
# LANGUAGE DeriveGeneric , TypeOperators , TypeFamilies , KindSignatures , DefaultSignatures , FlexibleContexts # TypeOperators, TypeFamilies, KindSignatures, DefaultSignatures, ...
e012662eb44230d26512596b35ed7c313a65e3f99f63eda435d3296c6961f9c1
cartazio/tlaps
m_dep.ml
* module / dep.ml --- modules dependencies * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * module/dep.ml --- modules dependencies * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) Revision.f "$Rev: 31530 $";; open Ext open Property open Util.Coll open Expr.T ...
null
https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/module/m_dep.ml
ocaml
* @param mcx Sm (StringMap) of mule_ wrapped computes the dependency order between modules
* module / dep.ml --- modules dependencies * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * module/dep.ml --- modules dependencies * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) Revision.f "$Rev: 31530 $";; open Ext open Property open Util.Coll open Expr.T ...
076bc4d08626d6eefab424eb5bac73879f5dd4a08e3aa74e078c7e2a6f4cd0d7
binaryage/clearcut
circus.clj
(ns clearcut.circus (:require [clojure.test :as test] [cljs.util :as cljs-util] [clj-logging-config.log4j :as log4j-config] [environ.core :refer [env]] [clearcut.circus.config :as config] [clearcut.arena]) (:import (org.apache.log4j Level))) (defn setup-l...
null
https://raw.githubusercontent.com/binaryage/clearcut/7f44705cd8743f8679199cb78a215487eb411ed4/test/src/circus/clearcut/circus.clj
clojure
-- main entry point -------------------------------------------------------------------------------------------------------
(ns clearcut.circus (:require [clojure.test :as test] [cljs.util :as cljs-util] [clj-logging-config.log4j :as log4j-config] [environ.core :refer [env]] [clearcut.circus.config :as config] [clearcut.arena]) (:import (org.apache.log4j Level))) (defn setup-l...
0b958a429ceb7bb1988347ca1d654e93ad437469b27c7d9abb640791d92f1f94
quil-lang/sbcl-librarian
bindings.lisp
(in-package #:sbcl-librarian) (defparameter *windows-export-linkage* "__declspec(dllexport)") (defparameter *windows-import-linkage* "__declspec(dllimport)") (defparameter *elf-export-linkage* "__attribute__ ((visibility (\"default\")))") (defun write-linkage-macro (linkage build-name stream) (let ((windows...
null
https://raw.githubusercontent.com/quil-lang/sbcl-librarian/0967cf3e1b4d0574fb43996224e569a2986fd8a5/src/bindings.lisp
lisp
header source
(in-package #:sbcl-librarian) (defparameter *windows-export-linkage* "__declspec(dllexport)") (defparameter *windows-import-linkage* "__declspec(dllimport)") (defparameter *elf-export-linkage* "__attribute__ ((visibility (\"default\")))") (defun write-linkage-macro (linkage build-name stream) (let ((windows...
db5960c0459b976f1bcfaeff5c3fc5c6d21bb10b751014575dbcb8f0e9707d30
dolotech/erlang_server
pt_item.erl
%%---------------------------------------------------- %% 协议13 - 物品相关 %% %% @author Rolong<> %%---------------------------------------------------- -module(pt_item). -export([handle/3]). -include("common.hrl"). -include("equ.hrl"). -include("prop.hrl"). handle(13001, [1], Rs) -> F = fun(I, {Es, Ps}...
null
https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/pt/pt_item.erl
erlang
---------------------------------------------------- 协议13 - 物品相关 @author Rolong<> ---------------------------------------------------- TODO:背包已满 装备物品 装备(当前位置无装备): equipReplaceID: 0 装备(当前位置有装备): equipID: 装备的唯一ID ?DEBUG("===Item:~w,", [mod_item:get_item(EquId, Items)]), ?DEBUG("===Items2:~w,"...
-module(pt_item). -export([handle/3]). -include("common.hrl"). -include("equ.hrl"). -include("prop.hrl"). handle(13001, [1], Rs) -> F = fun(I, {Es, Ps}) -> case I#item.tid > 99999 of true -> {[mod_item:pack_equ(I)|Es], Ps}; false -> {Es, [mod_item:pack_prop...
a8fa98fa3571e56bd95420009ec2198a15a1ed00d77ca10cf1f5a04eff0dec1a
AmkG/letterfall
kernel.scm
; kernel.scm ; Implementation of the sweet-expressions project by readable mailinglist. ; Copyright ( C ) 2005 - 2012 by , , and . ; This software is released as open source software under the " MIT " license : ; ; Permission is hereby granted, free of charge, to any person obtaining a ; copy of this s...
null
https://raw.githubusercontent.com/AmkG/letterfall/bb70909f38c50dc625c204ad1f82724c6603e090/readable/kernel.scm
scheme
kernel.scm Implementation of the sweet-expressions project by readable mailinglist. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Softwar...
Copyright ( C ) 2005 - 2012 by , , and . This software is released as open source software under the " MIT " license : to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the in all copies or substantial por...
3fd1a282cc768108f1bb0118b59db2f38ec6461d8745bc3d847982ac998a6578
capnproto/capnp-ocaml
capnp.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * capnp - ocaml * * Copyright ( c ) 2013 - 2014 , * All rights reserved . * * Redistribution and use in source and binary forms , with or without ...
null
https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/runtime/capnp.ml
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * capnp - ocaml * * Copyright ( c ) 2013 - 2014 , * All rights reserved . * * Redistribution and use in source and binary forms , with or without ...
23225c0b10dafd5afe4bcaa19bbc894ac001c31306a4a8b7846503e1020075bb
ananthakumaran/webify
Utils.hs
# LANGUAGE RecordWildCards # module Utils( fromRight , substr , toStrict , toLazy , diff , debug , formatTable , maxDuplicate , xattrRaw , xattr ) where import Blaze.ByteString.Builder.Char.Utf8 import Control.Monad import qualified Data.ByteString as B impor...
null
https://raw.githubusercontent.com/ananthakumaran/webify/e73fa2e3aa01512fe735dbf00a81e5909ccabbc9/src/Utils.hs
haskell
# LANGUAGE RecordWildCards # module Utils( fromRight , substr , toStrict , toLazy , diff , debug , formatTable , maxDuplicate , xattrRaw , xattr ) where import Blaze.ByteString.Builder.Char.Utf8 import Control.Monad import qualified Data.ByteString as B impor...
9538b265d899a6243824ba35b0e26833db379cce54f3550230a47479fadffd83
ktakashi/sagittarius-scheme
hashtables.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; srfi/%3a126/hashtables.scm - Intermediate hashtables ;;; Copyright ( c ) 2020 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/sitelib/srfi/%253a125/hashtables.scm
scheme
coding : utf-8 ; -*- srfi/%3a126/hashtables.scm - Intermediate hashtables Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
Copyright ( c ) 2020 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (srfi :125 hashtables) (export :all) ...
de9cabf18a19756011b766209f0ad438cf7f4f08c73924b5957c7b9520ce4f37
lmj/lparallel
pandor.lisp
Copyright ( c ) 2011 - 2012 , . All rights reserved . ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this li...
null
https://raw.githubusercontent.com/lmj/lparallel/9c11f40018155a472c540b63684049acc9b36e15/src/cognate/pandor.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary...
Copyright ( c ) 2011 - 2012 , . All rights reserved . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY...
a5a904d18633914b7909bfa7ac15dfe42b5f36afb9254e99878f752e1b92d672
pariyatti/kosa
routing_test.clj
(ns kuti.dispatch.routing-test (:require [clojure.test :refer :all] [kuti.dispatch.routing :as sut] [reitit.ring :as rr])) (defn index-stub [_]) (defn create-stub [_]) (defn new-stub [_]) (defn show-stub [_]) (defn update-stub [_]) (defn destroy-stub [_]) (defn edit-stub [_]) (deftest revers...
null
https://raw.githubusercontent.com/pariyatti/kosa/637991f231e889ba13543cfc4cd78c281f01fba7/test/kuti/dispatch/routing_test.clj
clojure
based on ring spec: -clojure/ring/blob/master/SPEC based on ring spec: -clojure/ring/blob/master/SPEC based on ring spec: -clojure/ring/blob/master/SPEC
(ns kuti.dispatch.routing-test (:require [clojure.test :refer :all] [kuti.dispatch.routing :as sut] [reitit.ring :as rr])) (defn index-stub [_]) (defn create-stub [_]) (defn new-stub [_]) (defn show-stub [_]) (defn update-stub [_]) (defn destroy-stub [_]) (defn edit-stub [_]) (deftest revers...