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 | 1,493 | 1.828125 | 2 | [] | no_license | // isComment
package com.codebutler.farebot.transit.opal;
import android.content.res.Resources;
import android.support.annotation.NonNull;
import com.codebutler.farebot.transit.Subscription;
import com.google.auto.value.AutoValue;
import java.util.Date;
/**
* isComment
*/
@AutoValue
abstract class isClassOrIsInterf... |
Python | UTF-8 | 3,292 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | from mechsearch.graph import GraphMultiset, Graph
import mod
from typing import Dict, Optional
from numpy import ndarray
class State:
def __init__(self, graph_multiset: GraphMultiset):
self._graph_multiset: GraphMultiset = graph_multiset
self._key: int = hash(self._graph_multiset)
def __eq__... |
Java | UTF-8 | 4,222 | 2.328125 | 2 | [] | no_license | package com.example.itwaretestapp;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.Li... |
Ruby | UTF-8 | 1,807 | 2.671875 | 3 | [] | no_license | #!/usr/bin/env ruby
require 'autojenkins'
URL='http://jenkins.ng.com:8080'
AUTH=["neurogeek", "123qwe4r!!"]
#TOKEN=""
if URL == ''
puts "To use this functions, please configure URL and AUTH"
end
JENK = AutoJenkins::Jenkins.new(URL, AUTH)
def ListAll()
jobs = JENK.all_jobs()
if jobs
jobs.each do... |
Java | UTF-8 | 285 | 3.0625 | 3 | [] | no_license | package Problem102;
public class Point
{
public int x, y, z;
public Point(int abscissa, int ordinate, int azimuth)
{
this.x = abscissa;
this.y = ordinate;
this.z = azimuth;
}
public String toString()
{
return "(" + this.x + "," + this.y + "," + this.z + ")";
}
}
|
Markdown | UTF-8 | 4,068 | 2.703125 | 3 | [] | no_license | 每个内存的使用都需要申请
循环中的结构体等局部变量,内存会被清除,留给下一个使用
maps.begin maps.end it->first it->second
1012 临时变量、map中添加的value、数组中的元素,指针不同。
栈内存由OS动态开辟回收,我们malloc的内存时是在堆中,需要我们手动释放,否则就会内存泄露。
[2020-02-13 12:24:39] memset(*n,1|0,sizeof(type)*len)
[2020-02-13 03:52:07] 并查集:将有关系的结点组成一个集合
[2020-02-13 04:16:59] 在对问题进行建模的时候,我们应该尽量想清楚需要... |
Java | UTF-8 | 11,878 | 2.828125 | 3 | [] | no_license | import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.text.DecimalFormat;
//Author: Victor Chung
//This class itself is "almost" self-contained. Unlike other classes in the program, the function call in this
//class is not as spiral-like.
//I personally think ... |
Java | UTF-8 | 1,388 | 1.976563 | 2 | [] | no_license | package com.facebook.graphql.model;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class NotificationStoriesDelta$NotificationStoryDeltaEdge
implements Parcelable
{
public static final Parcelable.Creator<No... |
Java | UTF-8 | 5,461 | 2.296875 | 2 | [] | no_license | package com.cognizant.Dao;
import java.math.BigDecimal;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.a... |
Python | UTF-8 | 1,609 | 3.5625 | 4 | [] | no_license | #
# @lc app=leetcode.cn id=1260 lang=python3
#
# [1260] 一年中的第几天
#
# https://leetcode-cn.com/problems/shift-2d-grid/description/
#
# algorithms
# Easy (60.54%)
# Total Accepted: 7.9K
# Total Submissions: 13.1K
# Testcase Example: '[[1,2,3],[4,5,6],[7,8,9]]\n1'
#
# 给你一个 m 行 n 列的二维网格 grid 和一个整数 k。你需要将 grid 迁移 k 次。
#
... |
Markdown | UTF-8 | 3,679 | 2.703125 | 3 | [] | no_license | Puppet Labs - Puppet Fundamental Training
=========================================
September 18, 2012 - taught by Zack Smith (zack@puppetlabs.com)
Introduction
------------
* Puppet advantage in level of detailed simulation versus other solutions
* Facts - pieces of inventoried data (custom pieces of information) th... |
PHP | UTF-8 | 10,666 | 2.640625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['userID'])){
header('Location:../index.php');
exit;
}
ini_set('date.timezone','Asia/Shanghai');
header("Content-type:text/html;charset=utf-8");
//$type=1;
//$name="Excel导入";
//$excelfilename='ImportExcel\\2016.xls';
if(isset($_POST['type']))
{
$type=$_POST["t... |
C++ | UTF-8 | 617 | 2.515625 | 3 | [] | no_license | #include <Wire.h>
#include <LSM6.h>
#include "compl_filter.h"
LSM6 imu;
char report[150];
void setup()
{
Serial.begin(9600);
Wire.begin();
if (!imu.init())
{
Serial.println("Failed to detect and initialize IMU!");
while (1);
}
imu.enableDefault();
}
void loop()
{
int16_t x, y, z;
compl_fi... |
TypeScript | UTF-8 | 615 | 3.03125 | 3 | [] | no_license | // -------------define.d.ts----------------------
interface CodeGenOpt {
className: string;
properties: Property[];
}
interface Property {
name: string,
optional: boolean,
type: PBType
}
//-------------ClientCodeTemplate.ts-------------------------
export function getCode(opt: CodeGenOpt) {
... |
C++ | UTF-8 | 10,395 | 3.078125 | 3 | [] | no_license | /*
* Maze Explorer for the Arduino Game Console
* https://www.gameinstance.com/post/51/Maze-Explorer-game
*
* GameInstance.com
* 2017
*/
#include <GameConsole.h>
struct Point {
unsigned char m_x, m_y;
void Init(unsigned char x, unsigned char y) {
//
m_x = x;
m_y = y;
}
};
struct Maze {
... |
Shell | UTF-8 | 1,301 | 2.59375 | 3 | [] | no_license | #!/bin/bash
TEST_FILE=./data/test_data_1.txt
cp ./data/training_data_1.txt ./data/train_data
INPUT_FILE=./data/train_data
sed '1d' $TEST_FILE | awk -F "\t" '{print $3}' > ./data/test_feature
sed '1d' $TEST_FILE | awk '{print $1}' | sed 's/True/1/;s/False/0/' > ./data/test_label
n=`python src/findmax_N.py ./data/trai... |
Java | UTF-8 | 808 | 1.835938 | 2 | [] | no_license | package com.livegoods.recommendation.controller;
import com.livegoods.commons.pojo.Result;
import com.livegoods.pojo.Items;
import com.livegoods.recommendation.service.RecommendationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
impor... |
Go | UTF-8 | 410 | 2.828125 | 3 | [
"MIT"
] | permissive | package battery
type DeviceChemistry byte
const (
Other DeviceChemistry = 1 << iota
Unknown
LeadAcid
NickelCadmium
NickelMetalHydride
LithiumIon
ZincAir
LithiumPolymer
)
func (d DeviceChemistry) String() string {
factors := [...]string{
"Other",
"Unknown",
"Lead Acid",
"Nickel Cadmium",
"Nickel me... |
Java | ISO-8859-10 | 627 | 2.8125 | 3 | [] | no_license |
/**
* Esta es la clase principal del programa, esta es la que se debe ejecutar.
*
* @author Santiago Avendao y Samuel Cadavid
* @version 11 de noviembre de 2017
*/
import java.util.Scanner;
import java.io.*;
public class Principal
{
public static void main(String [] args) throws Exception {
String n... |
Markdown | UTF-8 | 913 | 2.59375 | 3 | [
"MIT"
] | permissive | amd-help(1) -- display the manpage for an amd command
=====================================================
SYNOPSIS
--------
`amd help` <command>
DESCRIPTION
-----------
`amd help` is a fallback to access the manpages when they have not been linked
properly. It is also a godsend for people who enjoy remembering ... |
Java | UTF-8 | 635 | 3.515625 | 4 | [] | no_license | package by.epam.course.cycles;
/*Составить таблицу значений функции y = 5 - x2 /2 на отрезке [-5; 5] с шагом 0.5. */
public class CyclesTask13 {
public static void solution() {
double a;// начальная точка отрезка
double b;// конечная точка отрезка
double h;// шаг
double y;
a = -9;
b = 6;
... |
Java | UTF-8 | 320 | 1.84375 | 2 | [] | no_license | package com.mygdx.xo;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Screen;
import view.GameScreen;
public class MyGdxGame extends Game {
private Screen gameScreen;
@Override
public void create() {
gameScreen = new GameScreen();
setScreen(gameScreen);
}
}
|
Markdown | UTF-8 | 3,289 | 2.96875 | 3 | [] | no_license | # Stream Handler

Quiver stream handler is designed following the Unix Philosophy. Unix process is well known for their extensibility through the uniform stream interfaces `STDIN`, `STDOUT`, and `STDERR`. Similarly stream handler is designed to have uniform interface acr... |
Java | UTF-8 | 1,255 | 1.945313 | 2 | [] | no_license | /*
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.glass.events;
import java.lang.annotation.Native;
public class MouseEvent {
@Nativ... |
Python | UTF-8 | 36,672 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | """ Classes for loading raw graph"""
import os
import csv
import numpy as np
# TODO(xiangsx): Framework agnostic later
import torch as th
import dgl
from dgl.data import save_graphs, load_graphs
from .utils import save_info, load_info
from .utils import field2idx, get_id
from .csv_feature_loader import NodeFeatureLoa... |
Java | UTF-8 | 1,929 | 2.625 | 3 | [] | no_license | package au.gov.vic.ecodev.mrt.rest.service.template.helper.headers;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
@Compon... |
Java | GB18030 | 6,033 | 4.15625 | 4 | [] | no_license | -------------day01----------------
1:ѧjava
2:ñʼ
: javaеĶʵ.
-------------------------------------------
1:
---(ִ)---> Ҹô
----(ָ)--> Ҹ ĸ
: arr (С)
:Ҫһʵִ
for(){
for(){
}
}
: ûĸԶ---> Arrays
Arrsys.sort(arr);
ע:ҪûҪĶ ô?
ûҪĶ ---> Լд,ֻҪ벻ɾ,һξܼʹ
Լһд ----------> 뱣,´μ--... |
Markdown | UTF-8 | 1,459 | 2.6875 | 3 | [] | no_license | <p>In this integration approach, you barely have to do anything ! What we do is we provide you with a few lines of code you need to put on your website, which our mutual clients will use to login to idibu, something like you can observe on our <a href="http://www.idibu.com/wldemo/goodrecruitment/">demo page</a>:</p>
<p... |
C | UTF-8 | 2,253 | 3.375 | 3 | [] | no_license | /*
#Ad-Soyad = Huseyin Sahin
#E-posta = huseyin.sahin@ceng.ktu.edu.tr
#Proje = Isbn10 Digit Checker
*/
#include <stdio.h>
#include <stdlib.h>
int d1_hesapla(int sayi_basamaklari[9]);
long long sayilari_birlestirme(int sayi_basamaklari[9],int d1_sayisi);
int main(int argc, char* argv[])
{
int i, basamaklar[9];
... |
C++ | UTF-8 | 1,514 | 2.6875 | 3 | [
"MIT"
] | permissive | /*
SIN Toolchain
Symbol.cpp
Copyright 2019 Riley Lannon
The implementation of the Symbol struct
*/
#include "Symbol.h"
// Our Symbol object
Symbol::Symbol(std::string name, DataType type, std::string scope_name, size_t scope_level, bool defined, std::string struct_name) :
name(name),
type_information(type),
... |
PHP | UTF-8 | 2,595 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFlashcardsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
/*
* Each flashcard... |
PHP | UTF-8 | 939 | 2.84375 | 3 | [] | no_license | <?php
/**
* These classes should probably just rewrite the base class functions (i.e. logLogin, logAction, etc and the constructor should carry table names
**/
require_once dirname(__FILE__)."/log.php";
class ManagerLog extends Log{
//local class variables
protected $_loginTable;
protected $_actionTable;
... |
Python | UTF-8 | 4,824 | 3.015625 | 3 | [] | no_license | import pygame
# for clipboard saving
import win32clipboard as clip
import win32con
from io import BytesIO
from PIL import Image
pygame.font.init()
myfont = pygame.font.SysFont('Segoe UI', 18, bold=True)
COLOR_TEXT = (10, 10, 10)
COLOR_DARKER = (120, 120, 120)
COLOR_DARK = (180, 180, 180)
COLOR_LIGHT = (20... |
PHP | UTF-8 | 2,116 | 2.703125 | 3 | [] | no_license |
<!DOCTYPE HTML >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SOAP Client </title>
</head>
<body>
<div id="err" >
<?php
if(count($temp_err)>0)
{
echo '<p>Err:</p>';
foreach($temp_err as $item )
{
... |
Python | UTF-8 | 690 | 2.90625 | 3 | [] | no_license | import cv2 as cv
import numpy as np
img = cv.imread('lane0.jpg')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
edges = cv.Canny(gray, 50, 150, apertureSize=3)
lines = cv.HoughLinesP(edges, rho=1, theta=np.pi/180, threshold=100, minLineLength=150, maxLineGap=10)
'''
param:
minLineLength: số điểm tối thi... |
Java | UTF-8 | 2,002 | 2.3125 | 2 | [
"BSD-3-Clause"
] | permissive | package bsoule.tagtime;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
public class TagTime extends Application {
private final static String TAG = "TagTime";
public final st... |
Java | UTF-8 | 4,984 | 2.265625 | 2 | [] | no_license | package com.example.dibage.accountb.activity;
import android.content.Context;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.... |
Markdown | UTF-8 | 1,400 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | # GiveLivly
Final Year Project for Computer Science Students
# Requirements
**Users App Module**
- Login permissions (Login functionalities)
* Login (for administrators)
* Login (for normal people)
- Register
* Registration (for everyone)
**Client Side Main App Module**
#### Onboarding -- Selecti... |
JavaScript | UTF-8 | 13,246 | 2.84375 | 3 | [] | no_license | function World(gravity) {
this.gravity = gravity;
this.entities = {all: [], segmentGroups: []};
}
World.prototype.add = function(entity) {
entity.world = this;
this.getEntityGroup("all").push(entity);
for(var i = 0; i < entity.groups.length; ++i) {
var group = this.getEntityGroup(entity.groups[i]);
g... |
C# | UTF-8 | 1,546 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Maui.Trading.Indicators;
using Maui.Trading.Model;
namespace Maui.Trading.Modules.Calculators
{
public class SimpleMovingAverageCalculator : ISeriesCalculator
{
public SimpleMovingAverageCalculator( ... |
Java | UTF-8 | 119 | 2.328125 | 2 | [] | no_license | public class Ryu extends Fighter{
public void greet(){
System.out.println("Hello, I am Ryu!!");
}
}
|
Go | UTF-8 | 701 | 2.765625 | 3 | [] | no_license | package main
import (
"fmt"
"os"
"os/signal"
"syscall"
svc "github.com/theveloped/go-whatsapp-rest/service"
)
// Server Variable
var svr *svc.Server
// Init Function
func init() {
// Initialize Service
svc.Initialize()
// Initialize Routes
routesInit()
// Initialize Server
svr = svc.NewServer(svc.Route... |
Java | UTF-8 | 361 | 1.992188 | 2 | [] | no_license | package com.sinosoft.service;
import org.springframework.stereotype.Service;
/**
* Created by gzh on 2017/2/12 0012.
*/
@Service //将业务处理实现类 添加到Spring容器
public class GuzhonghuiServiceImpl implements GuzhonghuiService {
public String dealMsg(String msg) {
System.out.println("Hello "+msg);
retur... |
Python | UTF-8 | 875 | 3.5625 | 4 | [
"MIT"
] | permissive | # _*_ coding: utf-8 _*_
__author__ = 'Di Meng'
__date__ = '1/13/2018 7:29 PM'
import pandas as pd
import numpy as np
# init a DF
dates = pd.date_range('20130101', periods=6)
df = pd.DataFrame(np.arange(24).reshape((6, 4)), index=dates, columns=['A', 'B', 'C', 'D'])
print(df)
# select column A
print(df.A)
# slice fir... |
PHP | UTF-8 | 607 | 2.890625 | 3 | [] | no_license | <?php
class Category extends AbstractModel
{
use UseTimestamps;
private $id;
private $name;
private $createdAt;
private $updatedAt;
private $deletedAt;
public function setId(int $id) : Category
{
$this->id = $id;
return $this;
}
... |
Python | UTF-8 | 20,544 | 3.078125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 12 15:29:39 2019
@author:Wei Huajing
@company:Nanjing University
@e-mail:jerryweihuajing@126.com
@title:简单剪切去褶皱函数库-VerticalShear
@原理:用垂直剪切或斜剪切方法消除地层形变,将地层恢复到水平或假定的区域基准面。
"""
'''垂直剪切'''
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.font_manager impo... |
C++ | UTF-8 | 1,316 | 2.640625 | 3 | [] | no_license | ////////////////////////////////////////////////////////////////////////////////
// $Id: FeedbackScene.h 1781 2008-02-15 11:06:21Z mellinger $
// Author: juergen.mellinger@uni-tuebingen.de
// Description: An abstract class interface for feedback scenes.
// A feedback scene consists of a cursor and a number of tar... |
C# | UTF-8 | 788 | 3.125 | 3 | [
"MIT"
] | permissive | namespace FastFood.Models
{
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class Position
{
[Key]
public int Id { get; set; }
[Required]
[MinLength(3), MaxLength(30)]
public string Name { get; set; }
public IColle... |
C++ | UTF-8 | 2,586 | 3.25 | 3 | [] | no_license | #ifndef QUEUE_H
#define QUEUE_H
#include "Object.h"
#include "Exception.h"
#include "List.h"
using namespace ZQLib;
namespace ZQLib
{
template<typename T>
class Queue : public Object
{
public:
virtual void Add(const T& e) = 0;
virtual void Remove() = 0;
virtual T Front() const = 0;
virtual void Clea... |
Java | UTF-8 | 2,433 | 2.1875 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.reseval.mash.entities;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity... |
Java | UTF-8 | 2,429 | 1.625 | 2 | [
"Apache-2.0"
] | permissive | // Copyright 2020 Google LLC
//
// 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 in ... |
JavaScript | UTF-8 | 18,762 | 2.765625 | 3 | [] | no_license | var companieSelected;
var productoSelected;
var companiesList;
var variationsList = [];
var variationSelected;
// COMPANIE //
function showCompanies() {
var button = '<div class="col-6"> <a href="#" onclick="openModalCompanie(0)" class="btn btn-info" >Nueva Empresa</a> </div><hr>';
$.get('/companie'... |
Markdown | UTF-8 | 3,764 | 3.375 | 3 | [] | no_license | # The REST API in a nutshell
The REST API is very easy to use. From a technical standpoint is simply comes
down that your website or app sends HTTP requests to Copernica's servers:
HTTP GET requests to fetch data, and POST and PUT requests to modify data.
These requests are processed by our API servers, and the reques... |
Markdown | UTF-8 | 991 | 3.3125 | 3 | [] | no_license | ## `限价单`<div id='insert_limit_order'></div>
`context.insert_limit_order(instrument_id, exchange_id, account_id,limit_price, volume, side, offset)`
**参数**
| 参数 | 类型 | 说明 |
| ------------- | :---: | -------- |
| instrument_id | str | 合约ID |
| exchange_id | str | 交易所ID |
| account_id | str | ... |
Java | GB18030 | 6,660 | 2.75 | 3 | [] | no_license | package until;
import java.lang.reflect.Field;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import dao.User;
public class JDBC {
private Connection conn=getConnection();
public ... |
C# | UTF-8 | 4,131 | 3.109375 | 3 | [
"MIT"
] | permissive | using System;
using System.IO;
/// <summary>
/// IMG sharp namespace
/// </summary>
namespace IMGSharp
{
/// <summary>
/// IMG entry class
/// </summary>
internal class IMGArchiveEntry : IIMGArchiveEntry
{
/// <summary>
/// IMG archive
/// </summary>
private IMGArch... |
C++ | UTF-8 | 586 | 3.078125 | 3 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int maxProfit(vector<int>& prices) {
int n = prices.size();
if(n == 0)
return 0;
vector<int> profit(n, 0);
int min_price = prices[0], max_profit = 0;
for(int i = 1; i < n; i++){
... |
C | UTF-8 | 2,578 | 2.640625 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* do_command.c :+: :+: :+: ... |
C# | UTF-8 | 5,823 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;
using taskt.Core.Attributes.ClassAttributes;
using taskt.Core.Attributes.PropertyAttributes;
using taskt.Core.Command;
using taskt.Core.Enums;
using taskt.Core.Infrastructur... |
Python | UTF-8 | 316 | 2.890625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
import numpy as np
def first_half_second_half(a):
first, second = np.split(a, 2, axis=1)
# (first version): c = first.sum(axis=1) > second.sum(axis=1)
c = np.sum(first, axis=1) > np.sum(second, axis=1)
return a[c]
def main():
pass
if __name__ == "__main__":
main()
|
Markdown | UTF-8 | 4,285 | 3.296875 | 3 | [
"MIT",
"GPL-1.0-or-later",
"CC-BY-4.0",
"CC-BY-SA-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | ---
layout: doc
title: 航空影像
permalink: /zh_CNjosm/aerial-imagery/
lang: zh_CN
category: josm
---
航空影像
================
> 已审核 2015-09-21
描绘影像是为OSM做出贡献的一种简单而有力的方式。使用影像在地面上绘制点、线和形状被称为**数字化**。它通常可以与在地面上收集属性数据的行为分开,后者通常被称为**地面实测**。数字化影像可以提供OSM地图的骨架,这使得地面实测人员在野外更容易作业。在本章中,我们将进一步了解航空影像的工作原理。
关于影像
-------------
航空图像是我... |
Python | UTF-8 | 2,393 | 2.65625 | 3 | [] | no_license | import json
import os
import re
import requests
from newsapi.articles import Articles
from newsapi.sources import Sources
API_KEY = "f044f5b63a7c4139858611a1ae6dc5f0"
s = Sources(API_KEY=API_KEY)
a = Articles(API_KEY=API_KEY)
# print(s.information().all_categories())
# print(s.get_by_category("gen... |
Go | UTF-8 | 1,456 | 2.515625 | 3 | [] | no_license | package main
import (
"context"
"errors"
"log"
"net/http"
"os"
"os/signal"
"sync"
"time"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
func main() {
cfg, err := ReadServerConfig("config.yml")
if err != nil {
log.Fatalf("failed to read config: %v", err)
}
mc, err :... |
Markdown | UTF-8 | 2,076 | 2.65625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: 某朋友博客上的
author: gavinkwoe
date: !binary |-
MjAwNi0xMi0xMyAxNzo0MzowNiArMDgwMA==
date_gmt: !binary |-
MjAwNi0xMi0xMyAwOTo0MzowNiArMDgwMA==
---
<p dir="ltr" style="MARGIN-RIGHT: 0px">暴强啊~! 这公司太帅了!要是我们公司也这样就 Happy 了……
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
从2004年11月开始就职于现在这家网络公司,说白了就是... |
C++ | UTF-8 | 8,649 | 2.71875 | 3 | [] | no_license | #include <iostream>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include "chip8.h"
#include "chip8_fontset.h"
using namespace std;
Chip8::Chip8(){}
Chip8::~Chip8(){}
// Clear the memory, registers, and screen
void Chip8::initialize(){
pc = 0x200; // Start of program counter
opcode ... |
C++ | UTF-8 | 2,649 | 2.65625 | 3 | [
"Apache-2.0",
"LLVM-exception",
"NCSA"
] | permissive | // RUN: %clang_cc1 -std=c++11 -verify %s
// Note that this puts the expected lines before the directives to work around
// limitations in the -verify mode.
void test(int *List, int Length, int Value) {
int i = 0;
#pragma unroll_and_jam
for (int i = 0; i < Length; i++) {
for (int j = 0; j < Length; j++) {
... |
Markdown | UTF-8 | 2,519 | 2.671875 | 3 | [] | no_license |
# TensorFlow 中 tf.app.flags.FLAGS 的用法介绍 - lyc_yongcai的博客 - CSDN博客
2017年06月19日 09:31:41[刷街兜风](https://me.csdn.net/lyc_yongcai)阅读数:24225
下面介绍 tf.app.flags.FLAGS 的使用,主要是在用命令行执行程序时,需要传些参数,代码如下:
新建一个名为:app_flags.py 的文件。
```python
#coding:utf-8
# 学习使用 tf.app.flags 使用,全局变量
# 可以再命令行中运行也是比较方便,如果只写 python app_flags.py 则代码运... |
Python | UTF-8 | 4,173 | 2.515625 | 3 | [] | no_license | import math
import gym
from gym import *
from gym import spaces
from gym.utils import seeding
import numpy as np
import pandas as pd
from statsmodels.tsa.vector_ar import var_model
def limiter10(x):
if x<=0.0:
return 1e-12
if x>=1.0:
return 1.0-1e-4
return(x)
class MyGym(gym.Env):
# ba... |
Java | UTF-8 | 568 | 3.671875 | 4 | [] | no_license | package Day5_LoopsSwitch;
/**
* Write a description of class While here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class WhileFor
{
public static void main(String args[])
{
// How many times will this loop run
// Whats gonna be the output?
... |
Markdown | UTF-8 | 695 | 2.671875 | 3 | [] | no_license | # reuze
REUZE is an environmentally friendly mobile app.
Its goal is to help users locate resources whose materials they can use to design amazing upcycled works and art.
Additionally, the app helps to reduce environmental impacts.
The mobile app was designed with User Centered Design principles baked in to ensure ... |
JavaScript | UTF-8 | 8,974 | 2.859375 | 3 | [] | no_license | /**
* @file Tests the Chunk class
* @copyright Stephen R. Veit 2015
*/
'use strict';
var Chunk = require('../riff/chunk'),
_ = require('lodash');
describe('Chunk', function () {
var chunk;
describe('with id and data parameters', function () {
var data;
beforeEach(function (done) {
data = new Buf... |
C | UTF-8 | 666 | 2.734375 | 3 | [] | no_license | #ifndef _BOX_INCLUDED
#define _BOX_INCLUDED
/* *
* structure for bounding box *
* */
struct box {
unsigned left, top, width, height;
box() = default;
box( unsigned init_left,
unsigned init_top,
unsigned init_... |
PHP | UTF-8 | 1,054 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
use yii\db\Expression;
use common\models\TeamMember;
class m160912_131321_add_data_to_team_member extends Migration
{
public function up()
{
$now = new Expression('NOW()');
$status = TeamMember::STATUS_PUBLISHED;
$rootId = 1;
$columns = [
... |
Java | UTF-8 | 7,863 | 1.640625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
TypeScript | UTF-8 | 790 | 2.6875 | 3 | [] | no_license | import PlayerScore from "../../models/PlayerScore";
import { TeamPickWithScore } from "../../models/TeamPickWithScore";
import PlayerScoreBuilder from "./playerScoreBuilder";
export default class TeamPickWithScoreBuilder {
private teamPickWithScore: TeamPickWithScore;
constructor() {
const playerScore = new P... |
Java | UTF-8 | 973 | 2.25 | 2 | [] | no_license | package car_test;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jup... |
Java | UTF-8 | 798 | 2.5625 | 3 | [] | no_license | package model.user;
import model.bikeservice.BikeOrder;
import javax.persistence.*;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
@Entity
public class Seller extends Worker {
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy="seller")
public List<BikeOr... |
PHP | UTF-8 | 855 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Rules;
use App\Categories;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
class ValidCategory implements Rule
{
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct()
{
... |
Markdown | UTF-8 | 2,638 | 2.984375 | 3 | [] | no_license | ---
layout: post
title: "Installing Github Pages on Ubuntu 15.10"
date: 2016-02-24 19:44:59 +0000
categories: jekyll ruby ubuntu github
---
# Simples
I wanted to create a blog using github pages, but despite looking in all the obvious places I couldn't find a simple set of instructions _all in one place_ th... |
Ruby | UTF-8 | 1,658 | 3.34375 | 3 | [] | no_license | class Color
PROPERTIES = [:timestamp, :hex, :id, :tags]
PROPERTIES.each do |prop|
attr_accessor prop
end
def initialize(properties = {})
properties.each do |k, v|
if PROPERTIES.member? k.to_sym
self.send((k.to_s + "=").to_s, v)
end
end
end
# methods to ensure "tags" prop... |
PHP | UTF-8 | 9,200 | 2.671875 | 3 | [] | no_license | <?php
ob_start();
require_once("gen/gen/config.php");
class CreateProduct{
/*public $name;
public $category;
public $description;
public $price;
#public $image;
public $status;
public $addition;
public $msg;*/
public function __construct(){
/*$this->name = $name;
$this->description = $description;
$this... |
Go | UTF-8 | 798 | 2.765625 | 3 | [] | no_license | package microbio
// Ribosome : Here we attempt to model the Translation phase
// of gene expression done by the Ribosome
type Ribosome struct {
}
var startCodon = MakeStrand([]byte("AUG"), RIBOSE)
// Translate returns an AminoAcidStrand for a given NucleotideStrand
// Use WaitForTRNAAndGetAttachedAminoAcid(codon) to... |
Markdown | UTF-8 | 1,760 | 2.671875 | 3 | [] | no_license | # js
```
在JavaScript中,对象就是一个键/值对的集合 -- 你可以把JavaScript的对象想象成一个键为字符串类型的字典。
```
# frame
- frameattached,附加到页面时触发,只能触发一次
- framenavigated 当提交导航栏到不同的url中触发
- framedetached 分离页面的时候触发,只能触发一次
```
获取ifame elements
const frame = page.frames().find(frame => frame.name() === 'myframe');
const text = await frame.$eval('.selector'... |
C++ | UTF-8 | 1,693 | 3.296875 | 3 | [] | no_license | //Problem: Switching on the Lights (Silver)
//Type: BFS
//Solution: Just go down the path, the fact that you can light rooms far away from you makes this really hardcore
#include <fstream>
#include <cstring>
#include <queue>
#include <vector>
using namespace std;
ifstream fin("lightson.in");
ofstream fout("lightson.out... |
C++ | UTF-8 | 1,149 | 3.15625 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
using namespace std;
bool compare(string a, string b) {
return a.size() < b.size();
}
int main() {
vector<int> answers;
vector<int> answer;
int aaa = 0;
int bbb = 0;
int ccc = 0;
int a... |
C++ | UTF-8 | 1,551 | 2.765625 | 3 | [] | no_license | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
using std::vector;
using std::swap;
const int MAXN = 300 + 10;
int n;
int a[MAXN];
char G[MAXN][MAXN];
int groupId[MAXN];
int index[MAXN];
int ret[MAXN];
void Read()
{
for (int i = 0; i < n; ++i)
{
scanf("%d", a + i);
}
... |
Markdown | UTF-8 | 4,504 | 2.546875 | 3 | [] | no_license | ### 法南马赛两建筑物突然倒塌 恐10人遭活埋
------------------------
<div class="wysiwyg">
【新唐人北京时间2018年11月06日讯】
<a href="http://www.ntdtv.com/xtr/gb/articlelistbytag_法国.html" target="_blank">
法国
</a>
南部港都
<a href="http://www.ntdtv.com/xtr/gb/articlelistbytag_马赛.html" target="_blank">
马赛
</a>
市(Marseille)中心两栋毗邻建筑,5日疑因年久失修突然倒塌... |
Java | UTF-8 | 909 | 2.0625 | 2 | [] | no_license | package me.nurio.events.testclasses;
import me.nurio.events.handler.EventHandler;
import me.nurio.events.handler.EventListener;
import me.nurio.events.handler.EventPriority;
public class PriorityTestListener implements EventListener {
@EventHandler
public void nonTagEvent(TestEvent eve) {
// Non-tag ... |
JavaScript | UTF-8 | 3,661 | 2.640625 | 3 | [] | no_license | $(document).ready(manipulateDOM);
function manipulateDOM() {
renderStaticContent();
renderPasswordAnalysis();
registerEventHandlers();
}
function renderStaticContent() {
$('body').append(`
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
... |
Java | UTF-8 | 4,495 | 2.140625 | 2 | [] | no_license | package com.example.practicamoviles_1tr.fragments;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.... |
JavaScript | UTF-8 | 2,519 | 2.609375 | 3 | [] | no_license | import React, {Component} from 'react'
class CreateContact extends Component {
state = {
name: '',
phone: '',
birthday: '',
}
componentDidMount () {
this.setState({
name: this.props.name,
phone: this.props.phone,
birthday: this.props.birthday,
})
}
onNameChange = (e) =... |
Java | UTF-8 | 2,553 | 3.4375 | 3 | [] | no_license | import java.io.*;
public class FileRW {
public static void main (String[] args)
{
File fileIn = new File("src/main/java/FileRW.java");
File fileOut = new File("output.txt");
System.out.println(fileIn.getAbsolutePath());
System.out.println(fileOut.getAbsolutePath());
... |
Markdown | UTF-8 | 4,550 | 2.9375 | 3 | [
"MIT"
] | permissive | > ##### 通用属性
* textColor 文本颜色
* disabledTextColor 禁用状态时文本颜色
* color 背景颜色
* disabledColor 禁用状态时背景颜色
* highlightColor 高亮状态时背景,如按下时
* splashColor 水波纹颜色
> ##### RaisedButton
material风格的凸起按钮
```
RaisedButton _raisedButton = RaisedButton(
onPressed: () { // 点击回调,required,当为空时则禁用状态
print('RaisedButton OnPressed... |
JavaScript | UTF-8 | 879 | 3.21875 | 3 | [] | no_license | const _ = require('../underbar');
describe('every()', () => {
describe('processing an array of numbers', () => {
it('will return true if no callback is supplied', () => {
const nums = [1, 3, 5, 7];
expect(_.every(nums)).toBe(true);
});
it('returns true if all numbers in an array are odd and ... |
Java | UTF-8 | 1,676 | 2.625 | 3 | [
"MIT"
] | permissive | package com.github.elegantwhelp.boxmania.gui;
import org.joml.Vector2f;
import com.github.elegantwhelp.boxmania.BoxMania;
import com.github.elegantwhelp.boxmania.gui.widget.WidgetButton;
import com.github.elegantwhelp.boxmania.gui.widget.WidgetLabel;
import com.github.elegantwhelp.boxmania.io.KeyState;
public class ... |
Markdown | UTF-8 | 1,109 | 2.78125 | 3 | [] | no_license | This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
## Key dependencies
* [Ant Design](https://ant.design/docs/react/introduce)
* [Axios](https://github.com/axios/axios)
* [Redux](https://redux.js.org/)
* [Redux Thunk](https://github.com/gaearon/redux-thunk)
*... |
Shell | UTF-8 | 771 | 3.53125 | 4 | [] | no_license | #!/bin/sh
#-------------------------------------------------------------------------------
# Create versions file
#
#-------------------------------------------------------------------------------
VER="$HOME/workspace/SnpEff/html/versions.txt"
# SnpEff version number
SNPEFF=`java -jar snpEff.jar 2>&1 | grep "snpEff ... |
Ruby | UTF-8 | 3,025 | 2.9375 | 3 | [] | no_license | require 'test_helper'
class PhysicianTest < ActiveSupport::TestCase
# Other methods available to instancs of Physician model (provided by has_many).
#
# patients
# patients<<(object, ...)
# patients.delete(object, ...)
# patients.destroy(object, ...)
# patients=(objects)
# patient_ids
# patient_i... |
C# | UTF-8 | 1,885 | 2.625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum MusicType
{
Full,
Loop,
GameOver,
FailSound,
CollectedSound
}
public class AudioController : Singleton<AudioController>
{
protected AudioController ()
{
}
[SerializeField] public AudioSource MusicAudioSource;
[Se... |
Markdown | UTF-8 | 1,881 | 2.9375 | 3 | [
"MIT"
] | permissive | # Dokumentacja Algorytmu levenberga marquardta:
funkcja zawiera algorytm oparty na metodzie marquardta, liczy przybliżone minimum funkcji dwóch zmiennych, i wypisuje to minimum, wraz ze zmiennymi w tym punkcie oraz liczbę iteracji
# Zmienne zewnętrzne:
M - maksymalna ilość kroków algorytmów
epsilon - tolerancja błęd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.