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/rngallen/signals/blob/master/orders/admin.py | Github Open Source | Open Source | MIT | null | signals | rngallen | Python | Code | 22 | 63 | from django.contrib import admin
from .models import Order
# Register your models here.
@admin.register(Order)
class OrderAdmin(admin.ModelAdmin):
list_display = ("name", "total", "total_price", "active")
| 47,101 |
https://github.com/pdepaepe/ovh-api-services/blob/master/src/telephony/easyHunting/hunting/queue/telephony-easyHunting-hunting-queue.service.js | Github Open Source | Open Source | BSD-3-Clause | null | ovh-api-services | pdepaepe | JavaScript | Code | 31 | 167 | angular.module("ovh-api-services").service("OvhApiTelephonyEasyHuntingHuntingQueue", function ($injector) {
"use strict";
return {
v6: function () {
return $injector.get("OvhApiTelephonyEasyHuntingHuntingQueueV6");
},
Agent: function () {
return $injector.get("Ov... | 2,108 |
https://github.com/BeastNeedsMoreTorque/Distribution/blob/master/a/aws-sdk/src/main/scala/typings/awsSdk/ec2Mod/PurchaseHostReservationRequest.scala | Github Open Source | Open Source | MIT | 2,020 | Distribution | BeastNeedsMoreTorque | Scala | Code | 274 | 711 | package typings.awsSdk.ec2Mod
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation._
@js.native
trait PurchaseHostReservationRequest extends js.Object {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see ... | 32,184 |
https://github.com/lakchote/youjobs/blob/master/src/AppBundle/Service/PostAstuce.php | Github Open Source | Open Source | MIT | 2,017 | youjobs | lakchote | PHP | Code | 44 | 218 | <?php
namespace AppBundle\Service;
use AppBundle\Entity\Astuce;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Form\Form;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
class PostAstuce
{
private $em;
private $tokenStorage;
public function __construct(EntityMana... | 46,555 |
https://github.com/zkraus/yacfg/blob/master/tests/test_yacfg/files/test_paths.py | Github Open Source | Open Source | Apache-2.0 | 2,020 | yacfg | zkraus | Python | Code | 129 | 320 | # Copyright 2018 Red Hat 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, ... | 20,043 |
https://github.com/maidulTech/ukshop/blob/master/app/Http/Controllers/Admin/ShippingAddressController.php | Github Open Source | Open Source | MIT | null | ukshop | maidulTech | PHP | Code | 84 | 454 | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Models\ShippingAddress;
use App\Http\Controllers\BaseController;
use App\Http\Requests\Admin\ShippingAddressRequest;
use App\Repositories\Admin\ShippingAddress\ShippingAddressInterface;
class ShippingAddressController extends BaseControl... | 11,376 |
https://github.com/lii-enac/djnn-cpp/blob/master/src/display/drm/drm_udev.cpp | Github Open Source | Open Source | BSD-2-Clause | 2,019 | djnn-cpp | lii-enac | C++ | Code | 788 | 2,943 | /*
* djnn v2
*
* The copyright holders for the contents of this file are:
* Ecole Nationale de l'Aviation Civile, France (2020)
* See file "license.terms" for the rights and conditions
* defined by copyright holders.
*
*
* Contributors:
* Mathieu Magnaudet <mathieu.magnaudet@enac.fr>
*
*/
#i... | 50,439 |
https://github.com/Porthorian/pdo-wrapper/blob/master/tests/Suite/DBWrapperTest.php | Github Open Source | Open Source | MIT | 2,022 | pdo-wrapper | Porthorian | PHP | Code | 569 | 2,333 | <?php
declare(strict_types=1);
namespace Porthorian\PDOWrapper\Tests\Suite;
use Porthorian\PDOWrapper\Tests\DBTest;
use Porthorian\PDOWrapper\DBWrapper;
use Porthorian\PDOWrapper\Models\DBResult;
use Porthorian\PDOWrapper\Interfaces\QueryInterface;
use Porthorian\PDOWrapper\Exception\DatabaseException;
class DBWrap... | 17,656 |
https://github.com/Eric-Arellano/rust/blob/master/src/test/run-make-fulldeps/emit-stack-sizes/Makefile | Github Open Source | Open Source | ECL-2.0, Apache-2.0, MIT-0, MIT | 2,022 | rust | Eric-Arellano | Makefile | Code | 48 | 116 | -include ../tools.mk
# ignore-windows
# ignore-macos
#
# This feature only works when the output object format is ELF so we ignore
# macOS and Windows
# check that the .stack_sizes section is generated
all:
$(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes... | 1,346 |
https://github.com/SproutProject/site/blob/master/front/rule.less | Github Open Source | Open Source | MIT | null | site | SproutProject | Less | Code | 16 | 61 | @import "mask-inc";
div#rule {
width: 80%;
margin-top: 16px;
margin-bottom: 30px;
padding: @gutter @gutter;
background-color: @white;
}
| 36,188 |
https://github.com/roblatour/notifyondemand/blob/master/NotifyOnDemand/Program.vb | Github Open Source | Open Source | MIT | 2,022 | notifyondemand | roblatour | Visual Basic | Code | 586 | 1,577 | ' Copyright Rob Latour, 2022
' https://rlatour.com/notifyondemand
Imports CommunityToolkit.WinUI.Notifications
Module Program
Sub Main(args As String())
Dim ReturnCode As Integer = 0
Try
Dim CommandLine As String
#If DEBUG Then
CommandLine = "~ this is a test ~ of a thr... | 50,254 |
https://github.com/oosugi20/uispec/blob/master/lib/editor/src/js/component/EditorToolbar/ItemZoomControl.jsx | Github Open Source | Open Source | MIT | null | uispec | oosugi20 | null | Spoken | 62 | 241 | const React = require( 'react' );
const ItemZoomControl = ( props ) => {
const { zoomAction } = props;
return (
<div className="EDT-EditorToolbar__item">
<div className="EDT-EditorToolbar__label">
zoom
</div>
<div className="EDT-EditorToolbar__control">
<input
className="EDT-EditorToolbar__... | 16,691 |
https://github.com/JudithBabbel/Data_Driven_Astronomy/blob/master/Week3/Assignment2/aggregate_subquery.sql | Github Open Source | Open Source | MIT | 2,021 | Data_Driven_Astronomy | JudithBabbel | SQL | Code | 21 | 64 | Select round(avg(p.t_eq),1), min(s.t_eff), max(t_eff)
from star as s
join planet as p using (kepler_id)
where s.t_eff > (Select avg(t_eff) from star); | 29,482 |
https://github.com/mehrzadtajkarimi/OneTest/blob/master/app/Http/Controllers/Admin/UserController.php | Github Open Source | Open Source | MIT | 2,020 | OneTest | mehrzadtajkarimi | PHP | Code | 369 | 1,328 | <?php
namespace App\Http\Controllers\Admin;
use App\User;
use App\Rules\Nationalcode;
use App\Traits\ValidateUser;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class UserController extends Controller
{
use ValidateUser;
/**
* Display a listing of the resource.
*
* @return... | 34,377 |
https://github.com/elitmus/ariadne/blob/master/lib/ariadne.rb | Github Open Source | Open Source | MIT | 2,016 | ariadne | elitmus | Ruby | Code | 4 | 22 | require 'ariadne/version'
require 'ariadne/ariadne_util' | 56,330 |
https://github.com/plenthoz/aloker/blob/master/application/controllers/Lowongan.php | Github Open Source | Open Source | MIT | 2,020 | aloker | plenthoz | PHP | Code | 305 | 1,475 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
include('application/controllers/Lokernganjuk.php');
class Lowongan extends Lokernganjuk {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
... | 56,153 |
https://github.com/webturing/2019ACMStep/blob/master/lec03/strstr2.cpp | Github Open Source | Open Source | MIT | 2,019 | 2019ACMStep | webturing | C++ | Code | 58 | 152 | #include<bits/stdc++.h>
using namespace std;
int main() {
string s("to know everything is to know nothing");
string t = "to";
auto pos = s.find(t);
if (pos == string::npos) {//npos string中内置的一个静态常数,表示不可能的位置
cout << "not found!" << endl;
} else {
cout << pos << endl;
}
pos =... | 34,275 |
https://github.com/baochanghong/docx4j/blob/master/src/main/java/org/docx4j/dml/diagram/CTDirection.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | docx4j | baochanghong | Java | Code | 241 | 623 | /*
* Copyright 2007-2008, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is 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/... | 6,864 |
https://github.com/CarlaCruz146/LI4/blob/master/cookboard/cookboard/obj/Debug/netcoreapp2.2/Razor/Views/Account/utilizadorLogin.g.cshtml.cs | Github Open Source | Open Source | MIT | 2,020 | LI4 | CarlaCruz146 | C# | Code | 406 | 2,937 | #pragma checksum "C:\Users\Operador\Desktop\LI4\cookboard\cookboard\Views\Account\utilizadorLogin.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "04c9a29960025ec8c1a4ff0f04271e95cf4fefa0"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute... | 14,512 |
https://github.com/Norvicdev/iOS/blob/master/Gemfile | Github Open Source | Open Source | MIT | 2,020 | iOS | Norvicdev | Ruby | Code | 8 | 37 | # Gemfile
ruby '>=2.3.7'
source 'https://rubygems.org'
gem 'fastlane'
| 6,838 |
https://github.com/vusion/vue-cli-plugin-vusion/blob/master/scenes/designer/components/d-drop.vue | Github Open Source | Open Source | MIT | 2,023 | vue-cli-plugin-vusion | vusion | Vue | Code | 421 | 1,470 | <template>
<div v-show="rectStyle" :class="$style.root" :style="rectStyle">
<div :class="$style.mask" :style="maskStyle"></div>
<div ref="dropNode"
:class="$style.drop"
:style="dragNodeStyle"
:dragover="dragover"
@dragover.prevent="onDragOver"
@dragleave.prevent="onDragLe... | 27,247 |
https://github.com/cyjing/mengThesis/blob/master/MSocketEverything/msocketSource/msocket1/src/edu/umass/cs/gnsserver/gnsApp/packet/DNSRecordType.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | mengThesis | cyjing | Java | Code | 206 | 448 | /*
*
* Copyright (c) 2015 University of Massachusetts
*
* 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 app... | 56,194 |
https://github.com/omarryhan/nextjs-i18n-dynamic-example/blob/master/types/css.d.ts | Github Open Source | Open Source | MIT | 2,022 | nextjs-i18n-dynamic-example | omarryhan | TypeScript | Code | 18 | 43 | declare module '*.css' {
interface Content {
[className: string]: string;
}
const content: Content;
export default content;
}
| 44,973 |
https://github.com/jomoespe/minimal-rust-docker/blob/master/Makefile | Github Open Source | Open Source | Unlicense | null | minimal-rust-docker | jomoespe | Makefile | Code | 34 | 90 | docker-image = rust-docker
all:
@ cargo build --release
build:
@ cargo build
run:
@ cargo run
clean:
@ cargo clean
docker:
@ docker build --rm -t $(docker-image) .
docker-run:
@ docker run --rm $(docker-image) | 34,990 |
https://github.com/corda/corda5-token-sdk/blob/master/workflows/src/main/kotlin/com/r3/corda/lib/tokens/workflows/flows/confidential/ConfidentialTokensFlowHandler.kt | Github Open Source | Open Source | Apache-2.0 | null | corda5-token-sdk | corda | Kotlin | Code | 64 | 260 | package com.r3.corda.lib.tokens.workflows.flows.confidential
import com.r3.corda.lib.tokens.workflows.internal.flows.confidential.AnonymisePartiesFlowHandler
import net.corda.v5.application.flows.Flow
import net.corda.v5.application.flows.FlowSession
import net.corda.v5.application.flows.flowservices.FlowEngine
import... | 48,546 |
https://github.com/lucas54neves/broker-in-the-chain/blob/master/src/contracts/Exchange.sol | Github Open Source | Open Source | MIT | null | broker-in-the-chain | lucas54neves | Solidity | Code | 842 | 2,808 | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
contract Exchange {
struct Order {
uint256 index;
bool isSale;
address userAddress;
uint256 createdAt;
string asset;
uint256 value;
uint256 numberOfShares;
bool acceptsFragmenting;
bool i... | 54,023 |
https://github.com/kremalicious/blog/blob/master/src/components/molecules/Search/SearchButton.tsx | Github Open Source | Open Source | MIT | 2,022 | blog | kremalicious | TypeScript | Code | 46 | 115 | import React, { ReactElement } from 'react'
import { searchButton } from './SearchButton.module.css'
import Icon from '../../atoms/Icon'
const SearchButton = ({ onClick }: { onClick: () => void }): ReactElement => (
<button
type="button"
title="Search"
className={searchButton}
onClick={onClick}
>
... | 8,635 |
https://github.com/Tekh-ops/ezEngine/blob/master/Code/ThirdParty/Kraut/KrautGenerator/KrautGeneratorDLL.h | Github Open Source | Open Source | MIT | 2,022 | ezEngine | Tekh-ops | C | Code | 26 | 119 | #pragma once
#include <KrautFoundation/Defines.h>
#ifdef AE_COMPILE_ENGINE_AS_DLL
# ifdef BUILDSYSTEM_BUILDING_KRAUTGENERATOR_LIB
# define KRAUT_DLL __declspec(dllexport)
# else
# define KRAUT_DLL __declspec(dllimport)
# endif
#else
# define KRAUT_DLL
#endif
| 15,456 |
https://github.com/tarikgwa/test/blob/master/html/app/design/adminhtml/Magento/backend/web/app/updater/styles/less/source/_forms.less | Github Open Source | Open Source | Apache-2.0 | null | test | tarikgwa | Less | Code | 42 | 148 | // /**
// * Copyright © 2015 Magento. All rights reserved.
// * See COPYING.txt for license details.
// */
.form-wrap {
padding-top: 2.1rem;
margin-bottom: 3.6rem;
}
.form-el-label-horizontal {
display: inline-block;
font-size: 1.3rem;
font-weight: @font-weight__semibold;
letter-spacing: @l... | 22,903 |
https://github.com/JetBrains/intellij-community/blob/master/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/replaceSizeZeroCheckWithIsEmpty/extensionReceiver.kt | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,023 | intellij-community | JetBrains | Kotlin | Code | 11 | 28 | // WITH_STDLIB
fun String.test(): Boolean {
return 0 == <caret>length
} | 54,162 |
https://github.com/mbj/stratosphere/blob/master/library-gen/Stratosphere/ResourceProperties/AppMeshVirtualServiceVirtualServiceSpec.hs | Github Open Source | Open Source | MIT | 2,019 | stratosphere | mbj | Haskell | Code | 117 | 485 | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualservice-virtualservicespec.html
module Stratosphere.ResourceProperties.AppMeshVirtualServiceVi... | 2,779 |
https://github.com/alifahfathonah/webpertambangan/blob/master/db_penyewaan.sql | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, MIT | 2,019 | webpertambangan | alifahfathonah | SQL | Code | 1,041 | 3,859 | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Nov 2019 pada 15.50
-- Versi server: 10.1.40-MariaDB
-- Versi PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | 24,892 |
https://github.com/ices-tools-dev/FishPi2/blob/master/WP6/CLEFRDB/R/class0Space.R | Github Open Source | Open Source | MIT | 2,019 | FishPi2 | ices-tools-dev | R | Code | 122 | 1,070 | #' Validity space method
#'
#' @param object a space object
#'
validSpace<-function(object){
#SpaceType<-NULL
#utils::data(SpaceType,package="fishpi2qc")
#print(SpaceType)
check<-TRUE
if(length(object@SpacePlace) == length(object@SpaceType)){
check<-TRUE&check
}else{
print(paste0("length(SpacePlace)!=le... | 41,846 |
https://github.com/Jiangchao3/Tropical-Cyclone-Information-System/blob/master/TyphoonApi/base/migrations/0001_initial.py | Github Open Source | Open Source | MIT | 2,021 | Tropical-Cyclone-Information-System | Jiangchao3 | Python | Code | 261 | 1,287 | # Generated by Django 2.0.4 on 2018-09-24 00:35
from django.conf import settings
import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
... | 11,349 |
https://github.com/cash2one/xai/blob/master/xai/brain/wordbase/nouns/_rings.py | Github Open Source | Open Source | MIT | 2,017 | xai | cash2one | Python | Code | 24 | 100 |
from xai.brain.wordbase.nouns._ring import _RING
#calss header
class _RINGS(_RING, ):
def __init__(self,):
_RING.__init__(self)
self.name = "RINGS"
self.specie = 'nouns'
self.basic = "ring"
self.jsondata = {}
| 12,873 |
https://github.com/hanaramdhani/pengembangan_lje/blob/master/app/Views/pengiriman/pengiriman/ajax_pengiriman_load_customer.php | Github Open Source | Open Source | MIT | 2,021 | pengembangan_lje | hanaramdhani | PHP | Code | 309 | 1,463 | <?php
$no=$last_start;
foreach ($customer as $cs => $value) : ?>
<input type="hidden" value="<?php echo $value->kd_customer ?>" id="customer-id-<?php echo $no ?>">
<input type="hidden" value="<?php echo $value->nama ?>" id="customer-name-<?php echo $no ?>">
<input type="hidden" value="<?php echo $value->alamat ?>" ... | 10,816 |
https://github.com/lolmaus/ember-gestures/blob/master/app/event_dispatcher.js | Github Open Source | Open Source | MIT | 2,017 | ember-gestures | lolmaus | JavaScript | Code | 44 | 149 | import Ember from 'ember';
import EventDispatcher from 'ember-gestures/event_dispatcher';
import config from './config/environment';
const merge = Ember.assign || Ember.merge;
let gestures = merge({}, {
emberUseCapture: false,
removeTracking: false,
useFastPaths: false
});
gestures = merge(gestures, con... | 39,532 |
https://github.com/PeteyPii/LeagueStats/blob/master/lol/encode.py | Github Open Source | Open Source | MIT | null | LeagueStats | PeteyPii | Python | Code | 99 | 375 | import arrow
import datetime
import enum
def bson_ready(a_dict):
keys_to_delete = set()
modifications = {}
for key, val in a_dict.items():
if isinstance(val, enum.Enum):
a_dict[key] = val.value
elif isinstance(val, arrow.Arrow):
a_dict[key] = val.datetime
elif isinstance(val, datetime.ti... | 22,450 |
https://github.com/lambdaxymox/DragonFlyBSD/blob/master/sys/dev/drm/radeonfw/R600_pfp/Makefile | Github Open Source | Open Source | BSD-3-Clause | 2,022 | DragonFlyBSD | lambdaxymox | Makefile | Code | 14 | 90 | # $FreeBSD: head/sys/modules/drm2/radeonkmsfw/R600_pfp/Makefile 254885 2013-08-25 19:37:15Z dumbbell $
KMOD= radeonkmsfw_R600_pfp
IMG= R600_pfp
.include <bsd.kmod.mk>
| 5,945 |
https://github.com/greenygh0st/coursemology2/blob/master/spec/features/course/registration_spec.rb | Github Open Source | Open Source | MIT | 2,016 | coursemology2 | greenygh0st | Ruby | Code | 162 | 681 | # frozen_string_literal: true
require 'rails_helper'
RSpec.feature 'Courses: Registration' do
let!(:instance) { Instance.default }
with_tenant(:instance) do
let(:course) { create(:course, :opened) }
let(:user) { create(:user) }
before { login_as(user, scope: :user) }
scenario 'Users can register ... | 6,730 |
https://github.com/ramanareddyanamala/Palla-Admin-API/blob/master/Palla_Admin/src/com/controller/UpdateCategory.java | Github Open Source | Open Source | Apache-2.0 | null | Palla-Admin-API | ramanareddyanamala | Java | Code | 578 | 2,312 | package com.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.... | 37,322 |
https://github.com/maidsafe/safenetwork.tech/blob/master/src/components/SubscribeForm/subscribeForm.sass | Github Open Source | Open Source | BSD-2-Clause, MIT, BSD-3-Clause | 2,021 | safenetwork.tech | maidsafe | Sass | Code | 166 | 644 | @import '~styles/index'
.SubscribeForm
&__wrap
&__form
+clearfix()
position: relative
margin-bottom: 30px
&__input
width: 320px
float: left
input
+font-3()
width: 100%
line-height: 40px
padding: 0 30px
border: 1px solid rgba(51, 51, 51, 0.2)
background-... | 50,842 |
https://github.com/maxerbubba/visionworkbench/blob/master/graveyard/Plate/PlateView.h | Github Open Source | Open Source | Apache-2.0 | 2,022 | visionworkbench | maxerbubba | C | Code | 503 | 1,727 | // __BEGIN_LICENSE__
// Copyright (c) 2006-2013, United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration. All
// rights reserved.
//
// The NASA Vision Workbench is licensed under the Apache License,
// Version 2.0 (the "License"); you may not use this f... | 3,005 |
https://github.com/WaywardGame/tars/blob/master/out/Core/IPlanner.d.ts | Github Open Source | Open Source | MIT | 2,022 | tars | WaywardGame | TypeScript | Code | 41 | 110 | import Context from "../Context";
import { IObjective, ObjectivePipeline } from "../IObjective";
import { IPlan } from "./IPlan";
export interface IPlanner {
readonly isCreatingPlan: boolean;
debug: boolean;
reset(): void;
createPlan(context: Context, objective: IObjective): Promise<IPlan | undefined>;
... | 22,180 |
https://github.com/wuciawe/TimeSeries/blob/master/src/main/scala/timeseries/util/MedianMAD.scala | Github Open Source | Open Source | MIT | 2,016 | TimeSeries | wuciawe | Scala | Code | 293 | 776 | package timeseries.util
import scala.annotation.tailrec
object MedianMAD {
private[this] case class ArrayView(arr: Array[Double], from: Int, until: Int) {
def apply(n: Int) =
if (from + n < until) arr(from + n)
else throw new ArrayIndexOutOfBoundsException(n)
def partitionInPlace(p: Double => ... | 48,317 |
https://github.com/kuustudio/Zexil/blob/master/Zexil.DotNet.FlowAnalysis/BlockVisitor.cs | Github Open Source | Open Source | MIT | 2,020 | Zexil | kuustudio | C# | Code | 277 | 978 | using System;
using System.Collections.Generic;
namespace Zexil.DotNet.FlowAnalysis {
/// <summary>
/// Block visitor (more customizable than <see cref="Extensions.Enumerate{TBlock}(Block)"/> and <see cref="Extensions.Enumerate{TBlock}(IEnumerable{Block})"/>)
/// </summary>
public sealed class BlockVisitor {
pri... | 21,602 |
https://github.com/morfogatos/meneame/blob/master/models/Meneo.php | Github Open Source | Open Source | BSD-3-Clause | 2,019 | meneame | morfogatos | PHP | Code | 155 | 495 | <?php
namespace app\models;
/**
* This is the model class for table "meneos".
*
* @property integer $usuario_id
* @property integer $entrada_id
*
* @property Entradas $entrada
* @property User $usuario
*/
class Meneo extends \yii\db\ActiveRecord
{
/**
* Nombre de tabla de Meneo
*/
public sta... | 11,300 |
https://github.com/glenjamin/firewall/blob/master/libraries/provider_firewall_rule_ufw.rb | Github Open Source | Open Source | Apache-2.0 | 2,015 | firewall | glenjamin | Ruby | Code | 192 | 487 | #
# Author:: Seth Chisamore (<schisamo@opscode.com>)
# Cookbook Name:: firwall
# Resource:: rule
#
# Copyright:: 2011, Opscode, 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
#
# ht... | 34,961 |
https://github.com/foursquare/pants/blob/master/contrib/cpp/src/python/pants/contrib/cpp/tasks/cpp_task.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | pants | foursquare | Python | Code | 138 | 520 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.base.exce... | 1,833 |
https://github.com/13939094104/Gtokrn/blob/master/app/src/main/java/vdsMain/message/RejectMessageInterface.java | Github Open Source | Open Source | MIT | 2,020 | Gtokrn | 13939094104 | Java | Code | 35 | 91 | package vdsMain.message;
public interface RejectMessageInterface {
/* renamed from: a */
String mo42583a();
/* renamed from: b */
int mo42584b();
/* renamed from: d */
String mo42585d();
/* renamed from: e */
byte[] mo42586e();
} | 38,843 |
https://github.com/DeagleGross/Rplugin/blob/master/visualisation/src/org/intellij/datavis/r/ui/MaterialTable.kt | Github Open Source | Open Source | MIT, BSD-2-Clause, Apache-2.0 | null | Rplugin | DeagleGross | Kotlin | Code | 373 | 1,149 | /*
* Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package org.intellij.datavis.r.ui
import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.ui.IdeBorderFactory
import com.intellij.ui.JBColor
imp... | 22,368 |
https://github.com/harshad26/bladetrade/blob/master/app/helpers/conversations_helper.rb | Github Open Source | Open Source | MIT | 2,016 | bladetrade | harshad26 | Ruby | Code | 11 | 48 | module ConversationsHelper
def free_conversation?
params[:message_type] || (@listing && @listing.transaction_type.is_inquiry?)
end
end
| 52,169 |
https://github.com/elenagradovich/labs_web/blob/master/lab3.2/js/task1.js | Github Open Source | Open Source | MIT | 2,020 | labs_web | elenagradovich | JavaScript | Code | 31 | 156 | $(document).ready(function(){
//task3-1
$("#but1").click(
function () {
$("#par1").load("../files/autumn.txt");
}
);
$("#but2").click(
function () {
$("#par1").load("../files/winter.txt");
}
);
$("#but3").click(
function () {
$("#par1").load("../files/summer.txt");
... | 44,372 |
https://github.com/Logqwerty/2019-03/blob/master/packages/web/src/queries/followList.js | Github Open Source | Open Source | MIT | 2,020 | 2019-03 | Logqwerty | JavaScript | Code | 41 | 121 | import { gql } from 'apollo-boost';
const FOLLOW_LIST = gql`
query FollowList($myId: ID!, $userId: ID!, $cursor: String, $limit: Int) {
followList(myId: $myId, userId: $userId, cursor: $cursor, limit: $limit) {
id
name
username
profileImage
isFollow
updatedAt
}
}
`;
exp... | 39,830 |
https://github.com/KeikakuB/experiments/blob/master/2014/08/ludum-dare-30/black-box-bandit/Assets/Scripts/MainMenu.cs | Github Open Source | Open Source | MIT | null | experiments | KeikakuB | C# | Code | 94 | 234 | using UnityEngine;
using System.Collections;
public class MainMenu : MonoBehaviour {
private float fuzz = 0.1f;
private float timeBetweenPlayerInput = 2.0f;
private float lastTimeForPlayerInput;
// Use this for initialization
void Start () {
lastTimeForPlayerInput = Time.time;
}
// Update is called once... | 30,920 |
https://github.com/ochorocho/gitlab-mirror-pull/blob/master/gitlab-mirror-pull.gemspec | Github Open Source | Open Source | MIT | 2,021 | gitlab-mirror-pull | ochorocho | Ruby | Code | 106 | 453 | Gem::Specification.new do |s|
s.name = 'gitlab-mirror-pull'
s.required_ruby_version = '>= 2.3.1'
s.version = '1.1.2'
s.licenses = ['MIT']
s.summary = "Fetch repos from remote if set"
s.description = "Checks for gitlab repositories with a set remote and run git fetch on these. Features: send mail for reports... | 51,143 |
https://github.com/Eyesfly/cms/blob/master/src/main/java/com/eyesfly/web/shiro/MyRealm.java | Github Open Source | Open Source | MIT | null | cms | Eyesfly | Java | Code | 190 | 792 | package com.eyesfly.web.shiro;
import com.eyesfly.entity.User;
import com.eyesfly.service.IResourceService;
import com.eyesfly.service.IRoleService;
import com.eyesfly.service.IUserService;
import org.apache.log4j.Logger;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apac... | 15,476 |
https://github.com/hjvlitstone/Guard/blob/master/src/views/themes/themes.js | Github Open Source | Open Source | MIT | 2,020 | Guard | hjvlitstone | JavaScript | Code | 156 | 537 | // 用来存放 Social Buttons 的颜色,图标等信息
// github wechatpc 是 alias 字段的值
export default {
socialButton: {
github: {
icon: '\uea0a',
iconStyle: {
background: '#222'
},
buttonStyle: {
color: '#fff',
background: '#444'
}
},
wechatpc: {
icon: '\uf262',
... | 37,453 |
https://github.com/samblize-pk7/Tavan-Angular/blob/master/src/app/views/panel-Admin/p-a-ticket/p-a-ticket.component.ts | Github Open Source | Open Source | MIT | null | Tavan-Angular | samblize-pk7 | TypeScript | Code | 64 | 231 | import { Component, OnInit } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Ticket } from 'src/app/_models/ticket';
import { TicketService } from 'src/app/_services/ticket.service';
@Component({
selector: 'app-p-a-ticket',
templateUrl: './p-a-ticket.component.html',
styleUrls: ['./p-a... | 20,696 |
https://github.com/MuffinPlease/guess-the-word/blob/master/src/validators/isKey.validator.js | Github Open Source | Open Source | MIT | null | guess-the-word | MuffinPlease | JavaScript | Code | 20 | 65 | const isKey = (key) => {
const letters = 'abcdefghijklmnopqrstuvwxyz';
if(key){
return letters.includes(key.toLowerCase());
}
return false;
}
export default isKey; | 15,440 |
https://github.com/CodeSmitty/django-menu-planner/blob/master/frontend-meals/src/utility/customHooks/useSubmitForm.js | Github Open Source | Open Source | MIT | null | django-menu-planner | CodeSmitty | JavaScript | Code | 214 | 744 | import { useState } from "react";
import firebase from "../firebase.utility";
import { storage } from "../firebase.utility";
import { useStore } from "../reducers";
import moment from "moment";
import { createData } from "../data";
import FireApi from "../rest.classes";
const useSubmitForm = (props, dispatch) => {
c... | 6,887 |
https://github.com/apache/shiro-site/blob/master/src/site/content/session-management-features.adoc | Github Open Source | Open Source | Apache-2.0 | 2,023 | shiro-site | apache | AsciiDoc | Code | 577 | 877 | = Apache Shiro Session Management Features
:jbake-date: 2010-03-18 00:00:00
:jbake-type: page
:jbake-status: published
:jbake-tags: documentation, manual
:idprefix:
Sessions are buckets of data that your users carry with them for a period of time when using your application. Sessions have traditionally been exclusive ... | 53,158 |
https://github.com/Microeinstein/NetLib/blob/master/Server.cs | Github Open Source | Open Source | MIT | 2,020 | NetLib | Microeinstein | C# | Code | 461 | 1,424 | #pragma warning disable CS0168
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using Micro.Utils;
using Micro.NetLib.Information;
using static Micro.NetLib.Core;
namespace Micro.NetLib {
internal class Server : Identified {
public event Action... | 42,234 |
https://github.com/dfriveros11/DEW/blob/master/nboletas-web/src/main/webapp/src/modules/envios/envios.ctrl.js | Github Open Source | Open Source | MIT | null | DEW | dfriveros11 | JavaScript | Code | 56 | 219 | /* global windows */
(function (ng) {
var mod = ng.module("enviosModule");
mod.constant("enviosContext", "api/envios");
mod.controller('envioCtrl', ['$scope', '$http', 'enviosContext', '$state',
function ($scope, $http, enviosContext, $state) {
$http.get(enviosContext).then(function (re... | 4,917 |
https://github.com/BitTigerInst/pikachu/blob/master/services/DataStorage.js | Github Open Source | Open Source | MIT | null | pikachu | BitTigerInst | JavaScript | Code | 188 | 569 | var MongoDBClient = require('./MongoDBClient');
var models = require('../db/models');
var Recipe = models.Recipe;
var Category = models.Category;
exports.saveRecipe = function saveRecipe(recipe) {
// create new recipe
var newRecipe = new Recipe({
_id: "recipe:" + recipe.id,
name: recipe.name,
image: r... | 44,275 |
https://github.com/datpt11/manager-ticket/blob/master/database/migrations/2014_10_12_000000_create_users_table.php | Github Open Source | Open Source | MIT | null | manager-ticket | datpt11 | PHP | Code | 79 | 387 | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... | 46,651 |
https://github.com/cuckata23/wurfl-data/blob/master/data/nokia_lumia_900_ver1.php | Github Open Source | Open Source | Apache-2.0, MIT | 2,015 | wurfl-data | cuckata23 | PHP | Code | 53 | 212 | <?php
return array (
'id' => 'nokia_lumia_900_ver1',
'fallback' => 'generic_ms_phone_os7_5',
'capabilities' =>
array (
'model_name' => 'Lumia 900',
'brand_name' => 'Nokia',
'release_date' => '2012_january',
'physical_screen_height' => '94',
'physical_screen_width' => '57',
'colors' => '... | 25,596 |
https://github.com/BARKx4/MMOverhaul/blob/master/src/main/resources/assets/mmoverhaul/models/item/package-info.java | Github Open Source | Open Source | CC0-1.0 | null | MMOverhaul | BARKx4 | Java | Code | 2 | 14 | package assets.mmoverhaul.models.item; | 31,129 |
https://github.com/doc22940/react-table-1/blob/master/test/components/__snapshots__/virtualizer.test.tsx.snap | Github Open Source | Open Source | Apache-2.0 | 2,020 | react-table-1 | doc22940 | null | Spoken | 24 | 99 | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Virtualizer should render children 1`] = `
<Scroller
height={100}
onScroll={[Function]}
virtualHeight={4250}
virtualWidth={4250}
width={100}
>
<div>
Foo
</div>
</Scroller>
`;
| 42,574 |
https://github.com/felixop8/RestfulServiceMeetings/blob/master/resources/assets/js/components/App.js | Github Open Source | Open Source | MIT | null | RestfulServiceMeetings | felixop8 | JavaScript | Code | 59 | 178 | // resources/assets/js/components/App.js
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import Header from './common/Header'
import MeetingPage from './meetings/MeetingPage';
class App extends Component {
render () {
retu... | 4,842 |
https://github.com/ericmort/appstax-js/blob/master/test-node/datastore-node-test.js | Github Open Source | Open Source | MIT | 2,016 | appstax-js | ericmort | JavaScript | Code | 56 | 241 |
require("mocha");
var expect = require("chai").expect;
var nock = require("nock");
var appstax = require("../src/appstax");
describe("DataStore under node.js", function() {
beforeEach(function() {
appstax.init({appKey:"my-app-key", baseUrl:"http://localhost:1234/api/latest/"})
});
afterEach(... | 3,390 |
https://github.com/protomodule/probe/blob/master/lib/modules/tracing.ts | Github Open Source | Open Source | Apache-2.0 | null | probe | protomodule | TypeScript | Code | 90 | 290 | import crypto from "crypto"
import { NextFunction, Request, Response } from "express"
import { Options, Settings } from "../utils/options"
import { encode, decode } from "../utils/base58"
export const defaults = Object.freeze({
tracingHeader: "X-Trace-Id",
tracingRequestHeader: "X-Request-Id",
})
export type Trac... | 27,984 |
https://github.com/manikanth/sql-server-samples/blob/master/samples/features/unicode/CheckStorageReq_CurrDB.sql | Github Open Source | Open Source | MIT | 2,020 | sql-server-samples | manikanth | SQL | Code | 245 | 711 | -- Assess space requirements for UTF8 in context database
DROP TABLE IF EXISTS #tmpObjects;
CREATE TABLE #tmpObjects (ObjectName sysname,
ColumnName sysname,
ColumnType sysname,
DefinedTypeSize smallint,
ActualMaxBytes smallint,
UTF8BytesNeeded smallint,
[isdone] bit,
CONSTRAINT PK_ObjName_ColName
... | 43,422 |
https://github.com/Jahia/content-editor/blob/master/src/javascript/SelectorTypes/ChoiceList/actions/selectAllAction.spec.js | Github Open Source | Open Source | MIT | 2,023 | content-editor | Jahia | JavaScript | Code | 666 | 2,080 | import {SelectAllActionComponent} from './selectAllAction';
import {shallow} from '@jahia/test-framework';
import React from 'react';
import {useFormikContext} from 'formik';
jest.mock('formik');
const button = () => <button type="button"/>;
describe('selectAllAction', () => {
describe('onclick', () => {
... | 43,868 |
https://github.com/magicbug/Cloudlog/blob/master/application/views/api/description.php | Github Open Source | Open Source | MIT | 2,023 | Cloudlog | magicbug | PHP | Code | 111 | 420 | <div class="container api">
<br>
<?php if($this->session->flashdata('notice')) { ?>
<div class="alert alert-success" role="alert">
<?php echo $this->session->flashdata('notice'); ?>
</div>
<?php } ?>
<div class="card">
<div class="card-header">
<?php echo $page_title; ?>
</div>
<div class="card-body">
... | 6,538 |
https://github.com/jewelhuq/okatea/blob/master/src/oktModules/catalog/locales/fr/admin.lang.php | Github Open Source | Open Source | MIT | 2,014 | okatea | jewelhuq | PHP | Code | 142 | 836 | <?php
# routes
$GLOBALS['__l10n']['c_a_route_name_catalogList'] = 'Liste catalogue';
$GLOBALS['__l10n']['c_a_route_desc_catalogList'] = 'Liste des produits du module catalogue';
$GLOBALS['__l10n']['c_a_route_name_catalogCategory'] = 'Catégorie catalogue';
$GLOBALS['__l10n']['c_a_route_desc_catalogCategory'] = 'Liste d... | 13,187 |
https://github.com/max-delta/retrofit-public/blob/master/apps/cc3o3/elements/ElementDatabase.h | Github Open Source | Open Source | X11 | 2,020 | retrofit-public | max-delta | C | Code | 135 | 548 | #pragma once
#include "ElementFwd.h"
#include "cc3o3/elements/ElementDesc.h"
#include "cc3o3/company/CompanyFwd.h"
#include "PlatformFilesystem/VFSFwd.h"
#include "rftl/vector"
#include "rftl/deque"
#include "rftl/array"
#include "rftl/string"
#include "rftl/unordered_map"
namespace RF::cc::element {
/////////////... | 46,445 |
https://github.com/alrs/acyl/blob/master/vendor/github.com/tinylib/msgp/_generated/errorwrap.go | Github Open Source | Open Source | MIT | 2,022 | acyl | alrs | Go | Code | 150 | 471 | package _generated
//go:generate msgp
// The leaves of interest in this crazy structs are strings. The test case
// looks for strings in the serialised msgpack and makes them unreadable.
type ErrorCtxMapChild struct {
Val string
}
type ErrorCtxMapChildNotInline struct {
Val1, Val2, Val3, Val4, Val5 string
}
type... | 45,833 |
https://github.com/joey3060/deeperience_web/blob/master/src/server/utils/env.js | Github Open Source | Open Source | MIT | null | deeperience_web | joey3060 | JavaScript | Code | 11 | 28 | const env = process.env.NODE_ENV = process.env.NODE_ENV || 'production'
export default env
| 5,357 |
https://github.com/skshahidur/ds-utility/blob/master/Makefile | Github Open Source | Open Source | MIT | null | ds-utility | skshahidur | Makefile | Code | 80 | 210 | .PHONY: clean data lint requirements sync_data_to_s3 sync_data_from_s3
PROJECT_NAME = ds_utility
PYTHON_INTERPRETER = python3
.PHONY: install
## Install this repo in develop mode
install:
pip install -r requirements/prod.txt -r requirements/ci.txt
pip install -e .
pre-commit install
.PHONY: clean
## Delete all co... | 24,078 |
https://github.com/SotoiGhost/GoogleApisForiOSComponents/blob/master/custom_externals_download.cake | Github Open Source | Open Source | LicenseRef-scancode-generic-cla, MIT | 2,023 | GoogleApisForiOSComponents | SotoiGhost | CoffeeScript | Code | 19 | 30 | // void FirebaseCoreDownload ()
// {
// // Code to download the component frameworks into externals folder
// }
| 23,823 |
https://github.com/krisgesling/common/blob/master/gherkin-utils/javascript/src/GherkinDocumentHandlers.ts | Github Open Source | Open Source | MIT | 2,021 | common | krisgesling | TypeScript | Code | 96 | 252 | import * as messages from '@cucumber/messages'
export type GherkinDocumentHandlers<Acc> = {
feature: (feature: messages.Feature, acc: Acc) => Acc
background: (backgrounf: messages.Background, acc: Acc) => Acc
rule: (rule: messages.Rule, acc: Acc) => Acc
scenario: (scenario: messages.Scenario, acc: Acc) => Acc
... | 43,960 |
https://github.com/homw188/homw-framework/blob/master/homw-message/src/main/java/com/homw/message/bean/PushNotification.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | homw-framework | homw188 | Java | Code | 129 | 370 | package com.homw.message.bean;
import java.util.Map;
import com.homw.message.constant.PushTargetType;
/**
* @description APP通知消息
* @author Hom
* @version 1.0
* @since 2020-04-03
*/
public class PushNotification {
private String alert;
private String title;
private String[] target;// 推送目标ID集合
/**
* @see Pu... | 11,443 |
https://github.com/tferega/selenate/blob/master/code/Server/src/main/scala/net/selenate/server/sessions/KeepaliveData.scala | Github Open Source | Open Source | BSD-3-Clause | 2,016 | selenate | tferega | Scala | Code | 40 | 160 | package net.selenate
package server
package sessions
import common.comms.req.SeCommsReq
import common.comms.req.SeReqStartKeepalive
import scala.concurrent.duration._
import scala.collection.JavaConversions._
object KeepaliveData {
def fromReq(req: SeReqStartKeepalive) = {
val delay = req.delayMillis.milliseco... | 6,552 |
https://github.com/Mimir-Solutions/openzeppelin-contracts-upgradeable/blob/master/contracts/mocks/ClonesMockUpgradeable.sol | Github Open Source | Open Source | MIT | null | openzeppelin-contracts-upgradeable | Mimir-Solutions | Solidity | Code | 105 | 361 | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../proxy/ClonesUpgradeable.sol";
import "../utils/AddressUpgradeable.sol";
import "../proxy/Initializable.sol";
contract ClonesMockUpgradeable is Initializable {
function __ClonesMock_init() internal initializer {
__ClonesMock_init_u... | 20,492 |
https://github.com/svenvc/zinc/blob/master/repository/Zinc-Tests.package/ZnMessageBenchmarkTest.class/instance/testResponses.st | Github Open Source | Open Source | MIT | 2,023 | zinc | svenvc | null | Spoken | 40 | 99 | testing
testResponses
ZnMessageBenchmark responses do: [ :each |
| bench |
bench := ZnMessageBenchmark new.
bench perform: each.
self assert: (bench message isKindOf: ZnResponse).
bench writeRepresentation.
self assert: (bench read isKindOf: ZnResponse).
self assert: bench read equals: bench message ] | 8,817 |
https://github.com/StanleyHusai/16_novatel_span_driver/blob/master/devel/lib/python2.7/dist-packages/novatel_msgs/msg/_BESTPOS.py | Github Open Source | Open Source | BSD-3-Clause | 2,018 | 16_novatel_span_driver | StanleyHusai | Python | Code | 1,284 | 5,841 | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from novatel_msgs/BESTPOS.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import novatel_msgs.msg
class BESTPOS(genpy.Message):
_md5sum = "8321b9523105411643891c8653878... | 55,653 |
https://github.com/prclibo/gaps/blob/master/generator/code_generation_cpp/cg_cpp_setup_template.m | Github Open Source | Open Source | BSD-3-Clause, GPL-2.0-only | 2,022 | gaps | prclibo | MATLAB | Code | 403 | 1,904 | function str = cg_cpp_setup_templ(solv, templ, opt)
prob = solv.prob;
function str = cg_cpp_setup_block(r, c)
blk_cc = templ.cind_blk{r, c};
blk_ind = find(blk_cc);
blk_ci = blk_cc(blk_ind) - 1;
blk_ind = blk_ind - 1;
str = '';
nm_ind = sprintf('A%d%d_ind', r, c);
... | 21,932 |
https://github.com/fossabot/climate-watch/blob/master/spec/models/socioeconomic/indicator_spec.rb | Github Open Source | Open Source | MIT | null | climate-watch | fossabot | Ruby | Code | 52 | 187 | require 'rails_helper'
RSpec.describe Socioeconomic::Indicator, type: :model do
it 'should be invalid without year' do
expect(
FactoryBot.build(:socioeconomic_indicator, year: nil)
).to have(1).errors_on(:year)
end
it 'should be invalid when year is taken' do
location = FactoryBot.create(:loca... | 26,003 |
https://github.com/mobilejazz/harmony-kotlin/blob/master/core/src/main/java/com/mobilejazz/harmony/kotlin/core/logger/ConsoleLogger.kt | Github Open Source | Open Source | Apache-2.0 | 2,022 | harmony-kotlin | mobilejazz | Kotlin | Code | 135 | 449 | package com.mobilejazz.harmony.kotlin.core.logger
class ConsoleLogger : Logger {
override fun log(level: Logger.Level, tag: String?, message: String) {
tag?.let {
println("${level.representation} - [$it]: $message")
} ?: println("${level.representation}: $message")
}
override fun log(level: Logg... | 56,368 |
https://github.com/yxs223456/tp_test/blob/master/application/index/controller/User.php | Github Open Source | Open Source | Apache-2.0 | null | tp_test | yxs223456 | PHP | Code | 57 | 171 | <?php
/**
* Created by PhpStorm.
* User: yangxiushan
* Date: 2019-07-30
* Time: 16:28
*/
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\facade\Request;
class User extends Controller
{
public function info()
{
$userId = Request::get('id');
$user = Db::name('... | 20,117 |
https://github.com/jongrim/next-dice-roller/blob/master/components/Sidebar.tsx | Github Open Source | Open Source | MIT | 2,020 | next-dice-roller | jongrim | TypeScript | Code | 378 | 1,124 | import React, { ReactChild, useCallback, useRef } from 'react';
import { Box, Button, Flex, Image } from 'rebass';
import { Machine } from 'xstate';
import { useMachine } from '@xstate/react';
import { TweenMax, Elastic } from 'gsap';
interface SidebarMachineSchema {
states: {
closed: {};
closing: {};
op... | 4,974 |
https://github.com/ninatu/everything_at_once/blob/master/everything_at_once/metric/metric.py | Github Open Source | Open Source | BSD-3-Clause | null | everything_at_once | ninatu | Python | Code | 245 | 975 | import numpy as np
import scipy.stats
import itertools
class RetrievalMetric:
def __init__(self, task='t2v', break_ties='averaging'):
assert break_ties in ['averaging', 'optimistically']
task = task.replace('_metrics', '')
assert task in ['t2v', 'v2t', 't2a', 'a2t', 'v2a', 'a2v',
... | 17,153 |
https://github.com/rollvolet/crm-ap/blob/master/src/Rollvolet.CRM.DataProvider/Models/Language.cs | Github Open Source | Open Source | MIT | null | crm-ap | rollvolet | C# | Code | 35 | 105 | using System.ComponentModel.DataAnnotations.Schema;
namespace Rollvolet.CRM.DataProvider.Models
{
public class Language
{
[Column("TaalID")]
public int Id { get; set; }
[Column("Taalcode")]
public string Code { get; set; }
[Column("Taal")]
public string Name { ... | 30,024 |
https://github.com/Alan1022/DBus/blob/master/dbus-sinker/src/main/java/com/creditease/dbus/spout/queue/EmitDataListManager.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | DBus | Alan1022 | Java | Code | 228 | 613 | /*-
* <<
* DBus
* ==
* Copyright (C) 2016 - 2019 Bridata
* ==
* 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 requir... | 17,135 |
https://github.com/nawawi/zephir/blob/master/tests/fixtures/stubs/issues/expected/Exception.php | Github Open Source | Open Source | MIT | 2,021 | zephir | nawawi | PHP | Code | 26 | 58 | <?php
namespace Stubs;
use Throwable;
/**
* Exceptions for the Collection object
*/
class Exception extends \Exception implements \Throwable
{
public function __construct()
{
}
}
| 23,354 |
https://github.com/lordnynex/CLEANUP/blob/master/FORKS/MoonScript/lapis-community/tree/community/limits.moon | Github Open Source | Open Source | WTFPL, LicenseRef-scancode-warranty-disclaimer | 2,016 | CLEANUP | lordnynex | null | Spoken | 12 | 47 | {
MAX_BODY_LEN: 1024 * 10
MAX_TITLE_LEN: 256
POSTS_PER_PAGE: 20
TOPICS_PER_PAGE: 20
}
| 30,432 |
https://github.com/shirleynaranjo/oriiufps/blob/master/app/Providers/AppServiceProvider.php | Github Open Source | Open Source | MIT | null | oriiufps | shirleynaranjo | PHP | Code | 70 | 245 | <?php
namespace App\Providers;
use Carbon\Carbon;
use Illuminate\Contracts\View\View;
use Illuminate\Support\ServiceProvider;
use GuzzleHttp\Client;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
... | 19,151 |
https://github.com/TimothyClose/Pokemon-GO-Scanner/blob/master/src/app/core/io/PokeIOBase.ts | Github Open Source | Open Source | MIT | 2,020 | Pokemon-GO-Scanner | TimothyClose | TypeScript | Code | 287 | 1,008 | import request = require("request");
import q = require("q");
import {Logger} from "../helpers/Logger";
import {ProtoBuilder} from "../proto/ProtoBuilder";
import {Player} from "../models/Player";
import {Auth} from "../auth/Auth";
import {Constants} from "./Constants";
import {ApiHandler} from "./handlers/ApiHandler"... | 28,693 |
https://github.com/aratomg/nbt/blob/master/resources/views/layout/footer.blade.php | Github Open Source | Open Source | MIT | null | nbt | aratomg | PHP | Code | 287 | 1,299 | <footer class="main-footer">
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="{{ str_replace('index.php', '', url('/')) }}/plugins/jquery/jq... | 14,490 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.