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
JavaScript
UTF-8
977
3.046875
3
[]
no_license
// LANDING const left = document.querySelector(".left"); const right = document.querySelector(".right"); const container = document.querySelector(".container"); left.addEventListener("mouseenter", () => { container.classList.add("hover-left"); }); left.addEventListener("mouseleave", () => { container.classList.re...
Java
UTF-8
1,310
2.234375
2
[ "DOC", "Apache-2.0" ]
permissive
package org.fcrepo.common.http; import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import javax.servlet.FilterConfig; import javax.servlet.ServletContext; public class FilterConfigBean implements FilterConfig { private ServletContext cxt; ...
Java
UTF-8
5,821
2.0625
2
[]
no_license
package com.zhenjinzi.yzy.model; import static javax.persistence.GenerationType.IDENTITY; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.Gener...
Java
UTF-8
856
2.984375
3
[]
no_license
package test; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import game.*; class AnimalTest { @Test void test() { Animal testCow = new Cow(); testCow.addAnimals(10); testCow.updateHappiness(10); testCow.updateHappinessGrowth(10); testCow.updateHealth(10); testCow...
Java
UTF-8
1,977
2.15625
2
[ "MIT" ]
permissive
package com.netease.audioroom.demo.model; import com.netease.yunxin.nertc.nertcvoiceroom.util.JsonUtil; import org.json.JSONException; import org.json.JSONObject; import java.io.Serializable; public class AccountInfo implements Serializable { public final String account; public final String nick; publ...
TypeScript
UTF-8
21,370
3.109375
3
[ "MIT" ]
permissive
import Dispatcher from "./Dispatcher"; import Camera, { CameraLocation } from "./Camera"; import Graph from "./Graph"; import { Settings } from "./Configurable"; import { SigmaConfiguration, Keyed, SigmaSettings, Renderer, SigmaUtils, SigmaMisc, SigmaWebGLUtilities, SigmaSvgUtils, SigmaCanvasUtils, ...
Java
UTF-8
4,414
2.09375
2
[]
no_license
package com.hive.hive.association.transparency; import android.content.pm.PackageManager; import android.support.annotation.NonNull; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; import android.support.v7.app.AppComp...
PHP
UTF-8
12,155
2.71875
3
[]
no_license
<?php //ログ ini_set('log_errors', 'on'); ini_set('error_log', 'php_log'); // デバッグ $debug_flg = true; function debug($str) { global $debug_flg; if (!empty($debug_flg)) { error_log('デバッグ:' . $str); } } // セッション準備 session_save_path("/var/tmp/"); ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 30); ini_set(...
Python
UTF-8
4,275
2.703125
3
[]
no_license
#Momentum.py import pandas as pd import datetime import dateutil.relativedelta import sys from functools import reduce sys.path.append('../lib/') from dbConnect import * from matplotHangul import * # market_code = '001' # KOSPI start_code = '000000' end_code = '900000' market_code = '201' # KOSPI200 / 만약 '001' 로...
Python
UTF-8
310
2.5625
3
[]
no_license
from sklearn.base import BaseEstimator, TransformerMixin class CustomTransformer(BaseEstimator, TransformerMixin): def __init__(self): pass def fit(self, X, y=None): return self def transform(self, X, y=None): X_ = (X - X.min()) / (X.max() - X.min()) return X_
Markdown
UTF-8
12,520
3.03125
3
[ "MIT" ]
permissive
--- slug: "/news/test2" date: "2019-05-04" title: "Lorem ipsum is Awesome." image: "./test.jpg" author: Kim Jackson category: Engineering --- ## TL;DR Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknow...
Java
UTF-8
3,946
2.640625
3
[]
no_license
package com.hhkj.hdao.util; import java.util.HashMap; import java.util.List; /** * * @ClassName Page * @Description 分页类 * @author maxh * @date 2014年5月1日 * @param <T> */ public class Page<T> { private int currentPage = 1;// 当前页,默认值为1 private int limit = 0;// 每页显示个数 private int totalsize = 0;...
TypeScript
UTF-8
9,448
2.59375
3
[]
no_license
import { extname } from "path"; import { readFileSync } from "fs"; import { IImport } from "import-sort-parser"; import { IStyleAPI, IStyleItem } from "import-sort-style"; const isAlias = (alias: string[]) => (moduleName: string) => alias.indexOf(moduleName.split("/")[0]) >= 0; const hasAlias = (alias: string[]) =>...
JavaScript
UTF-8
13,311
3.046875
3
[ "MIT" ]
permissive
import Future from "./Future"; import { assert, assertFunc, append, noop, raise } from "./utils"; import { Status } from "./constants"; const { PENDING, REJECTED, CANCELLED } = Status; const assertTask = arg => assert(arg instanceof Task, "argument is not a Task"); export default class Task { /** * Creates a Tas...
Swift
UTF-8
1,672
2.796875
3
[]
no_license
// // CharacterViewController.swift // NC3 // // Created by Adella Amanda on 13/06/20. // Copyright © 2020 Sherwin Yang. All rights reserved. // import UIKit class CharacterViewController: UIViewController { @IBOutlet weak var nameLabel: UILabel! @IBOutlet var lanjutButton: UIButton! var use...
Shell
UTF-8
284
2.515625
3
[]
no_license
#!/bin/bash # support pop pop_send() { _subject="$1" _content="$2" _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped _debug "_subject" "$_subject" _debug "_content" "$_content" _debug "_statusCode" "$_statusCode" _err "Not implemented yet." return 1 }
Java
UTF-8
2,928
2.1875
2
[]
no_license
package com.appzoneltd.lastmile.microservice.workflow.kafka; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.activiti.engine.RuntimeService; import org.activiti.engine.runtime.Execution; import org.activiti.engine.runtime.ProcessInstance; import org.spring...
C#
UTF-8
936
2.84375
3
[ "MIT" ]
permissive
using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Net; namespace Strategy.Library.Extensions { /// <summary> /// Extensions to NetworkSession. /// </summary> public static class NetworkSessionExtensions { /// <summary> /// Checks if SessionType...
C++
UTF-8
5,273
2.6875
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/ntp_tiles/most_visited_sites.h" #include <stddef.h> #include <memory> #include <vector> #include "base/macros.h" #include "base/me...
C++
UTF-8
446
2.59375
3
[]
no_license
#include <stdio.h> template<bool V> struct S1 { static const bool V1 = V; }; template<class> struct S2 : S1<false> {}; template<class C2> struct S2<C2 const> : S1<true> {}; template<class C3, bool VV = S2<C3>::V1> struct S3 { static const bool V3 = VV; }; struct X {}; int main() { if (S3<X>::V3) printf(...
C++
UTF-8
9,231
3.171875
3
[]
no_license
#include "Field.h" #include <cstring> #include <cassert> #include <iostream> #include <cstdio> #include <map> #include <cstdlib> using namespace std; Stone::Stone() { state = Shown; value = 0; } Stone::Stone(const Stone &rhs) { state = rhs.state; value = rhs.value; } void Stone::set_B() { state = SuperHid...
Python
UTF-8
2,094
2.984375
3
[]
no_license
#!/usr/bin/env python import re patt = r'(\w+) (\w+) \d\d \d\d:\d\d:\d\d\s+\d\d\d\d' mon,tue,wed,thu,fri,sat,sun =0,0,0,0,0,0,0 jan,feb,mar,apr,may,jun,jul,aug,sep,octo,nov,dec=0,0,0,0,0,0,0,0,0,0,0,0 with open("redata1.txt") as fobj1: for item in fobj1: m = re.match(patt,item) if m is not None:pri...
SQL
UTF-8
102,103
2.8125
3
[]
no_license
-- MySQL CS 155A use a_bkinfo; delete from a_bkorders.order_details; delete from a_bkorders.order_headers; delete from a_bkorders.customers ; delete from a_bkorders.handling_fees; delete from a_bkinfo.book_authors ; delete from a_bkinfo.authors; delete from a_bkinfo.book_topics; delete from a_b...
Ruby
UTF-8
449
3.375
3
[]
no_license
class Student # attr_accessor :name, :cohort def initialize(student_name, cohort) @name = student_name @cohort = cohort end def student_name() return @name end def cohort() return @cohort end def set_student_name(name) @name = student_name end def set_cohort(cohort) @cohort = coho...
Java
UTF-8
954
2.546875
3
[]
no_license
package com.example.myide.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.*; /** * 文件处理Controller */ @RestController public class FileController { @CrossOrigin //解决跨域问题 @PostMapping(valu...
Markdown
UTF-8
1,287
3.484375
3
[]
no_license
# Problem https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid/problem # Solution [Depth first search](https://ko.wikipedia.org/wiki/%EA%B9%8A%EC%9D%B4_%EC%9A%B0%EC%84%A0_%ED%83%90%EC%83%89)를 이용하는 것이 핵심이다!<br/> grid를 한번씩 훑는데, 이미 지나온 elements는 0으로 바꿔 여러 번 카운팅되지 않도록 한다. ```java static int maxRegion(int[][...
C#
UTF-8
18,835
3.3125
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace V2IHubSimulator { class GeoVector { private double _x; private double _y; private double _z; private const double _earthRadiusInKM = 6371.0...
PHP
UTF-8
4,870
2.625
3
[]
no_license
<?php $title = 'Register'; include('includes/header.php'); include('includes/mysqli_connect.php'); include('includes/functions.php'); include('includes/sidebar-a.php'); ?> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $errors = []; //xd cac du lieuj laf ja $fn = $ln = $e = $p = false; if (preg_match('/^[\w\'....
C#
UTF-8
684
2.609375
3
[]
no_license
using UnityEngine; using System.Collections; public class FallingBlock : MonoBehaviour { void Start () { } void Update () { } void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag=="Player") { StartCoroutine(FallBlock()); ...
Python
UTF-8
3,806
2.6875
3
[ "MIT" ]
permissive
""" Design Under Uncertainty ======================== We will ue the Cantilever Beam benchmark to illustrate how to design under uncertainty. .. figure:: ../../figures/cantilever-beam.png :align: center Conceptual model of the cantilever-beam .. table:: Uncertainties :align: center ============...
C
UTF-8
138
2.921875
3
[]
no_license
#include <stdio.h> int main() { int a, i; scanf("%X", &a); for(i=1;i<=15;i++) { printf("%X*%X=%X\n", a, i, a*i); } return 0; }
Python
UTF-8
245
3.1875
3
[]
no_license
#!/usr/bin/env python # -*- coding:utf-8 -*- # Auther Jmz person = ['jmz','qqc',['aa','bb','cc']] p1 = person[:] # 浅copy 的另一种形式 p2 = person[:] person[0] = 'jjj' person[2][0] = 'aaa222' print(p1) print(p2)
Java
UTF-8
906
2.09375
2
[]
no_license
package com.xyy.bill.def; import com.xyy.bill.meta.BillViewMeta; import com.xyy.bill.meta.DataSetMeta; public class ViewportDef{ private String key;// 字典key private String fullKey; private BillViewMeta view;// 视图--视口的视图必须为BillUIPanel private DataSetMeta dataSet;// 数据集定义 public ViewportDef(String key)...
C#
UTF-8
1,241
2.53125
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace YaaargShooter { public class HERO_CAMERA : MonoBehaviour { // -- ATTRIBUTES [SerializeField] public HERO Hero; [SerializeField] public Transform Pivot; [SerializeField] public float Maxim...
Java
UTF-8
654
2.203125
2
[ "Apache-2.0" ]
permissive
package com.huijimuhe.commonlayout.utils; import android.graphics.Bitmap; import android.view.View; public class ScreenShotUtil { private View view; public ScreenShotUtil(View view) { this.view = view; } public Bitmap convertlayout() { view.setDrawingCacheEnabled(true); view.measure(View.Measur...
Python
UTF-8
802
2.703125
3
[]
no_license
import sys # # x = sys.argv[1] # # y = sys.argv[2] # fil1 = "" # fi1 = open(sys.argv[1], "r") # for i in fi1: # fil1 += i.strip() + f"\t{sys.argv[1]}\n" # # fil1 += f"\t{x}\n" # fi1.close() # fil2 = "" # fi2 = open(sys.argv[2], "r") # for i in fi2: # fil2 += i.strip() + f"\t{sys.argv[1]}\n" # # fil2 +...
Markdown
UTF-8
3,500
3.015625
3
[]
no_license
![Ironhack logo](https://i.imgur.com/1QgrNNw.png) # Lab | My first queries Please, connect to the Data Bootcamp Google Database using the credentials provided in class. Choose the database called *appleStore* (NOT *appleStore2*!). Use the *data* table to query the data about Apple Store Apps and answer the following ...
Markdown
UTF-8
1,241
2.6875
3
[]
no_license
--- name: Yoshitaka Fujii title: "Development of a serverless web application framework using DDD" length: 40 audience: Intermediate language: Japanese twitter: yoshiyoshifujii github: yoshiyoshifujii icon: https://pbs.twimg.com/profile_images/907421547551277056/_vQ3f2Fg_400x400.jpg organization: MOTEX Inc. tags: - ...
C#
UTF-8
11,122
2.75
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using Int8 = System.SByte; using UInt8 = System.Byte; public interface ViReceiveDataKeyInterface { void Read(ViIStream IS); } public class ViReceiveDataKeyInt8 : ViReceiveDataKeyInterface { public ViReceiveDataKeyInt8() { } public ViReceiveDataKeyInt8(Int8 value) {...
Java
UTF-8
772
2.28125
2
[ "Apache-2.0" ]
permissive
package com.ropeok.dataprocess.handler.impl; import com.ropeok.dataprocess.handler.HandleStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; /** * 方便调试 */ public class PrintDataProcHandler extends AbstractProcHandler{ private static final Logger LOGGER = LoggerF...
JavaScript
UTF-8
1,737
4.25
4
[]
no_license
//String Compression implement a method to perform basic string compression using the counts //of repeated characters. For example, the string aabbcccccaaa would be come a2b1c5a3. If the // "compressed" string would not become smaller than the original string, your method should return function stringComp(str){ if(...
Markdown
UTF-8
637
2.515625
3
[ "MIT" ]
permissive
--- num: "proj01" desc: "Observed 1-on-1 help session" ready: true assigned: 2018-04-19 15:30:00.00-8:00 due: 2018-04-26 17:00:00.00-8:00 --- # Scheduling your one-on-one observations * You have two tries on this assignment. If you feel that your first observation did not go well, you may request your instructor for ...
C
UTF-8
376
3.21875
3
[]
no_license
1,for(表达式1;循环条件;表达式2){ //语句; } //打印1-200内不能被3整除的数 for(int i = 1;i<200;i++){ if(i % 3 != 0){ NSLog(@"%d不能被3整除",i); } } 用for循环写一个 乘法口诀表 for(int i = 1; i <=9; i++){ for (int j = 1;j <= i; j++){ printf(" %d*%d = %d",i,j,i*j); } printf("\n"); }
Java
UTF-8
2,165
3.8125
4
[]
no_license
package demo4; import java.io.File; import java.io.FilenameFilter; public class java25 { public static void main(String[] args) { // TODO Auto-generated method stub File f=new File("C:\\Windows");//构造File对象时,既可以传入绝对路径,也可以传入相对路径 //File的路径返回值:一种是getPath(),返回构造方法传入的路径,一种是getAbsolutePath(),返回绝对路径, //一种是getCanon...
Java
UTF-8
1,635
2.046875
2
[]
no_license
package com.beisheng.snatch.adapter; import android.os.Build; import android.support.annotation.RequiresApi; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.widget.ProgressBar; import com.beisheng.snatch.R; import com.beisheng.snatch.model.ShopCategoryRightVO; import com.s...
Java
UTF-8
376
1.59375
2
[ "Apache-2.0" ]
permissive
package com.jugnicaragua.demoappreactive.repositorio; import com.jugnicaragua.demoappreactive.modelo.Producto; import org.springframework.data.repository.reactive.ReactiveCrudRepository; import org.springframework.stereotype.Repository; import reactor.core.publisher.Flux; @Repository public interface ProductoReposito...
Python
UTF-8
285
3.46875
3
[]
no_license
password=input("enter the number") if len(password)<6: print("it is too long it must be in between 6 to 12 character") elif len(password)>12: print("it is too long charactor it must be in between 6 to 12") elif len(password)>=6 or (password)<12: print("passwork okk")
C++
UTF-8
696
3.671875
4
[]
no_license
#include <iostream> using namespace std; void primefactorization(int num) { for(int i = 2; i <= num; i++) { int count = 0; // cout << "Number is --> " << num << " and i " << i << endl; if(num % i == 0) { // cout << "Number is ---> " << num << " and i " << i << endl;...
Ruby
UTF-8
2,034
2.890625
3
[]
no_license
module SessionsHelper def sign_in(user) # create cookie # permanent causes Rails to set the expiration to 20.years.from_now automatically cookies.permanent[:remember_token] = user.remember_token # create variable current_user, accessible in both controllers and views self.current_user = user en...
Java
UTF-8
1,279
2.109375
2
[]
no_license
package com.yla.service; import java.util.List; import org.springframework.data.domain.Sort.Direction; import com.yla.entity.WarehouseList; import com.yla.entity.WarehouseListGoods; /** * 退货单Service接口 * @author * */ public interface WarehouseListService { /** * 根据id查询实体 * @param id *...
Python
UTF-8
1,451
3.328125
3
[]
no_license
# write a function that asks for a file and # for each line in that file finds each line that contains # an IP address wrapped in a square bracket ([000.000.000.000]) # (for all IPs, the number of digits between each dot # is between 1 and 3 [0, 00, or 000]), # extracts each ip address and splits it up into # a tuple o...
Java
UTF-8
909
2.703125
3
[ "BSD-3-Clause", "BSD-2-Clause-Views" ]
permissive
package gov.healthit.chpl.validation.listing; import java.util.List; import gov.healthit.chpl.dto.PendingCertifiedProductDTO; import gov.healthit.chpl.validation.pendingListing.reviewer.Reviewer; /** * Abstract class for validating Pending Listings. * @author alarned * */ public abstract class PendingValidator {...
PHP
UTF-8
15,592
2.640625
3
[]
no_license
<?php /** * MARQUes - Maps Answering Research Questions * * @copyright Copyright 2011, Flinders University (http://www.flinders.edu.au) * @license http://opensource.org/licenses/bsd-license.php The BSD License */ namespace app\controllers; use lithium\data\Connections; use app\models\FilmWeeklyCinemas...
C++
UTF-8
2,827
2.90625
3
[]
no_license
/* * Log.h * * Created on: 2013-10-1 * Author: linzhaoxiang */ #ifndef LOG_H_ #define LOG_H_ #include <string> #include <iostream> #include <vector> #include <algorithm> #include <iterator> #ifndef LOG_LEVEL #define LOG_LEVEL LOG_ALL #endif enum LogType{ LOG_OFF=0X00, LOG_CONSOLE=0x01, LOG_FATAL=0x02, ...
C
UTF-8
415
3.703125
4
[ "Unlicense" ]
permissive
#include <stdio.h> char *mystrncpy(char *restrict dst, const char *restrict src, size_t len) { int i; for (i = 0; i < len && src[i]; i++) dst[i] = src[i]; dst[i] = '\0'; return dst; } int main(void) { const char src1[] = "hello, world."; const char src2[] = "There are many characters.abcdef,123456"; char dst[...
Markdown
UTF-8
2,702
2.8125
3
[]
no_license
--- title: "Chromecast and network namespaces" slug: "chromecast-and-network-namespaces" date: "2014-12-17" categories: - Software tags: - howto - openvpn - privacy - security - vpn - chromecast - avahi - mdns images: - /img/2014/chromecast/result.png --- This is a follow-up to the post about [OpenV...
PHP
UTF-8
919
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Input; use DateTime; use App\Emodel; use Validator; class VisitorFavoriteTour extends Emodel { protected $table = 'VST010'; public function tour() { return $this->hasOne('TourProfile', 'id', 'tr0010_id'); } public function ...
Shell
UTF-8
1,458
3.3125
3
[]
no_license
#!/bin/bash Shell information pwd: prints the path of the current working directory ls: display the contents list of your current directory cd: changes the working directory to the user’s home directory ls -l: display current directory contents in long format ls -al: display current directory contents, including hidd...
Markdown
UTF-8
939
2.59375
3
[]
no_license
# UML ## 结构性 1. 类图(重点):+、-、#分别表示公有、私有、保护。 - 类名 - 属性 可见性 属性名称:类型 - 操作 可见性 操作名称(参数名称:类型):返回值类型 - 关联关系: - 双向关联:直线关联 - 限定关联:单向箭头 - 单向关联:带箭头的实线 - 自关联:类的属性为自己本身 - 聚合关联:表示整体与部分的关系,带菱形和箭头的实线 - 组合关系:带实心菱形和箭头的实线,通过构造方法实例化成员类。 - 依赖关系:带箭头的虚线 - 泛化关系(继承关系):带空心箭头的实线 - ...
Ruby
UTF-8
303
3.390625
3
[]
no_license
class ScoreKeeper def initialize @score = @count = 0 end def <<(value) @score += value @count += 1 @score end def average fail "No scores" if @count === 0 Float(@score) / @count end end sk = ScoreKeeper.new sk << 45 << 12 << 1 << 89 puts "Average: #{sk.average}"
JavaScript
UTF-8
4,211
3.0625
3
[]
no_license
/** * */ function three(){ document.getElementById("sectionThree").style.display = "block"; document.getElementById("sectionFour").style.display = "none"; document.getElementById("NumBox").value = "3"; } /*การทำงานในส่วนของหน้ากระดาน 3x3*/ var player = 1; var listWinThree = []; function myFunction(i,j) { va...
JavaScript
UTF-8
1,042
2.515625
3
[ "MIT" ]
permissive
const tree = require('./treegen.json'); const findReplace = []; function escapeRegExp(string) { return string.replace(/[$()*+.?[\\\]^|]/g, '\\$&'); // $& means the whole matched string } function makeRegex(string) { return escapeRegExp(string).replace(/{(\d+)}/g, '(.*?)'); } function makeResult(string) { let ...
C
UTF-8
572
2.625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
// -*- c -*- // IrSensors Arduino Library // // Copyright (c) 2013 Dave Sieh // See LICENSE.txt for details. #include <IrSensors.h> // Set up the IR Sensors with the following pins: // Left - 0 // Center - 2 // Right - 1 IrSensors sensors(0, 2, 1); void setup() { // Initialize the sensors sensors.begin(); // D...
Python
UTF-8
3,112
2.5625
3
[ "MIT" ]
permissive
"""Niseko export utilities.""" import os import inspect from .execution_plan import get_primitive_path def get_method_arguments(method): return set(inspect.signature(method).parameters.keys()) def convert_pipeline_to_script(steps): """ Convert a pipeline to a executable script. :param steps: :...
Java
UTF-8
3,280
2.78125
3
[]
no_license
import beverages.Beverage; import com.fasterxml.jackson.databind.ObjectMapper; import enums.BeveragesEnum; import enums.IngredientsEnum; import ingredients.Ingredient; import input.InputRequest; import services.BeverageService; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map;...
Swift
UTF-8
409
2.703125
3
[ "BSD-3-Clause" ]
permissive
import UIKit public protocol CellType: ReuseableType, ConfigurerType { } extension UITableViewCell: CellType { public typealias Type = TableCellRowConfigurer public func configure(type: Type) { type.configure(self) } } extension UICollectionViewCell: CellType { public typealias Type = CellIte...
PHP
UTF-8
1,792
2.890625
3
[]
no_license
<?php if(isset($_GET['delog'])) : session_start(); unset($_SESSION['id_user']); unset($_SESSION['role']); header("location:admin.html"); exit; endif; ## LE CONNEXION !! Bièsse, tu dois le mettre dans ton formulaire pour qu'il ait un endroit ou renvoyer les données' if (isset($_POST['connexion'])): $sql= sprintf("SELEC...
Shell
UTF-8
1,189
3.78125
4
[ "MIT" ]
permissive
#!/bin/bash if [ ! "$3" ] then echo 'Use: mkbook.sh <number of nodes> <number of edges> <pages>' >&2 exit 1 fi NODES="$1" EDGES="$2" PREFIX="${NODES}_${EDGES}" PAGES="$3" TITLE="GraphGame $NODES/$EDGES" GGMD5="// `md5sum graphgame.c`" # First generate them for (( i = 1; $i <= $PAGES; i++ )) do echo $i >&2...
Java
UTF-8
1,160
2.25
2
[]
no_license
package action; import java.io.IOException; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import controller.ActionForward; import model.Customer; import...
Python
UTF-8
349
2.515625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
import unittest from eink.server.request import Request class RequestTest(unittest.TestCase): """Tests the ``Request`` class.""" def test_to_from_bytes(self): """Test ``Request.to_bytes()`` and ``Request.create_from_bytes``.""" self.assertIsInstance( Request.create_from_bytes(Req...
JavaScript
UTF-8
1,266
2.546875
3
[]
no_license
var _ = require('underscore'); function helpers(){ var self = this; self.supportedConnections = [ { host:"www.linkedin.com", description: "LinkedIn", id: "linkedIn", idPath: "connections.linkedIn", getIdFromPath: function(path){ var routeParts = path.split("/"); v...
Python
UTF-8
1,881
2.796875
3
[]
no_license
#!/usr/bin/python import settings class Generation: fitness_score=0 chromosomes=[] class Solution: _best_generation=None best_fitness_score=None problem=None genes=None selection=None nr_of_generations=None def __init__(self, problem, genes, selection, nr_of_generations=1000): self.problem...
C
UTF-8
488
2.5625
3
[]
no_license
#include <stdio.h> #include "header.h" int main(){ int nr=-1, nc, i,j,n=1,tmp_b,tmp_h,tmp_area, A[MAX_R][MAX_C]; leggiMatrice(A,MAX_R,&nr,&nc); if(nr==-1)return -1; for(i=0;i<nr;i++) for(j=0;j<nc;j++) if (riconosciRegione(A, nr, nc, i, j, &tmp_b, &tmp_h)){ tmp_area...
Java
UTF-8
609
2.984375
3
[]
no_license
package net.baekjoon.dp; import java.util.Scanner; // 백준 1463번 문제 풀이 public class Main1463 { static final int N = 1000000; public static void main(String[] args){ int[] DP = new int[N+1]; Scanner s = new Scanner(System.in); int rN = s.nextInt(); for(int k=2;k<=rN;k++){ ...
C
UTF-8
128,515
2.84375
3
[ "NCSA", "MIT", "LLVM-exception", "Apache-2.0", "BSD-3-Clause", "GPL-1.0-or-later", "LGPL-2.0-or-later" ]
permissive
/* * Test case inputs for: __uint128_t __fixunstfti (long double) * Conversion from long double (IBM double-double) to 128 bit integer. */ #define INFINITY __builtin_inf() #define QNAN __builtin_nan("") #define INIT_U128(HI, LO) (((__uint128_t) (HI) << 64) | (LO)) struct testCase { double hiInput; double loInput;...
Java
UTF-8
1,138
2.015625
2
[]
no_license
package com.xadmin.mockito.controller; import com.xadmin.mockito.model.User; import com.xadmin.mockito.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org...
Java
UTF-8
203
1.734375
2
[]
no_license
package worker; public class Chefbrico extends Chef { public Chefbrico(int identifiant, String nom, String prenom) { super(identifiant, nom, prenom); // TODO Auto-generated constructor stub } }
Shell
UTF-8
419
2.9375
3
[]
no_license
#!/bin/bash set-x # To be executed in the vmpi folder IRATI_REPO=~/git/irati rm *.patch git format-patch rina..master patches=$(ls *.patch) mv ${patches} ${IRATI_REPO} pushd ${IRATI_REPO} for patch in ${patches}; do git am --directory=linux/net/rina/vmpi --exclude=linux/net/rina/vmpi/user-vmpi-test.c --exc...
Python
UTF-8
9,425
3
3
[]
no_license
# -*- coding: utf-8 -*- """ mundo.py Created on Wed Oct 7 14:00:00 2020 @author: mlopez """ from tablero import Tablero import random def print_debug(msg, print_flag=False): if print_flag: print(msg) class Mundo(object): """docstring for Mundo""" def __init__(self, columnas, filas, n_leones, ...
Java
UTF-8
3,199
2.53125
3
[]
no_license
package de.gandev.modjn.example; import de.gandev.modjn.handler.ModbusRequestHandler; import de.gandev.modjn.entity.func.request.ReadCoilsRequest; import de.gandev.modjn.entity.func.response.ReadCoilsResponse; import de.gandev.modjn.entity.func.request.ReadDiscreteInputsRequest; import de.gandev.modjn.entity.func.resp...
Python
UTF-8
1,569
3.46875
3
[ "MIT" ]
permissive
""" Various utility functions """ import os import re from collections import Counter, defaultdict from stringprocessor import StringProcessor as sp import pandas as pd class DefaultCounter(defaultdict, Counter): def __gt__(self, other): if isinstance(other, self.__class__): return sum(self...
Python
UTF-8
1,186
4.375
4
[]
no_license
"""Multiples of 3 and 5 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. 和訳:3と5の倍数 10未満の自然数で3と5の倍数は3,5,6,9となり、これらの倍数の和は23となる。 1000未満の3と5の倍数の和を求めよ。 """ import doctest def main(): ...
JavaScript
UTF-8
1,729
2.984375
3
[]
no_license
const puppet = require('puppeteer') const SELECTORS = require('./selectors.json'); async function run(name) { const browser = await puppet.launch({ headless: true }); const page = await browser.newPage(); await page.goto('https://kahoot.it'); await page.click(SELECTORS.pin); awai...
Java
UTF-8
11,400
2.96875
3
[]
no_license
import java.io.File; import java.io.IOException; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Scanner; /* CS 314 STUDENTS: FILL IN THIS HEADER AND THEN COPY AND PASTE IT TO YOUR * LetterInventory.java AND AnagramSolver.java CLASSES. * * ...
Markdown
UTF-8
1,820
2.65625
3
[]
no_license
# Article R184-1-1 Sans préjudice des conditions définies aux 1° et 2° de l'article L. 712-9, l'octroi ou le renouvellement de l'autorisation, mentionnée à l'article L. 184-1, de pratiquer une ou plusieurs des activités cliniques ou biologiques d'assistance médicale à la procréation définies à l'article R. 152-9-1, à ...
Java
UTF-8
1,675
2.625
3
[ "Apache-2.0" ]
permissive
/* Licensed under Apache-2.0 */ package com.rabidgremlin.mutters.slots; import java.time.ZonedDateTime; import java.util.Date; import java.util.List; import java.util.Optional; import java.util.TimeZone; import com.joestelmach.natty.DateGroup; import com.joestelmach.natty.Parser; import com.rabidgremlin.mutters.core....
C++
UTF-8
987
2.5625
3
[]
no_license
#define B 494 // 시 int trig = 12; int echo = 11; int piezoPin = 10; int tempo = 200; void setup() { // Vcc - +극 // Gnd - -극 // Trig - 초음파를 발사 // Echo - 초음파가 다시 돌아오는 시간으로 거리 측정 Serial.begin(9600); pinMode(trig, OUTPUT); pinMode(echo, INPUT); pinMode(piezoPin, OUTPUT); } void loop(...
Java
UTF-8
419
2.8125
3
[]
no_license
public class AnimalTester { public static void main(String[] args) { Elephant elephant = new Elephant("Dumbo"); Tiger tiger = new Tiger("Niala"); elephant.feed(); elephant.feed(); elephant.addFood(); elephant.showAnimalState(); tiger.feed(); tiger.a...
Java
UTF-8
150
2.5625
3
[]
no_license
public class Perebors100do1 { public static void main(String[] args) { for (int i=1000; i>=0; i=i-1) System.out.println(" i=" + i); } }
Java
UTF-8
4,061
1.523438
2
[ "MIT" ]
permissive
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ pa...
Python
UTF-8
2,733
2.671875
3
[]
no_license
# # LSST Data Management System # Copyright 2008, 2009, 2010 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
Markdown
UTF-8
1,375
3.53125
4
[ "BSD-3-Clause" ]
permissive
--- title: "Rendering Data" description: "Foo bar." buttonTitle: "I rendered the todo items" parentId: "tutorial-todo-soy" layout: "tutorial" time: 90 weight: 5 --- ## {$page.title} First, let's prepare the `TodoItem` for consuming the data passed from `TodoApp`: ```soy &#123;namespace TodoItem&#125; /** * This re...
Java
IBM852
2,469
3.25
3
[]
no_license
package ExemploDAO; import java.util.ArrayList; import javax.swing.JOptionPane; public class CrudUsuario { public static void main(String[] args) { ArrayList<Usuario> usuarios; Usuario usuario; int opcao; do { opcao = menu(); switch (opcao) { case 1: usuario = entradaDados(); ...
Java
UTF-8
1,257
2.171875
2
[]
no_license
package com.bcen.controller; import java.util.List; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotati...
Python
UTF-8
517
3.765625
4
[]
no_license
file = open('text.txt','r+') changed_text = '' for word in (file.readline()).split(): if(word == 'ADJECTIVE'): word = input("Writte an adjective:") elif(word == 'VERB'): word = input("Writte a verb:") elif(word == 'NOUN'): word = input("Writte a noun:") elif(word == 'OBJ...
C
UTF-8
494
2.5625
3
[]
no_license
#include "../src/basic_functions.h" #include "../src/analog.h" int main() { millis_init(); pinMode(11, OUTPUT); pinMode(10, OUTPUT); pwmInit(11); pwmInit(10); uint8_t value = 0; int8_t diff = 1; analogWrite(11, value); analogWrite(10, 255 - value); while(1) { delay(5);...
C++
UTF-8
1,026
3.5
4
[]
no_license
#include <iostream> #include <filesystem> #include <string> using namespace std; namespace fs = filesystem; class Directory { public: Directory(fs::path dir_name) : dir(dir_name), is_new(true) { if (!fs::exists(dir)) fs::create_directory(dir); else { if (!fs::is_directory(d...
C++
UTF-8
389
2.921875
3
[]
no_license
// ac_6_19.cpp // Горбацевич Андрей #include <iostream> using namespace std; double inline funk(int i) { return 1./i; } int main() { double A; cout << "A="; cin >> A; int i = 1; double cur = funk(i); double prev = 1e6*1.; while (!((prev > A) && (A >= cur))) { prev = cur; ...
C#
UTF-8
2,881
2.90625
3
[]
no_license
namespace Physicist.Controls { using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework.Input; using Physicist.Controls; public class KeyboardDebouncer { private Dictionary<Keys, DebouncerKeyState> trackedKeys = new Dictionary<Keys, DebouncerKeyState>(); ...
Swift
UTF-8
4,447
2.8125
3
[]
no_license
// // Graphic1View.swift // Onboarding // // Created by Thongchai Subsaidee on 21/4/2564 BE. // import SwiftUI struct Graphic2View: View { var body: some View { LinearGradient( gradient: Gradient(colors: [Color(#colorLiteral(red: 0.9675970674, green: 0.4913076758, blue: 0.5138258934, alpha:...