language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
C++ | UTF-8 | 405 | 2.734375 | 3 | [] | no_license | #include<iostream>
#include<cstring>
#include<ctype.h>
using namespace std;
int main()
{
char s[101];
cin>>s;
int a=strlen(s);
for(int i=0; i<=a; i++)
{
s[i]=tolower(s[i]);
}
for(int i=0; i<a; i++)
{
if(s[i]!='a'&&s[i]!='e'&&s[i]!='i'&&s[i]!='o'&&s[i]!='u'&&s[i]!='y')
... |
C | UTF-8 | 3,055 | 2.546875 | 3 | [] | no_license | ///////////////////////////////////////////////////////////////////////////////
// COMMUNICATION MESSAGES
///////////////////////////////////////////////////////////////////////////////
#ifndef __MESSAGE_H__ // prevents opening header file by multiple modules
#define __MESSAGE_H__
#ifdef __cplusplus
extern "C"
{
#en... |
Python | UTF-8 | 7,840 | 3.046875 | 3 | [] | no_license | #symmetryToolsXYZ_mari3.1.3
#By David Eschrich
#Updated by Antonio Neto
# This is world space only. But as long as your model is centered at origin and is either symmetrical on the x,y, or z axis then this will allow for symmetrical baking.
# Paint on one side of your model and then bake with symmetry across t... |
C++ | UTF-8 | 405 | 2.75 | 3 | [] | no_license | #ifndef _HASHELEM_H_
#define _HASHELEM_H_
#include <string>
class HashElem {
public:
HashElem();
HashElem(int index, std::string word);
void setNext(HashElem* h);
void setIndex(int index);
int getIndex();
std::string getWord();
HashElem* getNext();
priv... |
JavaScript | UTF-8 | 2,087 | 3.015625 | 3 | [] | no_license | SongUtils = {
getSongName: function(filename) {
if (!filename) {
return "N/A";
}
else {
var pathParts = filename.split("/"),
path = pathParts[pathParts.length-1],
name = decodeURI(path).replace(".mp3", "").replace(".m4a", "");
return name;
}
}
};
Player = funct... |
Python | UTF-8 | 279 | 3.703125 | 4 | [] | no_license | def alternateCase(str):
newStr = ""
for i in range(len(str)):
char = str[i]
if i%2 == 0:
if char.upper() == char:
char = char.lower()
else:
char = char.upper()
newStr+=char
return newStr
|
Java | UTF-8 | 1,620 | 2.40625 | 2 | [] | no_license | package com.jack.pinpoint.jumper;
import com.netflix.hystrix.HystrixCommand;
import com.netflix.hystrix.HystrixCommandGroupKey;
import com.netflix.hystrix.HystrixCommandProperties;
import org.apache.http.HttpEntity;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.ap... |
JavaScript | UTF-8 | 1,519 | 2.609375 | 3 | [] | no_license | var rd = rd || {};
rd.init = function() {
rd.initNavbar();
rd.skillProgress();
/*rd.initResetScroll();*/
}
rd.initNavbar = function () {
$(document).on('click', '.navbar-nav li a', function(e){
e.preventDefault();
var target = $($(this).attr('href'));
var top = target.offset().top;
... |
Java | UTF-8 | 388 | 2.46875 | 2 | [] | no_license | package mille_bornes.cartes.bottes;
import mille_bornes.cartes.Attaque;
import mille_bornes.cartes.Botte;
public class AsDuVolant extends Botte {
public AsDuVolant(){
super("AsDuVolant");
}
private static AsDuVolant unique;
public boolean contre(Attaque carte){
if (carte != null) re... |
Python | UTF-8 | 2,856 | 3.078125 | 3 | [] | no_license | import argparse
import datetime
import os
import pandas
import typing
# local
import src.plotter
def generate_bluedriver_plots_from_data(input_directory: str, output_directory: str, should_rename: bool):
input_files: typing.List(str) = os.listdir(input_directory)
if input_files is None:
print(f"No ... |
Markdown | UTF-8 | 488 | 2.515625 | 3 | [] | no_license | # README
This repo is created to demonstrate an issue with CircleCI validation to their support team.
When attempting to use [certain Pipeline Values](https://circleci.com/docs/2.0/pipeline-variables/#pipeline-values), CircleCI remotely is happy with the config, but the command `circleci config validate` reports that... |
Java | UTF-8 | 1,420 | 3.203125 | 3 | [] | no_license | package com.leetcode.problemset;
import java.util.Arrays;
public class Pro_832 {
public static void main(String[] args) {
int[][] A = new int[4][4];
A[0] = new int[]{1,1,0,0};
A[1] = new int[]{1,0,0,1};
A[2] = new int[]{0,1,1,1};
A[3] = new int[]{1,0,1,0};
flipAndI... |
JavaScript | UTF-8 | 441 | 4.28125 | 4 | [] | no_license | // Print the sum of all the even numbers in the given array of numbers
function evenSum(array){
var sum =0
for(var i=0; i<=array.length-1; i++){
if( array[i] % 2 == 0 ){
sum += array[i]
}
}
console.log("The sum of all the even numbers in the given array of numbers is: " +sum)
}
evenSum([1,2,3,4,5,6,7... |
C# | UTF-8 | 3,189 | 3.265625 | 3 | [] | no_license | using Lecture_CSharpPathfinding.MakeMaze;
using System;
using System.Collections.Generic;
using System.Text;
namespace Lecture_CSharpPathfinding
{
class Board
{
const char CIRCLE = '\u25cf';
public TileType.Type[,] Tile { get; private set; } // 배열
public int Size { get; private set; }... |
Markdown | UTF-8 | 973 | 3.125 | 3 | [
"MIT"
] | permissive | # 针对java后台数据返回为时间戳样式的全局过滤转换
<template>
<demo :codeStr="str">
</demo>
</template>
<script>
export default {
data() {
return {
data:'${y}-${m}-${d} ${hh}:${mm}:${ss}',
str: `
//在所需页面中直接如此使用 (time | dateFormat)
若后台返回数据为秒级时间戳需要乘1000
// 在main.js中引入下面代码
... |
Python | UTF-8 | 1,410 | 2.71875 | 3 | [] | no_license | class Solution:
def reFind(self, _result, _nowStr, _remainNum, _str):
#终止条件
'''
elif _str[0] > "2":
return
'''
#print(_remainNum, _str)
if _str == "" and _remainNum == 0:
_result.add(_nowStr[1:])
elif len(_str) > 3 * _remainNum:
... |
PHP | UTF-8 | 1,901 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Skrill\Tests;
use PHPUnit\Framework\TestCase;
/**
* Class HelpersTest.
*/
class HelpersTest extends TestCase
{
public function testResourcesFilesExists()
{
self::assertFileExists(__DIR__ . '/../resources/iso-3166-1-alpha-3-countries-skill-supports.php');
... |
Python | UTF-8 | 3,793 | 3.265625 | 3 | [] | no_license | #register
# - first_name,last_name,password, Email
# - generate user id
# -
#Login
# - Account Number and password
#bank operations
#initializing system
import random
Database = {}
def init():
isvalidOptionSelected = False
print('Welcome to Survival Bank\n')
while isvalidOptionSelected == False:
... |
Java | UTF-8 | 400 | 2.359375 | 2 | [] | no_license | package project.engine.fsm;
/**
* @author Egor Stepanov
* @since 18-01-2018.
*/
public interface ProcessContext<StageT extends ProcessStage> {
/**
* Тип процесса
*/
ProcessType getType();
/**
* Текущий стэйдж процесса
*/
StageT getStage();
/**
* Установить стэйдж
... |
C++ | UTF-8 | 1,098 | 3.5 | 4 | [] | no_license | #include<iostream>
using namespace std;
int getSum(int bitree[],int index)
{
int sum=0;
index+=1;
while(index>0)
{
sum+=bitree[index];
index-=index&(-index);
}
return sum;
}
void update(int bitree[],int n, int index, int val)
{
index+=1;
while(index<=n)
... |
C++ | UTF-8 | 640 | 2.625 | 3 | [] | no_license | #ifndef SHEET_HPP
#define SHEET_HPP
#include <SFML/Graphics.hpp>
namespace gromenia {
enum class Collidable {COLLIDABLE, NONCOLLIDABLE};
class Sheet {
public:
Sheet(const sf::Texture &sheet, Collidable collidable, unsigned int tile_width, unsigned int tile_height, unsigned int spacing, unsigned int margin);
... |
JavaScript | UTF-8 | 1,035 | 2.515625 | 3 | [] | no_license | import log from './log';
import https from 'https';
import config from '../config';
const { clientId } = config.soundCloud;
const SCAPI_BASEURL = 'https://api.soundcloud.com';
function readBody(res) {
return new Promise((resolve, reject) => {
let body = '';
res.on('data', (chunk) => {
body += chunk;
... |
C# | UTF-8 | 4,097 | 3.09375 | 3 | [
"MIT"
] | permissive | using System;
using GuardNet;
namespace Arcus.Messaging.Abstractions.MessageHandling
{
/// <summary>
/// Represents a type that's the result of a successful or faulted message deserialization of an <see cref="IMessageBodySerializer"/> instance.
/// </summary>
/// <seealso cref="IMessageBodySerializer"... |
C | UTF-8 | 1,945 | 4.3125 | 4 | [] | no_license | //1. Make a Menu driven program to implement following functions to access and traverse a Stack Data Structure.(Using Static Memory Allocation)
Print the following details in advance for user information.
Press : 1 for push an element in stack.
Press : 2 for pop an element in Stack.
Press : 3- for printing all the el... |
Markdown | UTF-8 | 33,544 | 2.546875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "[Jekyll Blog] Tipue Search를 이용하여 블로그 검색 기능 만들기"
subtitle: "Tipue Search 플러그인"
categories: etc
tags: etc
comments: true
---
## 개요
> `Tipue Search`를 활용하여, 블로그 검색 기능을 구축한 과정에 대한 기록입니다.
- 목차
- [Tipue Search란?](#tipue-search란)
- [Tipue Search 설치](#tipue-search-설치)
- [Tipue Search 환경설정]... |
Markdown | UTF-8 | 4,271 | 3.171875 | 3 | [
"MIT"
] | permissive | ---
title: 'Bayesian Machine Learning in Python: A/B Testing | [119.99$ Udemy Course For Free]'
date: 2019-03-20T17:02:00+01:00
draft: false
tags : [PROGRAMMING, BUSINESS, PYTHON]
---
{
btree[0] = root;
index = 1;
}
int findmin(){
return btree[0];
}
void insert(int element);
void delmin();
void show(){
for(int i = 0; i < index; i++)
cout<<btree[i]<<endl;
}
};
void heap::inser... |
Java | UTF-8 | 8,279 | 2.53125 | 3 | [] | no_license | /*
* Copyright (c) 2010, Frederik Vanhoutte This library is free software; you can
* redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* http://cr... |
C++ | GB18030 | 3,820 | 2.828125 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <string.h>
#include<math.h>
#include<cmath>
#include<stdlib.h>
#include <bitset>
#include <iomanip>
#include <algorithm>
//Ҫint main()ǰϺΪĺдmainĺ
int hex_char_value(char ss);
int hex_to_decimal(const char* s);
//string hex_to_binary(char* szHex);
using names... |
PHP | UTF-8 | 1,669 | 2.578125 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace OpenTelemetry\Exporter;
use OpenTelemetry\Exporter;
use OpenTelemetry\Tracing\Span;
use OpenTelemetry\Tracing\Tracer;
class ZipkinExporter extends Exporter
{
private $endpoint;
public function convertSpan(Span $span): array
{
$row = [
'id' =>... |
JavaScript | UTF-8 | 131 | 3.25 | 3 | [] | no_license | function isWithinNumber(a) {
return ((Math.abs(100 - a) <= 20) || (Math.abs(400 - a) <= 20));
}
console.log(isWithinNumber(80));
|
Markdown | UTF-8 | 17,319 | 2.703125 | 3 | [] | no_license | # TC3041 Proyecto Final Primavera 2020
# Emotionfy
##### Integrantes:
1. *Roberto Gervacio Guendulay* - *A01025780* - *Campus Santa Fe*
2. *Isaac Harari Masri* - *A01024688* - *Campus Santa Fe*
3. *Alejandra Nissan Leizorek* - *A01024682* - *Campus Santa Fe*
4. *Yann Le Lorier Bárcena* - *A01025977* - *Campus Santa ... |
C# | UTF-8 | 1,983 | 2.78125 | 3 | [
"MIT"
] | permissive | using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using System.Net;
using System.Threading.Tasks;
namespace NsfwDetector.Api
{
public interface INsfwService
{
Task<NsfwResult> GetClassifications(string url);
Task<NsfwResponse> DetermineNsfw(string imageUrl, double pornPercent = 50, double... |
JavaScript | UTF-8 | 702 | 3.625 | 4 | [] | no_license | var Person1 = /** @class */ (function () {
function Person1() {
}
Person1.prototype.getFirstName = function () {
return this.firstName;
};
Person1.prototype.setFirstName = function (val) {
this.firstName = val;
};
Person1.prototype.setLastName = function (val) {
this.... |
Java | UTF-8 | 2,181 | 3.15625 | 3 | [] | no_license | package com.yukong.socket.nio;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.util.Scanner;
/**
* @author yukong
* @date 2019-05-16 15:09
*/
pub... |
Python | UTF-8 | 290 | 2.578125 | 3 | [] | no_license | from src.src.Account import Account
class FixedDepositAccount(Account):
def __init__(self, account_id, account_balance):
super().__init__(account_id, account_balance)
self.minimum_deposit = 100
def check_minimum_balance(self):
return self.minimum_deposit
|
Python | UTF-8 | 948 | 3.640625 | 4 | [] | no_license | items=[
{
"id":"1",
"name":"ball",
"cost":"50",
"brand":"mrf",
"rating":"3",
"discount":"20",
"category":"sports"
},
{
"id":"2",
"name":"apple",
"cost":"20",
"brand":"sonar",
"rating":"4",
... |
Java | UTF-8 | 2,953 | 3.6875 | 4 | [] | no_license | package daohuei.leetcodelizard;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;
/*
* 220. Contains Duplicate III
* Link: https://leetcode.com/problems/contains-duplicate-iii/description/
*/
public class ContainsDuplicateThree {
/**
* @author: daohuei
* @description: treeset ... |
Shell | UTF-8 | 808 | 3.90625 | 4 | [
"MIT"
] | permissive | #!/bin/sh
set -e
. $(dirname "$0")/init.sh
# This tests whether the fail() function correctly prints its argument
# and aborts the test script with an exit status of 99.
expectSt=99
expectMsg="foo40923866183"
sentinel="ZZZZZZZZZZZZZZZZZZ0917510264695Z"
status=0
output=$(set +e; fail "$expectMsg" 2>&1 ; echo "$sentin... |
Shell | UTF-8 | 3,938 | 3.28125 | 3 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | #!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lice... |
C++ | UTF-8 | 3,600 | 3.046875 | 3 | [
"Unlicense"
] | permissive |
#ifndef SIMULADOR_TRATAMENTO_EXTRATOR_INCLUIDO
#define SIMULADOR_TRATAMENTO_EXTRATOR_INCLUIDO sim
#include <Auxiliar/Dogmas.hpp>
#include <Algebra/Matriz.hpp>
namespace Tratamento
{
static constexpr bool USA_NOTACAO_CIENTIFICA = false;
struct Objetivo
{
std::string nome; //nome da origem... |
Java | UTF-8 | 15,630 | 2.609375 | 3 | [] | no_license | package ItemInfo;
public class SpellcasterItemInfo {
/*-------------------------------------------------------------------------------*
*************************** Spellcaster Armour Info *****************************
*-------------------------------------------------------------------------------*/
public Str... |
Ruby | UTF-8 | 1,556 | 2.640625 | 3 | [] | no_license | require 'ltx'
module Ltx
class SourceDirectory
def initialize(document, dir, options={})
options = {manual: false, type: dir}.merge(options)
@document = document
@dir = dir
@type = options.fetch :type
@manual = options.fetch :manual
@sources = if @manual
[]
else
find_sources
... |
Java | UTF-8 | 1,992 | 2.921875 | 3 | [] | no_license | package games.telekingdom;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import org.json.*;
import games.telekingdom.hud.Card;
import games.telekingdom.hud.CardTemplate;
import games.telekingdom.hud.Jauge;
public class Save {
private World world;
private Player player;
private List<Jauge... |
Java | UTF-8 | 2,036 | 2.265625 | 2 | [] | no_license | package com.huskyez.movieapp.viewmodel;
import androidx.lifecycle.LiveData;
import com.huskyez.movieapp.model.movie.AnticipatedMovie;
import com.huskyez.movieapp.model.movie.Movie;
import com.huskyez.movieapp.model.movie.RecommendedMovie;
import com.huskyez.movieapp.model.movie.TrendingMovie;
import com.huskyez.movie... |
C++ | UTF-8 | 1,318 | 2.765625 | 3 | [] | no_license | #include <Servo.h>
Servo barrier;
const int echoPin = 11, triggerPin = 10;
int rotation = 0;
int rotVelocity = 5;
bool rotate360 = false;
int degDest = 0;
int prevDest = -1;
float getDistance() {
//Make echo call.
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicr... |
Python | UTF-8 | 6,554 | 2.546875 | 3 | [
"MIT"
] | permissive |
# encoding: utf-8
__author__ = "Nils Tobias Schmidt"
__email__ = "schmidt89 at informatik.uni-marburg.de"
'''
Utility for command-line interface
'''
import sys
from androlyze.log.Log import log, clilog
from androlyze.model.script.ScriptUtil import dict2json
from androlyze.error.AndroLyzeLabError import AndroLyzeLa... |
Python | UTF-8 | 645 | 4.375 | 4 | [] | no_license | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
简约而不简单的匿名函数:lambda
匿名函数是函数, 不是变量
lambda函数用在 常规函数不能用的地方:列表内
map(func, iterable): 返回新的可遍历的集合
filter(func, iterable)
reduce(func, iterable)
1、对字典d值由高到低排序:d={'mike':10,'lucy':2,'ben':30}
2、使用匿名函数的场景
"""
if __name__ == '__main__':
print("请开始你的程序")
square = lambda ... |
Java | UTF-8 | 704 | 3.25 | 3 | [] | no_license | package CollectionTest;
import java.util.ArrayList;
import java.util.Collections;
public class Test3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
ArrayList<String>arraylist =new ArrayList<String>();
arraylist.add("22");
arraylist.add("88");
arraylist.ad... |
Markdown | UTF-8 | 703 | 3.140625 | 3 | [] | no_license | Para empezar a programar, el primer elemento que vamos a usar es un **tablero** cuadriculado, similar al del Ajedrez, Damas o [Go](http://es.wikipedia.org/wiki/Go).
Estos tableros pueden ser de cualquier tamaño, por ejemplo, de 4x4:
.
// Find the minimum element.
// The array may contain duplicates.
// Example 1:
// Input: [1,3,5]
// Output: 1
... |
Python | UTF-8 | 988 | 3.328125 | 3 | [
"MIT"
] | permissive | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def closestKValues(self, root, target, k):
"""
:type root: TreeNode
:type target: float
:... |
JavaScript | UTF-8 | 180 | 2.8125 | 3 | [] | no_license | function print(count){
for(var i=0; i<count; i++)
console.log('Hello world!!');
}
// console.log(module.exports)
module.exports = print;
// console.log(module.exports) |
Java | UTF-8 | 2,890 | 2.28125 | 2 | [] | no_license | package com.dms.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dms.db.ChurnRevenueLost;
impo... |
Python | UTF-8 | 14,576 | 2.921875 | 3 | [] | no_license | import csv
import os.path
import json
### Synonym Lists ###
ADD_SYNONYMS = ["add", "put in", "create"]
FIND_SYNONYMS = ["find", "look for", "locate", "where"]
DELETE_SYNONYMS = ["delete", "remove"]
MOVE_SYNONYMS = ["move", "relocate", "shift"]
# Relative Actions
ABOVE_SYNONYMS = ["above", "on top", "over", "north"]
... |
C++ | UTF-8 | 856 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | #include <scraping/include/IAlmacenable.h>
// utiles
#include <utiles/include/GestorIDs.h>
using namespace scraping;
IAlmacenable::IAlmacenable(std::string grupo) : id(nullptr), grupo(grupo)
{
}
IAlmacenable::~IAlmacenable()
{
delete this->id;
this->id = nullptr;
}
// GETTERS
herramien... |
Java | UTF-8 | 2,357 | 2.109375 | 2 | [] | no_license | package net.simpleframework.mvc.component.ui.autocomplete;
import java.util.Iterator;
import net.simpleframework.common.StringUtils;
import net.simpleframework.common.coll.CollectionUtils.AbstractIterator;
import net.simpleframework.ctx.permission.IPermissionHandler;
import net.simpleframework.ctx.permission.P... |
Python | UTF-8 | 5,722 | 2.53125 | 3 | [] | no_license | import math
import random
import re
import scipy
import scipy.linalg
import scipy.optimize
import Constants
from ..model_util_p2 import ReadCoordinatesFile
findResidualsCount = 0
# Groups: 1 - X, 3 - Y, 5 - Z
DIFFERENCE_COORDINATES_PTN = r"(?<=\()([\-\.0-9]+)(, )([\-\.0-9]+)(, )([\-\.0-9]+)"
def generateAminoAcid... |
JavaScript | UTF-8 | 292 | 2.890625 | 3 | [
"MIT"
] | permissive | // Variables
var addImg = document.querySelector('#file-group');
addImg.addEventListener('change', showFileName);
function showFileName(e){
var fileName = document.getElementById('image').files[0].name;
var sibling = e.target.nextElementSibling;
sibling.innerText = fileName;
} |
C++ | UTF-8 | 436 | 2.625 | 3 | [] | no_license | #ifndef COMMENT_H
#define COMMENT_H
#include"User.h"
#include<QString>
using namespace std;
class Comment
{
private:
QString sender;
QString receiver;
QString content;
QString time;
public:
Comment();
void set_comment(QString sender,QString receiver,QString content,QString time);
QString g... |
Python | UTF-8 | 645 | 3.515625 | 4 | [] | no_license | #coding = utf-8
import keyword
from functools import reduce
for kw in keyword.kwlist:
print(kw)
def f(x):
return x * x
lst = [1,2,3,4,5,6,7]
new_list = list(map(f, lst))
new_list = list(map(str, lst))
print(new_list)
def add(x,y):
return x + y
num = reduce(add, [1,2,3,4,5,6,7,8,9,10])
print(num)
def g(m_st... |
PHP | UTF-8 | 872 | 2.859375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace StaticMapLite\Guesser;
use StaticMapLite\Util\BoxFitter\BoxFitter;
class MapCenterGuesser extends AbstractGuesser
{
public function guess(): GuesserInterface
{
if (!$this->printer->getLatitude() || !$this->printer->getLongitude()) {
$boundingBox = ... |
Markdown | UTF-8 | 2,285 | 2.671875 | 3 | [] | no_license |
Formats: [HTML](/news/2010/10/4/the-greek-government-announces-additional-harsher-austerity-measures-in-its-2011-draft-budget.html) [JSON](/news/2010/10/4/the-greek-government-announces-additional-harsher-austerity-measures-in-its-2011-draft-budget.json) [XML](/news/2010/10/4/the-greek-government-announces-additiona... |
Markdown | UTF-8 | 1,070 | 2.75 | 3 | [
"MIT"
] | permissive | # Taxi Pickup Location Recommendation: A Learning Approach
This is the repository for Spring 2016 Realtime and Big Data Analytics Course Project at NYU CIMS.
## Overview
In New York City, 13,000 taxis complete over 170 million trips a year. By utilizing the historical NYC Taxi travel data, the pattern of behaviors of ... |
Python | UTF-8 | 6,604 | 3.265625 | 3 | [] | no_license | from matrix import *
import sys
def kalman_filter(x, P,measurements):
F = matrix([[1.0]])
H = matrix([[1.0]])
R = matrix([[1.0]])
I = matrix([[1.0]])
u = matrix([[0.]])
# measurement update
Z = matrix([[measurements]])
y = Z - (H*x)
S = H*P*H.transpose() + R
K = P... |
C++ | UTF-8 | 478 | 2.953125 | 3 | [] | no_license | #ifndef ALARM_H
#define ALARM_H
#include <Arduino.h>
class Alarm {
protected :
//état de l'alarme
bool isOn;
//numéro de port de l'alarme
int numPort;
public :
//constructeurs
Alarm();
Alarm(bool state, int port);
//méthodes
void setState(bool state);
void setPort(... |
C++ | UTF-8 | 643 | 2.640625 | 3 | [
"MIT"
] | permissive | // https://codeforces.com/contest/1692/problem/D
#include <stdio.h>
bool palin[1440] = {};
int main() {
for (int i = 0; i < 1440; i++) {
int h = i / 60;
int m = i % 60;
if ((h / 10) == (m % 10) && (h % 10) == (m / 10)) {
palin[i] = true;
} else {
palin[i] = false;
}
}
int t;
s... |
Java | UTF-8 | 8,629 | 2.21875 | 2 | [] | no_license | package com.cloudifive.healthcare.helpers;
import java.io.IOException;
import java.security.cert.CertificateException;
import java.util.Arrays;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import com.c... |
Java | UTF-8 | 3,939 | 3.078125 | 3 | [] | no_license | public int minMeetingRooms(Interval[] intervals) {
if (intervals == null || intervals.length == 0) {
return 0;
}
int n = intervals.length;
int[] start = new int[n];
int[] end = new int[n];
for (int i =0; i < n; i++) {
Interval inter... |
Shell | UTF-8 | 7,912 | 4.0625 | 4 | [] | no_license | #!/usr/bin/ksh93
################################################################
function usagemsg_create_snap {
print "
Program: create_snap
Create a snapshot of a logical volume automatically sizing to the 10% available mark.
Usage: ${1##*/} [-?vV]
Where:
-v = Verbose mode - displays create_snap function... |
Shell | UTF-8 | 2,260 | 3.203125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #!/bin/bash
VERSION=${1:-develop}
KUBE_CONSTRAINTS=$2
############################################
# MAC OS
############################################
echo "Building keptn cli for OSX"
env GOOS=darwin GOARCH=amd64 go mod download
env GOOS=darwin GOARCH=amd64 go build -v -x -ldflags="-X 'main.Version=$VERSION' -X '... |
C | UTF-8 | 1,490 | 2.875 | 3 | [] | no_license | #include"stack.h"
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
#include"carPark.c"
#include"stackOption.c"
#include"linkOption.c"
#define STACK_DEBUG 1
#define perHour 5
void printStack(void)
{
int i;
for(i = 0;i <= topElement;i++)
{
printf("the carNum is %d\n",park[i]);
}
}
void printLink(void)
{
... |
Java | UTF-8 | 1,049 | 2.046875 | 2 | [] | no_license | package com.bankaction;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.interceptor.Interceptor;
@SuppressWarnings("serial")
public class Authenticati... |
TypeScript | UTF-8 | 8,311 | 3.015625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Copyright 2016 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 ... |
Java | UTF-8 | 652 | 2.90625 | 3 | [] | no_license | import java.util.List;
// https://leetcode.com/problems/valid-word-square/
public class QID422 {
public boolean validWordSquare(List<String> words) {
if (words == null) return false;
if (words.size() == 0) return true;
for (int i = 0; i < words.size(); i++) { // row
for (int j... |
C++ | UTF-8 | 3,489 | 3.515625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"BSL-1.0",
"Apache-2.0"
] | permissive | #ifndef SRC_SETTINGS_SETTINGS_HPP_
#define SRC_SETTINGS_SETTINGS_HPP_
#include <memory>
#include <string>
namespace fc
{
/// identifier of setting in context (for example key in ini file)
struct setting_id
{
explicit setting_id(std::string id)
: key{ std::move(id) }
{
}
std::string key;
};
inline bool opera... |
PHP | UTF-8 | 7,017 | 3.125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 树类
*
* 描述
* @author gongjt@xxcb.cn
* @version 2015/9/16 21:20
* @since 1.0
*/
namespace components\helper;
class Tree
{
private static $_instance = null;
/**
* 生成树型结构所需要的2维数组
* @var array
*/
public $arr;
/**
* 生成树型结构所需修饰符号,可以换成图片
... |
Markdown | UTF-8 | 1,106 | 2.890625 | 3 | [
"MIT"
] | permissive | # Tab Commander
Tab Commander is a Chrome extension which has the following features:
- Only allow access to the domain of the active tab in the current window
- Disallow access to the domain of the active tab in the current window
- Hide the active tab in the current window
- Hide all tabs except the active tab in t... |
Markdown | UTF-8 | 2,463 | 2.859375 | 3 | [
"MIT"
] | permissive | +++
hook = "Using iCloud Drive and iBooks to synchronize books and PDFs between all your devices."
published_at = 2017-04-01T16:24:18Z
title = "Sharing with iCloud Drive and iBooks"
+++
A chore that I often find myself doing is moving PDFs from
a computer to my iPad. It sounds like it should be simple,
and relatively ... |
C++ | WINDOWS-1252 | 4,245 | 2.859375 | 3 | [] | no_license | #include "Header.h"
#define SIZE 3000000
void bigrams()
{
char *textbi = new char[SIZE];
char cbi;
int nbi = 0;
FILE * doc = fopen("text.txt", "r");
while (fscanf(doc, "%c", &cbi) != EOF)
{
if ('' <= cbi && cbi <= '')
{
textbi[nbi++] = cbi;
}
if ('' <= cbi && cbi <= '')
{
textb... |
Markdown | UTF-8 | 551 | 3.53125 | 4 | [] | no_license | # LHD-Sort-a-List
Sorting: Sorting is a term refer to arranging element either in ascending order or descending order.
I have made a Python Program which take size of list from the user and according to the size,values are entered by the user. I have made user define function sorting which takes list size and element... |
Python | UTF-8 | 1,656 | 3.53125 | 4 | [] | no_license | arr=[3,8,6,2,17,29,1,4,87]
arr1=[5,9,8,11,32]
def poisk_min(template_arr):
i=0
min=template_arr[i]
for i in range(len(template_arr)):
if template_arr[i]<min:
min=template_arr[i]
else:
pass
return min
def poisk_sr(template_arr):
sr=0
sum=0
... |
Python | UTF-8 | 828 | 3.796875 | 4 | [] | no_license | # Function calculator and printer
# Will perform calculations and print them to a file called "function_output.txt"
# Misha Kuzma Oct 20, 2015
import string
import os
whileOn = 1
os.chdir("C:\Users\Misha Kuzma\Programs\dailyProg\outFiles")
f = open("function_output.txt", "w", 0)
while whileOn == 1:
animal_amount = ... |
Python | UTF-8 | 1,166 | 4.09375 | 4 | [
"MIT"
] | permissive | #import time library to test time of running two algorithms...
import time
from random import shuffle
def insertion_sort_fast(arr):
'''algorithm of fast insertio sort'''
for i in range(1, len(arr)):
j = i - 1
for k in range(i):
if arr[i] < arr[j]:
arr[i], arr[j] = arr[j], arr[i... |
Java | UTF-8 | 487 | 2.484375 | 2 | [] | no_license | package fileboard.dto;
public class FileSearchDto {
private String search;
private String key;
public FileSearchDto() {
}
public FileSearchDto(String search, String key) {
super();
this.search = search;
this.key = key;
}
public String getSearch() {
return search;
}
public void s... |
C# | UTF-8 | 1,263 | 3.28125 | 3 | [] | no_license | using System;
using ExercicioFixaçãoExeções.Entities;
using ExercicioFixaçãoExeções.Entities.Exception;
namespace ExercicioFixaçãoExeções
{
class Program
{
static void Main(string[] args)
{
try
{
Console.WriteLine("Enter account data");
C... |
Markdown | UTF-8 | 4,886 | 3.125 | 3 | [] | no_license | ---
title: '20160328-听印第安纳大学王晓峰教授学术报告——安全领域的Big Data'
layout: post
tags:
- talk
- android
---
为时一个半小时的学术报告,还是蛮充实的,王晓峰教授的语速颇快,而且是中英夹杂的来说,他本人也解释说这个报告用英语做过很多次,这次是第一次尝试添加中文来说。所以很多时候需要快速的切换语境来理解他的意思,不过还蛮有趣,个别其他方向的专业词汇稍微不太理解。
王晓峰教授一开始提到的最多的词就是integration,一体化、整合、集成。也就是说现在的安全问题不是单单一个方面,需要面对很复杂的情况。列举了几个情况:
+ Cloud-Cl... |
Markdown | UTF-8 | 280 | 2.65625 | 3 | [] | no_license | # gender-and-age-prediction-using-keras
this model is trained on vgg19 and based on multi task learning.
To train the model to predict age and gender i created 5500 images dataset and trained it over 100 epochs.
gender accuracy reached upto 97% and age accuracy reached upto 70%.
|
Swift | UTF-8 | 1,349 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | /// A sequence that maps the base elements using `transform` and stops
/// when the transform returns `nil`.
public struct MapWhileSequence<Base: Sequence, A> {
internal let base: Base
internal let transform: (Base.Element) -> A?
}
extension MapWhileSequence {
/// An iterator that provides mapped elements ... |
Python | UTF-8 | 3,338 | 3.15625 | 3 | [] | no_license | import time
import random
#class Solution:
# def __init__(self):
# self.binary = self.BinaryTree()
# self.data = self.
global nodeNum
global incInteger
global count
class BinaryTree:
def __init__(self,rootObj):
self.key = rootObj
self.leftChild = None... |
Python | UTF-8 | 3,664 | 2.625 | 3 | [
"MIT"
] | permissive | import tensorflow as tf
import tensorflow.contrib as tc
import os
from collections import namedtuple
BatchedInput = namedtuple('BatchedInput',
['iterator', 'texts', 'text_lens', 'labels'])
def build_dataset(config, mode, char_vocab, label_vocab):
char_table = tc.lookup.index_table_from_... |
PHP | UTF-8 | 977 | 2.609375 | 3 | [] | no_license | <?php
session_start();
include_once("./library.php"); // To connect to the database
$con = new mysqli($SERVER, $USERNAME, $PASSWORD, $DATABASE);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$liid = $_GET['liid'];
$lname = $_GET['lname'];
$s... |
JavaScript | UTF-8 | 192 | 3.15625 | 3 | [] | no_license | function findElement(arr, func) {
let num = 0;
for (var i = 0; i < arr.length; i++) {
num = arr[i];
if (func(arr[i])) {
console.log(num);
}
} console.log(undefined);
}
|
JavaScript | UTF-8 | 1,828 | 2.640625 | 3 | [] | no_license | import firestore from '@react-native-firebase/firestore';
import storage from '@react-native-firebase/storage';
const fillProfilePicutreUri = async (employee) => {
const uri = await storage()
.refFromURL(
employee.profilePicture ||
'gs://carwash-40bc9.appspot.com/placeholder.jpg... |
Java | UTF-8 | 578 | 3.203125 | 3 | [] | no_license | class Solution {
public String intToRoman(int num) {
int[] values={1000,900,500,400,100,90,50,40,10,9,5,4,1};
String[] strs={"M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"};
StringBuilder brr = new StringBuilder();
for(int i=0;i<values.length;i++){
in... |
C++ | UTF-8 | 1,400 | 2.65625 | 3 | [] | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define MOD
#define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD)
typedef long long i64; typedef vector<int> ... |
JavaScript | UTF-8 | 4,327 | 2.59375 | 3 | [] | no_license | const drums = {
'bass-pedal': 'https://k007.kiwi6.com/hotlink/7q9gj2v6sn/kick002.wav',
'bass-drum': 'https://k007.kiwi6.com/hotlink/7q9gj2v6sn/kick002.wav',
'hi-hats': 'https://k007.kiwi6.com/hotlink/1kw3xv7kyd/HiHat_06.wav-9246-Free-Loops.com.mp3',
'hi-hats-pedal': 'https://k007.kiwi6.com/hotlink/1kw3xv7kyd/Hi... |
Java | UTF-8 | 1,175 | 1.875 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2015 "Henry Tao <hi@henrytao.me>"
*
* 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 ... |
C++ | UTF-8 | 3,005 | 2.859375 | 3 | [] | no_license | #include <cmath>
#include <iostream>
#include <set>
#include "../day_factory.hpp"
#include "station.hpp"
Point::Point() : id(0), x(0), y(0), r(0.0), phi(0.0) {}
Point::Point(int64_t _id, int64_t _x, int64_t _y, double _r, double _phi) :
id(_id), x(_x), y(_y), r(_r), phi(_phi) {}
Point Point::from_cartesian(int64_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.