content stringlengths 4 1.04M | lang stringclasses 358
values | score int64 0 5 | repo_name stringlengths 5 114 | repo_path stringlengths 4 229 | repo_licenses listlengths 1 8 |
|---|---|---|---|---|---|
! Copyright 2007, 2008 Ryan Murphy, Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel math namespaces tools.test
heaps heaps.private math.parser random assocs sequences sorting
accessors math.order locals ;
IN: heaps.tests
[ <min-heap> heap-pop ] must-fail
[ <max-heap> heap-pop... | Factor | 5 | alex-ilin/factor | basis/heaps/heaps-tests.factor | [
"BSD-2-Clause"
] |
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This shader converts an NCHW FLOAT Tensor (BGR/RGB/GRAY) into a DX texture with channel order BGRA/BGRX/RGBA/GRAY
//
#ifdef FP16
Buffer<float> input : register(t0); // SRV
#else
StructuredBuffer<float> input : register(t0); // SRV
#endif
RWTexture2... | HLSL | 5 | dennyac/onnxruntime | winml/lib/Api.Image/shaders/TensorFloatToSurface.hlsl | [
"MIT"
] |
query GetCollectionTitle($collectionID: ID!) {
collection(collectionID: $collectionID) {
title
}
}
| GraphQL | 3 | miily8310s/hoppscotch | packages/hoppscotch-app/helpers/backend/gql/queries/GetCollectionTitle.graphql | [
"MIT"
] |
dnl Shamelessly stolen from Heimdal
AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl
| M4 | 3 | aakropotkin/jq | config/m4/misc.m4 | [
"CC-BY-3.0"
] |
<pigbehavior language="JScript">
//imagotrigger@gmail.com 10/14 imago.pig originally from manuel.pig and mark.pig Microsoft
// These files provide an intellisense bridge to COM. Use PigJSDocGenerator to update the intellisense if you modify an IDL file. -->
<script src="include\IDL.js"/>
// Helper functions to make ... | PigLatin | 3 | FreeAllegiance/AllegianceDX7 | src/Pigs/Piglets/aaa.pig | [
"MIT"
] |
##appName-/Users/hubiqing/Documents/github-workspace/publishx-cli##
server {
listen 8102;
server_name $host;
set $appName "/Users/hubiqing/Documents/github-workspace/publishx-cli";
root /export/local/www/$appName;
#access_log /export/logs/$appName/access.log main;
#error_log /export/lo... | Nginx | 3 | githbq/publishx-cli | .nginxconf | [
"MIT"
] |
; ModuleID = 'bpftrace'
source_filename = "bpftrace"
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
target triple = "bpf-pc-linux"
%helper_error_t = type <{ i64, i64, i32 }>
; Function Attrs: nounwind
declare i64 @llvm.bpf.pseudo(i64 %0, i64 %1) #0
define i64 @"kprobe:f"(i8* %0) section "s_kprobe:f_... | LLVM | 3 | casparant/bpftrace | tests/codegen/llvm/runtime_error_check_lookup.ll | [
"Apache-2.0"
] |
/**
* @file strand_sort.cpp
* @brief Implementation of [Strand Sort](https://en.wikipedia.org/wiki/Strand_sort) algorithm.
*
* @details
* Strand Sort is a sorting algorithm that works in \f$O(n)\f$ time if list is already sorted and works in \f$O(n^2)\f$ in worst case.
*
* It is passed over the array to be sort... | C++ | 5 | icbdubey/C-Plus-Plus | sorting/strand_sort.cpp | [
"MIT"
] |
# Task: Ackermann function
#
# A simple straightforward recursive implementation.
module ackermann_function
fun ack(m, n: Int): Int
do
if m == 0 then return n + 1
if n == 0 then return ack(m-1,1)
return ack(m-1, ack(m, n-1))
end
for m in [0..3] do
for n in [0..6] do
print ack(m,n)
end
print ""
end
| Nit | 4 | LaudateCorpus1/RosettaCodeData | Task/Ackermann-function/Nit/ackermann-function.nit | [
"Info-ZIP"
] |
Strict
Rem
bbdoc: Audio/OGG loader
about:
The OGG loader module provides the ability to load OGG format #{audio samples}.
End Rem
Module BRL.OGGLoader
ModuleInfo "Version: 1.04"
ModuleInfo "Author: Simon Armstrong"
ModuleInfo "License: zlib/libpng"
ModuleInfo "Copyright: Blitz Research Ltd"
ModuleInfo "Modserver: BR... | BlitzMax | 4 | jabdoa2/blitzmax | mod/brl.mod/oggloader.mod/oggloader.bmx | [
"Zlib"
] |
{
"trustedPhoneNumbers": [{
"numberWithDialCode": "+49 •••• •••••85",
"pushMode": "sms",
"obfuscatedNumber": "•••• •••••85",
"id": 1
}, {
"numberWithDialCode": "+49 ••••• •••••81",
"pushMode": "sms",
"obfuscatedNumber": "••••• •••••81",
"id": 2
}, {
"numberWithDialCode": "+49 ••••• •••••80",
"pus... | JSON | 3 | flufff42/fastlane | spaceship/spec/fixtures/client_appleauth_auth_2fa_response.json | [
"MIT"
] |
#!/bin/bash
#
# Helper script to get GDB running against an executable and a core dump.
# Feel free to modify this file to suit your needs
#
# Usage:
# run-gdb.sh <path to core dump> [path to executable]
#
set -e
help() {
echo
echo "run-gdb.sh <path to core dump> [path to executable]"
echo
echo "MI... | HTML+EEX | 4 | amclain/nerves | priv/templates/script.run-gdb.sh.eex | [
"Apache-2.0"
] |
--TEST--
Bug #25707 (html_entity_decode over-decodes &lt;)
--FILE--
<?php
var_dump(html_entity_decode("&lt;", ENT_COMPAT, 'ISO-8859-1'));
var_dump(html_entity_decode("&#38;", ENT_COMPAT, 'ISO-8859-1'));
var_dump(html_entity_decode("&#38;lt;", ENT_COMPAT, 'ISO-8859-1'));
?>
--EXPECT--
string(4) "<"
st... | PHP | 3 | guomoumou123/php5.5.10 | ext/standard/tests/strings/bug25707.phpt | [
"PHP-3.01"
] |
-- Macro Scripts File
-- Created: Nov 17 1998
-- Modified: Jan 10 1999
-- Author: Frank DeLise
-- MODIFY THIS AT YOUR OWN RISK
--
-- Macro Scripts for Cameras
--***********************************************************************************************
macroScript Free_Camera
category:"Lights and ... | MAXScript | 3 | 89096000/MaxScript | Modelling/softinstance/treeview/icons/Macro_Cameras.mcr | [
"MIT"
] |
(= algolia-app-id* "DMX77CEFW8"
algolia-key-ro* "0e7e64491733b975977b6d1229a3620b"
algolia-key* "../algolia.json"
algolia-write* (no (readenv "DEV")))
(defcache algolia-key 600
(when (file-exists algolia-key*)
(w/infile i algolia-key*
(aand (read-json i) (if (isa it 'string) it it!key)))))
(def a... | Arc | 2 | SoloBSD/QuantumNews | algolia.arc | [
"MIT"
] |
discard """
output: ''''''
"""
import system
type Bar[T] = ref object
value: T
type types = int32|int64 # if I change this to just int32 or int64 it works (compiles)
# if I replace Bar everywhere with seq it also compiles fine
proc Foo[T: Bar[types]](): T =
when T is Bar: nil
discard Foo[Bar[int32]]()
#bug #60... | Nimrod | 3 | JohnAD/Nim | tests/types/tyet_another_generic_regression.nim | [
"MIT"
] |
coclass 'TestBase'
NB. Assert left-hand verb evaluates the right-hand
NB. noun's first argument to match the right-hand
NB. noun's second argument.
NB. Example:
NB. > *: assertEquals (2;4)
assertEquals=: 2 : '((u&.>)0{n) -: (1{n)'
NB. Asserts that the left-hand verb evaluating the
NB. right-hand noun returns 1 (... | J | 4 | jonghough/jlearn | test/testbase.ijs | [
"MIT"
] |
ruleset id.trinsic.redir {
global {
prefix = re#^id.streetcred://launch/[?]c_i=.+#
}
//
// convert trinsic invitation into one acceptable to ACA-Pico
//
rule accept_trinsic_invitation {
select when didcomm message
uri re#(https://redir.trinsic.id/.+)# setting(uri)
pre {
res = http:get(uri,... | KRL | 4 | Picolab/aries-cloudagent-pico | krl/id.trinsic.redir.krl | [
"MIT"
] |
/tmp/vimrc:
file.append:
- sources:
- salt://test/files/vimrc.stub
| SaltStack | 2 | byteskeptical/salt | tests/integration/files/file/base/issue-51208.sls | [
"Apache-2.0"
] |
(
// Send the ar message to the SinOsc class. This means make an audio rate instance (calculate
// a signal value for each sample in the block).
{
// Open the function
SinOsc.ar( // Make an audio rate SinOsc
440, // frequency of 440 Hz
0, // initial phase in radians
0.2) // multiply amplitude by 0.2
}.play; // ... | SuperCollider | 4 | drichardson/examples | SuperCollider/FunctionsAndSound.scd | [
"Unlicense"
] |
`abc${0}abc`.indexOf(`abc`); | TypeScript | 2 | nilamjadhav/TypeScript | tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts | [
"Apache-2.0"
] |
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
module Translate (Impl : Translator_intf.S) : sig
type t
val token : Offset_utils.t -> Parser_env.token_sink_result -> t
va... | OCaml | 5 | zhangmaijun/flow | src/parser/token_translator.ml | [
"MIT"
] |
bodywidth = dxf_dim(file = "example009.dxf", name = "bodywidth");
fanwidth = dxf_dim(file = "example009.dxf", name = "fanwidth");
platewidth = dxf_dim(file = "example009.dxf", name = "platewidth");
fan_side_center = dxf_cross(file = "example009.dxf", layer = "fan_side_center");
fanrot = dxf_dim(file = "example009.dxf"... | OpenSCAD | 4 | heristhesiya/OpenJSCAD.org | packages/io/scad-deserializer/tests/examples/example009.scad | [
"MIT"
] |
__STACKSIZE__ = 4096; | Linker Script | 0 | Davidfind/rt-thread | bsp/k210/link_stacksize.lds | [
"Apache-2.0"
] |
# Copyright (c) 2018-2021, Carnegie Mellon University
# See LICENSE for details
# NOTE: find a better place for these! What about a single standard drop tag rule?
NewRulesFor(TRC, rec(
TRC_tag := rec(
forTransposition := false,
applicable := (self, nt) >>
(nt.isTag(1, spiral.paradigms... | GAP | 4 | sr7cb/spiral-software | namespaces/spiral/paradigms/common/breakdown.gi | [
"BSD-2-Clause-FreeBSD"
] |
// Copyright 2010-2012 RethinkDB, all rights reserved.
#include "concurrency/cond_var.hpp"
#include "arch/runtime/coroutines.hpp"
#include "do_on_thread.hpp"
void cond_t::pulse_if_not_already_pulsed() {
assert_thread();
if (!is_pulsed()) {
pulse();
}
}
void one_waiter_cond_t::pulse() {
rasser... | C++ | 4 | zadcha/rethinkdb | src/concurrency/cond_var.cc | [
"Apache-2.0"
] |
package org.xtendroid.xtendroidtest.test
import android.test.AndroidTestCase
import java.util.Date
import static extension org.xtendroid.utils.TimeUtils.*
class TimeUtils extends AndroidTestCase {
def testOne() {
var date1 = now
var date2 = now + 24.hours
assertEquals(date2 - date1, 24.hours)
assertEqual... | Xtend | 4 | Buggaboo/Xtendroid | XtendroidTest/XtendroidTestCasesTest/src/org/xtendroid/xtendroidtest/test/TimeUtils.xtend | [
"MIT"
] |
<br> <br> <br>
<div class="container-fluid" style="color:black ; background: transparent linear-gradient(to bottom, rgb(240, 249, 255) 0%, rgb(203, 235, 255) 47%, rgb(161, 219, 255) 100%) repeat scroll 0% 0% ; margin-bottom: 0%;">
<div class="container" style=" margin-bottom: 2%;">
<br> <br>
<div class="row">
<... | RHTML | 4 | idrassi/ring | marketing/website/cgi-bin/footer.rhtml | [
"MIT"
] |
$$ MODE TUSCRIPT
line=""
LOOP n=1,10
line=CONCAT (line,n)
IF (n!=10) line=CONCAT (line,", ")
ENDLOOP
PRINT line
| Turing | 3 | LaudateCorpus1/RosettaCodeData | Task/Loops-N-plus-one-half/TUSCRIPT/loops-n-plus-one-half.tu | [
"Info-ZIP"
] |
camera {
//location <15.0, 3, -3>
location <3, 0.5, -3>
look_at <4, 1, 0>
}
background {
rgb <0.8, 0.8, 0.6>
}
light_source {
<6, 4, -4>
color rgb <1, 1, 1>
area_light <2, 0, 0>, <0, 2, 0>, 8, 8
circular
orient
}
light_source {
<2.5, 4.8, -0.2>
color rgb <1, 1, 0>
fade... | POV-Ray SDL | 4 | spcask/pov-ray-tracing | src/scene23.pov | [
"MIT"
] |
/*
* Copyright (c) 2012-2021 Daniele Bartolini et al.
* License: https://github.com/dbartolini/crown/blob/master/LICENSE
*/
using Gee;
namespace Crown
{
public class Unit
{
public Database _db;
public Guid _id;
public Unit(Database db, Guid id)
{
_db = db;
_id = id;
}
public Value? get_component_proper... | Vala | 5 | galek/crown | tools/level_editor/unit.vala | [
"MIT"
] |
$TTL 300
@ IN SSHFP 1 1 66C7D5540B7D75A1FB4C84FEBFA178AD99BDD67C
IN SSHFP 1 2 745A635BC46A397A5C4F21D437483005BCC40D7511FF15FBFAFE913A081559BC
IN SSHFP 2 1 66C7D5540B7D75A1FB4C84FEBFA178AD99BDD67C
IN SSHFP 2 2 745A635BC46A397A5C4F21D437483005BCC40D7511FF... | DNS Zone | 2 | IT-Sumpfling/dnscontrol | pkg/js/parse_tests/022-sshfp/foo.com.zone | [
"MIT"
] |
metadata:
sidecar.istio.io/rewriteAppHTTPProbers: "false"
spec:
initContainers:
- name: grpc-bootstrap-init
image: busybox:1.28
volumeMounts:
- mountPath: /var/lib/grpc/data/
name: grpc-io-proxyless-bootstrap
env:
- name: INSTANCE_IP
valueFrom:
f... | YAML | 4 | rveerama1/istio | manifests/charts/istio-control/istio-discovery/files/grpc-simple.yaml | [
"Apache-2.0"
] |
functions {
vector eigenvalues_sym_external(matrix K);
}
data {
int<lower = 1> N;
real<lower = 0.0> y[N - 1];
real m;
}
transformed data {
matrix[N, N] K_unscaled = rep_matrix(0, N, N);
for(n in 1:N) {
if(n == 1) {
K_unscaled[n, n] = 1.0 / m;
K_unscaled[n, n + 1] = -1.0 / m;
} else if... | Stan | 4 | bbbales2/stancon_2018 | models/spring_example_external.stan | [
"CC-BY-4.0"
] |
# Edge project file (edit at your own risk)
# Copyright (c) 2004-2017 Elements Interactive B.V.
# -----------------------------------------
# General project properties
projectname = "view3d"
caption = "View 3D"
target type = "bin"
appuid = "0x10205d9f"
version = "1.00.0"
capabilities = "No... | Ecere Projects | 2 | elementsinteractive/edgelib | samples/View3D/workspace_eide_opengl/view3d_symbian.epj | [
"BSD-3-Clause"
] |
MSTRINGIFY(
cbuffer VSolveLinksCB : register( b0 )
{
int startLink;
int numLinks;
float kst;
int padding;
};
// Node indices for each link
StructuredBuffer<int2> g_linksVertexIndices : register( t0 );
StructuredBuffer<float> g_linksLengthRatio : register( t1 );
StructuredBuffer<float4> g_linksCurre... | HLSL | 4 | BonJovi1/Bullet-the-Blue-Sky | external/bullet-2.81-rev2613/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/VSolveLinks.hlsl | [
"WTFPL"
] |
digraph ThreadHeap {
rankdir=LR
node [shape=box, width=0.3, height=0.3]
nodesep=.05
heap [shape=record, height=2, label="<f0>class 0|<f1>class 1|<f2>class 2|..."]
O0 [label=""]
O1 [label=""]
O2 [label=""]
O3 [label=""]
O4 [label=""]
O5 [label=""]
sep1 [shape=plaintext, label="..."]
sep2 [shape=plaintext, label="..."]
... | Graphviz (DOT) | 2 | cssl-unist/tweezer | Docker/gperftools/docs/threadheap.dot | [
"MIT"
] |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Subject} from 'rxjs';
export const patchDecodeBase64 = (proto: {decodeBase64: typeof atob}) => {
let unpat... | TypeScript | 5 | raghavendramohan/angular | packages/service-worker/testing/mock.ts | [
"MIT"
] |
/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <LibJS/Heap/Cell.h>
namespace JS {
class Symbol final : public Cell {
AK_MAKE_NONCOPYABLE(Symbol);
AK_MAKE_NONMOVABLE(Symbol);
public:
Symbol(Opt... | C | 4 | r00ster91/serenity | Userland/Libraries/LibJS/Runtime/Symbol.h | [
"BSD-2-Clause"
] |
class Foo
{
// fields
Int f00
const Int f01 := 1
const static Int f02 := 2
// methods
Void m00() {}
Int? m01(List? list) { return null }
static Void m02(Obj x) {}
static Str[]? m03(Int a, Int b) { return null }
// closures
static Func c00() { return |->| {} }
Func c01() { return |->Int| { a := 3; return a; } }
Func c... | Fantom | 3 | fanx-dev/fanx | compiler/testCompilerx/res/misc/testIsConst.fan | [
"AFL-3.0"
] |
<html xmlns:th="http://www.thymeleaf.org">
<head>
<!--/*/ <th:block th:include="fragments/head :: head"/> /*/-->
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="box col-md-6 col-md-offset-3">
<h1>JWT CSRF Token expired</h1>
<h3 th:text="${exception.mess... | HTML | 4 | zeesh49/tutorials | jjwt/src/main/resources/templates/expired-jwt.html | [
"MIT"
] |
/*
* Model of Microsoft Component Object Model (COM) query
* interface and aggregation mechanism.
*
* For a detailed description, see:
* http://sdg.lcs.mit.edu/~dnj/publications/com-fse00.pdf
*
* author: Daniel Jackson
*/
open util/relation as rel
sig IID {}
sig Interface {
qi : IID -> lone Interface,
... | Alloy | 5 | c-luu/alloy-specs | models/microsoft-com/com.als | [
"Apache-2.0"
] |
--TEST--
Exception inside a foreach loop with return
--FILE--
<?php
class saboteurTestController {
public function isConsistent() { throw new \Exception(); }
}
$controllers = array(new saboteurTestController(),new saboteurTestController());
foreach ($controllers as $controller) {
try {
if ($controller-... | PHP | 3 | thiagooak/php-src | Zend/tests/temporary_cleaning_007.phpt | [
"PHP-3.01"
] |
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page 3</title>
<p><input type="button" id="back" value="Back" onclick="history.go(-1)"/>
| HTML | 3 | fracturesfei/angulardemo | node_modules/selenium-webdriver/lib/test/data/proxy/page3.html | [
"MIT"
] |
def f: "f is here";
| JSONiq | 0 | aakropotkin/jq | tests/modules/lib/jq/f.jq | [
"CC-BY-3.0"
] |
{% extends "base.ahk"%}
{% block body %}
ToolTip, {{ text }}, {{ x }}, {{ y }}, {{ id }}
Sleep, {{ second * 1000 }}
ToolTip ,,,, {{ id }}
{% endblock body %}
| AutoHotkey | 4 | scslmd/ahk | ahk/templates/gui/tooltip.ahk | [
"MIT"
] |
def _bson_torepr:
def _f:
( if .type == null or .type == "array" then
( .value.elements
| map(_f)
)
elif .type == "document" then
( .value.elements
| map({key: .name, value: _f})
| from_entries
)
elif .type == "boolean" then .value != 0
else .value | tovalue... | JSONiq | 3 | bbhunter/fq | format/bson/bson.jq | [
"MIT"
] |
.esh-catalog-button {
background-color: #83D01B; /* to override the style of this button ie. to make it red, use background-color: #FF001b; */
}
| CSS | 3 | slizard00/eShopOnContainers | src/Web/WebMVC/wwwroot/css/override.css | [
"MIT"
] |
module chapter6/memory/fixedSizeMemory_H [Addr, Data]
open chapter6/memory/fixedSizeMemory [Addr, Data] as memory
sig Memory_H extends memory/Memory {
unwritten: set Addr
}
pred init [m: Memory_H] {
memory/init [m]
m.unwritten = Addr
}
pred read [m: Memory_H, a: Addr, d: Data] {
memory/read [m, a, d]
}
pred... | Alloy | 3 | haslab/Electrum | electrum/src/main/resources/models/book/chapter6/memory/fixedSizeMemory_H.als | [
"MIT"
] |
.experiment-list-outer-container {
padding-left: 64px;
}
.experiment-list-container {
overflow-y: scroll;
overflow-x: hidden;
width: 236px;
min-height: 100%;
}
.active-experiment-list-item {
background: rgba(67, 199, 234, 0.1);
font-weight: bold;
}
.experiment-list-item {
overflow:hid... | CSS | 4 | firebolt55439/ray | python/ray/tune/automlboard/static/css/ExperimentList.css | [
"Apache-2.0"
] |
/*
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/Object.h>
namespace JS::Temporal {
class Now final : public Object {
JS_OBJECT(Now, Object);
public:
explicit Now(GlobalObj... | C | 3 | r00ster91/serenity | Userland/Libraries/LibJS/Runtime/Temporal/Now.h | [
"BSD-2-Clause"
] |
{
"id" : ${product.id},
"name" : "${product.name}"
} | FreeMarker | 0 | zeesh49/tutorials | java-lite/src/main/webapp/WEB-INF/views/products/_product.ftl | [
"MIT"
] |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<> rdfs:comment """
UTF-8 encoded sample plain-text file
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Markus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25
The ASCII compatible UTF-8 encoding used in this plain-text file
is defined in Unicode, ISO ... | Turtle | 4 | joshrose/audacity | lib-src/lv2/sord/tests/UTF-8.ttl | [
"CC-BY-3.0"
] |
import os
import sys
import torch
# Make the helper files in test/ importable
pytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(pytorch_test_dir)
from torch.testing._internal.jit_utils import JitTestCase
if __name__ == '__main__':
raise RuntimeError("This test file i... | Python | 5 | Hacky-DH/pytorch | test/jit/test_tensor_creation_ops.py | [
"Intel"
] |
;; Copyright (c) 2020 Robert Virding
;;
;; 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... | LFE | 4 | haetze/lfe | include/scm.lfe | [
"Apache-2.0"
] |
Module: sample-OLE-container
Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
All rights reserved.
License: See License.txt in this distribution for details.
Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
//**************************************************... | Dylan | 5 | kryptine/opendylan | sources/ole/examples/sample-ole-container/ioipf.dylan | [
"BSD-2-Clause"
] |
/**
* View Models used by Spring MVC REST controllers.
*/
package com.baeldung.jhipster.uaa.web.rest.vm;
| Java | 2 | DBatOWL/tutorials | jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/package-info.java | [
"MIT"
] |
Rebol [
Title: "Match"
Date: 4-Aug-2008
Author: "Christopher Ross-Gill"
Home: http://www.ross-gill.com/page/Match
File: %match.r3
Version: 0.1.2
Purpose: {Extract structured data from an unstructured block.}
Rights: http://opensource.org/licenses/Apache-2.0
Type: module
Name: rg... | Rebol | 4 | rgchris/Scripts | r3-alpha/match.r3 | [
"Apache-2.0"
] |
from tools.linter import trailing_newlines
import unittest
import tempfile
def correct_trailing_newlines(file_contents: str) -> bool:
with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp:
filename = tmp.name
tmp.write(file_contents)
return trailing_newlines.correct_trailing_newlines... | Python | 4 | Hacky-DH/pytorch | tools/test/test_trailing_newlines.py | [
"Intel"
] |
# turn output of mkindex into form needed by dict
BEGIN {
if(ARGC != 2) {
print "Usage: awk -F' ' -f canonind.awk rawindex > index"
exit 1
}
file = ARGV[1]
ARGV[1] = ""
while ((getline < file) > 0) {
for(i = 2; i <= NF; i++) {
w = $i
if(length(w) == 0)
continue
b = index(w, "(")
e = index(w, ... | Awk | 3 | newluhux/plan9port | src/cmd/dict/canonind.awk | [
"MIT"
] |
$$ MODE TUSCRIPT
week="Monday'Tuesday'Wednesday'Thursday'Friday'Saterday'Sunday"
LOOP day=week
PRINT day
ENDLOOP
| Turing | 1 | LaudateCorpus1/RosettaCodeData | Task/Loops-Foreach/TUSCRIPT/loops-foreach.tu | [
"Info-ZIP"
] |
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -march=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
# RUN: llc -march=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
---
name: f... | Mirah | 4 | medismailben/llvm-project | llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-fneg.mir | [
"Apache-2.0"
] |
// ignore-order
const QUERY = 'is_nan';
const EXPECTED = {
'others': [
{ 'path': 'std::f32', 'name': 'is_nan' },
{ 'path': 'std::f64', 'name': 'is_nan' },
{ 'path': 'std::option::Option', 'name': 'is_none' },
],
};
| JavaScript | 2 | Eric-Arellano/rust | src/test/rustdoc-js-std/deduplication.js | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
import psycopg2
from django.db.models import (
CharField, Expression, Field, FloatField, Func, Lookup, TextField, Value,
)
from django.db.models.expressions import CombinedExpression
from django.db.models.functions import Cast, Coalesce
class SearchVectorExact(Lookup):
lookup_name = 'exact'
def process_... | Python | 5 | KaushikSathvara/django | django/contrib/postgres/search.py | [
"BSD-3-Clause",
"0BSD"
] |
(defmodule ltest-basic-tests
(behaviour ltest-unit)
(import
(from ltest
(check-failed-assert 2)
(check-wrong-assert-exception 2))))
(include-lib "include/ltest-macros.lfe")
(deftest is
(is 'true)
(is (not 'false))
(is (not (not 'true))))
(deftest are*
(are* (x y) (== x y)
2 (+ 1 1)
... | LFE | 5 | ioolkos/ltest | test/ltest-basic-tests.lfe | [
"BSD-3-Clause"
] |
it("should apply pre and post loaders correctly", function() {
expect(require("./a")).toBe("resource loader2 loader1 loader3");
expect(require("!./a")).toBe("resource loader2 loader3");
expect(require("!!./a")).toBe("resource");
expect(require("-!./a")).toBe("resource loader3");
});
| JavaScript | 3 | 1shenxi/webpack | test/configCases/loaders/pre-post-loader/index.js | [
"MIT"
] |
--- nsprpub/config/Makefile.in
+++ nsprpub/config/Makefile.in
@@ -158,3 +158,7 @@
install:: nspr.m4
$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
$(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
+
+install:: nspr.pc
+ $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
+ $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libd... | Darcs Patch | 3 | crystalfontz/openembedded | recipes/mozilla/nspr-4.7.1/30_pkgconfig.dpatch | [
"MIT"
] |
# Written by Bob Rotsted
# Copyright Reservoir Labs, 2015.
#
# 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 later version.
#
# This ... | Bro | 4 | reservoirlabs/bro-scripts | sumstats/avg-bytes-per-flow.bro | [
"Apache-2.0"
] |
<!doctype html>
<title>CodeMirror: ProtoBuf mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="protobuf.js"></script>
<style>.CodeMirror { border-top: 1px solid #ddd; ... | HTML | 4 | karlcow/CodeMirror | mode/protobuf/index.html | [
"MIT"
] |
#define AppName "nocalhost"
#define AppPublisher "nocalhost.dev"
#define AppURL "https://nocalhost.dev"
#define AppExeName "nhctl.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | ... | Inno Setup | 4 | svcdzt/nocalhost | scripts/release/nocalhost.iss | [
"Apache-2.0"
] |
lexer grammar ExprLexer;
options {
language=Java;
}
@header {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* t... | ANTLR | 4 | julien-faye/drill | logical/src/main/antlr4/org/apache/drill/common/expression/parser/ExprLexer.g4 | [
"Apache-2.0"
] |
<mt:Ignore>
# =======================
#
# ウィジェット-ブログ新着-ヘッドライン
#
# =======================
</mt:Ignore>
<mt:Entries category="NOT xxx" sort_by="authored_on" sort_order="descend" limit="7">
<mt:EntriesHeader>
<div class="card widget widget-recent-headline">
<div class="card-header clearfix">
<mt:If name="__... | MTML | 3 | webbingstudio/mt_theme_echo_bootstrap | dist/themes/echo_bootstrap/templates/widget_recent_headline.mtml | [
"MIT"
] |
LIBARCHIVE-FORMATS(5) manual page
== NAME ==
'''libarchive-formats'''
- archive formats supported by the libarchive library
== DESCRIPTION ==
The
[[ManPageibarchive3]]
library reads and writes a variety of streaming archive formats.
Generally speaking, all of these archive formats consist of a series of
"entri... | MediaWiki | 3 | probonopd/imagewriter | dependencies/libarchive-3.4.2/doc/wiki/ManPageLibarchiveFormats5.wiki | [
"Apache-2.0"
] |
; ModuleID = 'interface.go'
source_filename = "interface.go"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32--wasi"
%runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo*, %runtime.typecodeID* }
%runtime.interfaceMethodInfo = type { i8*, i32 }
%runtime._int... | LLVM | 2 | JAicewizard/tinygo | compiler/testdata/interface.ll | [
"Apache-2.0"
] |
/home/spinalvm/hdl/riscv-compliance/work//C.JALR.elf: file format elf32-littleriscv
Disassembly of section .text.init:
80000000 <_start>:
80000000: 0001 nop
80000002: 0001 nop
80000004: 0001 nop
80000006: 0001 nop
80000008: 0001 nop... | ObjDump | 1 | cbrune/VexRiscv | src/test/resources/asm/C.JALR.elf.objdump | [
"MIT"
] |
#! /usr/bin/env sage
import sys
import hashlib
from sage.all import *
# For degree n (prime) and constant c (2 or more), find the largest prime
# p such that:
# p >= 5
# p >= min_p
# 2 <= c <= p-2
# (1+c*(n-1))*p^2 + (2^16-1)*p < 2^32+2^16
# z^n-c is irreducible over GF(p)[z]
# If there is no solution, then... | Sage | 5 | pornin/curve9767 | extra/findprime.sage | [
"MIT"
] |
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
let test_truncate_short () =
let s = "hello world" in
let len = String.length s in
let truncated = String_utils.truncate len ... | OCaml | 4 | esilkensen/flow | src/hack_forked/test/unit/utils/string_utils_test.ml | [
"MIT"
] |
import { useEffect, useRef, useCallback } from 'react'
export default function Index() {
const workerRef = useRef()
useEffect(() => {
workerRef.current = new Worker(new URL('../worker.js', import.meta.url))
workerRef.current.onmessage = (evt) =>
alert(`WebWorker Response => ${evt.data}`)
return (... | JavaScript | 4 | blomqma/next.js | examples/with-web-worker/pages/index.js | [
"MIT"
] |
<!-- Modal -->
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
... | Harbour | 3 | blacktail/real-edit | public_src/scripts/common/templates/modal.hb | [
"MIT"
] |
package com.baeldung.collections.comparation;
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.*;
class ListVsMapUnitTest {
@Test
void givenList_whenIteratingTroughValues_thenEachValueIsPresent() {
List<String> list = new ArrayList<>();
lis... | Java | 4 | DBatOWL/tutorials | core-java-modules/core-java-collections-4/src/test/java/com/baeldung/collections/comparation/ListVsMapUnitTest.java | [
"MIT"
] |
<?php
ini_set('opcache.enable', 0);
require_once 'bug78106_include.inc';
echo "done\n";
| PHP | 0 | thiagooak/php-src | ext/opcache/tests/bug78106_test1.php | [
"PHP-3.01"
] |
# Copyright (C) 2007-2012, Parrot Foundation.
=pod
=head1 DESCRIPTION
A tutorial lesson about Parrot's control flow (continued).
=head1 LOOPS
PIR has no built-in looping structures such as C<for>, C<while>,
C<repeat> or C<until>. All loops are built by using conditionals
and C<goto>.
The loop below calculates 5 f... | Parrot Internal Representation | 4 | winnit-myself/Wifie | examples/tutorial/53_loop.pir | [
"Artistic-2.0"
] |
--TEST--
SPL: SplDoublyLinkedList with overridden count()
--FILE--
<?php
$obj = new SplDoublyLinkedList();
$obj[] = 1;
$obj[] = 2;
var_dump(count($obj));
class SplDoublyLinkedList2 extends SplDoublyLinkedList{
public function count(): int {
return -parent::count();
}
}
$obj = new SplDoublyLinkedList2();... | PHP | 3 | NathanFreeman/php-src | ext/spl/tests/dllist_008.phpt | [
"PHP-3.01"
] |
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./RecordInterface.sol";
import "./UserStorage.sol";
import "./OrderStorage.sol";
interface TokenTransfer {
function tra... | Solidity | 4 | Aircoin-official/AirCash | RecordStorage.sol | [
"MIT"
] |
// @@ANTLR Tool Options@@: -trace
tree grammar t051treeRewriteASTrWalker;
options {
language=JavaScript;
output=AST;
ASTLabelType=CommonTree;
tokenVocab=t051treeRewriteASTr;
}
a : ^(ID (ID | INT) ) ;
| G-code | 3 | DanielMabadeje/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | java/java2py/antlr-3.1.3/runtime/JavaScript/tests/functional/t051treeRewriteASTrWalker.g | [
"Apache-2.0"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | TypeScript | 5 | kklt2002/vscode | src/vs/workbench/services/remote/electron-sandbox/remoteAgentServiceImpl.ts | [
"MIT"
] |
import { MyModule } from 'my-library';
import { App } from 'my-library/components';
import { Header, Footer } from 'my-library/components/App';
| JavaScript | 3 | hanneslund/next.js | packages/next-swc/crates/modularize_imports/tests/fixture/regex/input.js | [
"MIT"
] |
/*
* Copyright (c) 2020-2021 Alex Spataru <https://github.com/alex-spataru>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights... | QML | 5 | Serial-Studio/Serial-Studio | assets/qml/Panes/SetupPanes/Serial.qml | [
"MIT"
] |
A ← 3 2 ⍴ ⍳ 5 ⍝ Example input A
B ← ⍉ A ⍝ Example input B
WA ← (1↓⍴B),⍴A
KA ← (⊃⍴⍴A)-1
VA ← ⍳ ⊃ ⍴WA
ZA ← (KA⌽¯1↓VA),¯1↑VA
TA ← ZA⍉WA⍴A ⍝ Replicate, transpose
WB ← (¯1↓⍴A),⍴B
KB ← ⊃ ⍴⍴A
VB ← ⍳ ⊃ ⍴WB
ZB0 ← (-KB) ↓ KB ⌽ ⍳(⊃⍴VB)
ZB ← (¯1↓(⍳ KB)),ZB0,KB
TB ← ZB⍉WB⍴B ⍝ Replicate,... | APL | 3 | mbudde/apltail | tests/inner3.apl | [
"MIT"
] |
scriptname _DE_WetMeterUpdate extends Quest
_DE_WetMeter property WetMeter auto
_DE_Compatibility property Compatibility auto
_DE_EPMonitor_1_6 property Frostfall auto
GlobalVariable property _DE_FireDistance auto
GlobalVariable property _DE_ExposureMeterDisplay_Contextual auto
GlobalVariable property _DE_ExposureMete... | Papyrus | 4 | chesko256/Campfire | Scripts/Source/_DE_WetMeterUpdate.psc | [
"MIT"
] |
module chapter5/lists ---- page 157
some sig Element {}
abstract sig List {}
one sig EmptyList extends List {}
sig NonEmptyList extends List {
element: Element,
rest: List
}
fact ListGenerator {
all list: List, e: Element |
some list1: List | list1.rest = list and list1.element = e
}
assert FalseAssertion {
... | Alloy | 4 | haslab/Electrum | electrum/src/main/resources/models/book/chapter5/lists.als | [
"MIT"
] |
#![feature(associated_type_defaults)]
trait Foo {
type Bar = ();
}
| Rust | 4 | mbc-git/rust | src/tools/rustfmt/tests/target/associated_type_defaults.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
0 reg32_t "dword"
1 code_t "proc*"
2 num32_t "int"
3 uint32_t "size_t"
4 ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(struct(0:num32_t,4:ptr(reg8_t),8... | BlitzBasic | 1 | matt-noonan/retypd-data | data/readlink.decls | [
"MIT"
] |
React = require \react
Form = class Form extends React.Component
(props) ->
super(props)
this.state =
dropdown-direction: -1
# render :: a -> ReactElement
render: ->
React.create-element MultiSelect,
options: <[apple mango grapes melon strawberry]> |> m... | LiveScript | 4 | rodcope1/react-selectize-rodcope1 | public/examples/multi/DropdownDirection.ls | [
"Apache-2.0"
] |
### /resource/create 成功
POST {{baseUrl}}/resource/create
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{accessToken}}
name=测试菜单&permission=resource:add&type=1&sort=1&pid=0&route=/resource/list&icon=test
### /admin/update 成功
POST {{baseUrl}}/resource/update
Content-Type: application/x-www-form... | HTTP | 3 | ssSlowDown/onemall | management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/permission/ResourceController.http | [
"MulanPSL-1.0"
] |
( Generated from test_statement_switch_in.muv by the MUV compiler. )
( https://github.com/revarbat/pymuv )
: _complex_match[ _v1 _v2 -- ret ]
_v1 @ number? dup if pop
_v2 @ number?
then if
_v1 @ _v2 @ = exit
then
_v1 @ string? dup if pop
_v2 @ int?
then if
_v1 @ _v... | MUF | 4 | revarbat/pymuv | tests/test_statement_switch_cmp.muf | [
"MIT"
] |
double run_fftw(int n,const float * x,float * y)
{
fftwf_plan p1 = fftwf_plan_dft_1d(n,(fftwf_complex *)x,(fftwf_complex *)y,
FFTW_FORWARD,FFTW_ESTIMATE);
const int nops = 10;
double t = cl::realTime();
for (int op = 0;op < nops;op++) {
fftwf_execute(p1);
}
t = (cl::realTime() - t)... | OpenCL | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/OpenCL/fft.cl | [
"MIT"
] |
{ nixpkgs ? <nixpkgs>}:
with import nixpkgs {};
rec {
breathe = with python27Packages; buildPythonPackage rec {
version = "git-arximboldi-${commit}";
pname = "breathe";
name = "${pname}-${version}";
commit = "5074aecb5ad37bb70f50216eaa01d03a375801ec";
src = fetchFromGitHub {
owner = "arxim... | Nix | 4 | ikrima/immer | nix/docs.nix | [
"BSL-1.0"
] |
// Daniel Shiffman
// http://codingtra.in
// Islamic Star Patterns
// Video Part 1: https://youtu.be/sJ6pMLp_IaI
// Video Part 2: [coming soon]
// Based on: http://www.cgl.uwaterloo.ca/csk/projects/starpatterns/
// Processing transcription: Chuck England
// Repo with more tiling patterns and features
// https://github... | Processing | 4 | aerinkayne/website | CodingChallenges/CC_054.1_StarPatterns/Processing/CC_054_StarPatterns/Hankin.pde | [
"MIT"
] |
//
// Copyright (c) 2010, Brian Frank and Andy Frank
// Licensed under the Academic Free License version 3.0
//
// History:
// 20 Mar 10 Brian Frank Creation
//
**
** CsvOutStream is used to write delimiter-separated values
** as specified by RFC 4180. Format details:
** - rows are delimited by a newline
** -... | Fantom | 5 | fanx-dev/fanx | library/util/fan/CsvOutStream.fan | [
"AFL-3.0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.