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,087 | 2.765625 | 3 | [] | no_license | package org.multiverse.transactional.collections;
import org.junit.Before;
import org.junit.Test;
import org.multiverse.api.Stm;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.multiverse.api.GlobalStmInstance.getGlobalStmInstance;
import static org.multiverse.api.T... |
C++ | UTF-8 | 2,289 | 3.65625 | 4 | [] | no_license |
class Solution {
public:
bool isBipartite(vector<vector<int>>& graph) {
int n = graph.size();
queue<int> qu;
vector<int> colors(n, 0);;
int color;
int index;
/*
* BFS - 无向图遍历着色
* 遍历图相邻节点着不同颜色,如果发现相邻节点已经着了相同颜色,则不是二分图
* 如果能遍历完成着色,则是二分图
... |
Python | UTF-8 | 833 | 3.609375 | 4 | [] | no_license | # -*- coding: utf-8 -*-
import os
# def dir_l(path = '.'):
# L = os.listdir(os.path.abspath(path))
# for f in L:
# print(f)
# dir_l()
#编写一个程序,能在当前目录以及当前目录的所有子目录下查找文件名包含指定字符串的文件,并打印出相对路径。
import sys,os
def FindFile(filename, value):
try:
dirlist = os.listdir(filename)
for x in dirlist:
... |
C++ | UTF-8 | 357 | 3.140625 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int arreglo[20];
int valorArreglo;
for(int i=0;i<10;i++){
cout<<"Ingresa un valor para el indice "<<i<<"\n";
cin>>valorArreglo;
arreglo[i] = valorArreglo;
}
cout<<"\t Print Data \n";
for(int i = 0; i<10; i++){
cout<<"Valor arreglo["<<i<<"]: "<... |
Java | UTF-8 | 3,806 | 2.28125 | 2 | [] | no_license | package com.way.service;
import java.beans.IntrospectionException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.poi.... |
C++ | UTF-8 | 428 | 2.84375 | 3 | [] | no_license | #include <iostream>
#include "janson.h"
#include "hashtable.h"
struct User {
char* name;
char* lastname;
int age;
};
void User_init(struct User* user) {
user->name = "giorgi";
user->lastname = "fafakerashivli";
user->age = 21;
}
int main() {
User user;
User_init(&user);
char ... |
Python | UTF-8 | 1,703 | 2.84375 | 3 | [] | no_license | #!/usr/bin/python3
""" Function that do a full deployment of static content into servers
"""
from fabric.api import local, env, put, run
from datetime import datetime
from os import path
env.user = 'ubuntu'
env.hosts = ['35.229.108.96', '35.196.60.22']
def deploy():
"""Function that do a full deployment"""
... |
C# | UTF-8 | 2,794 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using RegistroArticulos.Entidades;
using RegistroArticulos.DAL;
namespace RegistroArticulos.BLL
{
public class ArticulosBLL
{
pu... |
PHP | UTF-8 | 5,035 | 2.578125 | 3 | [] | no_license | <?php
class ReportkekuatanController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='//layouts/column2';
protected $menuname = 'reportkekuatan';
... |
C# | UTF-8 | 1,353 | 2.859375 | 3 | [] | no_license | using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using SQLite;
using SQLiteNetExtensions.Attributes;
namespace OutBackX.Model
{
public class Funcionario : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual voi... |
Java | UTF-8 | 707 | 1.757813 | 2 | [
"Apache-2.0"
] | permissive | package uk.ac.ebi.eva.server.configuration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import uk.a... |
C | UTF-8 | 929 | 2.765625 | 3 | [] | no_license | #include <GL/glut.h>
#include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PI 3.141592654
void desenho(){
float angulo, r;
int i;
glLineWidth(5);
glBegin(GL_LINE_LOOP);
glColor3f(1,0,0);
r = 0.5;
for(i=0; i<=50; i++){
angulo = 2 * PI * i/50.0;
g... |
Python | UTF-8 | 3,559 | 3.625 | 4 | [] | no_license | from os import system
from random import randint
from datetime import datetime
def get_current_time():
return datetime.now()
def is_5_minutes_done(start_time):
current_time = get_current_time()
return ((current_time-start_time).total_seconds())/60 >= 5
def get_percent_score(questions_count, score):
... |
Java | UTF-8 | 9,296 | 1.765625 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.bitstrips.outfitbuilder.views;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;... |
C# | UTF-8 | 915 | 3.28125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Programs.Interview.Vmware
{
public class MinUniqeArraySum
{
public int FindMiniumUniqeArraySum(int[] array)
{
if (array == null)
return 0;
var dict = new Di... |
Java | UTF-8 | 563 | 1.9375 | 2 | [] | no_license | package com.whz.facade;
/**
* Created by kevin on 2018/4/30 10:13
* <p>
* 描述:
*/
public class MobileApi {
private IPhone iPhone = new PhoneImpl();
private ICamera camera = new CameraImpl();
public void dail() {
iPhone.dail();
}
public void videoChat() {
camera.open();
... |
C++ | UTF-8 | 822 | 2.953125 | 3 | [] | no_license | //https://www.codechef.com/ACMIND16/problems/ICPC16G
#include <bits/stdc++.h>
using namespace std;
void disp(vector<int> a)
{
for (auto i = a.begin(); i != a.end(); ++i)
cout << *i << " ";
}
void rrot(vector<int> &a, int k)
{
rotate(a.begin(), a.begin() + a.size() - k, a.end());
}
bool xr(vector<int>... |
TypeScript | UTF-8 | 1,349 | 2.546875 | 3 | [] | no_license | import {
Table,
Model,
Column,
DataType,
ForeignKey,
BelongsTo,
} from 'sequelize-typescript';
import { User } from 'src/core/user/user.model';
import { Collection } from '../collection/collection.model';
@Table({ tableName: 'categories' })
export class Category extends Model<Category> {
@Column({
ty... |
Python | UTF-8 | 847 | 2.5625 | 3 | [] | no_license | # Enter your code for "Optimus SUBlime" here.
#!/usr/bin/python3
ingredients_file = [line.rstrip() for line in open("preferences.txt").readlines()]
ingredients_score = {}
sandwiches = [line.rstrip() for line in open("sandwiches.txt").readlines()]
sandwiches_scores = {}
for ingredient_score in ingredients_file:
ingr... |
Java | UTF-8 | 621 | 3.390625 | 3 | [] | no_license | package leetcode;
public class ThirdMaximumNumber {
public static void main(String[] args) {
int[] nums = { 2, 3, 2, 1 };
Integer max = null;
Integer smax = null;
Integer tmax = null;
for (Integer num : nums) {
if (num.equals(max) || num.equals(smax) || num.equals(tmax))
continue;
if (max == null... |
Go | UTF-8 | 4,081 | 2.65625 | 3 | [] | no_license | package main
import (
"flag"
"log"
"strconv"
"fmt"
"net/http"
//"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/console"
"mywallet"
)
var (
gethAddr string
keyDir string
keyFile string
)
const ethToWei = 1 << 17
func init() {
flag.StringVar(&gethAddr, "g", "http://localhos... |
Shell | UTF-8 | 11,309 | 2.609375 | 3 | [] | no_license | #!/bin/bash
NEVENTS=$1
RANDOM_SEED=$2
OUTDIR=$3
GRIDPACK_PATH=$PWD
# GRIDPACK_PATH=/home/users/ana/gridpacks
PROCESS="SMS-TChiHH_4b_mChi-400"
MODEL="# model SMS-TChiHH_4b_400_1"
TAG=""
CHI_DECAY=\
"DECAY 1000023 1.00000000E+00 # Chi_20 decays
1.00000000E+00 2 1000022 25
DECAY 1000025 ... |
C++ | UTF-8 | 1,119 | 2.546875 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: student1.h
* Author: hzq
*
* Created on January 26, 2021, 10:29 PM
*/
#ifndef STUDENT1_H
#define STUDENT1_H
#prag... |
Java | UTF-8 | 4,064 | 2.296875 | 2 | [] | no_license | package com.rarm.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transien... |
C | UTF-8 | 286 | 2.859375 | 3 | [] | no_license | /*
* @Description: union
* @Version:
* @Author: liu
* @Date: 2020-05-08 15:17:41
*/
#include <stdio.h>
union Data{
int i;
float f;
char str[20];
} data;
int main(){
union Data data;
printf("Memory size occupied by data:%d\n", sizeof(data));
return 0;
}
|
Markdown | UTF-8 | 2,448 | 2.65625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Interpretable Parallel Recurrent Neural Networks with Convolutional Attentions for Multi-Modality Activity Modeling"
date: 2018-05-17 02:43:02
categories: arXiv_AI
tags: arXiv_AI Salient Attention CNN RNN Relation Recognition
author: Kaixuan Chen, Lina Yao, Xianzhi Wang, Dalin Zhang, Tao Gu, Zh... |
Java | UTF-8 | 1,659 | 2.625 | 3 | [] | no_license | package com.nagarro.employeemanagement.model;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* model class for Employee
* @author akshatBhawsar
*
*/
public class Employee {
private int employeeCode;
private String name;
private String birthDate;
p... |
Python | UTF-8 | 1,321 | 2.71875 | 3 | [] | no_license | import arcpy
inPointFeatures = "ZeleznicniStanice"
inRaster = "dem"
output_path = "C:\\"
arcpy.CheckOutExtension("3D")
# Adds a column with Z value reading from dem raster
arcpy.AddSurfaceInformation_3d(inPointFeatures, inRaster, "Z")
# Find FID of the row with maximum Z value
fidMax = arcpy.SearchCursor(inPointFeat... |
Markdown | UTF-8 | 2,218 | 3.03125 | 3 | [
"MIT"
] | permissive | # Specifications for the Sinatra Assessment
Specs:
- [x] Use Sinatra to build the app: I required the Sinatra library and used methods such as get and post to transform this Ruby application into an application that can respond to HTTP requests.
- [x] Use ActiveRecord for storing information in a database: I used Act... |
Python | UTF-8 | 385 | 2.9375 | 3 | [] | no_license | def find_uniq(arr):
element_one = arr[0]
element_two = arr[1]
if element_one == element_two:
gg = set(arr)
gg.discard(element_one)
result = list(gg)
return result[0]
elif element_one == arr[2]:
return element_two
elif element_two == arr[2]:
return elem... |
PHP | UTF-8 | 934 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCustomerLedgersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custome... |
TypeScript | UTF-8 | 5,999 | 2.578125 | 3 | [
"MIT"
] | permissive | /* eslint-disable @typescript-eslint/ban-ts-comment */
import type { Family, Marriage, NPC, RaceName, Town } from '@lib'
import { getChildSurname, getParentSurnames } from './getSurnames'
import { getChildAge, getParentAge, getPartnerAge, getRelativeBase, siblingRoll } from './familyUtils'
import { setAsPartners } from... |
Markdown | UTF-8 | 6,006 | 3.046875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Trading Introduction"
excerpt: ""
categories: finance
tags: [finance]
comments: true
share: true
author: chungyu
---
> mainly from
All markets have
* Buyers - (Demand)
* Sellers - (Supply)
**Market price**: the best price at which both buyers and sellers are happy to transact
# Supply and d... |
PHP | UTF-8 | 1,485 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRepresentativesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('represe... |
C# | UTF-8 | 874 | 3.015625 | 3 | [] | no_license | using System;
using System.Windows.Data;
namespace GroundRunning.GUI.Converters
{
public class BooleanToVisabilityConverter : IValueConverter
{
public bool Invert { get; set; }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
... |
JavaScript | UTF-8 | 3,753 | 3.015625 | 3 | [] | no_license | const formattedTime = require('./formatted-time');
const app = ({numWords, ngramLength, ngram, inputValue, hash, words, remainingTime, originalTime, win, lose, editingSettings}) => {
const showMinutes = originalTime / 60 >= 1;
return (
h1(numWords, ngram, lose || win) +
form(inputValue, remaini... |
C++ | UTF-8 | 201 | 2.828125 | 3 | [] | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b;
cout<<"Enter the value of a and b : \n";
cin>>a>>b;
cout<<"gcd("<<a<<","<<b<<") = "<<__gcd(a,b)<<"\n";
}
|
C | UTF-8 | 565 | 2.640625 | 3 | [] | no_license | #include <stdio.h>
void normal(int vi, long vl, float vf, double vd, char *vs)
{
printf("normal(%d, %ld, %.2f, %.2lf, %s\n", vi, vl, vf, vd, vs);
return;
}
__declspec(naked) void naked(int vi, long vl, float vf, double vd, char *vs)
{
printf("naked(%d, %ld, %.2f, %.2lf, %s\n", vi, vl, vf, vd, v... |
C++ | UTF-8 | 1,493 | 2.703125 | 3 | [
"MIT"
] | permissive | #pragma once
#include <Python.h> // has to be the first included header
#include <array>
#include "control/types.h"
#include "function_space/00_function_space_base_dim.h"
#include "mesh/mesh.h"
namespace FunctionSpace
{
/** This class adds the basis function to the mesh.
* The basis function can be accessed by p... |
Markdown | UTF-8 | 2,396 | 2.515625 | 3 | [] | no_license | ---
title: A Postscript for StyleGAN Mapping Network Geometry Visualization
tags:
- deep_learning
- stylegan
date: 2020-04-25 11:52:06
---
<figure>
<picture>
{% img figure /images/stylegan-mapping-sampling-pca.png 400 '"" "StyleGAN mapping sampling points visualization by embedding projector"' %}
</picture>
... |
Python | UTF-8 | 2,575 | 2.625 | 3 | [] | no_license | #!/usr/bin/python
# uses postgres NACmgr's database
# connects globally and with an import statement
# load this library from yum update (python-psycopg2)
import psycopg2
con=psycopg2.connect("dbname=myDB user=U33 password=abc123")
def commit():
con.commit()
def close_db():
con.commit()
co... |
Java | UTF-8 | 8,165 | 2.28125 | 2 | [] | no_license | package isden.mois.magellanlauncher;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.preference.Preferen... |
C | UTF-8 | 29,895 | 2.6875 | 3 | [] | no_license | /* this is the new fillM 10/92 */
#include "induct.h"
// Enrico
#include <string.h>
/* this fills the kircoff's voltage law matrix (Mesh matrix) */
/* it maps a matrix of mesh currents to branch currents */
/* it might actually be what some think of as the transpose of M */
/* Here, M*Im = Ib where Im are the mes... |
Java | UTF-8 | 1,553 | 1.992188 | 2 | [
"Apache-2.0"
] | permissive | package itx.ssh.server.commands.subsystem;
import itx.ssh.server.commands.CommandProcessor;
import itx.ssh.server.commands.keymaps.KeyMap;
import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.server.command.Command;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SshClientNamedComm... |
Java | UTF-8 | 503 | 2.390625 | 2 | [] | no_license | package model.services;
import java.util.List;
import model.dao.DaoDepartment;
import model.dao.DaoFactory;
import model.entities.Department;
public class DepartmentService {
private DaoDepartment dao = DaoFactory.createDepartmentDao();
public List<Department> findAll(){
return dao.findAll();
}
public voi... |
Python | UTF-8 | 501 | 2.578125 | 3 | [] | no_license | import random
for i in range(1, 21):
zero = ''
if( i < 10 ):
zero = '0'
filename = zero + str(i) + '.in'
filename2 = zero + str(i) + '.out'
filename3 = 'input' + zero + str(i) + '.txt'
filename4 = 'output' + zero + str(i) + '.txt'
test = open(filename, "r")
test2 =... |
Python | UTF-8 | 4,198 | 3.53125 | 4 | [] | no_license | import random
# Population count, mutation rate and replacement rate
POPULATION_COUNT = 40
MUTATION_RATE = 20
REPLACEMENT_RATE = 0.25
# Population, the fitnesses and the optimum
population = [""]*POPULATION_COUNT
populationFitness = [int]*POPULATION_COUNT
newPopulation = []
optimum = 213
optimumString = '{0:08b}'.f... |
Java | UTF-8 | 286 | 1.921875 | 2 | [] | no_license | package com.byelken.auto.carpark.exception;
/**
* @author Berkay.Yelken
*/
public class RestControllerException extends Exception
{
private static final long serialVersionUID = 4376295161602011919L;
public RestControllerException(String msg)
{
super(msg);
}
}
|
Markdown | UTF-8 | 1,548 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | # Packages
소스 파일은 package로 시작해야 합니다.
만약 package에 대한 명시가 없다면 default 패키지로 속해집니다.
```
package org.example
fun printMessage() { /*...*/ }
class Message { /*...*/ }
// ...
```
위 코드와 같이 구성할 경우 `printMessage()`의 전체 이름은 `org.example.printMessage`이 됩니다.
`Message` 또한 전체 이름은 `org.example.Message`이 됩니다.
## Default Import... |
Rust | UTF-8 | 1,611 | 3.203125 | 3 | [
"MIT"
] | permissive | use std::io;
use std::io::prelude::*;
use std::fs::File;
fn execute_program(program: &mut Vec<i32>) -> i32 {
let mut curr_index = 0;
while program[curr_index] != 99 {
let target_index = program[curr_index + 3] as usize;
let a_index = program[curr_index + 1] as usize;
let b_index = progr... |
Markdown | UTF-8 | 9,752 | 2.59375 | 3 | [
"MIT"
] | permissive | # Supported Components
## Component Wrappers
Bundling components is provided through the variadic component wrappers. It is recommended to use these wrappers in all instances.
| C++ (object) | C (enum) | Python (enum) |
| ---------------------------------- | -------- | ------------- |
| **`comp... |
Markdown | UTF-8 | 4,774 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | English | [简体中文](./CONTRIBUTING_cn.md)
# Contribute Code
You encourage and appreciate researchers and developers to contribute to project **PaddleViT**.
To contribute to PaddlePaddle, you have to agree with the [PaddleViT Contributor License Agreement](https://cla-assistant.io/BR-IDL/PaddleViT).
This document expla... |
Ruby | UTF-8 | 576 | 2.515625 | 3 | [
"MIT"
] | permissive | module Steam
# A Ruby DSL for communicating with the Steam Web API.
# @see https://developer.valvesoftware.com/wiki/Steam_Web_API
# @since 1.0.0
module Store
# Get App Details
# @param String appid The UUID of the Steam Application
# @see https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAP... |
Ruby | UTF-8 | 2,424 | 3.40625 | 3 | [] | no_license | require_relative '../models/year'
require_relative '../models/calendar_entry_store'
require_relative '../models/formatters/console'
require 'date'
##
# Renders the supplied year class. Each month will be 20
# chars wide. (2 digits * 7 + spacing between each column)
# Header will be 86 characters wide (4 months + 2 cha... |
C++ | UTF-8 | 793 | 3.609375 | 4 | [
"MIT"
] | permissive | #pragma once
#include <vector>
template <typename T>
struct vector2D final : public std::vector<std::vector<T>>
{
void resize(const size_t M, const size_t N)
{
std::vector<std::vector<T>>::resize(M);
for (auto& row : *this)
{
row.resize(N);
}
}
void fillRow(const size_t rowIndex, const... |
Ruby | UTF-8 | 925 | 3.15625 | 3 | [] | no_license | require "spec_helper"
RSpec.describe ABC::Url do
let(:alphabet) { "abc123" } # base=6
describe ".encode" do
def encode(key)
described_class.encode(key, alphabet: alphabet)
end
it "is able to shorten keys shorter than the target base" do
key = 2
expect(encode(key)).to eq "c" # alphab... |
JavaScript | UTF-8 | 1,561 | 2.625 | 3 | [
"MIT"
] | permissive | 'use strict';
let fs = require('fs');
module.exports = function(Container) {
Container.getFileContent = function(container, file, cb = null) {
let path = 'storage/images/' + container + '/' + file;
let mimeType = 'image/' + file.slice(file.lastIndexOf('.') + 1);
// fs.open(path, 'r', (err, fd) => {
... |
Markdown | UTF-8 | 653 | 2.640625 | 3 | [] | no_license | # pocket-soccer
Pocket Soccer game for Android (Programming Mobile Devices course project)
Single and multi player, ball collision game.
Similar (almost the same) to existing game https://www.youtube.com/watch?v=EyIrFRoJNto.
### Here you can see visualization of:
#### Gameplay
;
if (isset($_POST['submit_signup'])) {
$fname = mysqli_real_escape_string($conn, $_POST['fname']);
$username = mysqli_real_escape_string($conn, $_POST['username']);
$password = mysqli_real_escape_string($conn, $_POST['pass'])... |
Markdown | UTF-8 | 1,300 | 3.078125 | 3 | [
"LicenseRef-scancode-free-unknown",
"ISC"
] | permissive | # Localization
This document describes how to add support for a new language in EEG 101.
## 1. Translate the content
Add a new column to `/localization/translation_text.csv` for the language you are translating to (the use of a spreadsheet editor such as LibreOffice Calc or Excel is recommended).
Then, translate ea... |
Java | UTF-8 | 438 | 2.15625 | 2 | [] | no_license | package com.loohos.factoryinspection.model.formbean;
public class PlantPit extends BaseFormBean{
private String plantId;
private String pitId;
public String getPlantId() {
return plantId;
}
public void setPlantId(String plantId) {
this.plantId = plantId;
}
public String g... |
Java | UTF-8 | 1,652 | 2.59375 | 3 | [] | no_license | package com.javalec.ex.dto;
import java.sql.Timestamp;
public class DeliveryDto {
private int rownum; //DB에서 가져오는 rownum
private int d_id; //배송고유번호
private int ol_order_num; //주문번호
private String d_status; //배송상태
private Timestamp d_end_date; //배송완료날짜
private String d_com; //택배사
private ... |
Python | UTF-8 | 262 | 2.84375 | 3 | [] | no_license | # A = [1, 3, 6, 4, 1, 2]
A = [1,2,3]
# A = [-1, -3]
def solution(A):
m = max(A)
if m < 1:
return 1
A = set(A)
B = set(range(1, m + 1))
D = B - A
if len(D) == 0:
return m + 1
else:
return min(D)
solution(A) |
Shell | UTF-8 | 333 | 3.296875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
# TODO (akegalj): use `tmux kill-session -t seassion-name` instead
# Make sure we're in a tmux session.
if ! [ -n "$TMUX" ]; then
echo "There's no tmux session, so you cannot kill demo."
exit 1
fi
tmux list-windows | \grep demo | awk -F ':' '{ print $1 }' | while read i
do
tmux kill-window ... |
Python | UTF-8 | 3,010 | 2.921875 | 3 | [] | no_license | import PySimpleGUI as sg
from time import sleep
import datetime
import schedule
import json
from requests_oauthlib import OAuth1Session #OAuthライブラリの読み込み
import feedparser
update_url = "https://api.twitter.com/1.1/statuses/update.json" #ツイートポストエンドポイント
RSS_URL = ''
# Option設定とLayout
sg.theme('Dark Tea... |
Markdown | UTF-8 | 695 | 2.921875 | 3 | [] | no_license | ## jfaker - Fake Data Generator for Java
Based on the [Faker.js](https://github.com/Marak/Faker.js/) library.
## Usage
```java
JFaker faker = new JFaker();
faker.Name.findName();
faker.Lorem.words(10);
```
## API
* Name
* firstName
* lastName
* findName
* Address
* zipCode
* zipCodeFormat
* city
* streetNam... |
Python | UTF-8 | 2,959 | 2.859375 | 3 | [] | no_license |
import pandas as pd
from pandas import DataFrame
df_golf = DataFrame.from_csv(r"C:\Users\Administrator\PycharmProjects\candidateelimination\golf.csv")
print(df_golf)
attribute_names = list(df_golf.columns)
print("List of Attributes:", attribute_names)
attribute_names.remove('label')
print("Predicting Attri... |
C# | UTF-8 | 1,299 | 2.546875 | 3 | [] | no_license | using System;
using System.Diagnostics;
using System.Web;
using Rieltor.Models;
using System.Web.UI;
using System.Collections.Generic;
namespace Rieltor
{
public class PerfomanceCounterModule : IHttpModule
{
/// <summary>
/// You will need to configure this module in the Web.config file of you... |
Python | UTF-8 | 2,801 | 2.71875 | 3 | [] | no_license | from operations.multiplicationMatrix import MultiplicationMatrix
from enumTypes.LootsTypes import LootsTypes
from enumTypes.EnterMatrixStates import EnterStates
from ctypes import c_double, c_int, cdll, POINTER
from os import path
class MultiplicationMatrixCpp(MultiplicationMatrix):
def __init__(self, mat... |
Java | UTF-8 | 126 | 2.171875 | 2 | [] | no_license | package Action;
public class SequentialScheduler extends Scheduler {
@Override
protected int nextAction() {return 0 ;}
}
|
C++ | UTF-8 | 1,814 | 4.125 | 4 | [] | no_license | /*
Given two arrays, write a function to compute their intersection.
Example:
Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].
Note:
Each element in the result must be unique.
The result can be in any order.
*/
// Approach 1, sort one array and binary search each element of second array in the first
class Sol... |
C++ | UTF-8 | 5,418 | 2.640625 | 3 | [
"MIT"
] | permissive | // ==================================================
//
// Author: GIFTED-BOY
// Email: 120138380@qq.com
// Create Time: 2018.4.21
// Version: v1.0
//
// ==================================================
#include "NaiveBayes.h"
#include <unordered_set>
#include <algorithm>
#include <math.h>
#include <fstream>
#inclu... |
Python | UTF-8 | 888 | 4.0625 | 4 | [] | no_license | def formula_gral(c, b=1, a=1):
"""Funcion para calcular los valores de X de una ecuacion de 2do grado.
a (X^2) y b(X) por defecto son 1"""
r= (b**2 - 4*a*c)**(1/2)
# En una ecuacion de 2do grado X tiene 2 valores
return (-b+r)/(2*a), (-b-r)/(2*a)
if __name__ == '__main__':
a, b, c = input().split(... |
Python | UTF-8 | 638 | 3.03125 | 3 | [] | no_license | from PhoneBook import PhoneBook
from PhoneBookContact import PhoneBookContact
import random
# Genera 'limit' cantidad de contactos y los inserta en 'agenda'
def generarAgenda(agenda, limit = 100):
names = ["lorenza", "amalia", "daniela", "pedro", "luis", "jose"]
lastname = ["perez", "sarda", "rodriguez", "sanchez... |
C# | UTF-8 | 604 | 3.78125 | 4 | [] | no_license | using System;
class Student : Human
{
private int grade;
public int Grade
{
get { return this.grade; }
set
{
if (value > 6 || value < 2)
{
throw new ArgumentOutOfRangeException("The grade must be between 2 and 6");
}
... |
Java | UTF-8 | 1,691 | 2.375 | 2 | [
"Apache-2.0"
] | permissive | package com.lechance.android.journal;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.lechance.android.journal.db.DBConstants;
import com.lechance.android.journal.db.DBHelper;
import android.app.Activity;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDataba... |
Markdown | UTF-8 | 5,545 | 2.609375 | 3 | [] | no_license | # Design Document Template
Authors:
- Cetera Clemente s257234
- Borgone Roberto s267571
- Cefalo Domenico s267569
- Miro Filomeno Davide s256870
Date:
- 4/06/2019
Version:
- 3.0.0
# Contents
- [Package diagram](#package-diagram)
- [Class diagram](#class-diagram)
- [Verification traceability matrix](#verification... |
Java | UTF-8 | 2,891 | 2.703125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package searchRT.utils;
import java.io.* ;
import java.util.Hashtable ;
/**
*
* @author Frank
* uses a log file Index... |
Rust | UTF-8 | 8,804 | 2.96875 | 3 | [] | no_license |
//! Reading and editing cargo manifest files.
use std::{
path::{Path, PathBuf},
cell::RefCell,
fs::{self, read_to_string},
iter::FromIterator,
fmt::{self, Debug, Formatter},
str::FromStr,
};
use toml_edit::{
Document,
Item, Value, Key,
};
use failure::{Error, format_err};
/// Allows r... |
Shell | UTF-8 | 174 | 2.546875 | 3 | [] | no_license | #!/usr/bin/env bash
while read ip
do name=$(echo $ip|cut -f 1 -d ',')
arr=$(echo $ip|cut -f 2 -d ' ')
shodan2 host $arr -O ./results/shodan/$name
done < ./input/ipaddr.txt
|
Markdown | UTF-8 | 1,052 | 2.8125 | 3 | [
"MIT"
] | permissive | # explainX
explainX.ai helps data scientists understand, explain and validate any machine learning model - in just one line of code. Checkout explainx.ai to learn more.
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.
```bash
pip install explainx``
## Usage
#Import the li... |
C | UTF-8 | 2,192 | 2.84375 | 3 | [] | no_license | ////////////////////////////////////////////////////////////////////////////////
// File Name : LED_thread.c
// Description : Example of an OS thread that toggles the board LED's
// based on a 1 second interrupt from TIM3
// Author : Harsh Aurora
// Modified by : Andrei Chubarau
// Date ... |
PHP | UTF-8 | 712 | 2.5625 | 3 | [] | no_license | <?php
require "credentials.php";
require "authenticate.php";
$conn = mysqli_connect($servername, $username, $password, $dbname);
$id = $_POST['id'];
$action = $_POST['action'];
if($action=='vote_up') //voting up
{
$sql = "UPDATE exercicio SET Positivos = Positivos+1 WHERE ID_Exercicio=".$id;
}... |
Java | UTF-8 | 718 | 1.945313 | 2 | [] | no_license | package org.nuaa.wa.waelder.repository;
import org.nuaa.wa.waelder.entity.SysAlarmEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
* @Name: SysAlarmRepository
* @Description: TODO
* @Author: tomax
* @Date: 2019-... |
Java | UTF-8 | 568 | 3.8125 | 4 | [
"MIT"
] | permissive | package com.isaac.leetcodes201_300;
/**
* Given an integer, write a function to determine if it is a power of two.
*
* Tags: Math, Bit Manipulation.
*
* @author ZHANG HAO
*
* Explain: 转换为binary string形式判断。
*
*/
public class LeetCode_231_Power_of_Two {
public static void main(String[] args) {
}
p... |
Java | UTF-8 | 2,600 | 2.0625 | 2 | [] | no_license | package jwtlogin.security.config;
import jwtlogin.security.JWTAuthenticationFilter;
import jwtlogin.security.JWTLoginFilter;
import jwtlogin.service.UsuarioService;
import lombok.AllArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ... |
Python | UTF-8 | 419 | 3.5625 | 4 | [] | no_license | # This program shows how regex can be used reading through file
import re
class Readfile(object):
def openfile(self):
file = input("Enter the File to be read : ")
openitem = open(file, 'r')
readitem = openitem.read()
# print(openitem.read())
matches = re.findall(r'\d{1}'... |
JavaScript | UTF-8 | 5,921 | 3 | 3 | [] | no_license | function Slider(wrapperID, settings) {
let params = {
counter: false,
autoplay: true,
autoplaySpeed: 3000,
infinite: true,
slideToShow: 1,
};
const elementCount = document.querySelectorAll(`${wrapperID} .slider__item`).length; //колличество слайдов
let endCount =... |
Java | UTF-8 | 4,003 | 2.5625 | 3 | [] | no_license | package airline.services;
import airline.model.Airplane;
import airline.model.Flight;
import airline.model.Seat;
import airline.model.TravelClass;
import airline.viewModels.FlightSearchCriteria;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.time.LocalDate;
import java.util.Array... |
C# | UTF-8 | 1,413 | 2.515625 | 3 | [] | no_license | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using usercontrolwithdatabinding.Model;
namespace usercontrolwithdatabinding_test
{
[TestClass]
public class CustomerTest
{
[TestMethod]
public void TestTitleError()
{
var cust=new Customer();... |
Python | UTF-8 | 776 | 2.609375 | 3 | [] | no_license | import socket
from multiprocessing import Pool,cpu_count
from multiprocessing.pool import ThreadPool
server = socket.socket()
server.bind(('',5678))
server.listen(1000)
## 线程池
def work_thread(conn):
while True:
recv_data = conn.recv(1000)
if recv_data:
print(recv_data)
... |
Python | UTF-8 | 3,543 | 2.546875 | 3 | [] | no_license | #!/usr/bin/env python3
from collections import ChainMap
import jq
import json
import urllib.request
BCD_URL = "https://api.better-call.dev/v1"
NETWORK = "edo2net"
def admin_account(endpoint):
import pytezos
return pytezos.pytezos.using(
key=pytezos.Key.from_encoded_key(config['Tezos']['privkey']),
... |
Markdown | UTF-8 | 7,174 | 2.71875 | 3 | [] | no_license | # Architectural Decision Records
An [Architectural Decision (AD)](https://en.wikipedia.org/wiki/Architectural_decision) is a software design choice that addresses a functional or non-functional requirement that is architecturally significant.
An [Architecturally Significant Requirement (ASR)](https://en.wikipedia.org... |
C++ | UTF-8 | 1,755 | 2.96875 | 3 | [] | no_license | /** @file
* @brief Declaration of class IDualInputFilter.
*
* @author Jan Bobek
* @since 19th April 2015
*/
#ifndef FILTERS__IDUAL_INPUT_FILTER_HXX__INCL__
#define FILTERS__IDUAL_INPUT_FILTER_HXX__INCL__
#include "IImageFilter.hxx"
/**
* @brief Interface of a filter with two inputs.
*
* @author Jan Bobek
*/... |
C | UTF-8 | 4,269 | 2.84375 | 3 | [] | no_license | /**
* @file ght_core_util.c
* @brief Utility function definitions for Hash Table Library
*
* This contains the Utility function definitions for Hash Table Library
*
* @author Tony Josi https://tonyjosi97.github.io/profile/
* @copyright Copyright (C) 2020 Tony Josi
* @bug No k... |
Python | UTF-8 | 506 | 3.015625 | 3 | [] | no_license | def ctz(x):
return 0 if x&1 else ctz(x>>1)+1
def clz(x):
return len(bin(x))-3
def ok(a, b):
p=0
for i in range(40, -1, -1):
p+=a[i]-a[i+1]-b[i]
if p<0:
return False
return True
a=[0]*50
b=a[:]
c=[]
input()
for x in map(int, input().split()):
if x==(x&-x):
a[ctz(x)]+=1
else:
b[clz(x)]+=1
while a[0... |
Java | UTF-8 | 730 | 2.484375 | 2 | [] | no_license | package erg_7;
public class Synedria {
private ProgrammataGym progGr;
private String time;
private String hmera;
public Synedria(ProgrammataGym progGr, String time, String hmera) {
this.progGr = progGr;
this.time = time;
this.hmera = hmera;
}
//methods
public Stri... |
Java | UTF-8 | 1,204 | 2.140625 | 2 | [] | no_license | package com.wyc.api;
import com.wyc.common.domain.Person;
import com.wyc.common.dto.PersonDto;
import com.wyc.common.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestCo... |
SQL | UTF-8 | 9,321 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 21, 2020 at 06:42 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
C++ | UTF-8 | 331 | 2.796875 | 3 | [] | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
sort(arr,arr+n);
for(int i=1;i<n-1;i=i+2){
swap(arr[i],arr[i+1]);
}
for(auto it :arr){
cout<<it<<" ";
}
r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.