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,350
3.046875
3
[ "LicenseRef-scancode-unknown-license-reference", "WTFPL" ]
permissive
/*****************************************************************************/ /** * \file mem_getFactoryClockData.c * \author Weilun Fong | wlf@zhishan-iot.tk * \date * \brief example for get frequency * \note a example which shows how to get frequency of the factory RC * ...
C
UTF-8
1,729
2.765625
3
[ "BSL-1.0" ]
permissive
#include "all.h" int toupper(int c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; } unsigned strlen(const char *p) { unsigned len = 0; while (*p++) { len++; } return len; } void *memset(void *p, int value, unsigned n) { while (n--) { ((unsigned char*)p)[n] = value; } } ...
Java
UTF-8
1,057
2.0625
2
[ "OpenSSL", "Apache-2.0" ]
permissive
/* * Copyright 2021 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
Markdown
UTF-8
1,833
3.296875
3
[ "MIT" ]
permissive
# Paginate (Deprecated) **This feature of Keystone is now deprecated and you are encouraged to roll your own pagination** This is a keystone-specific way of retrieving items from `mongo`. It returns a query object, just as `List.model.find()` would. It supports the options - `page` - page to start at - `perPage` - n...
JavaScript
UTF-8
515
4.0625
4
[]
no_license
/* Set */ //set is like an array but it keeps only unique keys const set = new Set(); set.add(1); set.add(1); set.add(1); set.add(1); set.add(1); console.log('size' , set.size) //showing only 1 let values = ["Hare", "Krishna", "Hare", "Krishna", "Krishna", "Krishna", "Hare", "Hare", ":-O" ]; function unique(...
C#
UTF-8
2,599
2.515625
3
[]
no_license
using UnityEngine; using System.Collections; public class LevelImporter : MonoBehaviour { public Tile Ground = new Tile (Tile.TileType.Ground); public Tile Wall = new Tile (Tile.TileType.Wall); public Tile Water = new Tile (Tile.TileType.Water); public Tile Door = new Tile (Tile.TileType.Door); public GameObj...
Python
UTF-8
854
3.375
3
[]
no_license
#!/usr/bin/env python import math def print_result(case_no, msg): print "Case #%d: %s" % (case_no, msg) def run_case(case_no): x, y = raw_input().split(' ') xn, yn = int(x), int(y) x, y = 0, 0 dx = True result = [] if xn > x: for i in range(xn - x): result.append('W')...
Java
GB18030
1,961
2.921875
3
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.util.StringTokenizer; /** * * @author Administrator */ public class Testing { CreateCard cr; public String user1=""; public String user2=""; public String user3=""; public String dipai="...
C
GB18030
1,165
3.640625
4
[]
no_license
#include"Stack.h" #include<stdio.h> //ʼջ Status initLStack(LinkStack* s) { if (!s) return ERROR; s->top = NULL; s->count = 0; return SUCCESS; } //жջǷΪ Status isEmptyLStack(LinkStack* s) { return(s->top == NULL); } //õջԪ Status getTopLStack(LinkStack* s, ElemType* e) { if (!s->top) retur...
C++
UTF-8
11,877
2.8125
3
[]
no_license
#include <Player.h> #include <fstream> #include <Position.h> #include <Display.h> #include <sstream> namespace game { extern Display game; extern UserInterface SlideUI; extern System system; } Player::Player() : UI(0, 0, 50, 30) { goldAmount_ = 100; maxGoldAmount_ = 10000; manaAmount_ = 500; maxManaAm...
Shell
UTF-8
474
2.828125
3
[]
no_license
#!/bin/sh echo "--------------------- Start: deploy.sh ---------------------" DOCKER_COMPOSE=/usr/local/bin/docker-compose # Stop and Remove containers $DOCKER_COMPOSE down # Pull new image $DOCKER_COMPOSE pull # Create and Start containers $DOCKER_COMPOSE up -d # Execute database migration $DOCKER_COMPOSE exec -T a...
Markdown
UTF-8
4,592
3
3
[]
no_license
--- title: "knitr, rmarkdown, HTML and Bootstrap" categories: ["coding"] tags: ["R", "knitr", "rmarkdown"] date: "2018-02-28" draft: true --- ## Introduction For those of you who are not familiar with R, R Markdown is a framework to write dynamical documents using R. The markup language is a flavor of Markdown, whic...
Java
UTF-8
6,891
2.59375
3
[]
no_license
package com.zonsim.annotation.butterknife1; import android.app.Activity; import android.view.View; import java.lang.reflect.Field; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * desc * <p> * Cre...
Shell
UTF-8
194
2.71875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash source /home/ubuntu/keystonerc NOVA_COUNT=$(nova service-list | awk '{if (NR > 3) {print $2 " " $10 }}' | grep -c "nova-compute up") if [ "$NOVA_COUNT" != 1 ] then exit 1 fi
C++
UTF-8
317
3.265625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; long long sum(vector<int> &a) { long long sum = 0; for (int i = 0; i < a.size(); i++) { sum += a[i]; } return sum; } int main() { vector<int> a; a.push_back(1); a.push_back(2); a.push_back(3); a.push_back(4); a.push_back(5); cout << sum(a); }
Java
UTF-8
2,662
2.8125
3
[]
no_license
package com.andrapp.spaceshutter.util; import java.util.Iterator; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; import android.util.Log; import com.andrapp.spaceshutter.model.Monster; import com.andra...
C
UTF-8
885
3.671875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } void quickSort(int v[], int start, int end, int shouldSortIncreasing) { if(start >= end) return; int left = start; int right = end; int pivot = v[(left + right) / 2]; while(left <= right) { if(shouldSortInc...
Python
UTF-8
170
3.640625
4
[]
no_license
# Use words.txt as the file name fname = input("Enter file name: ") fh = open(fname) for read in fh: read=read.upper() read=read.strip() print(read)
C#
UTF-8
3,033
3.21875
3
[]
no_license
/// <summary> /// Copies the SecurityPermissions object specified by the securityPermissions input parameter into the computer clipboard in the SecurityPermissions format. /// </summary> /// <param name="securityPermissions">The SecurityPermissions object to copy into the computer clipboard.</param> ...
Java
UTF-8
1,070
2.546875
3
[]
no_license
package com.sino.bridge.ncrecycleview; import android.graphics.Rect; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by eve on 2016/7/6 0006. */ public class SpaceItemDecoration extends RecyclerView.ItemDecoration { public static final int NONE = 0; public static final...
JavaScript
UTF-8
2,693
3.09375
3
[]
no_license
const config = require('../config.js') //file with login and password const mongoose = require('mongoose'); let dbname = 'test'; // change me const uri = "mongodb+srv://"+config.mongo_user+":"+config.mongo_pass+"@cluster0.q2ea2.gcp.mongodb.net/"+dbname+"?retryWrites=true&w=majority"; // connect to db mongoose.connect...
SQL
UTF-8
3,329
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 27, 2020 at 10:46 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
Java
UTF-8
23,800
2.3125
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright 2011 See AUTHORS file. * * 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.apa...
Markdown
UTF-8
1,712
3.078125
3
[]
no_license
# DWA-15 P3: Laravel Basics / Developer's Best Friend ## Live URL <http://p3.hriggs.me> ## Description The Project 3 Developer's Best Friend site is for the class CSCI E-15: Dynamic Web Applications. This site includes 3 tools. First, a tool to generate a random number of paragraphs of lorem ipsum text (with option...
Swift
UTF-8
725
2.671875
3
[]
no_license
// // CustomPin.swift // Zuhlke // // Created by #HellRaiser on 21/08/20. // Copyright © 2020 asharpvan. All rights reserved. // import UIKit import MapKit class CustomPin: NSObject, MKAnnotation { //MARK: - Variables var title: String? var coordinate: CLLocationCoordinate2D var cameraInfo: C...
Python
UTF-8
345
3.59375
4
[]
no_license
# open a file // w for write op = open("python/IO/file.txt","w") print("file name : ",op.name) print("file mode : ",op.mode) print("file closed : ",op.closed) op.write("this is test") op.close() # appen a text // a for append op = open("python/IO/file.txt","a") op.write(" this is another text") op.close() print("f...
Python
UTF-8
1,631
2.578125
3
[]
no_license
import matplotlib matplotlib.use('Agg') import sys import scipy.stats import matplotlib.pyplot as plt automatic_metric_scores_file = open(sys.argv[1], 'r') human_judgment_scores_file = open(sys.argv[2], 'r') if 'terp' in sys.argv[1]: automatic_metric_scores = [score.split()[2] for score in automatic_metric_scores_fi...
C#
UTF-8
528
3.15625
3
[]
no_license
using System; namespace game { class GameProgram { static public void play() { for (int x = 1; x <= 100; x++) { if (x % 3 == 0) { Console.WriteLine("Bling"); } else if (x % 5 == 0) ...
Swift
UTF-8
1,785
2.890625
3
[]
no_license
// // ClassDetail.swift // DnDApp // // Created by C4Q on 12/8/17. // Copyright © 2017 C4Q. All rights reserved. // import Foundation struct ClassDetail: Codable { let name: String let hitDie: Int let profSkills: [Proficiency] let profEquip: [Equipment] let savingThrows: [SavingThrow] enum...
Java
UTF-8
6,899
2.640625
3
[]
no_license
package com.uiuc.cs498; import com.amazonaws.services.dynamodbv2.document.Item; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.RequestStreamHandler; import org.apache.http.HttpStatus; import org.json.JSONObje...
C#
UTF-8
3,274
2.796875
3
[]
no_license
using Engine.ComponentSystem.Entities; using Engine.Serialization; using Engine.Util; namespace Engine.ComponentSystem.Systems { /// <summary> /// Interface for classes managing a list of entities. /// </summary> public interface IEntityManager : IPacketizable, IHashable, ICopyable<IEntityManager> ...
Python
UTF-8
764
3.140625
3
[]
no_license
import time from threading import Thread class Rhythm(Thread): def __init__(self, beat, bpm): Thread.__init__(self) self.beat = beat self.bpm = bpm self.sec_per_beat = 60.0/self.bpm self.beat_count = 1 self.bar_count = 0 self.running = False def run(sel...
Python
UTF-8
661
2.828125
3
[]
no_license
#!/bin/python3 import math import os import random import re import sys if __name__ == '__main__': N = int(input()) rows = [] reFirstName = re.compile("^[a-z]{1,20}$") reEmail = re.compile("^[a-z\\.]{1,40}@gmail.com$") for N_itr in range(N): firstNameEmailID = input().split() ...
C
UTF-8
677
3.9375
4
[]
no_license
#include<stdio.h> struct dob { int day; int month; int year; }; struct student { int roll_no; char name[100]; float fees; struct dob date; }; int main() { struct student std; printf("Enter roll no: "); scanf("%d",&std.roll_no); printf("Enter name: "); scanf("%s",std.name); printf("Enter fees: "); sca...
Markdown
UTF-8
1,585
3.703125
4
[]
no_license
## Lab 3: Fardingworth Falls Let's generate some random town names for a Tycoon-style videogame. We can do this by combining the following generic name fragments: * **Starts:** Bed, Brunn, Dun, Far, Glen, Tarn * **Middles:** ding, fing, ly, ston * **Ends:** borough, burg, ditch, hall, pool, ville, way, worth After c...
Java
UTF-8
356
2.359375
2
[]
no_license
package edu.usal.negocio.dao.factory; import java.util.stream.Stream; import edu.usal.negocio.dao.implementacion.VentasDAOImpStream; import edu.usal.negocio.dao.interfaces.VentaDAO; public class VentasDAOFactory { public static VentaDAO obtenerVentaDAO(Stream tipo) { if("Stream".equals(tipo)) return new Venta...
PHP
UTF-8
1,724
2.703125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; use yii\base\Model; /** * ContactForm is the model behind the contact form. */ class Notificar extends Model { /** * Variable para el nombre del usuario. * @var [type] */ public $name; /** * Variable para el email. * @var [type] */ ...
Shell
UTF-8
1,879
4.25
4
[ "MIT" ]
permissive
#!/usr/bin/env bash set -o pipefail # trace ERR through pipes set -o errtrace # trace ERR through 'time command' and other functions set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errexit ## set -e : exit the script if any statement returns a non-true return value ...
C++
UTF-8
1,498
3.5625
4
[]
no_license
#include <iostream> #define BAD_MAGICIAN 0 #define CHEATER 1 #define SOLVED 2 int checkCondition(int row1, int row2, int cards1[4][4], int cards2[4][4], int &card) { int candidateCount = 0; card = -1; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if...
Python
UTF-8
287
3.0625
3
[]
no_license
import datetime import calendar from datetime import timedelta dayte = datetime.date (1901,1,1) finish = datetime.date (2000,12,31) count=0 while dayte < finish: if (dayte.weekday()==6) and (dayte.day==1): count = count+1 dayte = dayte + timedelta(days=1) print(count)
JavaScript
UTF-8
1,134
2.515625
3
[]
no_license
import React, { useState, useEffect } from 'react'; import loader from '../../loader.gif'; import './UsersList.css'; import User from "../User/User"; import PropTypes from 'prop-types'; function UsersList() { UsersList.propTypes = { match: PropTypes.object }; const [ users, setUsers ] = useState([]); const [ lo...
C#
UTF-8
1,128
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Web; using System.Text; using System.Web.Mvc; using Benzmann.Definitions; public static class LadyExtension { public static string LadyCreateTumbnail(this HtmlHelper helper, Benzmann.Definitions.Image image, string title, bool filled, string red, string...
Markdown
UTF-8
866
3.34375
3
[]
no_license
## Objects (#3) Starting with: ```kotlin interface AdventureGame { interface Environment interface Character val environment: Environment val characters: MutableList<Character> fun populate() } ``` Define a class `Jungle` which is an `Environment`, and classes `Monkey` and `Snake` that are each `Character`...
Python
UTF-8
703
2.71875
3
[]
no_license
import tweepy from time import sleep from config import * # load api stuff from config auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET) api = tweepy.API(auth) # ask the user what they want to do then runs the function accordingly def mainlloop(): while ...
Markdown
UTF-8
27,680
2.609375
3
[]
no_license
# M300-Services ## Dokumentation Einleitung Hier handelt es sich um eine Dokumentation für die LB02 im Modul 300. Da werde ich meine Arbeitsschritte festhalten und einige Sachen, die ich gelernt habe. # LB01 ## Einrichtung Inhaltsverzeichnis * 01 - GitHub Account * 02 - Git Client * 03 - VirtualBox * 04 - Vagra...
C++
UTF-8
1,045
2.859375
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; int main() { //freopen("2028.in", "r", stdin); int n, caso = 1; while(scanf("%d", &n) != EOF) { int total = 0; int aux = n; while(aux != 0) { total += aux; aux--; } if(total + 1 ...
Swift
UTF-8
541
2.796875
3
[ "MIT" ]
permissive
import Foundation import PathLib public struct DeployableFile: CustomStringConvertible, Hashable { /** Local location of the file */ public let source: AbsolutePath /** Target location of the file inside Deployable's container */ public let destination: RelativePath public init(source: AbsolutePat...
JavaScript
UTF-8
959
2.578125
3
[]
no_license
(function () { 'use strict'; angular.module('lunchApp', []) .controller('LunchCheckController', LunchCheckController); LunchCheckController.inject = ['$scope']; function LunchCheckController($scope) { $scope.lunchItems; $scope.message; $scope.color; $scope.g...
Java
UTF-8
1,017
1.773438
2
[]
no_license
package com.atqidi.elcar.service.impl; import cn.hutool.crypto.digest.BCrypt; import cn.hutool.crypto.digest.DigestUtil; import cn.hutool.crypto.digest.MD5; import com.atqidi.elcar.entity.User; import com.atqidi.elcar.mapper.UserMapper; import com.atqidi.elcar.service.UserService; import com.atqidi.elcar.utils.result....
Python
UTF-8
138
3.0625
3
[]
no_license
list=["Alice","in","a","wonderful","is","a","complicated","writing","masterpiece"] str="emp" newlist=[str+x for x in list] print(newlist)
Markdown
UTF-8
1,004
2.9375
3
[]
no_license
| Type | Target | Examples | |:---------:|:-------------------------------------------------------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Property | Element property Component property...
Python
UTF-8
2,320
2.78125
3
[]
no_license
"""Flask app for adopt app.""" from flask import Flask, render_template,redirect from flask_debugtoolbar import DebugToolbarExtension from models import db, connect_db, Pet from forms import AddPetForm, EditPetForm app = Flask(__name__) app.config['SECRET_KEY'] = "secret" app.config['SQLALCHEMY_DATABASE_URI'] = ...
JavaScript
UTF-8
516
2.65625
3
[]
no_license
const fs = require('fs'); function getEntryId(row) { return getRowArr(row)[1]; } function getRowArr(rowString) { return rowString.split(','); } function dataFormatter(data) { return data.split(/\r?\n/); } function appendFile(fileName, row) { fs.appendFile(fileName, row, err => { if (err) throw err; ...
PHP
UTF-8
3,086
3.453125
3
[]
no_license
<?php /** * Utsubot - PokemonObjectResult.php * Date: 14/04/2016 */ declare(strict_types = 1); namespace Utsubot\Pokemon; use Iterator; /** * Class GetObjectResult * * @package Utsubot\Pokemon */ class PokemonObjectResult implements Iterator { private $items = [ ]; private $index = 0; /** *...
C++
UTF-8
1,432
2.96875
3
[]
no_license
/* Copyright 2017 Antonia Reiter */ /* no obligations - feel free to copy/reuse/modify as you like*/ #ifndef SRC_TOOLS_H_ #define SRC_TOOLS_H_ #include <string> #include <vector> #include "Eigen/Dense" using Eigen::MatrixXd; using Eigen::VectorXd; using namespace std; class Tools { public: /** * Constructor. ...
JavaScript
UTF-8
1,336
2.5625
3
[]
no_license
var char_exploit; var dr_device; function exploit_on(){ var buffer1 =[0x0F,0x06,0x03,0x00,0x01,0x00,0x00,0x05,0xFF,0xFF] ; writedata=Uint8Array.from(buffer1); char_exploit.writeValue(writedata); } function exploit_off(){ var buffer1 =[0x0F,0x06,0x03,0x00,0x00,0x00,0x00,0x04,0xFF,0xFF] ; writedata=Uint8Arra...
C++
UTF-8
18,076
2.890625
3
[]
no_license
/* * Copyright 2016 DRS. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This software is distributed in the hope that it will be...
Java
UTF-8
1,366
2.34375
2
[]
no_license
package com.varun.budgetapp.expensemanager.domain; import java.math.BigDecimal; import java.time.LocalDateTime; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.validation.const...
Python
UTF-8
5,242
3.03125
3
[]
no_license
#~~~~~ test to see if the program can take an image of a sudoku grid ~~~~~# import cv2 #import pytesseract from Sudoku_Generator_v2 import print2DSudokuGrid #pytesseract.pytesseract.tesseract_cmd = r"C:\Users\Matthew's Desktop\AppData\Local\Programs\Tesseract-OCR\tesseract.exe" sudokuGridImage = cv2.imread("Su...
PHP
UTF-8
2,223
2.796875
3
[]
no_license
<?php /** * Class file for AmazonFPSTypeSettle * @date 10/07/2012 */ /** * Class AmazonFPSTypeSettle * @date 10/07/2012 */ class AmazonFPSTypeSettle extends AmazonFPSWsdlClass { /** * The ReserveTransactionId * Meta informations : * - minOccurs : 0 * @var string */ public $ReserveTransactionId; /** ...
SQL
UTF-8
1,891
3.046875
3
[ "Apache-2.0" ]
permissive
CREATE SCHEMA campaigns; CREATE TABLE campaigns.campaigns ( id bigserial primary key, date timestamp, datasource character varying(256), campaign character varying(256), clicks numeric, impressions numeric ); insert into campaigns.campaigns VALUES (0, current_timestamp - INTERVAL '0 DAY', 'test1', 'a', 10, 53); insert...
C
ISO-8859-2
1,262
3.484375
3
[]
no_license
#include <stdio.h> #include "Chaine.h" /*Nom_etudiant: TATI Prnom_tudiant: L. Paul-Marie */ void empiler(char *tab,char *car) { int i,j,longueur_tab; char pile[100]; car[strlength(car)]='\0'; longueur_tab=strlength(tab); for(i=0,j=longueur_tab+1;i<=longueur_tab,j<strlength(car);i++) pile[j]=car[...
Python
UTF-8
2,680
3.46875
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- #author:zhl ##没有装饰器时的实现方式: # LOGIN_USER={'is_login':False} # # def changepwd(): # #pass #同样对于这个函数也要进行登录验证,如果有无数多个其它的函数,都要进行相同的操作,即登录验证; # if LOGIN_USER['is_login']: ##这是登录验证的代码, # pass # else: # print("请登录!!") # # def manager(): # if LOGIN_...
Shell
UTF-8
1,775
3.828125
4
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/bin/bash ################################################### # Author: Peter Billen # # Objective: create assemly of gcp terraform config # # ################################################### echo "***** Initializing script *****" current_dir=$(pwd) script_name=`basename "$0"` script_dir=`dirname $0...
Markdown
UTF-8
2,881
2.640625
3
[]
no_license
# scoubidou project diagram A program for creating 2D diagrams that shows how to weave any rectangular stitch. Current file to be use is scoubidou4. By running StitchWeavingForTutorial with a given input a,b, firstLineEndPoint, crissNumberOfLines the output images will be something like: <p align="center"> <img s...
Python
UTF-8
3,749
2.921875
3
[]
no_license
from tkinter import * import csv import random BACKGROUND_COLOR = "#B1DDC6" LANGUAGE_FONT = ("Arial", 20, "italic") WORD_FONT = ("Arial", 24, "bold") STATUS_TEXT = ("Arial", 18) word_pairs_learning_indexes = [] translated_words = [] current_pair_index = 0 learned_words = 0 missed_words = 0 change_counts_allowed = F...
Markdown
UTF-8
1,751
3.109375
3
[]
no_license
# FritzCalls FritzCalls is an iOS app that I made to pull phone call data from a FritzBox router and display it neatly in an app. This was created so that my family and I could see who has recently rung our home phone without needing to login to our router’s admin page everytime to check. I created the app using ‘reac...
Python
UTF-8
137
3.0625
3
[]
no_license
def wish(): print("Good Morning") print("Good Afternoon") print("Good Night") a = 10 b =20 c =100 wish() wish() wish()
Python
UTF-8
5,651
2.921875
3
[]
no_license
import pickle import os import cv2 import numpy as np from Logistic_Regression.Data import Data from PIL import Image class Conjunto: def __init__(self, usac, marroquin, mariano, landivar): self.usac = usac self.marroquin = marroquin self.mariano = mariano self.landivar = landivar ...
Ruby
UTF-8
329
3.5625
4
[]
no_license
# p 42.to_s # p :foo.to_s # p [1,2,3].to_s # # p (1..3).to_a # p "42".to_i p("---------------------------------------------------") values = [!!true, !false, !nil, !0, !1, !!"false", "", 3.14159] print values.each do |value| if value puts "#{value.inspect} is truthy" else puts "#{value.inspect} is falsy" ...
Java
UTF-8
949
2.421875
2
[]
no_license
package com.sda.shop.service; import com.sda.shop.model.Product; import com.sda.shop.repository.ProductRepository; import java.util.List; import java.util.Optional; public class ProductService { private static ProductService productService; public static ProductService getInstance(){ if (productServ...
Markdown
UTF-8
37,394
2.59375
3
[ "MIT" ]
permissive
--- title: mxnet:结合R与GPU加速深度学习 date: '2016-04-07T10:13:38+00:00' author: 严酷的魔王 categories: - 统计之都 tags: - boosting - dmlc - R语言 - xgboost - 深度学习 slug: mxnet-r --- 近年来,深度学习可谓是机器学习方向的明星概念,不同的模型分别在图像处理与自然语言处理等任务中取得了前所未有的好成绩。在实际的应用中,大家除了关心模型的准确度,还常常希望能比较快速地完成模型的训练。一个常用的加速手段便是将模型放在GPU上进行训练。然而由于种种原因,R语言似乎缺少一个能够在...
Java
UTF-8
978
2.890625
3
[]
no_license
package com.heima.utils; import org.junit.Test; import java.sql.*; /* JDBC 入门案例 1,不关注实现,必须要有实现 2,导入驱动 */ public class Demo01_statement { @Test public void test1() { ResultSet resultSet = null; Statement statement = null; Connection connection = null; try { connec...
Java
UTF-8
2,710
2.328125
2
[]
no_license
package com.sarthak.icop.icop.adapters; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.sarthak.icop.icop.utils.CircleTransform; import com.s...
PHP
UTF-8
1,974
2.75
3
[]
no_license
<?php namespace Dev\ApiDocBundle\Parser; use Dev\ApiDocBundle\Model\Component; use Dev\ApiDocBundle\Model\Model; use Dev\ApiDocBundle\Model\Property; use Dev\ViewBundle\View\ViewInterface; use ReflectionClass; use Symfony\Component\Form\FormTypeInterface; use function in_array; class ObjectParser implements Componen...
PHP
UTF-8
673
2.828125
3
[]
no_license
<?php Class Controller { public $dataModel; public $data; public function __construct() { $this -> dataModel = array(); $this -> data = array(); } // Chamada por "todos" os Controllers; irá projetar o redirecionamento das pages public function loadTemplate($nameView, $dataModel...
Python
UTF-8
536
3.609375
4
[]
no_license
def get_largest_perimeter(L): L_sorted = sorted(L, reverse = True) a = L_sorted[0] b = L_sorted[1] c = L_sorted[2] if b+c > a: perimeter = a + b + c return(a, b, c, "perimeter=", perimeter) else: for i in range(3, len(L_sorted)): a = b b...
Markdown
UTF-8
739
2.78125
3
[]
no_license
# Getting Started with Create React App In this project, that was created with React JS, using HTML, CSS and Javascript, you will see my personal portfolio. There's still work to do, it is a demo version, not completed yet. When all the work has been completed, i will uptade the final version. This project was boot...
Ruby
UTF-8
635
2.984375
3
[]
no_license
require 'date' class Package attr_reader :id, :carrier_code, :shipping_date def initialize(id, carrier, shipping_date) @id = id @carrier = carrier @shipping_date = Date.strptime(shipping_date, '%Y-%m-%d') end def get_delivery_date carrier_days = @carrier.delivery_promise + 1 day = 0 ...
Python
UTF-8
3,329
2.609375
3
[ "MIT" ]
permissive
#!/usr/bin/env python # # This font is designed for pixels which are each a tall rectangle with # an aspect ratio x:y of roughly 0.84 (approx 6/7 or 5/6 or 4/5). from __future__ import print_function import argparse import bdflib import bdflib.model import bdflib.writer import sys from struct import calcsize, unpack ...
C#
UTF-8
867
2.875
3
[]
no_license
public static class ObservableCollectionEx { public static void SetOnCollectionItemPropertyChanged<T>(this T _this, PropertyChangedEventHandler handler) where T : INotifyCollectionChanged, ICollection<INotifyPropertyChanged> { _this.CollectionChanged += (sender,e)=> { ...
C++
UTF-8
1,397
2.734375
3
[]
no_license
#ifndef VALUE_HEADER_INCLUDED #define VALUE_HEADER_INCLUDED class Pair; class Value; class String; class Number; class Bool; class Null; class JsonObject; class JsonArray; class JsonText; class JsonPath; class Value { public: virtual ~Value() {}; virtual Value* clone() const = 0; virtual void print(std::ostream& ...
Python
UTF-8
1,590
3.359375
3
[]
no_license
"""requires python3.8. for f-strings and walrus operator""" import re from itertools import chain with open("day14.txt") as f_in: ins = [_.strip() for _ in f_in] class Docking: MEM_RE = re.compile(r"mem\[(\d+)\] = (\d+)") def __init__(self, lines): self.lines, self.bitmask = lines, "" se...
C#
UTF-8
9,021
2.53125
3
[]
no_license
#region Using directives using System; using System.Data; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using ePrescription.Entities; using ePrescription.Data; #endregion namespace ePrescription.Data.Bases { ///<summary> /// This class is the base class for any <see cref="...
Java
UTF-8
1,210
1.960938
2
[]
no_license
package com.loginext.ms.driver.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import com.loginext.commons.e...
Java
UTF-8
110
2.1875
2
[]
no_license
package aopsample; public interface Student { void sayHello();//这个就是我们平常所执行的方法 }
JavaScript
UTF-8
834
2.71875
3
[ "MIT" ]
permissive
'use strict'; // private static field let staticField = 42; // private static method function staticMethod() { console.log(staticField++); } /** * @class * @type {ContextController} * @this {ContextController} */ function ComponentTest() { // private fields const DELIMITER = '---'; let privateField = 0; ...
Java
UTF-8
453
1.828125
2
[]
no_license
package org.csrdu.apex.helpers; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserFactory; public class Xml { public static XmlPullParser newPullParser() throws XmlPullParserException { XmlPullParserFactory factory = XmlPullParserFactory.ne...
Java
UTF-8
2,248
2.453125
2
[]
no_license
package com.uniovi.entities; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Transient; /** * Entidad que r...
C++
UTF-8
650
3.34375
3
[]
no_license
#include <iostream> template <typename T> void myswap(T p1, T p2) { std::cout << "myswap(T,T)\n"; } template <typename T> void myswap(T *p1, T *p2) { std::cout << "myswap(T*,T*)\n"; } template <> void myswap<char>(char *p1, char *p2) { std::cout << "myswap(char*,char*)\n"; } template <typename T> class Sample { p...
Python
UTF-8
836
3.34375
3
[]
no_license
class Conta: """ Classe do tipo conta, seus atributos e métodos foram elaborados para simular umaconta bancária qualquer """ def __init__(self, ID, saldo): """ Metodo Construtor da classe Conta """ self.ID = ID self.saldo = saldo def __str__(self): ...
Java
UTF-8
11,950
1.546875
2
[]
no_license
package net; public enum RecvPacketOpcode implements WritableIntValueHolder { LOGIN_REDIRECTOR((short) 0x01), CRASH_INFO((short) 0x95), PONG((short) 0x93), AUTH_REQUEST((short) 0x86), CLIENT_ERROR((short) 0x85), MIGRATE_IN((short) 0x01), UNK_IN((short) 0x06), PONG_TALK((short) 0x0E), TALK_GUILD_INFO((short) ...
JavaScript
UTF-8
1,297
2.671875
3
[]
no_license
/** * Created by root on 01.03.2017. */ function message(text, type){ var icon = ''; var message_text = $(".message_text"); switch(type){ case 'info': var message_div = $('#message_info').removeClass("none");; break; case 'error': var message_div = $('#...
C++
UTF-8
6,704
3.8125
4
[]
no_license
#include "graph.h" Graph::Graph() { vertices = nullptr; } // Graph() // Constructor initializes vertices linked list to empty Graph::~Graph() { VertexNode *temp = vertices; VertexNode *tempDel = temp; EdgeNode *temp2 = vertices->edgePtr; EdgeNode *temp2Del = temp->edgePtr; while(temp != nullptr) { if(temp->e...
Java
UTF-8
1,009
2.1875
2
[]
no_license
package com.lti.daos; import java.util.List; import com.lti.models.BidList; import com.lti.models.User; public interface BidDao { public abstract int addItemBid(int buyer_id, int shoe_id, double bid_price, String item_status);//return item id public abstract int removeItemBid(int shoe_id,int cust_id); public abst...
TypeScript
UTF-8
1,603
2.671875
3
[]
no_license
import { Repository, getRepository } from 'typeorm'; // repository import IResponsibleRepository from '@modules/responsible/repositories/IResponsibleRepository'; // dtos import ICreateResponsibleDTO from '@modules/responsible/dtos/ICreateResponsibleDTO'; // entities import Responsible from '@modules/responsible/infr...
JavaScript
UTF-8
4,969
2.640625
3
[]
no_license
import React, { Component } from "react"; import "./style.css"; export default class App extends Component { state = { sourceStation: "jp", destinationStation: "kota", date: "11-06-2018", trainData: [], trainAvailabilty: {}, selectedTrain: { classes: [] } }; onSourceStationChan...
Java
UTF-8
773
3.15625
3
[]
no_license
package BOJ.PS_0331; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* 알파벳 위치 .. */ public class boj10809_Alphabet2 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ...
C
UTF-8
1,043
2.78125
3
[]
no_license
Tab tabChar0(Tab *t, unsigned int i){ return tab(t,i,sizeof(char)); } tabChar_setEl(Tab *t, unsigned int i, char c){ char *c1=tab_getEl(t,i); *c1=c; } Tab tabChar1(Tab *t, char c[]){ unsigned int i=0; while(c[i]!=0){ i++; }; tabChar0(t,i); int i1; for(i1=0;i1<(*t).nbEl;i1++){ tabChar_set...
JavaScript
UTF-8
15,504
2.734375
3
[]
no_license
/** * @file libDkargoToken.js * @notice DkargoToken 컨트랙트 API 정의 * @dev 선행조건: truffle compile * @author jhhong */ //// WEB3 const web3 = require('./Web3.js').prov1; // web3 provider (token은 mainnet(chain1)에 deploy됨) const sendTx = require('./Web3.js').prov1SendTx; // 트랜젝션을 생성하여 블록체인에 전송하는 함수 //// GLOBALs const a...