language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C++
UTF-8
8,180
2.53125
3
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
//[ Lambda /////////////////////////////////////////////////////////////////////////////// // Copyright 2008 Eric Niebler. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // This example builds a simple but funct...
Ruby
UTF-8
546
3.03125
3
[]
no_license
require 'minitest/autorun' class QuickSortTest < Minitest::Test def test_simple assert_equal [1,2,3,4,5], quick_sort([2,3,4,5,1]) end def test_repeated_numbers assert_equal [1,1,1,2,2,3], quick_sort([2,2,3,1,1,1]) end def test_negative_numbers assert_equal [-1,2,3,4,5], quick_sort([5,3,2,-1,4])...
C#
UTF-8
7,056
2.59375
3
[ "MIT" ]
permissive
using System.IO; using System.Windows; using Microsoft.Win32; using System.Diagnostics; namespace DragonInjector_Firmware_Tool { public partial class MainWindow : Window { string uf2File; string uf2ShortFile; readonly string defaultUF2File = Directory.GetCurrentDirectory() + "\\default...
PHP
UTF-8
1,919
2.53125
3
[]
no_license
<?php declare(strict_types=1); namespace DoctrineMigrations; use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** * Auto-generated Migration: Please modify to your needs! */ class Version20180516074344 extends AbstractMigration { public function up(Schema $schema) : void { ...
Java
UTF-8
730
2.8125
3
[]
no_license
package autre; import java.util.Scanner; public class Autre { public final static Scanner lire_clavier = new Scanner(System.in); final static String alphabet_grec[] = { "alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "si...
JavaScript
UTF-8
1,864
3.03125
3
[]
no_license
'use strict' let CacheClientFactory = require('./CacheClientFactory'); class Cache { /** * * @param {String} host Host IP address * @param {Integer} port Port used by the cache server * @param {String} vendor 'redis' or 'memcached' */ constructor(host, port, vendor) { this.client = new Ca...
JavaScript
UTF-8
1,546
2.5625
3
[]
no_license
module.exports = function (RED) { const BS = require('node-beacon-scanner'); const scanner = new BS(); let setStatus = (node, scanning, error) => { node.status({ fill: scanning ? "blue" : error ? "red" : "grey", shape: scanning ? "dot" : "ring", text: scanning ? "scanning" : error ? "error" : "stopped" ...
Markdown
UTF-8
732
2.84375
3
[]
no_license
# MVP 1. Users * User registration with validations * Login page for users with validations * User authentication that persists throughout session * Guest User (for demonstration) * Login/Logout functionality * Profile/Profile photo that appears in top right when logged in 2. Upload/Remove File...
C
UTF-8
68,993
3.21875
3
[ "MIT" ]
permissive
#include "gfops.h" #ifdef SLOW //-------------------------------------------------------------------------- // GF(2^8) multiplication modulo x^8 + x^4 + x^3 + x + 1 in constant time //-------------------------------------------------------------------------- uint8_t gfmult( uint8_t h, uint8_t v )...
Python
UTF-8
753
4
4
[ "MIT" ]
permissive
"""https://www.hackerrank.com/challenges/recursive-digit-sum/problem?h_l=interview&playlist_slugs%5B%5D%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D%5B%5D=recursion-backtracking We define super digit of an integer using the following rules: Given an integer, we need to find the super digit of the integer. I...
Java
UTF-8
318
1.953125
2
[]
no_license
package org.fkit.service; import java.util.List; import org.fkit.domain.Cart; public interface CartService { List<Cart> getAll(); Cart findCart(int book_id); Cart saveCart(int book_id); Cart addCart(int book_id); Cart reduceCart(int book_id); Cart removeCart(int book_id); void clearCart(); }
Shell
UTF-8
1,686
2.75
3
[]
no_license
ACI_RESOURCE_GROUP=sonaraci LOCATION=southeastasia ACI_STORAGE_ACCOUNT=sonaraci ACI_FILE_SHARE=sonarqube ACI_SQL_SERVER=sonarqubeaci ACI_SQL_USERNAME=sonar ACI_SQL_PASSWORD='Warhorse!23' az group create -n $ACI_RESOURCE_GROUP --location $LOCATION # Create the storage account for fileshare az storage account create \...
Markdown
UTF-8
39,970
3.375
3
[]
no_license
# 背包问题 [markmap](assets\markmap11.html) 背包问题力扣题目大纲如下: <img src="assets/image-20210513101228972.png" alt="image-20210513101228972" style="zoom:50%;" /> 关于这⼏种常⻅的背包,其关系如下: <img src="assets/image-20210513101109665.png" alt="image-20210513101109665" style="zoom:44%;" /> ## 01 背包 有N件物品和⼀个最多能被重量为W 的背包...
Java
UTF-8
36,623
1.835938
2
[]
no_license
package com.vukapesa.cleandeal; import anywheresoftware.b4a.B4AMenuItem; import android.app.Activity; import android.os.Bundle; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.BALayout; import anywheresoftware.b4a.B4AActivity; import anywheresoftware.b4a.ObjectWrapper; import anywheresoftware.b4a.objects....
C++
UTF-8
2,057
2.84375
3
[]
no_license
#include "colors.h" #include "function.h" bool loadLuaFile(lua_State *L, const char *fileName) { if (luaL_loadfile(L, fileName) || lua_pcall(L, 0, 0, 0)) { printf( "ERROR. Cannot load Lua file '%s': '%s'\n", fileName, lua_tostring(L, -1)); lua_pop(L, 1); ...
Go
UTF-8
2,539
2.53125
3
[ "MIT" ]
permissive
package main import ( "io" "strings" "github.com/jessevdk/go-flags" "github.com/mmktomato/go-twmedia/svc/extcmd" "github.com/mmktomato/go-twmedia/svc/image" "github.com/mmktomato/go-twmedia/svc/tw" "github.com/mmktomato/go-twmedia/svc/video" "github.com/mmktomato/go-twmedia/util" ) var httpClient util.HttpCl...
JavaScript
UTF-8
1,748
3.125
3
[]
no_license
var _newElement = document.getElementById("newElement"); var close = document.getElementsByClassName("close"); var i; for (i = 0; i < close.length; i++) { close[i].onclick = function() { var div = this.parentElement; div.style.display = "none"; } } // Add a "checked" symbol when clicking on a lis...
C#
UTF-8
4,094
2.625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using InterXLib.Display; namespace InterXLib.XGUI.Rendering { class BorderedRenderer : ARenderer { private Rectangle m_UL, m_UR, m_LL, m_LR; ...
Java
UTF-8
821
3.109375
3
[]
no_license
import java.util.Scanner; public class Zombie { public static void main(String[] args) { int numberOfStudents = 29; double avgGPA = 3.78; String name = ""; String job = ""; String alone = ""; boolean gameOver = false; //or true int age = 0; // Create a Scanner objec...
C++
UTF-8
9,440
2.875
3
[ "Apache-2.0" ]
permissive
/** * Author: Mark Larkin * * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson. * * @author Mark Larkin, Conway Institute, UCD. mark.larkin@ucd.ie * * Changes: * * 2007-12-03, Andreas Wilm (UCD): replaced gets with fgets, and * got rid of some compiler warning * */ #ifdef HAVE_CONFIG_H ...
Markdown
UTF-8
6,787
3.21875
3
[]
no_license
## 仿微信「跳一跳」- 1. 简单实现 微信的跳一跳大家应该都玩过吧,玩法很简单,但是各种细节做的很不错。据了解它是使用 three.js 实现的,那么不用 WebGL,使用简单的 2D canvas 能否实现这样的效果呢?我们试试看。 > 部分素材来自网上资源,仅供学习使用,如有问题请与我联系。 ### 1. 初始化项目 我们选用 [Tiny.js](http://tinyjs.net) 这款高效而强劲的 HTML5 2D 游戏引擎来实现整个游戏,那么项目初始化使用 tinyjs-cli 即可,参考文档:http://tinyjs.net/guide/start.html 执行 `tiny init`,选择「标准版」,...
C#
UTF-8
2,535
2.515625
3
[]
no_license
using System.Data; namespace ECM7.Migrator.Framework.Tools { public static class TransformationProviderHiLoExtensions { /// <summary> /// Название служебной таблицы HiLo /// </summary> public const string HI_LO_TABLE_NAME = "hibernate_unique_key"; public const string KEY_FIELD_NAME = "entity_key...
Ruby
UTF-8
722
2.546875
3
[]
no_license
require 'rails_helper' describe Astronaut, type: :model do describe 'Validations' do it { should validate_presence_of :name } it { should validate_presence_of :age } it { should validate_presence_of :job } end describe 'Relationships' do it { should have_many :astronaut_missions} it { should...
Java
UTF-8
1,182
2.28125
2
[]
no_license
package com.flycode.jasonfit.adapter.viewHolder; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.flycode.jasonfit.R; import org.zakariya.stickyheaders.SectioningAdapter; import butterknife.BindView; import butterknif...
JavaScript
UTF-8
2,087
3.796875
4
[]
no_license
function changeVocals (str) { var holder = ''; for(var i = 0; i < str.length; i++){ if(str[i] === 'a'){ holder += 'b'; } else if(str[i] === 'i'){ holder += 'j'; } else if(str[i] === 'u'){ holder += 'v'; } else if(str[i] === 'e'){ ho...
Java
UTF-8
2,086
2.140625
2
[]
no_license
package com.dmg.fish.business.handler.room; import java.io.UnsupportedEncodingException; import com.dmg.fish.business.config.dic.FishRoomDic; import com.dmg.fish.business.logic.FishMsgMgr; import com.dmg.fish.business.model.room.Seat; import com.dmg.gameconfigserverapi.fish.dto.FishRoomDTO; import org.apache.commons....
Java
UTF-8
1,062
2.34375
2
[]
no_license
package fr.soe.a3s.dao; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; public class EncryptionProvider { private stati...
TypeScript
UTF-8
1,324
2.875
3
[]
no_license
import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from "@angular/forms"; @Component({ selector: 'fb-fibonacci', templateUrl: './fibonacci.component.html', styleUrls: ['./fibonacci.component.css'] }) export class FibonacciComponent implements OnInit { answer:string=...
Java
UTF-8
1,268
2.40625
2
[]
no_license
package com.sam_chordas.android.stockhawk.service; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; /** * Created by PriyamSaikia on 25-05-2016. */ public class Parser { public Parser() { } public ArrayList<HistoryStockBean> getHistoryDa...
Python
UTF-8
1,153
2.96875
3
[]
no_license
import keras from keras.datasets import fashion_mnist from keras.models import load_model from keras import backend as K # Data dimensions. Images are 28x28 pixels, and the number of classes is 10. image_rows, image_columns = 28, 28 number_of_classes = 10 # Load test dataset from Fashion MNIST and prepare it. _, (x...
Markdown
UTF-8
4,022
2.671875
3
[]
no_license
--- description: "Steps to Prepare Quick Smoked salmon sandwich" title: "Steps to Prepare Quick Smoked salmon sandwich" slug: 1725-steps-to-prepare-quick-smoked-salmon-sandwich date: 2020-07-27T05:32:40.875Z image: https://img-global.cpcdn.com/recipes/d6e1790785ca6333/751x532cq70/smoked-salmon-sandwich-recipe-main-phot...
Java
UTF-8
584
2.03125
2
[]
no_license
package interview_questions; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Sample5 { public static void main(String[] args) { System.setProperty("webdriver...
Java
UTF-8
3,453
2.21875
2
[]
no_license
package com.example.rex.homework3_2; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationU...
PHP
UTF-8
2,872
2.96875
3
[]
no_license
<?php declare(strict_types=1); namespace app\services\Payment; use app\exceptions\ApiException; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use Psr\Http\Message\ResponseInterface; /** * Class JsonApiMtsPaymentSystem * @package app\services\Payment */ class JsonApiMtsPaymentSystem implements P...
C
UTF-8
4,544
3
3
[]
no_license
/* * COPYRIGHT NOTICE * Copyright (C) 2015, Jhuster, All Rights Reserved * Author: Jhuster(lujun.hust@gmail.com) * * https://github.com/Jhuster/TLV * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the...
C#
UTF-8
2,625
3.28125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using _106_Classwork8; namespace _106_Quiz7 { public static class ShapeType //靜態類別, 不能被實體化 (new) { public enum Geo //使用 enum 增加程式的可讀性 { UNKNOWN = -1, BALL = ...
JavaScript
UTF-8
323
2.90625
3
[]
no_license
module.exports.reversePlusOne = function(array) { var resArray = array.reverse(); resArray.unshift(1); return resArray; }; module.exports.plusesEverywhere = function(array) { var resArray = array.join("+"); return resArray; }; module.exports.arrayQuantityPlusOne = function(array) { return array.length + 1...
Python
UTF-8
657
3.8125
4
[]
no_license
# 기본적으로 N제곱의 효율성 but 거의 정렬되있는 상태의 경우 최선은 N의 효율성을 가진다. array = [7, 5, 9, 0, 3, 1, 6, 2, 4, 8] for i in range(1, len(array)): for j in range(i, 0, -1): # 현재위치부터 첫번째 위치까지 돌면서 넣을 위치 찾아서 정렬 if array[j] < array[j-1]: # 만약 다음항이 전항보다 크다면 print(array[j], "<", array[j-1]) print(...
Java
UTF-8
2,642
2.453125
2
[]
no_license
package com.kuanguang.huiyun.http; import android.content.Context; import android.os.Handler; import android.os.Message; import okhttp3.Call; import okhttp3.Response; /** * ================================================ * 作 者:廖子尧 * 版 本:1.0 * 创建日期:2016/1/14 * 描 述:默认将返回的数据解析成需要的Bean,可以是 BaseBean,String...
Markdown
UTF-8
3,280
2.9375
3
[]
no_license
--- title: Crypto - Steroid Stream description: 2021 | PBCTF | Crypto --- ## 题目 I found a weird stream cipher scheme. Can you break this? [CTFtime.org / pbctf 2021 / Steroid Stream](https://ctftime.org/task/17579) ## 解题思路 - [Alkaloid Stream](alkaloid_stream.md) 进阶版,除了 `fake` 数组的产生方式有所差异,其他部分都是一样的 ```py fak...
Go
UTF-8
244
3.34375
3
[ "MIT" ]
permissive
package sorting func InsertionSort(s []int) []int { c := make([]int, len(s)) copy(c, s) l := len(s) for i := 1; i < l; i++ { j := i temp := c[i] for j > 0 && (c[j-1] > temp) { c[j] = c[j-1] j-- } c[j] = temp } return c }
PHP
UTF-8
4,273
2.75
3
[]
no_license
<?php declare(strict_types=1); namespace OCA\GPodderSync\Core\EpisodeAction; use DateTimeZone; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; use OCA\GPodderSync\Db\EpisodeAction\EpisodeActionEntity; use OCA\GPodderSync\Db\EpisodeAction\EpisodeActionRepository; use OCA\GPodderSync\Db\EpisodeAction\Ep...
C++
UTF-8
1,200
2.65625
3
[ "Zlib" ]
permissive
// Project: libv.math, File: src/libv/noise/white.cpp // hpp #include <libv/noise/white.hpp> // libv #include <libv/utility/random/uniform_distribution.hpp> // std #include <random> namespace libv { // ------------------------------------------------------------------------------------------------- //std::vector<d...
Markdown
UTF-8
13,578
2.890625
3
[]
no_license
# capacitacion-problema1 # Ejercicio 1 Capacitación: Git, bash y docker Integrantes: - Rafael Montoya - Daniela Tizón - Claudia Valdivieso --- 1. ¿Qué importancia tiene los tags en un proyecto? - Para el versionamiento de mi código :D 2. ¿Cuál es la diferencia entre un tag normal y un tag anotado en git? - En ...
Java
UTF-8
1,336
2.171875
2
[]
no_license
package com.cards.payment.service; import com.cards.payment.client.CardClient; import com.cards.payment.dto.GetCardInfoResponse; import com.cards.payment.entity.Payment; import com.cards.payment.exception.CardIsNotActiveException; import com.cards.payment.exception.CardNotFoundException; import com.cards.payment.excep...
PHP
UTF-8
1,235
2.59375
3
[ "MIT" ]
permissive
<?php namespace YaoiTests\PHPUnit\Sql; use Yaoi; class InsertTest extends \YaoiTests\PHPUnit\Sql\TestBase { public function testSingleRow() { $statement = Yaoi\Database::getInstance('test_mysqli')->statement(); $statement->insert('table') ->valuesRow(array('a' => 1, 'b' => 2)) ...
C#
UTF-8
1,492
2.71875
3
[ "MIT" ]
permissive
using System.Collections.Generic; using System.Linq; using AutoMapper; using Competitions.Models; using Tennis.Mappers; using Tennis.ViewModels.Competitions; namespace Tennis.WebApp.Mappers { /// <summary> /// This represents the mapper entity between <see cref="TeamAddViewModel"/> and <see cref="TeamModel...
TypeScript
UTF-8
730
3
3
[]
no_license
export interface iPostion { title: string, salary: number, expPerClick: number, btnText: string, altText: string requirements: { int?: number, dex?: number, char?: number, perc?: number, karma?: number, creativity?: number, } } export default class Position { title: string; re...
C++
UTF-8
3,987
2.6875
3
[]
no_license
#ifdef _WIN32 #define UVA_API_EXPORT __declspec(dllexport) #else #define __cdecl #define UVA_API_EXPORT #endif #include "u10150.h" #include <iostream> #include <iomanip> #include <map> #include <vector> #include <string> #include <algorithm> #include <iterator> #include <numeric> #include <limits> #includ...
Markdown
UTF-8
10,750
2.859375
3
[ "BSD-2-Clause" ]
permissive
--- title: 'CFD Notebooks: Learning OpenFOAM for HPC' tags: - Python - CFD - OpenFOAM - numerical methods - finite differences authors: - name: Ajay B. Harish orcid: 0000-0001-5234-7047 affiliation: "1, 2" - name: Sanjay Govindjee orcid: 0000-0003-0711-3633 affiliation: "1, 2" - name: Frank McKenna affiliatio...
Java
UTF-8
3,015
2.046875
2
[]
no_license
package com.rebolt.ark.popularmoviesone.content; import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; import android.provider.BaseColumns; /** ...
C++
UTF-8
1,426
2.859375
3
[]
no_license
// // Created by ita on 14/09/17. // #ifndef BLOODBOND_CHARACTER_H #define BLOODBOND_CHARACTER_H #include <SFML/Graphics/RenderWindow.hpp> #include "Weapon.h" #include "Medicine.h" #include "Window.h" class Character { public: Character(const Character& original); explicit Character(int h, int x=0, int y=0, W...
Java
UTF-8
2,345
1.921875
2
[]
no_license
package com.qinjiangbo.gen.model; import java.io.Serializable; public class RegsatDateCenterDet extends RegsatDateCenterDetKey implements Serializable { /** * This field was generated by MyBatis Generator. * This field corresponds to the database column regsat_date_center_det.cent_code * * @mb...
Shell
UTF-8
1,441
3.296875
3
[]
no_license
#!/bin/bash #set -x FIRST_REALLOC=1379128 BLOCK_TIME=2.625 SUPER_BLOCK_CYCLE=16616 HALVING_INTERVAL=210240 FIRST_REWARD_BLOCK=1261441 HALVING_REDUCTION_AMOUNT="1/14" STARTING_BLOCK_REWARD=1.44236248 REALLOC_AMOUNT=(513 526 533 540 546 552 557 562 567 572 577 582 585 588 591 594 597 599 600) current_block=$(dash-cli ...
C#
UTF-8
208
2.59375
3
[]
no_license
using System; class Welcome { static void Main() { Console.WriteLine("Please enter your name:"); Console.ReadLine(); Console.WriteLine("Welcome aboard, captain."); } }
Markdown
UTF-8
887
2.859375
3
[]
no_license
## 项目说明 该项目是对 `chatterbot` 的一些使用和试验,**不成熟项目,不可用于线上环境**。 ## 外部依赖 pip依赖:见 `requirements.txt` ## 功能 ### 基于脚本的chatterbot #### 脚本 `main.py` #### 运行 ```bash python3 ./main.py ``` ### 基于Django的chatterbot 项目位于 `django_app/` ,下面的操作都是在这个目录中进行的。 #### 准备 ##### 安装Django ```bash pip install django ``` ##### 同步数据库 ```bash python ...
JavaScript
UTF-8
2,359
3.015625
3
[]
no_license
'use strict' /** * route 模块,存放管理path值一定时的method和callback的关系数组 */ const debug = require('debug')('express:router:route') const Layer = require('./layer') let methods = require('http').METHODS const flatten = require('array-flatten').flatten const slice = Array.prototype.slice const toString = Object.prototype.toStri...
PHP
UTF-8
9,163
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\API; use App\Http\Requests\API\CreateFeatureTypeAPIRequest; use App\Http\Requests\API\UpdateFeatureTypeAPIRequest; use App\Models\FeatureType; use App\Repositories\FeatureTypeRepository; use Illuminate\Http\Request; use App\Http\Controllers\AppBaseController; use Response; /** *...
Java
UTF-8
1,274
2.828125
3
[]
no_license
package core.Kits; import java.util.ArrayList; import java.util.HashMap; import java.util.UUID; public class KitLockManager { private static HashMap<UUID, Boolean> canEquip = new HashMap<UUID, Boolean>(); private static ArrayList<UUID> singleEquipees = new ArrayList<UUID>(); private static ArrayList<UUID> burnedEq...
JavaScript
UTF-8
1,790
2.765625
3
[]
no_license
const Product = require("../models/Products"); const { isValidObjectId } = require("mongoose"); // create a new product exports.createProduct = async (req, res, next) => { const newProduct = new Product(req.body); try { const product = await newProduct.save(); res.status(201).json({ message: "Product...
Python
UTF-8
1,421
3.09375
3
[]
no_license
from graficos import grafico_boxplot path_in = "experimentos/experimento_1_memoria/memoria_{0}_{1}_{2}.txt" path_in_sin_truco = "experimentos/experimento_1_memoria/memoria_sintruco_{0}_{1}_{2}.txt" label = "{0} con valor k={1} de PCA" rango = [1] + list(range(5, 20, 5)) modo = ["big", "red"] PCAS = ["PCA", "PCA_peso...
JavaScript
UTF-8
124
2.6875
3
[]
no_license
function circleOfNumbers(n, firstNumber) { return n / 2 + firstNumber >= n ? firstNumber - n / 2 : n / 2 + firstNumber; }
Java
UTF-8
608
1.820313
2
[]
no_license
package br.com.eventoadmin.mb; import java.io.Serializable; import com.xpert.core.crud.AbstractBaseBean; import javax.ejb.EJB; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import br.com.eventoadmin.bo.SedeBO; import br.com.eventoadmin.modelo.sede.Sede; /** * * @author Joao Pedro */ @Ma...
Java
UTF-8
3,773
2.140625
2
[]
no_license
package com.restkeeper.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.restkeeper.entity.*; import com.restkeeper.mapper.*; import com.restkeeper.service.OrderHistoryService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Aut...
Java
UTF-8
5,580
1.757813
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2018 Broadband Forum * * 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...
Java
UTF-8
1,651
2.875
3
[]
no_license
package br.com.professorisidro.isilanguage.main; import br.com.professorisidro.isilanguage.exceptions.IsiSemanticException; import br.com.professorisidro.isilanguage.exceptions.IsiTypeException; import br.com.professorisidro.isilanguage.parser.IsiLangLexer; import br.com.professorisidro.isilanguage.parser.IsiLangParse...
Python
UTF-8
5,495
3.375
3
[ "Apache-2.0" ]
permissive
''' Polygon As Line Tool for Text Extractor --------------------------------------- This module provides a function to extract panoptes annotations from projects using a polygon tool to mark words in a transcribed document and provide the transcribed text as a sub-task. ''' from collections import OrderedDict import co...
C#
UTF-8
1,728
3.203125
3
[]
no_license
using System; using System.Security.Cryptography; using Rij; namespace CommandChecker { public class Checker { //encryption class RijAlgo rij = new RijAlgo(); string output_file_name = "Default_Encrypted.txt"; private void encrypt_with_flags_check(string[] command_params,AesManaged aes) ...
Markdown
UTF-8
6,869
3.234375
3
[]
no_license
### Goal Implement a database design and architecture of a restaurant booking system for web and mobile. ### Assumption & Scope - Neet to manage a restaurant - A restaurant have many branchs with different location - Need to manage open hour of a branch - Need to manage table of a branch - Need to manage reservations...
Java
UTF-8
349
1.507813
2
[]
no_license
package com.house.variety.modules.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.house.variety.modules.system.entity.SysUserOnline; /** * <p> * 在线用户记录 Mapper 接口 * </p> * * @author HuangChao * @since 2018-08-27 */ public interface SysUserOnlineMapper extends BaseMapper<SysUser...
C#
UTF-8
943
3.53125
4
[]
no_license
/****************************************************************************** fibonacci 1. *******************************************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace fibonacci { c...
Ruby
UTF-8
368
2.515625
3
[]
no_license
class Route < ActiveRecord::Base has_many :route_stops has_many :bus_stops, through: :route_stops scope :most_stops, ->() { order("number_of_stops DESC") } class << self def least_stops select('routes.*, COUNT(bus_stops.id) AS bus_stop_count'). joins(:bus_stops). group('routes.id'). ...
Markdown
UTF-8
68,813
3.4375
3
[ "MIT" ]
permissive
# I. Tổng quan ## 1. Kubernetes là gì Kubernetes là một nền tảng mã nguồn mở giúp tự động triển khai, mở rộng và vận hành các app Container trên các nhóm máy chủ, cung cấp cơ sở hạ tầng tập trung vào container. ### Tại sao lại dùng containers ![](https://kubernetes.io/images/docs/why_containers.svg) Cách cũ để triển ...
C++
UTF-8
475
3.03125
3
[]
no_license
#include <simplecpp> void zigOne() { repeat(5) { cout << "* "; } cout << "\n"; } void zigTwo () { cout << " "; repeat(5) { cout << "* "; } cout << "\n"; } int main() { int n; //cout << "Plea...
Python
UTF-8
1,136
4.1875
4
[]
no_license
""" coding: utf8 @time: 2021/1/25 0:11 @author: cjr @file: 830. 单调栈.py 给定一个长度为N的整数数列,输出每个数左边第一个比它小的数,如果不存在则输出-1。 输入格式 第一行包含整数N,表示数列长度。 第二行包含N个整数,表示整数数列。 输出格式 共一行,包含N个整数,其中第i个数表示第i个数的左边第一个比它小的数,如果不存在则输出-1。 数据范围 1≤N≤105 1≤数列中元素≤109 输入样例: 5 3 4 2 7 5 输出样例: -1 3 -1 2 2 """ # 主要思想就是,依次求每个元素的前面第一个比它小的元素 # 那么只要保证栈(tmp)中的...
Java
UTF-8
5,015
2.765625
3
[]
no_license
import java.awt.BorderLayout; import java.awt.Container; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Observable; import java.util.*; // For Observer import javax.swing.BorderFactory; import javax.swing.Def...
TypeScript
UTF-8
1,413
2.703125
3
[]
no_license
import {Serializable, prop} from './serializable'; export class Tracker extends Serializable { // Whether or not to send stats about the pieces downloaded and uploaded from // each peer to the tracker. @prop('send_stats') sendStats: boolean; // Whether or not the connection to the tracker is secure and the id...
JavaScript
UTF-8
2,977
2.609375
3
[ "MIT" ]
permissive
import { flatMap, isEqual } from 'lodash'; import axios from 'axios'; import boxen from 'boxen'; import chalk from 'chalk'; import debug from 'debug'; import path from 'path'; const log = debug('mup:updates'); const SKIP_CHECK_UPDATE = process.env.MUP_SKIP_UPDATE_CHECK === 'true'; function parseVersion(version) {...
C#
UTF-8
2,792
2.796875
3
[]
no_license
using System; using System.Net; using System.Threading.Tasks; using System.Windows.Controls; namespace MinerT.kungfuactiongrip.com { public class Logger { private readonly TextBox _logTo; private readonly ScrollViewer _scroller; private readonly double _origHeight; private int...
JavaScript
UTF-8
1,515
2.625
3
[]
no_license
const axios = require('axios-no-proxy') const stationIP = '192.168.1.11'; const urlHeartBeatResponse = `http://${stationIP}:8084/heartBeat` const urlDockDoorResponse = `http://${stationIP}:8084/tagsData` const fs = require('fs') var count = 0; function sendHeartBeat(){ count = count + 1; let config = {headers: {...
C++
UTF-8
552
2.671875
3
[]
no_license
// // // #include "FeederServo.h" int delay_time = 500; VarSpeedServo my_servo; void FeederServo::run() { my_servo.attach(servoPin); my_servo.write(180, 255, true); delay(delay_time); my_servo.write(0, 30, true); delay(delay_time); my_servo.detach(); } void FeederServo::open() { my_servo.attach(servoPin);...
PHP
UTF-8
3,774
2.75
3
[]
no_license
<?php require_once __DIR__ . "/config.php"; use EtecAB\Dao\AvaliadorDao; $avaliadorDao = new AvaliadorDao($dbh); $avaliadores = $avaliadorDao->fetchAll(); use EtecAB\Dao\EventoDao; $eventoDao = new EventoDao($dbh); $eventos = $eventoDao->fetchAll(); use EtecAB\Dao\InscritoDao; $inscritoDao = new InscritoDao($dbh)...
C++
UTF-8
1,953
3.125
3
[]
no_license
#include "filehandler/PathManager.hpp" #include <iostream> #include <string> namespace filehandler { PathManager::PathManager() { std::cout << "Loading files\n"; } PathManager::~PathManager() { } std::list<std::string> PathManager::getInputFileList() const { namespace fs = boost::filesystem; typedef fs...
Markdown
UTF-8
2,636
3.546875
4
[ "MIT" ]
permissive
#@media A diretiva @media funciona no Sass da mesma forma que funciona no CSS, porém há possibilidade de encaixá-las em regras CSS, desta forma é possível declarar dentro do seletor qual será o comportamento dele de acordo com cada @media. Exemplo: ``` .sidebar { width: 30%; @media screen and (orientation: land...
Ruby
UTF-8
1,855
3.859375
4
[]
no_license
# O(n!) factorial def first_anagram?(anagram, word) anagrams(anagram).include?(word) end def anagrams(word) return [word] if word.length <= 1 first = word[0] perm_anagrams = anagrams(word[1..-1]) all_anagrams = [] perm_anagrams.each do |perm| (0..perm.length).each do |idx| all_anagrams << perm[0....
C
UTF-8
1,498
2.734375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_print_lst.c :+: :+: :+: ...
Go
UTF-8
880
3.640625
4
[]
no_license
package main import "fmt" func main() { fmt.Println(majorityElement([]int{3, 3, 4})) } //给定一个大小为 n 的数组,找到其中的众数。众数是指在数组中出现次数大于 ⌊ n/2 ⌋ 的元素。 // //你可以假设数组是非空的,并且给定的数组总是存在众数。 //majority-element //func majorityElement(nums []int) int { // result := make(map[int]int, 0) // for _, num := range nums { // if _, ok := resul...
Swift
UTF-8
938
2.796875
3
[ "Apache-2.0" ]
permissive
// // Drafts.swift // Slide for Reddit // // Created by Carlos Crane on 1/22/17. // Copyright © 2017 Haptic Apps. All rights reserved. // import UIKit class Drafts { public static var drafts: [NSString] = [] public static func addDraft(s: String) { for draft in drafts { if String(...
Markdown
UTF-8
20,069
2.546875
3
[]
no_license
# RA_BLOS_Umich # BICYCLIST PERCEIVED LEVEL OF TRAFFIC STRESS: A QUALITY OF SERVICE MEASURE #### Author: Charlene Mingus, Georgia Institute of Technology, May 2015 #### Feb. 4, 2019 #### Draft Review # Contents - [Introduction](#introduction) - [Research Background](#research-background) - [Bicyclist-Typolog...
PHP
UTF-8
1,005
2.59375
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); /** * Test project. * @license http://www.spdx.org/licenses/MIT MIT License */ namespace ChainCommandBundle\EventListener; use ChainCommandBundle\Console\ChainManager; use Symfony\Component\Console\Event\ConsoleTerminateEvent; /** * Terminate listener for manage command chain...
Markdown
UTF-8
1,939
3.375
3
[]
no_license
# react-basic-slider A slider with basic markup, easy to style. ## Demo http://alexjoffroy.github.io/react-basic-slider/example/ ## Usage ### Install (not yet) ``` npm install --save react-basic-slider ``` ### Properties | Property | Type | Description | Default value | Required | | ------...
Shell
UTF-8
2,777
3.890625
4
[ "CC0-1.0" ]
permissive
#!/bin/bash CDIR=`dirname ${0}` cd ${CDIR}/ CONF_FILE='ctrl_aircleaner_config.txt' ALERT_FILE='../logging/logs/kafun_alert.txt' LOG_FILE=logs_aircleaner/log_`date +"%Y%m%d"`.txt NOW=`date +"%Y-%m-%dT%T"` NOW_DATE=`date +"%Y-%m-%d"` NOW_UNIXTIME=`date +%s` RETRY_TIME=45 #sec #check today is holiday(sat,sun,national ...
Java
UTF-8
165
2.109375
2
[]
no_license
package zillowdata; public class ZillowID { private String zID; public ZillowID(){ //do Http Get to get zpid } public String getID(){ return zID; } }
Java
UTF-8
2,357
2.40625
2
[]
no_license
package com.groth.android.videotoserver.buttonBar; import android.content.Context; import android.view.View; import com.groth.android.videotoserver.ConnectionServiceListeners; import com.groth.android.videotoserver.connection.ConnectionHandler; import com.groth.android.videotoserver.connection.ssh.ServerCommand; imp...
C++
UTF-8
925
2.578125
3
[]
no_license
#include "Distance.h" Distance::Distance(): _proximityThreshold(DEFAULT_THRESHOLD), _hysteresis(DEFAULT_HYSTERESIS), _isWithinRange(false) { } uint8_t Distance::Init() { return begin(); } uint16_t Distance::GetDistance() { update(); return _distance; } bool Distance::IsWithinThreshold() { ...
Python
UTF-8
2,487
2.625
3
[]
no_license
import numpy as np import librosa from librosa import display import pyaudio as pa import wave import scipy.io.wavfile as sciwavf import matplotlib.pyplot as plt import struct """ Basic wav file i/o """ def record(filename, time = 5, rate = 22050, chunk = 1024): CHUNK = chunk FORMAT = pa.paInt16 CHAN...
Java
UTF-8
3,030
2.8125
3
[]
no_license
package ch.uzh.ifi.rerg.se16_climeter.client.filter; import java.util.Date; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.dom.client.MouseUpEvent; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google....
Markdown
UTF-8
754
2.703125
3
[]
no_license
Phpass Starter is an easy way to learn more about and get started with [Phpass](http://www.openwall.com/phpass/). The purpose of this project is to get more developers to move away from functions such as `md5();` that weren't meant for password hashing. Using proper password encryption techniques is now easier thanks ...
Python
UTF-8
284
2.84375
3
[]
no_license
from abc import ABCMeta, abstractmethod class StudentVisitor(metaclass=ABCMeta): @abstractmethod def startVisit(self): pass @abstractmethod def visitStudent(self, number, student): pass @abstractmethod def finishVisit(self): pass
JavaScript
UTF-8
1,319
2.8125
3
[ "MIT" ]
permissive
const { default: axios } = require('axios'); const moment = require('moment') const Horoscope = class { constructor(data) { this.sign = data.sign; this.rank = data.rank; this.total = data.total; this.content = data.content; this.item = data.item; this.color = data.color; this.m...