content stringlengths 10 1.02M | lang stringclasses 87
values | size int64 10 1.02M | ext stringclasses 189
values | max_stars_count int64 1 82k ⌀ | avg_line_length float64 1.89 277k | max_line_length int64 1 417k | alphanum_fraction float64 0.1 1 |
|---|---|---|---|---|---|---|---|
TYPE=VIEW
query=select if((locate(\'.\',`ibp`.`TABLE_NAME`) = 0),\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-(1)),\'`\',\'\') AS `object_name`,sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) ... | Visual Basic | 2,720 | frm | null | 170 | 857 | 0.701103 |
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
// JSON Writes the interface to the wire
func JSON(writer http.ResponseWriter, v interface{}) {
if body, err := json.Marshal(v); err != nil {
ServerError(writer, err)
} else {
writer.Write(body)
}
}
// JSONB Just the bytes mam
func JSO... | Go | 1,234 | go | null | 22.436364 | 83 | 0.709076 |
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="transtable">
<xsl:for-each select="ttkeyword">
<xsl:value-of select="@keyword"/>
<xsl:apply-templates select="ttentry"/>
</xsl:for-each>
</xsl:template>
... | XSLT | 423 | xslt | null | 26.4375 | 50 | 0.671395 |
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'keyboard_visibility'
s.version = '0.5.0'
s.summary = 'Flutter keyboard visibility project.'
s.description = <<-DESC
Flutter keyboard visibility project.
... | Ruby | 743 | podspec | null | 33.772727 | 83 | 0.58681 |
// SPDX-License-Identifier: agpl-3.0
//pragma solidity ^0.8.0;
pragma solidity ^0.6.12;
interface ICurve2PoolV1 {
function get_virtual_price() external view returns (uint256);
//function add_liquidity(uint256[3] calldata _amounts, uint256 _min) external payable;
function add_liquidity(uint256[2] calldata ... | Solidity | 990 | sol | null | 28.285714 | 90 | 0.708081 |
/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* Service for doing schema-related operatio... | TypeScript | 23,597 | ts | 1 | 59.739241 | 493 | 0.70403 |
(*
* Copyright 2021 Mirko Bianco (email: writetomirko@gmail.com)
*
* 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 Apiriction, including without limitation the rights
* to use, ... | Pascal | 34,402 | pas | 27 | 40.760664 | 220 | 0.753096 |
use proc_macro2::TokenStream as TokenStream2;
use quote::{quote, quote_spanned};
use syn::{spanned::Spanned, Ident};
use super::{util, Property, PropertyType, ReturnedWidget};
impl PropertyType {
pub fn connect_widget_with_unwrap(&self) -> bool {
if let PropertyType::Widget(widget) = &self {
i... | Rust | 2,020 | rs | 230 | 29.275362 | 85 | 0.531188 |
# Program to print Hello World in R
print("Hello World")
hello <- "Hellow World"
print(hello)
hello
# You can check the type of var hello
print(typeof("Hello World"))
typeof(hello) | R | 189 | r | null | 12.6 | 37 | 0.703704 |
# bottom-up dp: traverses iteratively starting from the smallest subset (bottom) going up
# ex: fib(1), fib(2), fib(3), fib(4), ... , fib(n)
def knapsack_bottom_up_dp(weights, values, W):
# generating array for storing optimal values
n = len(weights)
opt_vals = [[0 for _ in range(W + 1)] for _ in range(n + ... | Python | 9,649 | py | 23 | 39.707819 | 110 | 0.579749 |
const std = @import("std");
const builtin = @import("builtin");
const backend = if (@hasDecl(@import("root"), "zgtBackend"))
@import("root").zgtBackend
else switch (builtin.os.tag) {
.windows => @import("backends/win32/backend.zig"),
.linux => @import("backends/gtk/backend.zig"),
.freestanding => blk: ... | Zig | 1,544 | zig | 160 | 28.072727 | 90 | 0.588083 |
open Hardcaml
open Hardcaml.Signal
module I = struct
type 'a t = { clock : 'a } [@@deriving sexp_of, hardcaml]
end
module O = struct
type 'a t = { writeback_data : 'a; [@bits 32] writeback_pc : 'a [@bits 32] }
[@@deriving sexp_of, hardcaml]
end
let circuit_impl (program : Program.t) (scope : Scope.t) (input : ... | OCaml | 4,364 | ml | 22 | 32.088235 | 80 | 0.710816 |
(defproject tech.gojek/ziggurat "2.8.0"
:description "A stream processing framework to build stateless applications on kafka"
:url "https://github.com/gojektech/ziggurat"
:license {:name "Apache License, Version 2.0"
:url "https://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[bidi "2.1.4"]
... | Clojure | 3,614 | clj | null | 59.245902 | 141 | 0.470946 |
(*
Save Chrome Tab to Selected Note of Evernote
VERSION 1.1
// AUTHORED BY:
John Xiao (http://zaishanda.com/)
// UPDATE NOTICES
** Follow @jfxiao07 on Twitter, Facebook, Google Plus, and ADN for Update Notices! **
// License
MIT
*)
(*
======================================
// MAIN PROGRAM
============... | AppleScript | 4,294 | applescript | 4 | 37.017241 | 184 | 0.628086 |
#!/usr/bin/perl
package squoia::conll2xml_desr;
use strict;
use utf8;
#use XML::LibXML;
#binmode STDIN, ':utf8';
#binmode STDOUT, ':utf8';
#binmode (STDERR);
use File::Spec::Functions qw(rel2abs);
use File::Basename;
my %mapCliticToEaglesTag = (
'la' => 'PP3FSA00',
'las' => 'PP3FPA00',
... | Perl | 79,721 | pm | 9 | 35.181377 | 334 | 0.570038 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>References: runtime.xmmreg.element</title>
<link href="../css/light-v0.3.6.css" rel="stylesheet">
<script src="../jvs/golds-v0.3.6.js"></... | HTML | 1,478 | html | 1 | 64.26087 | 294 | 0.688092 |
namespace Ionide.ProjInfo
open System
open System.Collections.Generic
open Microsoft.Build.Evaluation
open Microsoft.Build.Framework
open System.Runtime.Loader
open System.IO
open Microsoft.Build.Execution
open Types
open Microsoft.Build.Graph
open System.Diagnostics
/// functions for .net sdk probing
module SdkDisc... | F# | 43,684 | fs | null | 45.790356 | 229 | 0.633939 |
module JpStringsFinder
class ERBFinder
attr_reader :src
def initialize(src)
@src = src
end
# Very very rough implementation for the moment...
def find
src.split("\n")
end
end
end
| Ruby | 222 | rb | 1 | 13.875 | 54 | 0.621622 |
/* The set of files in the file system. */
sig File {
/* A file is potentially a link to other files. */
link : set File
}
/* The set of files in the trash. */
sig Trash extends File {}
/* The set of protected files. */
sig Protected extends File {}
/* The trash is empty. */
pred inv1 {
no Trash
}
/* All file... | Alloy | 2,345 | als | null | 14.748428 | 68 | 0.653305 |
# Search and indexing number elements
Handle numbers search queries, extract function and indexing.
This type of search is specified on http://hl7-fhir.github.io/search.html#number.
In extract_as_number is passed resource, path, element_type and returns
[numeric](http://www.postgresql.org/docs/9.3/static/datatype-nu... | Literate CoffeeScript | 3,022 | litcoffee | null | 32.148936 | 96 | 0.636995 |
#
# Copyright 2019 Xilinx, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | Tcl | 1,999 | tcl | 1 | 35.070175 | 310 | 0.733367 |
/*
* Copyright 2018 Andrei Pangin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | C++ | 34,791 | cpp | null | 32.184089 | 129 | 0.562128 |
/* -*- mode:C++; c-basic-offset:4 -*-
Shore-MT -- Multi-threaded port of the SHORE storage manager
Copyright (c) 2007-2009
Data Intensive Applications and Systems Labaratory (DIAS)
Ecole Polytechnique Federale de Lausanne
All Rights Reser... | C | 23,974 | h | 4 | 36.713629 | 95 | 0.582423 |
||| An order is a particular kind of binary relation. The order
||| relation is intended to proceed in some direction, though not
||| necessarily with a unique path.
|||
||| Orders are often defined simply as bundles of binary relation
||| properties.
|||
||| A prominent example of an order relation is LTE over Nat.
m... | Idris | 1,384 | idr | 128 | 32.186047 | 80 | 0.692197 |
{% include _honne.html %}
{% include {{ honne_theme_base }}/layouts/default.html %}
| HTML | 84 | html | null | 28 | 57 | 0.690476 |
Parameter definitions
=====================
Parameter definitions within force field XMLs follow the same
conventions as defined in the `OpenMM
documentation <http://docs.openmm.org/7.0.0/userguide/application.html#creating-force-fields>`__.
Currently, only certain functional forms for molecular forces are
supported, ... | reStructuredText | 5,107 | rst | 1 | 48.179245 | 306 | 0.754063 |
#lang scribble/base
@title[#:tag "top"]{Title}
@section[#:tag "1" #:style 'grouper]{Section One}
This is @secref["1"] in @secref["top"].
See @secref["2"] and @secref["2.1"].
See @secref["3"], @secref["3.1"], @secref["3.2"], @secref["3.2.1"], and
@secref["3.3"].
@section[#:tag "2" #:style 'grouper]{Section Two}
... | Racket | 692 | scrbl | 161 | 18.702703 | 71 | 0.632948 |
TYPE=VIEW
query=select if(isnull(`performance_schema`.`accounts`.`HOST`),\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,(sum(`stmt`.`total_latency`) / sum(`stmt`.`total`)) AS `statement_avg_latency`,sum(`stmt`.`full... | Visual Basic | 3,651 | frm | null | 228.1875 | 1,253 | 0.769378 |
DATA WI95SPEC;
INFILE EBSPEC LRECL = 99;
LENGTH
SEQ_SID 7
MRN_S $17
PAY1_X $17
PAY2_X $17
ADATE 4
DDATE 4
DOB 4
ZIP $5
;
LABEL
SEQ_SID ='I:HCUP SID record sequence number'
MRN_S ='I:Medical record numbe... | SAS | 995 | sas | 7 | 20.729167 | 58 | 0.459296 |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... | Ada | 3,904 | adb | null | 56.57971 | 78 | 0.421619 |
enum util'boolean {
util'boolean'true, util'boolean'false
}
one sig util'language {
AsDeclaration'pattern'queries'child : type'EClass'class->type'EClass'class,
util'root : one type'ENamedElement'class + (type'EStructuralFeature'class + (type'EPackage'class + (type'EEnum'class + (type'EClassifier'class + (type'EClass... | Alloy | 8,560 | als | null | 67.401575 | 684 | 0.782009 |
import {
run,
squiggleExpression,
errorValue,
result,
} from "../../src/js/index";
import { testRun } from "./TestHelpers";
import * as fc from "fast-check";
describe("Squiggle's parser is whitespace insensitive", () => {
test("when assigning a distribution to a name and calling that name", () => {
// in... | TypeScript | 1,331 | ts | 3 | 25.113208 | 79 | 0.506386 |
*! version 2.0.1 30july2019
* Started from stepdown.ado file from https://github.com/PrincetonBPL/ado-gallery
* Added:
* use the naive pvalue as a starting point
* within the same loop as the stepdown, create randomization inference by randomization-group
* included option to make controls demeaned a... | Stata | 6,242 | ado | 3 | 32.852632 | 351 | 0.681032 |
; A074529: a(n) = 2^n + 3^n + 7^n.
; 3,12,62,378,2498,17082,118442,825858,5771618,40373802,282535322,1977505938,13841822738,96890612922,678227872202,4747575891618,33232973681858,232630643258442,1628413985593082,11398896348158898,79792269785444978,558545874545734362,3909821079968241962,27368747434232483778,1915812316630... | Assembly | 981 | asm | 22 | 75.461538 | 829 | 0.873598 |
def raises(err, lamda):
try:
lamda()
return False
except err:
return True
def expand_tuples(L):
"""
>>> expand_tuples([1, (2, 3)])
[(1, 2), (1, 3)]
>>> expand_tuples([1, 2])
[(1, 2)]
"""
if not L:
return [()]
elif not isinstance(L[0], tuple):
... | Python | 2,982 | py | 3 | 27.357798 | 78 | 0.551643 |
(* slurp.ml - slurps in a lib_pcap (tcpdump) dump file / stream *)
(* 2002-07-29.. *)
(* Time-stamp: <2002-08-07 12:03:48 kw217@astrocyte.cl.cam.ac.uk> *)
(* Direct libpcap support and HOL label output added by smb50 *)
open Nettypes;;
open Netconv;;
open Net2hol;;
open Netipreass;;
open Pcapfile;;
open Pcapinterface;... | OCaml | 7,867 | ml | 34 | 34.204348 | 116 | 0.621838 |
<?xml version="1.0" encoding="UTF-8"?>
<language namespace="test.de.itemis.mps.modelmerger.testlanguage" uuid="d119cd03-ed7e-477f-adb6-22a3d2e6ea77" languageVersion="0" moduleVersion="0">
<models>
<modelRoot contentPath="${module}" type="default">
<sourceRoot location="models" />
</modelRoot>
</models... | Maple | 5,498 | mpl | null | 80.852941 | 148 | 0.746453 |
// filename: cap_tamperAlert.als
module cap_tamperAlert
open IoTBottomUp
one sig cap_tamperAlert extends Capability {}
{
attributes = cap_tamperAlert_attr
}
abstract sig cap_tamperAlert_attr extends Attribute {}
one sig cap_tamperAlert_attr_tamper extends cap_tamperAlert_attr {}
{
values = cap_tamperAlert_attr... | Alloy | 582 | als | null | 34.235294 | 91 | 0.853952 |
=head1 LICENSE
Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licen... | Perl | 889 | pm | null | 27.78125 | 100 | 0.766029 |
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX foa... | SPARQL | 1,669 | sparql | 2 | 45.108108 | 139 | 0.684242 |
;;
;; testing file.util
;;
(use gauche.test)
(use srfi-1)
(use srfi-13)
(use gauche.uvector)
(test-start "file.util")
(use file.util)
(cond-expand
[gauche.os.windows
(test-module 'file.util :allow-undefined '(sys-symlink))]
[else
(test-module 'file.util)])
;; shorthand of normalizing pathname. this doesn't do... | Scheme | 31,161 | scm | null | 38.95125 | 104 | 0.511248 |
(ns hello.middleware
(:require
[macchiato.middleware.defaults :as defaults]))
(defn wrap-defaults [handler]
(defaults/wrap-defaults handler defaults/site-defaults))
| Clojure | 176 | cljs | 33 | 19.555556 | 58 | 0.744318 |
<?php
namespace Drupal\Tests\file\Functional;
use Drupal\Core\File\FileSystemInterface;
use Drupal\file\Entity\File;
use Drupal\Tests\TestFileCreationTrait;
/**
* Tests the _file_save_upload_from_form() function.
*
* @group file
*
* @see _file_save_upload_from_form()
*/
class SaveUploadFormTest extends FileMan... | PHP | 24,114 | php | 4 | 40.459732 | 174 | 0.672514 |
/*************************************************************************
* *
* YAP Prolog *
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
************************************... | Prolog | 8,596 | yap | null | 26.368098 | 78 | 0.543392 |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50630
Source Host : localhost
Source Database : mine_laracms_no_data
Target Server Type : MySQL
Target Server Version : 50630
File Encoding : utf-8
Date: 07/10... | SQL | 235,625 | sql | 130 | 253.90625 | 65,601 | 0.48303 |
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY UCPU2 IS
PORT (
SW : in STD_LOGIC_VECTOR(17 downto 0);
LEDR : out STD_LOGIC_VECTOR(17 downto 0);
LEDG: out STD_LOGIC_VECTOR(7 downto 0);
HEX7, HEX6, HEX5, HEX4, HEX3, HEX2, HEX1, HEX0: out STD_LOGIC_VECTOR(0 to 6);
KEY: in STD_LOGIC_VECTOR(7 downto 0);
CLOCK_50... | VHDL | 2,915 | vhd | null | 30.684211 | 98 | 0.686792 |
<#
.Synopsis
This endpoint will return all Users Groups bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization.
Each element will contain the group's type, id, attributes and paths.
The `attributes` object is a key/value hash of compiled graph attribut... | PowerShell | 9,599 | ps1 | 7 | 39.179592 | 232 | 0.649547 |
functions {
vector SEIR_matrix_C(real time, vector y, real[] params) {
vector[20] dydt;
real InR1;
real RR1;
real InR2;
real RR2;
real InR3;
real RR3;
real InR4;
real RR4;
real k12;
real k14;
real k21;
real k23;
real k24;
real k31;
real k32;
real k33... | Stan | 3,204 | stan | null | 25.228346 | 138 | 0.555556 |
/*************************************************************************
* *
* YAP Prolog *
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
************************************... | Prolog | 2,804 | yap | 90 | 25.490909 | 76 | 0.583452 |
<%--
Document : footer
Created on : Jan 4, 2020, 11:19:23 AM
Author : cgallen
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!-- start of footer.jsp -->
<footer class="footer">
<div class="container">
<p class="text-muted">© <a href="https://www.opennms.com/" target="_... | Java Server Pages | 1,018 | jsp | 1 | 39.153846 | 128 | 0.604126 |
module Path where
open import Basics hiding (_==_)
open import Proc
import Graph
private open module G = Graph Nat
data Node : Set where
node : Nat -> Node
stop : Node
_==_ : Node -> Node -> Bool
stop == stop = true
node zero == node zero = true
node (suc n) == node (suc m) = node n == no... | Agda | 2,559 | agda | 1,989 | 20.804878 | 62 | 0.527941 |
file(REMOVE_RECURSE
"CMakeFiles/Server.dir/server.cpp.o"
"Server"
"Server.pdb"
)
# Per-language clean rules from dependency scanning.
foreach(lang CXX)
include(CMakeFiles/Server.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()
| CMake | 240 | cmake | null | 21.818182 | 67 | 0.766667 |
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
package emrserverless
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.1.1"
| Go | 187 | go | 1 | 26.714286 | 73 | 0.796791 |
Class {
#name : #SeamlessTestContainer2,
#superclass : #Object,
#instVars : [
'name',
'content'
],
#category : 'Seamless-Tests'
}
{ #category : #'instance creation' }
SeamlessTestContainer2 class >> named: aString with: anObject [
^self new
name: aString;
content: anObject
]
{ #category : #'instance cr... | Smalltalk | 918 | st | 12 | 17.653846 | 63 | 0.685185 |
struct Test {
1: required i32 field1,
# 2: required bool field2,
}
| Thrift | 75 | thrift | 76 | 15 | 30 | 0.626667 |
set Date 1580827726
set Time 79786
set Problem P2
set Team a64507
set Classify {Wrong Answer}
set Mark 0
set Size 569
set Observations {}
set Execution -1
set State pending
set Language {Java zipped}
set Program src.zip
set Report 1.html
set ... | Tcl | 442 | tcl | null | 24.555556 | 66 | 0.595023 |
#lang scribble/doc
@(require scribble/manual "guide-utils.rkt")
@title[#:tag "compile"]{Compilation and Configuration: @exec{raco}}
The @exec{raco} (short for ``@bold{Ra}cket @bold{co}mmand'') program
provides a command-line interface to many additional tools for
compiling Racket programs and maintaining a Racket ins... | Racket | 1,651 | scrbl | 10 | 31.75 | 70 | 0.749849 |
program EmprestimoCalc;
uses
Vcl.Forms,
uFormPrincipal in 'uFormPrincipal.pas' {FrmPrincipal},
uCliente in 'uCliente.pas' {FrmCliente};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TFrmPrincipal, FrmPrincipal);
Application.Run;
end... | Pascal | 323 | dpr | null | 20.1875 | 57 | 0.724458 |
************
Installation
************
===============================
Installing Python and git(-lfs)
===============================
----------------------
Python version support
----------------------
Officially Python 3.6 and 3.7.
------------------
Installing git lfs
------------------
cimd-d and cimr integr... | reStructuredText | 1,480 | rst | 1 | 23.870968 | 85 | 0.64527 |
(ns cats.monad.identity-spec
#?@(:cljs
[(:require [cljs.test :as t]
[clojure.test.check]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop :include-macros true]
[cats.labs.test :as lt]
[cats.builti... | Clojure | 2,300 | cljc | 896 | 28.75 | 78 | 0.60087 |
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | SystemVerilog | 26,234 | sv | 3 | 48.13578 | 99 | 0.627354 |
module Day6A where
import Data.List (delete, nub)
import Data.List.Split (splitOn)
import System.Environment (getArgs)
-- Usage: runghc --ghc-arg="-package split" 6a.hs inputs/day6
main :: IO ()
main = do
args <- getArgs;
content <- readFile $ head args;
print $ sum $ map (length . delete '\... | Haskell | 374 | hs | null | 26.714286 | 80 | 0.622995 |
open! Base
let base_bootstrap page_title =
(* From there: https://getbootstrap.com/docs/4.5/getting-started/introduction/ *)
String.concat ~sep:""
[
{html|
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-... | OCaml | 2,719 | ml | null | 36.743243 | 215 | 0.638838 |
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Sofa" do
end
| Ruby | 91 | rb | 1 | 15.166667 | 65 | 0.758242 |
open Printf
open Bitstring
let display pkt = bitmatch pkt with
| {4:4
;hdrlen: 4
;tos:8
;length:16
;identification:16
;flags:3
;fragoffset:13
;ttl:8
;protocol:8
;checksum:16
;source:32
;dest:32
;options:(hdrlen-5)*32:bitstring;
payload:-1:bitstring
} -> let ... | OCaml | 1,582 | ml | 142 | 23.264706 | 57 | 0.598609 |
---
title : "Bisimulation: Relating reduction systems"
layout : page
prev : /More/
permalink : /Bisimulation/
next : /Inference/
---
\begin{code}
module plfa.Bisimulation where
\end{code}
Some constructs can be defined in terms of other constructs. In the
previous chapter, we saw how _let_ terms can... | Literate Agda | 14,597 | lagda | 3 | 30.991507 | 89 | 0.509762 |
(ns vimsical.subgraph.re-frame
(:require
[vimsical.subgraph :as sg]
[re-frame.core :as re-frame]
[re-frame.interop :as interop]))
;; * Db helpers
(defn- ref?
[_ expr]
(sg/ref? (deref (re-frame/subscribe [::sg/id-attrs])) expr))
(defn- get-ref
[{:keys [db]} pattern lookup-ref]
{:pre [(interop/deref... | Clojure | 1,298 | cljc | 60 | 23.178571 | 63 | 0.578582 |
syntax = "proto3";
option go_package = "github.com/fcvarela/gosg/protos";
package protos;
message State {
string name = 1;
string programName = 2;
enum Cullface {
CULL_BACK = 0;
CULL_FRONT = 1;
CULL_BOTH = 2;
}
bool culling = 3;
Cullface cullFace = 4;
enum BlendMod... | Protocol Buffer | 885 | proto | 26 | 20.581395 | 54 | 0.59096 |
module Web.Raw.Html
import JS
import Web.Internal.HtmlPrim
import Web.Internal.Types
--------------------------------------------------------------------------------
-- Interfaces
--------------------------------------------------------------------------------
namespace AudioTrack
export
enabled : A... | Idris | 341,422 | idr | null | 34.01634 | 101 | 0.555158 |
//
// DO NOT MODIFY! THIS IS AUTOGENERATED FILE!
//
namespace Xilium.CefGlue
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Xilium.CefGlue.Interop;
// Role: PROXY
public sealed unsafe partial class CefResponse : ID... | C# | 1,717 | cs | 3 | 22.893333 | 73 | 0.480489 |
SRC = \
c_to_expr.cpp \
generic_utils.cpp \
load_java_class.cpp \
require_expr.cpp \
require_goto_statements.cpp \
require_type.cpp \
# Empty last line (please keep above list sorted!)
INCLUDES = -I .. -I . -I ../../src
include ../../src/config.inc
include ../../src/common
CLEANFILES = testing-utils$(L... | Makefile | 412 | null | null | 18.727273 | 52 | 0.67233 |
''' <summary>
''' Superclass of all game units.
''' </summary>
<Serializable()> Public Class Troop
' #################################################################################################
' ATTRIBUTES
' ########################################################################################... | Visual Basic | 6,743 | vb | 1 | 35.303665 | 114 | 0.510307 |
module LC.Reduction where
open import LC.Base
open import LC.Subst
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Nullary
-- β-reduction
infix 3 _β→_
data _β→_ : Term → Term → Set where
β-ƛ-∙ : ∀ {M N} → ((ƛ M) ∙ N) β→ (M [ N ])
β-ƛ : ∀ {M N} → M β→ N → ƛ M β→ ƛ N
β-∙-l : ∀ ... | Agda | 2,515 | agda | 2 | 29.588235 | 79 | 0.438171 |
# Install script for directory: /media/min/d84b4767-6283-4b67-89ca-ed3fc4849fd5/azurekinect/Azure-Kinect-Sensor-SDK/tests/Transformation
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREF... | CMake | 1,208 | cmake | null | 30.2 | 136 | 0.758278 |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
... | Erlang | 23,828 | erl | 21 | 32.026882 | 97 | 0.580074 |
(*
Copyright (C) 2017 M.A.L. Marques
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)
(* type: work_gga_x *)
mu := 0.0617:
kappa := 1.245:
alpha := 0.0483:
f0 := ... | Maple | 409 | mpl | 16 | 24.058824 | 72 | 0.618582 |
<%@page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="tiles" uri="htt... | Java Server Pages | 13,173 | jsp | null | 34.484293 | 261 | 0.577393 |
# Trust-region
# ------------------------------------------------------------
const TRConstraint = CI{VectorAffineDecisionFunction{Float64}, MOI.NormInfinityCone}
@with_kw mutable struct TRData{T <: AbstractFloat}
Q̃::T = 1e10
Δ::MOI.VariableIndex = MOI.VariableIndex(0)
constraint::TRConstraint = TRConstrai... | Julia | 8,727 | jl | null | 32.932075 | 232 | 0.632176 |
#!/usr/bin/python3
# -----------------------------------------------------------
# Define project related exceptions
# -----------------------------------------------------------
class OverlappingColumns(Exception):
"""
Exception for overlapping columns of two dataframes
"""
def __init__(self, common_c... | Python | 1,342 | py | 6 | 31.952381 | 103 | 0.609538 |
export const getters = {
DEFAULT_FONT_FAMILY() {
return "Noto Sans JP"
},
DEFAULT_FONT_COLOR() {
return "#6C5E69"
},
items() {
return [
"Noto Sans JP",
"M PLUS",
"Sawarabi Gothic",
"Kosugi",
"Kosugi Maru",
"Nico Moji"
]
}
}
| JavaScript | 288 | js | 1 | 15.157895 | 25 | 0.510417 |
PREFIX ex: <http://example.com/>
SELECT ?s1 ?d3s1 ?d6s1 ?d7s1 ?d5s1 ?d1s1
WHERE {
?s1 ex:d3 ?d3s1 .
?s1 ex:d6 ?d6s1 .
?s1 ex:d7 ?d7s1 .
?s1 ex:d5 ?d5s1 .
?s1 ex:d1 ?d1s1 .
OPTIONAL {
?s1 ex:d3 ?d3s1 .
?s2 ex:d3 ?d3s2 .
?s1 ex:d6 ?d6s1 .
?s2 ex:d6 ?d6s2 .
?s1 ex:d7 ?d7s1 .
?s2 ex:d7 ?d7s2 .
?s1 ex:d5 ?d5s1 .
?s2 ex:d... | SPARQL | 580 | rq | null | 23.2 | 187 | 0.537931 |
//Testcase
import Clocks::*;
interface Design_IFC;
method Action inp_clk1(Bit#(6) in_data);
method Bool ack();
method Bit#(6) out_data();
endinterface : Design_IFC
(*
CLK = "clk_1",
RST_N = "rst_1",
synthesize
*)
module mkDesign#(Clock clk_2, Reset rst_2) (Design_IFC);
RWire#(Bit#(6)) in_data();
mk... | Bluespec | 729 | bsv | null | 19.702703 | 66 | 0.680384 |
using System.Collections.Generic;
using StoreModel;
using System;
namespace StoreData
{
public interface IProductRepository
{
List<Product> GetProducts();
Product AddProduct(Product newProduct);
Product GetProductByID(int ID);
}
} | C# | 275 | cs | null | 16.176471 | 47 | 0.683636 |
use type_constructor::prelude::*;
fn main()
{
use core::fmt;
types!
{
#[ derive( Debug ) ]
pair MyHomoPair : < T : fmt::Debug >;
}
let x = MyHomoPair( 13, 31 );
dbg!( &x );
// prints : &x = MyHomoPair( 13, 31 )
let clone_as_array : [ i32 ; 2 ] = x.clone_as_array();
dbg!( &clone_as_array );
... | Rust | 492 | rs | null | 23.428571 | 58 | 0.569106 |
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 03/24/2021 03:20:58 PM
-- Design Name:
-- Module Name: tb_d_latch - Behavioral
-- Project Name:
-- Target Devices:
-- Tool Versions:
-- Description:
--
-- Dependencies:
--
-- Revisio... | VHDL | 3,121 | vhd | null | 21.978873 | 82 | 0.454021 |
pragma solidity ^0.4.20;
// File: node_modules/zeppelin-solidity/contracts/math/SafeMath.sol
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
... | Solidity | 20,094 | sol | 50 | 29.724852 | 137 | 0.674181 |
/*
* Copyright 2017 - 2019 tsc4j project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | Groovy | 8,944 | groovy | null | 31.055556 | 122 | 0.602639 |
use crate::session::{Session, Step};
use snmp_mp::{self, SnmpMsg};
use snmp_usm::{Digest, PrivKey, SecurityParams};
use std::{
io::{Error, ErrorKind, Result},
net::{ToSocketAddrs, UdpSocket},
time::Duration,
};
const MAX_RETRIES: u32 = 2;
// Timeout in seconds.
const TIMEOUT: u64 = 3;
// Client to send an... | Rust | 7,501 | rs | null | 34.408257 | 99 | 0.469671 |
(ADE::ROMP)
(ADE::ROM-GUTS
(4 4 (:LINEAR LEN-WHEN-PREFIXP))
(2 2 (:REWRITE DEFAULT-CDR))
(2 1 (:REWRITE DEFAULT-+-2))
(1 1 (:REWRITE DEFAULT-+-1))
)
(ADE::RAM)
(ADE::RAMP)
(ADE::RAM-GUTS
(4 4 (:LINEAR LEN-WHEN-PREFIXP))
(2 2 (:REWRITE DEFAULT-CDR))
(2 1 (:REWRITE DEFAULT-+-2))
(1 1 (:REWRITE DEFAULT-+-1))
)
(... | Common Lisp | 27,921 | lsp | 1 | 33.438323 | 77 | 0.653773 |
pragma solidity 0.5.1;
contract Migrations {
address public owner;
uint public last_completed_migration;
modifier restricted() {
if (msg.sender == owner) _;
}
constructor() public {
owner = msg.sender;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = c... | Solidity | 505 | sol | null | 21.041667 | 59 | 0.726733 |
(import (chicken file)
(chicken file posix)
(chicken process-context)
(chicken sort)
(chicken string))
(include "test.scm")
(handle-exceptions exn
'ignore
(delete-directory "find-files-test-dir" #t))
(define (file-list=? a b)
(equal? (sort a string<?) (sort b string<?)))
(for-e... | Scheme | 6,366 | scm | 4 | 28.80543 | 104 | 0.434967 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SaintCoinach.Graphics {
public class ImcFile {
#region Fields
private Dictionary<byte, ImcPart> _Parts = new Dictionary<byte, ImcPart>();
#endregion
#regio... | C# | 1,652 | cs | 266 | 31.169811 | 83 | 0.563559 |
using System;
using System.Threading.Tasks;
using eShopOnContainers.Core.Services.RequestProvider;
using eShopOnContainers.Core.Models.Basket;
using eShopOnContainers.Core.Services.FixUri;
using eShopOnContainers.Core.Helpers;
namespace eShopOnContainers.Core.Services.Basket
{
public class BasketService : IBasket... | C# | 2,312 | cs | 387 | 36.125 | 119 | 0.675606 |
open main
pred idE3JDhmoNQjSeuunz9_prop5 {
some f : File | eventually f not in File
}
pred __repair { idE3JDhmoNQjSeuunz9_prop5 }
check __repair { idE3JDhmoNQjSeuunz9_prop5 <=> prop5o } | Alloy | 187 | als | null | 31.166667 | 55 | 0.786096 |
\subsection{Creazione di un nuovo progetto Gradle}
Creare un progetto Gradle è molto semplice sfruttando direttamente il task di default \textsc{init}. Creiamo una cartella in cui eseguiremo da terminale il comando:
\begin{verbatim}
$ gradle init\end{verbatim}
Notiamo che nella directory sono stati creati 4 file e ... | TeX | 1,630 | tex | null | 85.789474 | 505 | 0.789571 |
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... | Cuda | 7,159 | cu | 2 | 45.025157 | 80 | 0.636541 |
; A166956: a(n) = 2^n +(-1)^n - 2.
; 0,-1,3,5,15,29,63,125,255,509,1023,2045,4095,8189,16383,32765,65535,131069,262143,524285,1048575,2097149,4194303,8388605,16777215,33554429,67108863,134217725,268435455,536870909,1073741823,2147483645,4294967295,8589934589,17179869183,34359738365,68719476735,137438953469,274877906943... | Assembly | 1,754 | asm | 22 | 146.166667 | 1,642 | 0.90878 |
10 ! &
! Program name: conpsm Compiled with SCALE 0 on V07.0 &
! Decompiled on 28-Nov-16 at 04:11 PM
50 DIM P1$(30%), P$(9%), P%(17%), P(5%)
60 DIM R$(9%,20%), R%(15%,20%), R(5%,20%)
100 !
110 OPEN "KB:" AS FILE 1%, RECORDSIZE 64%
230 FIELD #1%, 6% AS P1$(1%),6% AS P1$(2%),1% AS P1$(3%),1% AS P1$(4%)... | Visual Basic | 6,043 | bas | 1 | 31.149485 | 145 | 0.479398 |
TestEditor = require './test-editor'
describe "TestEditor", ->
cursorPosition = (editor, i) ->
cursor = editor.getCursors()[i]
point = cursor?.getBufferPosition()
[point?.row, point?.column]
cursorRange = (editor, i) ->
cursor = editor.getCursors()[i]
return null if !cursor?
head = cursor... | CoffeeScript | 2,106 | coffee | 187 | 35.1 | 78 | 0.626306 |
defmodule KV.BucketTest do
use ExUnit.Case, async: true
setup do
{:ok, bucket} = KV.Bucket.start_link
{:ok, bucket: bucket}
end
test "stores values by key", %{bucket: bucket} do
assert KV.Bucket.get(bucket, "milk") == nil
KV.Bucket.put(bucket, "milk", 3)
assert KV.Bucket.get(bucket, "milk... | Elixir | 337 | exs | null | 22.466667 | 51 | 0.64095 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.