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
2,266
2.765625
3
[]
no_license
# -*- coding: utf-8 -*- import numpy as np from sklearn.neighbors.classification import KNeighborsClassifier from sklearn.naive_bayes import GaussianNB from sklearn.linear_model import SGDClassifier from sklearn.svm import SVC from sklearn.model_selection import KFold from sklearn.preprocessing import scale D = np.lo...
Rust
UTF-8
14,967
2.625
3
[ "MIT" ]
permissive
/* * Alias container manager. * * Author: Pranav Kumar <pmkumar@cmu.edu> */ use clap::clap_app; use clap::AppSettings; use scan_fmt::scan_fmt; use dirs; use regex::Regex; use std::env; use std::fs; use std::fs::{File, OpenOptions}; use std::io; use std::io::prelude::*; use std::io::{BufRead, BufReader}; use std::...
JavaScript
UTF-8
2,422
2.765625
3
[ "MIT" ]
permissive
import fetch from 'cross-fetch' const state = { connection: null, } export async function connect(url, options = {}) { state.connection = url await handshake() options.verbose && console.log(`pdftest: Successfully connected to ${getConnection()}.`) } export function getConnection() { return state.connectio...
Python
UTF-8
2,571
2.71875
3
[]
no_license
import csv, pickle import numpy as np from sklearn import utils from affnist_read import loadmat from finnegan.network import Network def run_mnist(run_num, epochs=0, layers=0, neuron_count=0): """ Run affNIST dataset and output a guess list on test and validation sets. Dumps a pickle of the trained network...
Python
UTF-8
707
3.109375
3
[]
no_license
#1655 import heapq import sys n = int(sys.stdin.readline()) left, right = [], [] for _ in range(n): num = int(sys.stdin.readline()) if len(left) == len(right): heapq.heappush(left, (-num, num)) else: heapq.heappush(right, (num, num)) if right and left[0][1] > right[0][1]: l...
Markdown
UTF-8
5,923
2.890625
3
[ "MIT" ]
permissive
--- layout: post comments: true title: SVATTT (ASCIS) 2020 categories: ['2020'] --- 1) Source cho ai cần (chỉ những file cần thiết để dựng lại bài, không có front-end hay các file dư ra): - [Among Us](https://github.com/matuhn/matuhn.github.io/blob/master/_posts/SVATTT2020/svattt_web1.zip) - [TSULOTT3](https://githu...
Shell
UTF-8
641
3.484375
3
[]
no_license
#!/bin/bash # decodes in parallel and saves hypergraphs to specified folder. Does not support a second set of weights PARALLELIZE=/toolbox/cdec_fh/training/utils/parallelize.pl CDEC=/toolbox/cdec_fh USAGE="$0 <queries> <cdec.ini> <weights> <hg output folder> <jobs>" INPUT=$1 INI=$2 if [[ $# == 5 ]]; then W=$3 ...
C#
UTF-8
2,968
2.5625
3
[]
no_license
using KSR.Logic.Knn; using KSR.Model; using System; using System.Collections.Generic; using System.Linq; namespace KSR.Logic.Metric { public class Manhattan : IMetric { #region Public Methods public void Calculate(List<Article> TrainingVectors, Article TestVector, int kNeighbours) { ...
TypeScript
UTF-8
582
2.640625
3
[]
no_license
import { ActionReducerMap } from "@ngrx/store"; import * as bananaStore from "./banana/state"; export interface AppState { banana: bananaStore.State; } export const initialState: AppState = { banana: bananaStore.initialState, }; export const reducers: ActionReducerMap<AppState> = { banana: bananaStore.reducer,...
Java
UTF-8
555
2.75
3
[ "MIT" ]
permissive
package biocode.fims.photos.processing; /** * @author rjewing */ public class PhotoProcessingTask implements Runnable { private final PhotoProcessor photoProcessor; private final UnprocessedPhotoRecord record; PhotoProcessingTask(PhotoProcessor photoProcessor, UnprocessedPhotoRecord record) { t...
JavaScript
UTF-8
3,552
2.890625
3
[]
no_license
// class component because we will need diff states import React from "react"; import { Link } from "react-router-dom"; import axios from "./axios"; export default class ResetPassword extends React.Component { constructor(props) { super(props); this.state = { newPw: "", emai...
PHP
UTF-8
966
2.765625
3
[]
no_license
<?php // DECLARAR VARIABLES $nombre = trim($_POST['nombre']); $correo = trim($_POST['correo']); $telefono = trim($_POST['telefono']); $asunto = trim($_POST['asunto']); $servicio = trim($_POST['servicio']); $comentario = trim($_POST['comentarios']); $comentario = wordwrap($comentario, 70, "\r\n"); $br ...
Java
UHC
1,189
4.21875
4
[]
no_license
package com.ezen.example; /** * İ * - 01 * * @author yoman * * 2019. 09. 24 * * ڶ * º 캯 ϴ Դϴ. * * ڴ ٸ ȣ ս پϰ ֽϴ. */ public class ExpressionSample07 { public static void main(String[] args) { // int a = 2; int b = 3; a += b; // a = a + b System.out.println("a b " + a + "Դ...
Java
UTF-8
7,979
2.21875
2
[]
no_license
/* * Created by JFormDesigner on Sun Mar 11 21:12:03 CDT 2007 */ package anl.verdi.gui; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JCheckBox; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JSpinner; i...
C
UTF-8
1,533
3.953125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> void sort1(int *,int);/*swapping logic*/ void sort2(int *,int);/*bubble sort */ void sort3(int *,int);/*count zeroes*/ void sort4(int *,int);/*count ones by adding all array elements*/ void main() { int a[100],n,i; printf("enter number of elements\n"); scanf("%d",&n); printf(...
C++
UTF-8
3,283
2.6875
3
[ "MIT" ]
permissive
// // Created by mathis on 28/11/2020. // #include "QuadLight.hpp" #include <Core/Utils/DrawableVisitor.hpp> namespace daft::engine { int QuadLight::m_nrQuadLight{0}; void QuadLight::render(const core::ShaderProgram &shader) { shader.setMat4("model", model()); shader.setVec3("material.albedo", color()); ...
C#
UTF-8
6,925
3.515625
4
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; /* Developed by: Warren Hammock Created on: 1/28/18 Purpose: Create a min heap from input. After complete, delete top. */ namespace Heap { class MinH...
C++
UTF-8
3,011
3
3
[]
no_license
#include "FileHandling.h" using namespace std; void FileHandling::checkArguments(int argc, char* argv[]){ //zmienne pomocnicze bool u = false; bool r = false; string arg, arg2; //petla przechodzaca po przeslanych argumentach for (int i = 1; i < argc; i++) { arg = argv[i]; if (arg == "-h") { ...
Java
UTF-8
34,271
2.171875
2
[]
no_license
package com.navinfo.dataservice.scripts; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.ut...
C#
UTF-8
1,706
2.546875
3
[]
no_license
using DataBaseController.DAOs; using DataBaseController.Modelos; using DSharpPlus.Entities; using KurosawaCore.Extensions; using KurosawaCore.Extensions.JsonEmbedExtension; using System; using System.Threading.Tasks; namespace KurosawaCore.Configuracoes { internal sealed class PrefixConfig { internal ...
Shell
UTF-8
846
2.71875
3
[]
no_license
# Maintainer: MGPlastic <doraismydora@gmail.com> # Contributor: MGPlastic <doraismydora@gmail.com> pkgbase=openface-TadasBaltrusaitis pkgname=(openface-TadasBaltrusaitis) _pkgname=OpenFace pkgver=ad1b3cc pkgrel=1 pkgdesc="TadasBaltrusaitis/OpenFace build from git" arch=(x86_64) license=(BSD) url="https://github.com/Ta...
Python
UTF-8
976
4.25
4
[]
no_license
x = "There are %d types of people." % 10 # assign a string to x, using formatter %d, %d = 10 binary = "binary" # assign a string to binary do_not = "don't" # assign a string to do_not y = "Those who know %s and those who %s." % (binary, do_not) # assign a string to y, using formatter %s, %s = (binary, do_not) print x...
Markdown
UTF-8
11,517
3.0625
3
[ "MIT" ]
permissive
--- title: Дракон наносит ответный удар date: 24/02/2019 --- **Слово**: Откр. 12:17; 13:1–18 **Краткий обзор (см. Откр. 12:7)** В Откр. 12 описывается конфликт между драконом (сатаной) и последователями Иисуса, начиная со времен Христа до конца периода в 1 260 лет. В последнем стихе этой главы мы читаем о том, что...
C++
UTF-8
1,220
2.828125
3
[]
no_license
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *********...
Java
UTF-8
901
2.015625
2
[]
no_license
package com.yimin.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yimin.domain.Notice; import com.baomidou.mybatisplus.extension.service.IService; /* * @Author : Yimin Huang * @Contact : hymlaucs@gmail.com * @Date : 2020/12/13 17:32 * @Description : * */ public...
PHP
UTF-8
2,858
2.859375
3
[]
no_license
<?php /** * Abstract class to define/implement base methods for all controller classes * * @since 1.0.0 * @package Plugin_Name * @subpackage Plugin_Name/controllers * */ namespace Rodes\WpWebFrameworkExampleApp\Controllers; if ( ! class_exists( 'Controller' ) ) { abstract class Controller { priva...
JavaScript
UTF-8
209,032
2.5625
3
[]
no_license
/** * Created by python tools * User: stone * Date: 2013-01-15 * Time: 17-16-04 * only change the file by tools. */ function createArrayCity() { var arrayCity=new Array(); arrayCity[0]=new Array(339,2,27,"铜川市"); arrayCity[1]=new Array(340,2,27,"宝鸡市"); arrayCity[2]=new Array(341,2,27,"咸阳市...
Python
UTF-8
1,157
2.765625
3
[]
no_license
MOD = 10**9 + 7 MOD_t_MAX = 3 * (10**5) fac = [None] * MOD_t_MAX finv = [None] * MOD_t_MAX inv = [None] * MOD_t_MAX def MOD_COM_init(): fac[0] = fac[1] = 1 finv[0] = finv[1] = 1 inv[1] = 1 for i in range(2, MOD_t_MAX): fac[i] = fac[i - 1] * i % MOD inv[i] = MOD - inv[MOD%i] * (MOD // ...
C++
UTF-8
2,886
2.71875
3
[]
no_license
// // MaschineBoi.h // pacmaschine // // Created by Antonio Malara on 16/05/2018. // Copyright © 2018 Antonio Malara. All rights reserved. // #ifndef MaschineBoi_h #define MaschineBoi_h #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <unistd.h> class GameButtonsState; static const int WIDTH ...
C++
UTF-8
1,297
3.109375
3
[]
no_license
#pragma once #include <string> class MultiTypes { public: virtual void* get() const = 0; }; class INT : public MultiTypes { public: INT(int num = 0) : m_num(num) {}; INT(const INT& num) : m_num(num.m_num) {}; ~INT() {}; virtual void* get() const { return (void*)&m_num; }; private: int m_num; ...
Python
UTF-8
4,672
2.546875
3
[ "BSD-3-Clause" ]
permissive
# !/usr/bin/env python3 -u # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Sktime window forecaster base class.""" __author__ = ["mloning", "big-o", "fkiraly"] __all__ = ["_BaseWindowForecaster"] import numpy as np import pandas as pd from sktime.forecasting.base._base import DEFAULT_ALPHA...
C++
UTF-8
414
2.703125
3
[]
no_license
#ifndef BUFFER_PTR #define BUFFER_PTR #include <string.h> #include "simple_buffer.h" class BufferPtr { private: /* data */ public: BufferPtr(const void* buff, size_t len); BufferPtr(SimpleBuffer); ~BufferPtr(); void setBuffer(const void* buff, size_t len); const void* data(); size_t leng...
SQL
UTF-8
240
2.625
3
[]
no_license
CREATE TABLE Byy ( ByID BIGINT IDENTITY(1,1) NOT NULL, Postnummer NVARCHAR(MAX) NOT NULL, Land NVARCHAR(MAX) NOT NULL, Bynavn NVARCHAR(MAX) NOT NULL, CONSTRAINT pk_By PRIMARY KEY CLUSTERED (ByID))
C++
UTF-8
770
2.546875
3
[ "MIT" ]
permissive
// // TerrainFace.h // Vcore // // Created by Byron Mallett on 3/21/12. // Copyright 2012 __MyCompanyName__. All rights reserved. // #ifndef TERRAINFACE_H #define TERRAINFACE_H 1 #include <vector> #include <iostream> #include "./Mesh/Vertex.h" #include "./Mesh/Vec3.h" #include "./Mesh/Face.h" namespace Vcore {...
Java
UTF-8
527
2.34375
2
[ "Apache-2.0" ]
permissive
package me.travis.turok; // Draw. import me.travis.turok.draw.GL; import me.travis.turok.task.Font; // Task. /** * @author me * * Created by me. * 27/04/20. * */ public class Turok { private String tag; private Font font_manager; public Turok(String tag) { this.tag = tag; } public void resize(int x, int y...
C++
UTF-8
307
2.984375
3
[]
no_license
#include <iostream> using namespace std; // matrix points to the first element in an array whose elements are arrays of ten ints void print(int (*matrix)[10], int rowSize) { /* ... */ } // equivalent definition void print2(int matrix[][10], int rowSize) { /* ... */ } / int main() { return 0; }
Python
UTF-8
304
4.34375
4
[]
no_license
#takes a list of words and returns the length of the longest one text = input("Please input a list of words to use: ") length = 0 for words in text.split(): if len(words) > length: length = len(words) longest = words print("The longest word is", longest, "with length", len(longest))
Markdown
UTF-8
1,630
3.453125
3
[ "MIT" ]
permissive
--- title: The Invisible Hand date: 16/10/2019 --- #### inVite In the writings of the Scottish economist and philosopher Adam Smith, the image of an invisible hand is used to describe the capitalistic interplay of the individual with larger society. The harder an individual works for self-motivated interests, the l...
Python
UTF-8
740
3.359375
3
[]
no_license
def isPalindrome(s,begin,end): while begin<end: if s[begin]!=s[end]: return False begin+=1 end-=1 return True def doPartition(s,partitions,temppartition): if len(s)==0: partitions.append(list(temppartition)) return for i in range(len(s)): if is...
Python
UTF-8
420
2.875
3
[]
no_license
import sys import os class Player: def __init__(self): self.userName = None self.pw = None self.first = None self.last = None self.days = 1 def setUserName(self, userName): self.userName = userName def setpw(self, pw): self.pw = pw def setFirs...
Java
UTF-8
3,886
2.0625
2
[]
no_license
package org.kuali.ext.mm.service.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.cxf.common.util.StringUtils; import org.kuali.ext.mm.businessobject.ReturnDetail; import org.kuali.ext.mm.common.sys.MMConstants; import org.kuali.ext.m...
Java
UTF-8
1,315
2.0625
2
[]
no_license
package com.csd.nandai.domain; /** * Created by Administrator on 2016-05-09. */ public class Admin { private int adminid; private String adminname; private String password; private String sex; private String birthday; private String email; private String address; public int getAdmini...
Java
UTF-8
2,327
2.234375
2
[]
no_license
package com.constructoressas.ciudadeladelfuturo.entities; import javax.persistence.*; import java.util.Date; import java.util.List; import static javax.persistence.GenerationType.IDENTITY; @Entity @Table(name = "tipo_construccion") public class TipoConstruccion { @Id @GeneratedValue(strategy = IDENTITY) ...
Python
UTF-8
2,722
3.515625
4
[]
no_license
# https://drive.google.com/file/d/10eSYB9dvpj_GvrVqU3IuPHaO4I9cmyJb/view?usp=sharing # Bài 106 - Dinh Quy Pham print("Chương trình nhập vào một số tự nhiên có ba chữ số, và in ra cách đếm chữ số đó") print("--------------------------------------------------------------------------------") dic1 = {1: "Một trăm", 2...
Java
UTF-8
1,357
3.3125
3
[]
no_license
public class Principal { public static void main(String[] args) { Point p1 = new Point(2,3); Point p2 = new Point(); p2.setX(p1.getX()); p2.setY(p1.getY()); Point p3 = new Point(p1); System.out.println("Distance p1 = " + p1.distance(0, 0)); System.out.println("p2.x = " + p2....
C#
UTF-8
461
2.578125
3
[]
no_license
using System.Collections; using UnityEngine; public class EnemySpawner : MonoBehaviour { [SerializeField] private Enemy enemy; public float cd; private void Start() { StartCoroutine(ISpawn()); } IEnumerator ISpawn() { while (true) { yield return n...
C#
UTF-8
683
3.578125
4
[]
no_license
//Programa para calcular a quantidade de degraus para alcançar certa altura. using System; // Questão 7 - Maria Carolinne class atv7 { static void Main(string[] args) { double alturaDegrau, alturaUsuario; escreve("Digite a altura que você quer alcançar"); alturaUsuario = double.Pars...
Java
UTF-8
1,410
2.15625
2
[]
no_license
package xyz.shurlin.client.render.entity.model; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.ModelData; import net.minecraft.client.model.ModelPart; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.entity.model.EntityModel;...
Java
UTF-8
6,032
2.4375
2
[ "Apache-2.0" ]
permissive
package org.opensha.commons.eq.cat.db; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; import org.apache.commons.io.IOUtils; import org.opensha.common...
Python
UTF-8
266
2.6875
3
[]
no_license
def main(): N, M = map(int, input().split()) ans = (N - 1) * (M - 1) print(ans) if __name__ == '__main__': main() # import sys # # sys.setrecursionlimit(10 ** 7) # # input = sys.stdin.readline # rstrip() # int(input()) # map(int, input().split())
Markdown
UTF-8
508
2.921875
3
[ "Unlicense" ]
permissive
# KLD_exercise Simple Exercise to implement Forward and Reverse KL-Divergence minimization. Here the Target distribution is P(X), is a mixture of gaussians and the Approximating distribution is Q(X) is a gaussian. The experiment is implemented in 1D so that its easy to understand and visualize. Intended Learning out...
PHP
UTF-8
500
2.640625
3
[]
no_license
<?php // ตัวอย่างโปรแกรมที่ 3.11 ตัวอย่างการใช้โครงสร้างเงื่อนไขแบบหลายทางเลือก $S = 200000; $M = 5000000; $L =10000000; $budget = 250000; if($budget >=$L) { echo "Large Project<BR>"; } elseif($budget>=$M) { echo "Meduim Project<BR>"; } elseif($budget>=$S) { echo "Small Project<B...
C++
UTF-8
1,015
2.9375
3
[]
no_license
#include <gtest/gtest.h> #include "../chess/Rook.h" #include "../chess/Game.h" TEST(RookTest, inValidWhiteRookMove) { Game game; game.getBoard().intitalize(); Rook rook(Color::White); ASSERT_FALSE(rook.canMove(game, Position(0, 0), Position(0, 2))); ASSERT_FALSE(rook.canMove(game, Position(0, 7), Position(3, 7)))...
Java
UTF-8
399
2.296875
2
[]
no_license
package com.jeeex.objregex.impl; /** * Interface that defines a method that creates a single transition NFA * {@link State} for the given {@link TransitionIdentifier}. * * @author Jeeyoung Kim * @since 2010-02-21 * */ public interface SingleTransitionFactory { /** * Create a single transition. */ publi...
Java
UTF-8
6,080
2.640625
3
[]
no_license
package com.huangzan.web.db; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.huangzan.web.module.BookMark; import com.huangzan.web.module.HistoryWeb; import java.util.ArrayList; i...
Java
UTF-8
427
3.03125
3
[]
no_license
package com.xzh.aspectj_in_action.args.model; public class XiaoZhang implements Man{ @Override public void walk(Animal animal) { System.out.println("xiaozhang带着"+animal.yield()+"叫的"+animal.getName()+"散步"); } public void walkWithBookAndDog(Dog dog,Book book){ System.out.println("xiaozha...
Python
UTF-8
2,759
2.765625
3
[]
no_license
import gspread from oauth2client.service_account import ServiceAccountCredentials from AuctionsDataFrame import AuctionsDataFrame import time class AuctionsRepository: def __init__(self): """ The Auction Repository is responsible for connecting to Google Drive AOI and login with: ...
Java
UTF-8
668
2.5625
3
[]
no_license
package com.ag.concurrency.main.forkjoin; public class ThresholdSingleton { private static ThresholdSingleton instance; private static int threshold; public int getThreshold() { return ThresholdSingleton.threshold; } public static ThresholdSingleton getInstance(int length){ if(...
C
UTF-8
3,527
2.5625
3
[ "BSD-3-Clause" ]
permissive
#include <stdio.h> #include <dash/dart/if/dart_types.h> #include <dash/dart/if/dart_team_group.h> #include <dash/dart/shmem/dart_groups_impl.h> dart_ret_t dart_group_sizeof(size_t *size) { *size=sizeof(dart_group_t); return DART_OK; } dart_ret_t dart_group_create(dart_group_t *group) { int i; group->nmem ...
JavaScript
UTF-8
472
2.53125
3
[]
no_license
import React from 'react' class Button extends React.Component { constructor() { super() this.state = { name: "ravi" } } changetext = (e) => { this.setState({ name: e }) } render() { return (<div> <p>{this.st...
Python
UTF-8
7,890
2.53125
3
[]
no_license
import pysam import ast import sys from optparse import OptionParser def readNormalSeq(referenceFile, referenceRegion): variantGenotypes = {}; variantAlleles = {}; referenceSeq = []; normalSeq = []; ##vcfRegion = 'chr' + referenceRegion; #vcfRegion = 'G15512.prenormal.sorted'; ...
C#
UTF-8
4,252
2.546875
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Items/Inventory", fileName = "Inventory.asset")] [System.Serializable] public class Inventory : ScriptableObject { // Saving using unity dev example. // https://bitbucket.org/richardfine/scriptableobject...
Python
UTF-8
7,425
2.765625
3
[]
no_license
import pandas as pd import requests from collections import OrderedDict # Query full list of light pollution sources, including quarry, factory, greenhouse and shopping malls within Spain def update(): print('The process will take about 90 seconds to complete.') print('Please be aware that the query endpoint ...
Python
UTF-8
2,246
2.984375
3
[ "MIT" ]
permissive
import re import csv from time import sleep from bs4 import BeautifulSoup import requests headers = { 'accept': '*/*', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.9', 'referer': 'https://news.search.yahoo.com/', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Wi...
Shell
UTF-8
7,637
2.71875
3
[]
no_license
# If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH export TERM="xterm-256color" # Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh export EDITOR='nvim' # Set name of the theme to load. Optionally, if you set this to "random" # it'll load a random ...
Markdown
UTF-8
5,422
3.140625
3
[ "MIT" ]
permissive
--- title: Ethnic Prejudices date: 11/11/2018 --- `Read Acts 6:1. What issue in the early church caused people to com-plain about what appeared to be the unfair and unequitable distribution of food to widows?` Some early Christians appeared to be prejudiced against the widows of Greek heritage in their midst and pr...
Ruby
UTF-8
1,064
2.96875
3
[]
no_license
require 'cobinhood_api' API_KEY = "put your key here" api = CobinhoodApi.new(api_key:API_KEY) trading_pair = "COB-ETH" order_size = 250.0 init_price_coef = 3 alter_price_coef = 2 pause = 2 ticker = api.get_ticker(trading_pair) last = ticker['last_trade_price'].to_f puts last order = api.place_order(trading_pair, T...
Python
UTF-8
1,746
2.90625
3
[]
no_license
from pytest_bdd import ( given, scenario, when, then, ) from Data.config import settings from selenium import webdriver import pytest @pytest.fixture(scope="module") def driver(): if str(settings['browser']).lower() == "firefox": driver = webdriver.Firefox(settings['firefox_driver']) e...
Python
UTF-8
973
2.59375
3
[]
no_license
import sqlite3 from flask import request from flask_restful import Resource, reqparse from werkzeug.security import generate_password_hash from src.models import UserModel class UserRegister(Resource): parser = reqparse.RequestParser() parser.add_argument("user_name", type=str, required=True, ...
JavaScript
UTF-8
2,366
2.578125
3
[]
no_license
const electron = require('electron') let win = null; const FRONTEND = "./frontend" const BACKEND = "./backend" // get display options let mainScreen; let screenWidth; let screenHeight; let windowWidth = 300; let windowHeight = 160; let padding = 10; // get app instance const app = electron.app; require('elect...
Go
UTF-8
899
2.71875
3
[ "Apache-2.0" ]
permissive
package main import ( gen "main/proto" "context" "fmt" "google.golang.org/grpc" ) func main() { fmt.Println("Hello Client.. ") opts := grpc.WithInsecure() cc, err := grpc.Dial("localhost:8000", opts) if err != nil { panic(err) } defer cc.Close() client := gen.NewAddServiceClient(cc) request1 := &...
Markdown
UTF-8
325
2.734375
3
[]
no_license
# All Frogs Can Grow > Anyone can be taught Anything *Many people believe that individuals are limited at the moment of their birth to specific ...* The explanation of the rule. ### Examples Examples of this rule in action. - get to thresholds in their life, and stay there for an indeterminante amount of time. Pe...
Python
UTF-8
4,279
2.53125
3
[ "MIT" ]
permissive
import numpy as np from scipy.interpolate import RegularGridInterpolator import sys from time import time, sleep from tqdm import tqdm def mfp3d(arr, xth=0.5, iterations=10000000, verbose=True, point='random'): #3D interpolation is required #RegularGridInterpolator in scipy(>0.14) is used to do the interpolation i...
Java
UTF-8
10,680
1.71875
2
[]
no_license
package id.sch.smktelkom_mlg.project.xirpl601101928.takel1.rumh; import android.content.ContentResolver; import android.content.Intent; import android.content.res.Resources; import android.content.res.TypedArray; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.v4.v...
Java
UTF-8
2,739
2.25
2
[]
no_license
package com.busnoseat.demoWeb.controller; import com.busnoseat.demoWeb.integration.bean.user.UserRequestBean; import com.busnoseat.demoWeb.integration.bean.user.UserResponseBean; import com.busnoseat.common.code.CommonRspCode; import com.busnoseat.common.pagination.PaginationBean; import com.busnoseat.demoWeb.integrat...
JavaScript
UTF-8
8,851
3.078125
3
[]
no_license
class BufferedSearch { constructor(callback, searchDelay = 400) { this.delayTimer = null; this.callback = callback; this.searchDelay = searchDelay; } setCallback(callback) { this.callback = callback; } doSearch(text) { var self = this; clearTimeout(this.delayTimer); this.delayTim...
Python
UTF-8
274
3.359375
3
[]
no_license
cantidad = 3 numeroArticulo = 567 precio = 49.95 #miPedido = "quiero {} piezas del articulo {} con {} euros." miPedido = "quiero {2} piezas del articulo {0} con {1} euros." # Utilizando los indices de las variables. print(miPedido.format(cantidad,numeroArticulo,precio))
JavaScript
UTF-8
1,084
2.515625
3
[]
no_license
import React, { useState, useEffect } from "react"; import "../../style/OrderItems.css"; const OrderItems = (props) => { const [Items, setItems] = useState([]); const url = process.env.REACT_APP_GET_ORDER_ITEMS_URL; const options = { mode: "cors", method: "POST", headers: { "Content-Type": "ap...
JavaScript
UTF-8
6,190
2.53125
3
[ "MIT" ]
permissive
import { computed } from '@ember/object'; import Mixin from '@ember/object/mixin'; import PromiseProxyMixin from '@ember/object/promise-proxy-mixin'; import ArrayProxy from '@ember/array/proxy'; import { assert } from '@ember/debug'; import { Promise } from 'rsvp'; import DS from 'ember-data'; const PromiseArray = Arr...
Python
UTF-8
1,349
2.921875
3
[]
no_license
#!/usr/bin/env python import sys def main(argv): barcode_file = argv[0] targets = int(argv[1]) bc_lines = open(barcode_file,'r').readlines() samples = {} for bc in bc_lines: bc = bc.rstrip() if bc.find("#")>-1: continue bc = bc.replace("Target ","") l = bc.split(",") sample = l[0].replace(" "...
C#
UTF-8
2,162
3.546875
4
[]
no_license
using System; using System.Collections.Generic; namespace BFS { public class Graph { Dictionary<int, List<int>> adjList; int vertexCount; Vertex[] vertexes; public Graph(Dictionary<int, List<int>> input) { adjList = input; vertexCou...
Python
UTF-8
1,420
3.328125
3
[]
no_license
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None # class Solution: # def maxPathSum(self, root: TreeNode) -> int: # stack = [] # maxSum = -float("inf") # tmpNode = root # while(tmp...
SQL
UTF-8
538
3.984375
4
[]
no_license
-- Consider a database with a table called "accounts", having two fields: -- "entrydate" (type: DATE) -- "accountno" (type: INT) -- Write a SQL query which returns the "accountno" field values corresponding to the most recent entrydate. The returned value should be represented using the column name, "accountno". ...
Java
UTF-8
5,239
2.390625
2
[ "Apache-2.0" ]
permissive
package com.intesens.kinto_http; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.spy; import java.util.*; import org.json.JSONObject; import org.junit.After; im...
Java
UTF-8
6,567
1.976563
2
[]
no_license
package com.apih5.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import io.swagger.an...
TypeScript
UTF-8
368
2.984375
3
[]
no_license
const text = ` sdfdsf dsfkdf[NAME:typescript]sdfdsf dfdsfs[NAME:regex]sdfsdf asdfdsfs ` // Notice: // the ending `g` is important, otherwise there will be infinite loop const regex = /\[NAME:(.*?)]/g; const names: string[] = [] while (true) { const match = regex.exec(text) if (match) { names.push(match[1]) ...
Markdown
UTF-8
1,302
2.78125
3
[ "BSD-3-Clause", "CC-BY-SA-4.0", "CC-BY-4.0", "LicenseRef-scancode-free-unknown" ]
permissive
--- title: Embedded Systems --- ## Embedded Systems An Embedded System is a dedicated computing system designed to perform a specific task. It is often used within a larger system. Instead of receiving command and programs to perform as in a general-purpose computer, the embedded system will continuously perform the s...
Python
UTF-8
1,750
3.265625
3
[ "MIT" ]
permissive
import re class InputService: input_string = "" word_list = [] output_word_list = [] wordDict_list = [] def setInputString(self, input_text): self.input_string = input_text self.word_list = self.setWordList(self.input_string) def setOutputWords(self, incorrect_words): ...
PHP
UTF-8
536
3.609375
4
[]
no_license
<html> <head> <title>Switch Statement (switch-case)</title> </head> <body> <form action="index.php" method="post"> What is your grade? <input type="text" name="grade"> <input type="submit"> </form> <?php $grade = $_POST["grade"]; // just like JavaScript switch($grade) { cas...
Python
UTF-8
3,129
2.65625
3
[]
no_license
''' ''' ''' k - 최근접 이웃 회귀 모델 ''' import numpy as np perch_length = np.array([8.4, 13.7, 15.0, 16.2, 17.4, 18.0, 18.7, 19.0, 19.6, 20.0, 21.0, 21.0, 21.0, 21.3, 22.0, 22.0, 22.0, 22.0, 22.0, 22.5, 22.5, 22.7, 23.0, 23.5, 24.0, 24.0, 24.6, 25.0, 25.6, 26.5, 27.3, 27.5, 27.5, 27.5, 28.0, 28.7, 30...
Java
UTF-8
2,417
2.28125
2
[]
no_license
package com.ujiuye.cust.service; import com.ujiuye.cust.bean.Customer; import com.ujiuye.cust.bean.CustomerExample; import com.ujiuye.cust.mapper.CustomerMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java....
Markdown
UTF-8
1,304
3.421875
3
[]
no_license
## Syntax ### Escaping ```python # It will occure errror >>> 'This is Bya's pen.' File "<input>", line 1 'This is Bya's pen.' ^ SyntaxError: invalid syntax # Double quotation is smart >>> "This is Bya's pen." "This is Bya's pen." # Using escape syntax : '\' >>> 'This is Bya\'s pen.' "This is Bya...
Java
UTF-8
728
2.5
2
[]
no_license
package org.codejudge.sb.controller; import io.swagger.annotations.ApiOperation; import org.codejudge.sb.model.InputNumbers; import org.codejudge.sb.model.Response; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping public class AppController { @ApiOperation("This is the hello worl...
C++
UTF-8
2,614
2.890625
3
[]
no_license
#include "StateListener.h" StateListener::Condition::Condition(StateTriggerEvent trigger, CompareType type, Value val): trigger(trigger), compareType(type), value(val) {} StateListener::Condition::~Condition() {} StateTriggerEvent StateListener::Condition::getTrigger() { return trigger; } bool StateListener::Co...
Python
UTF-8
1,227
2.9375
3
[]
no_license
import os import requests try: session = os.environ['advent_session_cookie'] except KeyError: session = None class AdventOfCodeException(Exception): pass def get_cached_input(input_file_path): with open(input_file_path) as advent_input_file: advent_input = advent_input_file.read() ...
Java
UTF-8
1,367
2.046875
2
[]
no_license
/** * */ package org.finance.mybtc.apiManager.impl.okcoin; import org.finance.mybtc.api.okCoin.EOkcoinSymbols; import org.finance.mybtc.api.okCoin.beans.OkcoinFundsInfo; import org.finance.mybtc.api.okCoin.beans.OkcoinUserInfo; import org.finance.mybtc.apiManager.ESymbol; import org.finance.mybtc.constant....
C++
UTF-8
676
2.734375
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <ctime> using namespace std; int main(int argc, char **argv) { if (argc < 2) { cout << argv[0] << " file" << endl; return 0; } ofstream file(argv[1], ios::out); if (!file.is_open()) { cout << "Error opening file" << endl; ...
Java
UTF-8
8,198
1.9375
2
[ "MIT" ]
permissive
package com.xncoding.jwt.service; import com.baomidou.mybatisplus.mapper.Condition; import com.corundumstudio.socketio.SocketIOClient; import com.corundumstudio.socketio.SocketIOServer; import com.xncoding.jwt.api.model.ReportParam; import com.xncoding.jwt.api.model.VersionParam; import com.xncoding.jwt.api.model.Vers...
Ruby
UTF-8
555
2.640625
3
[]
no_license
require 'spec_helper' describe Stock do let(:stock) { Stock.new } describe '#stock' do it '初期状態の場合、コーラが格納されていること' do expect(stock.juices).to eq cola: 5 end end describe '#buyable?' do it '数量が足りている場合、買えること' do expect(stock.buyable?(:cola, 1)).to eq true expect(stock.buyable?(:cola,...
Swift
UTF-8
3,453
3.265625
3
[ "MIT" ]
permissive
// // DateWeather.swift // WeatherMate // // Created by Samrat on 10/5/16. // Copyright © 2016 SMRT. All rights reserved. // import Foundation import SwiftyJSON class DateWeather { /*************************************************************/ // MARK: Instance Variables /***********************...