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
1,341
2.96875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Wed Apr 20 12:54:18 2016 @author: Administrator """ import csv def SplitTime(): read_user = csv.reader(file(r'tianchi_fresh_comp_train_user.csv', 'rb')) writer = csv.writer(file('WashedData-simplified.csv', 'wb')) i=0; for row in read_user: if i==0: ...
C++
UTF-8
1,067
3.078125
3
[]
no_license
using namespace std; class find_ { protected: int lb,ub; //STUDENT CODE HERE---------------------------------- public: void get(); }; class der_prime:public find{ protected: int num,i,j,k,count=0; int a[100],b[100]; public: void detect_prime(); void print(); }; void find::get(){ cin>>lb>>ub; } void der...
JavaScript
UTF-8
1,551
3.40625
3
[]
no_license
// Je vous présente ici une liste de film // chaque film dispose de trois élement: Un tableau de tags, un nom, et une notes // Nous voulons rajouter un film à ce tableau // Vérifiez si cet élément n'est pas déjà présent dans le tableau // Trouvez une méthode permettant de chercher simplement dans un tableau tout en ren...
JavaScript
UTF-8
498
3.609375
4
[]
no_license
const increment = document.querySelector('button[data-action="increment"]'); const decrement = document.querySelector('button[data-action="decrement"]'); const span = document.querySelector('#value'); let counterValue = Number(span.textContent); const updateValue = value => { counterValue = counterValue + value; ...
PHP
SHIFT_JIS
810
3.25
3
[]
no_license
<pre> <?php /* uPCRE(Perl݊)v̕NX͗ႦΈȉ̂悤Ȃ̂܂B \d@Ƀ}b`܂B[0-9]ƓłB \s@zCgXy[XɃ}b`܂B[\n\r\t\f]ƓłB \w@PꕶɃ}b`܂B[a-zA-Z0-9]ƓłB ܂Aqu啶vɂƈӖ]̂ŁÂ悤ɊoĂƂ悢ł傤B \D@ȊOɃ}b`܂B[^0-9]ƓłB \S@zCgXy[XȊOɃ}b`܂B[^\n\r\t\f]ƓłB \W@PꕶȊOɃ}b`܂B[^a-zA-Z0-9]ƓłB */ // $string = '0123456789abcdefghijk'; $ret = preg_match('/\w/', $string, $matches); var_dump...
Python
UTF-8
3,401
2.78125
3
[]
no_license
#!/usr/bin/env python import unittest from dominion import Card, Game, Piles ############################################################################### class Card_Courtier(Card.Card): def __init__(self): Card.Card.__init__(self) self.cardtype = Card.CardType.ACTION self.base = Card.C...
Java
UTF-8
831
2.375
2
[]
no_license
package http.servlet; import http.responserequest.Request; import http.responserequest.Response; /** * @author: chain * @create: 2020/02/17 **/ public class RegistServlet implements ServletInterface { @Override public void service() { System.out.println("正在使用注册服务..."); } @Override publ...
Python
UTF-8
8,892
3.09375
3
[ "MIT" ]
permissive
import re from nltk import pos_tag from nltk import word_tokenize import requests from bs4 import BeautifulSoup from nltk.corpus import wordnet as wn import sys def load_comment_idioms(filename): samples = [] with open(filename,'r', encoding="utf-8") as f: f.readline() for l in f: l...
Shell
UTF-8
2,458
3.234375
3
[ "MIT" ]
permissive
#!/usr/bin/env bash # _ __ ___ _ __ ___ ___ ___ # | '__/ _ \ '_ ` _ \ _____ / _ \/ __| # | | | __/ | | | | |_____| (_) \__ \ # |_| \___|_| |_| |_| \___/|___/ # # Install Script # Made by ablazingeboy#7375 # Why the fxxk did I spend time on this echo -e "\nInstalling necessary software, $USER-sama. No ...
PHP
UTF-8
2,086
3.140625
3
[]
no_license
<?php // <!-- phpDesigner :: Timestamp [11/03/2016 06:00:20 p. m.] --> /** * MultiFacturas.com 2016 * Author: I.R.G. */ class GetTransactionFromPeriodResult { public static function fromArray($array) { // Se valida que sea un arreglo if(!is_array($array)) { throw new Exception(sprintf...
Markdown
UTF-8
4,541
3.0625
3
[]
no_license
--- title: 內建規則標籤 url: /user-guide/built-in-rule-tags/ --- 標籤是對規則和問題進行分類的一種方法。問題規則地繼承了引發它們的標籤。有些標籤僅適用於特定語言,但更多的標籤卻是跨語言的。使用者可以加入標籤至規則與問題中,但多數的規則都已具有現成的標籤。以下是部份內建規則標籤含義的列表: *注意:以下的連結 [rules.sonarsource.com](https://rules.sonarsource.com) 已針對 Java 語法進行篩選* * [大腦超載(brain-overload)](https://rules.sonarsource.com/java/tag/b...
C++
UTF-8
2,359
2.65625
3
[ "MIT" ]
permissive
#ifndef Intensity_Data_h #define Intensity_Data_h #include "Fem_Quadrature.h" #include "Angular_Quadrature.h" #include "Cell_Data.h" #include "Eigen/Dense" #include "Materials.h" #include "Input_Reader.h" #include "MMS_Intensity.h" class Intensity_Data { public: /// Will set n_grp, n_el, n_dir, n_leg,...
Rust
UTF-8
436
2.84375
3
[ "MIT", "LicenseRef-scancode-other-permissive", "Apache-2.0", "BSD-3-Clause", "BSD-2-Clause", "NCSA" ]
permissive
#![feature(generators, generator_trait)] use std::ops::{Generator, GeneratorState}; use std::pin::Pin; fn dangle(x: &mut i32) -> &'static mut i32 { let mut g = || { yield; x }; loop { match Pin::new(&mut g).resume() { GeneratorState::Complete(c) => return c, ...
C
UTF-8
1,218
3.046875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> int stack[120]; int problem[120]; int hard[120]; int pos; int hardstack[120]; int hardpos; int N,P; int fun(){ int i,j; int min; int max; int t; scanf("%d %d ", &N, &P); memset(problem,0,sizeof(problem)); memset(hard,0,sizeof...
C
UTF-8
3,295
3.734375
4
[]
no_license
//usage ./03_2.c < 03.txt // #include <stdio.h> #include <stdlib.h> #include <string.h> void substring(char s[], char sub[], int p, int l); int main(void) { int fabric[1200][1200]; //note this is about the largest a static array can be, bigger causes seg faults int claim[1349][4]; //store input for part 2 ...
Python
UTF-8
1,910
4.0625
4
[]
no_license
####DATE: 04/12/2016 #######DEFINITION DES FONFCTIONS################################################# def motSaisi(): motSaisi=input("Entrez un mot qui est composé que les lettres d'alphabet:") while (not(motSaisi.isalpha())): print('False') motSaisi=input("Entrez un mot qui est composé que l...
C
UTF-8
213
3.578125
4
[]
no_license
#include <stdio.h> int main () { int x; printf ("Digite um valor\n"); scanf ("%d", &x); if (!x) printf ("%d\n", 1); else { for (int i = x-1; i != 0; i--) { x *= i; } printf ("%d\n", x); } }
C++
UTF-8
1,979
3.109375
3
[]
no_license
#ifndef CYCLE_FINDER_H #define CYCLE_FINDER_H //#define TEST_CYCLE_FINDER_H //Author : Suvojit Manna //Application : CurveSim //Header for Cycle Finder API //Finds and enumerates over all simple and Greedy cycle //Use DFS to start looking for cycle from each vertex //If cycle is found insert in a List. //For eac...
C#
UTF-8
2,687
3.8125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DominoClasses { /* Lab 4 - Complete the Set and Hand (of dominos) classes as discussed in class. * Write a console application to test the classes. *** / means done • domi...
TypeScript
UTF-8
356
3.015625
3
[]
no_license
/** * 人物信息管理类 */ class PlayerInfoManager extends BaseClass { private _info: PlayerInfo; public constructor() { super(); } public setup(): void { let self = this; self._info = new PlayerInfo(); } set Info(value: PlayerInfo) { this._info = value; } /** 人物信息 */ get Info(): PlayerInfo { return th...
Java
UTF-8
14,703
2.296875
2
[]
no_license
package com.example.eriks.appfinal; import android.app.Activity; import android.content.ContentValues; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; impor...
Python
UTF-8
1,330
4.03125
4
[]
no_license
##https://courses.edx.org/courses/course-v1:MITx+6.00.1x_8+1T2016/courseware/Week_2/Basic_Problem_Set_1/ ## ##Counting and Grouping ## ##A catering company has hired you to help with organizing and preparing customer's orders. You are given a list of each customer's ##desired items, and must write a program that will ...
Java
UTF-8
229
1.632813
2
[]
no_license
package com.rds.judicial.model; import lombok.Data; /** * 异常描述 * @author 少明 * */ @Data public class RdsJudicialExceptionTypeModel { private String type_id; private String type_desc; private int is_delete; }
PHP
UTF-8
7,023
3.046875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace PHPFUI\MySQLSlowQuery; class Parser { private const PORT = 'TCP Port: '; private const TIME = '# Time: '; /** @var array<int, \PHPFUI\MySQLSlowQuery\Entry> */ private array $entries = []; /** @var array<int, string> */ private array $extraLines = []; // @phpstan-ignore-next-line private $...
C++
UTF-8
2,119
3.375
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <algorithm> long long int MODULO = 1000000007; class BitMatrix { public: BitMatrix() : main_numbers() , zero_options(1) {} void ReduceNumber(long long int& number) const { while (number > 0) { if (main_numbe...
Java
UTF-8
9,678
2.171875
2
[ "Apache-2.0" ]
permissive
package com.example.dlpbgj; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; import andr...
C#
UTF-8
752
2.5625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using UnityEngine; public class WallScript : MonoBehaviour, IColorable { private Renderer[] _mat; public Color wallCol = Color.gray; // Use this for initialization void Start () { _mat = GetCompo...
Shell
UTF-8
1,931
2.984375
3
[]
no_license
# Drop the tables in case they exists echo "DROP TABLE price; DROP TABLE base; DROP TABLE split; DROP TABLE dividend;" | \ mclient -d fintime # Create tables, note columns here must be lower case echo 'CREATE TABLE "base" ( "id" char(30), "ex" char(3), "descr" varchar(256), "sic...
C
UTF-8
754
3.828125
4
[]
no_license
#include "holberton.h" /** * read_textfile -reads a text file and prints it to the POSIX standard output. * @filename: file to be read. * @letters: number of letters to read and print * Return:numbers it could read and print */ ssize_t read_textfile(const char *filename, size_t letters) { int fd, fd_write, fd_re...
Markdown
UTF-8
8,193
2.796875
3
[ "LicenseRef-scancode-unknown-license-reference", "CC-BY-4.0", "LicenseRef-scancode-public-domain", "MIT" ]
permissive
--- pcx_content_type: concept title: Smart Placement (beta) --- {{<beta>}}Smart Placement{{</beta>}} By default, [Workers](/workers/) and [Pages Functions](/pages/platform/functions/) are invoked in a data center closest to where the request was received. If you are running back-end logic in a Worker, it may be more ...
Python
UTF-8
1,130
3.875
4
[]
no_license
def longest_subsequence_problem(string_a, string_b): """ A DP implementation for finding longest common sub sequence :param string_a: String a :param string_b: String b :return: The longest common sub sequence """ # Get the length of the strings len_a = len(string_a) len_b = len(string_b) # Create a memo, an...
C#
UTF-8
17,522
2.90625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace form_idle { public partial class Form1 : Form { double num = 0, prev, result; ...
C#
UTF-8
1,833
2.546875
3
[]
no_license
using System.Drawing; using Esri.ArcGISRuntime.Geometry; using Esri.ArcGISRuntime.Symbology; using Esri.ArcGISRuntime.UI; namespace QBasket_demo { public class EsriSketchEd { private SketchCreationMode _mode; private SketchEditConfiguration _config; private LineSymbol _outline; ...
C
UTF-8
321
3.046875
3
[]
no_license
#include <stdio.h> void f(unsigned long int x, unsigned long int y, unsigned long int z) { printf("x = %lu\n",x); printf("y = %lu\n",y); printf("z = %lu\n",z); y = 4UL; printf("x = %lu\n",x); printf("y = %lu\n",y); printf("z = %lu\n",z); } int main() { f(1UL,2UL,3UL); return 0; } ...
Java
UTF-8
2,481
1.984375
2
[]
no_license
package com.happymall.webservice.domain; import java.util.Date; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.JoinColumn; ...
Python
UTF-8
3,945
2.75
3
[]
no_license
#from __future__ import division import math from PIL import Image import numpy as np import datetime def makebasis(u,v): yaw = (0.5 - u) * (-2.0*math.pi); pitch = (0.5 - v) * (math.pi); R_p =np.matrix(([1.0, 0.0, 0.0],[ 0.0 ,math.cos(pitch),math.sin(pitch)],[0.0,-math.sin(pitch),math.cos(pitch)...
Python
UTF-8
2,245
3.34375
3
[]
no_license
from controller import Robot timeStep = 32 # Set the time step for the simulation max_velocity = 6.28 # Set a maximum velocity time constant nothing = 0 # Make robot controller instance robot = Robot() # Define the wheels wheel1 = robot.getDevice("wheel1 motor") # Create an object to contr...
Java
UTF-8
562
1.65625
2
[]
no_license
package cn.wtu.broadcast.openapi.api; import cn.wtu.broadcast.openapi.model.BBroadcastTemp; import cn.wtu.broadcast.openapi.vo.BBroadcastTempVO; import cn.wtu.broadcast.parent.exceptions.BizException; import cn.wtu.broadcast.parent.service.api.ParentService; import com.github.pagehelper.PageInfo; import java.util.Map...
JavaScript
UTF-8
1,799
2.84375
3
[]
no_license
var inputImage = function (element) { element.on('change', function (e) { var files = e.target.files; if (files.length) { // create a FormData object which will be sent as the data payload in the // AJAX request var formData = new FormData(); // loo...
TypeScript
UTF-8
2,692
2.671875
3
[]
no_license
import httpRequest from "./http-request"; const { JSDOM } = require('jsdom'); const overrideNames: any = { 4115: "Nihonium", 9999: "Debug" } export default class EntityDataPage { readonly id: number; name: string | undefined = undefined; information: string | undefined = undefined; is: numb...
Rust
UTF-8
1,279
2.890625
3
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#![no_std] use hotg_rune_proc_blocks::{ProcBlock, Tensor, Transform}; use num_traits::{FromPrimitive, ToPrimitive}; pub fn modulo<T>(modulus: f32, values: &mut [T]) where T: ToPrimitive + FromPrimitive, { for item in values { let float = item.to_f32().unwrap(); *item = T::from_f32(float % modu...
Java
UTF-8
3,011
2.328125
2
[]
no_license
package com.guns21.web.servlet; import com.alibaba.fastjson.JSON; import com.guns21.domain.result.light.Result; import com.guns21.web.annotation.AuthAnnotation; import com.guns21.web.constant.SpringConstant; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.method.HandlerMethod; i...
Markdown
UTF-8
1,854
3.453125
3
[ "MIT" ]
permissive
--- title: 憤怒在衝突中的角色 date: 04/06/2019 --- 誰沒有或多或少有過憤怒的感受?當這種憤怒針對某個家人時,則會令人更加難受。伴隨著拒絕饒恕而產生的憤怒可能會轉變成毒藥,給家庭、家人和親情帶來巨大的痛苦和折磨。 `閱讀弗4:26-27和傳7:9。憤怒作為一種情緒和憤怒作為一種罪惡,兩種理解如何達到平衡?二者有何區別?` `雅各在雅1:19-20說了什麼,是我們應當隨時應用在生活中的,尤其當家人的行為、態度和言語讓我們生氣時?` 如果你為了某件事情而感到氣憤,與其讓它像烏雲籠罩你的生活,不如從積極的一面來改變它。為那些傷害、辱駡你的人禱告。饒恕他們,讓自己成為他們的祝福。雖然一開始這樣做可...
Rust
UTF-8
11,943
2.515625
3
[ "Apache-2.0", "MIT" ]
permissive
use std::marker::PhantomData; use num_bigint::BigUint; use num_traits::ToPrimitive; use serde::de::Deserialize; use serde::ser::Serialize; use crate::drgraph::graph_height; use crate::error::{Error, Result}; use crate::hasher::{Domain, Hasher}; use crate::merkle::{MerkleProof, MerkleTree}; use crate::parameter_cache:...
C++
UTF-8
685
3.140625
3
[]
no_license
#include<cstdio> #include<iostream> using namespace std; const int maxn = 10010; void vowels(char str1[], char str2[]){ int i = 0, j = 0; while ( str1[i] != '\0' ) { if ( str1[i] == 'a' || str1[i] == 'A' ) str2[j++] = str1[i]; else if ( str1[i] == 'e' || str1[i] == 'E' ) str2[j++] = str1[i]; else if ( str...
Python
UTF-8
1,061
2.6875
3
[]
no_license
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend def key_unwrap(kek, ciphertext, iv): n = len(ciphertext) // 8 - 1 a = ciphertext[:8] r = [None] for i in range(1, n + 1): r.append(ciphertext[i*8:(i + 1)*8]) ...
C++
UTF-8
2,068
2.71875
3
[]
no_license
// dp with monotone queue, binary search on answer // https://codeforces.com/gym/100801/attachments (problem J) // 2015 NEERC Northern Subregional #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, a, b) for(auto i = (a); i < (b); ++i) #define trav(a, x) fo...
PHP
UTF-8
668
3.640625
4
[]
no_license
<?php $x = 10; $y = 25.500; // echo floor($y); // Sadece tam sayıları algılar. // echo ceil($y); // Üst sayıya yuvarlar // echo round($y); // Küsürat sayı 5 den büyükse yukarı yuvlarlar 5 ten küçükse aşağı yuvarlar // Trigonometri // echo cos($x); // cho sin($x); // echo tan($x); // echo rand(100,999); // Rastge...
Python
UTF-8
468
3.015625
3
[]
no_license
import unittest from src.song import Song from src.room import Room class TestSong(unittest.TestCase): def setUp(self): self.song = Song("Helicopter", "Bloc Party", "Indie") def test_song_has_a_title(self): self.assertEqual("Helicopter", self.song.title) def test_song_has_an_artist(self)...
Python
UTF-8
56
2.703125
3
[ "MIT" ]
permissive
def recursive_power(num, power): return num ** power
Ruby
UTF-8
1,285
3
3
[]
no_license
describe Ability do it 'has a default score of 10' do expect(subject.score).to eq 10 end it 'has a setable score' do subject.score = 15 expect(subject.score).to be 15 end it 'can have a score of 1' do expect { subject.score = 1 }.not_to raise_error end it 'can have a score of 20' do ...
C
UTF-8
620
3.234375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { FILE *f = fopen("input.txt", "r"), *q = fopen("output.txt", "w"); char *s = (char*)malloc(53), *t = (char*)malloc(53), *k; int n, a, b, c, d, m = 1441; fscanf(f, "%d", &n); while (n--) { int i = 1; while (getc(f) != '"'); t[0] = '"'; while ((t[i++] = g...
Markdown
UTF-8
198
3.3125
3
[]
no_license
## Operators You can use multiply (`*`) to multiply strings: ```Python 'la' * 3 # the result is 'lalala' ``` ### Boolean NOT, OR, and AND are represented as `not`, `or`, and `and` respectively.
Java
UTF-8
1,756
2.390625
2
[]
no_license
package com.ctran79.clinic.backend.domain.prescription; import com.ctran79.clinic.backend.domain.BaseEntity; import com.ctran79.clinic.backend.domain.patient.Patient; import com.sun.istack.NotNull; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import java.util.HashSet; import java.util.Set; ...
Markdown
UTF-8
1,994
3.046875
3
[]
no_license
# wkhtmltox-promise A simple wrapper for wkhtmltopdf/wkhtmltoimage for ES 2016/2017 using promises. Downloads and installs the latest wkhtmtopdf lib (0.12.4) on linux. ## Installation: npm i wkhtmltox-promise ## API: pdf(source, dest, options) returns Promise image(source, dest, options[, ignore]) returns...
JavaScript
UTF-8
2,124
3.21875
3
[]
no_license
console.log("Welcome, traveler."); function sortTags(key) { let sortKey = null; if (key == 0) { // alphabetic sortKey = function (a, b) { function strcmp(a, b) { return a < b ? -1 : a > b ? 1 : 0; } return strcmp(a.textContent, b.textContent); }; } else if (key == 1) { /...
Python
UTF-8
2,241
4.46875
4
[]
no_license
""" Consider a city where the streets are perfectly laid out to form an infinite square grid. In this city finding the shortest path between two given points (an origin and a destination) is much easier than in other more complex cities. As a new Uber developer, you are tasked to create an algorithm that does this cal...
Markdown
UTF-8
26,759
2.859375
3
[]
no_license
# Cleaning the data and Feature Engineering Andrea Fernandes <andrea.c.fernandes1@gmail.com> 22 June 2016 ****** #### Cleaning the Data ****** Introductory note The aim of this file is to generate a cleaned dataset. This file explains the variables available in the raw data set, the ...
PHP
UTF-8
3,689
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Api; use Illuminate\Http\Request; use Spatie\Permission\Models\Role; use Spatie\Permission\Models\Permission; use App\Http\Resources\PermissionResource; use App\Http\Controllers\Controller; class PermissionController extends Controller { /** * Display a listing of the re...
Java
UTF-8
481
1.703125
2
[]
no_license
package com.mes.old.meta; // Generated 2017-5-22 1:25:24 by Hibernate Tools 5.2.1.Final /** * IvMonthcheckdetail generated by hbm2java */ public class IvMonthcheckdetail implements java.io.Serializable { private IvMonthcheckdetailId id; public IvMonthcheckdetail() { } public IvMonthcheckdetail(IvMonthcheckdet...
Java
UTF-8
6,304
3.5625
4
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pl.edu.ur.polab4.wprowadzDane; import java.util.Scanner; /** * * @author MICHAL */ public class Tablica { St...
Python
UTF-8
537
2.96875
3
[]
no_license
def pdf_contains_image(cv): "Checks to see if a PDF contains an image." for pi in range(cv.numPages): pg = cv.getPage(pi) if '/XObject' in pg['/Resources']: xObject = pg['/Resources']['/XObject'].getObject() for obj in xObject: if xObject[obj]['/Subtype...
Python
UTF-8
4,146
2.609375
3
[ "Apache-2.0" ]
permissive
"""Basic subscription tests: - create the subscription with a 60 minute expiry - get by ID - get by search - delete """ import datetime import re from ..infrastructure import default_scope from . import common from .common import SCOPE_READ @default_scope(SCOPE_READ) def test_sub_does_not_exist(session, s...
Python
UTF-8
209
3.140625
3
[]
no_license
S=int(input()) #S=x1y2-x2y1 #S+x2y1=x1y2 #S+y1=10**9y2 (x1=10**9, x2=1) #S+y1が10**9の倍数になるようにy1を決める Y1=10**9-S%(10**9) if S%10**9 else 0 Y2=(S+Y1)//(10**9) print(10**9,Y1,1,Y2,0,0)
PHP
UTF-8
1,518
2.796875
3
[ "MIT" ]
permissive
<?php namespace Pucene\Component\QueryBuilder\Query\Specialized\MoreLikeThis; use Pucene\Component\QueryBuilder\Query\QueryInterface; class MoreLikeThisQuery implements QueryInterface { /** * @var array */ private $like; /** * @var string[] * * TODO default '_all' */ pr...
Java
UTF-8
823
2.296875
2
[]
no_license
package com.trj.jk.web.domain.entity; public class BuyCarInfoBean { private String title; private byte status; private byte isFill; private String statusStr; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public byte getStatus() { return s...
TypeScript
UTF-8
1,059
2.515625
3
[ "MIT" ]
permissive
import {RedisService} from "../services/redis.service"; import {RedisClient} from "redis"; import {RedisConnectionTypes} from "../constants/redis-connection-types.constants"; import {RedisError} from "../exceptions/redis.exception"; import {EXCEPTIONS} from "../constants/exceptions.constant"; export class RedisModel {...
Java
UTF-8
2,986
2.6875
3
[]
no_license
package com.example.pgg.qboxdemo.me.weather.draw; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import java.util.ArrayList; /** * Created by pgg on 2018/5/10. */ public class CloudyDrawer extends BaseDrawer { final ArrayList<Circ...
Markdown
UTF-8
2,808
2.84375
3
[ "MIT" ]
permissive
--- layout: post title: "Faster Algorithms for Large-scale Machine Learning using Simple Sampling Techniques" date: 2018-01-18 04:31:40 categories: arXiv_AI tags: arXiv_AI Tracking author: Vinod Kumar Chauhan, Kalpana Dahiya, Anuj Sharma mathjax: true --- * content {:toc} ##### Abstract Now a days, the major challeng...
Java
UTF-8
5,263
2.84375
3
[]
no_license
package dbmsproj.service; import dbmsproj.entity.ReservationForm; import java.sql.*; import java.time.LocalDate; import java.util.ArrayList; import java.util.Calendar; import java.util.List; public class ReservationFormDAO { private PostgreSqlConnection postgreSqlConnection; public void saveCurrentReservati...
Ruby
UTF-8
2,817
2.59375
3
[]
no_license
describe 'load_config' do before(:each) do @config_obj = load_config "spec/fixtures/correct_sample.ini" end it 'should return a ConfigObject that can be queried' do expect(Object.send(:load_config, "spec/fixtures/correct_sample.ini", [])).to be_a INI::ConfigObject end describe "should return an obje...
Markdown
UTF-8
1,252
2.84375
3
[ "Apache-2.0" ]
permissive
--- title: | 053 For us Jesus was baptiz’d. - Hymns for the Poor of the Flock metadata: description: | Hymns for the Poor of the Flock 053. For us Jesus was baptiz’d.. F ob us Jesus was b a p tiz ’d For us He was ag on iz’d ; Mighty vengeance, like a flood, Overwhelm’d the Lamb of God. keywords: ...
Python
UTF-8
2,564
3.3125
3
[]
no_license
import nmap from pprint import pprint while True: print("""\nSelect the option from below List.\n 1 - Device Scan 2 - Network Scan 0 - Close Application""") inp = input("\nEnter your choice here: ") if inp == "1": scanner = nmap.PortScanner() # Target contains the ip address target = input("\nE...
Markdown
UTF-8
900
2.734375
3
[ "MIT" ]
permissive
--- layout: post title: Jekyll + Github Pages 搭建静态博客 - 评论篇 categories: [blog] description: some word here keywords: blog, jekyll, gitment music_id: -1 --- # [Gitment](https://github.com/imsun/gitment) 国人开发的利用 Github issue 功能充当博客系统的评论区,相当有才。 ## 新建一个仓库充当评论区 ## 为你的博客开启 OAuth application ## 使用方法 [集成方法请看这里Gitment博客](http...
Python
UTF-8
355
2.59375
3
[]
no_license
from PIL import Image import pyautogui import pytesseract def pega_localizacao(): x,y,w,h = pyautogui.locateOnScreen(r'data\images\teste.png') return x,y,w,h #print( pytesseract.image_to_string(Image.open(r'data\images\1.png')))# Extraindo o texto da imagem '''x,y,w,h = pyautogui.locateOnScreen(r'data\i...
Java
UTF-8
4,813
2.3125
2
[]
no_license
package gal.san.clemente.tarefa_4_orm.view.clientes; import gal.san.clemente.tarefa_4_orm.model.Cliente; public class DetalleClientePanel extends javax.swing.JPanel { private Cliente cliente; private boolean editable; public Cliente getCliente() { return cliente; } public void setCl...
C#
UTF-8
12,970
2.859375
3
[ "LicenseRef-scancode-unknown-license-reference", "ECL-2.0", "Apache-2.0", "LicenseRef-scancode-unknown" ]
permissive
/// <copyright file="HalfedgeGraph.Vertex.cs" company="Eötvös Loránd University (ELTE)"> /// Copyright (c) 2011-2022 Roberto Giachetta. Licensed under the /// Educational Community License, Version 2.0 (the "License"); you may /// not use this file except in compliance with the License. You may /// obt...
Ruby
UTF-8
1,119
2.578125
3
[]
no_license
#!/usr/bin/env ruby # -*- ruby encoding: utf-8 -*- require 'tinkerforge/ip_connection' require 'tinkerforge/bricklet_nfc' include Tinkerforge HOST = 'localhost' PORT = 4223 UID = 'XYZ' # Change XYZ to the UID of your NFC Bricklet ipcon = IPConnection.new # Create IP connection nfc = BrickletNFC.new UID, ipcon # Cre...
Java
UTF-8
3,865
2.421875
2
[]
no_license
/** * Sample Skeleton for 'DecryptScreen.fxml' Controller Class */ package com.nt.cryptotool.GUIFiles; import java.io.File; import java.net.URL; import java.util.ResourceBundle; import com.nt.cryptotool.miscobjects.Task; import com.nt.cryptotool.objects.Key; import com.nt.cryptotool.objects.TargetFile; import com....
C++
UTF-8
1,426
2.703125
3
[]
no_license
#include <iostream> #include "../../shared/PNG.h" #include <time.h> #include <vector> using namespace std; int main(int argc, char* argv[]){ if(argc < 2){ cout << "Not enough arguments." << endl; return 0; } srand(time(0)); int swp = 0; int swpc = 0; vector<int> memory; Image* scrmbl = readPng(argv[1]); ...
Markdown
UTF-8
6,680
2.6875
3
[]
no_license
# 任务分解 ## 系统总体架构 ![architecture](images/architecture.png) ### 业务组件 #### 产品管理服务 fund-service 产品管理服务提供系统中各类基础信息的管理。 需要完成的工作: * 各类基础信息数据的管理与查询 #### 投资服务 invest-service 投资服务主要用于管理投资指令的信息。 投资服务包含一系列具体的投资服务实现,它们以子模块的形式存在。投资服务的接口,需要派发到各个子模块中做具体实现。不同的子模块对于同一个接口的实现可能是不同的。 需要完成的工作: * 总体接口实现: * 子模块的管理和指令派发。 * 各子模块的接...
Swift
UTF-8
410
3.28125
3
[]
no_license
// // Place.swift // KarrotHome // // Created by 이재은 on 2021/07/21. // import Foundation enum Place: String { /// 홍제동 case Hongje /// 수내1동 case Sunae1 } extension Place { /// 동네 일반 이름 var name: String { switch self { case .Hongje: return "홍제동" case .Suna...
PHP
UTF-8
444
2.9375
3
[]
no_license
<?php declare(strict_types=1); namespace App\Entity; use DateInterval; class SummableDateInterval extends DateInterval { public function add(DateInterval $interval) { foreach (str_split('ymdhis') as $prop) { $this->$prop += $interval->$prop; } $this->i += (int)($this->s /...
Python
UTF-8
4,664
3.265625
3
[]
no_license
from sklearn.model_selection import cross_val_score,train_test_split from sklearn.ensemble import RandomForestClassifier import numpy as np import pandas as pd import scipy from sklearn.tree import DecisionTreeClassifier from sklearn import tree from sklearn.linear_model import LogisticRegression from sklearn.naive_bay...
PHP
UTF-8
12,885
3.25
3
[]
no_license
<?php class Tools { /* * methods */ // retrieve an outside html page and convert into a string function getHTML( string $url ) : string { $user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4)' . ' AppleWebKit/537.36 (KHTML, like Gecko)' . ' Chrome/...
Java
UTF-8
5,590
2.296875
2
[]
no_license
package com.nawaf.jobfinder.ui; import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.widget.TextVie...
JavaScript
UTF-8
592
4.40625
4
[]
no_license
//Operadores // sume two number let numberOne = 60; let numberTwo = 100; let result = numberOne+numberTwo; console.log(result); // cont two strings let name = "Luis"; let lastName = "Meneses"; let space = " "; let compleateName = name+space+lastName; console.log(compleateName); //Compare two numbers let numberOne1 =...
C++
UTF-8
1,209
3.09375
3
[]
no_license
/*Input: jobDifficulty = [6,5,4,3,2,1], d = 2 Output: 7 Explanation: First day you can finish the first 5 jobs, total difficulty = 6. Second day you can finish the last job, total difficulty = 1. The difficulty of the schedule = 6 + 1 = 7 Input: jobDifficulty = [1,1,1], d = 3 Output: 3 Explanation: The schedule is ...
Markdown
UTF-8
29,201
3.125
3
[]
no_license
# ==01-Nodejs模块化介绍== ## 1.1-Nodejs三种模块 * 1.在nodejs中所有的js文件都是一个模块。换言之,所有的模块都是js文件组成(js文件 = 模块) * 2.nodejs中只有三种模块 * 第一种:原生模块/内置模块/核心模块 * 原生模块就是nodejs官网中提供的模块,这些js文件随着node环境一起被下载安装 * 第二种:第三方模块 * 第三方模块就是npm网站下载的模块: 需要使用`npm install [模块名]`来安装 * 第三方模块:文件模块(也就是我们自己写的js文件,在nodejs中只要是js文件就是模块) * 如果是我们自己写...
C#
UTF-8
1,788
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using Todo01.Infrastructure.Persistence.Model; namespace Todo01.Infrastructure.Persistence.Repositories { public class TodoRepository { public IList<TodoItem> All(DateTime fromDate, DateTime toDate, TaskStatus state) { ...
PHP
UTF-8
564
2.78125
3
[]
no_license
<?php /** * An application... It doesn't do much yet! */ class Model_Application extends RedBean_SimpleModel { /** * Returns a nicer formatter name for the select-box base in the application path(path on the dev server) * @return string */ public function getName() { $a = explode('/', $this->path); retur...
Swift
UTF-8
983
2.640625
3
[]
no_license
// // Model.swift // ListOfPlan // // Created by admin on 20.06.2020. // Copyright © 2020 admin. All rights reserved. // import Foundation import UIKit import RealmSwift import UserNotifications class Items : Object { @objc dynamic var name = "" @objc dynamic var date : Date = Date() @objc dynamic va...
JavaScript
UTF-8
1,300
2.734375
3
[]
no_license
var levelsStartingPoint = []; levelsStartingPoint.push({x: 560, y: 31}); var levels = []; // CODE: // 1, 2 = WALLS // 3, N = DOORS, N = Associated Lever // 4, N = SPIKE, N = Delay to trigger in seconds // 100 = POWER UP // 5 = COFFIN // 0 = EMPTY SPACE // 70, N = PORTAL, N = Destination var level1 = []; level1.push(...
Java
UTF-8
2,022
2.40625
2
[]
no_license
package com.appatstudio.epicdungeontactics2.screens.game.gameScreen.actions.characterActions; import static com.appatstudio.epicdungeontactics2.global.WorldConfig.TILE_SIZE; import com.appatstudio.epicdungeontactics2.global.WorldConfig; import com.appatstudio.epicdungeontactics2.global.enums.SpellEnum; import com.app...
PHP
UTF-8
2,491
3.140625
3
[]
no_license
<? namespace App\Helper; /** * FormatHelper * */ class FormatHelper { private $lang; private $options; /** * FormatHelper constructor. */ public function __construct($options, $lang) { $this->options = $options; $this->setLang($lang); } public function curre...
Java
UTF-8
9,685
2.890625
3
[ "MIT" ]
permissive
package client; import java.io.*; import java.net.Socket; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger; import message.*; /** * A client application used for connecting to a chat server and talking to other online users. */ public class Client { /** * Construc...
JavaScript
UTF-8
3,551
2.90625
3
[]
no_license
var URL = "http://localhost:8080/projeto-teste/rs/setor"; var botaoEnviar = document.getElementById("enviar"); var botaoAtualizar = document.getElementById("atualizar"); const HTTP_STATUS_OK = 200; const HTTP_STATUS_CREATED = 201; window.addEventListener("load", function(event) { temDadosLocalStorage(); }); bota...
Java
UTF-8
785
1.929688
2
[]
no_license
package com.wisrc.sys.webapp.dao; import com.wisrc.sys.webapp.entity.SysUserWorktileEntity; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; @Mapper public interface SysUserWorktileDao {...
C++
UTF-8
3,262
2.890625
3
[ "ISC", "BSD-3-Clause", "Apache-2.0" ]
permissive
#pragma once #include <jni/functions.hpp> #include <jni/object.hpp> #include <jni/array.hpp> namespace jni { template < char... chars > struct StringLiteral { operator const char *() const { static const char result[] = { chars..., 0 }; return result; ...
C#
UTF-8
4,342
3.765625
4
[]
no_license
//You are given a tree of N nodes represented as a set of N-1 pairs //of nodes (parent node, child node), each in the range (0..N-1). //Write a program to read the tree and find: //a) the root node //b) all leaf nodes //c) all middle nodes //d)* the longest path in the tree //e)* all paths in the tree with given sum S...