language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C++
UTF-8
4,410
3.09375
3
[]
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
Java
UTF-8
822
2.859375
3
[]
no_license
package ru.danilov.st.utils; import ru.danilov.st.timeseries.TimeSeries; public final class TimeSeriesUtil { private TimeSeriesUtil() {} public static double avg(TimeSeries series) { return sum(series) / series.size(); } public static double avgRange(TimeSeries series, int start, int end) {...
Java
UTF-8
220
1.882813
2
[]
no_license
package co.simplon.dao; import java.util.List; import co.simplon.model.Pays; public interface PaysDAO { List<Pays> lister(); void ajouter ( Pays pays ); void modifier(Pays pays); void effacer(Pays pays); }
Markdown
UTF-8
6,180
3.078125
3
[]
no_license
# Time_Series_Forest_Fire #### Introduction For my global warming study I used wildfire data from the National Centers for Environmental Information (NCEI) to examine the number of fires and acres burned from the years 2000 – 2021 within the United States. We can evaluate the data on a macro level for a trend in wild...
C++
GB18030
995
3.296875
3
[]
no_license
#pragma once #include <iostream> using namespace std; #define CONVERT_FIGURES (3) // λ һλ\0; #define CONVERT_HEX (36) // 0-9 A-Z 36; #define MAX_CONVERT_DIGIT (1295) // (CONVERT_HEXƽһ); class Convert { public: Convert() { for (int iIndex = 0; iIndex < CONVERT_HEX; iIndex++) { if (iIndex...
Markdown
UTF-8
6,768
3.140625
3
[]
no_license
六六 “我记得在文也念小学二年级的时候,我先生在公司里接受验血,回来就很不高兴。他问文也的血型。我想,完了!结果真的不同。我是A型,文也是O型。而我先生在验血前一直以为自己是B型,因为他的两个兄弟都是B型。” “结果他不是B型!” “嗯,检查结果是AB型。我先生也知道A型和AB型不可能生出O型的小孩。” “您也是当时才发现的吗?” “是啊,不过,老实说我并不意外。后来仔细一想,其实我在怀孕时,就有预感孩子不是他的,但是却故意忽视这种感觉。我早就发现,文也长得一点也不像我先生。” “后来您有没有把真相告诉梶川先生?” “我当然说了,因为根本不能再瞒下去了。” “...
SQL
UTF-8
1,843
3.859375
4
[]
no_license
CREATE DATABASE db_farmacia; USE db_farmacia; CREATE TABLE tb_categoria ( ID INT NOT NULL AUTO_INCREMENT, medicamentos VARCHAR (255) NOT NULL, genéricos VARCHAR(255) NOT NULL, saúde VARCHAR (255) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE tb_produto( id_produto INT AUTO_INCREMENT PRIMARY KEY, preco DE...
JavaScript
GB18030
4,473
2.59375
3
[]
no_license
var status = -1; var sel = -1; function action(mode, type, selection) { if (mode == 1) { status++; } else { if (status == 0) { cm.dispose(); } status--; } if (status == 0) { var selStr = "Dzɿ #bŵ#k\r\n"; if (cm.getPlayer().getProfessionLevel(92...
C++
UTF-8
874
2.828125
3
[]
no_license
/* Viz: Takes in a source text, and produces output for graphviz processing. Example Usage: viz source.txt | dot -Tpng > source-cfg.png */ #include <iostream> #include "program_knowledge_base/pkb_manager.h" #include "simple_parser/interface.h" using namespace std; int main(int argc, char** argv) { if (...
Python
UTF-8
283
2.78125
3
[]
no_license
from typing import List def parse(txt_block: str)->List[tuple]: # there's probably some clever regex that we can do here... but fuck it blocks = txt_block.strip().rsplit('>')[1:] return [(x[0], x[1].replace('\n','')) for x in [block.split('\n', 1) for block in blocks]]
C++
UTF-8
2,057
2.9375
3
[ "MIT" ]
permissive
#include "license.txt" #include <time.h> #ifdef _WIN32 #define CLOCK clock #else #include <sys/time.h> // for wall-clock timer (as opposed to clock cycle timer) /** Linux keeps track of time this way. clock() returns CPU cycles, not time. */ long long clock_NIX() { static timeval g_startTime = {0,0}; if(!g_startTime...
C#
UTF-8
1,606
2.703125
3
[ "BSD-3-Clause" ]
permissive
using System.Collections.Generic; using System.Linq; namespace mesoBoard.Common { public enum PostingPermissionValue { None = 0, Reply, Thread, Sticky, Announcments } public class PostingPermission : PermissionBase<PostingPermissionValue> { public Po...
Java
UTF-8
5,684
1.953125
2
[]
no_license
package com.yunos.tvtaobao.payment.alipay.task; import android.content.Context; import android.os.AsyncTask; import android.text.TextUtils; import com.ali.auth.third.core.MemberSDK; import com.ali.auth.third.core.callback.LoginCallback; import com.ali.auth.third.core.model.Session; import com.ali.auth.third.offline.l...
C++
UTF-8
1,548
3.046875
3
[]
no_license
#include "DynamicPositionComponent.h" #include <iostream> DynamicPositionComponent::DynamicPositionComponent(std::shared_ptr<Object> owner, sf::Vector2f position, Gravity& gravity, sf::Vector2f speed, sf::Vector2f currentSpeed) : PositionComponent(owner, position), gravity(gravity), currentSpeed(currentSpeed), speed...
Python
UTF-8
1,101
2.765625
3
[]
no_license
from datetime import datetime from spending_app.domain.incoming import Incoming def test_incoming_init(): incoming = Incoming(id=81, user_id=9, date=datetime(2018, 4, 20), sum=67, text='work') assert incoming.id == 81 assert incoming.user_id == 9 assert incoming.date == '2018-04-20' assert incom...
Java
UTF-8
6,270
2.265625
2
[ "Apache-2.0" ]
permissive
package io.piano.android.api.publisher.model; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class SubscriptionSummaryModelDefinition { private String date = null; private String newSubscriptionAmount = null; private String newSubscriptionTpFeeAmount = null; pr...
Python
UTF-8
2,000
3.25
3
[]
no_license
max = 20 import random class Cola(): def __init__(self): self.datos = [] for i in range(0, max): self.datos.append(None) self.frente = 0 self.final = -1 self.tamanio = 0 def arribo(cola, dato): cola.final += 1 if cola.final == max: ...
JavaScript
UTF-8
2,901
2.609375
3
[]
no_license
const jwt = require('jsonwebtoken'); const usersModel = require('../components/users/users.model'); // Funcion que valida la existencia de un token por usuario /*let verifyToken = (req, res, next) => { if (!req.headers.authorization) return res.status(401).json({ message: "No esta autorizado para ver esto" }); ...
Markdown
UTF-8
1,398
2.578125
3
[ "MIT" ]
permissive
# Minimizing Bundle Size For convenience, rrtr exposes its full API on the top-level `rrtr` import. However, this causes the entire rrtr library and its dependencies to be included in client bundles that include code that makes any imports from the top-level CommonJS bundle. There are two options for minimizing clien...
Java
UTF-8
147
1.914063
2
[]
no_license
package org.sma.balls; public class TestBalls { public static void main(String[] args) { Balls b = new Balls(10); System.out.println(b); } }
C++
UTF-8
5,815
2.53125
3
[ "CC0-1.0" ]
permissive
// ********************************************************************* // // main.cpp // // Created by: Elie Dolgin, University of Edinburgh // Mofified by: Kamil S. Jaron, University of Lausanne // // First started: March 11, 2005 // Last edited: // // ****************************************************************...
JavaScript
UTF-8
6,915
2.640625
3
[]
no_license
// Calling page must define projectLatLng to center the map in case there are no facts available. var markers = new Array(); var map; var bounds; var infowindow; var paletteControl; var newMarkerControl; function init_map(){ infowindow = new google.maps.InfoWindow(); var google_map_options = { mapTypeControl: ...
Python
UTF-8
537
4.09375
4
[]
no_license
# while a = 0 while a < 10: a += 1 if a == 5: continue if a == 7: break print(a) else: print('while 수행') print('while 수행 후 %d'%a) import random num = random.randint(1,10) #print(num) while True: print('1 ~ 10 사이이 컴이 가진 수를 입력') guess = input() su = int(gu...
PHP
GB18030
928
2.890625
3
[]
no_license
<?php if(defined(BASEPATH)) exit('No direct script access allowed'); /** * һļ * @date 2013-12-7 11:46:57 * @author Yongsen * @version 0.0.0 */ class config{ //ó˽ ñ˶д ṩȡ private static $config = ''; function __construct(){ $this->get_config_file(); } function get_config_file($filename=FALSE){ if(!$filena...
Java
UTF-8
422
1.75
2
[]
no_license
package com.fading.puppy.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller @RequestMapping("/doOutBound/") public class OutBoundController { @RequestMapping("getInde...
PHP
UTF-8
244
2.734375
3
[]
no_license
<?php require_once './MovieService.php'; $ms = new MovieService(); $list = $ms->movies(); //echo var_dump($list); //echo $list; for($i=0;$i<sizeof($list);$i++) { $r = new stdClass(); $r = $list[$i]; echo $r->thumbnail.'<br>'; }
TypeScript
UTF-8
1,416
2.609375
3
[ "MIT" ]
permissive
import { base64ToImgElement } from './utils'; class CanvasServiceSrc { readonly canvas = document.createElement('canvas'); readonly canvasCtx = this.canvas.getContext('2d') as CanvasRenderingContext2D; readonly helperCanvas = document.createElement('canvas'); readonly helperCanvasCtx = this.hel...
Python
UTF-8
5,186
2.515625
3
[]
no_license
qimport requests from bs4 import BeautifulSoup from datetime import datetime import pytz from pytz import timezone from icalendar import Calendar, vText, Event import json import re base_url = "https://www.portal.reinvent.awsevents.com/connect/" favorites_url = "https://www.portal.reinvent.awsevents.com/connect/intere...
JavaScript
UTF-8
2,228
2.78125
3
[]
no_license
import { DilActionAnimation } from "./DilActionAnimation"; describe('AnimationAction', () => { describe('_indexToCoordinate', () => { let dilActionAnimation; const setup = (rows, columns) => { dilActionAnimation = new DilActionAnimation( { rows, columns }, ...
Python
UTF-8
651
3.921875
4
[]
no_license
def headline(text, centered = False): #type: (str, bool) -> str if not centered: return f"{text.title()}\n{'-' * len(text)}" else: return f" {text.title()} ".center(50, "o") def headline2( text, width=80, fill_char='-', ): return f" {text.title()} ".center(width, fill_char) ...
Java
UTF-8
619
2.25
2
[]
no_license
package com.skripsi.area31.model.response; import com.skripsi.area31.model.course.Course; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @Builder @AllArgsConstructor @NoArgsConstructor public class CheckCustomResponse { private Integer code; ...
C++
UTF-8
6,180
2.625
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
// This is free and unencumbered software released into the public domain. // For more information, please refer to <http://unlicense.org/> #include "models/sagtension/catenary_cable_reloader.h" #include "gtest/gtest.h" #include "models/base/helper.h" #include "test/factory.h" class CatenaryCableReloaderTest : publ...
JavaScript
UTF-8
206
3.671875
4
[]
no_license
const a = Number(prompt("Enter first mark")); const b = Number(prompt("Enter second mark")); const c = Number(prompt("Enter third mark")); alert(`The average of ${a}, ${b} and ${c} is ${(a + b + c) / 3}`);
Ruby
UTF-8
191
3.28125
3
[]
no_license
x = 2520 was_clean = true while true do (11..20).each do |i| if !(x % i == 0) was_clean = false end end if was_clean puts x exit else x += 20 was_clean = true end end
Java
UTF-8
1,345
2.34375
2
[]
no_license
package com.bingo.showme.service.impl; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import org.springframework.stereotype.Service; import org.springframework.web.client.ResourceAccessException; import com.bingo.showme.entity.User; impor...
Python
UTF-8
814
3.171875
3
[]
no_license
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as pl from scipy.optimize import fsolve ###Inverse transform sampling #karmi się liczbą superkropelek i srednim promieniem #wypluwa listę #r_sr = 30.531*10**(-6) def inverse_transform_sampling(n, r_sr): v_sr = 4 * np.pi * r_sr**3 /3 ...
Java
UTF-8
3,618
2.453125
2
[]
no_license
package Controladores; import Negocio.Agricultor; import Negocio.Criptografia; import Repositorio.implementacoes.RepositorioImplementacaoAgricultorDB; import Repositorio.interfaces.RepositorioInterfaceAgricultor; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean....
Java
UTF-8
8,240
1.570313
2
[]
no_license
package com.tenghen.ireader.ui.fragment; import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.bumptech.glide.Glide; import com.chengx.mvp.widget.CircleImageView; import com.tenghen.ireader.CommonUtils; import com.tenghen.ireader.R; import c...
Java
UTF-8
9,682
1.804688
2
[]
no_license
/** * Copyright (c) 2009 International Health Terminology Standards Development * Organisation * * 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/LIC...
Java
UTF-8
2,121
3.375
3
[]
no_license
package Aug_05; import Aug_05.models.SportsCar; public class Driver { static SportsCar myCar = new SportsCar(2, "black", "RX-8, R3", 3 , true); public static void main(String[] args) { myCar.move(200); boolean con = true; System.out.println("--------------"); while(myCar.getHasTurbo() && con) { ...
Java
UTF-8
3,775
2.390625
2
[]
no_license
package GetTestCase.LessonCreatFlow; import com.alibaba.fastjson.JSONObject; import com.mizholdings.me2.Global_enum; import com.mizholdings.util.JsonFuncUtil; import com.mizholdings.util.SampleAssert; import com.mizholdings.util.javabean.LessonEditBean; import org.testng.annotations.BeforeClass; import org.testng.anno...
Java
UTF-8
2,002
2
2
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
PHP
UTF-8
4,054
3.140625
3
[]
no_license
<?php declare(strict_types=1); class Calculator { protected $cleanRequest = ''; public function __construct(string $request) { $this->cleanRequest = preg_replace("~[^0-9*+\-()^/]~", "", $request); } protected $variables = []; public function getResult() : float { $tokens ...
C++
UTF-8
740
2.546875
3
[]
no_license
#ifndef _JOEPACK_H #define _JOEPACK_H #include <cstdio> #include <string> #include <cstring> #include <iostream> #include <fstream> #include <cmath> #include <cassert> using namespace std; #include <map> class JOEPACK_FADATA { public: JOEPACK_FADATA() {offset = 0; length = 0;} unsigned int offset; unsigned int l...
PHP
UTF-8
1,163
3.0625
3
[ "MIT" ]
permissive
<?php namespace Pucene\Component\QueryBuilder\Query\TermLevel; use Pucene\Component\QueryBuilder\Query\QueryInterface; class Term implements QueryInterface { const NAME = 'term'; /** * @var string */ private $field; /** * @var string */ private $term; /** * @param ...
Java
UTF-8
2,677
3.140625
3
[]
no_license
package _1월3주차; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class 배열에서이동 { static int N, answer; static int[][] map; static int[][] direction = {{-1, 0}, {1, 0}, {...
Java
UTF-8
994
2.859375
3
[]
no_license
package com.zyblogs.concurrency.pattern.chapter04; import lombok.Getter; /** * @Title: ObservableRunnable.java * @Package com.zyblogs.concurrency.pattern.chapter04 * @Description: TODO * @Author ZhangYB * @Version V1.0 */ public abstract class ObservableRunnable implements Runnable { final protected Lifec...
JavaScript
UTF-8
10,124
3.234375
3
[]
no_license
/*CodularHome • Writers • RSS Starting with Node and Web Sockets Let us worry about building your integrations. Focus on your core product. ads via Carbon Introduction Web Sockets are probably in use more around you now than you think, most things with real-time interactions are most probably running through these lit...
Markdown
UTF-8
312
2.515625
3
[]
no_license
# Animated-Display This is terminal based script which asks for your name and displays it like a moving banner. It is made using python as a part of learning python. # How To Run? - Download this repo - run `python display.py` in terminal - Enter Your Name and see the magic :wink: # Screens ![scrs](srcs.png)
Java
UTF-8
568
2.4375
2
[]
no_license
public class VIP extends Vartotojas { public VIP() { } public VIP(String username, String password) { super(username, password); } public VIP(String username, String password, int gimDataMetai, int gimDataMenuo, int gimDataDiena) { super(username, password, gimDataMetai...
Java
UTF-8
823
2.4375
2
[]
no_license
package vpamok; import org.junit.Assert; import org.junit.Test; public class SymDogTest { SymDog underTest = new SymDog("", ""); @Test public void shouldRustFromTick() { underTest.tick(); int result = underTest.getRust(); Assert.assertEquals(10, result); } @Test public void shouldDecreaseHealthFromRust(...
C#
UTF-8
3,764
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace OOPClassObjectLesson1 { public partial class Default : System.Web.UI.Page { // Random random = new Random(); protected void Page_Load(...
C#
UTF-8
1,453
2.671875
3
[ "MIT" ]
permissive
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required). using GroupDocs.Classification.Cloud.Sdk.Api; using GroupDocs.Classification.Cloud.Sdk.Model; using GroupDocs.Classification.Cloud.Sdk.Model.Requests; using System; namespace GroupDocs.Classification.Cloud....
Java
UTF-8
1,360
2.34375
2
[]
no_license
package com.springweb.controller; import java.util.List; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework...
Markdown
UTF-8
609
2.640625
3
[]
no_license
# 浏览器插件 ## 安装依赖项 ```shell npm install ``` ## 项目打包 > 打包之后会生成一个`dist`文件夹,浏览器加载插件时,选择该文件夹。 ```shell npm build ``` ## 插件配置文件 > 加载插件之前,需要将`dist2`文件夹下的`4`个文件,拷贝到`dist`文件夹下。 ``` dist2 |__ js |__ background.js |__ content.js |__ logo.png |__ manifest.json ``` ## 加载浏览器插件 > 文件拷贝到`dist`文件夹之后,在浏览器中输入...
Ruby
UTF-8
812
2.84375
3
[ "MIT" ]
permissive
require "socket" require "rufus-json" class Statsd def initialize(host = "localhost", port = 8125) @host = host @port = port @socket = UDPSocket.new end def time(stat) start = Time.now result = yield timing(stat, ((Time.now - start) * 1000).round) result end def inc(stat, de...
Java
UTF-8
3,194
1.671875
2
[]
no_license
package com.lucianms.constants.skills; public class Aran { public static final int BLESSING_OF_THE_FAIRY = 20000012; public static final int TUTORIAL_SKILL1 = 20000014; public static final int TUTORIAL_SKILL2 = 20000015; public static final int TUTORIAL_SKILL3 = 20000016; public static final int T...
Markdown
UTF-8
4,792
3.1875
3
[]
no_license
--- author: hzmangel categories: - Happy coding date: '2013-05-07T23:30:25' tags: - Programming - rails title: Uploading multiple attachments with carrierwave/mongoid/nested_form --- Recently I have met a requirement that need to upload multiple attachments to a rails project. After some investigations, I choose `carri...
Java
UTF-8
2,024
3.53125
4
[]
no_license
package main.java.Objekt; import java.util.ArrayList; /** * Created by Spiks on 2016-04-08. * In the project Buss_System */ /** * A Object that represents the line a buss will take. * The Line id is a two digit number. * More information about the stops and buss can be found in theyre files. */ public class L...
Java
UTF-8
249
1.5
2
[]
no_license
package com.bjsxt.service; import com.bjsxt.common.pojo.DataResult; import javax.xml.crypto.Data; public interface ItemParamService { DataResult selectItemParamByid(Long cid); DataResult insertItemParam(Long itemCid,String paramData); }
Java
UTF-8
504
1.898438
2
[]
no_license
package com.yc.springframework; import com.yc.bean.HelloWorld; import com.yc.springframework.stereotype.MyBean; import com.yc.springframework.stereotype.MyComponentScan; import com.yc.springframework.stereotype.MyConfiguration; /** * @program: testspring * @description: * @author: ErFeng_V * @create: 2021-04-05 1...
JavaScript
UTF-8
4,757
2.515625
3
[ "MIT" ]
permissive
(function (angular) { 'use strict'; angular .module('cogeoApp') .factory('directMessagesFactory', directMessagesFactory); directMessagesFactory.$inject = [ 'httpRequest', '$rootScope', 'cozenEnhancedLogs' ]; function directMessagesFactory(httpRequest, $root...
Python
UTF-8
3,532
3.25
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt ''' Transfer matrix method Inputs wvl: wavelength fulln: array with all refractive indices fullw: array with all layer widths Outputs: r: reflection coefficient t: transmission coefficient x: position Nn: refractive indices (vs x) E: optical field (vs x) ''' def tmm...
Java
UTF-8
899
2.46875
2
[]
no_license
package task1.job8; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; import java.io.IOException; /** * Created by guichi on 18/04/2015. */ public class FinalMapper extends Mapper<LongWritable,Text,IntWrit...
Java
UTF-8
1,025
2.703125
3
[]
no_license
package me.johnkagga.funbook.Model; import android.graphics.Color; /** * Created by John Kagga on 7/5/2015. */ public class FactPage { private String mFactNumber; private String mFactText; private String mColor; private Choice mChoice1; private Choice mChoice2; public FactPage(String factN...
TypeScript
UTF-8
130
2.546875
3
[]
no_license
export interface ITasks { id: string; text: string; isComplited?: boolean; } export interface IState { tasks: ITasks[]; }
JavaScript
UTF-8
331
3.359375
3
[]
no_license
function largest() { var tCount = []; for (var x = 0; x < 3; x++) { var t = prompt("Number plz" + "("+x+")"); tCount.push(t); } var v = 0; for(var y = 0; y < 3; y++) { if(v < parseInt(tCount[y] - tCount[y + 1])) { v = tCount[y]; } } alert("Sum is: " + v); } $(document).ready(function (){ la...
PHP
UTF-8
427
2.59375
3
[]
no_license
<?php namespace hypeJunction\Scraper; use Elgg\Hook; use hypeJunction\Fields\Collection; class AddFormField { /** * Add slug field * * @param Hook $hook Hook * * @return mixed */ public function __invoke(Hook $hook) { $fields = $hook->getValue(); /* @var $field Collection */ $fields->add('web_...
Python
UTF-8
509
3.046875
3
[]
no_license
import pandas as pd df = pd.read_csv('D:\Labs\python\datos.csv', sep=';') import matplotlib.pylab as plt plt.scatter(df['alcohol'], df['quality']) plt.xlabel('Alcohol') plt.ylabel('Quality') plt.title('Alcohol Against Quality') plt.show() from sklearn.feature_extraction.text import CountVectorizer corpus = [ 'UNC p...
Java
UTF-8
275
1.757813
2
[]
no_license
package com.WebTable; import org.openqa.selenium.firefox.FirefoxDriver; public class FirstRow_FirstColumn_CityName { public static void main(String[] args) { FirefoxDriver driver=new FirefoxDriver(); driver.get("https://www.timeanddate.com/worldclock"); } }
Java
UTF-8
863
1.992188
2
[]
no_license
package presenter.presenter.dao; import android.content.ContentValues; import model.model.entity.Alarm; import java.util.List; /** * Created by csantamaria on 11/05/2016. */ public interface AlarmDAOI { String TABLE_NAME = "alarms"; String COLUMN_CODE = "code"; String COLUMN_NAME = "name"; String...
Markdown
UTF-8
5,595
2.71875
3
[]
no_license
Nunchuckoo ========== Adapt a Wii Nunchuck to work with Arduino and Processing ![Nunchuckoo](https://dl.dropbox.com/u/29093681/Nunchuckoo.jpg) This project was developed primarily to get a Wii Nunchuck working with it's sister project [SCRAPE](https://github.com/c-flynn/SCRAPE) but can be applied to any Processing s...
Java
UTF-8
2,884
2.4375
2
[]
no_license
package com.revature.project_0.entity; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.After; import org.junit.Test; import com.revature.project_0.connection.ConnectionHelper; import com.revature.project_0.reposito...
Markdown
UTF-8
628
3.109375
3
[]
no_license
# Snake Game With a Twist! (Project for UTSC CSCB58) A simple game of snake using FPGA board, Verilog and VGA monitor. Using KEY3 to KEY0 to control the snake, players strive to eat the white blob (apple) to earn points, while increasing in length, and not going out of bounds. Players can eat any of the 4 powerups, w...
Java
UTF-8
637
2.40625
2
[]
no_license
package info.hexin.jmacs.lang.reflect.model; public class BooleanA { private boolean boolean1; private Boolean boolean2; public BooleanA() { } public BooleanA(boolean boolean1, Boolean boolean2) { this.boolean1 = boolean1; this.boolean2 = boolean2; } public ...
Markdown
UTF-8
3,020
3.34375
3
[]
no_license
##### **Udacity Deep Reinforcement Learning Nanodegree** # Project 1: Continuous Control ![Continuous Control](images/continuous_control.gif "Continuous Control") ## **Introduction** In this project we will train a Deep Deterministic Policy Gradient (DDPG) Agent to control a double jointed arm to move and reach targe...
Markdown
UTF-8
2,009
2.921875
3
[]
no_license
# royal-game-of-ur A very simple implementation of the Royal Game of Ur (https://en.wikipedia.org/wiki/Royal_Game_of_Ur) Can be run in three different modes: 1. REST server 2. gRPC server 3. Standalone ## How to run the REST server `mvn clean package && java -jar spring-boot/target/spring-boot-0.0.1-SNAPSHOT.jar` ...
PHP
UTF-8
952
2.75
3
[]
no_license
<?php namespace models; class Brand extends Model { // 设置这个模型对应的表 protected $table = 'brand'; // 设置允许接收的字段 protected $fillable = ['brand_name','logo']; //添加修改之前被调用 public function _before_write(){ $this->delete_img(); //添加上传图片的代码 $upload = \libs\Upload::getInstance(); ...
Markdown
UTF-8
1,099
3.8125
4
[]
no_license
# Apple Stocks ###### Sample Question _Writing programming interview questions hasn't made me rich yet... so I might give up and start trading AAPL stocks all day instead._ First, I want to know how much money I could have made yesterday if I'd been trading AAPL stocks all day. So I grabbed AAPL's stock prices from...
Python
UTF-8
631
3.15625
3
[]
no_license
# -*- coding: utf-8 -*- def PalinSort(c,num): palin=[] for i in range(1,num): x=c%10 c=int(c/10) palin.append(x) return palin def CheckPalin(pa,num): i=0 result = False while i<num/2: if pa[-(1+i)]!=pa[i]: result=False b...
JavaScript
UTF-8
1,143
3.3125
3
[ "MIT" ]
permissive
module.exports = function zeros(expression) { let factorials = expression.split("*"); let doubleFact = []; let onceFact = []; let fives = 0; let deuces = 0; for (let i = 0; i < factorials.length; i++) { if (factorials[i].includes("!!")) { doubleFact.push(factorials[i].slice(0, -2)); } else { ...
Java
UTF-8
2,545
2.109375
2
[ "MIT" ]
permissive
package com.blsa.ezilog.filter; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import ja...
Java
UTF-8
1,002
2.390625
2
[]
no_license
package am.ik.openenquete.session; import org.springframework.data.rest.core.annotation.HandleBeforeCreate; import org.springframework.data.rest.core.annotation.HandleBeforeSave; import org.springframework.data.rest.core.annotation.RepositoryEventHandler; import org.springframework.stereotype.Component; import am.ik....
C++
UTF-8
2,761
2.8125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <fstream> using namespace std; /* void getTag(const string &str) { string & ptag = "<p>"; size_t posptag = string::npos; while (( posptag = str.find(ptag) ) != string::npos) { str.erase(posptag, ptag.size()); } string::s...
Java
UTF-8
797
2.921875
3
[]
no_license
import java.util.concurrent.ConcurrentHashMap; class MultiTonManage { ConcurrentHashMap<String, Reusable1> pool = new ConcurrentHashMap<>(); static int count = 1; private MultiTonManage() {} private static MultiTonManage instance = new MultiTonManage(); public Reusable1 getFor(String key) { Reusable1 r = pool.g...
Java
UTF-8
936
1.914063
2
[]
no_license
package com.opnitech.esb.processor.persistence.elastic.repository.document; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import com.opnitech.esb.processor.common.data.ElasticIndexMetadata; import com.opnitech.esb.processor.persistence.elastic.model.shared.ElasticSourceDocument; import com...
Markdown
UTF-8
9,240
3.609375
4
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
# The Dropdown Component A more opinionated version of the Popover component. Instantiates a button with a menu that will appear at the bottom of the button. ### React Component #### `<Dropdown>` #### Props | Prop | Type | Default | Description ...
TypeScript
UTF-8
2,891
2.671875
3
[ "MIT" ]
permissive
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { NonNullableFormBuilder, FormGroup, FormControl } from '@angular/forms'; import { InputControls } from '../shared/inputcontrols'; import { UnitConversion } from '../shared/UnitConversion'; import { ValidatorGroups } from '../shared/...
Java
UTF-8
427
2.953125
3
[]
no_license
package com.future.threads; import java.util.concurrent.*; public class ThreadNameFetcher implements Callable<String> { public ThreadNameFetcher (){ } @Override public String call() throws Exception { // Thread.sleep(waitTime); //return the thread name executing this callable task ...
JavaScript
UTF-8
13,218
2.859375
3
[ "MIT" ]
permissive
/* * Handout Script * * Runs rendered Markdown handouts with embedded exercises and other features. */ // create a hover interaction // will either update an attribute of a target element inside this element, // or show only targets matching an indexed selector, as the user hovers over // elements matching a...
Java
UTF-8
1,911
3.53125
4
[ "MIT" ]
permissive
import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class SerializeAndDeserializeBinaryTree_297 { // Encodes a tree to a single string. public String serialize(TreeNode root) { StringBuilder sb = new StringBuilder(); sb.append('['); Queue<TreeN...
Markdown
UTF-8
2,920
2.984375
3
[ "MIT" ]
permissive
# serve-dynamic-favicon [![NPM](https://nodei.co/npm/serve-dynamic-favicon.png?downloads=true)](https://www.npmjs.com/package/serve-dynamic-favicon) [![NPM](https://nodei.co/npm-dl/serve-dynamic-favicon.png?months=3&height=2)](https://nodei.co/npm/serve-dynamic-favicon/) # PLEASE NOTE THIS IS IN ALPHA Node.js middle...
C++
UTF-8
1,413
3.46875
3
[]
no_license
// { Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> #include <string> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: //Function to find list of all words possible by pressing given numbers. void keypad(string output, string ...
JavaScript
UTF-8
2,456
2.53125
3
[]
no_license
var dataObject = [ { name: 'Java', rank: 1, ad: '降', change: -0.0001 }, { name: 'C', rank: 2, ad: '升', change: 0.0244 }, { name: 'Python', rank: 3, ad: '升', change: 0.0141 }, { name: 'C++'...
TypeScript
UTF-8
1,995
2.6875
3
[ "MIT" ]
permissive
import { Injectable } from '@nestjs/common'; import fs from 'fs-extra'; import path from 'path'; import { ConfigService } from '../../../config/config.service'; import { Asset } from '../../../entity/asset/asset.entity'; import { AssetService } from '../../../service/services/asset.service'; @Injectable() export clas...
Markdown
UTF-8
5,157
2.875
3
[ "MIT" ]
permissive
## デバッグ方法 実行時のプログラム内の変数の値や挙動を確認する方法として、次の2つがある。 ### ログによる挙動確認 最も簡単な挙動確認方法としては、Eclipseのコンソールタブ欄に表示される出力を見ることである。 ログとは、システムが動作した履歴を文字列ベースで出力したものである。 本課題のログは次の形式で出力されている。それぞれの内容を下記表にまとめる。 ``` 時刻 [実行したスレッド名] ログレベル 実行したクラス - メッセージ ``` |項目名|概要| |:---|:---| |時刻|ログを出力した時刻| |実行したスレッド名|プログラムを実行しているスレッドの名前(今回のデバックでは用いないので無視して...
Python
UTF-8
3,853
2.53125
3
[]
no_license
# https://blog.csdn.net/qq_27261889/article/details/90675051 import cv2 import numpy as np import matplotlib.pyplot as plt from scipy import fftpack def high_pass_filter(img, radius=80): r = radius rows, cols = img.shape center = int(rows / 2), int(cols / 2) mask = np.ones((rows, cols, 2), np.uint8)...
TypeScript
UTF-8
698
2.6875
3
[]
no_license
export enum ElementType { title, subtitle, text, hr, counter, checkbox } export interface ElementData { id: string; type: ElementType; label: string; options: any; value?: number; } export interface ElementProps { data: ElementData; isEditable: boolean; onChange...
Markdown
UTF-8
21,295
3.25
3
[ "MIT" ]
permissive
<style> .section .reveal .state-background { background: #ffffff; } .section .reveal h1, .section .reveal h2, .section .reveal p { color: black; margin-top: 50px; text-align: center; } </style> Introduction to hypothesis testing part II ======================================================== date: 04/16/2...
Java
UTF-8
1,129
3.015625
3
[]
no_license
package game; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Before; import org.junit.Test; import commands.Command; import state.StateMachine; import utils.Props; public class GameBoardTest { private int size; @Before public void setup() throws Nu...