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
Python
UTF-8
501
3.78125
4
[]
no_license
# 請參閱A-9頁 import asyncio import time orders = ['牛肉麵', '熱狗', '珍珠奶茶'] # 定義3筆訂單 def now(): return time.time() async def task(name): # 定義協程 (coroutine) print(f'"{name}" 訂單處理中…') await asyncio.sleep(3) print(f'"{name}" 完成') # 定義協程列表 tasks = [task(orders[i]) for i in range(len(orders))] start = now() a...
Java
UTF-8
3,326
2.390625
2
[ "LicenseRef-scancode-public-domain" ]
permissive
package sq.client.render; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import sq.entity.creature.EntityWebShot; import sq...
Python
UTF-8
721
3.21875
3
[]
no_license
#!/usr/bin/python import numpy as np def outlierCleaner(predictions, ages, net_worths): """ Clean away the 10% of points that have the largest residual errors (difference between the prediction and the actual net worth). Return a list of tuples named cleaned_data where eac...
Java
UTF-8
851
2.390625
2
[]
no_license
package com.homeki.core.actions; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.J...
JavaScript
UTF-8
246
2.875
3
[]
no_license
"use strict"; // Get a reference to the element with the id "firstDiv". let firstDiv = document.getElementById("firstDiv"); // Get a reference to the element with the id "secondDiv". let secondDiv = document.getElementById("secondDiv");
TypeScript
UTF-8
256
2.984375
3
[]
no_license
export { }; declare global { interface Array<T> { selfConcat(): T } } Array.prototype.selfConcat = function () { if (!Array.isArray(this[0])) { return this } return this.reduce((acc, curr) => { return acc.concat(curr) }, []) }
JavaScript
UTF-8
2,829
2.734375
3
[]
no_license
import { GET_STUDENTS, DELETE_STUDENT, UPDATE_STUDENT, ADD_STUDENT, _deleteStudent, _updateStudent, _addStudent, _getStudents } from './../actions'; import axios from 'axios'; const updateStudent = (student, history) => { if(student.gpa===''){ student.gpa = null } if...
Markdown
UTF-8
6,806
3.03125
3
[]
no_license
# testweek01 // I keep Running into trouble with Github, it keeps asking for a security token. Sometimes resetting my password helps other times not. Constraint, Linear, Grid and Relative, Coordinator Constraint: Large and complex layout with a flat view hierarchy(means no nested view groups) Linear: aligns all c...
C
GB18030
4,844
2.75
3
[]
no_license
#include "pid.h" #include "condition.h" //PIDʼ void PID_Init(PID * pid,float kp,float ki,float kd,float max_ek_sum,float max_out) { pid->kp = kp; pid->ki = ki; pid->kd = kd; pid->max_sum_error = max_ek_sum; pid->max_out = max_out; } //PID㺯 void PID_Calculat(PID * pid,float current,float targ...
Python
UTF-8
7,036
2.640625
3
[]
no_license
import sys from PyQt5 import QtCore from copy import deepcopy from PyQt5.QtCore import QMimeData, QAbstractItemModel, Qt, QVariant, QModelIndex, QRect from PyQt5.QtWidgets import * class myNode(object): def __init__(self, name, state, description, parent=None): self.name = name self.state = state...
Python
UTF-8
3,436
2.609375
3
[]
no_license
import json import models.board as board class FakeURL: def __init__(self, queries={}): self.query = queries class FakeRequest: def __init__(self, _raise_exception=False, _json=None, app=None, url=None): self._json = _json self._raise_exception = _raise_exception self.app =...
Java
UTF-8
41,691
2.75
3
[]
no_license
package com.santipe.tp_club; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.table.D...
Java
UTF-8
46,956
2.125
2
[]
no_license
package com.github.technus.signalTester.fx.additions; import com.sun.javafx.charts.ChartLayoutAnimator; import com.sun.javafx.css.converters.SizeConverter; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; import javafx.beans.InvalidationListener; import javafx.beans...
Java
UTF-8
12,163
2.921875
3
[]
no_license
package org.ProxiBanque.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.ProxiBanque.domaine.Client; import org.ProxiBanque.domaine.Conseiller; import org.ProxiBanque.domaine.Courant; import org.ProxiBanque.domaine....
C#
UTF-8
2,955
2.90625
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SimpleLog.Repository { internal class LogTextFileContext : ILogContextAdd { #region attributes private string _FileName; #endregion #r...
PHP
UTF-8
3,462
2.734375
3
[]
no_license
<?php session_start(); if (!isset($_SESSION['admin_access'])) { exit; } //this class formats the dropdown menu for clubs and facilities class loadInstructorsRooms { private $typeId = null; private $instructorName = null; private $instructorId = null; private $roomName = null; private $roomId = null; private $...
Markdown
UTF-8
10,800
2.96875
3
[]
no_license
## eBenefits 21-686c Form Usability Session 1 #### Conducted: February 19, 2020 via Zoom #### Moderator: Aricka Lewis #### Participant: NB (F) #### Session Recorded: Yes #### Note-taker: S. Bildstein ## Participant 1 Thanks for joining us today! My name is Aricka and I also have some colleagues on the line observing a...
TypeScript
UTF-8
1,504
2.59375
3
[]
no_license
import { inject, injectable } from 'tsyringe'; import { classToClass } from 'class-transformer'; import IUsersRepository from '@modules/users/repositories/IUsersRepository'; import ICacheProvider from '@shared/container/providers/CacheProvider/models/ICacheProvider'; import User from '@modules/users/infra/typeorm/ent...
Java
UTF-8
243
2.515625
3
[]
no_license
package com.company.model; import com.company.model.RealEstate; public class Street extends RealEstate { public Street(String name, int cost, int defRent){ setName(name); setCost(cost); setRent(defRent); } }
Java
UTF-8
4,687
2.6875
3
[]
no_license
package ab2.test; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.junit.Assert; import org.junit.Test; import ab2.AbstractHashMap; import ab2.AuD2; import ab2.impl.Gaggl_Gundacker_Kopali.AuD2Impl; public class...
PHP
UTF-8
1,081
2.703125
3
[]
no_license
<?php require_once '../../service/CuentaService.php'; require_once '../../model/Cuenta.php'; $data = json_decode(file_get_contents("php://input")); try { $nombres = $data->nombres; $apaterno = $data->aparteno; $ci = $data->ci; $celular = $data->celular; ...
Python
UTF-8
579
3.265625
3
[ "Apache-2.0" ]
permissive
import unittest from chapter_02.src.answer_04 import get_partition from chapter_02.src.LinkedList import LinkedList class TestPartition(unittest.TestCase): def test_empty_list(self): self.assertIs(get_partition(None, 4), None) def test_not_x(self): self.assertEqual(get_partition(LinkedList([...
C#
UTF-8
2,346
3.484375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TabliceDwuwymiarowe { class Program { static void Main(string[] args) { Random random = new Random(); Console.WriteLine(random.Next(200)); ...
Java
UTF-8
733
2.390625
2
[]
no_license
package ramchat.model.dao.impl; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.Socket; import javax.imageio.ImageIO; public class FileClientConnectDaoImpl { public BufferedImage getImg(Strin...
Python
UTF-8
1,417
2.890625
3
[]
no_license
from threading import Thread, Lock import cv2 class VideoGrabber(Thread): """ A threaded video grabber Attributes: encode_params (): cap (str): attr2 (:obj:`int`, optional): Description of `attr2`. """ def __init__(self, jpeg_quality, device_id): """Cons...
Python
UTF-8
4,060
2.640625
3
[]
no_license
import tensorflow as tf from tensorflow.keras.layers import Conv2D, BatchNormalization, LeakyReLU, ZeroPadding2D, Concatenate from tensorflow.keras.regularizers import l2 from tensorflow.keras import Model class DarknetConv2DBNLeaky(tf.keras.layers.Layer): """Convolutional layer with batch normaltion and leaky re...
C
UTF-8
3,920
2.828125
3
[]
no_license
#ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif #include<stdio.h> #include<math.h> #include<mex.h> double H(double x); double IH(double x); double IIH(double x); int wrap(int j, int n); /*************************************************************************...
Markdown
UTF-8
4,303
3.359375
3
[]
no_license
# API This document details the proper format for requests and what the caller should expect in terms of response. ## Requests Requests should be sent to this API as an 'application/json' post with the following properties: - "lang": A string specifying the language code of the source code. A full list can be found ...
Java
UTF-8
3,691
1.804688
2
[]
no_license
package npg.webadmin.acceptance.test; import org.apache.log4j.Logger; public class Constants { public static final Logger LOGGER = Logger.getLogger("com.webadmin"); // types of elements public final static String BLANK = ""; public final static String EMPTY = "empty"; public final static String YE...
TypeScript
UTF-8
212
2.671875
3
[]
no_license
export interface INode { node: string; weight: number; } export interface IAdjacentNodeList { [index: string]: INode[]; } export interface IWaypoint { node1: string; node2: string; weight: number; }
C
UTF-8
440
3.515625
4
[ "MIT" ]
permissive
#include<stdio.h> int totalAmount(void); int main(void) { int result; result = totalAmount(); printf("Total Amount is %d\n", result ); //printf("Total Amount is %d\n", totalAmount() ); return 0; } int totalAmount(void) { int x, y, total; printf("Total courses: "); scanf("%d", &x); ...
Markdown
UTF-8
2,932
3.375
3
[ "MIT" ]
permissive
--- layout: post # 使用的布局(不需要改) title: 数组中只出现一次的数字 subtitle: I'm too cabbage!!! date: 2020-03-21 # 时间 author: longzzzz # 作者 header-img: img/bg_12.jpg #这篇文章标题背景图片 catalog: true # 是否归档 tags: #标签 - 剑指offer --- >We work in the darkness to serve the light. 题目描述:一个整型...
Markdown
UTF-8
3,551
2.875
3
[]
no_license
--- title: Spend Time With Family and Loved Ones date: 2016-06-09 21:15:40 tags: - 清晨朗读会 --- > BY LEO BABAUTA[^1] When was the last time you told your family and close personal friends that you loved them? Whatever your answer, do it today. Recently my grandfather was admitted to the hospital, just days after his ...
C#
UTF-8
1,490
2.890625
3
[ "MIT" ]
permissive
namespace Samples.TestDataBuilder { public class TestUserBuilder { public const string DEFAULT_NAME = "John Smith"; public const string DEFAULT_ROLE = "ROLE_USER"; public const string DEFAULT_PASSWORD = "42"; private string name = DEFAULT_NAME; private string? password = DEFAULT_PASSWORD; private string ...
C
UTF-8
1,952
3.15625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> void sortare_descrescatoare(float v[], int n) {//functie petru sortarea descrescatoare a vectorilor int i, j; for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(v[i] < v[j]) { float aux; aux=v[i]; v[i]=v[j]; v[j]=aux; } } } } int sum...
JavaScript
UTF-8
409
3.671875
4
[ "MIT" ]
permissive
function calc(a, b, operator) { let result; switch (operator) { case '+': result = a + b; break; case '-': result = a - b; break; case '*': result = a * b; break; case '/': result = a / b; break; case '%': result = a % b; break; case '**': result = a ** b; break; ...
C
UTF-8
722
2.71875
3
[]
no_license
unsigned grow_int (unsigned n, unsigned * keys) { htab_t ht = htab_create (0, hash_int_fn, eq_int_fn, NULL); unsigned i; unsigned count; for (i = 0; i < n; i ++) { void ** elem = htab_find_slot (ht, & keys [i], INSERT); if (elem) * elem = (void *) & keys [i]; } count = htab_elements (h...
Java
UTF-8
12,433
2.34375
2
[ "Apache-2.0" ]
permissive
package com.sibosend.qrcode; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.imageio.ImageIO; import...
Markdown
UTF-8
647
2.953125
3
[]
no_license
# I Am Open Source (And So Can You!) ## Length 10 ## Audience Experience Level Novice ## Description Open Source Software (OSS) has changed the world in countless ways and has provided us with wonderful innovations such as the Python programming language. As Pythonistas, we use OSS every single day but only a fra...
Java
UTF-8
1,451
2.28125
2
[]
no_license
package com.pepperonas.enigma.app; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; /** * @author Martin P...
Java
UTF-8
1,605
2.859375
3
[]
no_license
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; /** * Created by andrew on 4/15/17. */ class GameModelTest { @Test void testCorrectState1Undo() throws GameModel.EmptyHistoryException, GameModel.MaxUndosReachedException, GameModel.GameFinishedException { GameModel model = new...
C++
ISO-8859-1
1,148
3.71875
4
[]
no_license
#include <algorithm> #include <iostream> #include <string> #include <ctype.h> #include <stdexcept> #include "Test.h" // Exemplo de classe a ser testada class Password { private: std::string value; public: void set(std::string pass) { auto check_alpha = [](char& c) -> void { if (...
Markdown
UTF-8
108
2.734375
3
[]
no_license
### 全模组电源上可能有两个主板输出口,要全部插上才能满足20+4pin的主板供电
C++
UTF-8
3,912
2.5625
3
[]
no_license
#ifndef paging_INC #define paging_INC #include <kernel/isr.hpp> #include <kernel/idt.hpp> //#include <kernel/kheap.hpp> #include <kernel/monitor.hpp> #include <kernel/kmalloc.hpp> #include <kernel/kpp/bitset.hpp> #include <isa_specific_code.hpp> #include <plataform_specific_code.hpp> #include <stdlib.h> typedef st...
C#
UTF-8
2,093
3.109375
3
[]
no_license
using System; using System.ComponentModel; using System.Diagnostics; using System.IO.Ports; namespace SimWinO.Arduino { public class ArduinoHelper : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public bool IsConnected { get; set; } public SerialP...
Python
UTF-8
2,108
2.6875
3
[]
no_license
import pymysql conn = pymysql.connect( host='10.141.221.73', port=3306, user='root', passwd='root', db='fdroid', charset='utf8' ) def read_data(): lists = [] try: with conn.cursor() as cur: sql = 'select class_id, detail_description from jdk_class where class_id < ...
Python
UTF-8
218
3.328125
3
[]
no_license
from utils import is_palindrome def problem4(): max = 0 for i in range(100, 1000): for j in range(100, 1000): if is_palindrome(i*j) and i*j > max: max = i*j print(max)
Java
UTF-8
913
1.859375
2
[]
no_license
package com.jinguduo.spider.data.table; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; i...
Java
UTF-8
6,655
2.34375
2
[ "MIT" ]
permissive
package gr.uom.java.xmi; import com.intellij.openapi.editor.Document; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import gr.uom.java.xmi.diff.CodeRange; import org.jetbrains.annotations.NotNull; /** * Provides an information about the element's loc...
PHP
UTF-8
452
4
4
[]
no_license
<?php class Cat { public $sound; public $color; public $gender; function __construct( $sound , $color , $gender) { $this->sound = $sound; $this->color = $color; $this->gender = $gender; } function walk() { return " my Cat likes to walk, it is a " . $this->gender; } function sound() { return " my ...
JavaScript
UTF-8
637
4.03125
4
[]
no_license
var person = { firstName: "Alex", sayHi: function() { return "Hi " + this.firstName }, determineContext: function() { return this === person }, father: { sayHi: function() { return "Hello " + this.firstName }, determineContext: func...
C++
WINDOWS-1251
743
3.359375
3
[]
no_license
// . #include "Function.h" // . void main(void) { float x1 = 2.5, x2 = 3.5, x3 = 5.0; float y = Avg(x1, x2, x3); // . // cout << "x1=" << x1 << " x2=" << x2 << " x3=" << x3 << " Y=" << y << endl; y = Avg(2., 3., 7.); // . // . y = Avg(x1, 5, x3 / 2); // . // . Table(0, 3.14, 12); }
Java
UTF-8
292
1.84375
2
[]
no_license
package com.group8.dalsmartteamwork.courseadmin.models; import com.group8.dalsmartteamwork.courseadmin.dao.IStudentEnrollmentDao; public interface IStudentEnrollmentFactory { IStudentEnrollmentDao getStudentEnrollmentDaoObject(); IPasswordGenerator getPasswordGeneratorObject(); }
Shell
UTF-8
4,035
3.21875
3
[]
no_license
#!/bin/bash set -e -x NN=4 # default number of processors if [ $# -gt 0 ] ; then NN="$1" fi # default interpolation method is conservative IMETHOD=bil if [ $# -gt 1 ] ; then # if user says "./hirham2epsg3413.sh N con" then first order conservative remapping is used IMETHOD=$2 fi METHOD=`echo $IMETHOD | tr [a-...
Java
UTF-8
377
2.078125
2
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
package astli.db; /** * * @author Christof Rabensteiner <christof.rabensteiner@gmail.com> */ public class JdbcProperties { public final String url; public final String username; public final String password; public JdbcProperties(String url, String username, String password) { this...
Java
UTF-8
1,695
3.453125
3
[]
no_license
import java.util.ArrayList; import java.util.Scanner; import tiles.Tile; public class Main { public static void main(String args[]) { /* Hand myHand = new Hand(); Parser parser = new Parser(); Scanner sc = new Scanner(System.in); for (int i = 0; i < Hand.MAX_TILES; i++) { ...
Java
UTF-8
1,251
2.328125
2
[]
no_license
package br.com.fabricam8.seniorsapp.adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.List; import br.com.fabricam8.seniorsapp.R; import br.com.fab...
PHP
UTF-8
6,991
2.546875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Ind_rendimiento extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('Ind_rendimientoModel'); $this->load->helper('url'); } function index($nivel = 1, $esta...
Python
UTF-8
1,097
3.625
4
[]
no_license
import turtle import random loadWindow = turtle.Screen() loadWindow.setup(width=1000, height=1000) loadWindow.bgcolor("black") turtle.speed(0) turtle.colormode(255) turtle.pensize(3) def draw_grid(STEP,LENGTH,COLOR): circleStart = 0 for i in range(-500, LENGTH, STEP): if COLOR: r = rando...
C#
UTF-8
5,151
3.078125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Diagnostics; namespace Code { class Program { static void Main(string[] args) { string NameImage = ""; Console.WriteLine("Av...
Markdown
UTF-8
1,938
3.28125
3
[ "CC-BY-ND-4.0", "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# Števniki Števniki so navedeni v Dodatku in med novimi besedami lekcije. Večja števila se oblikujejo s kombiniranjem osnovnih števil na naslednji način: - 1 238 – *mil du-cent tri-dek ok* - 153 837 – *cent kvin-dek tri mil ok-cent tri-dek sep* - seštevanje: 8 + 3 = 11 – *ok...
JavaScript
UTF-8
1,079
3.015625
3
[]
no_license
let Halo = class { constructor () { for (let i = 0; i < Halo.num; i++) { Halo.alive[i] = false Halo.r[i] = 0 } } born (x, y) { for (let i = 0; i < Halo.num; i++) { if (Halo.alive[i] === false) { Halo.alive[i] = true Halo.r[i] = 10 Halo.x[i] = x ...
SQL
UTF-8
4,947
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Apr 19, 2017 at 08:20 AM -- Server version: 5.6.28 -- PHP Version: 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
PHP
UTF-8
4,558
2.578125
3
[]
no_license
<?php include_once("generic_class/class.PGDAO.php"); include_once("generic_class/class.BSN.php"); include_once("generic_class/class.maper.php"); include_once("clases/class.contacto.php"); include_once("clases/class.contactoPGDAO.php"); include_once("clases/class.fechas.php"); class ContactoBSN extends BSN { protec...
Markdown
UTF-8
2,633
2.703125
3
[ "Unlicense" ]
permissive
# 新規プロジェクト(リポジトリ)を作るには aozorahackは青空文庫をハックしたい人の集まりです。 何か新しいものをハックするために、新たなプロジェクト(GitHub上のリポジトリ)を作ることもできます。その場合、以下の流れで作成します。 ## (1) Issueを作る https://github.com/aozorahack/aozorahack/issues/new より新しいissueを登録してください。 Issueには、以下の項目を記入してください。 * リポジトリ名(日本語) * リポジトリのパス名(URLに使うやつ) * リポジトリの紹介文 その他、何をしたいか等の説明も書いておくと、後述の賛同者...
Python
UTF-8
167
2.625
3
[]
no_license
def sangsu(va): return (va // 100) + (va % 100 // 10) * 10 + (va % 100 % 10) * 100 a, b = map(int, input().split()) a, b = sangsu(a), sangsu(b) print(max(a, b))
Java
UTF-8
11,005
2.265625
2
[]
no_license
package com.dudkovlad.CalcTDP; import android.content.Context; import android.content.SharedPreferences; import java.util.ArrayList; /** * Created by vlad on 27.09.2014. */ public class Data { public static SharedPreferences prefs; public static ArrayList<HistoryItem> history_items; public static ...
Python
UTF-8
1,045
2.921875
3
[]
no_license
from sklearn import datasets import numpy as np def findirs(n,target,argsortlist): targetlist =[] for i in range(n): targetlist.append(target[argsortlist[i]]) sum0 =0 sum1 =0 sum2 =0 for i in targetlist: if i == 0: sum0 = sum0+1 elif i ==1: ...
Java
UTF-8
1,346
2.71875
3
[]
no_license
package view.menuBar; import javax.swing.AbstractButton; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import controller.menu.AddPlayerListener; import controller.menu.RemovePlayerButton; import model.playerStatus.PlayerStatus; import view.mainUI.ApplicationFrame; import view.to...
Swift
UTF-8
809
3.828125
4
[]
no_license
import UIKit struct StringStack { private var array: [String] = [] func peek() -> String { guard let topElement = array.first else { fatalError("The stack is empty.")} return topElement } mutating func pop() -> String { return array.removeFirst() } mutating func push(_ element: String)...
SQL
UTF-8
220
3.515625
4
[]
no_license
#---V1-- SELECT E.last_name, E.first_name, D.dept_no FROM dept_emp D INNER JOIN employees E USING(emp_no); #---V2-- SELECT E.last_name, E.first_name, D.dept_no FROM dept_emp D, employees E WHERE D.emp_no = E.emp_no;
C
UTF-8
1,273
2.78125
3
[]
no_license
/* ** EPITECH PROJECT, 2019 ** minishel ** File description: ** fonction.other */ #include <stdlib.h> #include "include.h" int init_compar(ar_t *comp) { comp->cond = 3; comp->buffer = malloc(sizeof(char) * comp->cond); comp->buffer[0] = "exit"; comp->buffer[1] = "echo"; comp->buffer[2] = "cd"; } v...
Java
UTF-8
1,032
2.0625
2
[]
no_license
package kr.co.momstudy.admin.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import kr.co.momstudy.common.db.M...
JavaScript
UTF-8
289
3.171875
3
[]
no_license
/* Collin Mullis Ch.4 Range Array Homework CMP 237 */ var range = function(start, end) { var rangeArray = []; for (var numRange = start; numRange <= end; numRange = numRange + 1) if (numRange <= end) rangeArray.push(numRange); return rangeArray; } console.log(range(1,6));
C#
UTF-8
3,827
2.609375
3
[]
no_license
using System; using System.Configuration; using System.Reflection; namespace DeviceAbriDoor.Configs { public class AppConfigSection : ConfigurationSection { private static AppConfigSection instance = null; private static readonly object lob = new object(); private static string config...
Python
UTF-8
844
2.578125
3
[]
no_license
from django.db import models from django.utils import timezone class Post(models.Model): rut = models.CharField(max_length=10) nomCompleto = models.CharField(max_length=100) fecNac = models.DateTimeField() email = models.CharField(max_length=100) telefono = models.CharField(max_length=10) reg...
Java
UTF-8
1,056
3.921875
4
[]
no_license
import java.util.Scanner; import java.util.Arrays; public class IdenticalArrays { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("How many inputs in the first array? "); int first [] = new int [input.nextInt()]; System.out.println ("Enter the inputs: ...
Python
UTF-8
2,758
2.9375
3
[]
no_license
expectedHeader = ['Name', 'Company', 'Customer Type','Email', 'Phone', 'Mobile', 'Fax', 'Website', 'Street', 'City','State', 'ZIP', 'Country', 'Opening Balance', 'Date', 'Resale Number'] expectedExportHeader = ['Customer', 'Company', 'Street Address', 'City', 'State', 'Country', 'Zip', 'Phone', 'Email', 'A...
Rust
UTF-8
2,794
2.9375
3
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
//! Optional `Secret` wrapper type for the `bytes::BytesMut` crate. use super::ExposeSecret; use bytes::BytesMut; use core::fmt; use zeroize::Zeroize; #[cfg(all(feature = "bytes", feature = "serde"))] use serde::de::{self, Deserialize}; /// Instance of [`BytesMut`] protected by a type that impls the [`ExposeSecret`]...
Markdown
UTF-8
5,784
2.671875
3
[]
no_license
+++ categories = ["programming"] date = "2016-12-18T01:41:28+09:00" slug = "image-encoding-intro" tags = ["Javascript", "Encoding"] title = "Node.jsのFile Systemで画像を扱うときの出力方法" type = "programming" +++ Electronを使っていると、けっこう使うFile Systemモジュールですが、画像を扱う際にバイナリとかバッファとかBase64などのエンコーディングでてきますよね?エンコードまわりと基本的なfsモジュールの出力操作について触れた...
SQL
UHC
9,133
4.4375
4
[]
no_license
Ѱ , ϳ ÷ ϴ ex: ü ޿ , smith μ μȣ WHERE 밡 WHERE deptno = 10 ==> μȣ 10 Ȥ 30 WHERE deptno IN(10,30) WHERE deptno = 10 OR deptno = 30 * ȸϴ = ڸ Ұ WHERE deptno = (10,30) ϸ WHERE deptno IN ( ϰ, ϳ ÷ ̷ ) , ÷ ϳ ==> 밡 IN(̾, ߿), (ANY,ALL(󵵰 )) IN : TRUE WHERE ÷|ǥ IN() ANY: ڸ ϴ ϳ TRUE ...
Java
UTF-8
3,298
2.71875
3
[]
no_license
package svkreml.challange8; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.encoders.Hex; import svkreml.FileManager; import svkreml.challenge1.HexBase64Converter; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException...
TypeScript
UTF-8
2,685
2.984375
3
[ "MIT" ]
permissive
/* * Extra rules for Eslint * * https://www.npmjs.com/package/eslint-plugin-more */ export default { plugins: ["more"], rules: { /* * Prohibits an empty line at the beggining of a class body * * https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/classbody-s...
Markdown
UTF-8
673
2.65625
3
[]
no_license
# Vika 14, 22.–28. nóvember 2021 **Þessi vikuáætlun hefur ekki verið uppfærð, hér er aðeins afrit frá [vefforritun 1, 2020](https://github.com/vefforritun/vef1-2020).** ## Fyrirlestrar [Fyrirlestur 13.1: HTML upprifjun](13.1.html.md), [vídeó](https://youtu.be/IEwV6h2K_Ww) [Fyrirlestur 13.2: CSS upprifjun](13.2.css....
Markdown
UTF-8
2,139
2.84375
3
[]
no_license
### Hi there 👋 <!-- **najamsk/najamsk** is a ✨ _special_ ✨ repository because its `README.md` (this file) appears on your GitHub profile. Here are some ideas to get you started: - 🔭 I’m currently working on ... - 🌱 I’m currently learning ... - 👯 I’m looking to collaborate on ... - 🤔 I’m looking for help with .....
Java
UTF-8
611
2.265625
2
[]
no_license
package com.abstraites.exercice; public class Test { public static void main(String[] args) { AgentAccueil aa = new AgentAccueil("Agent"); VeilleurDeNuit vn = new VeilleurDeNuit("Veilleur"); Administratif admin = new Administratif("administratif"); Resident res = new Resident("Georges", "go@pop.fr", 0); ...
Python
UTF-8
8,192
2.859375
3
[]
no_license
import tensorflow as tf import pylab import numpy import sys import wave from scipy.stats import mode from collections import deque from PIL import Image, ImageChops from ConfigParser import ConfigParser """ This script will be given a file and will classify audio frame-to-frame. Usage: TODO """ def read_and_predict...
Python
UTF-8
1,387
2.75
3
[]
no_license
from dwave.system.samplers import DWaveSampler from dwave.system.composites import EmbeddingComposite from itertools import combinations Sampler = EmbeddingComposite(DWaveSampler()) #Traveling Salesman problem distance = [4,6,5,1,4,7] E = len(distance) N = int((1+(1+E*8)**0.5)/2) #calculate based on edges cities...
C++
UTF-8
939
3.125
3
[]
no_license
#include "ThreadSafeQueue.h" #include<iostream> #include <syncstream> #include<string> int main() { using namespace std::this_thread; using namespace std::chrono_literals; TSQ::ThreadsafeQueue<int> queue { }; std::thread prod1 { [&] { sleep_for(10ms); // demonstration only for (int j = 0; j < 10; ++j) ...
PHP
UTF-8
2,119
2.71875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; use yii\base\Model; class Organization extends Model { private static $arrStructure = array( '西北农林科技大学' => array( '信息工程学院', '农学院', '植保学院', '理学院', '生命科学院', ), '校外用户' => array(), ); p...
Markdown
UTF-8
16,198
2.90625
3
[ "Apache-2.0" ]
permissive
## FID查询 ### 示例功能 本示例在二维视图中加载显示一个地图文档服务数据,坐标系为`Web墨卡托`,使用`FID查询`MapGIS矢量图层中地图要素相关的信息。 ### 示例实现 本示例需要使用include-mapboxgl-local.js开发库实现,通过关键接口`Zondy.Service.QueryLayerFeature()`实现MapGIS矢量图层的`FID查询`功能。 > 开发库使用请参见**首页**-**概述**-**原生JS调用**内容 > MapGIS IGServer发布地图文档服务请参见`MapGIS IGServer`目录下的`地图-EPSG3857`示例的说明部分 ### 实现步骤...
Shell
UTF-8
790
3.65625
4
[]
no_license
# -*-shell-script-*- # # both ~/.bashrc and ~/.bash_profile are symbolic links to this # file. I have the same settings for login and non-login shells. # # debug # set -ux etcpath="${HOME}/etc" interactive=$(echo $- | grep -vc i) if [ $interactive -eq 0 ]; then echo "$0: Interactive session. Turning on outp...
Java
UTF-8
785
2.34375
2
[]
no_license
package com.video.vip.basics.exception; /** * Created by yanghongtao1 on 2019/1/8. */ public class DependencyException extends RuntimeException { private static final long serialVersionUID = 936915964862903634L; private Type type; private Throwable causeThrowable; public DependencyException(Type ...
Markdown
UTF-8
818
2.734375
3
[]
no_license
# spirl-readings A collection of reading material for the [Workshop on "Structure &amp; Priors in Reinforcement Learning" (SPiRL)](https://eringrant.github.io/spirl). To contribute a reference, follow the instructions below to make a pull request. ### Pull Request Instructions 1. Find the BibTeX entry for the refere...
JavaScript
UTF-8
5,957
2.75
3
[]
no_license
/* eslint-disable prefer-const */ /* eslint-disable no-unneeded-ternary */ /* eslint-disable react/jsx-key */ /* eslint-disable no-useless-return */ /* eslint-disable react/prop-types */ /* eslint-disable lines-between-class-members */ /* eslint-disable no-useless-constructor */ /* eslint-disable react/jsx-no-undef */ ...
Java
UTF-8
739
2.375
2
[]
no_license
import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class SolutionTest { Solution solution = new Solution(); @Test public void test_1() throws Exception { // int s = solution.so...
Java
UTF-8
524
2.15625
2
[]
no_license
package tool; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; import com.github.cage.Cage; import com.github.cage.IGenerator; @Component public class MyCage extends Cage { publi...
C++
UTF-8
603
2.71875
3
[]
no_license
#include<iostream> #include<string> using namespace std; string alp[] = { "c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z=" }; int ans; int main(void) { ios::sync_with_stdio(NULL); cin.tie(NULL); cout.tie(NULL); string str; cin >> str; ans = 0; for (int i = 0; i < str.size(); i++) { ++ans; for (int j = 0;...
Java
UTF-8
1,141
2.046875
2
[]
no_license
package printfsm.revisitor.operations.printfsm.impl; import fsm.FinalState; import fsm.revisitor.FsmRevisitor; import printfsm.revisitor.operations.printfsm.FinalStateOperation; import printfsm.revisitor.operations.printfsm.InitialStateOperation; import printfsm.revisitor.operations.printfsm.MachineOperation; import p...
Java
UTF-8
997
2.328125
2
[]
no_license
package bg.softuni.andreys.persistence; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; import bg.softuni.andreys.common.enums.CategoryType; import bg.softuni.andreys.persistence.e...