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
Python
UTF-8
1,528
3.578125
4
[]
no_license
from StrukturePodataka.Skup import * class TrieNode(): def __init__(self, char): self.char = char # karakter u cvoru self.children = {} # pokazivac na decu u cvoru self.endOfWord = False # oznaka kraja reci self.stranice = Skup() # polje koje ima Skup stranica koje sadrze odredje...
Markdown
UTF-8
365
2.5625
3
[]
no_license
# Mobile App Recommendation An app created using ReactJS. Used to recommend mobile apps. Features: - Recommends Mobile apps based on different categories. View App: [Mobile App Recommendation](https://lo2bu.csb.app/) ## Technologies and Frameworks: - ReactJS - HTML - CSS - CodeSandBox <h3>Preview: </h3> ![image]...
Markdown
UTF-8
1,083
2.765625
3
[ "CC-BY-4.0", "MIT" ]
permissive
### <a name="prerequisites"></a>Pré-requisitos * Um [RSS](https://wikipedia.org/wiki/RSS) conta Antes de poder utilizar a conta RSS numa aplicação lógica, tem de autorizar a aplicação lógica para ligar à sua conta RSS. Felizmente, pode fazê-facilmente na sua aplicação lógica no Portal do Azure. Eis os passos para...
PHP
UTF-8
329
2.515625
3
[]
no_license
<?php /** * Classe de ligação com o bando do Pé Na Estrada. */ class DB { public function __construct() { pg_connect("host=localhost user=postgres password=senha5 dbname=penaestrada port=5432") or die("Erro ao conectar com o servidor."); } public function __destruct() { //pg_close(); } } ?>...
Python
UTF-8
182
3.0625
3
[]
no_license
def add2(n1,n2): s=n1+n2 return s def add3(n1,n2,n3): s=n1+n2+n3 return s def add4(n1,n2,n3,n4): s=n1+n2+n3+n4 return s print add2(3,4) print add3(1,2,3) print add4(1,2,3,4)
Python
UTF-8
434
3.234375
3
[]
no_license
from data import question_data from question_model import Question from quiz_brain import QuizBrain question_bank = [] for i in question_data: q = Question(i["text"], i["answer"]) question_bank.append(q) score = 0 qb = QuizBrain(question_bank) while qb.still_has_questions(): qb.next_question() print("\n") p...
Java
UTF-8
502
3.6875
4
[]
no_license
//Time complexity : O(logn) class Solution { public double myPow(double x, int n) { //base if( n == 0) return 1; double temp = myPow(x, n/2); if(n % 2 == 0){ // when the power to the number is even return temp*temp; }else{ if( n < 0){ // case when ...
Python
UTF-8
5,441
2.890625
3
[]
no_license
#!/usr/bin/env python import sys import os import getopt from Bio.SeqIO.QualityIO import FastqGeneralIterator OPT_INPUT_FILE="" OPT_OUTPUT_FILE=False OPT_MIN_LENGTH=0 OPT_MAX_LENGTH=False def Usage(): print "\nFastQ_ReadFilterByLength.py is a program that read a FASTQ file and filter the sequences according to t...
Markdown
UTF-8
1,148
3.890625
4
[]
no_license
**函數** **內容 :** 傳回值型態 函數名稱(型態 參數1, 型態 參數2, \....) { // 變數宣告 // 程式碼 return 傳回值; } 其中 return 語法的功能是讓函數把一個值傳回給呼叫它的程式,也就是說如果函數執行到這一行,後面的程式碼就不會再執行了。 ![](./img/media/image1.png) 上例我們自訂了一個函式f1,並傳入一個參數a給n,f1計算後傳回return n\*9/5+32; 請仿照上例,寫一個BMI計算程式。 身高體重指數(又稱身體質量指數,英文為Body Mass Index,簡稱BMI)是一個計算值,主要用於統計用途。 「身高體重指數」這...
JavaScript
UTF-8
807
2.515625
3
[]
no_license
app.controller('ordersCtrl', function($scope, $location, restSrv, authSrv){ if (!authSrv.isAutorized()){ $location.path('/auth'); return; } restSrv.getOrders().then( function(response) { if (response.data && response.data.success) { $scope.orders = response.data.data; } }, function(response) { ...
Java
UTF-8
22,904
2.359375
2
[]
no_license
package Util; import android.content.Context; import android.content.SharedPreferences; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.File; import java.io.FileOutputStream; import java.io...
Java
UTF-8
1,969
2.65625
3
[]
no_license
package vcluster.elements; /** *A class represents plug-in */ public class Plugin extends Element{ /** * */ private static final long serialVersionUID = 1L; private String pluginName; private String pluginStatus; private String pluginType; private Object instance; /** *Get the nam...
Markdown
UTF-8
5,790
3.015625
3
[]
no_license
杭州市房屋租赁合同       房租(  )号      甲方(出租人):___________________     乙方(承租人):___________________     根据国家、省有关法律、法规和本市的有关规定,甲、乙双方在自愿、公平、诚实信用、等价有偿原则的基础上,经充分协商,同意就下列房屋租赁事项,订立本合同,并共同遵守。    一、 甲方自愿将座落在本市___区__房屋,使用面积___平方米,出租给乙方使用。乙方已对甲方所要出租的房屋做了充分了解,愿意承租该房屋。    二、 该房屋租赁期自___年___月___日起至___年___月___日止。    三...
Go
UTF-8
14,891
2.5625
3
[ "MIT" ]
permissive
package core import ( "bytes" "encoding/binary" "encoding/hex" "encoding/json" "reflect" "sort" "sync" "github.com/covrom/gonec/names" ) const ChunkVMSlicePool = 64 // globalVMSlicePool используется виртуальной машиной для переиспользования в регистрах и параметрах вызова var globalVMSlicePool = sync.Pool{ ...
Python
UTF-8
395
2.71875
3
[]
no_license
import pygame from pygame.locals import * import UI import spritesheet class Lifes(): def __init__(self, window, lifes): self.window = window self.lifes = lifes self.template = spritesheet.spritesheet("ui/lifes.png") self.image = self.template.image_at((0, 0, 200, 100)) def update(self, lifes): self.image...
C++
UTF-8
890
2.703125
3
[]
no_license
#include "inputmanager.h" InputManager::InputManager() { } InputManager::~InputManager() { } void InputManager::addKeyboardListener(KeyboardListener* listener) { keyboardlistener_.push_back(listener); } void InputManager::removeKeyboardListener(KeyboardListener* listener) { std::vector<KeyboardListener*>::itera...
SQL
UTF-8
1,220
3.421875
3
[]
no_license
DELIMITER ;; CREATE PROCEDURE `sp_listaTipo`() BEGIN SELECT * from tipo; END ;; DELIMITER ;; CREATE PROCEDURE `sp_listaMercaderia`() BEGIN SELECT * from mercaderia; END ;; DELIMITER ;; CREATE PROCEDURE `sp_listaMercaderiaExt`() BEGIN SELECT A.idmercaderia AS 'id',A.nombre,A.stock,A.precio,B.idtipo,B.nombre AS 'tip...
Java
UTF-8
2,073
3.65625
4
[]
no_license
/** * @author Bang * @date 2019/8/27 16:15 */ public class Str_01_06 { public static int aoti(String str){ //字符串不为空时并且字符串不全是空白字符串时才转换 //去除掉前后的空格 String str1 = str.trim(); //存储最终过滤出来的字符串 String resStr = null; //字符串不为空时并且字符串不全是空白字符串时才转换 if (str1 != null || s...
Markdown
UTF-8
3,274
2.546875
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
--- title: The explanation for $1,000,000 fee on a single Ethereum transaction description: Why somebody transferred $100 worth of ETH with $2,500,000 fee longDescription: Why somebody transferred $100 worth of ETH with $2,500,000 fee. One fee mistake could be explained by a programming error. But now it has happen...
SQL
UTF-8
1,428
3.53125
4
[ "MIT" ]
permissive
COPY ( SELECT pd.id ,pd.created ,pd.modified ,'[deleted]' AS title ,'[deleted]' AS full_name -- remove last two characters of postcode so as to not uniquely ID anyone ,left(replace(upper(pd.postcode), ' ', ''), -2) AS postcode ,'[deleted]' AS street ,'...
Python
UTF-8
1,200
3.828125
4
[ "MIT" ]
permissive
# Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next # 使用递归来实现 class Solution: def reverseList(self, head: ListNode) -> ListNode: # 用于存储新链表的头部 self.head def recur(head): if head: ...
C
UTF-8
399
3.71875
4
[]
no_license
#include<stdio.h> int main(){ int point; int sum = 0; float avg; for(int i=0;i<5;i++){ for(int k=0;k<3;k++){ printf("please enter the point of each Bowler :"); scanf("%d",&point); sum = sum+point; } avg = sum/3; printf("%d st Bowler'...
Java
UTF-8
10,752
2.65625
3
[]
no_license
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; ...
Go
UTF-8
15,474
2.53125
3
[]
no_license
package server import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/http/httputil" "net/url" "strconv" "strings" "testing" "time" "github.com/AlekSi/pointer" serverClient "github.com/percona/pmm/api/serverpb/json/client" "github.com/percona/pmm/api/serverpb/json/client/server" "github.com...
Markdown
UTF-8
3,601
2.640625
3
[]
no_license
## Описание проекта Телеграм бот для получения задач и их обновлений с аккаунта Яндекс.Трекера. ## Как установить Для начала устанавливаме сам код. Для этого в командной строке, в нужной нам папке вводим `git clone https://github.com/Glicher-wp/Telegram_bot_by_startrack.git`. Предварительно убедитесь, что у вас ус...
Markdown
UTF-8
9,642
3.1875
3
[]
no_license
--- layout: blog title: "Week 7: Advanced models 1, part b" --- ## Character-based RNN with convolution This week, we spent some more time working on that character RNN model after adding a convolution layer (with max pooling) on all the cells' hidden states. With the added convolution, the model now actually trains,...
Markdown
UTF-8
1,213
2.9375
3
[]
no_license
## About This package was made in preparation for the clas INFO 550. It stores a data rda object named "trachoma_data", several functions that clean data and make figures, as well as a vignette. The tidyverse and rmarkdown packages were used to build this package. You will need to install the devtools package to downlo...
Java
UTF-8
2,171
2.578125
3
[]
no_license
package krk.smog.entity; import org.springframework.data.annotation.Id; import java.time.Instant; import krk.smog.external.airly.model.IndexLevel; import krk.smog.external.airly.model.IndexName; /** * Entity object for persisting AirQuality info in MongoDB. */ public class AirQuality { @Id public String i...
Markdown
UTF-8
4,616
2.734375
3
[]
no_license
--- description: "Recipe of Quick Perfect Lobster!" title: "Recipe of Quick Perfect Lobster!" slug: 213-recipe-of-quick-perfect-lobster date: 2020-09-19T09:49:12.634Z image: https://img-global.cpcdn.com/recipes/5477302191259648/751x532cq70/perfect-lobster-recipe-main-photo.jpg thumbnail: https://img-global.cpcdn.com/re...
Markdown
UTF-8
40,457
2.90625
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 现代教育机构的出现,1898—1928年 --- 为了便于分析,我们将依次考察人员培训,某些主要教育机构的形成,以及研究和财政资助。对每一情况,我们的探讨都试图从尚未充分考察的领域把有代表性的例证提供出来。省办和市办的教育机构以及技术、职业教育机构大都处于我们的视界之外。[4] 人员:海外培训的精英 高等教育建设的领导者们是真正杰出的一群,他们对非常时代的需要作出了反应。当中国的现代变革需要创立一个可以与出现在其他国家的新制度相比的高等教育制度时,这意味着培养学贯中西的新的学者阶层——一种对悠久传统的真正革命性的决裂。中国人能够而且确实必须向外国人学习,这一观点极富革命性,但与...
Java
UTF-8
2,171
3.28125
3
[]
no_license
package com.example.demo.io; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.attribute.PosixFilePermission; import java.util.HashSet; import java.util.Set; /** * @package: com.example.demo.io * @author: * @email: * @createDate: 2019-06-...
C
UTF-8
3,660
2.71875
3
[ "MIT" ]
permissive
/* * Copyright (C) 2019-2020 BiiLabs Co., Ltd. and Contributors * All Rights Reserved. * This is free software; you can redistribute it and/or modify it under the * terms of the MIT license. A copy of the license can be found in the file * "LICENSE" at the root of this distribution. */ #ifndef UTILS_BUNDLE_ARRAY...
Java
UTF-8
821
2.15625
2
[]
no_license
package com.spier.service; import java.util.List; import java.util.Map; import com.spier.common.bean.db.ScriptInfo; import com.spier.common.bean.db.task.TaskInfo; /** * 业务方面的公共方法 * @author Administrator */ public interface BussinessCommonService { /** * 根据国家名称获取简称 * @param str * @return 可能为null */ publi...
Java
UTF-8
322
3.125
3
[]
no_license
package Java; import java.util.Scanner; public class reverse_number { public static void main(String[] args) { int n,reverse=0; Scanner input = new Scanner(System.in); n= input.nextInt(); while(n!=0) { reverse =reverse* 10; reverse =reverse+n%10; n=n/10; } System.out.print(+reverse); } }...
Python
UTF-8
1,654
2.6875
3
[]
no_license
import pandas as pd import numpy as np def load_data(x_path='data/task9_train_x.csv', y_path='data/task9_train_y.csv'): train_x = pd.read_csv(x_path, header=None) train_y = pd.read_csv(y_path, header=None) np_train_x = train_x.values # [1000, 10] # np_train_x[1] [ 1.24925374 -1.3495958 4.136...
Python
UTF-8
134
2.8125
3
[]
no_license
def house_numbers_sum(inp): sum = 0 for x in inp: if (x == 0): break sum = sum + x return sum
C#
UTF-8
2,471
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using Balta.ContentContext; using Balta.NotificationContext; using Balta.SubscriptionContext; namespace Balta { class Program { static void Main(string[] args) { var articles = new List<Article>(); artic...
Python
UTF-8
1,930
2.578125
3
[]
no_license
# -*- coding: utf-8 -*- from FileClient import FileClient import os import jieba import jieba.analyse import json withWeight = True def get_inputfile(): return os.path.join(os.getcwd(),'inputfile','tlong.txt') def get_outputfile(filename="jiebalong.txt"): return os.path.join(os.getcwd(),'outputfile',filename...
PHP
UTF-8
773
2.515625
3
[]
no_license
<?php include 'initialize.php'; if ($_SESSION['user_id']){ header("Location: account.php?user_id={$_SESSION['user_id']}"); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Sign in Form</title> </head> <body> <?php include 'header.php';?> <h3>Please log in to...
PHP
UTF-8
1,147
2.640625
3
[]
no_license
<?php namespace PM\GBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ class Coordinate { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string") */ protected $lon; /*...
Java
UTF-8
2,427
3.5
4
[]
no_license
package leetcode.aug; import java.util.HashSet; import java.util.Set; public class GoatLatin { public String toGoatLatin(String S) { if (S == null || S.length() == 0) { return S; } String[] words = S.split(" "); Set<Character> vowels = new HashSet<>(); vowels...
Python
UTF-8
597
3.40625
3
[]
no_license
relation_count = int(input()) parents = {} for _ in range(relation_count): query = input().split() parents[query[0]] = [] if len(query) == 1 else query[2:] exceptions_count = int(input()) exceptions = [] def is_parent(child, parent): return child == parent or any(map(lambda item: is_parent(item, parent)...
C++
UTF-8
447
2.59375
3
[]
no_license
#pragma once #include "../System/Window.hpp" #include "../ResourceManager/ResourceManager.hpp" class Background { private: sf::Texture *mTexture; sf::RectangleShape mBackground; public: Background(std::string tPath, sf::Vector2f tSize); ~Background(); void SetSize(sf::Vector2f tSize){mBackground.setSize(tS...
Swift
UTF-8
632
2.734375
3
[]
no_license
// // SecondViewController.swift // DisplayRgb-iOS // // Created by Muhsin Etki on 16.07.2020. // Copyright © 2020 Muhsin Etki. All rights reserved. // import UIKit class SecondViewController: UIViewController { var red: Float = 0.0 var green: Float = 0.0 var blue: Float = 0.0 override func ...
JavaScript
UTF-8
6,863
3.390625
3
[]
no_license
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnPrope...
TypeScript
UTF-8
668
2.828125
3
[ "MIT" ]
permissive
// import { BookState } from '@interfaces/book'; import { ReduxAction } from '@interfaces/redux'; import { actionTypes } from './actionTypes'; import { BooksStoreState } from './types'; const initialState: BooksStoreState = { loading: false, books: [], } const reducer = (state = initialState, action: ReduxAction)...
PHP
UTF-8
1,785
2.625
3
[]
no_license
<?php class UserController extends GenericController { public $names = 'users'; public $name = 'user'; public function __construct(User $user) { $this->db = $user; } public function useredit() { $id = @Auth::user()->id; return parent::edit($id); } public function userupdate() { $id = @Auth::use...
JavaScript
UTF-8
1,163
2.6875
3
[]
no_license
var help = require('./help.json'); var commands = { "say": { execute: function(args, msg, bot) { var prompt = args.join(" ").slice(4); return prompt; }}, "help": { execute: function(args, msg, bot) { var page; if(args.length > 1){ if (help[args[1]].length ...
Java
UTF-8
3,798
2.015625
2
[ "Apache-2.0" ]
permissive
package org.fugerit.java.doc.freemarker.process; import java.io.OutputStream; import java.io.Reader; import java.io.Serializable; import java.util.Set; import org.fugerit.java.core.cfg.xml.ListMapConfig; import org.fugerit.java.core.util.filterchain.MiniFilterChain; import org.fugerit.java.core.util.filterchain.MiniF...
PHP
UTF-8
3,092
2.578125
3
[]
no_license
<?php namespace App\Service; use App\Entity\Produto; use Doctrine\ORM\EntityManager; class ProdutoService { private $em; public function __construct(EntityManager $em) { $this->em = $em; } public function insert(array $dados) { $entity = new Produto(); $entity->...
C++
UTF-8
1,806
2.59375
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; #define maxm 2000005 #define maxn 2005 struct Edge { int v, next; } edge[maxm]; int m, n; int count, head[maxn]; int q[maxn], front, rear; int sex[maxn]; void addedge(int a, int b) { edge[count].next = head[a]; ...
Java
UTF-8
404
1.914063
2
[]
no_license
package com.accp.dao; import com.accp.pojo.Supplieras; public interface SupplierasMapper { int deleteByPrimaryKey(Integer supplierasid); int insert(Supplieras record); int insertSelective(Supplieras record); Supplieras selectByPrimaryKey(Integer supplierasid); int updateByPrimaryK...
Java
UTF-8
3,460
2.046875
2
[]
no_license
package nyamori.moe.tmdbx.collection; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.Recyc...
TypeScript
UTF-8
128
2.671875
3
[ "MIT" ]
permissive
function* iterate <T> (iterable: Iterable<T>) { for (const value of iterable) { yield value } } export default iterate
C++
UTF-8
758
3.53125
4
[]
no_license
//int sqrt(int t) //求一个整数的平方根,且平方根也是整数,直接用二分搜索吧。。。 //也可以用牛顿迭代法,求任何一个数的开m方根,详见sqrtm.cc class Solution { public: int mySqrt(int x) { if(x <= 0) return 0; else if(x < 4) return 1; int b = 0, e = x / 2 + 1; //b < e, b*b <= x < e*e while(b + 1 != e){ int m = (b+e)/2; ...
Python
UTF-8
379
3.375
3
[]
no_license
# use this function to fetch the recent news of a certain country from the database and save it to a csv file import sqlite3 import pandas as pd def fetcher(country_code): conn = sqlite3.connect("world news.db") df = pd.read_sql_query(f"SELECT * FROM {country_code}", conn) df.to_csv(f"{country_code} sites...
C
UTF-8
1,610
3.15625
3
[]
no_license
/* * A template for the 2016 MPI lab at the University of Warsaw. * Copyright (C) 2016, Konrad Iwanicki * Further modifications by Krzysztof Rzadca 2018 */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #include <mpi.h> int main(int argc, char * argv[]) { struct timespec spec...
Java
UTF-8
2,926
2.25
2
[]
no_license
package com.example.joke.notificationLamp.service; import android.service.notification.NotificationListenerService; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.service.notification.StatusBarNotification; im...
Java
UTF-8
571
2.078125
2
[]
no_license
package features.api.blog; import common.ApiUtil; import common.CoreConstant; import io.restassured.response.Response; import static net.serenitybdd.rest.SerenityRest.given; public class Authen { public Response authenUser(models.features.blog.Authen authen){ return given().baseUri(CoreConstant.BLOG_HO...
Java
UTF-8
509
1.609375
2
[]
no_license
package web; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.ComponentScan; /** * Created by EGBoldyr on 14.03.18. */ @SpringBootApplicati...
Go
UTF-8
729
2.640625
3
[]
no_license
package postmark // GetThisServer gets details for the server associated // with the currently in-use server API Key func (client *Client) GetThisServer() (Server, error) { res := Server{} err := client.doRequest(parameters{ Method: "GET", Path: "server", TokenType: server_token, }, &res) return res, err } ...
TypeScript
UTF-8
1,282
2.65625
3
[ "0BSD", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import { AgChart, AgChartOptions } from "ag-charts-community" const options: AgChartOptions = { container: document.getElementById("myChart"), title: { text: "Number of Cars Sold", }, subtitle: { text: "(double click a column for details)", }, data: [ { month: "March", units: 25, brands: { BMW:...
Python
UTF-8
1,348
2.5625
3
[ "MIT" ]
permissive
from humans import Anastasis import urllib2, bs4, subprocess, random, time # concepts borrowed from artybollocks.com concepts = [ "postmodern discourse", "unwanted gifts", "Critical theory", "copycat violence", "Pre-raphaelite tenets", "daytime TV", "multiculturalism", "midlife subcultu...
Ruby
UTF-8
446
2.671875
3
[]
no_license
########################################################### # this file contains different implementations for reading # data from *.yaml file (e.g. with environment configs) ########################################################### require 'yaml' def read_config_yaml(filename, env) config = YAML.load_file filena...
Markdown
UTF-8
2,354
3.375
3
[]
no_license
# FindMyCar A Hackthon project, android application to helper users find where they parked their cars. # Author Jessica Zeng, Zephyr Yao and Edwin Angkasa. # What it does Our android app, Find My Car can help people find where they park their cars, no matter it is an outdoor parking lot or huge parking structure. Fin...
Python
UTF-8
3,475
2.9375
3
[]
no_license
# ########################################################################### # Portfolio classes from .defaults import ib_comission from quant_testing.core.events import ExecutionType, OrderEvent import logging logger = logging.Logger('portfolio.log') class Portfolio: pass class SingleSharePortfolio(Portfolio...
Python
UTF-8
812
3.59375
4
[]
no_license
"""We are the captains of our ships, and we stay 'till the end. We see our stories through. """ """https://practice.geeksforgeeks.org/problems/subset-sum-problem/0 [Top Down] """ def subset_sum_helper(arr, s, n, dp): if s == 0: return True if n == 0: return False if dp[n][s]: re...
Python
UTF-8
1,534
2.609375
3
[ "MIT" ]
permissive
from unittest import TestCase from django.db.models import Q from binder.views import prefix_q_expression from binder.permissions.views import is_q_child_equal from .testapp.models import Animal class TestPrefixQExpression(TestCase): def test_simple_prefix(self): self.assertTrue(is_q_child_equal( prefix_q_e...
Python
UTF-8
470
3.421875
3
[]
no_license
a = \ '(asciitree (sometimes you) (just (want to draw)) trees (in (your terminal)))' def mover(inp): b = inp.replace('(', '( ').replace(')', ' )').split(' ')[1:-1] count = 0 cort = [] description = False for el in b: if el != '(' and el != ')' and not description: cort.append((count, el)) description = ...
Markdown
UTF-8
6,860
2.96875
3
[ "MIT" ]
permissive
# Convey **Version**: v0.0.2 **Editors**: - [Haardik](https://www.linkedin.com/in/haardikkk/) **Contributors**: --- This specification describes the Convey Chat messaging protocol, which can be used with any decentralized ledger system which has the concept of addresses, to create an interoperable messaging networ...
C#
UTF-8
971
2.875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AgilePrinciplesPractice.Ch21; using NUnit.Framework; namespace AgilePrinciplesPracticeTests.Ch21 { [TestFixture] public class TestSleepCommand { public void TestSleep() ...
TypeScript
UTF-8
1,792
2.828125
3
[ "MIT" ]
permissive
import { ERROR_TYPE } from "../enums"; import { IError } from "../interfaces"; export class ErrorHelper implements IError { type: ERROR_TYPE; message: string; constructor(type: ERROR_TYPE, info?) { this.type = type; this.message = this.getMsg_(info); } throw() { throw this...
Shell
UTF-8
1,450
2.609375
3
[ "MIT" ]
permissive
#!/bin/bash # Bash script to set environment variables for provisioning. # NOTE: Please do a change-all on this script to change "cjoakim" to YOUR ID! # # Chris Joakim, Microsoft, August 2021 export primary_region="eastus" export primary_rg="cjoakimcsl" # csl = Cosmos-Synapse-Link # export cosmos_sql...
JavaScript
UTF-8
3,267
3.046875
3
[]
no_license
var x = [], y = [], insectNum = 20, insectBody = 20; var LightBullOn; var LightBullOff; var LightSign; var k = 0; for (var i = 0; i < insectNum; i++) { x[i] = 0; y[i] = 0; } function setup() { createCanvas(windowWidth, windowHeight); strokeWeight(20); stroke(0); textFont('Helvetica'); frameRate(...
SQL
UTF-8
441
2.953125
3
[]
no_license
-- script that prepares a MySQL server for the project: -- A database hbnb_test_db -- A new user hbnb_test (in localhost) -- The password of hbnb_test is: hbnb_test_pwd CREATE DATABASE IF NOT EXISTS hbnb_test_db; CREATE USER IF NOT EXISTS 'hbnb_test'@'localhost' IDENTIFIED BY 'hbnb_test_pwd'; GRANT ALL PRIVILEGES ON hb...
JavaScript
UTF-8
631
3.140625
3
[]
no_license
const axios = require('axios'); const url = 'https://swapi.co/api/people' const characters = [] const fetchCharacters = apiURL => { axios.get(apiURL).then(response => { return response }) } // //PROMISE PENDING // fetchCharacters() //PROMISE PENDING const parseCharacters = data => { data.results...
Java
UTF-8
11,285
2.109375
2
[]
no_license
package clayburn.familymap.app.ui; import android.app.ActivityManager; import android.content.Context; import android.content.Intent; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.NavUtils; import android...
C++
UTF-8
2,537
3.234375
3
[ "WTFPL" ]
permissive
///////////////////////////////////////////////// /// \file ScoreManager.cpp /// \brief Implementation of the ScoreManager class. /// \author Benjamin Ganty /// \date 22nd November 2011 /// \version 1.0 ///////////////////////////////////////////////// #include "ScoreManager.hpp" #include <fstream> /////////////////...
C#
UTF-8
1,362
3.734375
4
[]
no_license
// helper classes which compiles a fast, type-safe delegate for writing various types static class MyBinaryWriterHelper<T> { public static readonly Action<MyBinaryWriter, T> WriteAction; static { // find the existing Write(T) on the MyBinaryWriter type var writeMetho...
Markdown
UTF-8
796
3.109375
3
[ "MIT" ]
permissive
# Graph-Edge-Coloring An implementation of a Graph Edge Coloring algorithm. Colors the graph in delta or delta + 1 max colors. Read the graph-theory-report-final.pdf for more information. Graph must be a connected graph for the algorithm to work. To add your test graphs: - You can put them in `test_graphs` folder - ...
Python
UTF-8
4,183
2.71875
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
from pathlib import Path import rasa.shared.constants from rasa.shared.core.training_data.story_reader.markdown_story_reader import ( MarkdownStoryReader, ) from rasa.shared.core.training_data.story_writer.yaml_story_writer import ( YAMLStoryWriter, ) from rasa.shared.utils.cli import print_success, print_warn...
Python
UTF-8
1,171
3.75
4
[]
no_license
from unittest import TestCase, main def formatar_nome(nome): palavras = nome.split() if len(palavras) == 1: return palavras[0].upper() if palavras[-1].upper() in ["FILHO", "FILHA", "NETO", "NETA", "SOBRINHO", "SOBRINHA", "JUNIOR"]: restante = " ".join(palavras[:-2]) maiusculo = " "...
Python
UTF-8
371
3.171875
3
[ "MIT" ]
permissive
s = "Hi He Lied Because Boron Could Not Oxidize Fluorine. New Nations Might Also Sign Peace Security Clause. Arthur King Can." words = s.split(" ") foo = [(words[idx - 1][0], idx) for idx in [1, 5, 6, 7, 8, 9, 15, 16, 19]] bar = [(words[idx - 1][:2], idx) for idx in [2, 3, 4, 10, 11, 12, 13, 14, 17, 18, 20]] foo...
Markdown
UTF-8
1,166
2.640625
3
[]
no_license
--- title: Shoe Dog author: Phil Knight vote: 9/10 read_in: English created_at: 2018-11-24 tags: ['review'] --- This book is the story of Nike, told by its founder. A very powerful tale, and a highly fascinating person. The story focuses mostly on the years 1962 to 1980 when the company was finally incorporated. Like ...
SQL
UTF-8
2,373
3.921875
4
[]
no_license
SET search_path TO first, public; --- Table creation CREATE TABLE first.films ( id serial PRIMARY KEY, title text NOT NULL, country varchar(256), box_office bigint, release_year timestamp ); CREATE TABLE first.persons ( id serial PRIMARY KEY, fio text ); CREATE TABLE first.persons2content ( films_id i...
Java
UTF-8
287
1.789063
2
[]
no_license
package assinmenttsc; import javax.swing.JOptionPane; public class MathOlympiad implements Fest{ @Override public void reserveTSC() { // } @Override public void publish() { JOptionPane.showMessageDialog(null,"Connected to Media"); } }
Java
UTF-8
1,095
3.671875
4
[]
no_license
/* // Definition for a Node. class Node { public int val; public Node next; public Node random; public Node() {} public Node(int _val,Node _next,Node _random) { val = _val; next = _next; random = _random; } }; */ class Solution { public Node copyRandomList(Node head...
Java
UTF-8
1,732
2.5
2
[ "Apache-2.0" ]
permissive
package org.lin.http; import org.lin.controller.AnimeController; import org.lin.util.OSUtil; import org.lin.websocket.WebSocketServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Lin = ̄ω ̄= * @date 2021/8/2 */ public abstract class AbstractApplication { private static final Logger LOGGE...
Markdown
UTF-8
849
2.8125
3
[ "MIT" ]
permissive
# Ember Hearth Ember Hearth is an application used to manage Ember projects. **Warning: Ember Hearth is alpha software and may misbehave.** ## Features * Installs all needed tools automatically ([node.js](http://nodejs.org), [NPM](http://npmjs.com), [Bower](http://bower.io), [PhantomJS](http://phantomjs.org), [Ember-...
Java
UTF-8
1,471
2.4375
2
[]
no_license
package com.zzw.thinkpad.thear.weight; import android.os.CountDownTimer; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import pl.droidsonroids.gif.GifImageView; public class CountdownImage extends CountDownTimer { private ImageView ImageView; private GifImageView ...
Java
UTF-8
1,823
2.265625
2
[]
no_license
package ss.client.ui.Listeners; import java.util.Hashtable; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; import ss.client.event.SendCreateAction; import...
Python
UTF-8
1,327
3.828125
4
[]
no_license
import random #the list with cards cards = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] colors = ['blue', 'green', 'red', 'yellow'] special = ['+2', 'skip a turn', 'reverse'] colorless = ["+4", "choose a color"] deck = [] playerCards = [] aiCards = [] pile = [] #generates the deck of cards for x in range(4): ...
Java
UTF-8
1,609
2.046875
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2016 JBoss Inc * * 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 i...
Java
UTF-8
4,248
2.421875
2
[]
no_license
package states; import java.awt.Font; import org.lwjgl.input.Mouse; import org.newdawn.slick.Color; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Input; import org.newdawn.slick.Music; import org.newdawn.slick.SlickException; import org.newdawn.slick.Sound; import...
Java
UTF-8
11,257
2.28125
2
[]
no_license
package application; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java...
Ruby
UTF-8
178
3.546875
4
[]
no_license
def average(arr) total = 0 arr.each do |num| total += num end total / arr.length.to_f end puts average([1, 5, 87, 45, 8, 8]) puts average([9, 47, 23, 95, 16, 52])
Java
UTF-8
808
2.734375
3
[]
no_license
package ejercicioPlatos; import java.util.concurrent.TimeUnit; public class Colocador implements Runnable { PilaDePlatos pilaPlatosSecos; PilaDePlatos alacena; public Colocador(PilaDePlatos pilaPlatosSecos, PilaDePlatos alacena) { this.pilaPlatosSecos = pilaPlatosSecos; this.alacena = ala...
Markdown
UTF-8
2,149
2.765625
3
[]
no_license
# Questions: If LT member submit form, does it need approval by another LT member? # HR Action Form React app that allows leaders within CCB to post an HR action form. ## Tech learned/practiced in this project: * React * Redux * Firebase * Material UI * Formik * Yup * Jest & Enzyme * day.js (replaces moment.js) ...
Java
UTF-8
2,201
2.0625
2
[]
no_license
package jfox.platform.function.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import jfox.platform.infrastructure.LocalNamingAndRefInspectableEntityObject; /** * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a> */ @Entity @Table(nam...
TypeScript
UTF-8
3,045
2.671875
3
[ "Apache-2.0" ]
permissive
import * as Calendars from '../test/data/Calendars'; import * as Weekdays from '../test/data/Weekdays'; import { getWeekdaySpan } from './WeekdayUtils'; test('Sample normal openings return appropriate current openings', () => { const OPENINGS = Calendars.SUMMER_SP_1_2.normalHours; expect(getWeekdaySpan(OPENINGS[0]...