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 |
|---|---|---|---|---|---|
import * as React from 'react';
import { useUtils, MuiPickersAdapter } from './useUtils';
import { DateValidationProps, RangeInput, validateDate, validateDateRange } from '../date-utils';
import { DateTimeValidationProps, validateDateTime } from '../date-time-utils';
import { TimeValidationProps, validateTime } from '.... | TypeScript | 5 | good-gym/material-ui | packages/material-ui-lab/src/internal/pickers/hooks/useValidation.ts | [
"MIT"
] |
<html>
<body>
<script type="text/javascript" charset="utf-8">
document.onmouseup = function(e) {
require('electron').ipcRenderer.sendToHost('mouseup', e.x, e.y, e.shiftKey, e.ctrlKey);
}
</script>
</body>
</html>
| HTML | 2 | lingxiao-Zhu/electron | spec/fixtures/pages/onmouseup.html | [
"MIT"
] |
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"><path d="M6 3c-1 0-1.5.5-1.5 1.5v7c0 1 .5 1.5 1.5 1.5h4c1 0 1.5-.5 1.5-1.5v-7c0-1-.5-1.5-1.5-1.5z"/></svg> | SVG | 1 | MMeent/pdf.js | web/images/secondaryToolbarButton-spreadNone.svg | [
"Apache-2.0"
] |
<div class="masthead clearfix">
<div class="inner">
<h3 class="masthead-brand">Vandelay Industries</h3>
<nav>
<ul class="nav masthead-nav">
<li class="active"><a href="/">Home</a></li>
<li><a href="https://medium.com/@bertrandom/unfundable-slack-bots-9369a75fdd">How it works</a></li>
</ul>
</n... | Harbour | 3 | bertrandom/vandelayindustries-slack-server | views/home.hb | [
"ISC"
] |
static const uint32_t in_com1[128] = {
0x3f5fb92f, 0x3ea747ed, 0xbf03d245, 0xbe217751,
0x3f0d52ec, 0xbe5d25c8, 0x3e8b5b01, 0x3deb1ad1,
0xbe26468f, 0x3f15f863, 0xbef779eb, 0x3e9e4168,
0x3e3b9a00, 0x3e651db9, 0xbefcfff2, 0xbe9ba0c7,
0x3e85d0e3, 0xbea6c8db, 0xbec376bb, 0x3ee9701e,
0x3e5b7279, 0xbef... | Max | 2 | psychogenic/zephyr | tests/lib/cmsis_dsp/filtering/src/misc_f32.pat | [
"Apache-2.0"
] |
# A fake Redis node for replaying predefined/expected traffic with a client.
#
# Usage: tclsh fake_redis_node.tcl PORT COMMAND REPLY [ COMMAND REPLY [ ... ] ]
#
# Commands are given as space-separated strings, e.g. "GET foo", and replies as
# RESP-encoded replies minus the trailing \r\n, e.g. "+OK".
set port [lindex $... | Tcl | 5 | hpdic/redis | tests/helpers/fake_redis_node.tcl | [
"BSD-3-Clause"
] |
require "uri"
{% unless flag?(:win32) %}
require "./http/client"
require "./http/server"
require "./http/log"
{% end %}
require "./http/common"
# The HTTP module contains `HTTP::Client`, `HTTP::Server` and `HTTP::WebSocket` implementations.
module HTTP
end
| Crystal | 4 | n00p3/crystal | src/http.cr | [
"Apache-2.0"
] |
/// <reference path="fourslash.ts" />
/////*1*/let x = async () => 1;
/////*2*/let y = async() => 1;
/////*3*/let z = async function () { return 1; };
format.document();
goTo.marker("1");
verify.currentLineContentIs("let x = async () => 1;");
goTo.marker("2");
verify.currentLineContentIs("let y... | TypeScript | 4 | nilamjadhav/TypeScript | tests/cases/fourslash/formatAsyncKeyword.ts | [
"Apache-2.0"
] |
#struct aa{
# double b;
# float *x;
#};
#struct bb {
# struct aa b1;
# struct aa *pa;
# double x1[10];
# double dx;
#};
#typedef struct ss {
# int f1;
# char f2:3;
# struct aa a3;
# struct aa *pa1;
# char f3:5;
# struct bb *b3;
# struct bb *b2;
# struct aa xt[23];
# struct aa(* funcc)(int, int, double)... | Maple | 3 | harmonyos-mirror/OpenArkCompiler-test | test/testsuite/irbuild_test/I0073-mapleall-irbuild-edge-struct_type/Main.mpl | [
"MulanPSL-1.0"
] |
/*
Copyright © 2011 MLstate
This file is part of Opa.
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 to use, copy, modify... | Opa | 4 | Machiaweliczny/oppailang | lib/stdlib/web/canvas/canvas.opa | [
"MIT"
] |
#![register_attr(attr)] //~ ERROR the `#[register_attr]` attribute is an experimental feature
fn main() {}
| Rust | 1 | Eric-Arellano/rust | src/test/ui/feature-gates/feature-gate-register_attr.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
<http://example.org/subject> <http://example.org/predicate> _:c.
| Turtle | 1 | joshrose/audacity | lib-src/lv2/serd/tests/good/test-blankdot.ttl | [
"CC-BY-3.0"
] |
*** Settings ***
Documentation Android Web Session
Resource ../resources/resource.robot
*** Test Cases ***
Should Create and Destroy Android Web Session
open application http://127.0.0.1:4723/wd/hub automationName=${ANDROID_AUTOMATION_NAME}
... platformName=${ANDROID_PLATFORM_NAME} platformVersion=${ANDROID_... | RobotFramework | 4 | ismoulsk/appium | sample-code/robotframework/tests/android_create_web_session.test.robot | [
"Apache-2.0"
] |
{eq} = require './_helpers'
suite 'basic' ->
test 'single line' ->
eq '"#square" test/data/a.js', '1:function ##square#(x) {', it
test 'no callback' ->
eq '"#square" test/data/a.js', '1:function ##square#(x) {', it, {-callback}
test 'single line - 2' ->
eq '"#x" test/data/a.js', ['1:function square... | LiveScript | 4 | GerHobbelt/grasp | test/basic.ls | [
"MIT"
] |
; inherits: css
[
(mixin_statement)
(while_statement)
(each_statement)
] @indent
| Scheme | 2 | hmac/nvim-treesitter | queries/scss/indents.scm | [
"Apache-2.0"
] |
--TEST--
Scalar type names cannot be used as class, trait or interface names (2) - use
--FILE--
<?php
use foobar as int;
?>
--EXPECTF--
Fatal error: Cannot use foobar as int because 'int' is a special class name in %s on line %d
| PHP | 3 | NathanFreeman/php-src | Zend/tests/type_declarations/scalar_reserved2_use.phpt | [
"PHP-3.01"
] |
3,0
9,0
9,-4
3,-4
| IDL | 0 | dagoodma/dubins_coverage | data/trash/square_polygon.dlm | [
"MIT"
] |
data Tag = MkTag
data Elem : a -> List a ->Type where
Z : Elem a (a :: as)
S : Elem a as -> Elem a (b :: as)
toNat : Elem as a -> Nat
toNat Z = 0
toNat (S n) = 1 + toNat n
Show (Elem as a) where
show = show . toNat
data Subset : List a -> List a -> Type where
Nil : Subset [] bs
(::) : Elem a bs -> Subse... | Idris | 4 | ska80/idris-jvm | tests/idris2/basic047/InterleavingLets.idr | [
"BSD-3-Clause"
] |
REBOL [
System: "REBOL [R3] Language Interpreter and Run-time Environment"
Title: "REBOL Graphics - SHAPE commands"
Rights: {
Copyright 2012 REBOL Technologies
REBOL is a trademark of REBOL Technologies
}
License: {
Licensed under the Apache License, Version 2.0.
See: http://www.apache.org/licenses/LICENSE... | Rebol | 4 | 0branch/r3 | src/boot/shape.reb | [
"Apache-2.0"
] |
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/cryptography/MerkleProof.sol";
contract MerkleProofWrapper {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) public pure returns (bool) {
return MerkleProof.verify(proof, root, leaf)... | Solidity | 4 | rand0mbyte/openzeppelin-contracts | contracts/mocks/MerkleProofWrapper.sol | [
"MIT"
] |
<?Lassoscript
// Last modified 8/31/09 by ECL, Landmann InterActive
/*
Tagdocs;
{Tagname= OutputText1 }
{Description= Outputs the already-built $vText_1 }
{Author= Eric Landmann }
{AuthorEmail= support@iterate.ws }
{ModifiedBy= }
{ModifiedByEmail= }
{Date= 7/6/09 }
{Usage= OutputText1 }
{ExpectedR... | Lasso | 4 | subethaedit/SubEthaEd | Documentation/ModeDevelopment/Reference Files/LassoScript-HTML/itpage/LassoStartup/OutputText1.lasso | [
"MIT"
] |
fun listHell n =
if n <= 0 then
[]
else
n :: List.append (listHell (n-1)) (listHell (n-1))
fun doit r =
Transactional.foo;
return <xml>{[listHell (readError r.N)]}</xml>
fun main () = return <xml><body>
<form> <textbox{#N}/> <submit action={doit}/> </form>
</body></xml>
| UrWeb | 3 | apple314159/urweb | tests/transact.ur | [
"BSD-3-Clause"
] |
{-#LANGUAGE ForeignFunctionInterface, ScopedTypeVariables#-}
#include "cvWrapLEO.h"
module CV.TemplateMatching where
import Foreign.C.Types
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Alloc
import CV.Image
import CV.Transforms
import Utils.Function
import Utils.Point
import Utils.Rectangle hidi... | C2hs Haskell | 4 | maaleske/CV | CV/TemplateMatching.chs | [
"BSD-3-Clause"
] |
import Principal "mo:base/Principal";
actor {
public shared query (msg) func whoami() : async Principal {
return msg.caller;
};
}; | Modelica | 4 | MikeOwino/examples | svelte-motoko-starter/src/backend/main.mo | [
"Apache-2.0"
] |
# Proof by PDF that X <~ rayleigh(1) == X^2 <~ weibull(1,1)
PDF_rayleigh := (a, x) -> 2*x*exp(-x^2/a)/a;
PDF_transform := (x) -> PDF_rayleigh(1,sqrt(x))*diff(sqrt(x),x);
simplify(PDF_transform(x));
PDF_weibull := (k, t, x) -> k/t*x^(k-1)*exp(-1*(1/t)*x^k);
simplify(PDF_weibull(1, 1, x));
evalb(PDF_weibull(1, 1, x) ... | Maple | 3 | vmchale/hakaru | tests/RoundTrip2/t_weibull_to_rayleigh.proof.mpl | [
"BSD-3-Clause"
] |
"""Constants for testing the Coinbase integration."""
from homeassistant.components.diagnostics.const import REDACTED
GOOD_CURRENCY = "BTC"
GOOD_CURRENCY_2 = "USD"
GOOD_CURRENCY_3 = "EUR"
GOOD_EXCHANGE_RATE = "BTC"
GOOD_EXCHANGE_RATE_2 = "ATOM"
BAD_CURRENCY = "ETH"
BAD_EXCHANGE_RATE = "ETH"
MOCK_ACCOUNTS_RESPONSE = ... | Python | 3 | MrDelik/core | tests/components/coinbase/const.py | [
"Apache-2.0"
] |
package com.baeldung.hibernate.pojo.inheritance;
public interface Item {
}
| Java | 1 | zeesh49/tutorials | hibernate5/src/main/java/com/baeldung/hibernate/pojo/inheritance/Item.java | [
"MIT"
] |
<% # Template Dependency: events/* %> | HTML+ERB | 0 | mdesantis/rails | actionview/test/fixtures/digestor/events/index.html.erb | [
"MIT"
] |
--TEST--
Exception during WeakMap destruction during shutdown
--FILE--
<?php
$map = new WeakMap;
$obj = new stdClass;
$map[$obj] = new class {
function __destruct() {
throw new Exception("Test");
}
};
?>
--EXPECTF--
Fatal error: Uncaught Exception: Test in %s:%d
Stack trace:
#0 [internal function]: clas... | PHP | 4 | NathanFreeman/php-src | Zend/tests/weakrefs/weakmap_dtor_exception.phpt | [
"PHP-3.01"
] |
SET @s = IF(version() < 8 OR (version() LIKE '%MariaDB%' AND version() < 10.3),
'SET GLOBAL innodb_file_per_table = ON,
innodb_file_format = Barracuda,
innodb_large_prefix = ON;',
'SET GLOBAL innodb_file_per_table = ON;');
PREPARE stmt1 FROM @s;
EX... | SQL | 3 | aerth/gogs | scripts/mysql.sql | [
"MIT"
] |
<html>
<head>
</head>
<body>
index.html content
</body>
</html> | HTML | 1 | bkucera2/cypress | packages/server/test/support/fixtures/projects/no-server/dev/index.html | [
"MIT"
] |
<!doctype html>
<p>Some paragraph.</p>
| HTML | 1 | acidburn0zzz/parcel | packages/core/integration-tests/test/integration/html-no-js/no-body-or-html.html | [
"MIT"
] |
# Author: Jason Batchelor
# Company: Emerson
# Description: Check if a ZIP contains an EXE
path(..) | join(" "?) | match("EXTRACT_ZIP Object_.*? SCAN_YARA ft_exe") | .length > 0
| JSONiq | 2 | akniffe1/fsf | fsf-server/jq/exe_in_zip.jq | [
"Apache-2.0"
] |
// !LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
package test
// val prop4: true
<!DEBUG_INFO_CONSTANT_VALUE("true")!>val prop4 = !1.equals(2)<!>
| Kotlin | 2 | Mu-L/kotlin | compiler/testData/diagnostics/tests/constantEvaluator/constant/equals.kt | [
"ECL-2.0",
"Apache-2.0"
] |
namespace OpenAPI.Model
open System
open System.Collections.Generic
module Order =
//#region Order
//#region enums
type StatusEnum = PlacedEnum of string | ApprovedEnum of string | DeliveredEnum of string
//#endregion
type Order = {
Id : int64;
PetId : int64;
Quantity : int;
ShipDa... | F# | 4 | MalcolmScoffable/openapi-generator | samples/server/petstore/fsharp-giraffe/OpenAPI/src/model/Order.fs | [
"Apache-2.0"
] |
require(httr)
data = list(
`version` = '1.2',
`auth_user` = 'fdgxf',
`auth_pwd` = 'oxfdscds',
`json_data` = '{ "operation": "core/get", "class": "Software", "key": "key" }'
)
res <- httr::POST(url = 'https://cmdb.litop.local/webservices/rest.php', body = data)
| R | 3 | kado0413/curlconverter | fixtures/r/multiple_d_post.r | [
"MIT"
] |
-- see lists.moon for list comprehension tests
items = {1,2,3,4,5,6}
out = {k,k*2 for k in items}
x = hello: "world", okay: 2323
copy = {k,v for k,v in pairs x when k != "okay"}
--
{ unpack(x) for x in yes }
{ unpack(x) for x in *yes }
{ xxxx for x in yes }
{ unpack [a*i for i, a in ipairs x] for x in *{{1,2},... | MoonScript | 2 | Shados/moonscript | spec/inputs/comprehension.moon | [
"MIT",
"Unlicense"
] |
0 !echo cr
\ word names for lookup during tests
: "setup" " setup" lookup >xt ;
: "unit" " unit" lookup >xt ;
: "check" " check" lookup >xt ;
: pass ." [36;1m+[0m" ; \ better hope you speak utf8
: fail ." [31;1mx[0m" ;
: sep ." [36m | [0m" ;
\ a number too big for 32-bits
: big 5678901234 ;
: ... | Forth | 5 | jephthai/EvilVM | test/tests.fth | [
"MIT"
] |
#ifndef TEST_INTEROP_CXX_CLASS_INLINE_FUNCTION_THROUGH_MEMBER_INPUTS_CONSTRUCTOR_CALLS_FUNCTION_H
#define TEST_INTEROP_CXX_CLASS_INLINE_FUNCTION_THROUGH_MEMBER_INPUTS_CONSTRUCTOR_CALLS_FUNCTION_H
inline int increment(int t) { return t + 1; }
struct Incrementor {
int incrementee;
Incrementor(int value) : increment... | C | 4 | gandhi56/swift | test/Interop/Cxx/class/inline-function-codegen/Inputs/constructor-calls-function.h | [
"Apache-2.0"
] |
// RUN: %empty-directory(%t)
// RUN: %{python} %utils/split_file.py -o %t %s
// RUN: %target-swift-frontend -emit-module %t/SecretLib.swift -o %t/SecretLib.swiftmodule
// RUN: %target-swift-frontend -emit-module %t/Client.swift -I %t -emit-module-interface-path %t/Client.swiftinterface -enable-library-evolution -swift... | Swift | 3 | gandhi56/swift | test/ModuleInterface/indirect-conformance-implementation-only.swift | [
"Apache-2.0"
] |
#pragma TextEncoding="UTF-8"
#pragma rtGlobals=3
#pragma ModuleName=SIDAMMenus
#include "SIDAM_Color"
#include "SIDAM_Compatibility_Old_Functions"
#include "SIDAM_Config"
#include "SIDAM_Correlation"
#include "SIDAM_Display"
#include "SIDAM_ExtractLayer"
#include "SIDAM_FFT"
#include "SIDAM_Fourier_Filter"
... | IGOR Pro | 4 | yuksk/SIDAM | src/SIDAM/func/SIDAM_Menus.ipf | [
"MIT"
] |
#import <ATen/native/metal/mpscnn/MPSCNNUtils.h>
namespace at {
namespace native {
namespace metal {
namespace mpscnn {
auto divRoundUp(uint x, uint y) -> uint {
return (x + y - 1) / y;
}
LaunchParams spatialPointwiseKernelLaunchParams(
id<MTLComputePipelineState> pipeline,
MPSImage* im) {
return spatial... | Objective-C++ | 4 | Hacky-DH/pytorch | aten/src/ATen/native/metal/mpscnn/MPSCNNUtils.mm | [
"Intel"
] |
camera {
location <0.275, 0.15, -0.2>
look_at <0.3, 0.1, 0>
}
// Light source on the left side of the scene
light_source {
<-1.5, 1, 0.3>
color rgb <1, 1, 1>
fade_distance 2
fade_power 2
area_light <0.7, 0, 0>, <0, 0.7, 0>, 12, 12
circular
orient
}
// Light source on the left sid... | POV-Ray SDL | 3 | spcask/pov-ray-tracing | src/scene12.pov | [
"MIT"
] |
; This is created from the performance_200511.move problem, verification of the create function.
; After changes to prelude and other code, its not directly reproducible any longer from Move,
; therefore saved here.
;
; To reproduce, run:
; z3 -st -memory:1000 verbose=3 dump_models=true smt.qi.profile=true create_ve... | SMT | 3 | BlockSuite/libra | language/move-prover/tests/sources/regression/z3/z3_termination_problem.smt | [
"Apache-2.0"
] |
import dclass;
#import urlcode;
backend default {
.host = "localhost";
.port = "80";
}
sub vcl_init {
# load devicemap
dclass.init_dclass("/some/path/dClass/dtrees/devicemap.dtree");
#dclass.init_dclass_p("/some/path/DeviceMap/latest/resources",0);
# load browser dtree
dclass.init_dclass_p("/some/path/dClass... | VCL | 5 | TheWeatherChannel/dClass | servers/varnish/dclass.vcl | [
"Apache-2.0"
] |
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Recommendations.Declarations
Public Class InKeywordR... | Visual Basic | 5 | frandesc/roslyn | src/EditorFeatures/VisualBasicTest/Recommendations/Declarations/InKeywordRecommenderTests.vb | [
"MIT"
] |
from sage.all import *
def _EllipticCurve(p, a, b):
E = EllipticCurve(GF(p), [a, b])
return E
def _add(P, Q):
return P + Q
def _scalar_mul(c, P):
return c*P
def _testECC():
"""
Reference: https://ctftime.org/task/6860
Testing validity for single instance
"""
# Defining the Ellip... | Sage | 4 | amoniaka-knabino/Crypton | Elliptic-Curves/ellipticcurve.sage | [
"MIT"
] |
package com.tobykurien.webapps.fragment
import android.app.AlertDialog
import android.content.Context
import android.os.Bundle
import android.preference.Preference
import android.preference.Preference.OnPreferenceChangeListener
import android.preference.PreferenceFragment
import android.widget.EditText
import com.toby... | Xtend | 4 | sr093906/WebApps | app/src/main/java/com/tobykurien/webapps/fragment/PreferencesFragment.xtend | [
"MIT"
] |
#lang scribble/base
@(require
scribble/manual
scriblib/figure
"defs.rkt"
"bib.rkt")
@title*{Tactics}
In this section we describe a tactic system called @emph{ntac} implemented in
Cur.
We begin with an example of using the tactic system to prove a trivial theorem:
@racketblock[
ntac $ forall (A : Type) (a : A) ... | Racket | 5 | bluephoenix47/cic-redex | cur-paper/tactics.scrbl | [
"BSD-2-Clause"
] |
desc_sv=CD Brännare
| SystemVerilog | 0 | GalaxyGFX/webmin | burner/module.info.sv | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] |
Stav 5 conflicts: 1 shift/reduce
Gramatika
0 $accept: expr $end
1 expr: expr '-' expr
2 | '1'
Terminály s pravidly, ve kterých se objevují
$end (0) 0
'-' (45) 1
'1' (49) 2
error (256)
Neterminály s pravidly, ve kterých se objevují
$accept (5)
vlevo: 0
expr (6)
vlevo: 1 2, vpravo: 0 1
... | Bison | 3 | YKG/y | testdata/dev/sr.y.bison | [
"BSD-3-Clause"
] |
#include "caffe2/operators/sqrt_op.h"
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
REGISTER_CUDA_OPERATOR(
Sqrt,
UnaryElementwiseOp<
TensorTypes<float>,
CUDAContext,
SqrtFunctor<CUDAContext>>);
} // namespace caffe2
| C++ | 3 | Hacky-DH/pytorch | caffe2/operators/sqrt_op_gpu.cc | [
"Intel"
] |
--TEST--
opendir() with 'ftp://' stream.
--SKIPIF--
<?php
if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available.");
if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available.");
?>
--FILE--
<?php
require __DIR__ . "/../../../ftp/tests/server.inc";
$path="ftp://loc... | PHP | 3 | thiagooak/php-src | ext/standard/tests/streams/opendir-002.phpt | [
"PHP-3.01"
] |
package universe_test
import "testing"
option now = () => 2030-01-01T00:00:00Z
inData =
"
#datatype,string,long,dateTime:RFC3339,long,string,string,string,string
#group,false,false,false,false,true,true,true,true
#default,_result,,,,,,,
,result,table,_time,_value,_field,_measurement,host,name
,,0,2018-05-22T19:... | FLUX | 4 | metrico/flux | stdlib/universe/filter_mixed_empty_test.flux | [
"MIT"
] |
{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
bundlerEnv rec {
pname = "elm_install";
name = "elm-github-install-${version}";
version = (import ./gemset.nix).elm_install.version;
inherit ruby;
gemdir = ./.;
passthru.updateScript = bundlerUpdateScript "elm-github-install";
meta = with lib; {
des... | Nix | 4 | collinwright/nixpkgs | pkgs/tools/package-management/elm-github-install/default.nix | [
"MIT"
] |
(let (v '(foo bar baz))
(test (= (v/join _) "foobarbaz"))
(test (= (v/join ",") "foo,bar,baz"))) | Grammatical Framework | 3 | daota2/fffff | v1/test/seq.gf | [
"MIT"
] |
#include <upc.h> /* Required for UPC extensions */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
shared int all_hits[THREADS];
int trial_in_disk() {
float x = (float)((float)rand() / (float)RAND_MAX);
float y = (float)((float)rand() / (float)RAND_MAX);
if((pow(x, 2) + pow(y, 2)) < 1) {
... | Unified Parallel C | 4 | ouankou/rose | projects/RTC2/tests/unsorted/par_examples/pi_calc.upc | [
"BSD-3-Clause"
] |
within Modelica.Mechanics;
package Translational
"Library to model 1-dimensional, translational mechanical systems"
extends Modelica.Icons.Package;
import SI = Modelica.SIunits;
package Examples "Demonstration examples of the components of this package"
extends Modelica.Icons.ExamplesPackage;
model S... | Modelica | 5 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/Modelica/Translational.mo | [
"MIT"
] |
:host /deep/ .ps-content {
flex: auto;
display: flex;
}
| CSS | 2 | Rinfair-CSP-A016/tabby | tabby-core/src/components/tabBody.deep.component.css | [
"MIT"
] |
package com.baeldung.map.initialize;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class MapInitializer {
public static Map<String, String> articleMapOne;
static {
... | Java | 4 | DBatOWL/tutorials | core-java-modules/core-java-collections-maps-2/src/main/java/com/baeldung/map/initialize/MapInitializer.java | [
"MIT"
] |
( Generated from test_literal_string_variants_in.muv by the MUV compiler. )
( https://github.com/revarbat/muv )
: _quotes[ _arg -- ret ]
var _a var _b var _c var _d var _e var _f var _g var _h
var _i var _j var _k var _l var _m var _n var _o
"Test('')" _a !
"Test(\"\")" _b !
"Test(\"\")" _c !
... | MUF | 3 | revarbat/muv | tests/test_literal_string_variants_cmp.muf | [
"BSD-2-Clause"
] |
definition module SimpleHash
:: .HashTable a
htNew :: .Int -> .(HashTable a)
htHasKey :: !{#.Char} !.(HashTable a) -> .Bool
htAdd :: !{#.Char} a !*(HashTable a) -> .(HashTable a) | Clean | 3 | kragen/shootout | bench/Include/clean/SimpleHash.dcl | [
"BSD-3-Clause"
] |
/*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... | C | 3 | shoes22/openpilot | third_party/acados/include/acados/utils/strsep.h | [
"MIT"
] |
_TF_*
_TFE_*
| Linker Script | 0 | abhaikollara/tensorflow | tensorflow/c/exported_symbols.lds | [
"Apache-2.0"
] |
1 1
1 1 1
2
1
/
1
0 1
0
/
1 1
/ 1 1 1 1 1 1 1 1 13 1 1 1
0 1 1 1 1 1 1
1 1 1
1 1
0
0
1
0
0
/
0-3(F8%%21..
0
/ 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | Octave | 0 | CristiRO/Monalisa | WEBS/WEB_GRAPH/WEB-INF/classes/lia/web/servlets/map2d/images/map0/map1_3.8/map2_3.8_1.2.oct | [
"Apache-2.0"
] |
CREATE TABLE `tb_igmuoxapjx` (
`col_cvsykxnvpf` varchar(24) DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tb_wmwynbzgyg` (
`col_iupsnmieyl` smallint(5) unsigned DEFAULT NULL,
`col_gnkgsewitj` decimal(10,0) DEFAULT '1',
`col_cvsykxnvpf` varchar(24) DEFAULT '',
`col_xailqzhuwy` blob
) ENGINE=In... | SQL | 3 | yuanweikang2020/canal | parse/src/test/resources/ddl/alter/mysql_77.sql | [
"Apache-2.0"
] |
Execute commands that can read lines from processes.
This is sort of a coroutine-based version of select.
Kind of.
Fiber = require 'fibers'
{ChildProcess} = require 'child_process'
# Must be used inside a fiber
class FiberReader
constructor: ->
@commands = []
@waiting = false
... | Literate CoffeeScript | 5 | zot/Leisure | leisure/build/src/spawn.litcoffee | [
"Zlib"
] |
create table t1 (
col0 int,
col1 int,
col2 int,
col3 int,
col4 int,
col5 int,
col6 int,
col7 int,
col8 int,
col9 int,
col10 int,
col11 int,
col12 int,
col13 int,
col14 int,
col15 int,
col16 int,
col17 int,
col18 int,
col19 int,
col20 in... | SQL | 1 | suryatmodulus/tidb | br/tests/lightning_row-format-v2/data/rowformatv2.t1-schema.sql | [
"Apache-2.0",
"BSD-3-Clause"
] |
<div class="modal error hidden" id="modal-delete-album" aid="">
<h2>DELETE</h2>
<p>everything in this album will be gone <strong>forever</strong>!</p>
<b></b>
<section>
<p class="bold" id="deleting-albumname"></p>
</section>
<progress id="deleting-album" class="progres... | Kit | 3 | pws1453/web-client | source/imports/app/photos-modal-delete-album.kit | [
"MIT"
] |
import 'std/encoding/csv/encode'
import 'std/encoding/csv/decode'
return {
"fileWriter": encode.fileWriter,
"Writer": encode.Writer,
"fileReader": decode.fileReader,
"CharReader": decode.CharReader,
}
| Inform 7 | 3 | lfkeitel/nitrogen | nitrogen/std/encoding/csv/mod.ni | [
"BSD-3-Clause"
] |
dim kajuVersion as string
kajuVersion = ConstantValue( "Kaju.Version" )
dim parts() as string
parts = kajuVersion.Split( "." )
if parts.Ubound < 2 then
redim parts( 2 )
end if
for i as integer = 0 to 2
if parts( i ) = "" then
parts( i ) = "0"
end if
next i
PropertyValue( "App.MajorVersion" ) = parts( 0 )
PropertyV... | Xojo | 3 | joneisen/Kaju | Kaju Admin App/Build Scripts/Update App Version.xojo_script | [
"MIT"
] |
# Fish completion definition for you-get.
complete -c you-get -s V -l version -d 'print version and exit'
complete -c you-get -s h -l help -d 'print help and exit'
complete -c you-get -s i -l info -d 'print extracted information'
complete -c you-get -s u -l url -d 'print extracted information'
complete -c you-get -l j... | fish | 4 | adger-me/you-get | contrib/completion/you-get.fish | [
"MIT"
] |
# a function returning unary(i + j) * -998
func $foo (
var %i i32,
var %j i32) f32 {
return (
recip f32(
sqrt f32(
cvt f32 i32(
mul i32 (
extractbits i32 1 23 ( add i32 ( bnot i32 (dread i32 %i), lnot i32 (dread i32 %j))),
neg i32 ( constval i32 -998))))))}
# ... | Maple | 2 | harmonyos-mirror/OpenArkCompiler-test | test/testsuite/irbuild_test/I0084-mapleall-irbuild-edge-unary/Main.mpl | [
"MulanPSL-1.0"
] |
#include <metal_stdlib>
#include "TexelSamplingTypes.h"
using namespace metal;
typedef struct
{
float3x3 convolutionKernel;
} Convolution3x3Uniform;
fragment half4 convolution3x3(NearbyTexelVertexIO fragmentInput [[stage_in]],
texture2d<half> inputTexture [[texture(0)]],
... | Metal | 4 | luoxiao/GPUImage3 | framework/Source/Operations/Convolution3x3.metal | [
"BSD-3-Clause"
] |
// Copyright (c) 2021 Slack Technologies, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/common/asar/archive.h"
#include <CommonCrypto/CommonDigest.h>
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/Foundation.h>
#include <ioma... | Objective-C++ | 4 | TarunavBA/electron | shell/common/asar/archive_mac.mm | [
"MIT"
] |
"""Tests for the Tomorrow.io Weather API integration."""
| Python | 0 | MrDelik/core | tests/components/tomorrowio/__init__.py | [
"Apache-2.0"
] |
code Text=12;
Text(0, "Hello World")
| XProc | 0 | venusing1998/hello-world | x/xpl0.xpl | [
"MIT"
] |
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Mvc\Model;
use Phalcon\Mvc\ModelInterface;
use Phalcon\Mvc\Model\Tran... | Zephir | 4 | tidytrax/cphalcon | phalcon/Mvc/Model/TransactionInterface.zep | [
"BSD-3-Clause"
] |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... | JavaScript | 4 | good-gym/material-ui | packages/material-ui-icons/lib/RawOnRounded.js | [
"MIT"
] |
using Uno;
using Uno.Collections;
using Uno.Testing;
using FuseTest;
using Fuse.Text.Test;
namespace Fuse.Text.Edit.Test
{
public class EditTest : TestBase
{
string[] _singleRunStrings = new string[] {
"",
"car",
"abcxyz",
};
string[] _singleDirStrings = new string[] {
"",
"car",
"abc xyz"... | Uno | 5 | helilabs/fuselibs | Source/Fuse.Text/Tests/Edit.uno | [
"MIT"
] |
#
# Classes
#
class empty { }
class empty2 {
}
class Lexer {
func Run() {
echo
# TODO: Fix separators
#echo
};
virtual Foo() {
echo
}
}
#echo $'hi\n'
class FileReader : Reader {
var x Int
var y
var a Float; var b;
# TODO: should this be super() ?
func init(super, x, y) {
e... | Tea | 3 | Schweinepriester/oil | tea/testdata/class.tea | [
"Apache-2.0"
] |
## PowerShellGet demo
PowerShellGet is a PowerShell module with the commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, Role Capabilities and Scripts.
This demo shows discovering, installing, updating, uninstalling the PowerShell scripts from an online r... | Markdown | 3 | Jellyfrog/PowerShell | demos/powershellget/README.md | [
"MIT"
] |
using Uno.Compiler.ExportTargetInterop;
namespace Fuse.Internal
{
/** A reference that in C++ behaves just like a plain pointer. Faster than weakref, but not technically a weakref.
This is unsafe to use. The user must take special care that a separate reference to the object
exists before de-refer... | Uno | 4 | helilabs/fuselibs | Source/Fuse.Common/Internal/RawPointer.uno | [
"MIT"
] |
-- make global variables readonly
local f=function (t,i) error("cannot redefine global variable `"..i.."'",2) end
local g={}
local G=getfenv()
setmetatable(g,{__index=G,__newindex=f})
setfenv(1,g)
-- an example
rawset(g,"x",3)
x=2
y=1 -- cannot redefine `y'
| Lua | 3 | tomliugen/tomliugen-redis-3.2.2-rc | deps/lua/test/readonly.lua | [
"BSD-3-Clause"
] |
{{! Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef }}
CREATE PROCEDURE [{{Schema}}].[sp{{EventOutboxTableName}}Dequeue]
@MaxDequeueCount INT = 10 -- Maximum number of events to dequeue
AS
BEGIN
/*
* This is automatically generated; any changes will be lost.
*/
... | Harbour | 4 | ciaranodonnell/Beef | tools/Beef.CodeGen.Core/Templates/DbEobSpDequeue_sql.hb | [
"MIT"
] |
---
prev: sbt.textile
next: specs.textile
title: More collections
layout: post
---
Scala provides a nice set of collection implementations. It also provides some abstractions for collection types. This allows you to write code that can work with a collection of <code>Foo</code>s without worrying whether that collectio... | Textile | 4 | AstronomiaDev/scala_school | web/coll2.textile | [
"Apache-2.0"
] |
static const q31_t in_q31[256] = {
0x7EC0DA9F, 0x300D8567, 0x2BB3A36E, 0x7136A168,
0x6520B7C7, 0x4B02E46B, 0x00F28BF3, 0x53AF1EED,
0x26DACA64, 0x61E42533, 0x289C2195, 0x320B10A6,
0x4B458BC8, 0x3EFC205D, 0x186D0FD2, 0x492D543D,
0x766CF7FC, 0x008E7BAA, 0x23C340ED, 0x78A2DB82,
0x2A3F6DA9, 0x0D3BA98... | Max | 2 | Trifunik/zephyr | tests/lib/cmsis_dsp/support/src/q31.pat | [
"Apache-2.0"
] |
\* modulesys - public domain module system for Shen
## Description
Module system is a tool for managing Shen libraries.
## Basic usage
* `(module.use [Mod1 ...])` or `(use-modules [Mod1 ...])`
loads given modules with all their dependencies. Any module already loaded
won't be loaded twice.
* `(module... | Shen | 4 | ajnavarro/language-dataset | data/github.com/radiganm/shen-modulesys/0e816f8768a562ebb3648e02c884816f29b6de0e/modulesys.shen | [
"MIT"
] |
module ciena-waveserver-alarm {
namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-alarm";
prefix alarm;
import ciena-waveserver-typedefs {
prefix cienawstypes;
}
organization
"Ciena Corporation";
contact
"Web URL: http://www.ciena.com/
Postal: 7035 Ridge Road
... | YANG | 5 | meodaiduoi/onos | models/ciena/waveserverai/src/main/yang/ciena-waveserver-alarm@2017-12-15.yang | [
"Apache-2.0"
] |
#!MC 1200
# Created by Tecplot 360 build 12.0.0.3454
$!VarSet |MFBD| = '/home/parent/pnu/pub/SECOND/testcases/hyperbdry'
$!ALTERDATA
EQUATION = '{qy}=0.03*ddy({T})'
$!ALTERDATA
EQUATION = '{qy}=0.03*ddy({T})'
$!GLOBALCONTOUR 1 VAR = 5
$!CONTOURLEVELS RESETTONICE
CONTOURGROUP = 1
APPROXNUMVALUES = 15
$!FIELDL... | MAXScript | 2 | zhanghuanqian/CFDWARP | bin/qy-x0.14m.mcr | [
"BSD-2-Clause"
] |
@app
remix-architect-app
@http
/*
method any
src server
@static
# @aws
# profile default
# region eu-central-1
| Arc | 0 | aslakhellesoy/remix-aws-cdk-example | remix/app.arc | [
"MIT"
] |
#include <sourcemod>
// Single line comment
/* Multi line
comment */
public OnPluginStart() {
PrintToServer("Hello.");
}
| SourcePawn | 3 | btashton/pygments | tests/examplefiles/hello.sp | [
"BSD-2-Clause"
] |
//
//
// Copyright 2020 gRPC authors.
//
// 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 agree... | C++ | 4 | arghyadip01/grpc | src/core/lib/json/json_util.cc | [
"Apache-2.0"
] |
require "c/winnt"
lib LibC
INVALID_HANDLE_VALUE = HANDLE.new(-1)
fun CloseHandle(hObject : HANDLE) : BOOL
fun DuplicateHandle(hSourceProcessHandle : HANDLE, hSourceHandle : HANDLE,
hTargetProcessHandle : HANDLE, lpTargetHandle : HANDLE*,
dwDesiredAccess : DWORD, bInh... | Crystal | 3 | jessedoyle/crystal | src/lib_c/x86_64-windows-msvc/c/handleapi.cr | [
"Apache-2.0"
] |
{%- macro format(amount, currency_code) -%}
{{ amount|sylius_format_money(currency_code, sylius.localeCode) }}
{%- endmacro -%}
{%- macro convertAndFormat(amount) -%}
{% from _self import format %}
{{- format(amount|sylius_convert_money(sylius.channel.baseCurrency.code, sylius.currencyCode), sylius.curren... | Twig | 3 | orestshes/Sylius | src/Sylius/Bundle/CoreBundle/Resources/views/Common/Macro/money.html.twig | [
"MIT"
] |
template(name="brokenCardsHeaderBar")
h1
| {{_ 'broken-cards'}}
template(name="brokenCards")
if currentUser
if searching.get
+spinner
else if hasResults.get
.global-search-results-list-wrapper
if hasQueryErrors.get
div
each msg in errorMessages
sp... | Jade | 3 | moqmar/wekan | client/components/main/brokenCards.jade | [
"MIT"
] |
sub main()
_brs_.mockFunction("commonUtil", function()
return "mocked"
end function)
print "mock:" + commonUtil() ' => "mocked"
end sub
| Brightscript | 3 | DreadPirateJay/brs | test/e2e/resources/execute-with-scope/mock.brs | [
"MIT"
] |
import { camelCase } from "lodash"
import { GraphQLSchema, GraphQLOutputType } from "graphql"
import { ActionCreator } from "redux"
import { ThunkAction } from "redux-thunk"
import report from "gatsby-cli/lib/reporter"
import { parseTypeDef } from "../../schema/types/type-defs"
import {
GraphQLFieldExtensionDefinitio... | TypeScript | 5 | waltercruz/gatsby | packages/gatsby/src/redux/actions/restricted.ts | [
"MIT"
] |
# Copyright (c) 2018-2021, Carnegie Mellon University
# See LICENSE for details
####################################################
##
## NOTE: Chained unparser!
##
_bitsInt := (bits) -> Sum(List([1..Length(bits)], i -> bits[i]*2^(i-1)));
_sklr_unaligned_store := (bits) -> meth(self, o, i, is )
local loc0, l... | GAP | 5 | sr7cb/spiral-software | namespaces/spiral/platforms/scalar/bitisa/unparse.gi | [
"BSD-2-Clause-FreeBSD"
] |
// 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";
contract AppealStorage {
OrderInterface private _oSt;
RecordInt... | Solidity | 4 | Aircoin-official/AirCash | AppealStorage.sol | [
"MIT"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.