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 | 4,171 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | # Pre-work - CodePath TodoApp
**Listagram** is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.
Submitted by: **Rahul Doshi**
Time spent: **10** hour(s) spent in total
## User Stories
The following **req... |
Java | UTF-8 | 13,036 | 2.25 | 2 | [] | no_license | package com.forthelight.controller;
import com.forthelight.biz.CollegeBiz;
import com.forthelight.biz.MajorBiz;
import com.forthelight.biz.StudentBiz;
import com.forthelight.biz.StudentCommentCourseBiz;
import com.forthelight.domain.College;
import com.forthelight.domain.Major;
import com.forthelight.domain.Student;
i... |
Markdown | UTF-8 | 469 | 2.578125 | 3 | [
"MIT"
] | permissive | # affirmeep
##### Express JS Demo API
Two endpoints available:
***/***
Returns Hello World
***/affirmations***
Gives you a random affirmation
## Quick Start
Install dependencies:
```bash
$ npm install
```
Start the server:
```bash
$ npm start
```
View the website at: http://localhost:3000
## Test... |
Python | UTF-8 | 2,149 | 2.640625 | 3 | [] | no_license | import numpy as np
from sklearn.ensemble import RandomForestClassifier
import threading
from joblib import Parallel, delayed
class BalancedRFClassifier(RandomForestClassifier):
def predict_proba(self, X):
"""Predict class probabilities for X.
The predicted class probabilities of an input sample ... |
JavaScript | UTF-8 | 307 | 3.8125 | 4 | [] | no_license | //Assigment loop
let foods = ["tomato", "broccoli", "kale", "cabbage", "apple"]
//forLoop
function forLoop(arr){
for(let i = 0; i < foods.length; i++){
if(foods[i]!="apple"){
console.log(`${foods[i]} is a healthy food, it's definitely worth to eat.`)
}
}
}
//forEach
|
Markdown | UTF-8 | 278 | 2.53125 | 3 | [] | no_license | # PollApp
A platform which allows users to share their oppinions in various (more or less important) matters via short poll method. User can take part in as many polls as he or she wants. Users can also create their own questions and see what the world thinks about the issues.
|
Java | UTF-8 | 671 | 1.914063 | 2 | [] | no_license | package com.example.scholaedu;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
public class GrupFragment extends Fragment {
private Tex... |
Java | UTF-8 | 309 | 2.203125 | 2 | [
"Apache-2.0"
] | permissive | package tamil.lang.api.expression;
import tamil.lang.exception.service.ServiceException;
/**
* Created by velsubra on 11/30/16.
*/
public interface BinaryOperator<T> {
public OperatorDefinition getOperator();
public Operand<T> perform(Operand<T> left, Operand<T> right) throws ServiceException;
}
|
Java | UTF-8 | 773 | 1.953125 | 2 | [] | no_license | package com.olxchallenge.pages.login;
import com.olxchallenge.framework.AbstractPage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class LoginPage extends AbstractPage{
public LoginPage(WebDriver driver) {
super(driver);
}
public void login(){
getEle... |
Python | UTF-8 | 444 | 3.953125 | 4 | [] | no_license | #!/usr/bin/env python
def Function(x, y, z=20):
return (x + y + z);
print "Sum: {}".format(Function(1, 5, 10))
print "Sum: {}".format(Function(x=1, y=5))
print "Sum: {}".format(Function(1, y=5, z=20))
print "Sum: {}".format(Function('I', ' am', ' Groot'))
print "Sum: {}".format(Function([1], [5], [100]))
list = ... |
C++ | UTF-8 | 391 | 2.609375 | 3 | [] | no_license | #include "Startmenu.hpp"
// Starts te Start Menu.
void StartMenu::StartMenuLoop(){
hwlib::wait_ms(500);
displayText
<< "\f" << "Press Button "
<< "\n" << "to start " << hwlib::flush;
for(;;){
hwlib::wait_ms(20);
if(!continueButton.read()){
displayText
<< "\n" << "Button Pressed. "
<< "\n" << "Loadi... |
Java | UTF-8 | 3,157 | 3.265625 | 3 | [] | no_license | package Patterns.week3.fileio;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Stream;
/*
Sinds versie 7 kent Java try-with-resources. De syntax hiervan is als volgt:
1... |
Swift | UTF-8 | 1,385 | 2.703125 | 3 | [] | no_license | //
// WebService.swift
// FlickrApes
//
// Created by Shahin on 2018-05-27.
// Copyright © 2018 98%Chimp. All rights reserved.
//
import Foundation
import Alamofire
class WebService
{
typealias Keys = Constants.Web.Keys
typealias Paths = Constants.Web.Paths
static func searchPhotos(for tags: Stri... |
Python | UTF-8 | 6,163 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | """
Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\
fujifilm_flog` module.
"""
import numpy as np
import unittest
from colour.models.rgb.transfer_functions import (
log_encoding_FLog,
log_decoding_FLog,
)
from colour.utilities import domain_range_scale, ignore_numpy_errors
__autho... |
Java | UTF-8 | 1,154 | 2.046875 | 2 | [] | no_license | package com.silverpeas.mobile.server.services;
import org.silverpeas.core.date.Date;
import org.silverpeas.core.socialnetwork.model.SocialInformation;
import org.silverpeas.core.socialnetwork.model.SocialInformationType;
import org.silverpeas.core.socialnetwork.provider.ProviderSwitchInterface;
import org.silverpeas.c... |
SQL | UTF-8 | 4,180 | 3.15625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.17 - MySQL Community Server - GPL
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- ------------------------------------------------------... |
Swift | UTF-8 | 993 | 3.921875 | 4 | [
"MIT"
] | permissive | //
// main.swift
// COWWrapper
//
// Created by Alexander Rubtsov on 21.06.2021.
// Реализовать COW reference type объекта в своей структуре
import Foundation
//Simple class
class Car {
enum Model {
case Porsche
case lamborghini
case Lada
}
var model: Model
in... |
PHP | UTF-8 | 497 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Subject;
use Illuminate\Database\Seeder;
class SubjectSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Subject::create(['subject' => 'English']);
Subject::create(['subject... |
C# | UTF-8 | 1,456 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AjaxTentaTest.Models;
namespace AjaxTentaTest.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
pu... |
C# | UTF-8 | 7,675 | 3.125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RadioactiveBunnies
{
class Startup
{
static int[] playerPosition = new int[2];
static bool gameOverWon = false;
static bool gameOverDead = false;
static... |
Python | UTF-8 | 4,535 | 2.875 | 3 | [] | no_license | from flask import request # receiving data from requests
from flask import jsonify # Make a response (like dict)
from flask import make_response # Make a response (like dict)
from flask_restful import Resource # modules for fast creation of apis
from flask_apispec import marshal_with, doc, use_kwargs
from flask_ap... |
Markdown | UTF-8 | 754 | 2.78125 | 3 | [] | no_license | ## Lab01-NumbersGame
###Author: Meggan Triplett
####Description
This is a C# console application that will ask a user to enter several numbers and will then take those numbers to run different calculations.
####Getting Started
Clone this repository to your local machine.
$ git clone [https://github.com/Megga-Miister... |
Python | UTF-8 | 557 | 4.15625 | 4 | [] | no_license | """
Write a program to swap odd and even bits in an integer with as
few instructions as possible. (e.g., bit 0 and bit 1 are swapped, bit
2 and bit 3 are swapped, and so on.)
- extract even bits and shift to right by 1 bit, extract odd bits and
shift to left by 1 bit, then merge the above two.
"""
def swapbits(n):
... |
Java | UTF-8 | 687 | 2.90625 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package funcao_01;
/**
*
* @author Celio_pc
*/
public class Funcao_01 {
/**
* @param args the command line arguments
... |
Java | UTF-8 | 1,762 | 2.3125 | 2 | [] | no_license | package com.spring.data.domain;
import java.util.Date;
import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.Min;
import javax.validation.constraints.Past;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.a... |
Python | UTF-8 | 2,170 | 3.03125 | 3 | [] | no_license | '''
Helper functions for plotting/analyzing control systems
from scipython.com
'''
import numpy as np
import matplotlib.pyplot as plt
# vector field
def vec_field(F):
x = np.linspace(-10, 10, 30)
y = np.linspace(-10, 10, 30)
xv, yv = np.meshgrid(x, y)
xx, yy = np.meshgrid(x, y)
for... |
JavaScript | UTF-8 | 1,312 | 2.75 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | function deleteOffre(_id) {
console.log("id_offre= " + _id);
var id_offre = _id;
var libelle_food = null;
var taux = null;
var obj;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState === 4) {
obj = JSON.parse(xhttp.responseText);
var i;
... |
PHP | UTF-8 | 1,407 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
// Configuration
$config = array_replace_recursive(
[
'secretBcrypt' => '',
'saveDirName' => '/data/',
'maxScreenshotSize' => 2 * 1048576,
'screenshotMimeType' => 'image/png'
],
file_exists('./config.php') ? include_once('./config.php') : []
... |
Python | UTF-8 | 679 | 3.671875 | 4 | [] | no_license | """
Dynamic programming solution to 0/1 Knapsack.
"""
# (value, weight) of each item
I = [(10, 5), (40, 4), (30, 6), (50, 3)]
MAX = 10 # max weight
# (value, weight) of each item
I = [(1, 1), (4, 3), (3, 2)]
MAX = 4 # max weight
# Create a table of [0, 1, .., Ith] X [0, 1, ..., MAX]
V = {}
V[0] = [0] * (MAX+1)
for ... |
JavaScript | UTF-8 | 6,322 | 2.53125 | 3 | [
"MIT"
] | permissive |
var NoFocusPinnedTab = false;
var PinnedTabURL = "";
var NextCreateTriggersKeep = false;
var JustFixedLegacySettings = false;
function startup() {
chrome.storage.sync.get(
[
KOPT_NoFocusTab,
KOPT_Page,
KOPT_CustomURL,
KOPT_LegacyKey // Old
],
function(items) {
// Deal with l... |
Java | UTF-8 | 1,313 | 3 | 3 | [] | no_license | package music;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class SongTest {
Song song1;
String name = "Boats";
String artist = "Jacob";
int songLength = 237;
@BeforeEach
void runBefore() {
... |
Java | UTF-8 | 32,324 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | package sagex.api;
/**
* Unofficial SageTV Generated File - Never Edit
* Generated Date/Time: 5/27/22 7:59 AM
* See Official Sage Documentation at <a href='http://download.sage.tv/api/sage/api/ChannelAPI.html'>ChannelAPI</a>
* This Generated API is not Affiliated with SageTV. It is user contributed.
*/
import sa... |
Markdown | UTF-8 | 11,350 | 3.765625 | 4 | [] | no_license | ## 重学 React
[参考资料: Reac.js 小书 by 胡子大哈](http://huziketang.mangojuice.top/books/react/)
组件化可以帮助我们解决前端结构的复用性问题,整个页面可以由这样的不同的组件组合、嵌套构成。
### 01 使用 React
1. 下载 `react`, `react-dom`
2. 导入 `react`, `react-dom`
`react` 编写 React 组件需要,`react-dom` 将 React 组件渲染到页面上
#### JSX
类似 HTML 的语法,直接写在 React 组件中。包含 JavaScript 的对象树。
JSX 就是 ... |
TypeScript | UTF-8 | 1,033 | 2.953125 | 3 | [] | no_license |
import {State, Action } from './state'
export const setReposByUser = (repos:[]):Action => {
return {
type: "SET_REPOS_BY_USER",
payload: repos
};
};
export const setErrorMessage = (errorMessage:string):Action => {
return {
type: "SET_ERROR_MESSAGE",
payload: errorMessag... |
Swift | UTF-8 | 10,980 | 2.703125 | 3 | [] | no_license | //
// Business.swift
// Open
//
// Created by Bryan Ryczek on 10/21/16.
// Copyright © 2016 Bryan Ryczek. All rights reserved.
//
import UIKit
import Foundation
import CoreLocation
import FirebaseDatabase
//property ideas
// business owner
// phone number
// hours
enum DayOfWeek : Int {
case sunday = 0
ca... |
Shell | UTF-8 | 496 | 2.984375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | #! /bin/sh
echo "Running $0"
. $GLOBUS_LOCATION/libexec/globus-sh-tools.sh
GPATH=$GPT_LOCATION
if [ "$GPATH" = "" ]; then
GPATH=$GLOBUS_LOCATION
fi
if [ "$GPATH" = "" ]; then
echo "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script."
fi
$GLOBUS_SH_PERL -I${GPATH}/lib/perl -I${GLOBU... |
C++ | UHC | 2,197 | 2.59375 | 3 | [] | no_license |
#ifndef _BreadDataFactory_h_
#define _BreadDataFactory_h_
#include "BreadStdHeader.h"
#include "BreadInline.h"
namespace Bread
{
/*
@date 2011.01.21
@auth prodongi
@desc atlmap
@todo Ÿ
*/
template <class K, class V, class B, class S, class T>
class cDataFactory
{
protected:
typedef K KEY;
typedef ... |
Java | UTF-8 | 1,062 | 2.234375 | 2 | [] | no_license | package com.fury.game.system.files.logs;
import com.fury.cache.Revision;
import com.fury.core.model.node.entity.actor.figure.player.Player;
import com.fury.core.model.item.Item;
public class LoggedPlayerItem extends LoggedItem {
String username;
boolean received;
public LoggedPlayerItem(Item item, Playe... |
Java | UTF-8 | 279 | 1.648438 | 2 | [] | no_license | package com.yaoyao.order.service;
import com.yaoyao.common.pojo.ShopResult;
import com.yaoyao.order.pojo.OrderInfo;
public interface OrderService {
//生成订单,OrderInfo当中包含了表单提交的所有数据。
ShopResult createOrder(OrderInfo orderInfo);
}
|
Python | UTF-8 | 3,274 | 3.59375 | 4 | [] | no_license | """
Odessa Elie
May 1, 2020
Naive Bayes Classifier
The purpose of this project is to implement the Naive Bayes Classifier on text data.
"""
#importing packages
import numpy as np
import pandas as pd
from sklearn import preprocessing
import operator
import nltk
#nltk.download()
from sklearn.naive_bayes... |
Markdown | UTF-8 | 1,782 | 3.234375 | 3 | [
"MIT"
] | permissive | # Go 1.14
Welcome to the Go 1.14 Release Party!
https://www.crowdcast.io/e/pdx-go-march-12-2020
## Loops
Go 1.14 comes with a change in how the runtime does preemption of Goroutines.
- Release notes are [here](https://golang.org/doc/go1.14#runtime)
- Code samples are [here](./preemption/main.go)
## Tests
Go 1.14... |
Markdown | UTF-8 | 3,369 | 2.984375 | 3 | [
"MIT"
] | permissive | # Peregrin
A library for inspecting Zhooks, Ochooks and EPUB ebooks, and converting
between them.
Invented by [Inventive Labs](http://inventivelabs.com.au). Released under the
MIT license.
More info: http://ochook.org/peregrin
## Requirements
Ruby, at least 1.8.x.
You must have ImageMagick installed — specifical... |
JavaScript | UTF-8 | 519 | 2.6875 | 3 | [] | no_license | /* Metodo getRemito
Permite traer un remito con el idTransac como parametro
*/
const { Router } = require("express");
const router = Router();
const _ = require("underscore");
const docs = require("../sample.json");
//console.log(docs)
router.get('/:id', (req,res) => {
const { id } = req.params
console.log(id)
... |
Java | UTF-8 | 350 | 1.78125 | 2 | [] | no_license | package com.dml.puke.wanfa.dianshu.dianshuzu;
import com.dml.puke.pai.DianShu;
/**
* 连3张。 333444555、444555666777888
*
* @author Neo
*
*/
public class LiansanzhangDianShuZu extends LianXuDianShuZu {
public LiansanzhangDianShuZu() {
}
public LiansanzhangDianShuZu(DianShu[] lianXuDianShuArray) {
super(lianX... |
C++ | UTF-8 | 2,323 | 2.578125 | 3 | [] | no_license | #include <ESP8266WiFi.h>
#include <SocketIOClient.h>
SocketIOClient client;
const char* ssid = "BANDOTT83"; // Tên mạng Wifi được chỉ định sẽ kết nối (SSID)
const char* password = "20180720"; // Password của mạng Wifi được chỉ định sẽ kết nối
const char* host = "192.168.100.18"; // Địa chỉ IP của máy khi tr... |
Markdown | UTF-8 | 1,607 | 3.1875 | 3 | [] | no_license | 基金
========
## 定投的两种策略
一种根据大盘或者基金对应的指数,设定区间。比如沪指3000点上下500点,定时投1000。3500-4000投800每次。4000-4500投500每次。2000-2500,1500每次。具体选哪个,区间,价格差别是整数,还是百分比,需要你自己定。
一种是价值平均。就是保持市值。方法举例,第一周买1000,市值也是1000;第二周,不管花多少,让市值到2000;第n周,市值到n千。这样越跌,买的越多。涨就买的少,甚至提钱出来。需要你有个大体的估算,跌的时候用钱会多,涨会产生不少闲钱。投进去的收益率倒是会提高。
看你自己选择吧,定投就是设计好以后无脑执行就可以了,开始的设计可能会麻烦点
... |
Python | UTF-8 | 323 | 2.984375 | 3 | [] | no_license | function_names = []
with open("temp.py", 'rb') as f:
for line in f.readlines():
line = str(line).strip()
print(type(line))
print(line)
if str(line).startswith('def'):
function_name = line.split(' ')[1]
function_names.append(function_name)
print(function_name... |
C | UTF-8 | 7,291 | 2.875 | 3 | [] | no_license | #include "game.h"
#include "raylib.h"
#include "utilities.h"
#include "player.h"
#include "computer.h"
#include <time.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
int length = 30;
int radius = 8;
float pointDis = 65.0f;
float thickness = 6.0f;
int carry = -1; // If there is a seg... |
C# | UTF-8 | 7,917 | 3.21875 | 3 | [] | no_license | /***************************************
* PatternRecognitionTest
* テストとサンプルコードを兼ねた静的クラス
*
* [履歴]
* 2012/6/20 作っただけ。まだ空です。
* 2012/6/23 昔造ったテストコードを移植してみたけど、フォルダ名とデータセットはどうしよう?
* *************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using ... |
C# | UTF-8 | 2,597 | 3.390625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dijkstra
{
public class DijkstaAlgorithm
{
public static void GetShortestWay(int startNode, int finishNode)
{
Node last = NodeFlyweight.GetNode(... |
Python | UTF-8 | 4,773 | 3.015625 | 3 | [] | no_license | # To add a new cell, type '#%%'
# To add a new markdown cell, type '#%% [markdown]'
#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting
# ms-python.python added
import os
try:
os.chdir(os.path.join(os.getcwd(), 'Tw... |
Java | UTF-8 | 833 | 2.703125 | 3 | [] | no_license | package com.myTest;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import com.myTest.VisualBoundaryDetector;
public class Main {
public static void main(String[] args) {
try {
long startTime = System.currentTimeMillis();
for (int i=0; i<... |
Java | UHC | 259 | 2.609375 | 3 | [] | no_license | package ex01.Abstract;
public class MainEntry {
public static void main(String[] args) {
Circle c = new Circle();
Point pt = new Circle();
// ̷Ե ֵ
Rectangle rect = new Rectangle();
rect.disp();
c.disp();
pt.disp();
}
}
|
Markdown | UTF-8 | 634 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | # SwMapsLib
A .NET library for reading and writing SW Maps project files.
SW Maps is a free GIS and mobile mapping app for collecting, presenting and sharing geographic information, available for Android.
https://play.google.com/store/apps/details?id=np.com.softwel.swmaps
## Usage
SW Maps project files (SWMZ) can b... |
C++ | UTF-8 | 362 | 2.75 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> a(n);
for(auto& e : a) cin >> e;
int counter = -1;
bool isDividable = true;
while(isDividable){
for(auto& e : a){
if( e == 0 ) isDividable = false;
if( e%2 == 0 ) e /= 2;
else isDividable = false;
}
counter++;
... |
Markdown | UTF-8 | 899 | 2.75 | 3 | [
"MIT"
] | permissive | # nl.liacs.watch_cli
## How to compile
First, fetch the required submodules:
```
git submodule update --init --recursive
```
Then, you can compile the software to a packed JAR using Gradle:
```
./gradlew shadowJar
```
This will create a jar in the `./build/libs/` folder.
## How to Run
You can run the software by ... |
Python | UTF-8 | 6,396 | 3.5625 | 4 | [] | no_license | # Shane Weisz
# WSZSHA001
import sys
from random import randint
def FIFO(size, pages):
"""
Function that implements the FIFO page replacement algorithm and
returns the number of page faults that occur.
Parameters:
size (int): The number of available page frames - can vary from 1 to 7
... |
Java | UTF-8 | 3,048 | 1.867188 | 2 | [
"BSD-3-Clause",
"IJG",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-boost-original",
"LicenseRef-scancode-unknown-license-reference",
"libtiff",
"MIT",
"Apache-2.0"
] | permissive |
//---------------------------------------------------------------------------------------
// Copyright (c) 2001-2018 by PDFTron Systems Inc. All Rights Reserved.
// Consult legal.txt regarding legal and license information.
//---------------------------------------------------------------------------------------
pac... |
Markdown | UTF-8 | 1,190 | 2.90625 | 3 | [] | no_license | ## Project Overview
A React based Covid-19 tracker to get information about the worldwide cases for different countries using an interactive map based interface and using <a href='https://disease.sh/docs/#/COVID-19%3A%20Worldometers'>disease.sh</a> apis
## Demo URL
https://covid-19-tracker-fcaff.web.app/
## Demo I... |
Swift | UTF-8 | 5,682 | 2.703125 | 3 | [] | no_license | //
// MovieDetailViewController.swift
// movies_app
//
// Created by Uno qualunque on 03/10/21.
//
import UIKit
class MovieDetailViewController: UIViewController {
var movieTitleLabel: UILabel!
var movieOriginalTitleLabel: UILabel!
var movieImageView: UIImageView!
var movieOverviewTextView: UIText... |
Markdown | UTF-8 | 1,898 | 2.828125 | 3 | [] | no_license | # Sudoku Solver
This is the world-known **Sudoku game**. <br>
I did this project to learn about the **Backtracking Algorithm** and because I like Sudoku and found the project funny.
<br>
<br>
## Game Mechanics
The board it self is in the [working.py](https://github.com/henrique-efonseca/Portfolio/blob/master/Sud... |
Java | UTF-8 | 2,301 | 2.65625 | 3 | [] | no_license | package com.ejushang.steward.message;
import com.ejushang.steward.common.grabber.Message;
import com.ejushang.steward.common.grabber.MessageType;
import com.ejushang.steward.ordercenter.domain.OriginalOrder;
import com.ejushang.steward.ordercenter.domain.OriginalRefund;
import org.slf4j.Logger;
import org.slf4j.Logger... |
Java | UTF-8 | 6,473 | 1.84375 | 2 | [] | no_license | package com.yxytech.parkingcloud.core.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.yxytech.parkingcloud.core.enums.ApproveEnum;
impo... |
C# | UTF-8 | 407 | 3.40625 | 3 | [] | no_license | using System.Text.RegularExpressions;
public class Program
{
public static string TextToNumberBinary(string str)
{
str = Regex.Replace(str, "zero", "0", RegexOptions.IgnoreCase);
str = Regex.Replace(str, "one", "1", RegexOptions.IgnoreCase);
str = Regex.Replace(str, "[^01]", "");
int newLeng... |
Python | UTF-8 | 571 | 4.375 | 4 | [] | no_license | op = input(''' please try any math operator
+ for addition
- for substraction
/ for division
* for multiplication''')
print("enter your first number ")
n1 = int(input())
print("enter your second number")
n2 = int(input())
if (op=='+'):
print( "sum of these two numbers is", int(n1)+int(n2))
elif(op=='-'):
prin... |
Swift | UTF-8 | 4,943 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | //
// captionViewController.swift
// Instagram
//
// Created by Wenn Huang on 3/12/17.
// Copyright © 2017 Wenn Huang. All rights reserved.
//
import UIKit
import Parse
class captionViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate{
@IBOutlet weak var creat... |
Java | UTF-8 | 960 | 2.203125 | 2 | [] | no_license | package com.example.engosama.newdiverapp.Utils;
import android.annotation.TargetApi;
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.Window;
import android.view.WindowManager;
import com.example.engosama.newdiverapp.R;
public class Constants {
... |
C# | UTF-8 | 4,982 | 3.046875 | 3 | [
"MIT"
] | permissive | using System;
using NUnit.Framework;
using Xamarin.Forms.Maps;
namespace Xamarin.Forms.Core.UnitTests
{
[TestFixture]
public class DistanceTests : BaseTestFixture
{
[Test]
public void Constructor()
{
var distance = new Distance(25);
Assert.AreEqual(25, distance.Meters);
}
[Test]
public void Cons... |
C++ | UTF-8 | 1,059 | 2.84375 | 3 | [
"MIT"
] | permissive | #ifndef PERLIN_NOISE_HPP
#define PERLIN_NOISE_HPP
#include <vector>
#include "random.hpp"
class PerlinNoise
{
public:
PerlinNoise();
explicit PerlinNoise(uint32_t seed);
virtual ~PerlinNoise();
PerlinNoise(const PerlinNoise& other);
PerlinNoise(PerlinNoise&& other);
... |
JavaScript | UTF-8 | 132 | 3.015625 | 3 | [] | no_license |
// Learned how to Create Decimal Numbers with JS
var ourDecimal = 5.7;
// Only change code below this line
var myDecimal = 5.7;
|
Markdown | UTF-8 | 2,785 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | # tsn_kinetics400
|模型名称|tsn_kinetics400|
| :--- | :---: |
|类别|视频-视频分类|
|网络|TSN|
|数据集|Kinetics-400|
|是否支持Fine-tuning|否|
|模型大小|95MB|
|最新更新日期|2021-02-26|
|数据指标|-|
## 一、模型基本信息
- ### 模型介绍
- TSN(Temporal Segment Network)是视频分类领域经典的基于2D-CNN的解决方案。该方法主要解决视频的长时间行为判断问题,通过稀疏采样视频帧的方式代替稠密采样,既能捕获视频全局信息,也能去除冗余,降低计算量。最终将每帧特征平均融... |
Java | UTF-8 | 778 | 3.84375 | 4 | [] | no_license | package myDay2;
public class ConstructorOverload {
int a;
double b;
String str;
public ConstructorOverload(int c,int d)
{
a=c+d;
}
public ConstructorOverload(double c,double d)
{
b=c*d;
}
public ConstructorOverload(String n)
{
str=n;
... |
Python | UTF-8 | 1,539 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | """
Implementation of the BaseAgent class.
"""
import numpy as np
from mesa import Agent
class BaseAgent(Agent):
"""
Extended base class for a MESA model agent.
Args:
unique_id (int): unique identifier of the agent.
pos (tuple): (x,y) coordinates of the agent in the 2D-grid.
model... |
C++ | UTF-8 | 699 | 2.796875 | 3 | [] | no_license | #include "Globals.h"
#include <ctime>
//static member variables:
IrrlichtGfx* Globals::irrlichtGfx_ = 0;
User* Globals::user_ = 0;
Globals::Globals()
{
}
Globals::~Globals ()
{
}
void Globals::init ()
{
srand ((unsigned int)time(0) );
if(this->irrlichtGfx_ == 0)
{
this->irrlichtGfx_ = new IrrlichtGf... |
C# | UTF-8 | 1,360 | 2.671875 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(characterStats))]
public class characterCombat : MonoBehaviour {
characterStats myStats;
public float attackDelay = .6f;
//public float attackSpeed = 1f;
private float attackCooldown = 0f;
private Animator ... |
Shell | UTF-8 | 1,167 | 3.296875 | 3 | [] | no_license | #!/bin/sh
ls perl-tar/clam*gz perl-tar/Mail-Spam*gz
echo
echo -n 'ClamAV version number: '
read ClamVer
echo -n 'SpamAssassin version number: '
read SAVer
Filename=install-Clam-$ClamVer-SA-$SAVer.tar.gz
Pathname=/root/build/tar/$Filename
mkdir /tmp/clamsa.$$
BUILD=/tmp/clamsa.$$/install-Clam-$ClamVer-SA-$SAVer
mkdir ... |
Java | UTF-8 | 4,605 | 2.03125 | 2 | [] | no_license | package com.april.groupware.todo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.r... |
Java | UTF-8 | 2,454 | 2.1875 | 2 | [] | no_license | package com.xawl.car.exception;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import org.apache.ibatis.session.SqlSession;
import org.apache.... |
Python | UTF-8 | 2,423 | 3.1875 | 3 | [] | no_license | import random
from AI.entity import Entity
class AI(Entity):
def __init__(self, name):
super().__init__(name)
self._stats_file_name = 'ai.stats'
self._wins = 0
self._loses = 0
self._attack_rate = 1.0
self._defend_rate = 1.0
self._read_stats()
def __del... |
Java | UTF-8 | 2,598 | 2.984375 | 3 | [] | no_license | package com.cookie.android.util;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.text.DecimalFormat;
/**
* FormatUtils
* Author: ZhangLingfei
* Date : 2018/12/15 0015
*/
public class FormatUtils {
/**
* 一亿
*/
private static final int YI_YI = 100000000;
/*... |
Python | UTF-8 | 5,866 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Optional, Union, Tuple, List, Dict
import pickle
import queue
import os
from pathlib import Path
from time import sleep
import vimeo_dl as vimeo
import requests
from bs4 import BeautifulSoup
from vimeodl import log
__all__ = ["VimeoDownloader"]
__ht... |
Java | UTF-8 | 11,649 | 1.585938 | 2 | [] | no_license | /* **DO NOT EDIT THIS FILE** */
/*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
* This is a part of the Squawk JVM.
*/
package com.sun.squawk.vm;
/**
* This class defines the native ... |
JavaScript | UTF-8 | 3,159 | 3.203125 | 3 | [] | no_license | import React, { useState } from "react";
import "./styles.css";
var books = {
"Think Like A Monk": [
{
name:
"Remember, saying whatever we want, whenever we want, however we want, is not freedom. Real freedom is not feeling the need to say these things."
},
{ name: "Cancers of the Mind : Co... |
Python | UTF-8 | 2,154 | 3.140625 | 3 | [] | no_license | import numpy as np
from CtrlSys import CtrlSys as cs
class Pod(object):
""" A pod looks like:
r_3 -- r_0
| \ / |
| CM |
| / \ |
r_2 __ r_1
With mass equally distributed ... |
PHP | UTF-8 | 758 | 2.859375 | 3 | [] | no_license | <?php
namespace VSamPlugin\Front;
/**
* The public-facing functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the public-facing stylesheet and JavaScript.
*
*/
class FrontModule{
private $plugin_name;
private $version;
public function __construct(... |
Python | UTF-8 | 402 | 3.265625 | 3 | [] | no_license | def minimumNumber(a,n):
count = 0
if any(i.isdigit() for i in a) == False:
count += 1
if any(i.islower() for i in a) == False:
count += 1
if any(i.isupper() for i in a) == False:
count += 1
if any(i in "!@#$%^&*()-+" for i in a) == False:
count += 1
return max(cou... |
PHP | UTF-8 | 899 | 3.046875 | 3 | [] | no_license | <?php
class LogHandler extends Handler
{
// VARIABLES
/**
* @var LogHandler
*/
private static $INSTANCE;
/**
* @var LogDao
*/
private $logDao;
// /VARIABLES
// CONSTRUCTOR
public function __construct( LogDbDao $logDao )
{
... |
Go | UTF-8 | 3,041 | 3.609375 | 4 | [] | no_license | package robot
import (
"errors"
"testing"
)
type input struct {
x int
y int
direction string
}
func TestPlace(t *testing.T) {
tests := []struct {
name string
in input
out *Robot
err error
}{
{
name: "Place OK",
in: input{0, 0, "NORTH"},
out: &Robot{0, 0, "NORTH"},
... |
Java | UTF-8 | 2,649 | 2.78125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package zrkc.group.new_ui.component;
import zrkc.group.javabean.ShowImg;
import zrkc.group.javabean.User;
import zrkc.group.new_ui.component.Listener.ClassImgMouseListener;
import javax.swing.*;
import java.awt.*;
//需要将ClassInfoFrame声明之后再声明
public class ClassImg extends JPanel {
private ShowImg show... |
Markdown | UTF-8 | 1,415 | 3.625 | 4 | [
"Apache-2.0"
] | permissive | # hex
A simple tool to encode and decode hexadecimal data.
## Install
```sh
go install github.com/maraino/hex
```
## Usage
No brainer functionality, just three flags and four features.
```sh
$ hex --help
Usage: hex [<filename>]
-c encodes the input as hexadecimal followed by characters
-d decodes input
-p enco... |
JavaScript | UTF-8 | 763 | 3.921875 | 4 | [] | no_license | /*
Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.
Example 1:
Input: 5
Output: True
Explanation:
The binary representation of 5 is: 101
Example 2:
Input: 7
Output: False
Explanation:
The binary representation of 7 is: 111.
Example 3:
I... |
C# | UTF-8 | 2,205 | 3.203125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TopologicalSort
{
class Program
{
static void Main(string[] args)
{
int[,] adjMat = new int[,] { { 0, 1, 0, 1, 0, 0 },
... |
C++ | UTF-8 | 31,336 | 2.546875 | 3 | [] | no_license | /*
* Ocean General Circulation Modell ( OGCM ) applied to laminar flow
* Program for the computation of geo-atmospherical circulating flows in a spherical shell
* Finite difference scheme for the solution of the 3D Navier-Stokes equations
* with 2 additional transport equations to describe the water vapour and co2 ... |
Python | UTF-8 | 3,704 | 4.6875 | 5 | [
"MIT"
] | permissive | # Script: CourseInformation.py
# Description: This program creates a dictionary containing course numbers,
# the meeting times of each course, the names of the instructors
# that teach each course and the room numbers of the rooms
# where the courses meet.Enter any of these... |
C++ | UTF-8 | 856 | 2.765625 | 3 | [] | no_license | /*
ID: shanzho2
PROG: milk
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <memory.h>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
ifstream fin("milk.in");
ofstream fout("milk.out");
int n, m, p, a;
fin... |
Python | UTF-8 | 1,470 | 4.4375 | 4 | [] | no_license | import random
class MSDie():
# constructor method, the init, function of the class get called
#provide default values if someone forget to put it in; sides=6
def __init__(self, sides):
# self is indictive of the object
self.sides = sides
self.value = 1
def roll(s... |
Swift | UTF-8 | 830 | 2.703125 | 3 | [] | no_license | import UIKit
class FinishViewController: UIViewController {
@IBOutlet weak var phone: UILabel!
@IBOutlet weak var address: UILabel!
@IBOutlet weak var package: UILabel!
@IBOutlet weak var sum: UILabel!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var date: UILabel!
static let ... |
Shell | UTF-8 | 836 | 3.3125 | 3 | [] | no_license | #! /usr/bin/env bash
set -e
token="$1"
ref="${2:-master}"
function run {
echo $ "$@" >&2
$@
}
cd /tmp
set +e
which bananagent
if [[ $? -eq 0 ]]; then
isUpgrade="yes"
fi
set -e
echo "downloading latest agent release..."
curl > agent.zip \
-fLH "Private-Token: ${token}" \
"https://gitlab.enix.io/api/v4/project... |
Java | UTF-8 | 2,341 | 2.28125 | 2 | [] | no_license | package cn.guanmai.station.bean.system;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
/*
* @author liming
* @date Jun 20, 2019 7:50:17 PM
* @des 分拣标签模板
* @version 1.0
*/
public class PrintTagTemplateBean {
private String id;
private String create_time;
private boolean is_defaul... |
Java | UTF-8 | 344 | 2.421875 | 2 | [] | no_license | package com.ggar.dev.utils.threadpoolexecutor;
public class OverflowErrorCount {
public static int count = 0;
public static void main(String args[]) {
try {
System.out.println(++count);
main(null);
} catch (StackOverflowError e) {
e.printStackTrace();
System.e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.