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
Java
UTF-8
1,253
3.171875
3
[]
no_license
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Enumeration; /* * * Fragment kodu zrodlowego * public class JDBC implements Driver { public static final String PREFIX = "jdbc:sqlite:"; static { try { DriverManager.registerDrive...
TypeScript
UTF-8
4,139
2.859375
3
[]
no_license
import { Produccion } from "../analisis/Produccion"; import { Termino } from "../analisis/Termino"; import { NoTerminal } from "./NoTerminal"; export class PrimerosCalculator { private prodInicial: string; private producciones: Array<Produccion>; private noTerminalsTable: Array<NoTerminal>; construct...
C#
UTF-8
3,190
2.84375
3
[]
no_license
using System; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Confluent.Kafka; using Microsoft.Extensions.DependencyInjection; using Kafka.Public; using Kafka.Public.Loggers; using System.Text; namespace SimpleHostedService { clas...
Python
UTF-8
185
3.140625
3
[]
no_license
names = ['marlon', 'Karla', 'Ursula'] print(f'Invite to dinner with me {names[0].title()}') print(f'Invite to dinner with me {names[1]}') print(f'Invite to dinner with me {names[2]}')
C++
UTF-8
2,393
3.671875
4
[]
no_license
#include <iostream> #include "Deck.h" #include "Card.h" using namespace std; int main() { srand(time(NULL)); // randomizes the seed for rand() function int userChoice = 0; Deck deck; while (userChoice != 5){ cout << endl << "Welcome to Solitaire Prime!\n" << "1) New Deck\n" ...
TypeScript
UTF-8
2,750
2.515625
3
[ "Apache-2.0" ]
permissive
import { BaseURL } from '../../../Common/Roblox.Common/BaseUrl'; import { HttpClientInvoker } from '../../../Http/HttpClientInvoker/Roblox.Http.HttpClientInvoker/Implementation/HttpClientInvoker'; import { HttpRequestMethodEnum } from '../../../Http/Roblox.Http/Enumeration/HttpRequestMethodEnum'; import { Task } from '...
Python
UTF-8
1,292
4.09375
4
[]
no_license
'''exercise 10.8 birthday paradox''' from random import randint #returns true if a list has duplicate items in it , else false def has_duplicates(_list): for item in _list: if _list.count(item) > 1: return True return False #generates a class of 23 students with their birthdays as elements def generate_c...
Shell
UTF-8
869
3.625
4
[]
no_license
#!/bin/sh -x CURRENT_DIR=$(dirname "$0") WORKING_DIR="$(dirname "$CURRENT_DIR")" CLASSPATH="$WORKING_DIR/lib/*:$WORKING_DIR/bin" # get java if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then JAVACMD="$JAVA_HOME/bin/java" else JAVACMD="$(command -v java)" fi fi for src in "$@" do dir=$(dirname...
Markdown
UTF-8
3,205
2.90625
3
[]
no_license
--- ID: 21353 post_title: > 5 reasons why your Dark Spot cream is not working like you thought it would. author: CureSkin staff post_excerpt: "" layout: post permalink: > https://cureskin.com/5-reasons-why-your-dark-spot-cream-is-not-working-like-you-thought-it-would/ published: true post_date: 2019-02-01 06:55:5...
Java
UTF-8
1,741
2.625
3
[]
no_license
package socs.network.node; import socs.network.util.Configuration; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Socket; import java....
PHP
UTF-8
695
2.765625
3
[]
no_license
<?php require('./db/db_connect.php'); function password_check($password,$pdo){ $today = date("Y-m-d"); $req = $pdo->query("SELECT count,date FROM pass_count WHERE date='$today'"); $req->bindColumn(1, $count); if(!$req->fetch(PDO::FETCH_BOUND)){ $pdo->query("INSERT INTO pass_count (count,date)...
Python
UTF-8
3,423
3.078125
3
[]
no_license
import numpy as np MAX_PIXEL_CONSTANT = 255.0 BLUE_INDEX = 0 GREEN_INDEX = 1 RED_INDEX = 2 def d_max(bgr): hsv = np.array([0.0, 0.0, 0.0]) red = bgr[RED_INDEX] / MAX_PIXEL_CONSTANT blue = bgr[BLUE_INDEX] / MAX_PIXEL_CONSTANT green = bgr[GREEN_INDEX] / MAX_PIXEL_CONSTANT hsv[2] = max(red, blue, gre...
JavaScript
UTF-8
362
4.34375
4
[ "MIT" ]
permissive
const arr = [1,2,3,4,5] function map(arr) { const newArr = []; for(let i = 0; i < arr.length; i++) { newArr.push([arr[i] * i, arr])//what you want } return newArr } //what we made const mappedValue = arr.map((v, i, arr) => { return [v * i, arr] }) console.log(mappedValue) const functionV...
Java
UTF-8
2,658
2.96875
3
[]
no_license
package methodEmbedding.Cookie_Clicker_Alpha.S.LYD67; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.*; import java.util.StringTokenizer; /** * * @author Hemang Jangle */ public class CookieClicker { static BufferedReader in; static Prin...
Java
UTF-8
2,680
1.960938
2
[ "MIT" ]
permissive
package com.dyteam.testApps.webserver.controller; import java.util.Map; import com.dyteam.testApps.webserver.entity.ApplicationPaths; import com.dyteam.testApps.webserver.entity.EmailConfigurations; import com.dyteam.testApps.webserver.repository.ApplicationPathsRepository; import com.dyteam.testApps.webserver.reposi...
JavaScript
UTF-8
224
3.484375
3
[]
no_license
// Task #5 function reverseNumber(a) { let arr = '' + Math.abs(a); let num = ''; for(let i = arr.length - 1; i >= 0; i--) { num += arr[i]; } return a < 0 ? -num : +num; } reverseNumber(-456);
C
UTF-8
720
3.5625
4
[]
no_license
#include <stdio.h> void error_message(void); int get_month(void); void error_message(void){ printf("入力ミスです!\n"); } int get_month(void){ int month; do{ printf("月:"); scanf("%d",&month); if(month<1||month>12) error_message(); }while(month<1||month>12); return month; } int main(){ int birt...
Markdown
UTF-8
20,589
2.921875
3
[]
no_license
Chaincode for Developers ======================== What is Chaincode? ------------------ Chaincode is a program, written in [Go](https://golang.org), [node.js](https://nodejs.org), that implements a prescribed interface. Eventually, other programming languages such as Java, will be supported. Chaincode runs in a secur...
C
UTF-8
1,410
3.546875
4
[]
no_license
#include <stdio.h> #define MAGICR 5 #define MAGICC 5 int main() { int magic[MAGICR][MAGICC] = {{17,24,1,8,15}, {23,5,7,14,16}, {4,6,13,20,22}, {10,12,19,21,3}, {11,18,25,2,9}}; int i,j; //print out the table for ( i = 0; i < 5; i++) { for ( j = 0; j < 5; j++) { if (j!=4)...
C++
UTF-8
1,035
2.8125
3
[]
no_license
string Solution::longestPalindrome(string A) { // Do not write main() function. // Do not read input, instead use the arguments to the function. // Do not print the output, instead return values as specified // Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more details in...
JavaScript
UTF-8
7,046
2.71875
3
[]
no_license
//Object holding food items at various stages var items={ nutriFood:[], mealFood:[], mealLabel:[], //Holds objects containing calorie total per mealtype mealLabelIndex:0, getMapData:function(query){ //Fn that fetches chart axis data points var arr=[]; if(query==='label'){ this.mealLabel.forEach(function...
Java
UTF-8
1,229
3.390625
3
[]
no_license
package friend; public abstract class Friend { private String name; // 친구의 이름 private String phoneNumber; // 전화번호 private String addr; // 주소 // 생성자를 통해서 인스턴스 변수들을 초기화 Friend(String name, String pNum, String addr){ this.name=name; this.phoneNumb...
Java
UTF-8
2,580
2.15625
2
[ "Apache-2.0" ]
permissive
package cjlu.skyline.ecms_data_annotator.api.controller; import java.util.Arrays; import java.util.Map; import cjlu.skyline.ecms_data_annotator.common.utils.PageUtils; import cjlu.skyline.ecms_data_annotator.common.utils.R; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; im...
Python
UTF-8
6,683
2.59375
3
[ "MIT" ]
permissive
import asyncio import logging from typing import Any, Dict, List, Set from warnings import warn from discord import RawReactionActionEvent, User from discord.ext.commands import Context from dpymenus import ButtonMenu, ButtonsError, EventError, PagesError, SessionError from dpymenus.hooks import call_hook class Pol...
Python
UTF-8
321
3.28125
3
[ "MIT" ]
permissive
from abc import ABCMeta, abstractmethod class AbstractMemoryInstruction: __metaclass__ = ABCMeta def __init__(self, value): self._value = value @abstractmethod def generate(self): pass def __str__(self): return '{} {}'.format(self.__class__.__name__.upper(), self._value)...
Markdown
UTF-8
2,334
2.9375
3
[ "MIT" ]
permissive
![header-image](https://i.ibb.co/6Pdkwm1/twitter-nuke-01-min.png) # Twitter Nuke Quickly and efficiently delete your entire tweet history with the help of your Twitter archive without worrying about the puny and pointless 3200 tweet limit imposed by Twitter. ### About The script uses multithreading to speed up the de...
Java
UTF-8
8,744
2.15625
2
[]
no_license
package dw.dw.dw.web.rest; import dw.dw.dw.Demografia2App; import dw.dw.dw.domain.SubSisGrupo; import dw.dw.dw.repository.SubSisGrupoRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.te...
Java
UTF-8
1,101
2.640625
3
[]
no_license
package com.sharing.entity; import java.text.SimpleDateFormat; import java.util.Date; import javax.persistence.MappedSuperclass; @MappedSuperclass public class BaseEntity { private String dateFormat; public String getDateFormat(Date originalDate){ SimpleDateFormat formatter = new SimpleDateFor...
C
UTF-8
2,559
3.28125
3
[ "MIT" ]
permissive
/* ** EPITECH PROJECT, 2017 ** my_sokoban ** File description: ** move_up */ #include "my.h" #include "header_SOKOBAN.h" #include <stdlib.h> void move_up(char **map) { position_t *position = search_player(map); char letter; switch (map[position->y - 1][position->x]) { case ' ': map[position->y - 1][position->x]...
Shell
UTF-8
3,470
2.828125
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env bash ## 创建必要的文件夹 echo -e "\033[31m 创建jars和jmods目录...... \033[0m" mkdir jars mkdir jmods ## 设置jdk9路径 echo -e "\033[31m 设置jdk路9路径...... \033[0m" export JDK9_HOME=/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home ## 编译java9-sample模块及子模块 echo -e "\033[31m 编译java9-sample模块及子模块...... \033[0m" cd ../...
Java
UTF-8
2,732
2.125
2
[]
no_license
package com.example.besocial.utils; public interface ConstantValues { //database root childs String EVENTS = "Events"; String USERS = "users"; String EVENTS_WITH_ATTENDINGS = "EventsWithAttending"; String USERS_ATTENDING_TO_EVENTS = "UsersAttendingToEvents"; String BENEFITS = "Benefits"; St...
Shell
UTF-8
249
3.03125
3
[]
no_license
#!/bin/bash read input name=${input%% *} output=$(sqlite3 ~/.menu/main.sqlite "UPDATE commands SET weight = weight+1 WHERE name='$name';SELECT cmd FROM commands WHERE name='$name';") if [[ $input == $name ]]; then echo $output else echo $input fi
Java
UTF-8
557
1.828125
2
[]
no_license
package parttime.pt.com.basic.login.model; import parttime.pt.com.model.CommonVO; public class LoginVO extends CommonVO{ private static final long serialVersionUID = 5627981987701506596L; private String loginCode = ""; private String loginMsg = ""; public String getLoginCode() { return loginCo...
Markdown
UTF-8
5,908
3.046875
3
[]
no_license
# Project: DataPipeline with Airflow A music streaming company, Sparkify, has decided that it is time to introduce more automation and monitoring to their data warehouse ETL pipelines and come to the conclusion that the best tool to achieve this is Apache Airflow. They have decided to bring you into the project and e...
Python
UTF-8
2,374
3.171875
3
[]
no_license
import numpy as np import random as rnd import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # alpha = 0.1*np.pi theta0 = rnd.uniform(0,np.pi) phi0 = rnd.uniform(0,2*np.pi) # x0 = np.sin(theta0)*np.cos(phi0) # y0 = np.sin(theta0)*np.sin(phi0) # z0 = np.cos(theta0) rho = 0.5 r = 1 theta_back = np.p...
Go
UTF-8
1,768
2.953125
3
[ "Apache-2.0" ]
permissive
package bitbucketserver import ( "net/url" "strings" bitbucketv1 "github.com/gfleury/go-bitbucket-v1" "github.com/pkg/errors" ) func (b *BitbucketServer) convertRepository(bitbucketRepository *bitbucketv1.Repository, defaultBranch bitbucketv1.Branch) (*repository, error) { var cloneURL string if b.sshAuth { ...
Python
UTF-8
651
2.578125
3
[ "MIT" ]
permissive
import unittest from unittest.mock import patch from cdf_548B import CodeforcesTask548BSolution class TestCDF548B(unittest.TestCase): def test_548B_acceptance_1(self): mock_input = ['5 4 5', '0 1 1 0', '1 0 0 1', '0 1 1 0', '1 0 0 1', '0 0 0 0', '1 1', '1 4', '1 1', '4 2', '4 3'] expected = '3\n4...
Python
UTF-8
1,477
2.6875
3
[]
no_license
import pyaudio import wave import datetime import time import math import os import config #length of chunk in seconds chunk_length = 5 def record_chunk(RECORD_SECONDS = 5, WAVE_OUTPUT_FILENAME = "file.wav"): FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 CHUNK = 1024 audio = pyaudio.PyAudio() stream = aud...
C++
UTF-8
1,206
3.1875
3
[]
no_license
#include<iostream> #include<string> #include<vector> using std::vector; using std::cin; using std::cout; using std::endl; using std::string; void main(){ int n,m; cin >> n; vector<int> ivec(n); int num; for (int i = 0; i < n; i++){ cin >> num; ivec[i] = num; } cin >> m; vector<string> ex...
Java
UTF-8
814
2.71875
3
[]
no_license
public class Candidato extends Eleitor implements Candidatura { int qtdVotos = 0; int numeroCandidatura; String cargo; public Candidato(String nome, String cpf, String datanasc, String titulo, int numeroCandidatura, String cargo) { super(nome, cpf, datanasc, titulo); this.numeroCandidat...
PHP
UTF-8
1,794
2.921875
3
[ "MIT" ]
permissive
<?php /** * Swiss Payment Slip PDF * * @license http://www.opensource.org/licenses/mit-license.php MIT License * @copyright 2012-2015 Some nice Swiss guys * @author Marc Würth <ravage@bluewin.ch> * @author Manuel Reinhard <manu@sprain.ch> * @author Peter Siska <pesche@gridonic.ch> * @link https://github.com/rav...
Markdown
UTF-8
803
2.734375
3
[]
no_license
Exercícios Exercícios Teste o problema de deadlock quando é utilizado o locking pessimista. Adicione a seguinte classe no pacote testes. public class TestaDeadLock { public static void main(String[] args) { EntityManagerFactory factory = Persistence.createEntityManagerFactory("K21_topicos_avancados"); EntityManager ...
C
UTF-8
2,457
3.484375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> /* Definition of macros and constants. */ #define MAX_CHARS_LINE 2 /* Definition of structures. */ typedef struct { int entero; } numero; /* Declaration of functions (prototypes). */ int getTotNumeros(numero *comp,FILE *f...
Markdown
UTF-8
7,077
3.40625
3
[]
no_license
# soal-shift-sisop-modul-4-A12-2021 Praktikum Sisop Modul 4 Semester genap 2021 <hr> ## Soal nomor 1 ### Penjelasan Soal Untuk soal nomor 1, kita perlu membuat metode encoding dimana jika terdapat file atau folder di dalam folder ter-encode, maka nama file tersebut harus ter-encode dengan menggunakan atbash cipher, y...
C++
UTF-8
971
2.515625
3
[]
no_license
// // Created by chrustkiran on 6/13/19. // #include "Window.h" #include "StreamProcessor.h" /* void Window::checkInputEvent() { unique_lock<mutex> m_lock(m_mutex); while(this->inputCounter >= this->condVariable){ m_condition.wait(m_lock); } this->inputCounter++; //implemented for time w...
Java
UTF-8
6,066
2.140625
2
[]
no_license
/******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license *********************************...
Python
UTF-8
956
3.953125
4
[]
no_license
#!/usr/bin/python # Version 1 print (30 * '-') print (" M A I N - M E N U") print (30 * '-') print ("1. Add Game") print ("2. View Current Game List") print ("3. Exit") print (30 * '-') ########################### ## Robust error handling ## ## only accept int ## ########################### ## Wait for vali...
Shell
UTF-8
1,090
3.53125
4
[]
no_license
#!/usr/bin/bash DIR=$(pwd) BUILDDIR="${DIR}/build" if [ -d "$BUILDDIR" ]; then rm -r "${BUILDDIR}" fi mkdir ${DIR}/build cd $DIR/build if [[ ( "$#" -ge 1 && "$1" == "--java" ) || "$#" < 1 ]]; then printf 'Building Java TCP server and Client: ' (while :; do for c in / - \\ \|; do printf '\b%s' "$c"; sleep 1; done;...
TypeScript
UTF-8
2,793
3.265625
3
[]
no_license
import { validateEmptyProperties, ValidateEmptyPropertiesOutput } from "../src/validateEmptyProperties" describe("Testando a função validateEmptyProperties", () => { test("Erro quando alguma chave é uma string vazia", () => { const result: ValidateEmptyPropertiesOutput = validateEmptyProperties({ nam...
TypeScript
UTF-8
328
3.453125
3
[ "MIT" ]
permissive
/* @internal */ export class IterateIterable<T> implements Iterable<T> { constructor(private readonly f: (x: T) => T, private readonly x: T) {} [Symbol.iterator]() { return iterate(this.f, this.x) } } function* iterate<T>(f: (x: T) => T, x: T) { while (true) { yield x x = f(x) ...
Java
UTF-8
1,341
2.265625
2
[ "MIT" ]
permissive
package com.refinedmods.refinedstorage.command.network.autocrafting; import com.mojang.brigadier.builder.ArgumentBuilder; import com.mojang.brigadier.context.CommandContext; import com.refinedmods.refinedstorage.api.autocrafting.task.ICraftingTask; import com.refinedmods.refinedstorage.api.network.INetwork; import com...
Python
UTF-8
2,665
3.84375
4
[]
no_license
from infrastructure import * import random class Player(object): def __init__(self, name): self.hand = [] self.name = name self.wins = 0 def __str__(self): return str(self.name) # gives a card back to a player def takeCard(self, card): if card ...
JavaScript
UTF-8
1,546
3.609375
4
[]
no_license
var a = ['a','b','c','d'] for(i=0;i<a.length;i++){ console.log(a[i] + 1) } a.map((data) => { console.log(data+1)}) var a = ['a','b','c','d'] for(i=0;i<a.length;i++){ console.log(a[i] + 1) } VM94:4 a1 VM94:4 b1 VM94:4 c1 VM94:4 d1 undefined a.map((data) => { return data+1}) (4) ["a1", "b1", "c1", "d1"] a....
Java
UTF-8
563
2.984375
3
[]
no_license
package animations; import biuoop.DrawSurface; import other.Counter; /** * You Win screen class. */ public class YouWinScreen implements Animation { private Counter score; /** * Instantiates a new Pause screen. * * @param score the score to print */ public YouWinScreen(Counter score) { this....
Markdown
UTF-8
3,444
2.515625
3
[ "CC-BY-3.0", "MIT" ]
permissive
**Are you the copyright holder or authorized to act on the copyright owner's behalf?** Yes, I am authorized to act on the copyright owner's behalf. **Please describe the nature of your copyright ownership or authorization to act on the owner's behalf.** I am Legal Counsel at Bending Spoons, the copyright owner. **P...
C++
UTF-8
881
3.3125
3
[]
no_license
//Given an integer array A of N elements. You need to find the sum of two elements such that sum is closest to zero. #include <bits/stdc++.h> using namespace std; int sum_closest_to_zero(int a[], int n){ int i, sum = 0, min = INT_MAX; int l = 0, r = n-1; int min_l = l, min_r = n-1; sort(a, a+n); ...
JavaScript
UTF-8
1,528
2.65625
3
[]
no_license
/* istanbul ignore file */ // @ts-ignore const AWS = require('aws-sdk'); // @ts-ignore const fs = require('fs'); // @ts-ignore const {S3_BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, NODE_ENV} = process.env; const params = { Bucket: S3_BUCKET, CreateBucketConfiguration: { // Set your region here LocationConst...
Java
UTF-8
716
2.46875
2
[]
no_license
package com.dao; import com.model.Role; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.transaction.Transactional; @Repository @Transactional public class RoleDaoImpl implements RoleDao { @PersistenceContext ...
Markdown
UTF-8
3,709
3.875
4
[]
no_license
# thread1 thread program 2. Write a multithreaded program that calculates various statistical values for a list of numbers. This program will be passed a series of numbers on the command line and will then create three separate worker threads. One thread will determine the average of the numbers, the second will determ...
Python
UTF-8
1,105
3.8125
4
[]
no_license
'''Implement Merge algorithm to sort an integer array in ascending order''' def merge_sort(alist): '''merge sort of list''' if len(alist) > 1: mid = len(alist) // 2 lefthalf = alist[:mid] righthalf = alist[mid:] merge_sort(lefthalf) merge_sort(righthalf) i = 0 ...
Ruby
UTF-8
1,346
4.03125
4
[]
no_license
# --- Day 5: A Maze of Twisty Trampolines, All Alike --- # # An urgent interrupt arrives from the CPU: it's trapped in a maze of # jump instructions, and it would like assistance from any programs # with spare cycles to help find the exit. # # The message includes a list of the offsets for each jump. Jumps are # relat...
Markdown
UTF-8
978
2.796875
3
[ "BSD-3-Clause" ]
permissive
# Font The Font object can be used to load and render TrueType fonts. Example use: ```Io // within a GLUT display callback... timesFont = Font clone open(\"times.ttf\") if (timesFont error, write(\"Error loading font: \", timesFont error, \"\n\"); return) timesFont setPointSize(16) glColor(0,0,0,1) timesFont draw(\"T...
Java
UTF-8
3,917
2.1875
2
[]
no_license
package nanifarfalla.app.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import nanifarfalla.app.model.Clien...
Markdown
UTF-8
1,254
2.625
3
[]
no_license
# cf-and-s3-static-server-with-minio-proxy It provides a static server as a AWS Cloudfront and S3, and a proxy server as a local [minio](https://min.io/) server. ## Why? It is used in an environment where there is no direct access to s3. For example, if only one host in the corporate network can access s3, a minio ser...
Java
UTF-8
744
3.25
3
[]
no_license
import java.util.ArrayDeque; import java.util.ArrayList; class TreeNode{ int val; TreeNode left; TreeNode right; TreeNode(int x){ val=x; } } public class BSTIterator { ArrayList<Integer> nodesSorted; int index; public BSTIterator(TreeNode root){ this.nodesSorted=new Arr...
Python
UTF-8
1,042
2.578125
3
[]
no_license
import csv import numpy as np import pandas as pd import matplotlib.pyplot as plt # seabornがあると、グラフがきれいにかける import seaborn as sns sns.set_style("darkgrid") from mpl_toolkits.mplot3d import Axes3D file = 'sample.csv' usecols = [1,133] skiprows = [0,1,2,3,4,5] names = ["Time","Between-the-hand"] df = pd.read_csv(file,u...
Java
UTF-8
273
3.21875
3
[]
no_license
package array; public class printMultiDimArrays { public static void main(String args[]) { int arr[][]= { {2,7,9}, {3,6,1}, {7,4,2} }; for(int i=0; i<3; i++) { for(int j=0; j<3; j++) { System.out.print(arr[i][j] + " "); } System.out.println(); } } }
JavaScript
UTF-8
383
4.0625
4
[]
no_license
/* 给出 nums = [0, 1, 0, 3, 12], target = 0; 调用函数之后, 得到nums = [1, 3, 12, 0, 0].*/ var moveItems=(arr,target)=>{ var tmp= arr.filter(element=>element!=target); var tmpLength=tmp.length; for(let i=0;i<arr.length-tmpLength;i++){ tmp.push(target); } return tmp; } nums = [0, 1, 0, 3, 12]; targe...
JavaScript
UTF-8
3,935
2.671875
3
[ "MIT" ]
permissive
/** * js script **/ function loadUrl(url){ params['formURL'] = base_api_url+'films?page='+url; //alert( base_api_url+'films?page='+url); loadFilm(token, params); } function loadFilm(token, params){ var dat = {token:token,data:params["postData"]}; var objVal = ''; var htmlStr = ''; var i; if(params["...
Java
UTF-8
3,466
2.65625
3
[]
no_license
package com.flytxt.atom.entity; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.apache.avro.Schema; //import org.apache.avro.Schema; import com.flytxt.atom.SerializationException; /** * @author athul * */ public class Complex { public Boolean[] b...
Go
UTF-8
1,601
3.15625
3
[]
no_license
package database import ( "fmt" "log" "sync" ) var ( once sync.Once instance map[string]RuleConfiguration infoLog string = "INFO: [DB]:" errorLog string = "ERROR: [DB]:" ) // RuleConfiguration is used to store data in the node database type RuleConfiguration struct { SrcIP string `json:"SrcIP"` Dst...
JavaScript
UTF-8
2,694
2.671875
3
[]
no_license
module.exports = async function(client, message) { const resenhaList = require('../auxiliary/resenhaLoadList'); let first = [], second = [], third = []; let resenhistaCoin; let resenhistaName; for (let index = 0; index < resenhaList.length; index++) { resenhistaCoin = resenhaList[index].co...
Python
UTF-8
2,469
3.03125
3
[]
no_license
import tkinter as tk from tkinter.constants import END from tkinter.scrolledtext import * from tkinter.filedialog import * from tkinter.messagebox import * nuvarandefil = 'no file' def new_file(): """ Creates" a new file """ global nuvarandefil textruta.delete(1.0, tk.END) nuvarandefil =...
Java
UTF-8
2,176
2.53125
3
[]
no_license
package com.constpetrov.runstreets.model; import java.util.StringTokenizer; import android.os.Parcel; import android.os.Parcelable; public class Area implements Parcelable{ public static Parcelable.Creator<Area> CREATOR = new Parcelable.Creator<Area>() { @Override public Area createFromParcel(Parcel source) { ...
Shell
UTF-8
626
3.15625
3
[]
no_license
#!/bin/bash set -euo pipefail YEAR="$(date +%Y)" set +u source venv/bin/activate set -u echo "Downloading data for past week" ./hsotool.py --config hsotool_config.yaml echo "Converting xlsx data to csv" ./conversion.py $PWD/data_current.xlsx -o file_kwh_current.csv house_energy -t xlsx ./conversion.py $PWD/data_curr...
JavaScript
UTF-8
446
2.71875
3
[ "MIT" ]
permissive
window.onclick = function(event) { var modal = document.getElementById('modal-createsize'); if (event.target == modal) { modal.style.display = "none"; } } function create(){ $(document).click(function(){ $('#modal-createsize').css('display','block'); }); } ...
Java
UTF-8
3,458
2.984375
3
[]
no_license
package org.example; import ex41.nameSort; import ex42.Person; import ex42.parseData; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.Arrays; import java.util.Optio...
PHP
UTF-8
3,927
2.765625
3
[]
no_license
<?php if (!DEBUG) die(); if (defined('IMPORT_MODELS') && IMPORT_MODELS) foreach (glob(ROOT_PATH . "/models/*.php") as $filename) include_once $filename; if (defined('AS_RAW_TEXT') && AS_RAW_TEXT) header("Content-Type: text/plain"); /* https://stackoverflow.com/questions/7153000/get-class-name-from-file */ funct...
Markdown
UTF-8
2,321
3.046875
3
[ "MIT" ]
permissive
# Material-UI confirm [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jonatanklosko/material-ui-confirm/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/material-ui-confirm.svg)](https://www.npmjs.com/package/material-ui-confirm) [![Build Status](https://travis...
Python
UTF-8
598
4.5
4
[]
permissive
''' A positive integer greater than 1 which has no other factors except 1 and the number itself is called a prime number. 2, 3, 5, 7 etc. are prime numbers as they do not have any other factors. But 6 is not prime (it is composite) since, 2 x 3 = 6. ''' # Python program to display all the prime numbers within an inte...
C++
UTF-8
2,303
3.203125
3
[ "BSD-3-Clause" ]
permissive
#include <string> namespace TestNamespaceClasses { //! \brief first class inside of namespace class NamespacedClassTest { public: //! \brief namespaced class function virtual void function() const = 0; static void functionS(); explicit NamespacedClassTest() {} //! \brief namespaced class othe...
Markdown
UTF-8
4,998
3.109375
3
[ "MIT" ]
permissive
# Running the KQ Scene Scoring server on a local computer If you want to run KQ Scene Scoring on your computer, or do development on it, follow the instructions in this section. Instructions for installing it on Heroku are provided later on. Clone the repo and set up gems and the initial database: ```sh $ git clone...
Java
UTF-8
1,685
2.625
3
[]
no_license
package org.openchat.domain.users; import java.util.List; public class UserService { private final IdGenerator idGenerator; private final UserRepository userRepository; public UserService(IdGenerator idGenerator, UserRepository userRepository) { this.idGenerator = idGenerator; this.userRe...
TypeScript
UTF-8
726
3.09375
3
[]
no_license
import { Person } from './Person'; import { Gender } from './Gender'; import { isAllLetter, isAllNumber, isAlphaNumeric } from './Utils'; export class Student extends Person { private studentID: string; constructor(firstName: string, lastName: string, gender: Gender, username: string, password: string, stude...
Java
UTF-8
2,908
1.882813
2
[]
no_license
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.09....
Python
UTF-8
8,039
2.84375
3
[ "MIT" ]
permissive
#coding=utf-8 #代码中包含中文,就需要在头部指定编码。 from sklearn import datasets #from keras.datasets import boston_housing from keras import models from keras import layers from keras.models import Sequential from keras.layers import Dense,BatchNormalization,Dropout,Reshape,Flatten from keras.layers.convolutional import Conv2D,MaxPoo...
Python
UTF-8
587
4.4375
4
[]
no_license
""" Write a method retrieve_values that takes in two dictionaries and a key. The method should return an array containing the values from the two hashes that correspond with the given key. """ def retrieve_values(hash1, hash2, key): list1 = [] if key in hash1 and hash2: list1.append(hash1[key]) ...
Python
UTF-8
2,071
3.8125
4
[]
no_license
import math import random # Python Sample : Assignment # Version : Python 2.x ''' This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)...
Java
UTF-8
829
3.890625
4
[]
no_license
import java.io.IOException; import java.util.Scanner; /* Leia 2 valores inteiros X e Y. A seguir, calcule e mostre a soma dos números impares entre eles. Entrada O arquivo de entrada contém dois valores inteiros. Saída O programa deve imprimir um valor inteiro. Este valor é a soma dos valores ímpares que estão entre...
Python
UTF-8
853
3.171875
3
[]
no_license
hp_ryu = int(input()) hp_ken = int(input()) g_ryu = 0 g_ken = 0 while hp_ken > 0 and hp_ryu > 0: golpe = int(input()) if golpe > 0: hp_ken = hp_ken - golpe g_ryu += 1 print("RYU APLICOU UM GOLPE:", golpe) print("HP RYU =", hp_ryu) if hp_ken > 0: print("HP KEN =", hp_ken) ...
Java
UTF-8
216
1.796875
2
[]
no_license
package dao; import java.util.List; import dto.User; public interface HelloDao { public int insertinto(String userid,String password); public List<User> finduser(String userid,String password); }
Python
UTF-8
2,755
2.59375
3
[ "Apache-2.0" ]
permissive
from flask import session, request from flask_restful import Resource, reqparse, inputs, abort from api.common.database import database from api.common.utils import checkTag, checkTime, checkTel import json import requests ''' ### sendOfflineCapsule Use this method to send offline capsule. HTTP Request Method: **POST...
Java
UTF-8
336
2.296875
2
[ "Apache-2.0" ]
permissive
package com.tvd12.test.testing.util; import org.testng.annotations.Test; import com.tvd12.test.base.BaseTest; import com.tvd12.test.util.Pair; public class PairTest extends BaseTest { @Test public void test() { Pair<String, String> pair = new Pair<>("1", "a"); assert pair.setValue("b").equal...
Java
UTF-8
2,651
2.375
2
[]
no_license
package com.pmp.business; import java.util.ArrayList; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import com.pmp.bean.CentroDeCustoBean; import com.pmp.bean.CompCodeBean; import com.pmp.bean.UsuarioBean; import com.pmp.entity.PmpCompCodePartner; impo...
Python
UTF-8
1,186
3.765625
4
[]
no_license
class Dog: role = 'dog' def __init__(self,name,breed,attack_val): self.name = name self.breed = breed self.attack_val = attack_val self.life_val = 100 def bite(self,person): person.life_val -= self.attack_val print('dog [%s] attack human [%s], h...
Java
UTF-8
4,650
2.453125
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mycompany.project.views; import com.company.project.model.Group; import com.mycompany.project.MyVaadinUI; import com.myco...
Markdown
UTF-8
2,306
3.46875
3
[]
no_license
## Project Instructions :pencil2: **Review the Article to Mockup Project [Rubric](https://review.udacity.com/#!/rubrics/145/view)** 1. Download and unzip `mockup-to-article.zip` in the Supporting Materials section, below. You'll find `index.html`, the article mockup image (`blog-mockup.pdf`) and a file called `refl...
JavaScript
UTF-8
1,068
2.6875
3
[]
no_license
(function () { "use strict"; angular .module("movie") .controller("MainController", MainController); MainController.$inject = ["movieService"]; function MainController(movieService) { var mainVm = this; mainVm.addMovie = addMovie; mainVm.deleteMovie = deleteMo...
Java
UTF-8
25,247
2.90625
3
[]
no_license
import java.awt.event.ActionEvent; import java.util.*; import com.google.gson.Gson; import javafx.scene.control.TextArea; import java.time.Instant; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; enum RaceType { IND, PARIND, GRP, PARGRP } /** * The main class. This repr...
Java
UTF-8
346
1.914063
2
[]
no_license
package com.ninvit.framework.repository; import java.util.Optional; import com.ninvit.framework.models.BlogPost; import org.springframework.data.jpa.repository.JpaRepository; public interface BlogPostRepository extends JpaRepository<BlogPost, Long> { void deleteBlogPostById(Long id); Optional<BlogPost> fin...