identifier stringlengths 42 383 | collection stringclasses 1
value | open_type stringclasses 1
value | license stringlengths 0 1.81k | date float64 1.99k 2.02k ⌀ | title stringlengths 0 100 | creator stringlengths 1 39 | language stringclasses 157
values | language_type stringclasses 2
values | word_count int64 1 20k | token_count int64 4 1.32M | text stringlengths 5 1.53M | __index_level_0__ int64 0 57.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/robbendev/robbendev-common/blob/master/src/main/java/com/robbendev/common/json/DotNetDateFormat.java | Github Open Source | Open Source | Apache-2.0 | null | robbendev-common | robbendev | Java | Code | 87 | 395 | package com.robbendev.common.json;
import com.robbendev.common.util.StringUtils;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java... | 31,793 |
https://github.com/jgrancell/logger/blob/master/entry_with.go | Github Open Source | Open Source | MIT | null | logger | jgrancell | Go | Code | 55 | 170 | package logger
import "time"
func (e *EntryBatch) WithBatchId(id string) *EntryBatch {
e.BatchId = id
return e
}
func (e *EntryBatch) WithMessage(severity int, message string) *EntryBatch {
m := &Message{
Severity: severityStrings[severity],
Raw: message,
Time: time.Now(),
}
m.Parameters = e.For... | 48,806 |
https://github.com/Xist3nce/PuzzleJam/blob/master/NinjaPrototype/Assets/Scripts/General/GadgetButton.cs | Github Open Source | Open Source | MIT | null | PuzzleJam | Xist3nce | C# | Code | 87 | 293 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GadgetButton : Hoverable
{
public Sprite outOfFocusSprite;
public Sprite inFocusSprite;
public TextMesh textMesh;
GadgetButtonCallback gadgetButtonCallback;
int duration;
public override void SetFocus... | 26,715 |
https://github.com/elipZis/go-serverless/blob/master/cmd/web/main.go | Github Open Source | Open Source | MIT | null | go-serverless | elipZis | Go | Code | 176 | 552 | // Copyright elipZis GmbH 2022
// All Rights Reserved
package main
import (
"context"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
fiberAdapter "github.com/awslabs/aws-lambda-go-api-proxy/fiber"
"github.com/elipzis/go-serverless/web/router"
_ "github.com/joho/godotenv/autoload"
"l... | 49,169 |
https://github.com/akmetainfo/WallyBackend/blob/master/src/Wally.Application/Transactions/GetTransaction/Result.cs | Github Open Source | Open Source | MIT | 2,020 | WallyBackend | akmetainfo | C# | Code | 40 | 99 | using System.Collections.Generic;
namespace Usol.Wally.Application.Transactions.GetTransaction
{
public class Result
{
public TransactionDto Transaction { get; set; }
public AccountDto Source { get; set; }
public AccountDto Destination { get; set; }
public virtual IEnumerabl... | 10,806 |
https://github.com/tastyigniter/TastyIgniter/blob/master/app/main/classes/MediaLibrary.php | Github Open Source | Open Source | MIT, GPL-1.0-or-later | 2,023 | TastyIgniter | tastyigniter | PHP | Code | 1,047 | 4,233 | <?php
namespace Main\Classes;
use Igniter\Flame\Database\Attach\Manipulator;
use Igniter\Flame\Exception\SystemException;
use Igniter\Flame\Support\Facades\File;
use Igniter\Flame\Support\Str;
use Igniter\Flame\Traits\Singleton;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config;
use Illumina... | 3,488 |
https://github.com/sonroyaalmerol/node-addu-sis/blob/master/lib/models/SearchResult.js | Github Open Source | Open Source | MIT | 2,021 | node-addu-sis | sonroyaalmerol | JavaScript | Code | 191 | 618 | const tabletojson = require('html-table-to-json')
class SearchResult {
#raw
#clean
constructor(html) {
html = html || ''
this.#raw = tabletojson.parse(html).results[0]
this.#clean = []
var data = this.#raw
for (var i = 0; i < data.length; i++) {
var cleanSubj = {}
cleanSubj.code... | 11,808 |
https://github.com/CARMinesDouai/PhaROSStHubArchive/blob/master/src/BotController/BcWorldModelBuilder.class.st | Github Open Source | Open Source | MIT | null | PhaROSStHubArchive | CARMinesDouai | null | Spoken | 168 | 353 | "
I build and update a world model based on some sensory data I get from the robot body.
Public API and Key Messages
-worldModel
The latest ready to use world model
-updateWorldModel
Trigger refreshing the world model
I am an abstract class. Subclasses should define:
-newWorldModel
Build a new world model based on t... | 44,062 |
https://github.com/operon-io/operon-lang/blob/master/operonrunner/src/main/java/io/operon/runner/processor/function/Arity3.java | Github Open Source | Open Source | Apache-2.0 | null | operon-lang | operon-io | Java | Code | 223 | 442 | /*
* Copyright 2022, operon.io
*
* 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 ... | 2,511 |
https://github.com/AlyssonT10/parser/blob/master/test/index.js | Github Open Source | Open Source | MIT, LicenseRef-scancode-unknown-license-reference | 2,018 | parser | AlyssonT10 | JavaScript | Code | 6 | 36 | 'use strict'
require('./jsdoc.spec')
require('./utils.spec')
require('./parser.spec')
require('./integration.spec')
| 45,528 |
https://github.com/sch-git/LeetCode/blob/master/src/com/sai/_177/_4.java | Github Open Source | Open Source | Apache-2.0 | null | LeetCode | sch-git | Java | Code | 97 | 283 | package com.sai._177;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @Title: 日期之间隔几天
* @Description: 给定的日期是 1971 年到 2100 年之间的有效日期。
* @Author: chenghao.su
* @Date: 2020/2/23 10:33
*/
public class _4 {
public static void main(String[] args) throws ParseExceptio... | 20,254 |
https://github.com/NightOfTwelve/iOS-Cracked-Apps/blob/master/DumpedClasses/Taobao/PNLineChartDataItem.h | Github Open Source | Open Source | MIT | 2,018 | iOS-Cracked-Apps | NightOfTwelve | Objective-C | Code | 52 | 166 | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
@interface PNLineChartDataItem : NSObject
{
double _x;
double _y;
}
+ (id)dataItemWithX:(double)arg1 Y:(double)arg2;
@property double y; // @synthesiz... | 41,545 |
https://github.com/travis-ci/travis-yml/blob/master/lib/travis/yml/configs/model/job.rb | Github Open Source | Open Source | MIT | 2,023 | travis-yml | travis-ci | Ruby | Code | 43 | 158 | module Travis
module Yml
module Configs
module Model
class Job < Struct.new(:attrs)
def [](key)
attrs[key]
end
def stage
attrs[:stage] if attrs[:stage].is_a?(String)
end
def stage=(stage)
attrs[:stage] = stage
... | 46,471 |
https://github.com/thanhtoan1196/gogoanimeDownloader/blob/master/selectEpisode.php | Github Open Source | Open Source | MIT | 2,019 | gogoanimeDownloader | thanhtoan1196 | PHP | Code | 75 | 342 | <?php
error_reporting(0);
function searchAnime($site, $searchIndex){
$returnValue = array();
$index = 0;
$page = new DOMDocument();
$page->loadHTML(file_get_contents("$site/search.html?keyword=$searchIndex"));
$links = $page->getElementsByTagName('p');
foreach ($links as $lin... | 14,845 |
https://github.com/psycho-pas/kroll/blob/master/modules/php/php_interpreter.h | Github Open Source | Open Source | Apache-2.0 | 2,019 | kroll | psycho-pas | C++ | Code | 70 | 190 | /**
* Appcelerator Kroll - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2009 Appcelerator, Inc. All Rights Reserved.
*/
#ifndef _PHP_INTERPRETER_H_
#define _PHP_INTERPRETER_H_
#include <kroll/Interpreter.h>
namespace kroll {
class PHPInt... | 20,156 |
https://github.com/RobinsonMann/UWaterlooApi/blob/master/Resources/Resources.cs | Github Open Source | Open Source | MIT | 2,016 | UWaterlooApi | RobinsonMann | C# | Code | 773 | 1,888 | /* By Robinson Mann
* Licensed under the MIT License, See LICENSE.txt for more information. */
using System.Collections.Generic;
using Newtonsoft.Json;
namespace UWaterlooApi.Resources
{
/// <summary> "List of student tutors available" (Official Documentation) </summary>
public class ListOfStudentTutorsAvailab... | 13,390 |
https://github.com/mehdihadeli/Modular-Monolith-Template/blob/master/src/BuildingBlocks/BuildingBlocks/BuildingBlocks.Cqrs/Queries/QueryHandler.cs | Github Open Source | Open Source | MIT | 2,021 | Modular-Monolith-Template | mehdihadeli | C# | Code | 46 | 157 | using System.Threading;
using System.Threading.Tasks;
using BuildingBlocks.Mediator.Request;
namespace BuildingBlocks.Cqrs.Queries
{
public abstract class QueryHandler<TQuery, TResponse> : IQueryHandler<TQuery, TResponse>
where TQuery : IQuery<TResponse>
{
public Task<TResponse> HandleAsync(TQ... | 42,957 |
https://github.com/jljardon/hello-world-ruby-v-000/blob/master/hello_world.rb | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-public-domain | 2,017 | hello-world-ruby-v-000 | jljardon | Ruby | Code | 6 | 17 | #Outputs Hello world!
puts "Hello World!";
| 31,381 |
https://github.com/johncol/psychic-poker/blob/master/src/main/java/poker/domain/card/CharacterValuedEnum.java | Github Open Source | Open Source | Apache-2.0 | null | psychic-poker | johncol | Java | Code | 55 | 142 | package poker.domain.card;
import java.util.Arrays;
/**
* Base enumeration for enums which are represented by a char value
*/
public interface CharacterValuedEnum {
char getValue();
static <T extends CharacterValuedEnum> T getFrom(T[] values, char character) {
return Arrays.stream(values)
.filter(... | 48,779 |
https://github.com/FIXTradingCommunity/silverflash/blob/master/silverflash-core/src/main/java/io/fixprotocol/silverflash/frame/sofh/SofhFrameSpliterator.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | silverflash | FIXTradingCommunity | Java | Code | 367 | 1,047 | /**
* Copyright 2015-2016 FIX Protocol Ltd
*
* 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... | 17,422 |
https://github.com/putman10/world-data/blob/master/WorldData/Models/City.cs | Github Open Source | Open Source | MIT | null | world-data | putman10 | C# | Code | 262 | 756 | using System;
using System.Collections.Generic;
using MySql.Data.MySqlClient;
using WorldData;
namespace WorldData.Models
{
public class City
{
private string _name;
private string _district;
private int _population;
private static bool _sortOrder = false;
public City(string city... | 20,837 |
https://github.com/paulbarbu/CpuParticleSwarmOptimization/blob/master/src/jmetal/util/comparators/SolutionComparator.java | Github Open Source | Open Source | Unlicense | null | CpuParticleSwarmOptimization | paulbarbu | Java | Code | 296 | 674 | // SolutionComparator.java
//
// Author:
// Antonio J. Nebro <antonio@lcc.uma.es>
// Juan J. Durillo <durillo@lcc.uma.es>
//
// Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General... | 2,376 |
https://github.com/sukhinin/nvdfeed/blob/master/nuxt.config.js | Github Open Source | Open Source | MIT | 2,020 | nvdfeed | sukhinin | JavaScript | Code | 56 | 172 | export default {
target: 'static',
buildModules: [
'@nuxtjs/vuetify'
],
head: {
titleTemplate: 'NVD Feed',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Recent CVE entries fro... | 20,737 |
https://github.com/poetapp/frost-api/blob/master/tests/integration/app.test.ts | Github Open Source | Open Source | MIT | 2,020 | frost-api | poetapp | TypeScript | Code | 140 | 375 | /* tslint:disable:no-relative-imports */
// IMPORTANT: If this fails due to the app not being able to flush it's
// event queue, this test will hang forever.
// Can we force the app to flush it's queue without killing the entire
// process (which would kill the test runner)?
import { describe } from 'riteway'
import ... | 13,027 |
https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/functions/tensor.h | Github Open Source | Open Source | BSD-3-Clause, BSD-2-Clause, LicenseRef-scancode-secret-labs-2011, LicenseRef-scancode-generic-cla, BSL-1.0, Apache-2.0 | 2,023 | pytorch | pytorch | C++ | Code | 1,115 | 2,296 | #pragma once
#include <torch/csrc/Export.h>
#include <torch/csrc/autograd/function.h>
#include <torch/csrc/autograd/variable.h>
#include <ATen/TensorGeometry.h>
#include <ATen/core/DeprecatedTypeProperties.h>
#include <c10/util/Optional.h>
#include <cstdint>
#include <memory>
namespace torch {
namespace autograd {
... | 20,397 |
https://github.com/SuprasannaBhaumik/CricketMatchCentre_v2/blob/master/src/main/java/com/study/messaging/ScorecardStreamingSource.java | Github Open Source | Open Source | Apache-2.0 | null | CricketMatchCentre_v2 | SuprasannaBhaumik | Java | Code | 14 | 66 | package com.study.messaging;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
public interface ScorecardStreamingSource {
@Output("xyz")
MessageChannel dispatchScorecard();
}
| 31,900 |
https://github.com/Wbooru/WbooruPlugin.WindowsStyleCustomizer/blob/master/ExtraMenuButtonGenerator.cs | Github Open Source | Open Source | MIT | null | WbooruPlugin.WindowsStyleCustomizer | Wbooru | C# | Code | 110 | 462 | using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ... | 2,160 |
https://github.com/phongcao/image-pipeline-windows/blob/master/ImagePipeline/ImagePipelineBase/Cache/Disk/DiskStorageCache.cs | Github Open Source | Open Source | MIT | 2,018 | image-pipeline-windows | phongcao | C# | Code | 2,419 | 7,208 | using BinaryResource;
using Cache.Common;
using FBCore.Common.Disk;
using FBCore.Common.Statfs;
using FBCore.Common.Time;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Cache.Disk
{
/// <summary>
/// Ca... | 20,251 |
https://github.com/abhishekc-sharma/suslik/blob/master/src/main/scala/org/tygus/suslik/certification/traversal/StackEvaluator.scala | Github Open Source | Open Source | BSD-2-Clause | 2,022 | suslik | abhishekc-sharma | Scala | Code | 162 | 557 | package org.tygus.suslik.certification.traversal
import TranslatableOps._
import org.tygus.suslik.certification.traversal.Evaluator._
import org.tygus.suslik.certification.traversal.Step._
/**
* A tail-recursive, stack-based tree traversal with an eval/apply loop
*/
abstract class StackEvaluator[S <: SourceStep, ... | 5,220 |
https://github.com/vikram3/SuperCTF/blob/master/.import/Grenade_Throw.wav-ac2d2c7cb0423c4ee2fa3c49caf44806.md5 | Github Open Source | Open Source | Apache-2.0 | 2,021 | SuperCTF | vikram3 | null | Spoken | 2 | 54 | source_md5="63f979aa9b3956e5f96aa0d7ee351324"
dest_md5="88215dff5be9acfb62956d043528fe8d"
| 34,384 |
https://github.com/philcryer/wwebsites/blob/master/phil.cryer.us/art/gallery/captionator.php | Github Open Source | Open Source | MIT | null | wwebsites | philcryer | PHP | Code | 1,135 | 3,773 | <?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2005 Bharat Mediratta
*
* 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 2 of the License... | 26,636 |
https://github.com/NVnavkumar/cudf/blob/master/cpp/include/cudf/search.hpp | Github Open Source | Open Source | Apache-2.0 | null | cudf | NVnavkumar | C++ | Code | 854 | 1,669 | /*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
*
* 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... | 33,585 |
https://github.com/muakdogan/tamrekabet/blob/master/app/Http/Controllers/Admins.php | Github Open Source | Open Source | MIT | 2,017 | tamrekabet | muakdogan | PHP | Code | 115 | 371 | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Admin;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class Admins extends Controller
{
public function index($id = null) {
if ($id == null) {
return Admin::orderBy('id', 'asc')->get();
} else {
... | 34,162 |
https://github.com/18F/micropurchase/blob/master/app/models/concerns/auction_scopes.rb | Github Open Source | Open Source | CC0-1.0, LicenseRef-scancode-public-domain | 2,017 | micropurchase | 18F | Ruby | Code | 161 | 617 | module AuctionScopes
extend ActiveSupport::Concern
included do
scope :accepted, -> { where(delivery_status: delivery_statuses['accepted']) }
scope :accepted_pending_payment_url, lambda {
where(delivery_status: delivery_statuses['accepted_pending_payment_url'])
}
scope :to_be_delivered, lambda... | 24,478 |
https://github.com/majorbyte/rebbl/blob/master/routes/signup/signup.js | Github Open Source | Open Source | MIT | 2,023 | rebbl | majorbyte | JavaScript | Code | 1,199 | 5,710 | 'use strict';
const accountService = require('../../lib/accountService.js')
, discordService = require('../../lib/DiscordService.js')
, apiService = require('../../lib/apiService.js')
, cyanideService = require('../../lib/CyanideService.js')
, express = require('express')
, util = require('../../lib/util.js'... | 48,743 |
https://github.com/snowtreetree/ant-design/blob/master/components/vc-m-feedback/src/PropTypes.jsx | Github Open Source | Open Source | MIT | 2,020 | ant-design | snowtreetree | null | Spoken | 34 | 116 | import PropTypes from '../../_util/vue-types'
export const ITouchProps = {
disabled: PropTypes.bool,
activeClassName: PropTypes.string,
activeStyle: PropTypes.any,
// onTouchStart: PropTypes.func,
// onTouchEnd: PropTypes.func,
// onTouchCancel: PropTypes.func,
// onMouseDown: PropTypes.func,
// onMous... | 28,063 |
https://github.com/francis-hrom/eps-app2/blob/master/src/views/tools/ScanRankingsPage.js | Github Open Source | Open Source | MIT | null | eps-app2 | francis-hrom | JavaScript | Code | 53 | 188 | import React from 'react';
import ScanRankingsComponent from './ScanRankingsComponent';
import { Row, Col, Image, Card } from 'react-bootstrap';
import explainer from '../../assets/images/explainer.jpg';
const ScanRankingsPage = () => (
<div className="ScanRankingsPage" data-testid="ScantRankingsPage">
<C... | 27,020 |
https://github.com/PacktPublishing/Yii2-Application-Development-Cookbook-Third-Edition/blob/master/Chapter02_Code/Recipe05/views/crud/create.php | Github Open Source | Open Source | MIT | 2,021 | Yii2-Application-Development-Cookbook-Third-Edition | PacktPublishing | PHP | Code | 43 | 168 | <?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/*
* @var yii\web\View $this
*/
?>
<h1><?= Yii::t('app', 'Create post'); ?></h1>
<?php $form = ActiveForm::begin();?>
<?php $form->errorSummary($model); ?>
<?= $form->field($model, 'title')->textInput() ?>
<?= $form->field($model, 'content')->textarea() ?>
... | 34,265 |
https://github.com/zkydrx/mypractices/blob/master/src/test/java/com/leetcode/ExcelSheetColumnTitle168/ExcelSheetColumnTitleTest.java | Github Open Source | Open Source | Apache-2.0 | null | mypractices | zkydrx | Java | Code | 62 | 261 | package com.leetcode.ExcelSheetColumnTitle168;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Created with IntelliJ IDEA.
* Author: Abbot
* Date: 2018-03-29
* Time: 09:44:52
* Description:
*/
class ExcelSheetColumnTitleTest
{
@Befor... | 7,757 |
https://github.com/marco-c/gecko-dev-wordified/blob/master/third_party/rust/quote/src/format.rs | Github Open Source | Open Source | MIT, LicenseRef-scancode-unknown-license-reference, Apache-2.0 | 2,023 | gecko-dev-wordified | marco-c | Rust | Code | 1,490 | 3,260 | /
/
/
Formatting
macro
for
constructing
Ident
s
.
/
/
/
/
/
/
<
br
>
/
/
/
/
/
/
#
Syntax
/
/
/
/
/
/
Syntax
is
copied
from
the
[
format
!
]
macro
supporting
both
positional
and
/
/
/
named
arguments
.
/
/
/
/
/
/
Only
a
limited
set
of
formatting
traits
are
supported
.
The
current
mapping
/
/
/
of
format
types
to
trait... | 8,336 |
https://github.com/bluewingtitan/PBScript/blob/master/PBScript/PbsBenchmarks/Program.cs | Github Open Source | Open Source | MIT | null | PBScript | bluewingtitan | C# | Code | 10 | 48 | using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
var summaries = BenchmarkRunner.Run(typeof(Program).Assembly); | 17,686 |
https://github.com/amrithothi/swagger-maven-plugin/blob/master/src/main/java/com/github/kongchen/swagger/docgen/remote/ListConverter.java | Github Open Source | Open Source | Apache-2.0 | null | swagger-maven-plugin | amrithothi | Java | Code | 92 | 320 | package com.github.kongchen.swagger.docgen.remote;
import com.github.kongchen.swagger.docgen.remote.model.CanBeSwaggerModel;
import scala.collection.JavaConversions;
import java.util.ArrayList;
import java.util.List;
/**
* Convert from java.util.List<T> to scala.collection.immutable.List<R>
*
* Created by kongchen... | 18,502 |
https://github.com/pact-foundation/pactr/blob/master/pactr/man/PactUtility.Rd | Github Open Source | Open Source | MIT | 2,020 | pactr | pact-foundation | R | Code | 104 | 664 | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PactUtility.R
\name{PactUtility}
\alias{PactUtility}
\title{Encapsulate some helper functions}
\description{
Encapsulate some helper functions
Encapsulate some helper functions
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\ite... | 14,639 |
https://github.com/gorden5566/simple-aop/blob/master/src/main/java/com/gorden5566/aop/simple/SimpleAopTest.java | Github Open Source | Open Source | MIT | null | simple-aop | gorden5566 | Java | Code | 81 | 387 | package com.gorden5566.aop.simple;
import com.gorden5566.aop.simple.service.HelloService;
import com.gorden5566.aop.simple.service.impl.NoInterfaceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author gorden5566
* @date ... | 20,067 |
https://github.com/AndreaAguado/new-awesome-profile-cards/blob/master/web/src/styles/pages/_2index.scss | Github Open Source | Open Source | MIT | null | new-awesome-profile-cards | AndreaAguado | SCSS | Code | 332 | 1,133 | //Pagina Inicial
@import '../core/mixins';
@import '../core/variables';
.page_index {
height: 100%; //ok
}
.main_index {
width: 100%;
height: 80vh; // el otro 10% pertenece al footer
min-height: 570px;
padding: 95px 25px 30px 25px;
background-color: $white-four;
margin: auto;
display: flex;
flex-direc... | 1,569 |
https://github.com/Nakukai/Koha/blob/master/cogs/extra.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | Koha | Nakukai | Python | Code | 81 | 323 | import discord
from discord.ext import commands
class Extra(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
async def invite(self, ctx):
Invitation = discord.Embed(
color=0xFFB6C1,
description="**Want me to join your amazing serv... | 40,523 |
https://github.com/iainbeeston/json_validator/blob/master/spec/lib/json_validator_spec.rb | Github Open Source | Open Source | MIT | 2,020 | json_validator | iainbeeston | Ruby | Code | 660 | 1,838 | require 'spec_helper'
require 'active_model'
require 'json_validator'
class FakeValidatingModel
include ActiveModel::Validations
attr_accessor :json_data
def initialize(json_data)
self.json_data = json_data.to_hash
end
end
describe JsonValidator do
describe '#validate_each' do
let(:model) { FakeVa... | 9,337 |
https://github.com/StefanKubsch/NARC/blob/master/Sources/Game_PlayerClass.hpp | Github Open Source | Open Source | Unlicense | 2,021 | NARC | StefanKubsch | C++ | Code | 257 | 1,315 | /*
******************************************
* *
* Game_PlayerClass.hpp *
* *
* (c) 2017 - 2020 Stefan Kubsch *
******************************************
*/
#pragma once
#include <cstdint>
#include <string>
#inc... | 36,531 |
https://github.com/lechium/iOS1351Headers/blob/master/System/Library/Frameworks/HomeKit.framework/_HMAccessoryProfile.h | Github Open Source | Open Source | MIT | 2,022 | iOS1351Headers | lechium | C | Code | 228 | 835 | /*
* This header is generated by classdump-dyld 1.5
* on Friday, April 30, 2021 at 11:37:29 AM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/Frameworks/HomeKit.framework/... | 8,533 |
https://github.com/mrprint/SBuilderXX/blob/master/frmExcludesP.cs | Github Open Source | Open Source | MIT | null | SBuilderXX | mrprint | C# | Code | 349 | 1,483 | using System;
using System.Windows.Forms;
namespace SBuilderXX
{
internal partial class FrmExcludesP : Form
{
private int ThisExc;
private int FlagExc;
internal void AddNewExclude(int X, int Y)
{
double X0, Y0, X1, Y1;
X0 = moduleMAIN.LonDispWest + modu... | 2,703 |
https://github.com/dolphinspired/dolphengine/blob/master/DolphEngine.Test/Core/PositionTests.cs | Github Open Source | Open Source | MIT | null | dolphengine | dolphinspired | C# | Code | 377 | 1,426 | using Xunit;
namespace DolphEngine.Test.Core
{
public class PositionTests
{
[Fact]
public void CanMoveToPosition()
{
var pos = new Position2d(1, 2);
pos.MoveTo(3, 4);
DolphAssert.EqualF(3, pos.X);
DolphAssert.EqualF(4, pos.Y);
}
... | 18,495 |
https://github.com/AllenMLI/tensorflow-serve-client/blob/master/target/generated-sources/protobuf/grpc-java/org/tensorflow/distruntime/MasterServiceGrpc.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | tensorflow-serve-client | AllenMLI | Java | Code | 2,516 | 13,086 | package org.tensorflow.distruntime;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.... | 35,097 |
https://github.com/hito0512/Vitis-AI/blob/master/tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/nn/qat/modules/quantizer.py | Github Open Source | Open Source | Apache-2.0 | 2,022 | Vitis-AI | hito0512 | Python | Code | 1,414 | 5,060 | # 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 writing, ... | 26,745 |
https://github.com/sigurd-ss/fig2pov/blob/master/alignVectors.m | Github Open Source | Open Source | MIT | 2,019 | fig2pov | sigurd-ss | MATLAB | Code | 103 | 330 | function rmat = alignVectors(avec, bvec)
% rmat = alignVectors(avec, bvec)
%
% Find a rotation matrix such that the vector 'avec' aligns with the vector
% 'bvec', i.e: rmat*avec(:) is parallel to bvec.
%
% Input:
% - avec: vector (3x1 or 1x3)
% - bvec: vector (3x1 or 1x3)
%
% Output:
% - rmat: rotation matrix ... | 39,558 |
https://github.com/rothnic/bokeh/blob/master/bokehjs/src/coffee/server/embed.coffee | Github Open Source | Open Source | BSD-3-Clause | 2,015 | bokeh | rothnic | CoffeeScript | Code | 387 | 1,386 | $ = require "jquery"
_ = require "underscore"
Backbone = require "backbone"
base = require "../common/base"
HasProperties = require "../common/has_properties"
load_models = require "../common/load_models"
{logger} = require "../common/logging"
serverutils = require "./serverutils"
usercontext = require "./usercontext/u... | 28,265 |
https://github.com/roschaefer/rundfunk-mitbestimmen/blob/master/backend/app/mailers/application_mailer.rb | Github Open Source | Open Source | MIT | 2,020 | rundfunk-mitbestimmen | roschaefer | Ruby | Code | 22 | 107 | class ApplicationMailer < ActionMailer::Base
default from: 'info@rundfunk-mitbestimmen.de'
layout 'mailer'
after_action :prevent_delivery_to_bad_email_addresses
def prevent_delivery_to_bad_email_addresses
mail.perform_deliveries = false if @user.has_bad_email? || @user.email.blank?
end
end
| 37,310 |
https://github.com/anon6789/KSSMonolith/blob/master/src/main/resources/db/migration/V1__create_initial_schema.sql | Github Open Source | Open Source | MIT | null | KSSMonolith | anon6789 | SQL | Code | 119 | 294 | create table categories (
id serial primary key,
ordinal integer not null
);
create table categories_i18n (
category_id integer,
locale_language varchar(2) not null,
name varchar(80) not null,
pretty_url_fragment varchar(31) not null,
primary key (category_id, locale_language)
);
create table products (... | 24,708 |
https://github.com/SeanKilleen/Docs/blob/master/aspnet/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/creating-a-more-complex-data-model-for-an-asp-net-mvc-application/samples/sample16.cs | Github Open Source | Open Source | CC-BY-4.0, MIT | 2,022 | Docs | SeanKilleen | C# | Code | 11 | 31 | [DatabaseGenerated(DatabaseGeneratedOption.None)]
[Display(Name = "Number")]
public int CourseID { get; set; } | 7,380 |
https://github.com/kcevik/SoftwareProjekt2020/blob/master/src/main/java/de/fhbielefeld/pmt/topBar/ITopBarComponent.java | Github Open Source | Open Source | Unlicense | null | SoftwareProjekt2020 | kcevik | Java | Code | 23 | 78 | package de.fhbielefeld.pmt.topBar;
import de.fhbielefeld.pmt.IViewAccessor;
/**
*
* @author Sebastian Siegmann
*
*/
public interface ITopBarComponent extends IViewAccessor{
// Noch keine Methoden benoetigt
}
| 36,423 |
https://github.com/hphratchian/GeneralUtilities/blob/master/modtext | Github Open Source | Open Source | MIT | 2,021 | GeneralUtilities | hphratchian | Perl | Code | 2,374 | 6,842 | #!/usr/bin/perl
#
# POD block. To view these comments in a formatted fashion, use perldoc or
# any of the other POD utilities to form man-style pages.
#
=head1 NAME
B<modtext> - This script is used to modify text in one or more files.
=head1 SYNOPSIS
B<modtext> [I<option_list>] F<files>
=head1 DESCRIPTION
This s... | 10,223 |
https://github.com/dengyuhan/WeChatMagicHelper/blob/master/wechat-helper-sdk/src/main/java/com/dyhdyh/helper/wechat/library/util/AccessibilityServiceUtil.java | Github Open Source | Open Source | MIT | null | WeChatMagicHelper | dengyuhan | Java | Code | 106 | 417 | package com.dyhdyh.helper.wechat.library.util;
import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
import android.view.accessibility.AccessibilityManager;... | 44,132 |
https://github.com/ShagaleevAlexey/go-clean/blob/master/internal/domain/queries/factory.go | Github Open Source | Open Source | MIT | null | go-clean | ShagaleevAlexey | Go | Code | 81 | 377 | package queries
import (
"github.com/ShagaleevAlexey/go-clean/internal/domain/db"
"github.com/ShagaleevAlexey/go-clean/internal/domain/models"
"github.com/ShagaleevAlexey/go-clean/internal/domain/queries/findUserByUsername"
"go.uber.org/dig"
)
type IQueries interface {
findUserByUsername.IFindUserByUsernameQuery... | 49,500 |
https://github.com/EU3-LambdaX-YoutubeMusic/Backend/blob/master/resources/users/userController.js | Github Open Source | Open Source | MIT | null | Backend | EU3-LambdaX-YoutubeMusic | JavaScript | Code | 232 | 660 | const bcrypt = require("bcryptjs");
const Users = require("./users.models");
const AuthHelper = require("./auth");
const Validation = require("./userValidation");
const { genSaltSync, hashSync } = bcrypt;
const register = async (req, res) => {
try {
const { error } = Validation.validateUser(req.body);
if (... | 10,992 |
https://github.com/modstart-lib/modstart/blob/master/src/Core/Events/ModuleUninstalledEvent.php | Github Open Source | Open Source | Apache-2.0 | 2,022 | modstart | modstart-lib | PHP | Code | 19 | 65 | <?php
namespace ModStart\Core\Events;
/**
* 模块已卸载
* Class ModuleUninstalledEvent
* @package ModStart\Core\Events
*/
class ModuleUninstalledEvent
{
public $name;
}
| 18,264 |
https://github.com/WU-ARL/RLI/blob/master/LogScale.java | Github Open Source | Open Source | Apache-2.0 | null | RLI | WU-ARL | Java | Code | 506 | 1,391 | /*
* Copyright (c) 2005-2013 Jyoti Parwatikar
* and Washington University in St. Louis
*
* 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
... | 28,232 |
https://github.com/Cannedfood/musicpp/blob/master/test/musicpp/score/TestKey.cpp | Github Open Source | Open Source | Zlib | 2,020 | musicpp | Cannedfood | C++ | Code | 88 | 329 | #include <catch2/catch.hpp>
#include <musicpp/score/KeySignature.hpp>
#include <iostream>
using namespace music;
using namespace music::score;
void print(KeySignature const& key) {
for(auto s : key.accidentals) {
printf("%c", !s?' ':key.accidental == FLAT?'b':'#');
}
printf("\n");
}
TEST_CASE("Key") {
CHECK(... | 51,068 |
https://github.com/luqin/firefly/blob/master/abupy/DLBu/sh/Train.sh | Github Open Source | Open Source | MIT | 2,019 | firefly | luqin | Shell | Code | 12 | 73 | #!/usr/bin/env bash
echo "Begin...."
CAFEBIN=/Users/Bailey/caffe/build/tools/caffe
SOLVER=../pb/solver.prototxt
$CAFEBIN train -solver $SOLVER
echo "Done"
| 18,297 |
https://github.com/GiulioTuretta/Movio/blob/master/src/core/classes/org/glizy/compilers/ModelException.php | Github Open Source | Open Source | MIT | 2,021 | Movio | GiulioTuretta | PHP | Code | 90 | 209 | <?php
/**
* This file is part of the GLIZY framework.
* Copyright (c) 2005-2012 Daniele Ugoletti <daniele.ugoletti@glizy.com>
*
* For the full copyright and license information, please view the COPYRIGHT.txt
* file that was distributed with this source code.
*/
class org_glizy_compilers_ModelException extends Ex... | 21,146 |
https://github.com/Blazemeter/blazemeter-jenkins-plugin/blob/master/src/main/java/hudson/plugins/blazemeter/utils/notifier/BzmJobNotifier.java | Github Open Source | Open Source | Apache-2.0 | 2,023 | blazemeter-jenkins-plugin | Blazemeter | Java | Code | 197 | 514 | /**
* Copyright 2018 BlazeMeter Inc.
* <p>
* 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 i... | 39,940 |
https://github.com/Cvikli/UnicodePlots.jl/blob/master/test/tst_contourplot.jl | Github Open Source | Open Source | MIT | 2,022 | UnicodePlots.jl | Cvikli | Julia | Code | 139 | 492 | gaussian_2d(x = -3:0.01:3, y = -7:0.01:3; x₀ = 0, y₀ = -2, σx = 1, σy = 2) = begin
X = repeat(x', length(y), 1)
Y = repeat(y, 1, length(x))
x, y, map((x, y) -> exp(-((x - x₀) / 2σx)^2 - ((y - y₀) / 2σy)^2), X, Y)
end
@testset "arbitrary colormap" begin
colormap = :cividis
p = @inferred contourplot(... | 37,679 |
https://github.com/pkurth/D3D12Renderer/blob/master/src/core/memory.cpp | Github Open Source | Open Source | MIT | 2,023 | D3D12Renderer | pkurth | C++ | Code | 246 | 786 | #include "pch.h"
#include "memory.h"
#include "math.h"
void memory_arena::initialize(uint64 minimumBlockSize, uint64 reserveSize)
{
reset(true);
memory = (uint8*)VirtualAlloc(0, reserveSize, MEM_RESERVE, PAGE_READWRITE);
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
pageSize = systemInfo.dwPageSize;
siz... | 52,118 |
https://github.com/aaalfran/dawmparcial/blob/master/src/pages/shop/parts/ProductList.jsx | Github Open Source | Open Source | MIT | null | dawmparcial | aaalfran | null | Spoken | 43 | 144 | import Product from "../../../components/Product";
import { RegularList } from "../../../components/RegularList";
const ProductList = ({ productsList }) => {
return productsList ? (
<>
<h1 className="text-left">Nuestros productos</h1>
<ul>
<RegularList
items={productsList}
... | 5,096 |
https://github.com/schaabs/sandbox/blob/master/net/sandbox.netcore/Program.cs | Github Open Source | Open Source | MIT | null | sandbox | schaabs | C# | Code | 138 | 478 | using sandbox.common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace sandbox.netcore
{
class Program : Sandbox
{
static void Main(string[] args)
{
sandbox(Run);
}
public static void Run()
{
... | 45,456 |
https://github.com/symcloud/jibe/blob/master/src/Symcloud/Component/Sync/Api/ApiInterface.php | Github Open Source | Open Source | MIT | null | jibe | symcloud | PHP | Code | 152 | 380 | <?php
/*
* This file is part of the Symcloud Distributed-Storage.
*
* (c) Symcloud and Johannes Wachter
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Symcloud\Component\Sync\Api;
use GuzzleHttp\Message\RequestInterface;
use GuzzleH... | 13,890 |
https://github.com/htuomola/ReittiopasLib/blob/master/ReittiopasLib/Model/Coordinates.cs | Github Open Source | Open Source | MIT | 2,013 | ReittiopasLib | htuomola | C# | Code | 64 | 159 | namespace ReittiopasLib.Model
{
public struct Coordinates
{
public readonly double Latitude;
public readonly double Longitude;
public Coordinates(double longitude, double latitude)
{
Latitude = latitude;
Longitude = longitude;
}
/// <summ... | 51,126 |
https://github.com/iantal/AndroidPermissions/blob/master/apks/banking_set2_qark/com.advantage.RaiffeisenBank/classes_dex2jar/com/thinkdesquared/banking/widget/actions/WidgetUpdateUIHelper.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | AndroidPermissions | iantal | Java | Code | 527 | 2,746 | package com.thinkdesquared.banking.widget.actions;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.support.v4.content... | 37,036 |
https://github.com/AntorFr/ClassicBTScan/blob/master/src/BTAdvertisedDevice.h | Github Open Source | Open Source | MIT | null | ClassicBTScan | AntorFr | C | Code | 475 | 1,428 | // Copyright 2018 AntorFR
//
// 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... | 34,087 |
https://github.com/alipay/alipay-sdk-python-all/blob/master/alipay/aop/api/domain/AlipayOpenSpOperationAuthAddModel.py | Github Open Source | Open Source | Apache-2.0 | 2,023 | alipay-sdk-python-all | alipay | Python | Code | 139 | 680 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenSpOperationAuthAddModel(object):
def __init__(self):
self._auth_product_code = None
self._merchant_no = None
self._out_biz_no = None
@property
def auth_... | 32,175 |
https://github.com/Alver23/mercado-libre-app/blob/master/src/client/containers/product-list/__tests__/index.spec.tsx | Github Open Source | Open Source | MIT | null | mercado-libre-app | Alver23 | TypeScript | Code | 103 | 306 | // Dependencies
import * as nextRouter from 'next/router';
import { shallow, ShallowWrapper } from 'enzyme';
// Components
import ProductDetail from '../product';
// Under test file
import ProductList from '../index';
describe('<ProductList />', () => {
const props = {
items: [
{
condition: 'new'... | 45,907 |
https://github.com/Matgek/sourcegraph/blob/master/cmd/repo-updater/repos/migrations_test.go | Github Open Source | Open Source | Apache-2.0 | 2,021 | sourcegraph | Matgek | Go | Code | 337 | 1,380 | package repos_test
import (
"context"
"fmt"
"testing"
"time"
"github.com/sourcegraph/jsonx"
"github.com/sourcegraph/sourcegraph/cmd/repo-updater/repos"
)
func TestGithubSetDefaultRepositoryQueryMigration(t *testing.T) {
t.Parallel()
testGithubSetDefaultRepositoryQueryMigration(new(repos.FakeStore))(t)
}
fun... | 39,752 |
https://github.com/xtym/article/blob/master/api/plugin/Admin/ArticleController.php | Github Open Source | Open Source | MIT | 2,021 | article | xtym | PHP | Code | 636 | 2,378 | <?php
namespace App\Http\Controllers\v1\Plugin\Admin;
use App\Http\Requests\v1\SubmitArticleRequest;
use App\Models\v1\Article;
use App\Models\v1\ArticleProperty;
use App\Models\v1\Column;
use App\Models\v1\Resource;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
... | 51,791 |
https://github.com/luisclaro31/abogado/blob/master/resources/views/app/information/design/fields/office.blade.php | Github Open Source | Open Source | MIT | null | abogado | luisclaro31 | PHP | Code | 56 | 220 | <div class="form-group">
{!! Form::label('description', 'Descripcion') !!}
{!! Form::text('description', null,['class' => 'form-control', 'placeholder' => 'Descripcion']) !!}
</div>
<div class="form-group">
{!! Form::label('speciality_id', 'Especialidadd') !!}
{!! Form::select('speciality_id', ['' => 'S... | 32,980 |
https://github.com/mariszo/ethereum-analyzer/blob/master/ethereum-analyzer/ethereum-analyzer.cabal | Github Open Source | Open Source | Apache-2.0 | 2,020 | ethereum-analyzer | mariszo | null | Spoken | 217 | 1,084 | name: ethereum-analyzer
version: 3.3.4
synopsis: A Ethereum contract analyzer.
homepage: https://github.com/zchn/ethereum-analyzer
license: Apache-2.0
license-file: LICENSE
author: Kevin Chen
maintainer: k_@berkeley.edu
category: ... | 9,210 |
https://github.com/SeanBrunson/mortgages/blob/master/mortgages/rates.py | Github Open Source | Open Source | MIT | null | mortgages | SeanBrunson | Python | Code | 1,330 | 3,715 | # Class to setup interest rates under different short rate models:
import numpy as np
def calc_forward_rate(price_t1, price_t2, time_difference):
"""
Calculates the forward rate between bonds with different
maturity dates. Assumes continuously compounded interest
rates.
Parameters
----------... | 22,121 |
https://github.com/lekoala/silverstripe-defer-backend/blob/master/tests/DeferBackendTest.php | Github Open Source | Open Source | MIT | null | silverstripe-defer-backend | lekoala | PHP | Code | 91 | 414 | <?php
namespace LeKoala\DeferBackend\Test;
use LeKoala\DeferBackend\CspProvider;
use SilverStripe\Dev\SapphireTest;
use LeKoala\DeferBackend\DeferBackend;
use SilverStripe\Control\HTTPResponse;
class DeferBackendTest extends SapphireTest
{
public function testWriteToHeader()
{
$backend = new DeferBac... | 14,192 |
https://github.com/lienoil/pluma/blob/master/modules/Yggdrasil/submodules/Course/routes/admin-mycourses.php | Github Open Source | Open Source | MIT | null | pluma | lienoil | PHP | Code | 12 | 68 | <?php
Route::group(['prefix' => 'courses'], function () {
Route::get('current', 'CourseController@current')->name('courses.my');
Route::post('{course}/request', 'CourseController@request')->name('courses.request');
});
| 32,811 |
https://github.com/coajaxial/primi/blob/master/src/structures/FuncValue.php | Github Open Source | Open Source | MIT | 2,020 | primi | coajaxial | PHP | Code | 60 | 198 | <?php
namespace Smuuf\Primi\Structures;
use \Smuuf\Primi\ISupportsInvocation;
class FuncValue extends Value implements ISupportsInvocation {
const TYPE = "function";
public function __construct(FnContainer $fn) {
$this->value = $fn;
}
public function getStringRepr(): string {
return sprintf(
"<function... | 22,182 |
https://github.com/ammonc/maxima_expect_goliath_server/blob/master/test/test_maxima_input_line.rb | Github Open Source | Open Source | MIT | 2,012 | maxima_expect_goliath_server | ammonc | Ruby | Code | 55 | 249 | require "test/test_helper"
class MaximaInputLineTest < MiniTest::Unit::TestCase
def test_multiple_commands_allowed
s = "1;2$"
mil = Maxima::InputLine.new(s)
assert_equal 2, mil.cmds.size
assert_equal "1;", mil.cmds[0]
assert_equal "2$", mil.cmds[1]
end
def test_single_command_works
s =... | 33,355 |
https://github.com/mayankmanj/acl2/blob/master/books/centaur/gl/gl-generic-interp-defs.lisp | Github Open Source | Open Source | BSD-3-Clause | 2,022 | acl2 | mayankmanj | Common Lisp | Code | 4,150 | 15,405 | ; GL - A Symbolic Simulation Framework for ACL2
; Copyright (C) 2008-2013 Centaur Technology
;
; Contact:
; Centaur Technology Formal Verification Group
; 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA.
; http://www.centtech.com/
;
; License: (An MIT/X11-style license)
;
; Permission is he... | 28,157 |
https://github.com/YoshidaYusuke0516/docker-laravel/blob/master/backend/app/Http/Controllers/IndexController.php | Github Open Source | Open Source | MIT | null | docker-laravel | YoshidaYusuke0516 | PHP | Code | 215 | 954 | <?php
namespace App\Http\Controllers;
// 元々入っていたリクエスト
use Illuminate\Http\Request;
// データ取得(Request)を使用できるように宣言(不要?)
//use Request;
// Hash化を使用できるように宣言
use Illuminate\Support\Facades\Hash;
// model宣言
use App\Models\User;
class IndexController extends Controller
{
// Listページ表示
public function index()
{
//... | 41,467 |
https://github.com/kevinjiaxu96/CST465TermProject/blob/master/Final Project/Final/Final/Models/ApplicationUser.cs | Github Open Source | Open Source | MIT | null | CST465TermProject | kevinjiaxu96 | C# | Code | 41 | 77 | using Microsoft.AspNetCore.Identity;
namespace Final.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
{
public string Name { get; set; }
public bool Restricted { get; set; }
}
}
| 33,927 |
https://github.com/Concordia-Modding-Community/discochat/blob/master/src/test/java/ca/concordia/discochat/TestMod.java | Github Open Source | Open Source | MIT | 2,021 | discochat | Concordia-Modding-Community | Java | Code | 44 | 222 | package ca.concordia.discochat;
import ca.concordia.discochat.chat.TestChatManager;
import ca.concordia.discochat.data.TestDataManager;
import ca.concordia.discochat.discord.TestDiscordManager;
import ca.concordia.discochat.server.TestConfigManager;
import ca.concordia.discochat.server.TestServerManager;
import ca.con... | 52,428 |
https://github.com/yaleopen/postem/blob/master/grails-app/views/student/index.gsp | Github Open Source | Open Source | MIT | 2,017 | postem | yaleopen | null | Spoken | 64 | 338 | <%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<meta name="layout" content="main"/>
</head>
<body>
<table class="table table-hover">
<tr>
<th>Title</th>
<th>Last Modified</th>
<th></th>
</tr>
<g:each in="${courseFiles}" var="courseFile">
<tr>
... | 50,407 |
https://github.com/SirPedr/Excalibur/blob/master/src/engine/Actions/Action/MoveBy.ts | Github Open Source | Open Source | BSD-2-Clause | null | Excalibur | SirPedr | TypeScript | Code | 196 | 539 | import { Actor } from '../../Actor';
import { Vector, vec } from '../../Math/vector';
import { Logger } from '../../Util/Log';
import { Action } from '../Action';
export class MoveBy implements Action {
private _actor: Actor;
public x: number;
public y: number;
private _distance: number;
private _speed: numb... | 42,889 |
https://github.com/soufian-gh/go/blob/master/osx/setenv_test.go | Github Open Source | Open Source | Apache-2.0 | 2,020 | go | soufian-gh | Go | Code | 168 | 495 | package osx_test
import (
"os"
"testing"
"github.com/m-lab/go/osx"
)
func TestMustSetenv(t *testing.T) {
key := "TEST_SETENV_THIS_VARIABLE_DOES_NOT_CURRENTLY_EXIST"
if _, present := os.LookupEnv(key); present {
t.Error("key must not be present when the test is run")
}
revert1 := osx.MustSetenv(key, "value1"... | 23,567 |
https://github.com/thaihoc2/bugnet/blob/master/src/BugNET.Common/Globals.cs | Github Open Source | Open Source | MS-PL | 2,021 | bugnet | thaihoc2 | C# | Code | 319 | 1,381 | using System;
using System.Xml.Serialization;
namespace BugNET.Common
{
public delegate void ActionEventHandler(object sender, ActionEventArgs args);
/// <summary>
/// Global constants, enumerations and properties
/// </summary>
public static class Globals
{
#region Public Constants
... | 40,968 |
https://github.com/dseight/sfossdk.fish/blob/master/completions/mb2.fish | Github Open Source | Open Source | MIT | 2,022 | sfossdk.fish | dseight | Fish | Code | 1,219 | 3,049 | # Completions for the `mb2` command
set -l cmds build-requires prepare apply build qmake cmake make make-install package build-shell compiledb check deploy undeploy
# mb2
complete -f -c mb2 -n "not __fish_seen_subcommand_from $cmds" -x
complete -f -c mb2 -n "not __fish_seen_subcommand_from $cmds" -l help -d "Show hel... | 40,751 |
https://github.com/flyaruu/aries/blob/master/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java | Github Open Source | Open Source | Apache-2.0 | 2,015 | aries | flyaruu | Java | Code | 273 | 803 | package org.apache.aries.transaction;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import javax.transaction.Transactional;
import javax.transaction.Transactional.TxType;
public class ComponentTxData {
private static final int BANNED_MODIFIERS... | 25,762 |
https://github.com/hortonworks/cloudbreak/blob/master/core/src/test/java/com/sequenceiq/cloudbreak/core/bootstrap/service/host/SssdConfigProviderTest.java | Github Open Source | Open Source | LicenseRef-scancode-warranty-disclaimer, ANTLR-PD, CDDL-1.0, bzip2-1.0.6, Zlib, BSD-3-Clause, MIT, EPL-1.0, LicenseRef-scancode-proprietary-license, LicenseRef-scancode-jdbm-1.00, Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,023 | cloudbreak | hortonworks | Java | Code | 348 | 2,082 | package com.sequenceiq.cloudbreak.core.bootstrap.service.host;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.when;
import java.util.List;
import java.... | 49,984 |
https://github.com/capitancambio/glifting/blob/master/src/data/SplitProcessor.m | Github Open Source | Open Source | MIT | 2,014 | glifting | capitancambio | MATLAB | Code | 34 | 224 | classdef SplitProcessor < PatternProcessor
properties
trainPerc
end
methods
function self=SplitProcessor(trainPerc)
self=self@PatternProcessor();
self.trainPerc=trainPerc;
end
function [train,test]=doProcess(self,data,~)
nTrials=size(data.X,3);
cut=ceil(nTrials*self.trainPerc);
Logger.debu... | 33,697 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.