_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 |
|---|---|---|---|---|---|---|---|---|
21386cfd3a75b463269165e5ae74bcc7c043398ec449055297588e4f73449b8d | alesaccoia/festival_flinger | cmu_us_aup_tagger.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_aup_cg/festvox/cmu_us_aup_tagger.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | POS tagger for English
(require 'pos)
(define (cmu_us_aup::select_tagger)
"(cmu_us_aup::select_tagger)
Set up the POS tagger English."
(set! pos_lex_name "english_poslex")
(set! pos_ngram_name 'english_pos_ngram)
(set! pos_supported t)
)
(define (cmu_us_aup::reset_tagger)
"(cmu_us_aup::reset_tagger)
Rese... |
196bb39151ab201614ce81bcadeb5d6a835130b87cf173db33ce36aafe79d30a | input-output-hk/hydra | Party.hs | | Types and functions revolving around a Hydra ' Party ' . That is , a
-- participant in a Hydra Head, which signs transactions or snapshots in the
-- Hydra protocol.
module Hydra.Party where
import Hydra.Prelude hiding (show)
import Data.Aeson (ToJSONKey)
import Data.Aeson.Types (FromJSONKey)
import Hydra.Cardano.... | null | https://raw.githubusercontent.com/input-output-hk/hydra/cd4d7731813d608a7979d5a9cb5ece3bfa0a3892/hydra-node/src/Hydra/Party.hs | haskell | participant in a Hydra Head, which signs transactions or snapshots in the
Hydra protocol.
distinct type.
| Retrieve the "high-level" 'Party from the "low-level" on-chain
representation. This can fail because of the lower type-safety used on-chain
for an explanation why this is a distinct type. | | Types and functions revolving around a Hydra ' Party ' . That is , a
module Hydra.Party where
import Hydra.Prelude hiding (show)
import Data.Aeson (ToJSONKey)
import Data.Aeson.Types (FromJSONKey)
import Hydra.Cardano.Api (AsType (AsVerificationKey), SerialiseAsRawBytes (deserialiseFromRawBytes, serialiseToRawByt... |
c0df3595924a5a259347037d9832f1d6cc5913bf3dc77ed6a0e688e2565defe0 | fantasytree/fancy_game_server | client_open_rpc.erl | %%----------------------------------------------------
%% 客户端验证
%% **注意**以下调用都是开放的,请注意安全性
%%----------------------------------------------------
-module(client_open_rpc).
-export([handle/3]).
-include("common.hrl").
-include("conn.hrl").
-include("role.hrl").
请求验证账号登录
handle(1001, {Account, Platform, ZoneId, Sessio... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/mod/client/client_open_rpc.erl | erlang | ----------------------------------------------------
客户端验证
**注意**以下调用都是开放的,请注意安全性
----------------------------------------------------
----------------------------------------------------
---------------------------------------------------- | -module(client_open_rpc).
-export([handle/3]).
-include("common.hrl").
-include("conn.hrl").
-include("role.hrl").
请求验证账号登录
handle(1001, {Account, Platform, ZoneId, SessionId}, Conn = #conn{bind_obj = undefined}) ->
case check_acc(Account, Platform, ZoneId, SessionId) of
false ->
{stop, repl... |
5e93275b135e55a1bb9ea39c2b72db81ef64ac4e797eea386746abf567dc1adb | 8c6794b6/guile-tjit | t-nest-10.scm | ;;; More inlined procedure in nested loop.
;;;
;;; Calling procedure containing loop twice, adding results. Return
address of the first call to ` loop1 ' is different from the second
;;; call to `loop1'.
(define (loop1 n acc)
(let lp ((i n) (acc acc))
(if (< 0 i)
(lp (- i 1) (+ acc 2))
... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-nest-10.scm | scheme | More inlined procedure in nested loop.
Calling procedure containing loop twice, adding results. Return
call to `loop1'. | address of the first call to ` loop1 ' is different from the second
(define (loop1 n acc)
(let lp ((i n) (acc acc))
(if (< 0 i)
(lp (- i 1) (+ acc 2))
acc)))
(define (loop2 n)
(let lp ((i n) (acc 0))
(if (< 0 i)
(lp (- i 1) (+ (loop1 n 0)
(loop1 n 0... |
d4e02e60366b1f2427916cd7ca748858ccf5bb1c3713d0b08ffcb27a9c5d06a4 | Bogdanp/racket-lua | compiler.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse)
racket/format
racket/list
racket/match
racket/string
racket/syntax
"ast.rkt")
(provide
compile-chunk)
(define (compile-chunk chunk)
(define loc (Node-loc chunk))
(define re... | null | https://raw.githubusercontent.com/Bogdanp/racket-lua/cc3371948238d92d9d13dff1702391b79aa57886/lua-lib/lang/compiler.rkt | racket | passes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Lua: The standard lua language.
L1: Removes Local{Assignment, Function}, adds Let
help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure names ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; ; ; ; ; ; ; ; ; ; ... | #lang racket/base
(require (for-syntax racket/base
syntax/parse)
racket/format
racket/list
racket/match
racket/string
racket/syntax
"ast.rkt")
(provide
compile-chunk)
(define (compile-chunk chunk)
(define loc (Node-loc chunk))
(define re... |
ba2c04c09acccd7ffc0dee445ac7f638dc78113cc51a282dc667bcba9547791c | outergod/cl-m4 | m4-builtin.lisp | ;;;; cl-m4 - m4-builtin.lisp
Copyright ( C ) 2010 < >
This file is part of cl - m4 .
;;;; cl-m4 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 opti... | null | https://raw.githubusercontent.com/outergod/cl-m4/9f6518b5a173a1234ae39ef45758927d329ded4a/src/m4-builtin.lisp | lisp | cl-m4 - m4-builtin.lisp
cl-m4 is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
cl-m4 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | Copyright ( C ) 2010 < >
This file is part of cl - m4 .
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :cl-m4)
M4 builtin macros ahead .
(defun pushm4macro (name fun &optional (replace t))
(let ((stac... |
52227f03ab93cc6fa970317b107132da67e040c0ef1858935f52b583797f9de1 | lambdaisland/kaocha | kaocha_integration.clj | (ns features.steps.kaocha-integration
^{:clojure.tools.namespace.repl/load false
:clojure.tools.namespace.repl/unload false}
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.string :as str]
[clojure.test :as t :refer... | null | https://raw.githubusercontent.com/lambdaisland/kaocha/77334edf536a3b39b9fcc27e5b67e3011ee40a94/test/step_definitions/kaocha_integration.clj | clojure | By default these are hidden unless the test fails | (ns features.steps.kaocha-integration
^{:clojure.tools.namespace.repl/load false
:clojure.tools.namespace.repl/unload false}
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.string :as str]
[clojure.test :as t :refer... |
6ede27f9ad91f1d6a495eee6a4db42665396777ea09e037305ec1b9e3fb416eb | kmi/irs | original-rdfs-ontology.lisp | Mode : Lisp ; Package :
(in-package "OCML")
(in-ontology rdfs-ontology)
Automatically translated from RDF file " freaky : rdf - files;rdfs.rdf "
at 13:46:49 , on 27/3/2003
(def-class RESOURCE ()
((Value )
(Isdefinedby
:type resource)
(Seealso
:type resource)
(Label
:type literal)
(Comment
:type literal)
))
... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/rdfs-ontology/original-rdfs-ontology.lisp | lisp | Package : |
(in-package "OCML")
(in-ontology rdfs-ontology)
Automatically translated from RDF file " freaky : rdf - files;rdfs.rdf "
at 13:46:49 , on 27/3/2003
(def-class RESOURCE ()
((Value )
(Isdefinedby
:type resource)
(Seealso
:type resource)
(Label
:type literal)
(Comment
:type literal)
))
(def-class LITERAL ()
())
... |
052fcea11b5bdad8f9d67d8fde78245c99061ecc87f6f401c958eb655bcc620f | B-Lang-org/bsc | SimPackage.hs | # LANGUAGE CPP #
module SimPackage(
-- types
SimSystem(..),
PackageMap,
InstModMap,
SimPackage(..),
DefMap,
AVInstMap,
MethodOrderMap,
SimSchedule(..),
... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/SimPackage.hs | haskell | types
utilities
import Debug.Trace
This is a map from AId to the ADef which defines the value for that AId
This is a map from AId of an instantiated submodule to its information
map from submodule instance name to a set of pairs of method names
name of top package
carryover
carryover
carryover
carryover?
ca... | # LANGUAGE CPP #
module SimPackage(
SimSystem(..),
PackageMap,
InstModMap,
SimPackage(..),
DefMap,
AVInstMap,
MethodOrderMap,
SimSchedule(..),
SchedNode(..)... |
e38118624e21031b3c971618aba4bb19dac3b1be7080d61766b206a462e850b2 | AntidoteDB/gingko | ct_redirect_handler.erl | %% redirects log messages to ct:log
-module(ct_redirect_handler).
-include("gingko.hrl").
%% API
-export([log/2]).
log(LogEvent, _Config) ->
CtMaster = application:get_env(?GINGKO_APP_NAME, ct_master, undefined),
#{msg := Message} = LogEvent,
case Message of
{Msg, Format} -> _ = rpc:call(CtMaster... | null | https://raw.githubusercontent.com/AntidoteDB/gingko/a965979aefb2868abcd0b3bf5ed1b5e4f9fdd163/test/utils/ct_redirect_handler.erl | erlang | redirects log messages to ct:log
API |
-module(ct_redirect_handler).
-include("gingko.hrl").
-export([log/2]).
log(LogEvent, _Config) ->
CtMaster = application:get_env(?GINGKO_APP_NAME, ct_master, undefined),
#{msg := Message} = LogEvent,
case Message of
{Msg, Format} -> _ = rpc:call(CtMaster, ct, log, [Msg, Format]);
_ -> _ =... |
07c25f23fa2db6dd9429d78fc2b55ddd36c6390a9c9b0482ea69115a52d193ac | hidaris/thinking-dumps | chap3.rkt | #lang racket/base
;; Load the J-Bob language:
(require "j-bob/j-bob-lang.rkt")
;; Load J-Bob, our little proof assistant:
(require "j-bob/j-bob.rkt")
;;; What's in a name?
(defun pair (x y)
(cons x (cons y '())))
(defun first-of (x)
(car x))
(defun second-of (x)
(car (cdr x)))
(dethm first-of-pair (a b) ; a ... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/the-little-series/the-little-prover/chap3.rkt | racket | Load the J-Bob language:
Load J-Bob, our little proof assistant:
What's in a name?
a claim of therom
Given the non-recursive function
(defun name (x1 ... xn) body),
(name e1 ... en) = body where x1 is e1, ..., xn is en
Insight: Skip Irrelevant Expressions
Rewriting a claim to 't does not have to go in
any par... | #lang racket/base
(require "j-bob/j-bob-lang.rkt")
(require "j-bob/j-bob.rkt")
(defun pair (x y)
(cons x (cons y '())))
(defun first-of (x)
(car x))
(defun second-of (x)
(car (cdr x)))
(equal (first-of (pair a b)) a))
The Law of Defun ( initial )
(dethm second-of-pair (a b)
(equal (second-of (pair a ... |
d74198d97a715c453310f1ae6d561c105e14bbd84be04245fb0edf2d971e3982 | ermine/sulci | scheduler.mli |
* ( c ) 2005 - 2008
* (c) 2005-2008 Anastasia Gornostaeva
*)
type elt = {
mutable time : float;
repeat : unit -> float;
callback : unit -> unit;
mutable cancelled : bool;
}
module TimerOrdered : sig type t = elt val compare : elt -> elt -> int end
module TimerQueue :
sig
exception Empty
t... | null | https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/libs/scheduler/scheduler.mli | ocaml |
* ( c ) 2005 - 2008
* (c) 2005-2008 Anastasia Gornostaeva
*)
type elt = {
mutable time : float;
repeat : unit -> float;
callback : unit -> unit;
mutable cancelled : bool;
}
module TimerOrdered : sig type t = elt val compare : elt -> elt -> int end
module TimerQueue :
sig
exception Empty
t... | |
71b07d8b1e32f286cd2d7b737e555dc11856c0575a60ddc6770c5e623c9a3444 | mk270/archipelago | lexicon.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/server/lexicon.ml | ocaml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | |
72aa6377c37edb662ec17464fc2ffd75567a048b285e148626e748d743371d1e | nikita-volkov/rerebase | Strict.hs | module Control.Monad.Writer.Strict
(
module Rebase.Control.Monad.Writer.Strict
)
where
import Rebase.Control.Monad.Writer.Strict
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/Writer/Strict.hs | haskell | module Control.Monad.Writer.Strict
(
module Rebase.Control.Monad.Writer.Strict
)
where
import Rebase.Control.Monad.Writer.Strict
| |
3d43c939a28394c3ceae4d0a474e0f8d1dd684d9e0cba21349efbfdbfc9a93b1 | quchen/generative-art | Billard.hs | module Geometry.Processes.Billard (
billard
) where
import Algebra.VectorSpace
import Control.Monad
import Data.List
import Data.Maybe
import Geometry.Core
| Shoot a ball , and record its trajectory as it is reflected off the
-- edges of a provided geometry.
--
-- <<docs/billard/3_lambda.svg>>
billard
... | null | https://raw.githubusercontent.com/quchen/generative-art/c2ea1b0bfc4128aed5fc5bc82002a63fa0d874e3/src/Geometry/Processes/Billard.hs | haskell | edges of a provided geometry.
<<docs/billard/3_lambda.svg>>
^ Geometry; typically involves the edges of a bounding polygon.
^ Initial velocity vector of the ball. Only start and direction,
not length, are relevant for the algorithm.
^ List of collision points. Finite iff the ball escapes the
geometry.
The ... | module Geometry.Processes.Billard (
billard
) where
import Algebra.VectorSpace
import Control.Monad
import Data.List
import Data.Maybe
import Geometry.Core
| Shoot a ball , and record its trajectory as it is reflected off the
billard
billard edges = go (const True)
where
go :: (Line -> Bool) -> Line... |
e8aafbb5b0d274e45bc6c5204177fbcf97660fcfe365b765e7bdf051f44d5ead | mbg/hoop | StateEnv.hs | # LANGUAGE FlexibleContexts #
module Language.Hoop.StateEnv where
--------------------------------------------------------------------------------
import Control.Monad.Except
import Data.Graph
import Data.List (intersperse)
import qualified Data.Map as M
import Language.Haskell.TH.Syntax
import Language.Hoop.Stat... | null | https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/src/Language/Hoop/StateEnv.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| Represents different errors that can arise during the construction of
a class graph.
-------------------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
module Language.Hoop.StateEnv where
import Control.Monad.Except
import Data.Graph
import Data.List (intersperse)
import qualified Data.Map as M
import Language.Haskell.TH.Syntax
import Language.Hoop.StateDecl
import Language.Hoop.Pretty
data StateGraphError
= ClassNotFound Str... |
0d2128ed6a16d4e58ffbac30ed1fb407481599d57163f7615dfeed9d140d4bfe | status-im/status-electron | react.cljs | (ns cljsjs.react)
| null | https://raw.githubusercontent.com/status-im/status-electron/aad18c34c0ee0304071e984f21d5622735ec5bef/src_front/cljsjs/react.cljs | clojure | (ns cljsjs.react)
| |
ee515a650df57e4d0573c301aeb62dd4c063f2f020a590ab2ed375c48ad55b2c | parof/wstat | ProgramPoints.hs | module SyntacticStructure.ProgramPoints (
getProgramPoints,
chooseWideningPoints) where
import Interfaces.AbstractStateDomain
import SyntacticStructure.ControlFlowGraph
import SyntacticStructure.WhileGrammar
import Tools.StateTransitions
import Tools.Utilities
import Tools.MonadicBuilder
getProgramPoints :: Abstr... | null | https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/SyntacticStructure/ProgramPoints.hs | haskell | choose the entry program point for each loop | module SyntacticStructure.ProgramPoints (
getProgramPoints,
chooseWideningPoints) where
import Interfaces.AbstractStateDomain
import SyntacticStructure.ControlFlowGraph
import SyntacticStructure.WhileGrammar
import Tools.StateTransitions
import Tools.Utilities
import Tools.MonadicBuilder
getProgramPoints :: Abstr... |
1ebe2749ec8b60dba4dce8fe9c4bfd43193063ba43a594454d7c3b48e1fda022 | BinaryAnalysisPlatform/bap | primus_round_robin_main.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
open Format
include Self()
module Mid = Monad.State.Multi.Id
type t = {
pending : Mid.t Fqueue.t;
finished : Mid.Set.t
}
let state = Primus.Machine.State.declare
~uuid:"d1b33e16-bf5d-48d5-a174-3901dff3d123"
~name:"round-rob... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/plugins/primus_round_robin/primus_round_robin_main.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
open Bap_primus.Std
open Format
include Self()
module Mid = Monad.State.Multi.Id
type t = {
pending : Mid.t Fqueue.t;
finished : Mid.Set.t
}
let state = Primus.Machine.State.declare
~uuid:"d1b33e16-bf5d-48d5-a174-3901dff3d123"
~name:"round-rob... |
Dataset Card for Dataset Name
Dataset Description
Collection of functional programming languages from GitHub.
- Point of Contact: dhuck
Dataset Summary
This dataset is a collection of code examples of functional programming languages for code generation tasks. It was collected over a week long period in March 2023 as part of project in program synthesis.
Dataset Structure
Data Instances
{
'id': str
'repository': str
'filename': str
'license': str or Empty
'language': str
'content': str
}
Data Fields
id: SHA256 has of the content field. This ID scheme ensure that duplicate code examples via forks or other duplications are removed from the dataset.- 'repository': The repository that the file was pulled from. This can be used for any attribution or to check updated licensing issues for the code example.
- 'filename': Filename of the code example from within the repository.
- 'license': Licensing information of the repository. This can be empty and further work is likely necessary to parse licensing information from individual files.
- 'language': Programming language of the file. For example, Haskell, Clojure, Lisp, etc...
- 'content': Source code of the file. This is full text of the source with some cleaning as described in the Curation section below. While many examples are short, others can be extremely long. This field will like require preprocessing for end tasks.
Data Splits
More information to be provided at a later date. There are 157,218 test examples and 628,869 training examples. The split was created using scikit-learn' test_train_split function.
Dataset Creation
Curation Rationale
This dataset was put together for Programming Synthesis tasks. The majority of available datasets consist of imperative programming languages, while the program synthesis community has a rich history of methods using functional languages. This dataset aims to unify the two approaches by making a large training corpus of functional languages available to researchers.
Source Data
Initial Data Collection and Normalization
Code examples were collected in a similar manner to other existing programming language datasets. Each example was pulled from public repositories on GitHub over a week in March 2023. I performed this task by searching common file extensions of the target languages (Clojure, Elixir, Haskell, Lisp, OCAML, Racket and Scheme). The full source is included for each coding example, so padding or truncation will be necessary for any training tasks. Significant effort was made to remove any personal information from each coding example. For each code example, I removed any email address or websites using simple regex pattern matching. Spacy NER was used to identify proper names in the comments only. Any token which spanned a name was simply replaced with the token PERSON while email addresses and websites were dropped from each comment. Organizations and other information were left intact.
Who are the source language producers?
Each example contains the repository the code originated from, identifying the source of each example.
Personal and Sensitive Information
While great care was taken to remove proper names, email addresses, and websites, there may exist examples where pattern matching did not work. While I used the best spacy models available, I did witness false negatives on other tasks on other datasets. To ensure no personal information makes it into training data, it is advisable to remove all comments if the training task does not require them. I made several PR to the comment_parser python library to support the languages in this dataset. My version of the parsing library can be found at https://github.com/d-huck/comment_parser
Considerations for Using the Data
Social Impact of Dataset
[More Information Needed]
Discussion of Biases
While code itself may not contain bias, programmers can use offensive, racist, homophobic, transphobic, misogynistic, etc words for variable names. Further updates to this dataset library will investigate and address these issues. Comments in the code examples could also contain hateful speech. Models trained on this dataset may need additional training on toxicity to remove these tendencies from the output.
Other Known Limitations
The code present in this dataset has not been checked for quality in any way. It is possible and probable that several of the coding examples are of poor quality and do not actually compile or run in their target language. Furthermore, there exists a chance that some examples are not the language they claim to be, since github search matching is dependent only on the file extension and not the actual contents of any file.
- Downloads last month
- 51