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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 2,025 | 2.296875 | 2 | [] | no_license | package ec.edu.ups.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServlet... |
Shell | UTF-8 | 854 | 3.28125 | 3 | [] | no_license | #!/bin/bash
# CENTOS 서버 세팅 정보 down 후 작업 디렉토리에 복사 / 작업 디렉토리로 이동
curl ${GIT_REPO_PATH}/${SETTING_INFO_DIRECTORY_PATH}/${SETTING_INFO_NAME}.sh \
> ./${SETTING_INFO_NAME}.sh
cp ./${SETTING_INFO_NAME}.sh ${WORK_DIR}/${SETTING_INFO_NAME}.sh
source ${WORK_DIR}/${SETTING_INFO_NAME}.sh
cd ${WORK_DIR}
#################... |
C# | UTF-8 | 583 | 2.703125 | 3 | [] | no_license | private void UpdateDatabase()
{
//Create an adapter to get the schema and point to the correct table
//Can do something like SELECT * from table_name where 0 = 1
SqlDataAdapter adapt = new SqlDataAdapter(yourSelectString, yourConnectionString);
SqlCommandB... |
Java | UTF-8 | 2,027 | 2.09375 | 2 | [] | no_license | package com.devilpanda.task.fw;
import com.devilpanda.task.domain.TaskList;
import org.apache.commons.math3.random.RandomDataGenerator;
import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.ResultActions;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.springfra... |
Java | UTF-8 | 239 | 1.554688 | 2 | [] | no_license | package com.codegen.relaxng.edit;
public interface NameClassVisitor {
Object visitChoice(ChoiceNameClass nc);
Object visitAnyName(AnyNameNameClass nc);
Object visitNsName(NsNameNameClass nc);
Object visitName(NameNameClass nc);
}
|
Markdown | UTF-8 | 933 | 3.078125 | 3 | [] | no_license | # Laboratory Work No.1
### Goal: Familiarization with Bootstrap
#### Website theme:
The chosen theme for this website is an online *battle* or *war* between artists.
Basically, it's (going to be) a canvas, where 2 users can compete against each other using their art skills.
Details like who wins/loses will be base... |
JavaScript | UTF-8 | 452 | 2.5625 | 3 | [] | no_license | const Reference = require('../model/Reference');
exports.getReferences = (req, res) => {
Reference.find()
.then(references => res.json(references))
.catch(err => res.status(400).json("Error: " + err));
}
exports.addReference = (req, res) => {
const newReference = new Reference(req.body);
n... |
TypeScript | UTF-8 | 222 | 2.53125 | 3 | [] | no_license | import { ICommonObject } from 'types/common.type';
export interface IUserStore {
email?: string;
id?: number;
paticipatedParty?: ICommonObject;
}
export type TUserStore = IUserStore | Record<string, never> | null;
|
SQL | UTF-8 | 20,171 | 2.703125 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL);
INSERT INTO django_migrations VALUES(1,'contenttypes','0001_initial','2019-09-16 09:48:53.... |
Java | UTF-8 | 2,822 | 3.015625 | 3 | [] | no_license | package interfaces;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEve... |
SQL | UTF-8 | 638 | 2.953125 | 3 | [] | no_license | CREATE TABLE [mybuys].[tblBuyAuctionType] (
[BuyAuctionTypeID] TINYINT NOT NULL,
[RowLoadedDateTime] DATETIME2 (7) NOT NULL,
[RowUpdatedDateTime] DATETIME2 (7) NULL,
[LastChangedByEmpID] VARCHAR (128) NULL,
[AuctionTypeKey] VARCHAR (50) NOT NULL,
[AuctionTypeDe... |
Java | UTF-8 | 1,008 | 2.34375 | 2 | [] | no_license | package com.tecweb.spring.jpa.model;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name = "COUNTRIES")
public cl... |
Python | UTF-8 | 832 | 2.546875 | 3 | [] | no_license | from .trainers.sick_trainer import SICKTrainer
class TrainerFactory(object):
"""
Get the corresponding Trainer class for a particular dataset.
"""
trainer_map = {
'sick': SICKTrainer,
'eng_fre':SICKTrainer
}
@staticmethod
def get_trainer(dataset_name, model, embedding, trai... |
Python | UTF-8 | 3,676 | 2.796875 | 3 | [] | no_license | # Utilities
import re
def read_file(filename):
fh = open(filename, mode="r")
contents = fh.read()
fh.close()
return contents
class TAPData:
def __init__(self):
self.flag = 0
self.status = ""
self.offset = ""
self.text = ""
self.comment = ""
self.... |
Shell | UTF-8 | 2,304 | 2.765625 | 3 | [] | no_license | # Shell dili ile kodlanmış basit bir sayı tahmin oyunu. YUInformatics üyeleri için kodlanmıştır.
# Geliştiren: Emrecan ÖKSÜM
# İletişim: ben@emreoksum.com.tr, emreoksum@gmail.com, 05344839345
# Instagram: @eoksum :)
# Giriş, tanıtım vs.
echo Sayı tahmin oyununa hoşgeldiniz. Lütfen alt menuden oyun parametrelerini... |
C++ | UTF-8 | 2,519 | 2.8125 | 3 | [] | no_license | #ifndef ST_H_INCLUDED_
#define ST_H_INCLUDED_
#include <iostream>
#include <string>
#include <list>
#include <utility>
using namespace std;
enum error_types{
ET_WRONG_RETURN,
ET_WRONG_PARAMETER_TYPE,
ET_CANNOT_ASSIGN,
ET_INCORRECT_NUMBER_OF_ARGUMENTS,
ET_VOID_VARIABLE,
ET_ARRAY_ARGUMENT_INTEGER,
ET_ARRAY_DEC... |
Shell | UTF-8 | 531 | 3.109375 | 3 | [] | no_license | #!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
RESULT_DIR=$DIR/result/raw/fio
if [ $# -ne 3 ]
then
echo "Usage:$0 /dev/xvde <DEPTH> xvde"
exit 1
fi
FIO_IOBOW_FILE=$1
DEPTH=$2
DEV=$3
echo "===>Testing model_1024k_100read_0random_${DEV}_$DEPTH"
fio -filename=$FIO_IOBOW_FILE -direct=1 -rw=read -bs=1024... |
Python | UTF-8 | 1,034 | 3.453125 | 3 | [] | no_license | stock = {"tomate": [ 1000, 2.30], #[0] = Cantidad, [1] = Precios
"lechuga": [500, 0.45],
"batata": [2001, 1.20],
"poroto": [100, 1.50]}
venta = input("Ingrese el nombre del producto a comprar: ")
total = 0
if venta in stock:
compra = int(input("Ingrese la cantidad de compras: "))
x = [[venta, compra]]
... |
C | UTF-8 | 312 | 2.875 | 3 | [] | no_license | #include<stdio.h>
#include<conio.h>
void main()
{
int num,c,j,i=1;
clrscr();
scanf("%d",&num);
while(i<=num)
{
c=0;
j=2;
while(j<=i/2)
{
if(i%j==0)
{
c++;
break;
}
j++;
}
if(c==0 && i!=1)
{
printf("%d ",i," ");
}
i++;
}
getch();
}
|
C# | UTF-8 | 2,627 | 2.5625 | 3 | [] | no_license | using GarageManagement.GarageManagement_DTO;
using GarageManagement_DAL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GarageManagement.GarageManagement_DAL
{
class PhieuSuaChuaDAL
{
private static Phieu... |
Java | UTF-8 | 6,140 | 1.882813 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-rsa-md4",
"HPND-sell-variant",
"metamail",
"LicenseRef-scancode-rsa-1990",
"LicenseRef-scancode-zeusbench",
"Beerware",
"Spencer-94",
"MIT",
"LicenseRef-scancode-pcre",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"NTP",
"RSA-MD"
] | permissive | /* Copyright (c) 2012 imacat
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
Java | UTF-8 | 278 | 2.4375 | 2 | [] | no_license | package Controller;
public class AudioException extends Throwable {
private static final long serialVersionUID = 1L;
private String message;
public AudioException(String message) {
this.message = message;
}
public String toString() {
return message;
}
}
|
Java | UTF-8 | 614 | 2.515625 | 3 | [] | no_license | package com.spo.workplace.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
@JsonAutoDetect
public class RoomAssignment {
private int senior;
private int junior;
protected RoomAssignment() {}
public RoomAssignment(int senior, int junior) {
this.senior = senior;
this.jun... |
Python | UTF-8 | 362 | 3.40625 | 3 | [] | no_license | # Переводить з десяткової в двійкову і навпаки
def to_dec(a):
A = list(a)
A.reverse()
b = 0
for i in range(len(A)):
b += 2 ** i * A[i]
return b
def to_bin_arr(a):
A = int(a)
b = []
while A > 0:
b.append(A % 2)
A = A // 2
b.append(0)
b.reverse()
retur... |
JavaScript | UTF-8 | 914 | 2.546875 | 3 | [] | no_license | const {Schema, model} = require('mongoose'); //require para invocar al módulo
//definicion del esquema para la coleccion de usuario
const UsuarioSchema = Schema({
nombre:{
type: String,
required: true //required: sintaxis propia de mongo
},
email:{
type: String,
required: t... |
Swift | UTF-8 | 1,268 | 2.921875 | 3 | [] | no_license | //
// GameScene.swift
// Flappy Bird
//
// Created by Rob Percival on 05/07/2016.
// Copyright © 2016 Appfish. All rights reserved.
//
import SpriteKit
import GameplayKit
class GameScene: SKScene {
var bird = SKSpriteNode()
override func didMove(to view: SKView) {
let birdTextur... |
C# | UTF-8 | 936 | 2.53125 | 3 | [] | no_license | using DPSP_UI_LG.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
namespace DPSP_UI_LG.Services
{
public interface IProjectService
{
/// <summary>
/// GetProject will send username data to API through json and url and de... |
Markdown | UTF-8 | 5,878 | 2.890625 | 3 | [] | no_license | # KSP-Wildfire
Warning: Work in progress!
This mod adds pseudo fire hazards to the game. Originally created for another mod, but turned standalone.
Overheating, bumping into things, crashing and other reckless activities may cause fire to break out in the subjected part. A fire will cause the part to gradually ove... |
C++ | UTF-8 | 622 | 2.71875 | 3 | [] | no_license | #include "n_tuples_of_m_set.h"
namespace
{
void test()
{
constexpr auto binary_7 = n_tuples_of_m_set<4, 2>::create_tuple(7);
static_assert(binary_7[0] == 0, "");
static_assert(binary_7[1] == 1, "");
static_assert(binary_7[2] == 1, "");
static_assert(binary_7[3] == 1, "");
constexpr auto tuple_types_8 = n_tuples... |
Markdown | UTF-8 | 3,779 | 3.734375 | 4 | [] | no_license | # Exercise SMS Reminders
You can use this Python script to send exercise reminders and motivation every day. The script uses the Twilio API to send scheduled SMS reminders and motivational quotes. The script can also be used to send links to predefined YouTube searches to help with finding an exercise video for certain... |
Java | ISO-8859-1 | 5,264 | 3.078125 | 3 | [] | no_license | package br.com.example1.app;
import java.util.ArrayList;
import java.util.Scanner;
import br.com.example1.model.Aluguel;
import br.com.example1.model.Carro;
import br.com.example1.model.Cliente;
import br.com.example1.model.Locadora;
import br.com.example1.model.Marca;
public class App {
public static... |
TypeScript | UTF-8 | 917 | 2.765625 | 3 | [
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | /**
* check to see if we can consolidate cases
*
* @param {object} providers the providers object
* @param {object} providers.applicationContext the application context
* @param {object} providers.path the next object in the path
* @param {object} providers.props the cerebral props object
* @returns {object} the... |
C# | UTF-8 | 6,292 | 3.421875 | 3 | [] | no_license | using System;
namespace Pictor
{
public struct Vector2D
{
public double x, y;
public Vector2D (double newX, double newY)
{
x = newX;
y = newY;
}
public Vector2D (float newX, float newY) : this((double)newX, (double)newY)
{
}
public void Set (double inX, double inY)
{
x = inX;
y = inY;... |
Java | UTF-8 | 426 | 1.921875 | 2 | [
"Apache-2.0"
] | permissive | package com.github.piggyguojy.util.model;
import com.github.piggyguojy.util.Msg;
import java.util.function.Function;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
@AllArgsConstructor
@Getter
@EqualsAndHashCode(exclude = {"processor"})
@ToString(of = {... |
Ruby | UTF-8 | 177 | 2.96875 | 3 | [] | no_license | module Players
class Human < Player
def move(board)
puts "Where would you like to move next? Please use a number 1-9"
input = gets.strip
end
end
end |
C++ | UTF-8 | 622 | 3.15625 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main() {
int window_size, no_of_frames;
cout<<"\n Enter the size of window: ";
cin>>window_size;
cout<<"\n Enter the no. of frames: ";
cin>>no_of_frames;
int frames[no_of_frames];
cout<<"\n Enter the frames: ";
for(int i=1; i<=no_of_frames; i++) {
cin>>frames[... |
Java | UTF-8 | 966 | 2.109375 | 2 | [] | no_license | package com.example.rabbitmq5001.service;
/**
* @author leejalen
* @Description
* Created on 2020/11/11
*/
public interface IRabbitProducerService {
/**
* 发送消息
* @param message 消息
* */
public void sendMessage(String message);
/**
* 直连交换机生产者
* @param message 生产者发送的消息
* */... |
PHP | UTF-8 | 1,252 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\PublicAdmin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Event;
use Spatie\GoogleCalendar\Event as GoogleCalendarObject;
use Carbon\Carbon;
class GoogleCalendarController extends Controller
{
public function create($id)
{
$eventId ... |
Python | UTF-8 | 3,469 | 2.859375 | 3 | [] | no_license | import pickle
import nltk
from nltk import classify, word_tokenize
import re, string
from nltk.tag import pos_tag
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.corpus import stopwords
from nltk.classify import ClassifierI
from statistics import mode
import sys
stop_words = stopwords.words('english')
clas... |
C++ | UTF-8 | 2,393 | 3.140625 | 3 | [
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | //
// Part of Metta OS. Check https://atta-metta.net for latest version.
//
// Copyright 2007 - 2017, Stanislav Karchebnyy <berkus@atta-metta.net>
//
// Distributed under the Boost Software License, Version 1.0.
// (See file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
template<ty... |
C# | ISO-8859-2 | 4,232 | 2.671875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Transactions;
using AutoMapper;
using BLL.ModelManagers;
using CommonModels.Models;
using CommonModels.Models.EntityFramework;
using CommonPortable.Enums;
using CommonPortable.Exceptions;
using DAL.EntityFramework;
using ... |
C | UTF-8 | 4,971 | 2.84375 | 3 | [] | no_license | /*
* fileServer.c
*
* Created on: Jul 25, 2021
* Author: jinkies
*/
#include "esp_http_server.h"
#include "esp_wifi.h"
#include "esp_log.h"
#include "cJSON.h"
#include "server.h"
#include "config.h"
const char *type = "text/html";
static esp_err_t hello_get_handler(httpd_req_t *req)
{
const char* resp... |
Java | UTF-8 | 663 | 1.921875 | 2 | [
"Apache-2.0"
] | permissive | package it.av.es.web.rest;
import it.av.es.model.Order;
import it.av.es.service.OrderService;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springf... |
Python | UTF-8 | 1,780 | 2.875 | 3 | [] | no_license | from collections import defaultdict, deque
from operator import and_, invert, lshift, or_, rshift
from sys import stdin
gates = dict(AND=and_, LSHIFT=lshift, NOT=invert, OR=or_, RSHIFT=rshift)
def parse_part(word):
if word.isdigit():
return int(word)
elif word.islower():
return word
elif... |
C | UTF-8 | 2,704 | 3.15625 | 3 | [] | no_license | #include "Includes.h"
int main(){
//pega a entrada
char entrada[100];
int func;
fgets(entrada,100,stdin);
while(fgets(entrada,100,stdin)!=NULL){
//funcao para gerar uma string da funcionalidade
char *token = strtok(entrada, " ");
if (strcmp(token, "Insert") == 0){
func = 1;
}
if (... |
Python | UTF-8 | 990 | 2.890625 | 3 | [] | no_license | import pygame
class Lightbolt(pygame.sprite.Sprite):
def __init__(self, player):
super().__init__()
self.velocity = 15
self.player = player
self.image = pygame.image.load('assets/skill/lightbolt.png')
self.image = pygame.transform.scale(self.image, (100, 100))
self.rect = self.image.get_rect(... |
Python | UTF-8 | 5,870 | 3.625 | 4 | [] | no_license | '''
数据结构--07--映射Map(基于二分搜索树BST实现)
'''
import time
from Map.map_base import MapBase
__author__ = 'Yan'
__date__ = '2018/3/17 15:48'
class BSTMap(MapBase):
'''
数据结构--07--映射Map(基于二分搜索树BST实现)
'''
class _Node:
def __init__(self, key=None, value=None):
self.key = key
... |
C# | UTF-8 | 5,100 | 2.734375 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using System;
// NOTE ALL REACTIONS THAT FADE IN / OUT NEED TO HAVE NUM OBJECTS >= 1.
// DO NOT ADD A REACTION SCRIPT TO THE SCENE IF YOU HAVE THE NUM OBJECTS = 0
namespace Assets.Scripts{
public static clas... |
Java | UTF-8 | 3,144 | 2.59375 | 3 | [] | no_license | package com.example.weixin;
import android.app.Activity;
import android.os.*;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.Toast;
/**
* Created by fan on 2016/5/5.
*/
public class ProgressBarActivity extends Activity{
ProgressBar pb_load;
B... |
Go | UTF-8 | 1,533 | 3.21875 | 3 | [
"MIT"
] | permissive | package encoding
import (
"encoding/binary"
"io"
"math"
)
type Encoder interface {
Encode(w io.Writer) error
}
func WriteUint64(w io.Writer, val uint64) error {
buf := make([]byte, 8)
binary.LittleEndian.PutUint64(buf, val)
_, err := w.Write(buf)
return err
}
func WriteUint32(w io.Writer, val uint32) error ... |
JavaScript | UTF-8 | 986 | 4.0625 | 4 | [] | no_license | // Construct a square matrix with a size N × N containing integers from 1 to N * N in a spiral order, starting from top-left and in clockwise direction.
// Example
// For n = 3, the output should be
// spiralNumbers(n) = [[1, 2, 3],
// [8, 9, 4],
// [7, 6, 5]]
// Input/Output
/... |
C# | UTF-8 | 3,656 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace Merwer.Chronicle.Dungeoneering.Tracker.Models
{
/*
* Stats to be calculated:
- General
- Total Drafts
- Total Games
- Win Rate
- Going First Win Rate
- Average Dun... |
Python | UTF-8 | 27,950 | 3.25 | 3 | [] | no_license | import log_setup
import regex
log = log_setup.get_log()
def sub(pattern: str, repl: str, string: str, debug: bool = False) -> str:
'''
Wrapper for the regex.sub function which includes an optional debug argument.
Parameters
----------
pattern : str
The regex pattern to match against.
... |
Java | UTF-8 | 5,654 | 3.28125 | 3 | [] | no_license | package org.aschyiel.KnightTour;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
public class KnightsTour
{
protected ChessBoard board;
/**
* Usually, chess-boards are gonna be 8x8 = 64 squares.
*/
public final static int DEFAULT_DIMENSIONS = 8;
/**
* Flag to enable annoy... |
Python | UTF-8 | 13,831 | 2.65625 | 3 | [] | no_license | import os
import csv
import decimal # for putting in right formats.
from flask import Flask, flash, jsonify, redirect, render_template, request, session
from sqlalchemy import distinct, func, and_
from flask_session import Session
from tempfile import mkdtemp
from werkzeug.exceptions import default_exceptions, HTTPExc... |
Markdown | UTF-8 | 2,313 | 3.421875 | 3 | [
"MIT"
] | permissive | ---
content_title: eosio-blocklog
link_text: eosio-blocklog
---
`eosio-blocklog` is a command-line interface (CLI) utility that allows node operators to perform low-level tasks on the block logs created by a `nodeos` instance. `eosio-blocklog` can perform one of the following operations:
* Convert a range of blocks t... |
C++ | UTF-8 | 1,989 | 2.875 | 3 | [] | no_license | #include "Node.h"
SmallTree::SmallTree(){
treeSizeX = 3;
treeSizeY = 4;
tree = new MapTile**[treeSizeX];
for (int i = 0; i < treeSizeX; i++){
tree[i] = new MapTile*[treeSizeY];
for (int j = 0; j < treeSizeY; j++){
if (j < 2){
tree[i][j] = new MapTile(new Symbol('*', 10, 0));
}
else if (i == 1){
... |
Python | UTF-8 | 38 | 3.1875 | 3 | [] | no_license | a = [1, 2, 3]
print(a[0])
print(a[-2]) |
Python | UTF-8 | 1,193 | 3.15625 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
#Dataset upload
data_karolina = pd.read_csv("corona.csv", encoding="utf-8",error_bad_lines=False, names=["count", "Date", "location", "Tweet"])
data_karolina = data_karolina.drop(columns=['count'], axis=1)
data_karolina
#data_karolina.to_csv("final.... |
JavaScript | UTF-8 | 1,565 | 3.234375 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Defining text characters for the empty and full hearts for you to use later.
const EMPTY_HEART = '♡'
const FULL_HEART = '♥'
// Your JavaScript code goes here!
const hearts = document.querySelectorAll("span.like-glyph");
let modal = document.getElementById("modal");
document.addEventListener("DOMContentLoaded", eve... |
Java | UTF-8 | 742 | 2.203125 | 2 | [] | no_license | package bonaguasato.gui;
/**
* Created by kouichisato on 1/30/17.
*/
public class UBAS {
private int id;
private String name;
private String password;
public UBAS(int i, String philip, String aDefault)
{
}
public UBAS()
{
this.id=id;
this.name=name;
this.pass... |
JavaScript | UTF-8 | 5,184 | 2.53125 | 3 | [
"MIT"
] | permissive | //----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING ... |
Markdown | UTF-8 | 1,889 | 3.84375 | 4 | [] | no_license | [toc]
Given the root of a binary **search** tree with distinct values, modify it so that every `node` has a new value equal to the sum of the values of the original tree that are greater than or equal to `node.val`.
As a reminder, a binary search tree is a tree that satisfies these constraints:
* The left subtree of... |
C# | UTF-8 | 2,030 | 3.28125 | 3 | [] | no_license | using System;
using CourierApi.Models;
namespace CourierApi
{
/// <summary>
/// Class used to run pricing calculations.
/// </summary>
public class CourierPricingEngine
{
private TransportResult _transportResult;
public CourierPricingEngine()
{
_transportRe... |
C# | UTF-8 | 1,711 | 2.890625 | 3 | [] | no_license | using System;
using System.Collections;
namespace JezicniProcesor
{
/// <summary>
/// Ova klasa obavlja leksicku analizu
/// </summary>
class LeksickiAnalizator
{
public LeksickiAnalizator()
{
}
/// <summary>
/// Obavlja leksicku analizu
/// </summary>
public void Analiziraj(string sourceProgram)
... |
Go | UTF-8 | 7,142 | 2.828125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | package controllers
import (
"cron-server/server/src/controllers"
"cron-server/server/src/transformers"
"cron-server/server/src/utils"
"cron-server/server/tests"
"cron-server/server/tests/fixtures"
"encoding/json"
"fmt"
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
"io/ioutil"
"log"
"net/ht... |
PHP | UTF-8 | 255 | 3.671875 | 4 | [] | no_license | <?php
$ans = array();
$num = 100;
for ($i = 0; $i < $num; $i++) {
if ($i <= 1) {
$ans[$i] = $i;
} else {
$ans[$i] = $ans[$i - 2] + $ans[$i - 1];
}
}
echo implode(" ", $ans) . PHP_EOL;
|
Java | UTF-8 | 1,318 | 1.882813 | 2 | [
"Apache-2.0"
] | permissive | package bc.juhaohd.com.bean;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;
/**
* Created by bocang on 18-3-20.
*/
@Entity
public class GdAttrBeanList {
@Id
private Long alid;
private String attr_value... |
JavaScript | UTF-8 | 282 | 2.71875 | 3 | [] | no_license | // JavaScript Document
function showMenu()
{
"use strict";
var mainList = document.getElementById('mainList');
var elementToHide = document.getElementById('elementToHide');
mainList.classList.toggle("showListonClick");
elementToHide.classList.toggle("hideElement");
}
|
C++ | UTF-8 | 1,002 | 2.78125 | 3 | [] | no_license | #pragma once
#include "stdafx.h"
#include "Image.h"
#include "lodepng.h"
Image::Image()
{
}
Image::Image(string filename)
{
this->filename = filename;
lodepng_decode32_file(&img, &width, &height, filename.c_str());
selected = false;
}
Image& Image::operator=(const char* name)
{
this->filename = name;
lodepng_... |
C# | UTF-8 | 15,335 | 2.953125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using web_team3_assignment.Models;
using Microsoft.AspNetCore.Mvc.Rendering;
using System.Security.Cryptography;
us... |
Markdown | UTF-8 | 2,718 | 2.671875 | 3 | [] | no_license |
Formats: [HTML](/news/2010/07/23/serbia-states-its-intention-to-never-recognize-kosovo-s-independence-after-international-court-of-justice-s-yesterday-ruling.html) [JSON](/news/2010/07/23/serbia-states-its-intention-to-never-recognize-kosovo-s-independence-after-international-court-of-justice-s-yesterday-ruling.json)... |
Python | UTF-8 | 908 | 3.34375 | 3 | [] | no_license | class Solution:
# O(n + logm) O(1) space where n is the input n and m is n!
def trailingZeroes(self, n: int) -> int:
# Get that actual factorial value
if n == 0 or n == 1 or n == 2:
return 0
index = 3
factorial = 2
while index <= ... |
Java | UTF-8 | 1,166 | 1.8125 | 2 | [] | no_license | package com.c4.intepark.faq.model.service;
import java.util.ArrayList;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.c4.intepark.faq.model.vo.Faq;
import com.c4.intepark.faq.model.service.FaqS... |
Shell | UTF-8 | 1,489 | 3.09375 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-3.0-only",
"FSFAP",
"GPL-3.0-or-later",
"Autoconf-exception-3.0",
"LicenseRef-scancode-other-copyleft",
"MIT",
"BSD-2-Clause"
] | permissive | #! /bin/sh
# Copyright (C) 2013 Free Software Foundation, Inc.
#
# 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 Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is di... |
Markdown | UTF-8 | 2,703 | 2.71875 | 3 | [] | no_license | # Resources for the Heather project.
A master thesis project by Mai Hartmann.
This repository holds the code resources for the project, and a guide of how to setup the Raspberry Pi whish runs the project, together with two Arduino's. It is not a total rundown of the project, and how it was made. :-/
## Parts used in... |
Markdown | UTF-8 | 2,163 | 3.09375 | 3 | [] | no_license | ---
title: 原则已被打破
date: 2019-05-26 20:45:34
tags:
categories: 生而爲人,我很抱歉
---
我平躺着,手腳冰涼,心理極度恐懼,那十來分鐘,思緒陳雜。腦海裏浮現盤香燃燒又復原的畫面,黑與白相互蠶食。城市的燈光開始旋轉,時間一切開始在腦海中畫圈。我知道,我的世界崩塌了。如果你問我當時是什麼感受,我會如實的回答。
以前看過一張圖,應該是周星馳某部電影。

很喜歡的一段話呀,我其實並沒有想做個多特別的人,沒有想過成功、... |
JavaScript | UTF-8 | 709 | 3.640625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | // add solution here
function theBeatlesPlay(musicians,instruments){
var myArray = []
var musiciansPlaysStrings
for( let i = 0 ; i < musicians.length; i++){
musiciansPlaysStrings = musicians[i] + " plays " + instruments[i]
myArray.push(musiciansPlaysStrings)
}return myArray
}
function johnLennonFact... |
C# | UTF-8 | 1,150 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | // <copyright file="RoomOrientationExtension.cs" company="Marcel Just">
// Copyright (c) Marcel Just. FPK NT WS 2020/21, UDE.
// </copyright>
namespace FPKHotelreservierung.RoomUtil
{
/// <summary>
/// Klasse mit Methoden zur Umwandlung in und von das/dem enum RoomOrientation.
/// </summary>
public cl... |
PHP | UTF-8 | 3,550 | 2.75 | 3 | [] | no_license | <?php
/**
* This is the model class for table "cvgen_activerecordlog".
*
* The followings are the available columns in table 'cvgen_activerecordlog':
* @property string $log_id
* @property string $log_description
* @property string $log_action
* @property string $log_model
* @property string $log_idModel
* @p... |
Java | UTF-8 | 1,121 | 2.453125 | 2 | [] | no_license | package model.record;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class DimensionRecord {
@XmlElement
pr... |
Swift | UTF-8 | 1,637 | 3.28125 | 3 | [] | no_license | //
// ColorPalette.swift
// ToDoDiary
//
// Created by Tatsuya Ishii on 2020/12/23.
//
import SwiftUI
fileprivate struct ColorTile: View {
var eventColor: EventColor
@Binding var selectedColor: EventColor
var body: some View {
Button(action: {
if selectedColor == eventColor {
... |
Swift | UTF-8 | 7,278 | 2.515625 | 3 | [
"MIT"
] | permissive | // Copyright © 2016 Alejandro Isaza.
//
// This file is part of HDF5Kit. The full HDF5Kit copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
import XCTest
import HDF5Kit
class AttributeTests: XCTes... |
Java | UTF-8 | 5,935 | 3.21875 | 3 | [] | no_license | package com.xls;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
public class GamePanel extends JPanel {
//飞机位置
int planeX ;
int planeY;
//判断飞机生死
boolean isDie = fal... |
JavaScript | UTF-8 | 2,273 | 3 | 3 | [] | no_license | $(document).ready(function() {
var actorList = ["Johnny Depp",
"Al Pacino",
"Robert De Niro",
"Kevin Spacey",
"Denzel Washington",
"Russell Crowe",
"Brad Pitt",
"Angelina Jolie",
"Leonardo DiCaprio",
"Tom Cruise",
"John Travolta",
"Arnold Schwarzenegger",
"Sylvester Stallone",
"Kate Winslet",
"Christian Bale",
"Morgan... |
PHP | UTF-8 | 3,225 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Imbehe\Services\Payments\Mfs;
use Imbehe\Services\MiddleWare;
/**
* Payment
*/
class Payment extends MiddleWare
{
protected $url = 'http://10.138.84.138:8002/osb/services/Purchase_2_0';
protected $company;
protected $sender;
protected $pin;
protected $amount;
function __construct() {
pa... |
Java | UTF-8 | 1,723 | 2.5 | 2 | [] | no_license | package com.sumit.assignmentfive.exception;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.client.HttpClientError... |
C++ | UTF-8 | 852 | 3.953125 | 4 | [] | no_license | //SourceWriter.cpp
#include <iostream>
#include <fstream>
#include <vector>
void outputVector(std::vector<char>);
int main()
{
//create the input file stream
char character;
std::ifstream input_stream;
std::vector<char> input_vector;
//open the file stream
input_stream.open("SourceWriter.cpp")... |
Python | UTF-8 | 899 | 3.65625 | 4 | [] | no_license | """
Problema:
Receber um numero como entrada
caso:
X % 3 -> Queijo
X % 5 -> Goiabada
X % 3 and X % 5 -> Romeu e Julieta
"""
from unittest import TestCase
from app import romeu_julieta
class TesteRomeuEJulieta(TestCase):
def teste_retorna_queijo_quando_input_for_mult_3(self):
... |
Go | UTF-8 | 1,014 | 2.65625 | 3 | [] | no_license | package node
import (
"context"
"encoding/json"
"github/mlyahmed.io/nominee/pkg/stonither"
)
type Specifier interface {
GetDaemonName() string
GetElectionKey() string
GetName() string
GetAddress() string
GetPort() int64
GetSpec() *Spec
}
// Node ...
type Node interface {
Specifier
Lead(context.Context, Sp... |
C# | UTF-8 | 546 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesignPatterns.Strategy
{
public class InserirJogoPlaystation : _InserirJogo
{
public void Inserir()
{
Console.WriteLine("Pleysteixo:::: O (CD)");
}... |
TypeScript | UTF-8 | 1,781 | 2.78125 | 3 | [
"MIT"
] | permissive | import { NodeType } from '../../enums/NodeType'
import { FormNodeFieldset, FormNodeFieldsetJson } from './FormNodeFieldset'
describe('FormNodeFieldset', () => {
it('should convert to json', () => {
const formNodeFieldset = new FormNodeFieldset('id', {
legend: 'legend',
children: [new FormNodeFieldset... |
Python | UTF-8 | 622 | 3.578125 | 4 | [] | no_license | import pandas as pd
'''
d = {'x':100, 'y':200, 'z':300}
print(d.keys())
print(d.values())
print(d['x'])
s1 = pd.Series(d) #组,类似于字典
print(s1)
print(s1.index)
'''
'''
L1 = [100, 200, 300]
L2 = ['x', 'y', 'y']
s2 = pd.Series(L1, index=L2)
print(s2)
'''
s1 = pd.Series([1, 2, 3], index=... |
C++ | UTF-8 | 4,938 | 2.71875 | 3 | [
"MIT"
] | permissive | #pragma once
#include "namespace.h"
#include <map>
#include <memory>
#include <stdint.h>
#include <algorithm>
#include <string>
SKIWI_BEGIN
template <class TEntry>
class environment
{
public:
environment(const std::shared_ptr<environment<TEntry>>& outer) : p_outer(outer) {}
bool has(const std::string... |
C# | UTF-8 | 832 | 3.6875 | 4 | [] | no_license | using System;
class FindingIfBitOnPositonPIsOne
{
static void Main()
{
Console.WriteLine("Checking if bit on position P(counting from 0) in an integer number V is '1'.\n");
Console.Write("Please type an integer number V: ");
int vNumberToCheck = int.Parse(Console.ReadLine());
C... |
JavaScript | UTF-8 | 2,146 | 3.171875 | 3 | [
"MIT"
] | permissive | /**
* Object sort pour trier des éléments typique de HTML
*/
class sort {
/**
* Fonction de trié des tableau dans l'order croissant et décroissant
* @param {int} column Numéro de la colonne à trié
* @param {string} table Id du tableau à trié
*/
static table(column, table) {
... |
JavaScript | UTF-8 | 2,172 | 2.765625 | 3 | [] | no_license | import "./App.css";
import logo from "./logo.svg";
import { connect } from "react-redux";
import Numbers from "./components/Numbers";
import * as actionCreator from "./redux/actions/ageActions";
function App(props) {
// Props passed by redux
const {
age,
handleAgeIncrement,
handleAgeDec... |
C++ | UHC | 4,844 | 2.859375 | 3 | [] | no_license | //----------------------------------------------------------------------
// CStorageSurface.cpp
//----------------------------------------------------------------------
#include "client_PCH.h"
#include "CDirectDrawSurface.h"
#include "CStorageSurface.h"
//#include "DebugInfo.h"
//------------------------------... |
C | UTF-8 | 992 | 3.75 | 4 | [
"MIT"
] | permissive | // Implementation of Single Circular Linked List in C
/// FONT: https://www.tutorialspoint.com/data_structures_algorithms/circular_linked_list_program_in_c.htm
#include <stdio.h>
#include <stdlib.h>
#include "ds_simpleCircularLinkedList.h"
int main(int argc, char const *argv[])
{
// Create empty Linked List poi... |
Ruby | UTF-8 | 1,484 | 2.984375 | 3 | [] | no_license | require 'curses'
require_relative 'table'
include Curses
class Display
def initialize
init_screen
start_color
init_color(COLOR_BLACK, 0, 0, 0)
fill_window(stdscr, COLOR_BLACK)
curs_set(0)
refresh
@windows = []
end
def attach(object, x, y)
@windows.push(x: x, y: y, object: object... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.