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
665
3.9375
4
[]
no_license
def binarySearch(my_array, target): left = 0 right = len(my_array) - 1 while left <= right: mid = (left + right) // 2 mid_element = my_array[mid] if target == mid_element: print('element is at : ', mid) return mid_element elif target > mid_element: ...
Python
UTF-8
689
2.875
3
[]
no_license
import requests from time import * url = "http://natas17.natas.labs.overthewire.org/" uname = 'natas17' password = '8Ps3H0GWbn5rd9S7GmAdgQNdkhPkq9cw' all_possible_chars = '0123456789abcdefghijklmnopqrstuvwxysABCDEFGHIJKLMNOPQRSTUVWXYZ' lis = list() while(len("".join(lis))<32): for char in all_possible_chars: s...
Shell
UTF-8
1,700
3.15625
3
[]
no_license
#!/bin/bash qubes_vm_type="$(qubesdb-read /qubes-vm-type)" config_foxyproxy(){ echo "Configuring Foxyproxy" #disable Addon Signature verification #echo 'pref("xpinstall.signatures.required", false);' > /home/user/.tb/tor-browser/Browser/TorBrowser/Data/Browser/profile.default/preferences/addons_unsigned_allow...
JavaScript
UTF-8
1,270
3.015625
3
[]
no_license
let fs = require ('fs'); let listarArchivo = () let empleados = [{ id: 1, nombre: 'Juan' },{ id: 2, nombre: 'Pedro' },{ id: 3, nombre: 'Antonio' }]; let productos = [{ id : 1, nombre: 'arroz' },{ id : 2, nombre: 'Frijol' },{ id : 3, nombre: 'Avena' }]; let buscarEmpleado = async (id) => { let emplea...
C#
UTF-8
4,713
2.53125
3
[ "MIT" ]
permissive
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using System; using System.Diagnostics; using System.IO.Pipelines; using System.Net; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; namespace NeoFx.TestNode { ...
Python
UTF-8
4,509
2.703125
3
[]
no_license
from functools import reduce import re import sys RANGE_PATTERN = re.compile( r'^(?P<name>[\w\ ]+): (?P<range_1>\d+\-\d+) or (?P<range_2>\d+\-\d+)$') def parse_category_ranges(ranges_block): range_matches = (RANGE_PATTERN.match(range_line).groupdict() for range_line in ranges...
JavaScript
UTF-8
4,398
3.328125
3
[]
no_license
var width = 750; var length = 500; var cutegirlObjects = []; var result, runresult, runresultleft, jumpresult; var i = 0; var myInterval; var index = 0; //blob elements var j = []; var k = []; var x = []; var y = []; var b = []; var z = []; var pinkblob; var darkpinkblob; var purpleblob; //backgrou...
Python
UTF-8
2,287
2.625
3
[]
no_license
import os import requests from requests.auth import HTTPBasicAuth import json from flask import Flask, render_template, flash, request from werkzeug.utils import secure_filename def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config...
Rust
UTF-8
186
2.578125
3
[]
no_license
use serde::Serialize; #[derive(Serialize)] pub struct Foo{ x: u64, } #[no_mangle] pub extern "C" fn call_test_function(x: u64, y: u64 ) -> u64 { testing::test_function(x, y) }
Python
UTF-8
1,174
3.453125
3
[]
no_license
# Description # #____ import os from os import walk # Output full path of an inputted file name (incl. extension) def get_fullPath_of_fileName(fileName): # Get full path of current directory directoryFullPath = os.getcwd() # Identify all occurences of the file name in entire directory and add them to...
Java
UTF-8
7,366
2.078125
2
[ "MIT" ]
permissive
package com.team2052.frckrawler.fragments.metric.dialog; import android.app.Dialog; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import and...
Shell
UTF-8
2,284
4.09375
4
[ "MIT" ]
permissive
#!/bin/bash if [ $# -lt 2 ] then echo "Usage: $0 job_name number_of_stacks" exit 1 fi log=$1_stacks-`date +%H%M`.log time_log=$1_time_log-`date +%H%M`.log api_time_log=$1_api_time_log-`date +%H%M`.log per_request_log=$1_per_request_log-`date +%H%M`.log avg_request_log=$1_avg_request_log-`date +%H%M`.log too_slow=...
C++
UTF-8
824
2.671875
3
[]
no_license
#include <cstdio> using namespace std; typedef unsigned long long ull; ull dbl_area(ull x1, ull y1, ull x2, ull y2, ull x3, ull y3) { return x1 * (y3 - y2) + x2 * (y1 - y3) + x3 * (y2 - y1); } int main() { int zz; scanf("%d", &zz); for (int z = 1; z <= zz; ++z) { int N, M, A; scanf("%...
Java
UTF-8
7,565
2.46875
2
[]
no_license
import kdb.Client; import kdb.KdbException; import java.io.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.concurrent.atomic.AtomicInteger; import java.time.LocalTime; import java.time.LocalDateTime; import com.go...
Java
UTF-8
1,167
3.734375
4
[]
no_license
import java.util.*; import java.util.LinkedList; class BreadthFirstTraversal { static class Node { int data; Node left; Node right; Node(int d) { data = d; left = null; right = null; } } Node root; public Node createTree(Node root1 , int arr[] , int ind) { if(ind < arr.leng...
C++
UTF-8
1,449
3.234375
3
[]
no_license
#include<iostream> #define CORNER 0 #define UP 1 #define LEFT 2 using namespace std; int n,m; void memoization(char s1[],char s2[],int n,int m){ int a[m+1][n+1],b[m+1][n+1]; for(int i=0;i<=n;i++){ a[0][i]=0; b[i][0]=-1; } for(int i=0;i<=m;i++){ a[i][0]=0; b[i][0]=-1; ...
C++
UTF-8
1,503
2.546875
3
[]
no_license
/* Citation and Sources... Final Project Milestone 4 Module: Patient Filename: Patient.h Version 1.0 Author Inae Kim Seneca ID : 132329202 Seneca email : ikim36@myseneca.ca Revision History ----------------------------------------------------------- Date Reason 2021/7/22 Preliminary release ---------------------...
Python
UTF-8
801
2.953125
3
[]
no_license
#!/usr/bin/python3 """ use REST API {JSON} Placeholder Gather data from an API. """ if __name__ == "__main__": import json import requests from sys import argv id = argv[1] url = 'https://jsonplaceholder.typicode.com/' user = requests.get('{}users/{}'.format(url, id)) user = user.json() ...
Rust
UTF-8
1,515
2.796875
3
[]
no_license
pub mod error; use serde::{Deserialize, Serialize}; pub type Index = i64; const DEFAULT_OFFSET: Index = 0; const DEFAULT_LIMIT: Index = 50; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct QueryOptions { offset: Option<Index>, limit: Option<Index>, } impl Default for QueryOptions { fn default...
JavaScript
UTF-8
1,263
3.1875
3
[]
no_license
/** * @param {number[]} height * @return {number} */ var trap = function(height) { if (height == null || height.length == 0) { return 0; } let res = 0, size = height.length, temp = 0, max = [0, 0], min = [0, 0] // key , value for (let i = 0; i <= size; i++) { if (i...
PHP
UTF-8
1,269
2.734375
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; use App\Administrator; class AdministratorSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { //TABLA DE LOS CHECADORES DB::table('administrators')->delete(); $faker = \Faker\...
C
UTF-8
1,979
2.828125
3
[]
no_license
/* ************************************************************************** */ /* */ /* :::::::: */ /* get_next_line_utils.c :+: :+: ...
PHP
UTF-8
1,293
2.546875
3
[ "MIT" ]
permissive
<?php namespace Drivezy\LaravelAccessManager\Controllers; use App\User; use Drivezy\LaravelRecordManager\Controllers\RecordController; use Drivezy\LaravelUtility\LaravelUtility; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; /** * Class UserController * @package...
Go
UTF-8
3,025
3.109375
3
[]
no_license
package main import ( "fmt" "os" "bufio" "errors" "sync" "io/ioutil" "sync/atomic" "strings" "regexp" "encoding/base64" ) func main() { defer func() { if err := recover(); err != nil { fmt.Println("error:" ,err) } getParam("exit") }() // 线程数 threadNum := 1024 dir := getParam("请输入当前m3u8和key文件的...
Ruby
UTF-8
2,102
2.625
3
[]
no_license
require 'test_helper' class MovieTest < ActiveSupport::TestCase def setup @movie = Movie.create!(tmdb_id: 123) @user = User.create!(email: 'test@test.com', password: 'password', username: 'something') end test '.with_user_data includes user rating' do @user.ratings.create!(movie: @movie, value: 5) ...
Python
UTF-8
240
3.875
4
[]
no_license
"""add, subtract, multiply, divide function""" def add(x,y): return x+y def subtract(x,y): return x-y def multiply(x,y): return x*y def divide(x,y): if y==0: raise ValueError("Can't divide by zero") return x/y
PHP
UTF-8
2,575
2.828125
3
[]
no_license
<?php include ("conexion.php"); include("cls_vehiculo.php"); $vehiculo=new Vehiculo(); if($_POST){ $vehiculo->id=$_POST["txtId"]; $vehiculo->matricula=$_POST["txtMatricula"]; $vehiculo->marca=$_POST["txtMarca"]; $vehiculo->modelo=$_POST["txtModelo"]; $vehiculo->color=$_POST["txtColor"]; $vehiculo->precio=$_POST...
Markdown
UTF-8
1,353
2.984375
3
[]
no_license
--- title: Data Science Consulting --- I want to help you understand your data. Especially if you're working in the biomedical or clinical sciences. I work with academia, industry, and the public sector. My [portfolio](../portfolio) gives a sample of what I help with. Email me at daniel@datamd.info with any questions...
PHP
UTF-8
3,259
2.765625
3
[]
no_license
<?php class ContentType { private static $extensionMap = array( 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'json' => 'application/json', 'php' => 'text/x-php', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'odt' => 'appl...
Java
UTF-8
925
2.53125
3
[]
no_license
package TechGuard.x1337x.Archers; import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; public class CraftUpdate { public static void addItem(Player p, ItemStack q) { CraftInventoryPlayer pInv = (CraftInventoryPlayer)p.getInvento...
C++
UTF-8
697
2.921875
3
[]
no_license
#include <iostream> using namespace std; int main() { double odds = 0.65; char bet[3] = {'W', 'T', 'L'}; int best[3]; for (int i = 0; i < 3; i++) { double w, t, l; scanf("%lf%lf%lf", &w, &t, &l); if (w >= t && w >= l) { best[i] = 0; odds *= w; ...
Markdown
UTF-8
1,021
2.796875
3
[]
no_license
# acf-as-library Easy and clean config of the Advanced Custom Fields WordPress plugin to load it as a composer library. Simplify the process described here: https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/ ## How to use: 1. Make sure you have an environment varible with you ACF licence ...
Ruby
UTF-8
817
2.828125
3
[ "MIT" ]
permissive
require "state_machine" require "state_machine_setters/version" module StateMachineSetters def state_machine_setter(state_machine_name) ensure_state_machine!(state_machine_name) add_state_machine_setters(state_machine_name) end private def ensure_state_machine!(name) return if respond_to?(:state...
Markdown
UTF-8
2,471
2.6875
3
[]
no_license
# IFE春季班第一阶段任务 任务发布在 [http://ife.baidu.com/task/all](http://ife.baidu.com/task/all) 第一阶段的主要目标是帮助大家 了解、认识、学习、掌握HTML及CSS。第一阶段任务从 3月14日 开始,持续到 4月3日。 ## 任务一:面向零基础的HTML代码编写 - [任务介绍](http://ife.baidu.com/task/detail?taskId=1) - [提交的源码](https://github.com/IFE-W3C/IFE-W3C.github.io/blob/master/Stage1/Task1/index.html) - [在...
Markdown
UTF-8
1,532
2.78125
3
[]
no_license
# Tests cucumber Ce document présente les tests que nous avons réalisés sur notre application. ## Prérequis Afin d'exécuter les tests sur notre application, il faut les prérequis suivants: #### Sans docker - Avoir un serveur MySQL qui tourne - La string de connexion est présente dans le fichier ` application.pr...
Go
UTF-8
1,214
2.578125
3
[]
no_license
package main import ( "fmt" "net" "syscall" "header" ) func main() { addr, err := net.ResolveUDPAddr("udp", "0.0.0.0:12345") if err != nil { fmt.Println(err) return } conn, err := net.ListenUDP("udp", addr) if err != nil { fmt.Println(err) return } defer conn.Close() for { data := make([]byt...
C
UTF-8
530
2.53125
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** CPE_lemin_2019 ** File description: ** The step class header. */ #ifndef STEP_H #define STEP_H #include "object.h" #include "string.h" #include "type.h" #include "base.h" typedef struct step step; struct step { object parent; string *name; step *next; int index; bo...
Markdown
UTF-8
1,419
3.125
3
[]
no_license
Simple MVC core Framework 1) What is MVC? MVC stands for Model–View–Controller. Details can be found at the following adrees: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller According to wikipedia, the descriptions of components are: Model: The central component of the pattern. - It i...
Swift
UTF-8
1,527
3
3
[]
no_license
// // TouchableSpriteNode.swift // Tompero // // Created by Enzo Maruffa Moreira on 30/11/19. // Copyright © 2019 Tompero. All rights reserved. // import Foundation import SpriteKit class TappableSpriteNode: SKSpriteNode { override init(texture: SKTexture?, color: UIColor, size: CGSize) { super.i...
Python
UTF-8
7,307
2.515625
3
[ "MIT" ]
permissive
from PIL import Image, ImageDraw, ImageFont from os import listdir import os import pandas as pd import numpy as np from kuzushiji_data import data_config class KuzushijiDataSet: """ データセットの取り扱い """ def __init__(self): self.__config() return def __config(self): ...
Java
UTF-8
3,392
3.34375
3
[]
no_license
import java.util.ArrayList; import java.io.PrintWriter; public class lab3{ // // Class Variables // static int startTest = 100; // Initial n static int increment = 100; // Number by which n increments static int endTest = 3000; // Final n static int startTestSlow = 2; // Initial n st...
C#
UTF-8
356
2.703125
3
[]
no_license
var query = _keylist .SelectMany(k => dictionary[k]) .Aggregate( new Dictionary<int, int>(), (d, v) => { if (d.ContainsKey(v)) { d[v] += 1; } else { d[v] = 1; } return d; }) .OrderByDescending(kvp => kvp.Value) .Select(kvp => new { key = k...
PHP
UTF-8
464
3.328125
3
[]
no_license
<?php fscanf(STDIN, "%s", $expression); // Write an action using echo(). DON'T FORGET THE TRAILING \n // To debug (equivalent to var_dump): error_log(var_export($var, true)); $cut = preg_replace("/\w/", '', $expression); do { $expression = $cut; $cut = str_replace(array('[]', '{}',...
Python
UTF-8
2,108
2.578125
3
[]
no_license
import os from flask_restful import abort from werkzeug.utils import secure_filename import uuid class ImageService: @staticmethod def read_all(tags=None): """ Получение списка изображений с фильтрацией по тегам """ from image_manager.models.image import Image, ImageSchema, Tag ...
Python
UTF-8
959
4.1875
4
[]
no_license
""" Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node """ __author__ = "Shruthi" class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None cl...
PHP
UTF-8
2,627
2.65625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Districts\Test\Editor\UI\Factory; use Districts\Editor\Domain\DistrictOrdering; use Districts\Editor\UI\Factory\DistrictOrderingFactory; use PHPUnit\Framework\TestCase; /** * @covers \Districts\Editor\UI\Factory\DistrictOrderingFactory */ class DistrictOrderingFactoryTest ...
PHP
UTF-8
734
2.546875
3
[]
no_license
<?php namespace Truelab\KottiFrontendBundle\BodyProcessor\Html; use Sunra\PhpSimple\HtmlDomParser; use Truelab\KottiFrontendBundle\BodyProcessor\AbstractBodyProcessorManager; /** * Class BodyProcessorManager * @package Truelab\KottiFrontendBundle\BodyProcessor */ class BodyProcessorManager extends AbstractBodyPro...
Java
UTF-8
1,022
3.09375
3
[]
no_license
package classwork.may12.properties; import java.io.*; import java.util.Properties; public class PropertiesTest { public static void main(String[] args) throws IOException { Properties properties = new Properties(); //InputStream is = PropertiesTest.class.getClassLoader().getResourceAsStream("c...
Java
UTF-8
431
1.789063
2
[]
no_license
package org.insonix.flipboard.services; import java.util.List; import org.insonix.flipboard.dto.FlipboardPostDto; import org.insonix.flipboard.models.FlipboardPost; public interface FlipboardPostService extends BaseService<FlipboardPost, Long> { public FlipboardPostDto savePost(FlipboardPostDto flipboardPostDto)...
JavaScript
UTF-8
1,086
3.609375
4
[]
no_license
//get URL of API let URL = "https://breakingbadapi.com/api/characters" console.log(URL) //go and fetch the URL fetch(URL) //once the URL is fetched, set it equal to res, convert to json .then(res => res.json()) .then(convertedData => { console.log(convertedData) let results = conve...
Python
UTF-8
411
3.9375
4
[]
no_license
# 변수 선언과 사용 # 변수 앞에 자료형 생략 n = 10 print(n) print("n = ", n) # 3box = 'k' (변수 이름은 숫자로 시작할 수 없다.) #num x = 100 (변수 이름에는 공백이 있으면 안된다.) name = "이은수" print("이름 : ", name) print("이름 = " + name) #출력시에 문자와 변수는 (,) 콤마로 연결 #출력시에 문자만 있는 경우는 '+' 연산자 사용
C
UTF-8
329
3.359375
3
[]
no_license
#include <stdio.h> #include <math.h> #include <stdbool.h> bool laTamGiac(float a, float b, float c) { return c > fabsf(b - a); } int main() { float a, b, c; scanf("%f%f%f", &a, &b, &c); if (laTamGiac(a, b, c)) printf("La tam giac\n"); else printf("Khong phai la tam giac\n"); re...
Java
UTF-8
3,197
2.59375
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2016 HuntBugs contributors * * 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 ...
Python
UTF-8
629
2.578125
3
[]
no_license
import discord import json from discord.ext import commands config = json.load(open('config.json')) bot = commands.Bot(command_prefix=['>>'], description='Need a multitool?!') bot.remove_command('help') extensions = ['cogs.lastFM', 'cogs.general'] @bot.event async def on_ready(): print('Logged in as') print...
Python
UTF-8
218
4.3125
4
[]
no_license
# 2.8.py # A program to convert Fahrenheit temps to Celsius def main(): fah = input("What is the Fahrenheit temperature? ") cel = (fah-32.0)*5.0/9.0 print "The temperature is", cel, "degrees Celsius." main()
TypeScript
UTF-8
2,958
2.890625
3
[ "MIT" ]
permissive
import _ from 'lodash'; import { GetExpenses_me_expenses } from '../types/GetExpenses'; import { GetExpensesThisMonth_getExpenses_expensesThisMonth } from '../types/GetExpensesThisMonth'; import { GetExpensesLastMonth_getExpenses_expensesLastMonth } from '../types/GetExpensesLastMonth'; const MONTH_NAMES = [ 'Januar...
Python
UTF-8
783
2.671875
3
[]
no_license
from datetime import datetime class UserModel: def __init__(self, id, full_name, username, limit=0, createdAt=datetime.now()): self._id = id self.full_name = full_name self.username = username self.reputation = 0 self.rep_given = 0 self.rep_limit = limit sel...
Python
UTF-8
1,474
3.203125
3
[]
no_license
""" Code illustration: 2.08 A demonstration of tkinter.messagebox showinfo showwarning showerror askquestion askokcancel askyesno askyesnocancel askretrycancel @Tkinter GUI Application Development Blueprints """ from tkinter import Tk, Frame, Label, Button, BOTH, LEFT import tkinter.messagebox as tmb root = Tk() ...
Shell
UTF-8
5,789
3.921875
4
[ "MIT" ]
permissive
#!/bin/sh # Summary: # This script makes setting up Ion (ION) miners and remote ionodes easy! # It will download the latest startup script which can: # * Download and run the executables # * Download the Bootstrap # * Download the Blockchain # * Auto Scrapes # * Auto Updates # * Watchdog to keep the mining going...
Python
UTF-8
1,138
2.890625
3
[]
no_license
from sklearn.metrics import accuracy_score import utils.Tagging_Task_Data_Handler as Tagging_Task_Data_Handler # Create a scoring function to change the formatting of gold labels from list of sentence lists # to a big list of tags. # Also, ignore all labels which were ignored in training (I.e. null labels) def tag_acc...
JavaScript
UTF-8
361
2.671875
3
[]
no_license
export const btn = document.getElementById("action"); btn.addEventListener("click", function () { //Do something here let boxwidthinput = document.getElementById("myInput").value; let boxwidthinputnumber = parseFloat(boxwidthinput); if (boxwidthinputnumber != 0) { cube.scale.x = boxwidthinputnu...
Java
UTF-8
2,143
2.4375
2
[]
no_license
package br.edu.ifrs.modelo.bean; import java.util.*; /** * * @author mathias * Data: dia 24 / 06 * Descricao: Classe java para objeto Evento; */ public class Evento { private String solicitante; private String entidadeSolicitante; private String email; private String telefone; private Date Ini...
Python
UTF-8
641
3.109375
3
[]
no_license
import numpy from scipy.signal import chirp, sawtooth, square, gausspulse import matplotlib.pyplot as plt t=numpy.linspace(-1,1,1000) plt.subplot(221); plt.ylim([-2,2]) plt.plot(t,chirp(t,f0=100,t1=0.5,f1=200)) # plot a chirp plt.title("Chirp signal") plt.subplot(222); plt.ylim([-2,2]) plt.plot(t,gausspulse(t,fc=10...
Python
UTF-8
1,342
2.640625
3
[]
no_license
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, IntegerField, DateField, SelectField, FieldList from wtforms.validators import DataRequired, InputRequired traitlist = [(0, 'Active'), (1, 'Friendly'), (2, 'Creative'), (3, 'Clever'), (4, 'Self-Assured'), (5...
Markdown
UTF-8
2,228
2.8125
3
[]
no_license
--- layout: review author: Tom date: 2013-09-02 title: Daughter | Youth band: Daughter tags: - Daughter recordTitle: Youth label: 4AD recordFormat: single releaseDate: 2013-09-02 buyItLink: http://www.roughtrade.com/albums/75153 buyItLinkTitle: Rough Trade miniDescription: Daughter hit the nail on the head yet agai...
Java
UTF-8
1,655
2.375
2
[ "MIT" ]
permissive
package ch.eiafr.web.dns; import java.io.IOException; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.Arrays; import java.util.Collection; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners...
Markdown
UTF-8
12,271
3.0625
3
[]
no_license
# Table of Contents 1. [Getting Started](#org9487965) 1. [Run the virtual environment](#org064a7a6) 2. [Set environment variables](#org5d20a79) 3. [Install dependencies](#org4873152) 4. [Start the server](#org375e182) 5. [Go to `127.0.0.1:5000/`](#org64d7643) 1. [Preferably test usi...
Java
UTF-8
1,656
2.28125
2
[]
no_license
package com.bblanqiu.common.mysql.model; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.hibernate.annotations.GenericGen...
Markdown
UTF-8
6,729
2.671875
3
[ "Apache-2.0" ]
permissive
--- title: Oracle Text Notes author: rupert layout: post permalink: /2008/08/oracle-text-notes/ aktt_tweeted: - 1 categories: - oracle tags: - oracle --- Just a couple of notes from studying Oracle Text&#8230; 1. What is the default index? Its CONTEXT. The text column can be of type CLOB, BLOB, BFILE, VARCHAR...
PHP
UTF-8
1,394
3.046875
3
[]
no_license
<?php namespace Itkg\Log; use Monolog\Logger as BaseLogger; /** * Class Logger * * @author Pascal DENIS <pascal.denis@businessdecision.com> */ class Logger extends BaseLogger { /** * Log ID * * @var string */ protected $id = ''; /** * Initialize an ID */ public fun...
Rust
UTF-8
1,202
2.90625
3
[ "Apache-2.0" ]
permissive
pub struct FooState; use qml::*; use std::process::Command; impl FooState { pub fn simple_receiver(&mut self) -> Option<&QVariant> { println!("Slot called"); // This is a function that also will be a slot None } fn is_git_repo(&mut self, file_path: &String) -> bool { le...
C#
UTF-8
14,312
2.96875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Drawing; namespace OOD2 { class Circuit { // Color definitions for colouring connections Color cTrue, cFalse, cUnknown; IElement firstSelectedId...
C
UTF-8
1,745
3.296875
3
[]
no_license
#include <stdio.h> static char digits[] = "0123456789abcdef"; /* * mac_addr_to_str() * * Converts an ethernet MAC address from hex to a * xx:xx:xx:xx:xx:xx string extern char * mac_addr_to_str (const short *mac_addr, mac_string_t mac_str) { #define MAX_LOCAL_BUFFER 2 static mac_string_t local_buffer[MAX_LOCAL...
Java
UTF-8
5,426
2.015625
2
[]
no_license
package com.example.crudmhs; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.os.PersistableBundle; import android.util.Log; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.MenuInflater; import android.view.MenuItem; imp...
Markdown
UTF-8
864
2.640625
3
[]
no_license
# tp1-FacianoHE *1. b) - Es conveniente incluir .gitignore porque el peso total de proyecto será mucho menor y eso redundará en un mejor mantenimiento y distribución del código. - Siempre es conveniente usarlo. - Una alternativa sería escribir las siguientes palabras clave: OSX, Windows, Node, Polymer, SublimeText. E...
C++
UTF-8
1,731
2.75
3
[ "BSD-2-Clause" ]
permissive
#include "FSGD.h" namespace DBoW3 { void FSGD::meanValue(const std::vector<FSGD::pDescriptor> &descriptors, FSGD::TDescriptor &mean) { mean = cv::Mat::zeros(1, FSGD::L, CV_32F); float s = descriptors.size(); std::vector<FSGD::pDescriptor>::const_iterator it; for(it = descriptors.begin(); it != desc...
Java
UTF-8
9,182
1.835938
2
[]
no_license
/*Copyright 2016 stoneriver * *Licensed under the Apache License, Version 2.0 (the "License"); *you may not use this file except in compliance with the License. *You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *Unless required by applicable law or agreed to in...
TypeScript
UTF-8
912
2.78125
3
[]
no_license
import { Injectable , EventEmitter} from "@angular/core"; import { LogService } from "../shared/log.service"; @Injectable() // Permite a Injeccao de Dependencia em outra classe que necessite export class CursosService { private cursos: string[] = ['Java 14', 'Quarkus', "Angular2 v.11"]; emitirCursoCriado ...
Python
UTF-8
2,818
3.078125
3
[]
no_license
#!coding=utf-8 from sklearn.datasets import make_blobs from sklearn.model_selection import train_test_split import numpy as np import h5py import math def convert_to_one_hot(label, classes): # label -->> one-hot label = np.array(label) label = np.eye(classes)[label.reshape(-1)] return label def generate...
C#
UTF-8
1,434
2.71875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections.ObjectModel; namespace Gallery.Behaviours.ListViewItemContextMenuBehaviour { public class ListViewItemContextMenuBehaviourViewModel : GalleryItemViewModel { public ListViewItemConte...
Markdown
UTF-8
680
2.875
3
[]
no_license
# WordPress主题:Writing 这是一个简洁的WordPress博客主题,为专注写作而设计。 ## 主要特色 - Bootstrap4; - 自适应,支持PC、Pad、手机端; - 支持八种主题配色:白、浅灰、蓝、浅蓝、黑、绿、橙、红; - 支持设置背景色和背景图片; - 两栏设计; - 定制的标签云小工具:可设置显示标签数量; - 定制高级文章小工具; - 标签云页面模板、全宽页面模板; - 支持文章形式:标准、图像、日志、状态、链接、引语、相册; - 除了文章形式自带不同样式,列表支持有图、无图、大图(对应文章形式:图像)等多种样式;
Python
UTF-8
2,132
2.6875
3
[]
no_license
from django.test import TestCase from .models import TechType, Product, Review from django.urls import reverse from django.contrib.auth.models import User # Create your tests here. #TEST FOR MODELS class TechTypeTest(TestCase): def test_str(self): #we are saying that the techtype name is laptop #...
SQL
UTF-8
509
2.921875
3
[]
no_license
with base as ( select * from {{ source('marketo','activity_merge_leads') }} ), fields as ( select id as activity_id, _fivetran_synced, activity_date as activity_timestamp, activity_type_id, campaign_id, lead_id, master_updated, trim(trim(mer...
Markdown
UTF-8
2,424
3.484375
3
[ "BSD-2-Clause" ]
permissive
immutable ========= generic functions to support immutable functional programming idioms [![Build Status](https://travis-ci.org/fcostin/py-immutable.png)](https://travis-ci.org/fcostin/py-immutable) ### motivation * state makes things harder to reason about. * most of the time you don't need state, values work...
Markdown
UTF-8
829
2.5625
3
[]
no_license
# Video Meeting [![Run on Repl.it](https://repl.it/badge/github/0x5eba/Video-Meeting)](https://repl.it/github/0x5eba/Video-Meeting) Google Meet / Zoom clone in a few lines of code. Video Meeting is a video conference website that lets you stay in touch with all your friends. Developed with ReactJS, Node.js, SocketI...
PHP
UTF-8
1,577
2.8125
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace SyliusCart\Domain\Model; use Broadway\Domain\AggregateRoot; use Ramsey\Uuid\UuidInterface; use SyliusCart\Domain\Adapter\AvailableCurrencies\AvailableCurrenciesProviderInterface; /** * @author Arkadiusz Krakowiak <arkadiusz.k.e@gmail.com> */ interface CartContract extend...
Java
UTF-8
1,323
3.140625
3
[]
no_license
package Blatt6.Aufgabe2; import java.io.File; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; public class FileWatcher implements Runnable { pri...
Markdown
UTF-8
1,916
3.484375
3
[]
no_license
请实现 copyRandomList 函数,复制一个复杂链表。在复杂链表中,每个节点除了有一个 next 指针指向下一个节点,还有一个 random 指针指向链表中的任意节点或者 null。 ## 分析 本题的难点在于random 节点时随机指向的。如果是在复制节点的过程中同时复制random话,那么在复制的过程中有可能出现当前节点的random 指向的节点还没有被被复制,导致random 无法一同被复制 ## 思路 拆分成三步 1.复制一份链表放在前一个节点后面,即根据原始链表的每个节点N创建N `,把N`直接放在N的next位置,让复制后的链表和原始链表组成新的链表。 2.给复制的链表random赋值,...
C++
UTF-8
6,721
2.640625
3
[]
no_license
#include "stdafx.h" #include "ImmediateModeRenderer20.h" #include "Color.h" ImmediateModeRenderer20::ImmediateModeRenderer20(bool hasNormals, bool hasColors, int numTexCoords) { init(5000, hasNormals, hasColors, m_numTexCoords); } ImmediateModeRenderer20::ImmediateModeRenderer20(int maxVertices, bool hasNormals, boo...
Python
UTF-8
542
3.765625
4
[]
no_license
# 复制一段文本,在每行前面加上一个 * import pyperclip text = pyperclip.paste() # 从剪切板获取文本 li = text.split('\n') # 按行切割文本, 得到一个字符串列表 li_new = [] # 新建一个空列表 for line in li: # 遍历列表 li_new.append('*'+line) # 每一行都加上* 追加...
Markdown
UTF-8
2,924
2.515625
3
[ "Unlicense" ]
permissive
# “Pazza idea”: l’ex Hotel Riviera all’ArisMe. Scurria: Alloggi per i baraccati Published at: **2019-11-06T11:33:26+00:00** Author: **Rosaria Brancato** Original: [Tempostretto](https://www.tempostretto.it/news/pazza-idea-lex-hotel-riviera-allarisme-scurria-alloggi-per-gli-ex-baraccati.html) Messina- Entr...
Java
UTF-8
6,310
2.6875
3
[ "MIT" ]
permissive
package algorithm; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import tools.*; import Model.*; import java.io.*; public class EditDistance extends AutoAlgorithm { //Distance of: Match, Insert, Delete, Replace privat...
C++
UTF-8
584
2.640625
3
[]
no_license
#include <cstdio> #include <cmath> using namespace std; int main(){ int T,n; double p; scanf("%d",&T); while(T--){ scanf("%d %lf",&n,&p); double ans = 0; for(int i = n;i <= 2*n - 1;++i){ double aux = pow(1 - p,i - n); ...
Java
UTF-8
176
1.976563
2
[]
no_license
package com.daddy.demo.customSettings.Error; //自定义错误描述枚举类的接口 public interface BaseErrorInfoInterface { String getCode(); String getMsg(); }
Python
UTF-8
1,628
2.859375
3
[]
no_license
import cv2 from matplotlib import pyplot as plt img1=cv2.imread("chijou.jpg") img2=cv2.imread("laser.jpg") # グレー変換 gray1 = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY) gray2 = cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY) # SIFT特徴量の抽出と画像化 sift = cv2.xfeatures2d.SIFT_create() kp1 = sift.detect(gray1) kp2 = sift.detec...
Java
UTF-8
2,338
2.25
2
[]
no_license
package com.stsdev.votingbox.data.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; /** * Created by stavros on 17/6/2018. */ public class Category { //############################################################################################## //######...
C++
UTF-8
3,592
3.046875
3
[]
no_license
int sensorPin = A0; int moistureReading; int moistureRating; // The reading from the Moisture Detector expressed as a percentage. int memory[10]; int memoryIndex = 0; int squirtScore = 0; //The Squirt Score is determined by how many of the last 10 Moisture Ratings has a +1 to Squirt Score. //CONFIG SETTINGS int s...
Markdown
UTF-8
345
2.515625
3
[ "MIT" ]
permissive
--- layout: project_single title: "Getting a Teaching Job: My Teaching Portfolio" slug: "getting-a-teaching-job-my-teaching-portfolio" parent: "sample-resume-for-a-student-or-a-16-year-old-student" --- This is my second post in my "Getting a Teaching Job" series! Today I am sharing one of my favourite interview to...
C
UTF-8
4,737
2.953125
3
[]
no_license
#include "leds.h" uint16_t LEDChannels[(NUM_TLC5947)]; unsigned char brightnessShift= 0; void SetPoint( unsigned short x, unsigned short y,unsigned short val) { LEDChannels[ ( x * LEDS_WIDTH ) + ( LEDS_HEIGHT - y ) ] = val; } // 0.4095 void Clear(unsigned short val) { for(unsigned short LEDind...
C++
UTF-8
705
2.703125
3
[]
no_license
/********************************************************** * Name:Junhee Kim * Student ID:159777184 * Seneca email:jkim552@myseneca.ca * Section:NCC **********************************************************/ //I have done all the coding by myself and only copied the code that my profes-sor provided to complete ...