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/profojak/ap8/blob/master/Makefile | Github Open Source | Open Source | MIT | null | ap8 | profojak | Makefile | Code | 215 | 883 | CC = arm-linux-gnueabihf-gcc
CXX = arm-linux-gnueabihf-g++
CPPFLAGS = -I .
CFLAGS =-g -std=gnu99 -O1 -Wall
CXXFLAGS = -g -std=gnu++11 -O1 -Wall
LDFLAGS = -lrt -lpthread
SOURCES = main.c mzapo/mzapo_phys.c mzapo/mzapo_parlcd.c
SOURCES += fonts/font_prop14x16.c fonts/font_rom8x16.c
SOURCES += utils/lcd.c utils/led.c ut... | 47,583 |
https://github.com/blackshady/MyDiary/blob/master/Server/src/routes/authRoute.js | Github Open Source | Open Source | MIT | 2,018 | MyDiary | blackshady | JavaScript | Code | 42 | 180 | import {
Router,
} from 'express';
import AuthController from '../controllers/AuthController';
import asyncCatchErrors from '../helpers/asyncErrorHandler';
import AuthValidator from '../middlewares/AuthValidator';
import Authorization from '../middlewares/Authorization';
const router = Router();
// Users routes
ro... | 9,166 |
https://github.com/Evaske/Greenstone/blob/master/site/web/app/themes/GreenstoneStarling/resources/assets/styles/components/home/_our-services.scss | Github Open Source | Open Source | MIT | 2,018 | Greenstone | Evaske | SCSS | Code | 165 | 574 | .home-our-services {
margin-bottom: 60px;
text-align: center;
.service {
align-items: center;
background: $white;
border-radius: 4px;
box-shadow: 0 1px 3px 0 rgba($black, .08), 0 4px 6px 0 rgba($blue-shadow, .11);
display: flex;
flex-direction: column;
min-height: 352px;
padding: ... | 47,959 |
https://github.com/anwarchk/quay/blob/master/util/config/validators/test/test_validate_access.py | Github Open Source | Open Source | Apache-2.0 | 2,019 | quay | anwarchk | Python | Code | 82 | 451 | import pytest
from util.config.validator import ValidatorContext
from util.config.validators import ConfigValidationException
from util.config.validators.validate_access import AccessSettingsValidator
from test.fixtures import *
@pytest.mark.parametrize('unvalidated_config, expected_exception', [
({}, None),
({'... | 7,522 |
https://github.com/fugacious/fugacious/blob/master/bin/cf-start | Github Open Source | Open Source | CC0-1.0, LicenseRef-scancode-public-domain, LicenseRef-scancode-unknown-license-reference | 2,022 | fugacious | fugacious | Shell | Code | 13 | 43 | #!/bin/sh
set -e
bundle exec rake cf:on_first_instance db:migrate
bundle exec puma -C config/puma.rb
| 8,913 |
https://github.com/omernaci/mawaccess/blob/master/mawaccess-service/src/main/java/com/omernaci/mawaccess/domain/Result.java | Github Open Source | Open Source | MIT | 2,020 | mawaccess | omernaci | Java | Code | 28 | 108 | package com.omernaci.mawaccess.domain;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Data
@Table
@Entity
public class Result extends BaseEntity {
@ManyToOne(fetch = FetchType.LAZY)
private Project... | 6,497 |
https://github.com/jpashayev/ArizonaRoadmaps/blob/master/SearchPage.dart | Github Open Source | Open Source | MIT | 2,021 | ArizonaRoadmaps | jpashayev | Dart | Code | 99 | 483 | import 'dart:async';
import 'dart:core';
import 'package:flutter/material.dart';
import 'package:flutter_google_places/flutter_google_places.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_webservice/places.dart';
class SearchPage {
final context;
final ValueChang... | 21,274 |
https://github.com/Newteles-Techno/xsp/blob/master/tools/mono-asp-apps/Makefile.am | Github Open Source | Open Source | MIT | 2,020 | xsp | Newteles-Techno | Makefile | Code | 4 | 15 | EXTRA_DIST = mono-asp-apps README
| 43,554 |
https://github.com/HeathWallace/coinface/blob/master/src/reducers/slices/transactions.test.js | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, MIT | 2,018 | coinface | HeathWallace | JavaScript | Code | 198 | 723 | import transactionsReducer from './transactions.js';
import * as types from '../../constants/actionTypes';
// all values are inserted as hexadecimal values
// which are then converted in the reducer
const newTransaction = {
transactionHash: '0x00000000',
timeStamp: '0x5a8edf01',
topics: [
'',
'0x000000000000000... | 38,460 |
https://github.com/sho25/hbase/blob/master/hbase-common/src/main/java/org/apache/hadoop/hbase/io/compress/ReusableStreamGzipCodec.java | Github Open Source | Open Source | Apache-2.0 | null | hbase | sho25 | Java | Code | 1,132 | 4,418 | begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses t... | 23,965 |
https://github.com/matush97/playerWeapon/blob/master/src/sk/stuba/fei/cvicenie4/player/Player.java | Github Open Source | Open Source | MIT | null | playerWeapon | matush97 | Java | Code | 121 | 336 | package sk.stuba.fei.cvicenie4.player;
import sk.stuba.fei.cvicenie4.weapon.Weapon;
import java.util.Optional;
public abstract class Player<W extends Weapon> {
private String name;
private int health;
private W weapon;
public Player(String name,int health,W weapon) {
setName(name);
s... | 1,228 |
https://github.com/kradalby/osxphotos/blob/master/osxphotos/datetime_utils.py | Github Open Source | Open Source | MIT | 2,022 | osxphotos | kradalby | Python | Code | 469 | 1,325 | """ datetime.datetime helper functions for converting to/from UTC """
import datetime
def get_local_tz(dt):
""" Return local timezone as datetime.timezone tzinfo for dt
Args:
dt: datetime.datetime
Returns:
local timezone for dt as datetime.timezone
Raises:
ValueErro... | 39,451 |
https://github.com/dpajek/chingu_connect4/blob/master/src/Board.js | Github Open Source | Open Source | MIT | null | chingu_connect4 | dpajek | JavaScript | Code | 81 | 227 | /* eslint-disable class-methods-use-this */
import React from 'react';
import './Board.css';
import Disc from './Disc';
class Board extends React.Component {
renderDisc(i) {
const { gameGrid, onClick } = this.props;
return <Disc key={i} colour={gameGrid[i]} onClick={() => onClick(i)} />;
}
render() {
... | 31,641 |
https://github.com/pustian/pattern/blob/master/02-factory/java/03-abstractFactory/FactoryMain.java | Github Open Source | Open Source | MIT | null | pattern | pustian | Java | Code | 60 | 233 | public class FactoryMain {
public static void main(String[] args) {
AbstractDrinkFactory facotry = null;
facotry = new ChinaFactory();
System.out.println("ChinaCoffeeFactory" );
for(Coffee coffee: facotry.createCoffee() ) {
System.out.println(coffee.getName() );
}... | 12,921 |
https://github.com/audip/cerebro/blob/master/app/models/Cluster.scala | Github Open Source | Open Source | MIT | 2,022 | cerebro | audip | Scala | Code | 8 | 21 | package models
case class Cluster(host: String, authentication: Option[ESAuth])
| 42,173 |
https://github.com/pramod-Kumar-Barik-528/--Preventing--Phishing--Attack--on-Secure-voting-system-using-visual-Cryptography--/blob/master/src/vote/Vreg.java | Github Open Source | Open Source | BSD-3-Clause | 2,021 | --Preventing--Phishing--Attack--on-Secure-voting-system-using-visual-Cryptography-- | pramod-Kumar-Barik-528 | Java | Code | 2,064 | 11,354 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package vote;
import com.github.sarxos.webcam.Webcam;
import java.awt.AWTException;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import jav... | 22,516 |
https://github.com/muflikhandimasd/salary/blob/master/resources/views/berita/edit.blade.php | Github Open Source | Open Source | MIT | null | salary | muflikhandimasd | PHP | Code | 114 | 517 | @extends('layouts.template')
@section('tab')
Edit Berita
@endsection
@section('title')
Edit Berita
@endsection
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class=... | 35,159 |
https://github.com/fransinho-007/mi-proyecto1-php/blob/master/src/tools.php | Github Open Source | Open Source | MIT | null | mi-proyecto1-php | fransinho-007 | PHP | Code | 31 | 81 | <?php
function saludar()
{
return "hola todo el mundo";
}
function saludar_nombre($name)
{
return "Hola " . $name . " como estas...!!";
}
function suma($n1, $n2){
retunr $n1 + $n2;
} | 2,788 |
https://github.com/longlevan/h2cs-design/blob/master/tests/regression_tests.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | h2cs-design | longlevan | Python | Code | 17 | 49 | # -*- coding: utf-8 -
"""Regression tests.
"""
from nose.tools import ok_
import vppopt
def test_version_metadata():
ok_(vppopt.__version__) | 50,894 |
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/sphere/arm-sphere/src/operationsInterfaces/certificates.ts | Github Open Source | Open Source | LicenseRef-scancode-generic-cla, MIT | 2,023 | azure-sdk-for-js | Azure | TypeScript | Code | 307 | 760 | /*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
Certificate,
... | 52,255 |
https://github.com/ekarpovs/flow_storage/blob/master/flow_storage/flow_io_utils_impl/flowioutils_h5py.py | Github Open Source | Open Source | MIT | null | flow_storage | ekarpovs | Python | Code | 413 | 1,534 | import json
import os
import cv2
import numpy as np
import h5py
import ast
from typing import Dict, List, Tuple
from ..flowstorageconfig import FlowStorageConfig
class FlowIOUtilsH5Py():
def __init__(self, config: FlowStorageConfig) -> None:
db_ffn = f'{config.storage_location}/data.hdf5'
if os.path.exist... | 25,665 |
https://github.com/shabbirahussain/MyCookie/blob/master/build.sbt | Github Open Source | Open Source | Apache-2.0 | null | MyCookie | shabbirahussain | Scala | Code | 60 | 222 | name := "CsvParser"
mainClass in assembly := some("org.hshabbir.practice.csv_parser.Main")
assemblyJarName := "my_cookie.jar"
version := "0.1"
scalaVersion := "2.13.4"
libraryDependencies ++= Seq(
"info.picocli" % "picocli" % "4.5.2",
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.0",
"joda-tim... | 1,753 |
https://github.com/wahello/openshift-installer/blob/master/terraform/azurerm/vendor/github.com/hashicorp/terraform-provider-azurerm/internal/services/analysisservices/sdk/2017-08-01/servers/model_operationstatus.go | Github Open Source | Open Source | Apache-2.0 | null | openshift-installer | wahello | Go | Code | 25 | 100 | package servers
type OperationStatus struct {
EndTime *string `json:"endTime,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
StartTime *string `json:"startTime,omitempty"`
Status *string `j... | 9,275 |
https://github.com/Yirgacheffe/go-github-actions/blob/master/pkg/utcase/hello_test.go | Github Open Source | Open Source | MIT | null | go-github-actions | Yirgacheffe | Go | Code | 101 | 274 | package utcase
import (
"testing"
)
func Test_Greet_Name(t *testing.T) {
expect := "Hello! Annie."
if result := Greet("Annie"); result != expect {
t.Errorf("Greet(name string) = %s; want %s", result, expect)
}
}
/*
* Note: gotests GENERATION CODES
*/
func TestGreet(t *testing.T) {
type args struct {
name... | 54,521 |
https://github.com/lechium/tvOS124Headers/blob/master/System/Library/PrivateFrameworks/TVSystemUI.framework/TVSUIOSUpdateSlowRebootView.h | Github Open Source | Open Source | MIT | 2,020 | tvOS124Headers | lechium | Objective-C | Code | 85 | 312 | /*
* This header is generated by classdump-dyld 1.0
* on Saturday, August 24, 2019 at 9:50:27 PM Mountain Standard Time
* Operating System: Version 12.4 (Build 16M568)
* Image Source: /System/Library/PrivateFrameworks/TVSystemUI.framework/TVSystemUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Eli... | 14,819 |
https://github.com/HarrisonDing/hd-desing-pattern-project/blob/master/src/main/java/hd/dp/composite/IFile.java | Github Open Source | Open Source | Apache-2.0 | null | hd-desing-pattern-project | HarrisonDing | Java | Code | 19 | 67 | package hd.dp.composite;
import java.util.List;
public interface IFile {
void display();
void add(IFile file);
void remove(IFile file);
List<IFile> getChildren();
}
| 19,886 |
https://github.com/Roman3349/iqrf-gateway-webapp/blob/master/app/ApiModule/Version0/Controllers/ServicesController.php | Github Open Source | Open Source | Apache-2.0 | null | iqrf-gateway-webapp | Roman3349 | PHP | Code | 999 | 3,233 | <?php
/**
* Copyright 2017 MICRORISC s.r.o.
* Copyright 2017-2019 IQRF Tech s.r.o.
*
* 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
... | 50,909 |
https://github.com/StrayRobots/3d-annotation-tool/blob/master/include/commands/command.h | Github Open Source | Open Source | MIT | 2,022 | 3d-annotation-tool | StrayRobots | C | Code | 77 | 142 | #pragma once
#include "scene_model.h"
class StudioViewController;
namespace commands {
class Command {
/*
* A command that changes the state of the scene model.
* Has to implement both an execute and undo method. The undo method should restore
* the state of the scene model back to where it was prior to e... | 27,280 |
https://github.com/q1763868326/connector/blob/master/connector-api/src/main/java/com/tuya/connector/api/handler/QueryMapAnnotationHandler.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | connector | q1763868326 | Java | Code | 62 | 268 | package com.tuya.connector.api.handler;
import com.tuya.connector.api.annotations.QueryMap;
import javassist.CtClass;
import javassist.CtMethod;
import javassist.bytecode.ConstPool;
import javassist.bytecode.annotation.Annotation;
import javassist.bytecode.annotation.BooleanMemberValue;
/**
* <p> TODO
*
* @author ... | 12,232 |
https://github.com/schoudry/eaem-extensions/blob/master/eaem-cloud-service/eaem-cs-restrict-assets-size/ui.apps/src/main/content/jcr_root/apps/eaem-cs-restrict-assets-size/supported-file-sizes/supported-file-sizes.js | Github Open Source | Open Source | Apache-2.0 | 2,023 | eaem-extensions | schoudry | JavaScript | Code | 278 | 1,027 | (function ($, $document) {
"use strict";
var _ = window._,
CONFIG_PATH = "/conf/global/settings/dam/eaem-dam-config.json",
allowedSizes = {},
ENDS_WITH_SIZE = "Size";
loadAllowedSizes();
var _origConfirmUpload = window.DamFileUpload.prototype._confirmUpload,
_origOnInp... | 2,625 |
https://github.com/singnet/snet-sdk-js/blob/master/packages/core/src/utils/bignumber_helper.js | Github Open Source | Open Source | MIT | 2,022 | snet-sdk-js | singnet | JavaScript | Code | 14 | 40 | import { BigNumber } from 'bignumber.js';
export function toBNString(value) {
return new BigNumber(value).toFixed();
}
| 15,087 |
https://github.com/abhasdesai/taxidio_website/blob/master/application/models/Faq_m.php | Github Open Source | Open Source | MIT | null | taxidio_website | abhasdesai | PHP | Code | 138 | 843 | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Faq_m extends CI_Model
{
function add()
{
$data=array(
'category_id'=>$_POST['category_id'],
'question'=>$_POST['question'],
'answer'=>$_POST['answer'],
);
$this->db->insert('tbl_faq',$data);
}
function edit()
{
... | 48,761 |
https://github.com/gitFreeByte/sky_engine/blob/master/sky/tools/sky_snapshot/vm.h | Github Open Source | Open Source | BSD-3-Clause | 2,021 | sky_engine | gitFreeByte | C | Code | 43 | 149 | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_TOOLS_SKY_SNAPSHOT_VM_H_
#define SKY_TOOLS_SKY_SNAPSHOT_VM_H_
#include "dart/runtime/include/dart_api.h"
void InitDartVM();
Dart_Isolate Cre... | 27,803 |
https://github.com/HellGuy39/HellWeather/blob/master/app/src/main/java/com/hellguy39/hellweather/presentation/activities/main/MainActivityViewModel.kt | Github Open Source | Open Source | Apache-2.0 | 2,022 | HellWeather | HellGuy39 | Kotlin | Code | 322 | 1,470 | package com.hellguy39.hellweather.presentation.activities.main
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.hellguy39.hellweather.domain.models.param.UserLocationParam
import com.hellguy39.hellweather.domain.models.request.OneCallRequ... | 32,073 |
https://github.com/ridewithgps/tracklib/blob/master/ruby_tracklib/.gitignore | Github Open Source | Open Source | Apache-2.0, MIT | 2,022 | tracklib | ridewithgps | Ignore List | Code | 7 | 39 | mkmf.log
tracklib*.gem
target/
.nix-gems/
pkg/
lib/tracklib.so
Gemfile.lock
| 27,712 |
https://github.com/Provokator86/Full-Repo/blob/master/guru/application/controllers/admin/featured_services.php | Github Open Source | Open Source | Apache-2.0 | 2,018 | Full-Repo | Provokator86 | PHP | Code | 486 | 2,977 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Admin Country
* Admin
* View list,
* Add, Edit , Delete.
*
*/
class Featured_services extends MY_Controller {
public function __construct()
{
parent::__construct();
$this->load->model("feat... | 40,080 |
https://github.com/Surfcash/monolith/blob/master/monolith-spigot/src/main/resources/db/migration/V3__create_statistic_table.sql | Github Open Source | Open Source | MIT | 2,020 | monolith | Surfcash | SQL | Code | 23 | 53 | CREATE TABLE statistic
(
player_id TEXT NOT NULL,
statistic TEXT NOT NULL,
value INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (player_id, statistic)
);
| 48,330 |
https://github.com/ChelesteWang/mitosis/blob/master/examples/todo/output/solid/static/writeToDisk.js | Github Open Source | Open Source | MIT | 2,021 | mitosis | ChelesteWang | JavaScript | Code | 27 | 73 | const fs = require("fs");
const server = require(process.argv[2]);
async function write() {
const res = await server({ url: process.argv[4] });
fs.writeFile(process.argv[3], res, () => process.exit(0));
}
write();
| 44,918 |
https://github.com/gzmuSoft/SaPlat/blob/master/SaPlat-service/SaPlat-service-provider/src/main/java/io/jboot/admin/service/provider/RoleResServiceImpl.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | SaPlat | gzmuSoft | Java | Code | 56 | 255 | package io.jboot.admin.service.provider;
import com.jfinal.plugin.activerecord.Db;
import io.jboot.aop.annotation.Bean;
import io.jboot.admin.service.api.RoleResService;
import io.jboot.admin.service.entity.model.RoleRes;
import io.jboot.core.rpc.annotation.JbootrpcService;
import io.jboot.service.JbootServiceBase;
i... | 14,239 |
https://github.com/plutext/xalan-test/blob/master/java/src/org/apache/qetest/NullDatalet.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | xalan-test | plutext | Java | Code | 345 | 642 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you m... | 15,654 |
https://github.com/eriksundin/account-sdk-ios/blob/master/Source/UI/Views/Checkbox.swift | Github Open Source | Open Source | MIT | 2,018 | account-sdk-ios | eriksundin | Swift | Code | 115 | 345 | //
// Copyright 2011 - 2018 Schibsted Products & Technology AS.
// Licensed under the terms of the MIT license. See LICENSE in the project root.
//
class Checkbox: UIButton, Themeable {
var theme: IdentityUITheme?
private var stateColor: UIColor {
guard let theme = self.theme else { return UIColor.red... | 56,692 |
https://github.com/LekanO/limestream/blob/master/database/seeds/QuizesTableSeeder.php | Github Open Source | Open Source | MIT | null | limestream | LekanO | PHP | Code | 98 | 248 | <?php
use App\Quiz;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;
class QuizesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$quizes = array(
['video_id' => 1, 'index' => 0, 'show... | 40,946 |
https://github.com/MacKentoch/react-director-admin-template/blob/master/src/test/__mocks__/sessionStorage.js | Github Open Source | Open Source | MIT | 2,023 | react-director-admin-template | MacKentoch | JavaScript | Code | 66 | 172 | // @flow
// #region singleton store
let store = {};
// #endregion
class SessionStorageMock {
constructor() {
store = {};
}
clear() {
store = {};
}
getItem(key: string) {
return store[key] || null;
}
setItem(key: string, value: string) {
store[key] = value;
}
removeItem(key: strin... | 23,789 |
https://github.com/rhtect/rhtect.github.io/blob/master/themes/next/source/css/_custom/custom.styl | Github Open Source | Open Source | MIT | 2,023 | rhtect.github.io | rhtect | Stylus | Code | 140 | 491 | // Custom styles.
// // 基本样式
// table {
// width: 90%; /*表格宽度*/
// max-width: 65em; /*表格最大宽度,避免表格过宽*/
// border: 1px solid #dedede; /*表格外边框设置*/
// margin: 15px auto; /*外边距*/
// border-collapse: collapse; /*使用单一线条的边框*/
// empty-cells: show; /*单元格无内容依旧绘制边框*/
// }
// table th,
// table td {
// h... | 33,448 |
https://github.com/Aquerr/EagleFactions/blob/master/common/src/main/java/io/github/aquerr/eaglefactions/common/events/FactionDisbandEventImpl.java | Github Open Source | Open Source | MIT | 2,021 | EagleFactions | Aquerr | Java | Code | 121 | 478 | package io.github.aquerr.eaglefactions.common.events;
import io.github.aquerr.eaglefactions.api.entities.Faction;
import io.github.aquerr.eaglefactions.api.events.FactionDisbandEvent;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.event.cause.Cause;
public class FactionDisbandE... | 16,911 |
https://github.com/nickshang/study/blob/master/study/thinkinjava/src/main/java/thinkinjava/typeinfo/pets/Pet.java | Github Open Source | Open Source | Apache-2.0 | null | study | nickshang | Java | Code | 23 | 61 | //: typeinfo/pets/Pet.java
package thinkinjava.typeinfo.pets;
public class Pet extends Individual {
public Pet(String name) { super(name); }
public Pet() { super(); }
} ///:~
| 9,024 |
https://github.com/ada-discovery/ada-app/blob/master/web/app/org/ada/web/controllers/ml/RegressorController.scala | Github Open Source | Open Source | Apache-2.0 | 2,020 | ada-app | ada-discovery | Scala | Code | 591 | 2,693 | package org.ada.web.controllers.ml
import java.util.Date
import javax.inject.Inject
import org.ada.web.controllers.core.AdaCrudControllerImpl
import org.ada.server.dataaccess.RepoTypes._
import play.api.data.Forms.{mapping, optional, _}
import play.api.data.format.Formats._
import play.api.data.{Form, Mapping}
import... | 38,791 |
https://github.com/barjeij/diginspect_portal/blob/master/application/views/diginspect/menu.php | Github Open Source | Open Source | MIT | null | diginspect_portal | barjeij | PHP | Code | 375 | 1,813 | <!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>FDA - Regional Field Office</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php include 'admin/lib.php';?>
<link href="<?php echo base_url().'assets/design.css'?>" rel="stylesheet">
<script src="<?php echo base_url().'... | 40,795 |
https://github.com/OpenNefia/OpenNefia/blob/master/OpenNefia.Content/Book/BookSystem.cs | Github Open Source | Open Source | MIT | 2,022 | OpenNefia | OpenNefia | C# | Code | 247 | 945 | using OpenNefia.Content.EntityGen;
using OpenNefia.Content.Logic;
using OpenNefia.Content.Prototypes;
using OpenNefia.Core.Areas;
using OpenNefia.Core.GameObjects;
using OpenNefia.Core.IoC;
using OpenNefia.Core.Locale;
using OpenNefia.Core.Maps;
using OpenNefia.Core.Random;
using System;
using System.Collections.Gener... | 43,673 |
https://github.com/biunit/PyDAIR/blob/master/casestudies/mouse/results/mouse.ERR849859.cdr3_nucl_len.freq.tsv | Github Open Source | Open Source | MIT | 2,021 | PyDAIR | biunit | TSV | Code | 155 | 488 | nucl_len
0.0 9
3.0 1
4.0 4
5.0 3
6.0 24
7.0 10
8.0 28
9.0 29
10.0 19
11.0 45
12.0 296
13.0 15
14.0 55
15.0 9901
16.0 64
17.0 253
18.0 13749
19.0 137
20.0 300
21.0 18745
22.0 216
23.0 316
24.0 16128
25.0 243
26.0 448
27.0 28217
28.0 286
29.0 743
30.0 36709
31.0 374
32.0 852
33.0 70747
34.0 550
35.0 878
36.0 54374
37.0 ... | 20,157 |
https://github.com/Cle856/PhotoDemon/blob/master/Forms/Effects_Pixelate_Mosaic.frm | Github Open Source | Open Source | BSD-2-Clause | null | PhotoDemon | Cle856 | Visual Basic | Code | 1,720 | 4,065 | VERSION 5.00
Begin VB.Form FormMosaic
BackColor = &H80000005&
BorderStyle = 4 'Fixed ToolWindow
Caption = " Mosaic"
ClientHeight = 6510
ClientLeft = 45
ClientTop = 285
ClientWidth = 12090
BeginProperty Font
Name = "Tahoma"
... | 21,486 |
https://github.com/zhaoyangzhou/NPush/blob/master/IMServer/src/com/push/m/db/DBHelper.java | Github Open Source | Open Source | MIT | 2,018 | NPush | zhaoyangzhou | Java | Code | 302 | 1,098 | package com.push.m.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org... | 13,177 |
https://github.com/dabasov/0chain_sc_parallel/blob/master/code/go/0chain.net/chaincore/chain/magic_block_source.go | Github Open Source | Open Source | BSD-3-Clause, BSD-2-Clause | 2,021 | 0chain_sc_parallel | dabasov | Go | Code | 294 | 880 | package chain
import (
"errors"
"fmt"
"io/ioutil"
"net/url"
"path"
"path/filepath"
"0chain.net/chaincore/block"
"0chain.net/chaincore/httpclientutil"
"0chain.net/core/logging"
"go.uber.org/zap"
)
// The get0DNSMagicBlockEndpoint returns full URL to get MB from a 0DNS server
// giving only server address (... | 30,659 |
https://github.com/rodrigo-speller/atone/blob/master/src/exception/AtoneException.h | Github Open Source | Open Source | MIT | null | atone | rodrigo-speller | C | Code | 56 | 132 | // Copyright (c) Rodrigo Speller. All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
#pragma once
#include "atone.h"
namespace Atone {
class AtoneException : public std::exception {
private:
std::string _what;
public:... | 46,397 |
https://github.com/COMBAT-SARS-COV-2/irida/blob/master/src/main/webapp/resources/js/pages/projects/samples-metadata-import/index.js | Github Open Source | Open Source | Apache-2.0 | null | irida | COMBAT-SARS-COV-2 | JavaScript | Code | 105 | 392 | import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { Provider } from "react-redux";
import { render } from "react-dom";
import { SampleMetadataImportComplete } from "./components/SampleMetadataImportComplete";
import { SampleMetadataImportMapHeaders } from "./components/S... | 56,635 |
https://github.com/mallapuram/voyage-api-dotnet/blob/master/Voyage.Web.UnitTests/Common/BaseUnitTest.cs | Github Open Source | Open Source | Apache-2.0 | 2,021 | voyage-api-dotnet | mallapuram | C# | Code | 126 | 288 | using System;
using System.Threading;
using Moq;
using Ploeh.AutoFixture;
namespace Voyage.Web.UnitTests.Common
{
public abstract class BaseUnitTest : IDisposable
{
#pragma warning disable SA1306 // Field names must begin with lower-case letter
/// <summary>
/// Provides access to a Mock Repo... | 8,768 |
https://github.com/FfeiGithub/Linux/blob/master/syscall/io/read_write.c | Github Open Source | Open Source | Apache-2.0 | 2,020 | Linux | FfeiGithub | C | Code | 86 | 474 | /*
* =====================================================================================
*
* Filename: read_write.c
*
* Description: 文件读写操作
* 阻塞读文件
* 1.read:返回读到字节数,文件尾返回0;出错返回-1
* 返回小于要求读到字节数:
* 普通文件:读到要求字节已达到文件尾.返回剩余字... | 54,756 |
https://github.com/andreasagap/Ionic-Stock-Market/blob/master/testing/platforms/ios/www/js/services.js | Github Open Source | Open Source | Apache-2.0 | null | Ionic-Stock-Market | andreasagap | JavaScript | Code | 873 | 3,564 | angular.module('YourApp.services', [])
.service('modalService', function($ionicModal) {
this.openModal = function (id) {
var _this = this;
if (id == 1) {
$ionicModal.fromTemplateUrl('templates/search.html', {
scope: null,
controller: 'SearchCtrl'
... | 9,822 |
https://github.com/adrianbeloqui/Python/blob/master/char_compression_counter.py | Github Open Source | Open Source | MIT | null | Python | adrianbeloqui | Python | Code | 53 | 187 | #input: "aaaaabbbbccccccaaaaaaa"
#output: "5a4b6c7a"
def string_compression(string):
result_string = ""
if not string:
return result_string
current_char = string[0]
count = 1
for char in xrange(1, len(string)):
if string[char] != current_char:
result_string += str(coun... | 16,795 |
https://github.com/inspur/skyline/blob/master/src/views/network/safeteam/SafeTeamList.vue | Github Open Source | Open Source | MulanPSL-1.0 | 2,021 | skyline | inspur | Vue | Code | 929 | 3,930 | <template>
<div>
<div v-show="mainFlag">
<icos-page-header :title="$t('network.securityTeam')" />
<icos-page>
<icos-search-bar :conditions="searchBar.conditions" :advanced-disabled="roleType !== '0'" @search="handleSearch" />
<el-row>
<el-col :span="24" class="margin-tb5">
<span>... | 34,883 |
https://github.com/FirEmerald/Mechanimation/blob/master/src/main/java/firemerald/mechanimation/blocks/BlockAsphalt.java | Github Open Source | Open Source | MIT | null | Mechanimation | FirEmerald | Java | Code | 30 | 192 | package firemerald.mechanimation.blocks;
import firemerald.mechanimation.init.MechanimationTabs;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
public class BlockAsphalt extends Block
{
public BlockAs... | 22,708 |
https://github.com/StubenCloud/StubenCloud/blob/master/cloud-launcher/src/main/java/eu/pixelstube/cloud/logger/CloudLogger.java | Github Open Source | Open Source | Apache-2.0 | null | StubenCloud | StubenCloud | Java | Code | 356 | 1,469 | package eu.pixelstube.cloud.logger;
import eu.pixelstube.cloud.CloudLauncher;
import eu.pixelstube.cloud.console.Color;
import eu.pixelstube.cloud.console.LogType;
import org.jline.reader.LineReader;
import org.jline.utils.InfoCmp;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardChars... | 41,002 |
https://github.com/libora-com/evalcat/blob/master/evalcat/rbo.py | Github Open Source | Open Source | MIT | null | evalcat | libora-com | Python | Code | 404 | 850 | """
Rank-biased overlap. (RBO)
Implementation of RBO as defined in [1]_.
The current implementation handles uneven lists but not ties.
.. [1] William Webber, Alistair Moffat, and Justin Zobel. 2010. A similarity measure for indefinite rankings.
ACM Trans. Inf. Syst. 28, 4, Article 20 (November 2010), 38 pages. DOI... | 5,677 |
https://github.com/insidegui/flux/blob/master/libc/inc/pack.h | Github Open Source | Open Source | 0BSD | 2,022 | flux | insidegui | C | Code | 223 | 530 | /*
* Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS P... | 43,957 |
https://github.com/smatsus/S5C/blob/master/code/run_S5C.m | Github Open Source | Open Source | MIT | 2,020 | S5C | smatsus | MATLAB | Code | 185 | 526 | % Run S5C algorithm. Lambda is cross-validated in range [2^-1, 2^-2,..., 2^-10].
%
% Param:
% Y: data matrix (each column is a data point)
% A0: labels of each datapoints
% L: number of labels
% numS: number of subsamples
%
% Return:
% clustering_errors: clustering errors for each ... | 10,402 |
https://github.com/ainizecm/shiny.semantic/blob/master/man/getDeps.Rd | Github Open Source | Open Source | MIT | 2,017 | shiny.semantic | ainizecm | R | Code | 54 | 124 | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/semanticPage.R
\name{getDeps}
\alias{getDeps}
\title{Internal function that adds dashboard dependencies to html.}
\usage{
getDeps()
}
\arguments{
\item{content}{Content to which dependencies need to be added.}
}
\value{
Content with appended ... | 34,205 |
https://github.com/MantledIllusion/cotton-flow/blob/master/src/main/java/com/mantledillusion/vaadin/cotton/component/mixin/HasStyleBuilder.java | Github Open Source | Open Source | Apache-2.0 | null | cotton-flow | MantledIllusion | Java | Code | 128 | 366 | package com.mantledillusion.vaadin.cotton.component.mixin;
import com.mantledillusion.vaadin.cotton.component.EntityBuilder;
import com.mantledillusion.vaadin.cotton.component.css.CssStyle;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasStyle;
/**
* {@link EntityBuilder} for {@link H... | 30,486 |
https://github.com/zaqwsx1277/prExample/blob/master/html/search/functions_5.js | Github Open Source | Open Source | MIT | null | prExample | zaqwsx1277 | JavaScript | Code | 5 | 66 | var searchData=
[
['initfirm',['initFirm',['../classpr_example_main_window.html#a4101c3f2b8ee5c1a33b3efc303993b7e',1,'prExampleMainWindow']]]
];
| 51,453 |
https://github.com/DaveCS1/YTMusicUploader/blob/master/Documentation/html/dd/df2/class_y_t_music_uploader_1_1_providers_1_1_request_models_1_1_search_result_1_1_contents.js | Github Open Source | Open Source | MIT | 2,020 | YTMusicUploader | DaveCS1 | JavaScript | Code | 10 | 126 | var class_y_t_music_uploader_1_1_providers_1_1_request_models_1_1_search_result_1_1_contents =
[
[ "tabbedSearchResultsRenderer", "dd/df2/class_y_t_music_uploader_1_1_providers_1_1_request_models_1_1_search_result_1_1_contents.html#a59af5beae2ad223a5d54c51899efc645", null ]
]; | 29,454 |
https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/Examples/GettingStarted/Program.cs | Github Open Source | Open Source | MIT | 2,023 | JsonApiDotNetCore | json-api-dotnet | C# | Code | 190 | 669 | using System.Diagnostics;
using GettingStarted.Data;
using GettingStarted.Models;
using JsonApiDotNetCore.Configuration;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.... | 53,102 |
https://github.com/sidnik007/Billing-Tool/blob/master/src/main/java/com/nelkinda/billingtool/discount/Discount.java | Github Open Source | Open Source | MIT | null | Billing-Tool | sidnik007 | Java | Code | 69 | 225 | package com.nelkinda.billingtool.discount;
import com.nelkinda.billingtool.basket.BasketItem;
import java.math.BigDecimal;
import java.time.Clock;
import java.time.LocalDate;
import java.util.Map;
public abstract class Discount {
protected Clock clock;
protected LocalDate startDate;
protected LocalDate ... | 52,865 |
https://github.com/reactive-senior/danapay-reactnative/blob/master/extensions/shoutem.code-push/app/shared/syncPackage.js | Github Open Source | Open Source | BSD-3-Clause | null | danapay-reactnative | reactive-senior | JavaScript | Code | 147 | 418 | import codePush from 'react-native-code-push';
import { Alert } from 'react-native';
import { I18n } from 'shoutem.i18n';
import { ext } from '../const';
/**
* Calls Code Push sync method to synchronize app package with changes
* deployed on Code Push identified by provided deployment key
* If deployment key is not... | 5,335 |
https://github.com/LeeYouRan/eduonline/blob/master/app/Http/Controllers/Admin/RoleController.php | Github Open Source | Open Source | MIT | 2,018 | eduonline | LeeYouRan | PHP | Code | 93 | 474 | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Model\Auth;
use App\Http\Model\Role;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class RoleController extends Controller
{
//列表
public function index()
{
//1.通过内置分页功能获取数据,每页显示2条
$roles = Role::paginate(2);
... | 51,563 |
https://github.com/julien-faye/drill/blob/master/exec/java-exec/src/test/java/org/apache/drill/exec/udf/dynamic/JarBuilder.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | drill | julien-faye | Java | Code | 387 | 1,028 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 54,539 |
https://github.com/shlomis1/vsa/blob/master/src/scripts/add-vif | Github Open Source | Open Source | Apache-2.0 | 2,013 | vsa | shlomis1 | Shell | Code | 1,403 | 4,557 | #!/bin/bash
# Copyright 2013 Mellanox Technologies, 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 la... | 25,095 |
https://github.com/love4rh/treat-db/blob/master/src/main/java/com/tool4us/treatdb/task/DBTask.java | Github Open Source | Open Source | MIT | 2,021 | treat-db | love4rh | Java | Code | 412 | 1,523 | package com.tool4us.treatdb.task;
import static com.tool4us.common.Util.UT;
import static com.tool4us.db.DatabaseTool.DBTOOL;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import com.tool4us.common.Logs;
import com.... | 33,291 |
https://github.com/UglyToad/PdfPig/blob/master/src/UglyToad.PdfPig/Graphics/Operations/TextState/SetFontAndSize.cs | Github Open Source | Open Source | Apache-2.0, BSD-3-Clause, APAFML | 2,023 | PdfPig | UglyToad | C# | Code | 252 | 575 | namespace UglyToad.PdfPig.Graphics.Operations.TextState
{
using System;
using System.Globalization;
using System.IO;
using Tokens;
using Util.JetBrains.Annotations;
/// <inheritdoc />
/// <summary>
/// Set the font and the font size.
/// Font is the name of a font resource in the ... | 3,391 |
https://github.com/xeske/stashvision/blob/master/stashvision-go/cmd/stashvision.go | Github Open Source | Open Source | MIT | 2,020 | stashvision | xeske | Go | Code | 764 | 2,448 | package main
import (
"encoding/json"
"fmt"
"os"
"strings"
"github.com/celicoo/docli"
"github.com/darvid/stashvision/stashvision-go"
"github.com/imroc/req"
"github.com/jmespath/go-jmespath"
"github.com/shiena/ansicolor"
log "github.com/sirupsen/logrus"
)
func enableVerboseLogging() {
log.SetLevel(log.Debu... | 6,936 |
https://github.com/BPG9/Admin_webapp/blob/master/src/app/containers/Exponaten.js | Github Open Source | Open Source | MIT | null | Admin_webapp | BPG9 | JavaScript | Code | 113 | 362 | /**
* @author Shayan Davarri Fard shayan.davari.fard@stud.tu-darmstadt.de
*
* Exponatenlieste und Edieturzung und Neu Erstellung.
*
*/
import React, { Component } from 'react';
import ListOfRundgangs from '../components/Rundgang/List'
import ExponatErstellen from '../components/Rundgang/New'
import EditExponate... | 48,316 |
https://github.com/jgrenat/elm-ui-explorer/blob/master/examples/dsm/build/elm/Color.elm | Github Open Source | Open Source | MIT | 2,022 | elm-ui-explorer | jgrenat | null | Spoken | 608 | 1,397 | module Theme.Color exposing (Color, color, getColor, getColorName)
import Color as RawColor
type alias ColorStyle =
{ color : RawColor.Color, name : String }
type BrandColor
= Primary ColorStyle
| PrimaryVariant ColorStyle
| Secondary ColorStyle
| SecondaryVariant ColorStyle
| Alternative C... | 43,809 |
https://github.com/matyioe92/SlinkyTyped/blob/master/s/soap/src/main/scala/typingsSlinky/soap/utilsMod.scala | Github Open Source | Open Source | MIT | 2,021 | SlinkyTyped | matyioe92 | Scala | Code | 77 | 349 | package typingsSlinky.soap
import typingsSlinky.soap.anon.Name
import typingsSlinky.soap.anon.Prefix
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
object utilsMod {
@JSI... | 44,965 |
https://github.com/baajarmeh/BurningOKR/blob/master/backend/burning-okr/burning-okr-model/src/main/java/org/burningokr/model/okr/TaskState.java | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,021 | BurningOKR | baajarmeh | Java | Code | 67 | 239 | package org.burningokr.model.okr;
import javax.persistence.*;
import lombok.Data;
import org.burningokr.model.activity.Trackable;
@Entity
@Data
public class TaskState implements Trackable<Long> {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(length = 255)
private String titl... | 46,174 |
https://github.com/superchargejs/framework/blob/master/packages/http/test/middleware/serve-static-assets/fixtures/static-assets.js | Github Open Source | Open Source | MIT | 2,019 | framework | superchargejs | JavaScript | Code | 14 | 42 | 'use strict'
module.exports = {
maxage: 123,
defer: true,
hidden: false,
index: false
}
| 13,414 |
https://github.com/roman-neuhauser/void-packages/blob/master/srcpkgs/element-desktop/files/element-desktop.desktop | Github Open Source | Open Source | BSD-2-Clause | 2,020 | void-packages | roman-neuhauser | null | Spoken | 14 | 68 | [Desktop Entry]
Name=Element
Comment=A feature-rich client for Matrix.org
Exec=element-desktop
Terminal=false
Type=Application
Icon=element
StartupWMClass="Element"
Categories=Network;InstantMessaging;Chat;IRCClient
| 3,005 |
https://github.com/LeeQiuuu/BBWY/blob/master/base-adapter/src/main/java/com/king/base/adapter/AbstractAdapter.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | BBWY | LeeQiuuu | Java | Code | 226 | 669 | /*
Copyright © 2015, 2016 Jenly Yu <a href="mailto:jenly1314@gmail.com">Jenly</a>
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 require... | 45,838 |
https://github.com/imec-idlab/comi-client-openwsn/blob/master/openwsn-fw/bsp/boards/python/bsp_timer_obj.c | Github Open Source | Open Source | BSD-3-Clause | null | comi-client-openwsn | imec-idlab | C | Code | 270 | 1,336 | /**
\brief Python-specific definition of the "bsp_timer" bsp module.
\author Thomas Watteyne <watteyne@eecs.berkeley.edu>, May 2013.
*/
#include <stdio.h>
#include "bsp_timer_obj.h"
//=========================== defines =========================================
//=========================== variables ==============... | 15,538 |
https://github.com/AugustusAraujo/Loja-Vegan/blob/master/src/components/Footer/Footer.js | Github Open Source | Open Source | MIT | 2,022 | Loja-Vegan | AugustusAraujo | JavaScript | Code | 4 | 15 | export default{
name:"Footer",
} | 53,597 |
https://github.com/deepdumbo/2016_super_resolution/blob/master/testSRnet_result.m | Github Open Source | Open Source | MIT | 2,017 | 2016_super_resolution | deepdumbo | MATLAB | Code | 79 | 454 | clear;
%--------resize
img = imread('3.jpg');
img = imresize(img,[668,1000]);% resize for divide 2
img = im2single(img);
[w,h,~] = size(img);
input = imresize(img,1/2);% compress
[w_s,h_s,~] = size(input);
%--------bicubic
tic;
result_bi = imresize(input,2);
toc;
truth = img(7:end-6,7:end-6,:);
result_bi = result_bi(7:... | 22,973 |
https://github.com/Kryspo/L2jRamsheart/blob/master/src/main/java/l2f/gameserver/model/entity/events/actions/TeleportPlayersAction.java | Github Open Source | Open Source | MIT | 2,018 | L2jRamsheart | Kryspo | Java | Code | 32 | 141 | package l2f.gameserver.model.entity.events.actions;
import l2f.gameserver.model.entity.events.EventAction;
import l2f.gameserver.model.entity.events.GlobalEvent;
public class TeleportPlayersAction implements EventAction
{
private String _name;
public TeleportPlayersAction(String name)
{
_name = name;
}
@Over... | 43,687 |
https://github.com/instructure/lti-public-resources-eak/blob/master/tests/unit/libs/return-type-test.js | Github Open Source | Open Source | MIT | 2,016 | lti-public-resources-eak | instructure | JavaScript | Code | 43 | 138 | import Search from 'appkit/libs/return-type';
module('Unit: libs/return-type', {
setup: function() {},
teardown: function() {}
});
//
//test('addReturnTypes when RETURN_TYPES does not include "lti_launch_url"', function() {
// var media = Media.create();
// media.addReturnTypes(data);
//});
//
//test('addReturnT... | 47,370 |
https://github.com/jiadaizhao/LeetCode/blob/master/0701-0800/0769-Max Chunks To Make Sorted/0769-Max Chunks To Make Sorted.py | Github Open Source | Open Source | MIT | 2,022 | LeetCode | jiadaizhao | Python | Code | 31 | 74 | class Solution:
def maxChunksToSorted(self, arr: List[int]) -> int:
maxNum = count = 0
for i, a in enumerate(arr):
maxNum = max(maxNum, a)
if maxNum == i:
count += 1
return count
| 121 |
https://github.com/dprint/dprint-intellij/blob/master/src/main/kotlin/com/dprint/core/LogUtils.kt | Github Open Source | Open Source | MIT | 2,022 | dprint-intellij | dprint | Kotlin | Code | 108 | 379 | package com.dprint.core
import com.dprint.messages.DprintMessage
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.project.Project
import com.intellij.util.messages.MessageBus
object LogUtils {
fun info(message: String, project: Project, logger: Logger) {
logger.info(message)
... | 4,548 |
https://github.com/aws/aws-sdk-go-v2/blob/master/feature/ec2/imds/internal/configtesting/config_test.go | Github Open Source | Open Source | Apache-2.0 | 2,023 | aws-sdk-go-v2 | aws | Go | Code | 48 | 218 | package configtesting
import (
"github.com/aws/aws-sdk-go-v2/config"
imdsconfig "github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config"
)
var _ imdsconfig.EndpointModeResolver = (*config.LoadOptions)(nil)
var _ imdsconfig.EndpointModeResolver = (*config.EnvConfig)(nil)
var _ imdsconfig.EndpointModeResolver ... | 2,754 |
https://github.com/philcockfield/server-methods/blob/master/src/server/middleware.js | Github Open Source | Open Source | MIT, Unlicense | 2,016 | server-methods | philcockfield | JavaScript | Code | 484 | 1,321 | import _ from "lodash";
import fs from "fs";
import fsPath from "path";
import urlUtil from "url";
import bodyParser from "body-parser";
import getManifest from "./manifest";
import docs from "../docs";
import { MANIFEST_PATH, INVOKE } from "../const";
import stylus from "stylus";
import nib from "nib";
const jsonPars... | 2,414 |
https://github.com/teleporthq/teleport-lib-js/blob/master/src/transformers/styles/jsstocss.ts | Github Open Source | Open Source | MIT | 2,019 | teleport-lib-js | teleporthq | TypeScript | Code | 49 | 127 | import jss from 'jss'
import preset from 'jss-preset-default'
jss.setup(preset())
// @todo: check why we use key (does not exist on type rule)
export const generateClassName = (rule: any) => rule.key
export function stylesheet(styles) {
const styleSheet = jss.createStyleSheet(styles, { generateClassName })
retu... | 6,794 |
https://github.com/renyuanceshi/KingKingRE/blob/master/app/src/main/java/smali/org/linphone/KeepAliveManager.smali | Github Open Source | Open Source | Unlicense | null | KingKingRE | renyuanceshi | Smali | Code | 102 | 502 | .class public Lorg/linphone/KeepAliveManager;
.super Landroid/content/BroadcastReceiver;
.source "KeepAliveManager.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 29
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
... | 40,257 |
https://github.com/borisskert/haskell-katas/blob/master/src/Codewars/G964/Commonsubs.hs | Github Open Source | Open Source | BSD-3-Clause | 2,021 | haskell-katas | borisskert | Haskell | Code | 36 | 131 | module Codewars.G964.Commonsubs where
-- https://www.codewars.com/kata/5669a5113c8ebf16ed00004c/train/haskell
import Data.Char (toLower)
import Data.List (isInfixOf)
import Data.List.Split (divvy)
substringTest :: [Char] -> [Char] -> Bool
substringTest s1 =
any (`isInfixOf` map toLower s1)
. divvy 2 1
. ma... | 22,060 |
https://github.com/lpj1986/algorithms/blob/master/src/test/java/win/elegentjs/algorithms/leetcode/AddTwoNumbersTest.java | Github Open Source | Open Source | Apache-2.0 | null | algorithms | lpj1986 | Java | Code | 143 | 481 | package win.elegentjs.algorithms.leetcode;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.junit.Assert.*;
@RunWith(JUnit4.class)
public class AddTwoNumbersTest {
private AddTwoNumbers addTwoNumbers = new AddTwoNumbers();
/... | 21,707 |
https://github.com/Gaon-Choi/ELE3021/blob/master/Week05/assignment4/multithread_practice/Makefile | Github Open Source | Open Source | MIT | null | ELE3021 | Gaon-Choi | Makefile | Code | 8 | 31 | all:
gcc -o multithread_practice multithread_practice.c
clean:
rm multithread_practice
| 43,361 |
https://github.com/dsoumis/BidPoint/blob/master/frontend/src/homeModule/Search.js | Github Open Source | Open Source | MIT | 2,019 | BidPoint | dsoumis | JavaScript | Code | 591 | 2,317 | import React , {useEffect, useState} from 'react';
import './Search.css'
import Item from "./Item";
import history from '../history'
function Search() {
const [search, setSearch] = useState("");
const [category, setCategory] = useState("");
const [value, setValue] = useState("");
const [location, setL... | 38,047 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.