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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,462 | 2.734375 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Computer Vision Tools for programmers"
description: "recommendation of computer vision libraries for application programmers"
comments: true
author: Junjue Wang
keywords: "computer vision, OpenCV, dlib, openVX"
---
# Computer Vision Tools for programmers
For application developers, especially ... |
Markdown | UTF-8 | 965 | 2.59375 | 3 | [] | no_license | ## Deep learning for differentiation of benign and malignant solid liver lesions on ultrasonography
### Running this project
This project can be initiated using simple scripts.
1. Inspect and edit the [`config.py`](./config.py) file to match your local installation preferences, i.e. where the project should expect ... |
C++ | UTF-8 | 1,341 | 2.84375 | 3 | [] | no_license | #ifndef __DBUTIL_H__
#define __DBUTIL_H__
#include <mysql.h>
#include "../util.hpp"
using namespace std;
class DBUtil{
public:
DBUtil();
~DBUtil();
int initDB(const string& server_host,const unsigned short port,const string& user,const string& passwd ,const string& db_name);
MYSQL_RES* ExecuteSQL(const string... |
PHP | UTF-8 | 416 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Artist extends Model
{
protected $table = 'artists';
protected $fillable = ['name'];
/**
* Get the vinyls for the artist.
*/
public function vinyls()
{
return $this->hasMany('App\Vinyl');
}
public funct... |
Java | UTF-8 | 1,716 | 2.609375 | 3 | [] | no_license | package com.example.liubiljett.handlers;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.example.liubiljett.classes.Post;
import com.example.liubiljett.R;
import ... |
Markdown | UTF-8 | 906 | 2.984375 | 3 | [] | no_license | # Project 9 - Drawing
https://www.hackingwithswift.com/100/swiftui/43
Includes solutions to the [challenges](https://www.hackingwithswift.com/books/ios-swiftui/drawing-wrap-up).
## Topics
Paths, shapes, strokes, transforms, drawing groups, animating values, Core Animation, Metal
## Challenges
From [Hacking with S... |
C++ | UTF-8 | 1,227 | 2.8125 | 3 | [] | no_license | /*
* This test prints encoder values to the Serial Monitor for both wheels
* To check, manually spin wheels and see if values change properly
*/
#include <VL6180X.h>
#include <i2c_t3.h>
#include <config.h>
#include <Encoder.h>
Encoder encoderLeft(pins::encoderL1, pins::encoderL2);
Encoder encoderRight(pins::encode... |
Markdown | UTF-8 | 4,309 | 3.40625 | 3 | [] | no_license | # Bayesian Knowledge Tracing Explainable
Bayesian Knowledge Tracing (BKT) is a ML algorithm used in many intelligent tutoring systems to model a student's "mastery" of a particular skill with a series of questions. While many learners rely on this algorithm to accurately model their learning, most do not actually unde... |
C++ | UTF-8 | 698 | 3.375 | 3 | [] | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
void sumNumbers(TreeNode* root, int res) {
int tmp = res*10 + root->val;
if(!ro... |
C++ | UTF-8 | 1,607 | 3.328125 | 3 | [
"MIT"
] | permissive | #ifndef _CIRC_FIFO_HPP
#define _CIRC_FIFO_HPP
#include "msp430/msp_sys.hpp"
template<class T, int _size, class _lock, class _unlock>
class FifoBuffer {
public:
bool push(const T data){
if(full()) {
return false;
}
//Put at the head of the buffer
--mHead;
mBuffer[mHead] = data;
//When we reach 0 wr... |
C# | UTF-8 | 1,058 | 2.65625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Common
{
[Serializable]
[DataContract]
public class DataStatistic
{
[DataMember]
public string ... |
PHP | UTF-8 | 1,031 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Blog;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
use Carbon\Carbon;
class Post extends Model implements SluggableInterface
{
use SluggableTrait;
protected $sluggable = [
'build_from' => ... |
Java | UTF-8 | 3,574 | 2.65625 | 3 | [] | no_license | package me.itsjaar.antielytra.utils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class ReflectionUtils {
ReflectionUtils() {
}
public static Object getHandle(Object obj) throws Exception {
Method method = obj.g... |
C++ | UTF-8 | 9,192 | 2.796875 | 3 | [
"MIT"
] | permissive | //
// Created by nivtal9 & AVI on 27.4.2020.
//
#include "solver.hpp"
#include <cmath>
#include <langinfo.h>
#include "math.h"
solver::RealVariable &solver::operator*(double DV1, solver::RealVariable &RV2) {
RealVariable &x= *new RealVariable(DV1*RV2.a , DV1*RV2.b, DV1*RV2.c);
return x;
}
solver::RealVaria... |
Markdown | UTF-8 | 2,811 | 2.96875 | 3 | [] | no_license |
# pyABCDobj ##
* rev 2 2014-03-10
* a object oriented framework to calculate the propagation of gaussian beams
* provides 2 Classes:
* **GaussianBeam** - to calculate the beam parameters
* **LensSystem** - to calculate the propagation using the ABCD formalism
## class GaussianBeam ##
* **initialization**
... |
Java | UTF-8 | 1,977 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2016 Sascha Haeberling
*
* 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 ... |
JavaScript | UTF-8 | 1,363 | 3.78125 | 4 | [] | no_license | var myHeading = document.querySelector('h1');
// Grab reference to the heading and store it in a variable
// This is very similar to what we did using CSS selectors.
// When wanting to do something to an element, you first need to select it.
myHeading.textContent = 'Hello, world!';
// Set the value of the myHeading var... |
JavaScript | UTF-8 | 109 | 2.796875 | 3 | [] | no_license | //undefined
//declared but not defined is undefined
//
var a;
console.log(a);
var b = 10;
console.log(b);
|
Python | UTF-8 | 303 | 2.640625 | 3 | [] | no_license | import re
import unicodedata
from text_processors.text_processor import TextProcessor
class WhitespaceCharactersProcessor(TextProcessor):
def process(self, text):
pattern = r'^\s*|\s\s*'
text = re.sub(pattern, ' ', text).strip()
return TextProcessor.process(self, text)
|
C++ | UTF-8 | 658 | 2.8125 | 3 | [] | no_license | //#include<iostream>
#include<iostream>
#include <stdlib.h>
#include"TagParser.hpp"
using std::cout;
void TagParser::ParseNextLine(string line)
{
Bracket b(line);
if(b.IsOpening()) // opening tag
{
if(tags.size()>0)
{
if( tags.back().HasBeenClosed() ) tags.push_back( Tag(b... |
Python | UTF-8 | 1,984 | 4.0625 | 4 | [] | no_license | # class Person:
# def __init__(self,name,age,weight,height):
# self.name = name
# self.age = age
# self.weight = weight
# self.height = height
# self.__score = 70
# #将某个方法伪装成属性,这个方法需要有返回值
# # @property
# # def bmi(self):
# # return self.weight/(self.height... |
PHP | UTF-8 | 8,035 | 2.5625 | 3 | [] | no_license | <?php
include ('inc/init.inc.php');
if (isset($_GET['id'])){
$requete = "SELECT a.id_vehicule, marque, modele, couleur, immatriculation, prenom, nom
FROM association_vehicule_conducteur as a
INNER JOIN conducteur as c ON a.id_conducteur=c.id_conducteur
INNER JOIN vehicule as v ON a.id_vehicule=v.id_vehi... |
Markdown | UTF-8 | 3,875 | 2.578125 | 3 | [] | no_license | FXZ
===
A recreation of sfxr. Wish me luck! All credit for the synth goes to [Dr. Petter](http://www.drpetter.se/project_sfxr.html),
I just ported a port and wrote down a binary format :)
Goals
-----
- [ ] An embeddable synthesizer in < 1kb js (minified and gzipped)
- [x] A binary format for saving and loading effec... |
Python | UTF-8 | 3,145 | 2.515625 | 3 | [] | no_license | import numpy as np
import cv2
import utils
from skimage.measure import compare_ssim as ssim
from detection_attempts.att_1.detect_on_video import (get_capture_and_calibration_image_video2, Calibrator, Detector,
CvNamedWindow, detect_and_show)
"""
- fast mean ellipse... |
TypeScript | UTF-8 | 6,041 | 3.21875 | 3 | [
"MIT"
] | permissive | import { expect } from "chai";
import Lazy from "../../src";
import { asyncGenerator } from "../helpers";
describe("ƒ join()", function () {
it("should join numbers with comma and space", function () {
const result = Lazy.from([1, 2, 3]).join(", ");
expect(result).to.be.equal("1, 2, 3");
});
... |
C# | UTF-8 | 1,699 | 3.59375 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace _10._Car_Salesman
{
public class Car
{
public string Model { get; private set; }
public Engine Engine { get; private set; }
public int Weight { get; set; }
public string Color { get; set; }
... |
Python | UTF-8 | 103 | 3.671875 | 4 | [] | no_license | fahrenheit = float(input("enter your fahrenheit:"))
celsius = (fahrenheit - 32) * 5 / 9
print(celsius)
|
Java | UTF-8 | 2,202 | 2.4375 | 2 | [] | no_license |
package com.mobilemarket.sessionBeans;
import com.mobilemarket.beans.model.Osoba;
import java.util.List;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import ... |
Python | UTF-8 | 14,500 | 2.84375 | 3 | [] | no_license | import numpy as np
from numpy.polynomial.chebyshev import chebval2d
import scipy.ndimage.filters
from . import psf
from . import utils
# Okay, here we start the A&L basis functions...
# Update: it looks like the actual code in the stack uses chebyshev1 polynomials!
# Note these are essentially the same but with diffe... |
JavaScript | UTF-8 | 1,878 | 3.8125 | 4 | [] | no_license | //----------- DOM INTRODUCTION ------------
const boxes = document.getElementsByTagName('div');
boxes[1].innerHTML = "<p>DOM Introduction</p>";
boxes[2].innerHTML = "<button>Submit</button>";
boxes[3].innerHTML = "<h3>Good Bye</h3>";
// ----------------------------------------
const box1 = document.getElementById('b... |
Java | UTF-8 | 522 | 3.25 | 3 | [] | no_license | package easy.array;
public class Easy977 {
public int[] sortedSquares(int[] A) {
int[] r = new int[A.length];
int start = 0;
int end = A.length-1;
for(int i=r.length-1; i>=0; i--) {
boolean endBigger = Math.abs(A[end]) > Math.abs(A[start]);
if (endBigger) {
... |
Java | UTF-8 | 748 | 2.375 | 2 | [] | no_license | package web;
import bean.Address;
import dao.AddressDao;
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 java.io.IOException;
@WebServlet("/Del... |
TypeScript | UTF-8 | 5,974 | 2.53125 | 3 | [] | no_license | import * as http from 'http-status-codes';
import * as logic from './logicHandlers';
import { RouteDefinition, StoreInterface, DataStoreType } from 'src/types';
export const get: { [key: string]: RouteDefinition } = {
getConfigs: {
route: '/configs',
callback: (req, res) => {
console.log('getting confi... |
C++ | UTF-8 | 2,914 | 3.171875 | 3 | [] | no_license | /*
차세대 영농인 한나는 강원도 고랭지에서 유기농 배추를 재배하기로 하였다. 농약을 쓰지 않고 배추를 재배하려면 배추를 해충으로부터
보호하는 것이 중요하기 때문에, 한나는 해충 방지에 효과적인 배추흰지렁이를 구입하기로 결심한다.
이 지렁이는 배추근처에 서식하며 해충을 잡아 먹음으로써 배추를 보호한다.
특히, 어떤 배추에 배추흰지렁이가 한 마리라도 살고 있으면 이 지렁이는 인접한 다른 배추로 이동할 수 있어,
그 배추들 역시 해충으로부터 보호받을 수 있다.
(한 배추의 상하좌우 네 방향에 다른 배추가 위치한 경우에 서로 인접해있다고 간주한다)
한나가 배추를 재배하... |
Java | UTF-8 | 60 | 1.539063 | 2 | [
"Apache-2.0"
] | permissive | package o;
public abstract interface cg
extends cd.iF
{}
|
C++ | GB18030 | 3,255 | 2.671875 | 3 | [] | no_license | #pragma once
#include <string>
#include <sys/uio.h>
#include <functional>
namespace vDB {
/*
* db_storeĺϷ־
* INSERT
* REPLACE滻
* STORE滻
*/
enum DB_STORE_FLAG{STORE_MIN_FLAG, DB_INSERT, DB_REPLACE, DB_STORE, STORE_MAX_FLAG};
const int kIndex_min = 6; //indexСΪ6keysepstartseplength\n
const int kIndex_max = 1... |
Java | UTF-8 | 9,809 | 2.09375 | 2 | [] | 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 View;
import Controller.PujaController;
import Model.Puja;
import java.sql.SQLException;
import java.util.ArrayList;
import ja... |
Markdown | UTF-8 | 1,334 | 3.65625 | 4 | [] | no_license | **题目描述**
Given *n* non-negative integers *a1*, *a2*, ..., *an* , where each represents a point at coordinate (*i*, *ai*). *n* vertical lines are drawn such that the two endpoints of line *i* is at (*i*, *ai*) and (*i*, 0). Find two lines, which together with x-axis forms a container, such that the container contai... |
JavaScript | UTF-8 | 12,668 | 2.609375 | 3 | [] | no_license |
//step 1: function to instantiate the Leaflet map
function createMap(){
// var southWest = L.latLng(44.893141, -93.327398),
// northEast = L.latLng(45.013166, -93.118221),
// bounds = L.latLngBounds(southWest, northEast);
//create the map
var map = L.map('map', {
center: [0, 0],
... |
PHP | UTF-8 | 4,713 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/10/28 0028
* Time: 上午 11:18
*/
namespace gyo2o\dao;
use gyo2o\model\Common;
use think\Db;
use think\Model;
class RiderDao extends Model
{
// 表名
protected $name = 'rider';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
... |
Python | UTF-8 | 5,134 | 3.34375 | 3 | [] | no_license | # coding: utf-8
import csv
import matplotlib.pyplot as plt
from datetime import datetime as dt
import matplotlib.dates as md
import pandas as pd
from datetime import timedelta as td
def read():
dates = []
values = []
with open('000001-clip.csv', 'rb') as f:
lines = csv.reader(f)
for row i... |
Python | UTF-8 | 1,424 | 2.828125 | 3 | [] | no_license | # -*- coding:utf-8 -*-
import math
import re
rp = re.compile("[\t ]")
def dist(x1, x2):
return math.sqrt(sum((x1[i] - x2[i]) ** 2 for i in xrange(0, len(x1))))
def getNeighborsCount(xs, x0, r):
return len(getNeighbors(xs, x0, r))
def getNeighbors(xs, x0, r):
l = list()
set((l.app... |
Python | UTF-8 | 254 | 3.8125 | 4 | [] | no_license | #Задание 4
from itertools import chain
def up_and_down(n): # 1,2, ..., n, ..., 2, 1
return chain(range(1, n), range(n, 0, -1))
def diamond(n):
for i in up_and_down(n):
print((n-i)*' ', *up_and_down(i), sep='')
print(diamond(3)) |
Java | UTF-8 | 619 | 1.867188 | 2 | [] | no_license | package com.google.android.exoplayer2.source.dash;
/* compiled from: lambda */
/* renamed from: com.google.android.exoplayer2.source.dash.-$$Lambda$DashMediaSource$e1nzB-O4m3YSG1BkxQDKPaNvDa8 */
public final /* synthetic */ class C0207-$$Lambda$DashMediaSource$e1nzB-O4m3YSG1BkxQDKPaNvDa8 implements Runnable {
priv... |
Java | UTF-8 | 12,666 | 1.734375 | 2 | [] | no_license | package com.sccodesoft.schoolfinder;
import android.Manifest;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Address;
import android.location.Geocoder;
import android.locati... |
Java | UTF-8 | 2,416 | 1.96875 | 2 | [
"MIT"
] | permissive | package com.zenden2k.VfFrameworkIdeaPlugin.reference;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.*;
import com.intellij.psi.xml.XmlFile;
import com.in... |
C | UTF-8 | 2,181 | 3.96875 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
typedef int ElementType;
#define MinData -1
typedef struct HeapStruct *PriorityQueue;
struct HeapStruct {
ElementType *Elements;
int Capacity;
int Size;
};
PriorityQueue Initialize( int MaxElements ); /* details omitted */
void PercolateUp( int p, PriorityQueue H ... |
C# | UTF-8 | 4,600 | 2.546875 | 3 | [] | no_license |
namespace Admin.Books
{
using Admin.Helpers;
using BL.Managers;
using DAL.Entities;
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
using BL.Constants;
public partial class Manage : System.Web.UI.Page
{
protected void Page_Load(ob... |
Java | UTF-8 | 1,070 | 3.828125 | 4 | [] | no_license | package com.lec.java.collection10;
import java.util.Iterator;
import java.util.TreeSet;
public class Collection10Main {
public static void main(String[] args) {
System.out.println("TreeSet 연습");
// String 타입을 저장할 수 있는 TreeSet 인스턴스 생성
// 5개 이상의 데이터를 저장해보고
// 오름차순, 내림차순으로 출력해보기
TreeSet<Strin... |
PHP | UTF-8 | 1,250 | 2.515625 | 3 | [] | no_license | <html>
<body>
<head>
<title>AYAYA Ayoub</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?fa... |
Markdown | UTF-8 | 12,137 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | # AWS Custom Namespace Monitoring Extension
## Use Case
Captures Custom Namespace statistics from Amazon CloudWatch and displays them in the AppDynamics Metric Browser.
Before you configure this extension, you can take a look [here](https://developer.cisco.com/codeexchange/explore/#products=AppDynamics%20Extension) t... |
Python | UTF-8 | 719 | 2.9375 | 3 | [
"MIT"
] | permissive | import pyb
from pyb import LED
l1 = pyb.LED(1)
l2 = pyb.LED(2)
l3 = pyb.LED(3)
l4 = pyb.LED(4)
leds = [LED(i) for i in range(1, 5)]
pwm_leds = leds[2:]
# test printing
for l in leds:
print(l)
# test on and off
for l in leds:
l.on()
assert l.intensity() == 255
pyb.delay(100)
l.off()
assert l.... |
Markdown | UTF-8 | 1,338 | 2.921875 | 3 | [
"MIT"
] | permissive | # koa-lvcnf
Koa middleware for [lvcnf](https://npmjs.com/package/lvcnf).
--------
## Installation
`npm i koa-lvcnf`
## Usage
```javascript
const Koa = require('koa')
const app = new Koa()
const Config = require('lvcnf')
const koaConfig = require('koa-lvcnf')
// config instance to pass into the middleware
const c... |
PHP | UTF-8 | 1,938 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace PhpBrew\Tests;
use PhpBrew\ReleaseList;
use PHPUnit\Framework\TestCase;
/**
* @small
*/
class ReleaseListTest extends TestCase
{
public $releaseList;
protected function setUp(): void
{
$this->releaseList = new ReleaseList();
$this->releaseList->loadJsonFile(__DIR__ . '/... |
Java | UTF-8 | 27,108 | 2.328125 | 2 | [] | no_license | package UI;
import Java.*;
import java.awt.Frame;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.swing.JOptionPane;
public class Master_Customer extends javax.swing.JDialog {
// Object
private Connect connection;
// priva... |
C++ | UTF-8 | 923 | 2.640625 | 3 | [] | no_license | #ifndef SHAREDIMAGEBUFFER_H
#define SHAREDIMAGEBUFFER_H
#include <set>
#include <mutex>
#include <condition_variable>
#include <unordered_map>
#include <map>
#include <opencv2/core/mat.hpp>
#include "Buffer.h"
using namespace std;
class SharedImageBuffer
{
public:
SharedImageBuffer();
void add(int deviceNum... |
PHP | UTF-8 | 5,039 | 2.78125 | 3 | [] | no_license | <?php
/**
* Abreeza Scraper
*
* Parses schedules for Abreeza.
*
* @package Silver
* @author brux
* @since 0.1.0
*/
namespace App\Scrapers;
use App\Exceptions\ParseException;
use Carbon\Carbon;
class Abreeza extends Base
{
const SLUG = 'abreeza';
/**
* The page we will be scraping.
*
* @var s... |
Markdown | UTF-8 | 3,409 | 3.28125 | 3 | [] | no_license | ## URL
[Lecture 4: Reinforcement Learning Introduction](http://rail.eecs.berkeley.edu/deeprlcourse/static/slides/lec-4.pdf)
## Notes ~Introduction to Reinforcement Learning~
### Definition of a MDP
$$
M = \{S, T \} \\
S: \text{State space(discrete or continuous) , } s \in S \\
A: \text{Action space(discrete or c... |
Python | UTF-8 | 6,965 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | import itertools
import pprint
import copy
import numpy as np
from shapely import geometry
from shapely.strtree import STRtree
from .join import Join
from ..ops import insert_coords_in_line
from ..ops import fast_split
from ..ops import np_array_from_lists
from ..ops import select_unique_combs
from ..utils import seria... |
Java | UTF-8 | 3,770 | 3.21875 | 3 | [] | no_license | package part1;
import java.util.*;
public class FlatFields {
// public int flatFields (int numRows, int numColumns, List<List<Integer>> fields) {
//
// }
public static int cutTreeInGolf(int[][] golf) {
// corner case
if (golf == null || golf.length == 0 || golf[0].length == 0) return 0;
... |
TypeScript | UTF-8 | 3,696 | 2.890625 | 3 | [] | no_license | import {Article} from './article';
import {List} from '@everest/collections';
import {Customer} from './customer';
export class Order extends List<OrderItem> {
id: number;
registrationDate = Date.now();
public itemCount = 0;
public price = 0;
private _payment = 0;
public customer: Customer;
public pay... |
JavaScript | UTF-8 | 3,134 | 3.046875 | 3 | [] | no_license | (function($){
/* const menuV= $('.accordion_menu_v');
const menuDd = menuV.find('dd'); */
// 1. 이렇게 줄 경우에는 홈페이지에 접속할 경우 내용의 잔상이 보일 수 있음 (css에서 display:none을 주지 않고 했을 때)
// 2. 첫번째 메뉴 내용만 펼쳐놓고 나머지 내용들을 감추고 시작했을 때 자바코드
const menuV= $('.accordion_menu_v');
const menuDt = menuV.find('dt');
const menuDd = ... |
Python | UTF-8 | 1,556 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env python
# split a multi-genbank file into fasta, plus associated metadata
# Matthew J. Neave 05.12.2018
import sys
from Bio import SeqIO # requires biopython
gb_file = sys.argv[1]
meta_file = open(sys.argv[2], "w")
for record in SeqIO.parse(open(gb_file), "genbank"):
try:
country = record.... |
Markdown | UTF-8 | 6,363 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | # MatlabRenderer
MatlabRenderer is an offscreen renderer written entirely in pure Matlab with no dependencies. It is based on deferred shading, so provides a rasteriser based on z-buffering. It supports texture/normal mapping, shadowing, visibility and orthographic/perspective/perspective+distortion camera models. It ... |
SQL | UTF-8 | 2,608 | 3.15625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: stokproje
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
Python | UTF-8 | 223 | 3.859375 | 4 | [] | no_license | print('Enter the first number to add: ')
first = input()
print('Enter the second number to add: ')
second = input()
print('Enter the third number to add: ')
third = input()
total = (first) + (second) + (third)
print(total)
|
Markdown | UTF-8 | 3,708 | 2.796875 | 3 | [] | no_license | ---
description: 'https://wiki.polkadot.network/docs/en/maintain-guides-how-to-vote-councillor'
---
# Voting for Council
## Intro <a id="__docusaurus"></a>
The council is an elected body of on-chain accounts that are intended to represent the passive stakeholders of Edgeware. The council has two major tasks in gover... |
C++ | UTF-8 | 401 | 2.53125 | 3 | [] | no_license | #pragma once
#ifndef __CLOUDS__
#define __CLOUDS__
#include "DisplayObject.h"
#include "TextureManager.h"
class Clouds final : public DisplayObject
{
public:
Clouds();
~Clouds();
// Life Cycle Functions
void draw() override;
void update() override;
void clean() override;
int getClouds();
vo... |
JavaScript | UTF-8 | 1,642 | 2.609375 | 3 | [] | no_license | import React from 'react';
import browserHistory from 'react-router';
class SampleForm extends React.Component{
constructor(props){
super(props);
this.state = {
firstName: '',
lastName: '',
status : ''
}
}
handleInputChange = (e) =>{
this.setState({
[e.target.name] : e.target.value
})
}
ha... |
Python | UTF-8 | 1,128 | 3.015625 | 3 | [] | no_license | from fractions import gcd
import itertools
import math
class ThePermutationGame:
def lcm(self, a, b):
return a * b / gcd(a, b)
def findMin(self, N):
return reduce(self.lcm, range(1, N + 1)) % 1000000007
def rangeLCM(self, last):
factors = range(last+1)
result = 1
for n in range(1, last+1):... |
Java | UTF-8 | 1,207 | 2.21875 | 2 | [] | no_license | package com.mogawe.mosurvei.model.db.entity;
import androidx.room.PrimaryKey;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
public class Product implements Serializable {
@PrimaryKey(autoGenerate = true)
private int id;
@Serial... |
Python | UTF-8 | 984 | 3.5 | 4 | [] | no_license | """------------------------------------------------------------------
PyParagraph
Mario Vicente Martinez E.
2020-04-13
------------------------------------------------------------------"""
import os, re
ofile = input("Please type a filename with extension in Resources Directory ")
text = os.path.join("Resources/",ofil... |
Python | UTF-8 | 617 | 2.625 | 3 | [] | no_license | input_data = open('/Users/MaNTi/Desktop/A-large.in')
input_data= input_data.read().splitlines()
T = int(input_data[0])
f = open('outputlarge.in','w')
for each in range(1,T+1):
map1 = [0,0,0,0,0,0,0,0,0,0]
counter = 1
num = int(input_data[each])
if num ==0:
f.write("Case #"+str(each) +': '+ "I... |
Java | UTF-8 | 358 | 3.1875 | 3 | [] | no_license | package queue;
import java.util.LinkedList;
public class Queue<T> {
private LinkedList<T> list = new LinkedList<T>();
public void insert(T item) {
list.addLast(item);
}
public T delete() {
return list.poll();
}
public boolean hasItems() {
return !list.isEmpty();
}
public int s... |
Java | UTF-8 | 764 | 1.84375 | 2 | [] | no_license | package gov.hrm.config;
import javax.annotation.PostConstruct;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;
@Component
public class ApplicationStartUp {
private Logger log = LogManager.getLogger();
/*@Autowired
... |
C | UTF-8 | 2,107 | 3.546875 | 4 | [] | no_license | #pragma warning(disable:4996)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define true 1
#define false 0
typedef int bool;
typedef struct deque
{
struct deque *prev;
struct deque *next;
int data;
}deque;
bool isEmpty(deque *front, deque *rear)
{
return front == NULL && rear == NULL;
}
deque* all... |
C++ | WINDOWS-1251 | 1,725 | 3.359375 | 3 | [] | no_license | #include "pch.h"
#include "TRectangle.h"
//
void TRectangle::setSides(double a, double b)
{
setA(a);
setB(b);
} // TRectangle::setSides
//
void TRectangle::setA(double a)
{
if (a <= 0)
throw exception(" A");
this->a_ = a;
} // TRectangle::setA
void TRectangle::setB(double b)
{
... |
Markdown | UTF-8 | 6,060 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | # Pasargad php-rest-sdk
PHP package to connect your application to Pasargad Internet Payment Gateway through RESTful API
# Installation
For installation, use `composer` package:
```bash
$ composer require pepco-api/php-rest-sdk
```
# Usage
- To Read API Documentation, [Click Here! (دانلود مستندات کامل درگاه پرداخت)... |
Java | UTF-8 | 432 | 1.65625 | 2 | [] | no_license | package vip.bigeye.blog.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import vip.bigeye.blog.vo.Text;
import java.io.Serializable;
import java.util.List;
/**
* @Author wolf VX:a815193474
* @Date 2019-08-28 22:28
*/
public interface TextDa... |
C++ | UTF-8 | 1,205 | 2.84375 | 3 | [
"MIT"
] | permissive | /*
* PCAssignment.cpp
*
* Created on: 2012-05-09
* Author: e4k2
*/
#include <cstdio>
#include "PCAssignment.h"
#include "PseudoContact.h"
#include "Score.h"
#include "NOE.h"
PCAssignment::PCAssignment() : noe(0), pc(), score()
{
}
PCAssignment::PCAssignment(NOE* n, const PseudoContact& p, const Score& s) ... |
C++ | UTF-8 | 598 | 3.03125 | 3 | [
"MIT"
] | permissive | #pragma once
#include "BaseExercise.h"
// abstract class definition for Cardio. Inherits from BaseExercise
class Cardio : public BaseExercise
{
public:
// Cardio class constructor
Cardio(double time, double dist, double lbs);
// procedure to set distance
void setDistance(double dist);
// procedure to set speed... |
Java | UTF-8 | 1,951 | 3.515625 | 4 | [] | no_license | package net.bishnu.leetcode.wordSquares;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
/**
* 425. Word Squares
* https://leetcode.com/problems/word-squares/#/description
* Created by karlb on 2017-04-02.
*/
public class WordSquares {
private class Node{
List<String> w... |
C++ | UTF-8 | 1,222 | 2.84375 | 3 | [] | no_license | #ifndef LAZOR_H
#define LAZOR_H
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include "GameObject.hpp"
#include "Texture.hpp"
class Lazor: public GameObject
{
double frame;
glm::vec3 direction;
bool isDescending;
float speed;
public:
size_t g... |
Java | UTF-8 | 36,645 | 1.890625 | 2 | [
"MIT"
] | permissive | package de.tum.in.www1.artemis.programmingexercise;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import java.time.ZonedDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;... |
Java | UTF-8 | 465 | 3.453125 | 3 | [] | no_license | package basics;
public class Selection_Sort {
public static void main(String[] args) {
int[] arr= {11,2,3,4,5,6};
for(int i=0;i<arr.length;i++) {
int min=i;
for(int j=i+1;j<arr.length;j++) {
if(arr[j]<arr[min]) {
min=j;
}
}
int temp=arr[min];
arr[min]=arr[i];
arr[i]=temp... |
Shell | UTF-8 | 221 | 3.0625 | 3 | [
"MIT"
] | permissive | #!/bin/bash
minimumMem=400
while true; do
totalk=$(awk '/^MemFree:/{print $2}' /proc/meminfo)
if [ "$totalk" -lt "$minimumMem" ]
then
bash /root/tma/scripts/parse_files.sh
fi
sleep 30
done
|
PHP | UTF-8 | 8,192 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Endroid\QrCode\Builder;
use Endroid\QrCode\Color\ColorInterface;
use Endroid\QrCode\Encoding\EncodingInterface;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelInterface;
use Endroid\QrCode\Exception\ValidationException;
use Endroid\QrCode\Label\Alignment\LabelAli... |
JavaScript | UTF-8 | 1,152 | 2.59375 | 3 | [] | no_license | /**
* Track Jetpack social shares as Google Analytics Social Interactions
* https://github.com/gregoryfoster/jetpack-shares-google-analytics
*
* Adapted from:
* https://gist.github.com/devinsays/e9a5a42c1416b16f8bae#file-tracking-js
*/
jQuery(document).ready((function($){
if( typeof(ga) == 'function' ){
var... |
C# | UTF-8 | 1,933 | 2.90625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace SaltConfigTester
{
public enum ReportType
{
AttributeNotFound = 1,
AttributeFound = 2,
}
public static class ReportOutput
{
private static int LongestKeyname
... |
JavaScript | UTF-8 | 1,627 | 2.515625 | 3 | [] | no_license | const { hash } = require('../person/helper');
const AccountTable = require('../account/table');
const PersonTable = require('../person/table');
class RegisterAccount {
static storeAccount( { accountName, username, password } ) {
return new Promise((resolve, reject) => {
const usernameHash = has... |
Python | UTF-8 | 645 | 2.578125 | 3 | [] | no_license | fo = open('D-large.out', 'w')
data = open('D-large.in').readlines()
print (data)
num = int(data[0].strip())
for z in range(1, num + 1):
n = data[(z - 1) * 3 + 2].split()
k = data[(z - 1) * 3 + 3].split()
for i in range(len(n)):
n[i] = float(n[i])
k[i] = float(k[i])
n = sorted(n, reverse=True)
k = sorted(k, rev... |
Java | UTF-8 | 1,526 | 1.984375 | 2 | [] | no_license | package com.ansel.coountrynews.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.v... |
Java | UTF-8 | 55,114 | 1.96875 | 2 | [] | 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.
*/
/**
*
* @author Jose
*/
import java.text.*;
import java.awt.print.*;
import java.awt.event.*;
import java.awt.*;
import java.util.G... |
C | UTF-8 | 6,042 | 2.84375 | 3 | [
"MIT"
] | permissive | //
// Created by eugen on 5/6/2017.
//
#include "parser.h"
void
xtra_parser_brackets_exchage(xtra_parser_brackets_p brackets, xtra_sign_p sign)
{
enum xtra_sign_e type = sign->type;
if (type == XTRA_SIGN_SQUARE_L) {
brackets->square++;
} else if (type == XTRA_SIGN_SQUARE_R) {
... |
TypeScript | UTF-8 | 811 | 2.71875 | 3 | [
"MIT"
] | permissive | import { useState, useEffect, RefObject } from 'react';
function useHover(ref: RefObject<HTMLElement>) {
const [isHovering, setIsHovering] = useState(false);
useEffect(() => {
if (!ref.current) {
return;
}
const setHoveringTrue = () => setIsHovering(true);
const setHoveringFalse = () => s... |
Python | UTF-8 | 2,174 | 3.046875 | 3 | [] | no_license | import threading
import logging
import random
import time
from regionCondicional import *
logging.basicConfig(format='%(asctime)s.%(msecs)03d [%(threadName)s] - %(message)s', datefmt='%H:%M:%S', level=logging.INFO)
class miRecurso (Recurso):
# hereda de Recurso, porqué allí se encuentra el mutex y su logica corr... |
Markdown | UTF-8 | 5,600 | 3.078125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Overview of Azure Relay .NET Standard APIs | Microsoft Docs
description: This article summarizes some of the key an overview of Azure Relay Hybrid Connections .NET Standard API.
ms.topic: article
ms.custom: devx-track-csharp, devx-track-dotnet
ms.date: 08/10/2023
---
# Azure Relay Hybrid Connections .NET St... |
Markdown | UTF-8 | 2,913 | 3.40625 | 3 | [
"MIT"
] | permissive | ---
title: ספירה לאחור
date: 20/09/2021
---
כאשר ישבו על הר הזיתים, צייר ישוע במשיכות מכחול רחבות את מהלך ההיסטוריה, כמענה לשאלות תלמידיו: “ הַגֵּד נָא לָנוּ מָתַי יִהְיֶה הַדָּבָר הַזֶּה וּמַה הוּא אוֹת בּוֹאֲךָ וְקֵץ הָעוֹלָם? ” (מתי כ”ד: 3).
דרשתו המפורסמת של ישוע במתי כ"ד, עוברת ברציפות על ציר הזמן ההיסטורי מימ... |
PHP | UTF-8 | 4,978 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
/**
* File handling utility class
*
* @author Frederic BAYLE
*/
namespace FastTrack\IO;
use FastTrack\ObjectBase;
/**
* File handling utility class
*
* @property-read bool $EOF Get a flag that determines whether the end of file has been reached
*/
class File extends ObjectBase {
/**
* File openi... |
TypeScript | UTF-8 | 743 | 2.90625 | 3 | [
"MIT"
] | permissive | // @ts-nocheck
import { DIError } from './error';
export function getParentClass(klass) {
return Object.getPrototypeOf(klass);
}
/* eslint-disable */
const STRING_CAMELIZE_REGEXP_1 = /(\-|\_|\.|\s)+(.)?/g;
const STRING_CAMELIZE_REGEXP_2 = /(^|\/)([A-Z])/g;
// Transfrom string to camel case, from Ember String
expor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.