language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 3,174 | 3.609375 | 4 | [] | no_license | import speech_recognition as sr #this module is for recognizing the voice of the user
import pyttsx3 #text to speech version 3 module
import pywhatkit #this module is to search on youtube
import datetime #this module is to show date and time
import wikipedia ... |
Java | UTF-8 | 655 | 1.921875 | 2 | [] | no_license | package com.uss.convertorapp.models;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.uss.convertorapp.enums.Bases;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsCo... |
JavaScript | UTF-8 | 630 | 2.953125 | 3 | [] | no_license | const axios = require("axios");
const cheerio = require("cheerio");
async function main() {
let totalImg = 0;
let imgAlt = 0;
let response = await axios.get("https://en.wikipedia.org/wiki/Penguin");
let page = response.data;
let $ = cheerio.load(page, {
xml: {
normalizeWhitespace: true,
},
... |
Java | UTF-8 | 2,508 | 3.734375 | 4 | [] | no_license | package RoadTo1K;
import java.util.HashMap;
public class lt465minTransfers {
class Solution {
/*
[[0,1,10], [2,0,5]]
0->1 $10
2->0 $5
[[0,1,10], [1,0,1], [1,2,5], [2,0,5]]
0->1 $10
1->0 $1
0->1 $10 - 1 = 9
1->2 $5
2->0 $5
好... |
Java | UTF-8 | 939 | 2.921875 | 3 | [] | no_license | package database;
public class PrimaryCell {
private int fno;
private int cid;
private int lac;
private String name;
public PrimaryCell(){}
public int getFno() {
return fno;
}
public void setFno(int fno) {
this.fno = fno;
}
public int getCid() {
return cid;
}
public void setCid... |
C++ | UTF-8 | 1,561 | 2.625 | 3 | [] | no_license | #include "integrators/whitted.h"
vec3 Whitted::Li(std::shared_ptr<Ray> ray, std::shared_ptr<Sampler> sampler, Scene &scene) {
vec3 L(0);
HitInfo p;
// Find closest ray interaction or return background
if (!scene.Intersect(ray, p)) {
// Background color
L = vec3(0, 0.2, 0.3);
re... |
Python | UTF-8 | 1,053 | 3.375 | 3 | [] | no_license | s = '''A computer is a machine that can be programmed to carry out sequences of
arithmetic or logical operations automatically. Modern computers can perform
generic sets of operations known as programs. These programs enable computers
to perform a wide range of tasks. A computer system is a complete computer
that i... |
Java | UTF-8 | 8,262 | 2.109375 | 2 | [] | no_license | package Testcase;
import static org.junit.Assert.fail;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import com.Core.BaseClass;
import com.Core.CommFunc;
import com.csvreader.CsvReader;
import TestScript.ControlsStockTS;
... |
C++ | UTF-8 | 1,296 | 3.28125 | 3 | [] | no_license | #include<functional>
#include<vector>
#include<cmath>
#include"nonlinear_equation.h"
double Halving(std::function<double(double)> f, double a, double b,
double e1, double e2){
unsigned k = 0;
double x = 0;
while(true){
x = (a + b) / 2;
double fx = f(x);
if(std::abs(... |
C++ | UTF-8 | 963 | 3.296875 | 3 | [] | no_license | #include <iostream>
#include <bits/unique_ptr.h>
#include <vector>
#include "circle.h"
#include "cylinder.h"
#include "rectangle.h"
#include "parallelepiped.h"
#include "rounded_rectangle.h"
typedef std::vector<std::unique_ptr<shape>> shape_uptr;
void get_data(const shape_uptr& shapes);
int main()
{
char red[4]... |
Python | UTF-8 | 263 | 2.96875 | 3 | [] | no_license | A = [2]
B = [1,3]
class Solution:
def fairCandySwap(self, A: List[int], B: List[int]) -> List[int]:
s = (sum(A) - sum(B))//2
A = set(A)
B = set(B)
for i in B:
if i + s in A:
return [i+s,i] |
Python | UTF-8 | 5,538 | 2.75 | 3 | [
"MIT"
] | permissive | import unittest
import numpy as np
from taivasnet.layers import Softmax, Linear, ReLU, Dropout
from taivasnet.losses import CrossEntropy
from .gradientchecker import GradientChecker
__author__ = 'Aki Rehn'
__project__ = 'taivasnet'
class TestLinear(unittest.TestCase):
"""
Test linear layer functionality
... |
Java | UTF-8 | 10,723 | 2.0625 | 2 | [] | no_license | package com.eeduspace.report.service.impl;
import com.eeduspace.report.dao.ReportDao;
import com.eeduspace.report.model.GradeTotalModel;
import com.eeduspace.report.po.ReportPo;
import com.eeduspace.report.service.ReportService;
import com.google.common.collect.Lists;
import org.apache.commons.beanutils.BeanUtils;
imp... |
Java | UTF-8 | 502 | 2.234375 | 2 | [] | no_license | package ru.qaliti;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import java.util.List;
public class Ul {
private WebElement ulElement;
private WebDriver driver;
public Ul(WebElement ulElement, WebDriver driver){
this.ulElement = ulEle... |
JavaScript | UTF-8 | 372 | 2.953125 | 3 | [] | no_license | class Person{
contructor(firstName, lastName, age){
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
}
walk (distance);
}
class Student extends Person{
contructor(firstName, lastName, age, studID){
super((firstName, lastName, age);
this.st... |
PHP | UTF-8 | 1,891 | 2.96875 | 3 | [] | no_license | <html>
<head>
<style type="text/css">
h3 {color: yellow};
</style>
</head>
<body>
<?php //This block insert the uploaded form information into Database called SudokuData.
if (isset($_REQUEST["email"]) && isset($_REQUEST["name"]) && strcmp($_REQUEST["password1"], $_REQUEST["password2"])==0 ){
require_once... |
Java | UTF-8 | 223 | 1.757813 | 2 | [] | no_license | package cn.edu.ustc.springboot.repository;
import cn.edu.ustc.springboot.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserRepository extends JpaRepository<User,Integer> {
}
|
Java | UTF-8 | 2,173 | 2.6875 | 3 | [] | no_license | package iotwebsocketproxy.server;
import javax.websocket.EndpointConfig;
import javax.websocket.OnClose;
import javax.websocket.OnError;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint... |
Python | UTF-8 | 11,814 | 2.875 | 3 | [] | no_license | #!/usr/bin/python3
#Author: Matthew Yu
#templateTest.py
#history:
#as of 6/6/18, template currently matches solid note heads of Accumula Town and
#Floaroma Town with an acc around ~95%.
#as of 6/8/18, template matches solid note heads, hollow note heads, sharps, flats,
#and naturals, as well as full si... |
Markdown | UTF-8 | 1,315 | 3.21875 | 3 | [
"MIT"
] | permissive | # `AbstractAutoEnum` Base Class
This base class contains a default `all()` implementation
that always returns the values of all public class constants.
This makes writing usable enum classes very easy:
extend this class, put some constants in it, done.
[Exceptions]: Exceptions.md
[Enum]: Class_Enum.md
[AbstractEnum]... |
Java | UTF-8 | 4,319 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jsquad.knowhunt;
import DatabaseHelper.Qa;
import DatabaseHelper.QaEJB;
import com.google.gson.Gson;
import stat... |
Java | UTF-8 | 527 | 1.835938 | 2 | [] | no_license | package com.blockshine.authentication.service;
import com.blockshine.authentication.dto.AuthorizationDTO;
import com.blockshine.authentication.dto.LoginDTO;
/**
* Token generate and Token Refresh
*
* @author maxiaodong
*/
public interface TokenService {
public AuthorizationDTO generateToken(AuthorizationDTO... |
Java | UTF-8 | 1,675 | 2.015625 | 2 | [] | no_license | package com.spring.openstack.configure;
import com.spring.openstack.configure.filters.OpenStackFilter;
import com.spring.openstack.data.Constants;
import com.spring.openstack.data.OpenStackAuth;
import org.openstack4j.api.OSClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.... |
JavaScript | UTF-8 | 758 | 2.71875 | 3 | [] | no_license | (function () {
document.body.addEventListener('click', (e) => {
// get target element according to hash in url
let url = (e.target.href || '').split('#');
let target = document.getElementById(url[1]);
url = url[0];
// if target exisits on website and auto scrolling is supported
if (target... |
Markdown | UTF-8 | 1,560 | 2.78125 | 3 | [] | no_license | ## Nano Lua Dictionary
Nano Lua Dictionary (or nano_luadict) is a simple C snippet that facilitates (with some compromises) the creation of Lua tables composed of K/V's (or dictionaries) as specified [here](http://lua-users.org/wiki/TablesTutorial). I made this nano-project to to aid in the creation of an event system... |
Java | UTF-8 | 3,424 | 1.960938 | 2 | [] | no_license | // isComment
package org.geometerplus.zlibrary.text.view.style;
import java.io.*;
import java.util.*;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.zlibrary.core.util.MiscUtil;
class isClassOrIsInterface {
private enum State {
EXPECT_SELECTOR, EXPECT_OPEN_BRACKET, EXPE... |
Java | UTF-8 | 1,614 | 2.125 | 2 | [] | no_license | package com.dgg.hdforeman.mvp.model.been;
import java.io.Serializable;
/**
* Created by kelvin on 2016/11/9.
* 房产信息
*/
public class HouseInfoData implements Serializable{
private String id;//项目id
private String pm_cusname;//业主
private String measure;//工地测量(0,未测量,1,已测量)
private String pm_cuscontact... |
TypeScript | UTF-8 | 2,590 | 2.546875 | 3 | [] | no_license | import { EmbedBuilder, ApplicationCommandOptionType } from "discord.js";
import R from "ramda";
import { CommandError } from "../../../../Configuration/definitions";
import F from "../../../../Helpers/funcs";
import { prisma } from "../../../../Helpers/prisma-init";
import { SlashCommand } from "../../../../Structures/... |
Java | UTF-8 | 309 | 1.617188 | 2 | [
"Apache-2.0"
] | permissive | package com.example.liem.sitorgetoffthepot.Interfaces;
import android.location.Location;
import com.google.android.gms.maps.model.LatLng;
public interface AddLocationInterface {
void newLocationCancelButtonPress();
void newLocationAddButtonPress(String _title, String _rating, String _detail);
}
|
JavaScript | UTF-8 | 1,265 | 2.984375 | 3 | [] | no_license | import React, { useReducer } from 'react';
import './App.css';
const ADD_USER = 'ADD_USER'
const appReducer = (state, action) => {
switch (action.type) {
case ADD_USER: {
return{
users: [...state.users, action.payload]
};
}
}
};
function App() {
const initialState = {
users: [
... |
Java | UTF-8 | 2,749 | 2.359375 | 2 | [
"Apache-2.0"
] | permissive | package projector.api;
import com.bence.projector.common.dto.BibleDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import projector.api.assembler.BibleAssembler;
import projector.api.retrofit.ApiManager;
import projector.api.retrofit.BibleApi;
import projector.model.Bible;
import retrofit2.Call;
import j... |
C# | UTF-8 | 1,109 | 2.640625 | 3 | [] | no_license | using System.Data.Common;
using CollectionManager.DataBase.Tables;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
namespace CollectionManager.DataBase {
public class CollectionManagerDbContext : DbContext {
private readonly DbConnection _dbConnection;
public DbSet<ItemSet> ItemSets {
get;... |
Java | UTF-8 | 8,511 | 1.757813 | 2 | [] | no_license | package com.hxwl.wulinfeng.wulin;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import a... |
Go | UTF-8 | 690 | 3.171875 | 3 | [] | no_license | package main
import (
"Go-000/Week01/protoBuf/myproto"
"fmt"
"github.com/golang/protobuf/proto"
)
func main() {
test := &myproto.Test{
Name: "joke",
Stature: 173,
Weight: []int64{211, 189, 159},
Motto: "back !",
}
//将Struct test 转换成 protobuf
data, err := proto.Marshal(test)
if err != nil {
f... |
C# | UTF-8 | 1,749 | 2.703125 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum ButtonAssignments
{
Left,
Right,
Shift,
Down,
Space,
C,
E,
Q
}
public enum Condition
{
GreaterThan,
LessThan
}
[System.Serializable]
public class InputAxisState
{
public string axis... |
Python | UTF-8 | 565 | 2.59375 | 3 | [] | no_license | import time
import sys
import telnetlib
#Other is same as VBS example.
HOST = "192.168.1.78" #Emulator IP
tn = telnetlib.Telnet(HOST)
print tn.read_eager()
tn.write("admin\r\n") #the user name is admin
time.sleep(2)
tn.write("\r\n") #there is no password - just return - now logged in
print tn.read_ea... |
Java | UTF-8 | 2,220 | 4.15625 | 4 | [] | no_license | package pl.mazurmarcin.javastart.lecture10.homework.shapes;
public class ShapeApp {
private static ShapeCalculator shapeCalculator = new ShapeCalculator();
private static final String Rectangle = "Rectangle";
private static final String Line2D = "Line2D";
private static final String Circle = "Circle";
... |
Python | UTF-8 | 351 | 3.75 | 4 | [] | no_license | sum = 0
j=0
while j != 1:
a,b = map(int,input().split( ))
sum = 0
if a > b:
c = a
a = b
b = c
if a <= 0 or b <= 0:
j = 1
if j != 1:
for i in range(a,b+1):
print('{}'.format(i))
sum +=i
if i == b:
... |
Java | UTF-8 | 737 | 2 | 2 | [] | no_license | package com.Book.service;
import java.util.List;
import com.Book.entity.Book;
import com.Book.exception.Invalidbookdetails;
import com.Book.exception.InvaliedTitle;
import com.Book.exception.NoRecordFound;
import com.Book.exception.TitleAllreadyPresent;
import com.Book.model.Request.BookRequest;
import com.Book.model... |
Markdown | UTF-8 | 1,007 | 2.875 | 3 | [
"MIT"
] | permissive | <h1 dir="rtl">إلغاء مصطفى كمال أتاتورك السلطنة العثمانية .</h1>
<h5 dir="rtl">العام الهجري: 1341
الشهر القمري: ربيع الأول
العام الميلادي: 1922</h5>
<p dir="rtl">قام مصطفى كمال أتاتورك -الذي كانت بيده مقاليدُ الأمور في تركيا- بإلغاء السَّلْطَنة العثمانية، ونفيِ السلطان عبد المجيد الثاني، وكان ذلك تمهيدًا لإلغاءِ ال... |
Markdown | UTF-8 | 853 | 2.9375 | 3 | [] | no_license | # Bug Identification
For target1, the `strcpy` function in target1.c doesn't check the argument size. Thus, we can create a buffer with a size larger than `200` to overflow `the saved EIP`. Unlike target0, the buffer size is large enough, and thus shellcode can be put into the buffer so that we are able to get the use... |
Python | UTF-8 | 1,140 | 2.625 | 3 | [] | no_license | #!/usr/bin/env python3
import sys
if len(sys.argv) < 4:
print ("Correct usage: script.py structure1.pdb structure2.pdb output_structure.pdb")
sys.exit()
def rewrite(infile, chain, outfile, new):
prev_orig = ''
three2one = {'ALA':'A','ARG':'R','ASN':'N','ASP':'D',
'CYS':'C','GLN':'Q'... |
C++ | UTF-8 | 637 | 2.5625 | 3 | [
"BSD-2-Clause"
] | permissive |
// vi: tabstop=4:expandtab
#include "exception/ExceptionBase.hh"
#include <sstream>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
using namespace exception;
ExceptionBase::ExceptionBase() throw()
: message("Unknown")
{
}
ExceptionBase::ExceptionBase(const std::string& msg) throw()... |
C# | UTF-8 | 1,356 | 3.625 | 4 | [
"MIT"
] | permissive | using UnityEngine;
/// <summary>
/// The Cooldown class utility.
/// </summary>
public class Cooldown
{
/// <summary>
/// Constructs a new Cooldown instance with a given cooldown.
/// </summary>
/// <param name="cooldown">The amount of time in seconds the cooldown should last.</param> ... |
Python | UTF-8 | 2,321 | 3.1875 | 3 | [] | no_license | #!/usr/bin/env python
import cv2
import math
import numpy as np
#print cv2.__version__
class LaneDetector:
'''Grass Lane Detection'''
def __init__(self, size):
self.size = size
self.image = np.zeros(size)
self.houghPImg = np.zeros(size)
self.houghImg = np.zeros(size)
def updateImage(self, image):
self.... |
C++ | UTF-8 | 2,571 | 2.59375 | 3 | [] | no_license | #include <QCoreApplication>
#include <qhash.h>
#include <qdebug.h>
#include "database.h"
#include "table.h"
#include "record.h"
#include "btreeindex.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QHash<QString, QString> attribute_type_hash ;
attribute_type_hash["rollno"]="int" ;
a... |
Python | UTF-8 | 1,437 | 3.421875 | 3 | [] | no_license | from typing import Dict, List
from game_period import GamePeriod
from player import Player
from player_stat_types import PlayerStatTypes
class Team:
"""
A base class to represent a Team that played in a NBA game.
Attributes
----------
name: str
The name of the team
scores: dict
... |
Shell | UTF-8 | 468 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/sh
# generates wordpress.conf by combining wordpress.conf-header
# with the URLs in wordprss-urls
outfile=wordpress.conf
echo "## generated by $0 ##" > $outfile
cat wordpress.conf-header >> $outfile
for url in $(egrep -v '^#' wordpress-urls | sed 's/index\.php/(index.php)?/; s/\.php/\\.php/')
do
cat << EOF ... |
C# | UTF-8 | 3,674 | 2.59375 | 3 | [] | no_license | using ProcuraServicosWebApi.Models;
using ProcuraServicosWebApi.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace ProcuraServicosWebApi.Controllers
{
[RoutePrefix("api/Categoria")]
public class CategoriaCont... |
Java | UTF-8 | 710 | 2.515625 | 3 | [] | no_license | package by.bsu.likhanova.hybridSorting.creator;
import by.bsu.likhanova.hybridSorting.datareader.ReaderFromFile;
import by.bsu.likhanova.hybridSorting.parameter.Parameters;
import java.io.IOException;
import java.util.ArrayList;
public class FromFileArrayCreator {
public static ArrayList<int[]> initArrays() thro... |
JavaScript | UTF-8 | 988 | 3.09375 | 3 | [
"MIT"
] | permissive | /**
* @since 2017-03-20 08:53:17
* @author vivaxy
*
* @see https://leetcode.com/problems/simplify-path/
Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/", => "/home"
path = "/a/./b/../../c/", => "/c"
*/
/**
* @see https://leetcode.com/submissions/detail/97327909/
*... |
Java | UTF-8 | 328 | 1.820313 | 2 | [] | no_license | package com.example.microadventure.domains.auth;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Data
@Setter
@NoArgsConstructor
public class AuthTokenDTO {
private String access_token;
private String refresh_token;
private Integer expires_in;
private Integer refresh_expire... |
C++ | UTF-8 | 1,210 | 3.125 | 3 | [] | no_license | /* Authors:
* Rajdeep Bandopadhyay
* Sarah George
* Yulia Martinez
*/
#include <iostream>
#include "player.h"
using namespace std;
Player::Player(){
bet = 0;
total = 500;
}
int Player::getBet(){
return bet;
}
int Player::getTotal(){
return total;
}
int Player::releaseBall(){
return wheel.s... |
Ruby | UTF-8 | 2,268 | 3.03125 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env ruby
require 'csv'
MONTHS={
"January" => 1,
"February" => 2,
"March" => 3,
"April" => 4,
"May" => 5,
"June" => 6,
"July" => 7,
"August" => 8,
"September" => 9,
"October" => 10,
"November" => 11,
"December" => 12
}
months = MONTHS.keys.join("|")
DESTINATIONS = {
"Port Phillip... |
Java | UTF-8 | 178 | 1.78125 | 2 | [] | no_license |
package _239_sliding_window_maximum;
/**
* https://leetcode.com/problems/sliding-window-maximum
*/
public class Solution {
public void slidingWindowMaximum() {
}
}
|
PHP | UTF-8 | 2,802 | 2.78125 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="refresh" content="120" />
</head>
<?php
include("includes/configuration.php");
doDB();
function createURL($ticker){
$currentMonth = date("n");
$currentMonth = $currentMonth - 1;
$currentDay = date("j");
$currentYear = date("Y");
return "http://ichart.... |
Java | UTF-8 | 7,696 | 1.875 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except
* in compliance with the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
Python | UTF-8 | 1,258 | 3.3125 | 3 | [] | no_license | import requests, json
from datetime import datetime
# base URL
#The Author name is Gayathri
URL = "https://api.openweathermap.org/data/2.5/weather?"
#City = "Warangal"
mylocation = input("Enter the city name:")
Api_Key = "cb93812ba032e7c818e82d66ce238df7"
# upadting the URL
URL = URL + "q=" + mylocation + "&a... |
Python | UTF-8 | 340 | 3.296875 | 3 | [] | no_license | # Import networkx and initialize the graph.
import networkx as nx
import matplotlib.pyplot as plt
G = nx.Graph()
G.add_edge('A', 'B')
G.add_edge('A', 'C')
G.add_edge('D', 'C')
G.add_edge('D', 'B')
pos = nx.spring_layout(G)
nx.draw(G)
nx.draw_networkx_labels(G, pos, font_size=20, font_family='sans-serif')
# Show t... |
Java | UTF-8 | 269 | 1.8125 | 2 | [] | no_license | package com.lovver.ssdbj.core;
import com.lovver.ssdbj.exception.SSDBException;
public interface Protocol {
public String getProtocol();
public String getProtocolVersion();
public CommandExecutor getCommandExecutor();
public void auth() throws SSDBException ;
}
|
Shell | UTF-8 | 2,122 | 2.953125 | 3 | [] | no_license | #!/bin/bash
# Location to save the MSCOCO data.
MSCOCO_DIR="${HOME}/im2txt/data/mscoco"
# Build the preprocessing script.
cd research/im2txt
bazel build //im2txt:download_and_preprocess_mscoco
# Run the preprocessing script.
bazel-bin/im2txt/download_and_preprocess_mscoco "${MSCOCO_DIR}"
# Location to save the... |
C++ | WINDOWS-1251 | 829 | 2.921875 | 3 | [] | no_license | #include<iostream>
#include "Songs.h"
using namespace std;
int main()
{
//
//
Songs songs;
//
songs.AddSong("Yesterday");
songs.AddSong("Problem");
songs.AddSong("Happy New Year");
//
PopStyleOfMusic *pop = new PopStyleOfMusic();
RapStyleOfMusic *rap = new RapStyleOfMusic();
RockStyleOfMus... |
Java | UTF-8 | 407 | 2.03125 | 2 | [] | no_license | package org.jquant.instrument.rate;
import org.joda.time.DateTime;
import org.joda.time.Period;
import org.jquant.model.Currency;
import org.jquant.time.daycounter.DayCounter;
public class Euribor extends IborIndex{
public Euribor(DateTime fixingDate, double rate, Currency currency, Period period, DayCou... |
Python | UTF-8 | 52 | 2.796875 | 3 | [] | no_license |
n, a = map(int, input().split())
print((n+a-1)//a)
|
JavaScript | UTF-8 | 1,045 | 2.578125 | 3 | [] | no_license | let id = 0;
export default function cart(
state = { list: [], open: false },
{ type, payload }
) {
switch (type) {
case "cart/open":
return {
...state,
open: true,
};
case "cart/close":
return {
...state,
open: false,
};
case "cart/add":
r... |
PHP | UTF-8 | 1,824 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use App\News;
use Illuminate\Http\Request;
/**
* Вывести список всех задач
*/
Route::get('/', function () {
$news = News::orderBy('created_at', 'asc')->get();
return view('news', [
'news' => $news
]);
});
/**
* Вывод административной части
*/
Route::get('/admin', function () {
$news... |
Python | UTF-8 | 918 | 4 | 4 | [] | no_license | import random
def generation_random_number():
"""Ф-ция генерирует список случайных чисел"""
random_list = []
for n in range(10): # кол-во чисел в списке 10
random_list.append(round(random.uniform(1, 100)/3*1.3,2))
return random_list
received_list = generation_random_number() # получ... |
C# | UTF-8 | 1,365 | 3.75 | 4 | [] | no_license | using System;
namespace Business
{
public class Coordinate
{
public readonly int X;
public readonly int Y;
protected bool Equals(Coordinate other)
{
return X == other.X && Y == other.Y;
}
public override bool Equals(object obj)
{
... |
Python | UTF-8 | 10,325 | 2.59375 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
ota installer
.. codeauthor:: Fedor Ortyanov <f.ortyanov@roscryptpro.ru>
"""
import getpass
import codecs
import os
import sys
from optparse import OptionParser
__author__ = 'Fedor Ortyanov'
__version__ = '0.1.0'
try:
from fabric.api import * ... |
Swift | UTF-8 | 1,050 | 3.46875 | 3 | [] | no_license | //
// ViewTwo.swift
// ViewBuilderTape
//
// Created by Sraavan Chevireddy on 5/16/21.
//
import SwiftUI
struct ViewTwo: View {
var body: some View {
NavigationView{
GenericContainer {
Text("Hello")
Text("World")
Text("This is a Generic Contai... |
Java | UTF-8 | 1,122 | 4.03125 | 4 | [] | no_license | package com.kyondoku.first.level3;
public class Car {
String name;
String color;
int cc;
// 1. 생성자이름이 클래스명과 같다. 2. 리턴타입이 없다.
public Car() {
/*생략가능, 내 직속부모의 주소값 . 내 부모의 기본 생성자를 호출하겠다는 의미*/
this("소나타", "흰색", 2500);
}
// 스트링값2개와 정수1개를 받는 생성자
public Car(String name, String color, int cc) {
// supe... |
Markdown | UTF-8 | 5,663 | 3.5 | 4 | [] | no_license | # Vue的菜鳥開發學習歷程
# [Day10] ~~假~~ 認真一下 講講Vue的基本常用語法 續集之續集
---
## 菜鳥認真講講Vue的基本常用語法 (續中續集)
好的
因為前天要加班一下
掰完“Mustache”语法
又掰太久,留剩下的到昨天
但昨天又手賤又加班了一下
只掰完"v-html"語法
好的
今天得努力下繼續生後面的兩個...
---
再補最後一次,一個component,基本上包含三個部分:
- <template>: Html樣板
- <script>: JavaScript的部分,Vue的程式碼
- <style>: CSS樣式的部分
好的~
- Vue的基本語... |
PHP | UTF-8 | 2,324 | 2.84375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "nbp";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if ($_POST){
$eur = null;
$usd = null;
$gbp = null;
$chf = null;
$dat... |
Java | UTF-8 | 785 | 2.421875 | 2 | [] | no_license | package pl.my.quickcash.data.converter;
import pl.my.quickcash.controllers.modelfx.ClientAccountFx;
import pl.my.quickcash.data.client.ClientAccount;
public class ClientAccountConverter {
public static ClientAccount convertToAccount(ClientAccountFx clientAccountFx) {
ClientAccount clientAccount = new Cli... |
PHP | UTF-8 | 831 | 2.71875 | 3 | [] | no_license | <?php
$error = 'faltan_valores';
if (empty($_POST['nombre']) && empty($_POST['apellidos'])
&& empty($_POST['edad']) && empty($_POST['mail'])
&& empty($_POST['pass']) ) {
$error = 'faltan_valores';
header("Location:index.php?error=$error");
}else {
$error = 'ok';
$nombre = $_POST['nombre'];
$apel... |
PHP | UTF-8 | 1,911 | 2.65625 | 3 | [] | no_license | <?php
require_once 'header.php';
$path = "/opt/bitnami/apache2/htdocs/TimelyFlies/";
if ($loggedin) {
if (isset($_SESSION['user'])) {
$user = sanitizeString($_SESSION['user']);
$path .= $user . "/";
echo "<div id='container'><div id='header' class='header'><h2>File Uploader</h2></div>";
... |
Shell | UTF-8 | 191 | 3.109375 | 3 | [] | no_license | #!/bin/bash
for filename in *.pdf; do
target=$(echo ${filename} | sed 's/^\(\([0-9]\{4\}\)\([0-9]\{2\}\).*\)$/\2\/\3\/\1/')
mkdir -p $(dirname ${target})
mv ${filename} ${target}
done
|
C++ | UTF-8 | 1,303 | 2.84375 | 3 | [] | no_license | #define pb push_back
typedef pair<int, int> pii;
#define f first
#define s second
#define mp make_pair
bool unequal(int a, int b, int c, int d){
if(a == b) return false;
if(a == c) return false;
if(a == d) return false;
if(b == c) return false;
if(c == d) return false;
if(b == d) return false;
... |
PHP | UTF-8 | 4,506 | 2.90625 | 3 | [] | no_license | <?php
class Database {
private static $dsn = 'mysql:host=localhost;dbname=contact_newsletter';
private static $username = 'root';
private static $password = '';
private static $db;
private function __construct() {}
public static function getDB () {
i... |
Markdown | UTF-8 | 2,429 | 3.8125 | 4 | [] | no_license | # Structured Query Language- SQL
SQL, or Structured Query Language, is a language designed to allow both technical and non-technical users query, manipulate, and transform data from a relational database. And due to its simplicity, SQL databases provide safe and scalable storage for millions of websites and mobile app... |
Python | UTF-8 | 710 | 2.9375 | 3 | [
"MIT"
] | permissive | """
This module implements the simple rule that checks whether the loop terminates immediately
because of the initial condition
"""
from diofant import sympify
from .expression import get_initial_polarity_for_expression
from .rule import Rule, Result
from .utils import Answer
class InitialStateRule(Rule):
def is... |
Java | UTF-8 | 1,306 | 3.25 | 3 | [] | no_license | package cn.colining.leetcode.string;
import java.util.Scanner;
/**
* Created by colin on 2017/9/4.
*/
public class leetcode_14 {
public static void main(String[] args) {
// Scanner scanner = new Scanner(System.in);
// while (scanner.hasNext()) {
// int n = scanner.nextInt();
// ... |
Java | UTF-8 | 4,818 | 2.09375 | 2 | [] | no_license | /* Obj-C to Java:
* Class: NSColor.
* Source File: NSColor.h.
* Module: OpenStep : AppKit.
* Time stamp: Mon Jun 23 22:55:01 1997.
*/
package openstep.appkit;
import openstep.foundation.*;
import openstep.appkit.*;
class ColorComponents {
float v1, v2, v3, v4;
}
public class OSColor extends OSObject implement... |
PHP | UTF-8 | 2,420 | 2.640625 | 3 | [] | no_license | <?php
$query_result = $obj_app -> select_all_reservation_info();
//$query_result1=$obj_app->select_category_info_by_id();
?>
<head>
<style>
table tr {
padding: 2px;
}
table tr th, td {
padding: 20px;
}
</style>
</head>
<div class="container">
<h2>Here is your Bill</h2>
<div class="row">... |
Java | UTF-8 | 361 | 1.859375 | 2 | [] | no_license | package net.sf.minuteProject.facade.face;
import java.util.List;
import net.sf.minuteProject.configuration.bean.Reference;
import org.apache.ddlutils.model.Column;
public interface EntityFacade {
public Column getPrimaryKey();
public List<Column> getAttributes ();
public List<Reference> getParents ();
p... |
JavaScript | UTF-8 | 37,754 | 2.765625 | 3 | [] | no_license | //说明统一返回值中都含有一个code -= 10001 的时候 是正常返回,10002是异常,10003 没有查询到数据 asyncFlag同步为false,异步为true,默认同步
//任何可以后台执行的方法
function ajaxGetColums(tablename,asyncFlag){
if(!asyncFlag){
asyncFlag=false;
}
var resultdata=null;
var data={};
data['tablename']=tablename;
var dataUrl=basePath+'/zbjc/findColsList';
// 调用后台
$.ajax({
... |
TypeScript | UTF-8 | 1,381 | 2.546875 | 3 | [] | no_license | import { Socket } from 'net';
import GameServer from './gameserver';
import { createGameServer } from './matchmakingmanager';
let matchServerKey = 'secret';
export const setMatchServerKey = (key: string) => {
matchServerKey = key;
};
const onServerData = (server: GameServer, data: string) => {
try {
const d ... |
Python | UTF-8 | 563 | 3.609375 | 4 | [] | no_license | from math import factorial
n = int(input())
k = 12
def binomialCoeff(n, k):
C = [[0 for i in range(k + 1)] for i in range(n + 1)]
# Calculate value of Binomial Coefficient in bottom up manner
for i in range(0, n + 1, 1):
for j in range(0, min(i, k) + 1, 1):
# Base Cases
... |
Shell | UTF-8 | 89 | 2.59375 | 3 | [] | no_license | #!/bin/bash
set -Eeuo pipefail
setup_vars() {
}
main() {
setup_vars
}
main "$@"
|
C# | UTF-8 | 1,342 | 2.734375 | 3 | [] | no_license | using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RestTestsLibrary.Base
{
public class RestTestBase
{
public static RestClient restClient;
public static RestRequest request;
public static IRest... |
Java | UTF-8 | 2,394 | 2.703125 | 3 | [] | no_license | package org;
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
im... |
Python | UTF-8 | 408 | 3.265625 | 3 | [] | no_license | def unique_chars_str(string):
unique = list(set(list(string)))
all_chars = list(string)
if len(unique) == len(all_chars):
print "OK: '{}' has all unique characters.".format(string)
else:
print "NO: {} does not have all unique characters.".format(string)
unique_chars_str("Pooja")
unique_... |
Java | UTF-8 | 254 | 1.945313 | 2 | [] | no_license | package jo.secondstep.solid.dependencyinversion.correct;
import java.util.HashMap;
public class sheinShopping implements ShoppingProvider {
@Override
public shopping provideClothes(HashMap clothesOrder) {
return new shine(clothesOrder);
}
}
|
Java | UTF-8 | 1,578 | 2.28125 | 2 | [] | no_license | package com.spring.starter.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.*;
@Entity
@Table(name = "fund_transfer_SLIPS_files")
public class FundTransferSLIPSFiles {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int fundTransferSLIPSFilesId;
p... |
Java | UTF-8 | 15,133 | 1.515625 | 2 | [
"Apache-2.0"
] | permissive | /*
* © Copyright 2016-2023 Micro Focus or one of its affiliates.
* 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 app... |
C++ | UTF-8 | 1,472 | 2.78125 | 3 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
int n, d, l, r;
string s, ss;
string Izvajdane (string s1, string s2) {
int d1=0, d2, i, p=0, q=0, vz=0, r=0;
string otg = "";
bool fl=false;
d1 = s1.size();
d2 = s2.size();
if (d2 < d1) {
while (d2 < d1) {
s2 = "0" + s2;
d2 ++;
... |
Markdown | UTF-8 | 807 | 2.796875 | 3 | [] | no_license | ---
layout: home
title: NHumphrey.com
---
NHumphrey.com
=============
To make this site I'm using:
- [Jekyll](https://jekyllrb.com/), a simple static website generator that lets you use templates and write content in Markdown without having to spin up a server to host your content management system. Github Pages r... |
Java | UTF-8 | 5,098 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | package org.aieonf.template.controller;
import java.util.ArrayList;
import java.util.Collection;
import org.aieonf.concept.IDescribable;
import org.aieonf.concept.IDescriptor;
import org.aieonf.concept.context.IContextAieon;
import org.aieonf.model.builder.IModelBuilderListener;
import org.aieonf.model.build... |
Java | UTF-8 | 180 | 2.734375 | 3 | [] | no_license | package com.module1coma1.people;
public class Male extends Person {
public Male(String name) {
super(name);
}
public void voice(){
System.out.println("Hey there! ");
}
}
|
Python | UTF-8 | 1,341 | 3.453125 | 3 | [] | no_license | """
Get请求:Get请求会通过URL网址传递消息,可以直接在URL中写上要传递的信息,
也可以由表单进行传递。如果使用表单进行传递,这表单中的信息会自动转为URL
地址中的数据,通过URL地址传递
"""
import urllib.request
def search_without_chinese():
# 构建对应的URL地址,该URL地址包含GET请求的字段名和字段内容等信息,并且
# URL地址满足GET请求的格式,即“http://网址?字段名1=字段内容1&字段名2=字段内容2”
keywd = "hello"
url = "http://www.baidu.com/s?wd=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.