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,256
3.09375
3
[]
no_license
#!/bin/python print ('Counselor? Andrea[a] / Eric[e]') x2 = raw_input() if x2 == 'a': counselorname = "Andrea Montague" counseloremail = "andrea.montague@du.edu" else: counselorname = "Eric Bono" counseloremail = "eric.bono@du.edu" print('Time?') apptime = raw_input().strip() print('AM/PM?') appampm...
Python
UTF-8
1,560
2.546875
3
[]
no_license
#! /usr/bin/env python import os, sys, re, glob, argparse import zopy.dictation as d file = sys.argv[1] # --------------------------------------------------------------- # prints # --------------------------------------------------------------- def print1 ( d ): for key, val in d.items(): print key, "-->...
Markdown
UTF-8
7,987
2.796875
3
[]
no_license
# EsameGennaio2020 Repository dedicata all'esame di Programmazione ad Oggetti del 20 gennaio 2020. È stata effettuata una revisione del codice precedentemente caricato (Dicembre 2019). In particolare: È stata migliorata l'organizzazione nei package; le classi AppService e Filters sono state modificate tramite...
Go
UTF-8
1,799
2.796875
3
[]
no_license
package main import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "time" ) // User ... type User struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Name string `json:"name,om...
Rust
UTF-8
2,035
4.40625
4
[ "MIT" ]
permissive
/// Given a sorted array and a value, this function parses the collection and returns the /// index where that value resides via a linear search /// /// If the value is not present within the array `None` is returned /// /// - Time Complexity: **O**(n) /// - Space Complexity: **O**(1) /// /// ```rust /// use searching:...
Shell
UTF-8
1,662
3.90625
4
[]
no_license
#!/bin/bash ######################################################################### # $? 代表上一个命令执行是否成功的标志,如果执行成功则$? 为0,否则不为0 # 使用 保存结果的变量名=`需要执行的linux命令` 这种方式来获取命令的输出时,注意的情况总结如下: # 1)保证反单引号内的命令执行时成功的,也就是所命令执行后$?的输出必须是0,否则获取不到命令的输出 # 2)即便是命令的返回值是0,也需要保证结果是通过标准输出来输出的,而不是标准错误输出,否则需要重定向 # 因此我们推荐使用 保存结果的变量名=`需要执行的...
Python
UTF-8
1,070
2.859375
3
[]
no_license
import base64 from PIL import Image from django.core.files.base import ContentFile def save_base64_to_file(file_name, data, save_file): file_format, img_str = data.split(';base64,') ext = file_format.split('/')[-1] content_file = ContentFile(base64.b64decode(img_str)) save_file(f'{file_name}.{ext}', ...
Python
UTF-8
2,243
2.53125
3
[ "Unlicense" ]
permissive
from . import oauth2 as FalconAuth banner = """ ,---. | ,--. | |__. ,---.| ,---.,---.,---.| |,---.|---.. .,---. | ,---|| | | || || ||---'| || || | ` `---^`---'`---'`---'` '`--' `---'`---'`---'`---| `---' ...
Java
UTF-8
201
2.296875
2
[ "MIT" ]
permissive
package List; /** * Created by pmazurek on 07.04.2017. */ public interface Iterator { public void next(); public void first(); public boolean isDone(); public Object current(); }
PHP
UTF-8
1,116
2.734375
3
[]
no_license
<?php //Various includes include join(DIRECTORY_SEPARATOR, ["..", "src", "item.class.php"]); include join(DIRECTORY_SEPARATOR, ["..", "src", "fridge.class.php"]); include join(DIRECTORY_SEPARATOR, ["..", "src", "recipe.class.php"]); include join(DIRECTORY_SEPARATOR, ["..", "src", "dataloader.class.php"]); include join...
Ruby
UTF-8
173
3.46875
3
[]
no_license
puts 'what is your favorite number?' favorite = gets.chomp puts 'your favorite number is ' + favorite better = favorite.to_i + 1 puts better.to_s + ' may be a better number'
C#
UTF-8
2,693
2.875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace PizzaDesigner { public partial class MenuForm : Form { private BindingList<string> _veget...
C++
UTF-8
1,435
2.890625
3
[]
no_license
#include <cstdlib> #include <ncurses.h> using namespace std; bool GameOver; const int width = 20; const int height = 20; int x,y, fruitX, fruitY, score; enum eDirection {STOP = 0, LEFT, RIGHT, UP, DOWN}; eDirection dir; void Setup(){ initscr(); clear(); noecho(); cbreak(); curs_set(0); GameOver = ...
Java
UTF-8
111
2.34375
2
[]
no_license
package javaIterator; import java.util.Iterator; public interface Menu { public Iterator getIterator(); }
Go
UTF-8
1,546
2.78125
3
[]
no_license
package streams import ( "encoding/json" "fmt" "gopkg.in/jcelliott/turnpike.v2" ) // TickerStream holds state for a Poloniex 'ticker' firehose type OrderStream struct { broadcaster OrderBroadcaster RecieveDone chan bool } // NewTickerStream connects to the Poloniex 'ticker' firehose. func NewOrderStream(market...
C
UTF-8
480
3.734375
4
[]
no_license
/** * Todos los numeros primos que hay en n **/ #include <stdio.h> int main() { int n, j=2, primo = 1; printf("Escribe un numero entero positivo: "); scanf("%d", &n); for(int i=2; i<=n; i++){ while(j<i && primo==1){ primo = i%j == 0 ? 0 : 1; j++; ...
Java
UTF-8
4,686
2.921875
3
[]
no_license
package com.sy.huangniao.common.Util; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import org.springframework.beans.BeanUtils; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; /** * MD5校验工具类 */ public class MD5Utils { /** * MD5加密字...
C
UTF-8
185
3.375
3
[]
no_license
//table of n #include <stdio.h> int main () { int n,i; printf("Ban muon bang cuu chuong may: " ); scanf("%d",&n); for (i=1; i<=10;i++) { printf(" %d x %d = %d\n",n,i,n*i); } }
Java
UTF-8
2,571
2.515625
3
[]
no_license
package com.mitsurin.tools.creating_best_party.model.compatibility; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document...
Java
GB18030
1,374
2.328125
2
[]
no_license
package ajaxaction; import com.opensymphony.xwork2.ActionSupport; import bean.Exam; import tool.ORMTool; public class TeacherToManager extends ActionSupport{ private String teachernumber; private String btntext; public String getTeachernumber() { return teachernumber; } public void setTeachernumber(Strin...
Java
UTF-8
3,754
1.960938
2
[]
no_license
package com.stee.emer.webService.client.sms; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>sendedAndBlaInfo complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="sendedAndBlaI...
C#
UTF-8
2,334
2.59375
3
[ "MIT" ]
permissive
namespace BattleShip.Windows { using System.Windows; using System.Windows.Controls; using Algorithms; internal class GameOver : Window { private bool _checked; public GameOver() { Calculation.GetScreenCenter(this); var grid = new Grid(); this.Cont...
Java
UTF-8
1,987
1.859375
2
[]
no_license
package com.jjg.member.model.vo; import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; /** * <p> * 后台会员列表 * </p> * * @author lins 1220316142@qq.com * @since 2019-06-04 */ @Data @A...
Shell
UTF-8
302
2.6875
3
[]
no_license
#!/bin/bash for ip in `cat $1` do { /tmp/sshpass-1.06/sshpass -p '1qaz2wsx3edc' scp -p -r -P 22 -o StrictHostKeyChecking=no $2 hadoop@$ip:$3 &>/dev/null if [ $? -eq 0 ]; then echo $ip OK else echo $ip FAIL fi } done wait
Python
UTF-8
573
3.390625
3
[]
no_license
total_num_of_students = int(input("enter total number of students:")) print ("you entered %s students" %total_num_of_students) student_info = {} student_data = [ 'rollno', 'age', 'gender'] for i in range(0,total_num_of_students): student_name = input("Name :") student_info[student_name] = {} for j in...
C++
UTF-8
1,048
3.09375
3
[]
no_license
/*~~@@@@ timeObject.h @@@@~~ Library to convert times between millis() & times converted from starting values. outputs that count up & down. Returns: Micros, Millis, Seconds, Minutes, Hours, Days, Weeks, Years. Simple & Complex Mode Easy way to implement clocks & countdown timers */ #includ...
JavaScript
UTF-8
1,754
2.78125
3
[]
no_license
let stompClient = null; init(); connect(); function connect() { const socket = new SockJS('/endpoint'); stompClient = Stomp.over(socket); stompClient.connect({}, function (frame) { stompClient.subscribe('/app/private', function (msg) { onMessage(JSON.parse(msg.body)); }); ...
Java
UTF-8
4,047
2.34375
2
[]
no_license
package com.example.kevin.watsoninnovation; import android.content.Intent; import android.graphics.Color; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.github.paolorotolo.appintro.AppIntro2; imp...
Markdown
UTF-8
1,953
2.84375
3
[]
no_license
```yaml area: Cambridgeshire og: description: Paula Willis was first diagnosed with throat cancer in September 2018. publish: date: 12 Sep 2019 title: Cancer surviving Demand Hub worker completes gruelling charity challenge url: https://www.cambs.police.uk/news-and-appeals/charity-walk-raises-money-for-cancer-Cambr...
Java
ISO-8859-1
4,702
2.796875
3
[]
no_license
package mall.objects; import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; import java.util.LinkedList; import mall.framework.GameObject; import mall.framework.ObjectID; import mall.framework.Textures; import mall.window.Animation; import mall.window.Camera; import mall.window.Game;...
Python
UTF-8
426
3.828125
4
[]
no_license
''' Write a script that reads in the contents of words.txt and writes the contents in reverse to a new file words_reverse.txt. ''' wordlist = [] with open('words.txt', 'r') as fin: for word in fin: word = word.rstrip() wordlist.append(word) # print(wordlist) wordlist.reverse() with ...
Java
UTF-8
1,240
3.046875
3
[]
no_license
package com.springtest.proxy; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * @author admin * @desc * @date 2019/7/23 10:35 */ public class JdkProxyExam implements InvocationHandler { //真实对象 private Object target = null; ...
Rust
UTF-8
1,091
3.578125
4
[]
no_license
pub fn hours_bigger_than_twelve_formatter(hour: i32) -> String { let hours_key: i32 = hour - 12; if hours_key < 10 { if hours_key < 0 { return "0".to_string(); } return format!("0{}", hours_key).to_string(); } return format!("{}", &hours_key).to_string(); } //todo: ...
JavaScript
UTF-8
1,915
3.140625
3
[]
no_license
// https://github.com/ttezel/twit for examples //version 1.0 //Author: Chris Roach console.log("the bot is starting up:"); var Twit = require("twit"); var array = require("./array.js"); var Quotation = array.Quotation; var T = new Twit({ consumer_key: consumer_secret: access_token: access_token_secret: });...
Java
GB18030
9,556
2.5625
3
[]
no_license
package com.ecpss.action.pay.dcc; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.Socket; import...
Shell
UTF-8
3,820
4.125
4
[ "MIT" ]
permissive
#!/bin/sh # Copyright 2015-2023 Yury Gribov # # Use of this source code is governed by MIT license that can be # found in the LICENSE.txt file. # Configure and build LLVM in current directory. set -eu absolutize() { realpath -s "$1" } error() { echo >&2 "$(basename $0): error: $@" exit 1 } print_short_help...
Markdown
UTF-8
6,849
3.421875
3
[ "MIT" ]
permissive
--- title: Protect WordPress Login Page description: Learn how to protect WordPress login page from brute force attack by changing the login URL, limiting the number of failed login attempts, and more. published_at: 2017-11-08T19:39:07+00:00 tags: ['How To', 'Security', 'WordPress', 'WordPress Plugin'] --- Being the n...
Python
UTF-8
487
2.84375
3
[]
no_license
#!/usr/bin/python3 """ Script that handles SQL injection """ import MySQLdb from sys import argv if __name__ == "__main__": db = MySQLdb.connect(host="localhost", port=3306, user=argv[1], passwd=argv[2], db=argv[3], charset="utf8") c = db.cursor() c.execute("SELECT * FROM states WH...
JavaScript
UTF-8
6,822
2.65625
3
[ "MIT" ]
permissive
import React from 'react'; import './Styles/CreateAd.css'; import CreateAdButton from '../../Components/Button/Button.js'; import BannerAds from '../../Pictures/BannerAds.png'; import PostAds from '../../Pictures/PostAds.png'; import VideoAds from'../../Pictures/VideoAds.png'; import EstimatesComp from '../Estimate...
C#
UTF-8
1,188
3.296875
3
[]
no_license
using System; namespace TddChessEngineLib { public class Elefant { public string curentPosition {get; private set;} public Elefant(string position) { char[] pos = position.ToCharArray(); if(pos[0] == 'P') { throw new ArgumentException(...
C
UTF-8
7,331
2.515625
3
[ "MIT-Modern-Variant", "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
/**CFile**************************************************************** FileName [acecNorm.c] SystemName [ABC: Logic synthesis and verification system.] PackageName [CEC for arithmetic circuits.] Synopsis [Adder tree normalization.] Author [Alan Mishchenko] Affiliation [UC Berkeley] ...
Python
UTF-8
10,214
2.546875
3
[]
no_license
''' Created 10/2019 Python 3.7 (2.7 has a problem with sqlalchemy-access) Updated 01/2020 @author: Peter Vos VU IT for Research Retrieve image and pdf file lists from mounted webdav connection and update the database with urls Make sure to: pip install SQLAlchemy pip install sqlalchemy-access set the correct paths i...
Java
UTF-8
1,074
3.328125
3
[]
no_license
package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int [][]graph = new int[n][n]; for (int i = 0; i < m; i++) { int v1 = sc....
Rust
UTF-8
5,706
2.984375
3
[ "Apache-2.0", "MIT" ]
permissive
/*! # Introduction `logdog` is a program that gathers logs from various places on a Bottlerocket host and combines them into a tarball for easy export. Usage example: ```shell $ logdog logs are at: /var/log/support/bottlerocket-logs.tar.gz ``` # Logs For the log requests used to gather logs, please see the followi...
Java
WINDOWS-1251
2,864
4.21875
4
[]
no_license
package ua.edu.uabs.author.task2; public class Dean { private String FirstName, SecondName, LastName; private int age, stud; //Getter Setter ( ) , //Getter //SEtter // public, private. //public //private - public String getFirstName() { return FirstName; } public void se...
Java
UTF-8
327
2.015625
2
[ "BSD-2-Clause" ]
permissive
package com.gmail.jannyboy11.customrecipes.api.crafting.custom.recipe; import com.gmail.jannyboy11.customrecipes.api.crafting.vanilla.recipe.ShapedRecipe; /** * Represents an NBT recipe. * The items in the choices list take NBT data into account. * * @author Jan */ public interface NBTRecipe extends ShapedRecip...
PHP
UTF-8
2,318
2.90625
3
[]
no_license
<?php require_once '../models/MovieModel.php'; require_once '../bl/Movie_BLL.php'; class MovieController { function getAll_Movies() { $movie_bll = new Movie_BLL(); $resultSet = $movie_bll->get_movies(); $allMovies = array(); //$errorInInput w...
Markdown
UTF-8
2,200
2.671875
3
[ "MIT" ]
permissive
+++ date = "2021-07-25" title = "Phase Field Models of the Growth of Tumors Embedded in an Evolving Vascular Network: Dynamic 1D-3D Models of Angiogenesis" abstract = "In this talk, we present a coupled 3D-1D model of tumor growth within a dynamically changing vascular network to facilitate realistic simulations of ang...
C++
WINDOWS-1250
1,565
3
3
[]
no_license
// Zadanie 2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <conio.h> //Dodanie bibliotek. using namespace std; int _tmain(int argc, _TCHAR* argv[]) { double long x, y, wy, wx, w; //Deklaracja zmiennych zmiennoprzecinkowyc...
Python
UTF-8
4,002
2.703125
3
[]
no_license
import pyaudio import ssl import socket import pprint import multiprocessing import os CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 class Audio: def __init__(self): self.p = None self.in_stream = None self.out_stream = None def start_audio(self): self.p = py...
Java
UTF-8
1,841
1.992188
2
[]
no_license
package com.qf.group6.service; import com.qf.group6.entity.*; import java.util.List; /** * @Author: ZongMan * @Date: 2019/2/11 0011 * @Time: 15:01 * @Vsersion: 1.0 **/ public interface CommunityService { /** * 通过当前用户的id查看关注的所有人的id * @param userId 当前用户的id * @return List集合 */ List<To...
JavaScript
UTF-8
1,483
2.59375
3
[]
no_license
// ==UserScript== // @name LibraryThing add ten authors at a time // @description A shortcut for adding multiple "Other authors" inputs at once // @namespace http://userscripts.org/users/maxstarkenburg // @include http*://*librarything.tld/work/*edit/* // @include http*://*librarything.com/work/*e...
Swift
UTF-8
1,289
2.65625
3
[]
no_license
// // MoyaResponse+Toast.swift // Smakfull // // Created by Magdusz on 04.04.2018. // Copyright © 2018 com.mcpusz.smakfull. All rights reserved. // import Foundation import Moya import MCToast extension Moya.Response { func printToast() { if let request = self.request { v...
C#
UTF-8
1,254
3.25
3
[ "CC-BY-4.0", "MIT" ]
permissive
string myString = null ; Operation myOperation = new Operation(); myDescription = ServiceDescription.Read("Operation_2_Input_CS.wsdl"); Message[] myMessage = new Message[ myDescription.Messages.Count ] ; // Copy the messages from the service description. myDescript...
C++
UTF-8
4,027
2.78125
3
[]
no_license
#ifndef CHESS_SYSTEM_H #define CHESS_SYSTEM_H #include"System.h" #include"Board.h" #include"Pawn.h" #include"Queen.h" #include"Rook.h" #include"Bishop.h" #include"Knight.h" #include"King.h" #include"ChessCamera.h" #include"LightPanel.h" //keys for loaded shaders #define TEXTURE_SHADER "textureShader" #d...
Markdown
UTF-8
1,579
2.578125
3
[ "MIT" ]
permissive
# Readings in Databases A list of papers studied in CS380D Distributed Systems. [Google spreadsheet view](https://docs.google.com/spreadsheets/d/1fdh8zYxRyJtNtfOwcS0-mMpAyhmjckaGP8vA3NWsTRU/edit#gid=0) is maintained by [Prof.Vijay Chidambaram](http://www.cs.utexas.edu/~vijay/). ## <a name='TOC'>Table of Contents</...
Python
UTF-8
12,630
2.71875
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # PROGRAMMER: Krishang Naikar # DATE CREATED: 10/23/2020 # REVISED DATE: # Imports here import matplotlib.pyplot as plt import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datase...
TypeScript
UTF-8
1,339
3.015625
3
[]
no_license
import { Reducer } from 'redux'; export interface FSA<TPayload, TMeta = {}> { type: string; payload: TPayload; error?: boolean; meta?: TMeta; } export type FSACreator<TPayload> = (payload: TPayload) => FSA<TPayload>; export interface Slice<S> { reducer: Reducer<S>; configureAction: <P>( ...
Python
UTF-8
1,459
2.796875
3
[]
no_license
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication def send_mail( sender, password, recipient, title, content, mail_host="smtp.163.com", port=25, file=None, ): """ 发送邮件函数,默认使用163s...
Python
UTF-8
1,255
3.984375
4
[]
no_license
''' Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Input: "ab-cd" Output: "dc-ba" Example 2: Input: "a-bC-dEf-ghIj" Output: "j-Ih-gfE-dCba" Example 3: Input: "Test1ng-Leet=code-Q!" Output: "Qedo1...
Java
UTF-8
1,035
2.078125
2
[]
no_license
package com.kozlovruzudzhenkkovalova.library.serviceTests; import com.kozlovruzudzhenkkovalova.library.entity.Role; import com.kozlovruzudzhenkkovalova.library.repositories.RoleRepository; import com.kozlovruzudzhenkkovalova.library.service.RoleService; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.e...
Python
UTF-8
2,519
2.609375
3
[ "Apache-2.0" ]
permissive
import glob import plotly.express as px import plotly.graph_objects as go import pandas as pd import re import json global CSVHEADER global VENDOR CSVHEADER = 'datetime,download,upload,ping\n' VENDOR = 'MAGENTA Kabelinternet + TV' def toCSV(filename): try: with open(filename, 'r') as filePointer: ...
Python
UTF-8
857
3.890625
4
[]
no_license
# Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), # find the minimum number of conference rooms required. # Input: [[0, 30],[5, 10],[15, 20]] # Output: 2 def minMeetingRooms(intervals): """ :type intervals: List[List[int]] :rtype: int """ ...
Markdown
UTF-8
863
2.609375
3
[]
no_license
学习笔记 # 轮播组件 ## 手势与动画应用 组件的状态如果不需要外部传入的话,也可以使用render函数的一个局部变量 组件的状态和属性都可以作为私有变量,前者主要给业务开发者使用,后者给组件开发者使用 组件中可以通过在属性中指定 onXxx 属性接受用户传入的回调函数,组件的设计者负责在组件运行的适当时机调用该函数 组件可以传入两种children: 一种是文本型,这种可以包装进组件内部的一个span标签中 另一种是模板型,在JSX中,模板型的children不能直接写为组件元素的内嵌元素,而是要以回调函数的形式(一般会接受一个属性中传递的数据,并返回一个标签模板), 在组件的重载appendChild方法和rend...
Java
UTF-8
442
2.84375
3
[ "MIT" ]
permissive
package org.gendut.iterator; import org.gendut.seq.Seq; //!Iterator Wrapper for Sequences /*<literate>*/ /** * Iterator wrapper for sequences. */ public final class IteratorFromSeq<E> implements ForwardIterator<E> { private Seq<E> S; public IteratorFromSeq(Seq<E> S) { this.S = S; } public E next() { E x =...
Python
UTF-8
3,715
2.890625
3
[ "Apache-2.0" ]
permissive
import ast import dateutil.parser as dp import logging logger = logging.getLogger('CryptoArbitrageApp') class PriceStore: def __init__(self, priceTTL=60): self.price = {} self.priceTTL = priceTTL def isOrderbookEmpty(self, ob): if len(ob) == 0: return True else: ...
Python
UTF-8
577
2.6875
3
[]
no_license
import sqlite3 as sql from itertools import cycle def xor(message, key): return bytes(a ^ b for a, b in zip(message, cycle(key))) def pass_cipher(password): key1 = b'this_is_key' key2 = b'also_here_another' result = xor(password.encode(), key1) return xor(result, key2) con =...
TypeScript
UTF-8
727
2.5625
3
[]
no_license
namespace view { export function displayMessage(title: string, msg: string, spanId?: string) { var messageArea = document.getElementById("messageArea"); messageArea.innerHTML = `<h2> ${title} </h2> <h3><span id = ${spanId}>&nbsp;&nbsp;&nbsp;&nbsp;</span> ${msg} </h3>`; } export function di...
C++
UTF-8
387
2.609375
3
[]
no_license
#ifndef SOLDIERCHILDGUN_H #define SOLDIERCHILDGUN_H #include <string> #include <vector> #include <iostream> #include "soldier.h" class SoldierChildGun : Soldier { private: std::string ability; std::vector<std::string> abilitiesList; public: SoldierChildGun(); virtual void printInfo(); std::vector<std:...
Markdown
UTF-8
1,265
2.9375
3
[]
no_license
# veradalta CRUD SQLEXPRES in android ESPAÑOL Esta aplicacion fue realizada para un proyecto escolar en la Universidad Tecnologica de Morelia. Basicamente la aplicacion hace el CRUD (Create, Read, Update and Delet) en SQLEXPRESS. Lo interesante del proyecto fue que trabajar con este tipo de base de datos. Tiene el...
PHP
UTF-8
1,583
2.640625
3
[]
no_license
<?php namespace App\Http\Controllers\ApiAuth; use App\Http\Controllers\Controller; use App\User; use Illuminate\Auth\Events\PasswordReset; use Illuminate\Contracts\Auth\CanResetPassword; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illumin...
Java
UTF-8
3,775
2.046875
2
[]
no_license
package org.reverse; // Generated Oct 20, 2010 10:21:56 AM by Hibernate Tools 3.4.0.Beta1 import java.util.Date; /** * SnpPromoMecobId generated by hbm2java */ public class SnpPromoMecobId implements java.io.Serializable { private long idPromocion; private String idMedioCobro; private String usr...
PHP
UTF-8
2,373
2.984375
3
[ "MIT" ]
permissive
<?php namespace Codesleeve\Generator\Support; use RecursiveIteratorIterator, RecursiveDirectoryIterator; use Codesleeve\Generator\Interfaces\FilesystemInterface; use Codesleeve\Generator\Exceptions\FileNotFoundException; class Filesystem extends \Symfony\Component\Filesystem\Filesystem implements FilesystemInterface ...
Markdown
UTF-8
2,211
3.375
3
[]
no_license
Title: 6÷2(1+2)=? Date: 2011-05-02 03:03 Slug: six-divided-by-two-bracket-one-plus-two > 6÷2(1+2)=? It's a question that comes around in Facebook recently (I've also read it somewhere in the past). There are two major answers: "1" and "9". For "1", (Assuming “multiplication by juxtaposition” has higher precedence th...
PHP
UTF-8
447
3.546875
4
[]
no_license
<?php // Singleton.php class hoge { // テスト用 } // class Singleton { // private function __construct() { } // static public function getInstance() { static $obj = null; if (null === $obj) { $obj = new static; } return $obj; } } // $obj = new hoge(); $obj2 = new hoge(); va...
Python
UTF-8
1,302
2.984375
3
[]
no_license
import pygame,time,random #running = True joon=3 dir=1 width=600 height=600 screen = pygame.display.set_mode((width,height)) clock = pygame.time.Clock() bgcolor =0,80,20 screen.fill(bgcolor) #score = 0 ############################################ class Mar: def __init__(self,surface,x,y,length,c...
Python
UTF-8
469
2.53125
3
[ "MIT" ]
permissive
import io import geopandas as gpd from genomicsurveillance.config import Files def get_geo_data(geo_data: bytes = Files.GEO_JSON): """ Loads a UK GeoJson file and returns the corresponding geopandas dataframe. Requires the optional dependency geopandas. :param geo_data: uk geojson data, defaults uk...
C++
UTF-8
3,971
2.671875
3
[]
no_license
#include "ManipulatorGoalRegion.hpp" #include <fstream> #include <string> using std::cout; using std::endl; namespace shared { ManipulatorGoalRegion::ManipulatorGoalRegion(const ompl::base::SpaceInformationPtr &si, boost::shared_ptr<shared::Robot> robot, ...
Rust
UTF-8
14,741
2.703125
3
[]
no_license
use encoding::{DecoderTrap, Encoding}; use itertools::Itertools; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, VecDeque}; use std::fs::{read_to_string, File}; use std::io::Read; use std::path::{Path, PathBuf}; use std::process::Command; use std::{fs, mem}; use structopt::StructOpt; fn google_aut...
PHP
UTF-8
538
3.203125
3
[]
no_license
// expects dates in the form of "MM/DD/YYYY" function pc_date_sort($a, $b) { list($a_month, $a_day, $a_year) = explode('/', $a); list($b_month, $b_day, $b_year) = explode('/', $b); if ($a_year > $b_year ) return 1; if ($a_year < $b_year ) return -1; if ($a_month > $b_month) return 1; if ($...
PHP
UTF-8
5,464
2.53125
3
[]
no_license
<?php include 'connect.php'; $sqlcustomer = "SELECT * FROM tblcustomer"; $querycustomer = mysqli_query($connect,$sqlcustomer) or die (mysqli_error($connect)); $sqlcar = "SELECT * FROM tblcars WHERE Car_Availability = 'YES'"; $querycar = mysqli_query($connect,$sqlcar) or die (mysqli_error($connect)); $sqlcar2 ...
Python
UTF-8
856
2.8125
3
[]
no_license
import cv2 import numpy as np from matplotlib import pyplot as plt img = cv2.imread('../images/fourierHist2.jpg',cv2.IMREAD_GRAYSCALE) thresholder = 70 whiteValue = 255 blur = cv2.GaussianBlur(img,(5,5),0) # global thresholding ret1,th1 = cv2.threshold(blur,thresholder,whiteValue,cv2.THRESH_BINARY) images = [blur,...
C#
UTF-8
4,353
3.078125
3
[]
no_license
using System; using System.IO; using System.Linq; using System.Collections.Generic; using UnityEngine; public class ModulesManager : Singleton<ModulesManager> { /// <summary> /// This multi-map array stores all links from a module to its levels /// </summary> private readonly Dictionary<ModuleInfo, Li...
JavaScript
UTF-8
4,784
2.671875
3
[]
no_license
import config from '../configs/urlAppProposta' const URL_USUARIOS = `${config.URL_APPPROPOSTA}/usuarios` //////////////////////////////////////////////////////////////////////// // REFRESH TOKEN function refreshToken() { const URL = `${config.URL_APPPROPOSTA}/refresh-token` const refreshToken = localStorage.getIt...
Java
UTF-8
409
2.21875
2
[]
no_license
package th.ac.kku.charoenkitsupat.chanyanood.managementforsugarapp; /** * Created by Panya on 23/7/2560. */ public class EmployeeModel { private String id, password; EmployeeModel(String id, String password) { this.id = id; this.password = password; } public String getId() { ...
PHP
UTF-8
2,883
2.625
3
[]
no_license
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Carbon; class AuctionProduct extends Model { const AUCTION_STATUS_PREPARING = 'preparing'; // 尚未开始 const AUCTION_STATUS_BIDDING = 'bidding'; // 拍卖进行中 const AUCTION_STATUS_SIGNED = 'signed'; // 成交 const AUCTION_...
C++
UTF-8
4,533
2.890625
3
[ "Apache-2.0" ]
permissive
#include "smove.h" #include <conio.h> #include <cstdlib> #include <iostream> #include <vector> #include <windows.h> using namespace std; bool ifdead(const vector<vector<char> >& map, Point head) { bool GAMEOVER= false; short ErrorRow= START_ROW + 4; if (map[head.row_i][head.col_i] == '+') { ...
JavaScript
UTF-8
1,427
2.515625
3
[]
no_license
define('RemoteTemplate', ['env', 'AjaxForm', '../Utilities/OptionsParser', 'jquery', 'underscore'], function(env, AjaxForm, OptionsParser, $, _){ var postData = { communityId : $('#remote-template-script').attr('community-id'), requests : [] }; var init = function(){ // set postData.requests $('div[remote-t...
C++
UTF-8
2,655
2.84375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Form.cpp :+: :+: :+: ...
Markdown
UTF-8
3,889
2.78125
3
[ "MIT" ]
permissive
# Intelligent Human Computer Interaction Game *Human Computer Interaction Game by using OpenCV and Processing:* Control the game character's velocity through the speed and direction of your fist or palm(hand)! Fist&palm(hand) is detected using [Haar-Cascade Classifier](http://docs.opencv.org/2.4/modules/objdetect/doc/c...
Python
UTF-8
2,108
2.703125
3
[ "MIT" ]
permissive
import csv from monsoonanalyzer import TransmitSegment class TransmitData(): def __init__(self, cpu_cores, cpu_freq, filename): self.cpu_cores = cpu_cores self.cpu_freq = cpu_freq self.src_rates = [] self.transmit_segment_dict = {} with open(filename, newline='') as csvfil...
Java
UTF-8
557
3.71875
4
[]
no_license
package handledning1; import java.util.Scanner; public class Calculator2 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Skriv ett tal: "); double tal1 = scan.nextDouble(); System.out.println("Skriv ett till tal: "); double tal2 = scan.nextD...
C#
UTF-8
2,128
3.78125
4
[]
no_license
using Distributions.Generators; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Distributions { public abstract class Distribution { #region Variables /// <summary> /// The generator used to obtain the initi...
JavaScript
UTF-8
161
2.5625
3
[]
no_license
function covfefe(str){ if(str.toLowerCase().includes('coverage')) { return str.replace(/(c)overage/gi, '$1ovfefe'); } else { return str + ' covfefe'; } }
C++
UTF-8
634
3.921875
4
[]
no_license
// Write a program that asks the user to type in numbers. After each entry, the //program should report the cumulative sum of the entries to date. The program should //terminate when the user enters 0. #include <iostream> int main() { using namespace std; int input; cout << "Enter numbers: "; cout <...
C++
UTF-8
682
2.96875
3
[]
no_license
#include "LL.h" #include <iostream> using namespace std; void LL::sort() { if(head==NULL) return; head = head->sort(); } LLN *LLN::sort() { if(this == NULL || next==NULL) return this; LLN *b = split(); LLN *a = sort(); b = b->sort(); return a->merge(b); } LLN *LLN::split() { if (this == NULL ...
PHP
UTF-8
898
2.59375
3
[]
no_license
<?php require_once("phpmailer/class.phpmailer.php"); class mail { public static function sendmail($user_email, $user_name, $subject, $body) { $mail = new PHPMail(); $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; ...
Java
UTF-8
9,095
1.757813
2
[]
no_license
package com.robo.store; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.apache.http.Header; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.text.TextUtils; import android.view.LayoutInflater; import an...
Python
UTF-8
944
2.5625
3
[]
no_license
import sys from pyspark import SparkContext from pyspark.sql import SQLContext sc = SparkContext("local", "task-2") sql_context = SQLContext(sc) word, k, df_path_1, df_path_2 = sys.argv[1:] k = int(k) df1 = sql_context.read.csv(df_path_1, header=True) df1 = df1.filter(df1.word == word) df1 = df1.repartition(df1.key...
C#
UTF-8
7,651
2.65625
3
[]
no_license
using System; using System.Drawing; using System.Text; using Microsoft.DirectX.Direct3D; using Microsoft.DirectX.Generic; using Microsoft.DirectX; using Microsoft.DirectX.Direct3D.CustomVertex; namespace LJM.Similization.Client.DirectX.Controls { public static class CustomPainters { /// <summary> ...