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
C++
UTF-8
1,811
3.25
3
[]
no_license
/* * @lc app=leetcode id=93 lang=cpp * * [93] Restore IP Addresses * * https://leetcode.com/problems/restore-ip-addresses/description/ * * algorithms * Medium (32.03%) * Likes: 719 * Dislikes: 297 * Total Accepted: 146.8K * Total Submissions: 458.4K * Testcase Example: '"25525511135"' * * Given a ...
Markdown
UTF-8
6,274
3.4375
3
[]
no_license
--- title: time模块 date: 2017-10-12 00:08:12 tags: [笔记,python,time] categories: [笔记,python] comments: false --- ![mahua](https://i.loli.net/2017/11/01/59f9890e94a1e.jpg) <!--more--> Python时间模块之Time模块解析 [文章转载来源](http://blog.csdn.net/SeeTheWorld518/article/details/48314501) time模块。 在开始前,先说明几点: * 在Python中,通常有这几种方式表示时间:时间...
Python
UTF-8
6,803
2.9375
3
[ "BSD-2-Clause" ]
permissive
def function_getMontage(montage): ## Small laplacian ## Calculates spatial filter matrix for Laplacian derivations. ## ## Returns a spatial filter matrix used to calculate Laplacian derivations as ## well as indices used to plot in a topographical layout. ## Assuming that the data vector s is of...
Java
UTF-8
2,053
2.140625
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2014 Your Name <Ewa Milewska>. * * 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 appl...
Markdown
UTF-8
514
2.875
3
[ "MIT" ]
permissive
# ML_projects This repository contains four different machine learning projects. 1 . [Breast Cancer Prediction](https://github.com/abhi0444/ML_Projects/tree/main/Breast%20Cancer) <br> 2 . [Car Insurance Prediction](https://github.com/abhi0444/ML_Projects/tree/main/Car%20Insurance)<br> 3 . [Heart Disease Prediction](ht...
Java
UTF-8
702
1.796875
2
[]
no_license
package com.godwei.stock.service.manage; import com.godwei.stock.model.manage.Corporation; import com.godwei.stock.model.manage.User; import com.godwei.stock.util.ActionReturnUtil; public interface SecuritiesService { ActionReturnUtil addUser(User user); ActionReturnUtil addCorporation(Corporation corporatio...
C++
UTF-8
269
2.6875
3
[]
no_license
#include<iostream> using namespace std; int main(void) { int maxV = -1; int sum = 0; for(int sub=1; sub<=4; sub++) { int minus, plus; scanf("%d %d", &minus, &plus); sum = sum - minus + plus; if(sum > maxV) maxV = sum; } printf("%d\n", maxV); return 0; }
Java
UTF-8
534
2.125
2
[]
no_license
package fr.suravenir.karajan.model; public class TransfertObject { private Object transObjs; private boolean collection; private String name; public Object getTransObjs() { return transObjs; } public void setTransObjs(Object transObjs) { this.transObjs = transObjs; } public boolean isCollection() { re...
Python
UTF-8
1,198
2.578125
3
[]
no_license
import pandas as pd import numpy as np inCSV = '/Users/danielmsheehan/Downloads/nyctrees2015.csv' df = pd.read_csv(inCSV) dropList = ['spc_latin','the_geom','tree_id','created_at','block_id','boroname','st_assem','st_senate','state','cb_num','zip_city','address','latitude','longitude','x_sp','y_sp','uid','nta'] #re...
C++
UTF-8
2,236
2.71875
3
[]
no_license
/** * @file ParticleEmitter.h * @author Matt Rudder * @date Created May 20, 2006 * * Defines a collection of particle effects and their location in the game world. */ #ifndef _PARTICLESYSTEM_H_ #define _PARTICLESYSTEM_H_ // Engine include #include "BaseResource.h" #include "VertexCache.h" #include "Rend...
Markdown
UTF-8
1,157
2.515625
3
[]
no_license
# Inspection - Team *T18* | Inspection | Details | | ----- | ----- | | Subject | *RequestFind.java* | | Meeting | *11/2/20, 4:30, teams* | | Checklist | *[Link to Checklist](https://github.com/csucs314f20/t18/blob/master/reports/checklist.md)* | ### Roles | Name | Preparation Time | | ---- | ---- | | Korbin Walsh ...
C
UTF-8
568
3.953125
4
[]
no_license
#include "lists.h" /** * delete_nodeint_at_index - deletes node at index * @head: pointer to pointer * @index: what to delete * Return: -1 upon failure, 1 upon success **/ int delete_nodeint_at_index(listint_t **head, unsigned int index) { listint_t *ptr; unsigned int i = 0; listint_t *h; h = *head; if (*hea...
Markdown
UTF-8
7,861
2.890625
3
[]
no_license
--- categories: [] date: "2021-12-05T02:15:59Z" description: "" tags: ["docker", "hugo", "scripts"] title: "Docker Saved My Blog" --- I haven't written any blog posts for a while. One reason is that I've been hard at work on [DocSpring](https://docspring.com) for the last few years, and I haven't had a lot of time to ...
Java
UTF-8
323
1.734375
2
[]
no_license
import states.ChefStates; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author dn */ public interface ChefInterface { public void setChefState(ChefStates s); ...
C++
UTF-8
443
2.53125
3
[]
no_license
#include "esfera.h" Esfera::Esfera(){} void Esfera::Redimensionar(int n){ float PI=3.1416; float divisiones = (PI/n); float posicion = PI/2; Vertices.clear(); Vertices.resize(n+1); Vertices[0] = _vertex3f(0,1,0); posicion -= divisiones; for(int i=1; i<n; i++){ Vertices[i] = _vertex3f(cos(pos...
PHP
UTF-8
2,150
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Backpack\CRUD\app\Models\Traits\CrudTrait; use Spatie\Permission\Traits\HasRoles; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use ...
Python
UTF-8
9,061
2.53125
3
[ "MIT" ]
permissive
import unittest from . import TGBot, botapi import json class PluginTestCase(unittest.TestCase): # TODO: deprecated - kept only to minimize impact, remove in near future def fake_bot(self, *args, **kwargs): me = kwargs.pop('me', None) bot = TGBot(*args, **kwargs) return self.prepare_bo...
Java
UTF-8
970
3.5625
4
[]
no_license
package com.yt.datastructure.base.list; import com.yt.datastructure.DataStruct; /** * Created by yantong on 2019/2/14. * 类型相同的元素构成一个线性集合,连续占用一整块内存空间 * 由于此数据结构非常基础,且通用,所以大多数语言都会实现它 * 优点: 1、按照索引查询元素速度快 2、按照索引遍历数组方便 缺点: 1、数组的大小固定后就无法扩容了 2、数组只能存储一种类型的数据 3、添加,删除的操作慢,因为要移动其他的元素。 */ public interface Array exte...
C#
UTF-8
742
2.609375
3
[]
no_license
using System; namespace Test { public abstract class Test { public int Result() { return 1; } public abstract void Process(); public abstract void GetResult(ref int i); public abstract void GetResult1(out int i); public int Queue() ...
C
UTF-8
1,464
3.140625
3
[]
no_license
//-------------------------------------------------------------------------------------- // File: InputStream.h // Author: Andrew Coulthard // // This class essentially implements a FILO stack system for characters. // // Copyright (c) University of Alberta. All rights reserved. //--------------------------------------...
Python
UTF-8
2,669
2.765625
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- #  @Time    : 2021/4/10 23:35 #  @Author  : Ryu #  @Site    : #  @File    : correlation.py.py #  @Software: PyCharm import cv2 as cv import numpy as np import matplotlib.pyplot as plt import copy import math origin = cv.imread("images/origin.jpg") origin = copy.copy(origi...
Python
UTF-8
4,910
4.5625
5
[]
no_license
# Lawrence McAfee # ~~~~~~~~ import ~~~~~~~~ from modules.node.HierNode import HierNode from modules.node.LeafNode import LeafNode from modules.node.Stage import Stage from modules.node.block.CodeBlock import CodeBlock as cbk from modules.node.block.HierBlock import HierBlock as hbk from modules.node.block.ImageBlock ...
JavaScript
UTF-8
2,286
3.78125
4
[]
no_license
class Node { constructor(element) { this.element = element this.next = null } } class LinkedList { constructor() { this.head = null this.length = 0 } //尾部追加元素 append(element) { const node = new Node(element) if (!this.head) { this.head = node this.length = 1 r...
JavaScript
UTF-8
1,396
3.3125
3
[ "MIT" ]
permissive
// haversine great circle distance export const distance = (pt1, pt2) => { const [lng1, lat1] = pt1; const [lng2, lat2] = pt2; if (lat1 === lat2 && lng1 === lng2) { return 0; } var radlat1 = (Math.PI * lat1) / 180; var radlat2 = (Math.PI * lat2) / 180; var theta = lng1 - lng2; var radtheta = (Math...
C#
UTF-8
832
2.71875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lottery { class SweepstakesQueueManager : ISweepstakesManager { Queue<Sweepstakes> sweepstakes; public Contestant winner; public SweepstakesQueueManager() ...
C
UTF-8
2,116
3.125
3
[]
no_license
//http://stackoverflow.com/questions/7469139/what-is-equivalent-to-getch-getche-in-linux //http://cboard.cprogramming.com/c-programming/63166-kbhit-linux.html /*if you want To create a static library gcc -c libterm.c -o libterm.o compile static lib ar -cqv libterm.a libterm.o Create static lib g...
Ruby
UTF-8
3,191
2.75
3
[]
no_license
Then("Left Unit picker value should be {string}") do |value| # find element using xpath datax = find_element(id: "select_unit_spinner").text #datax = find_element(:xpath, "(//android.widget.RelativeLayout[1])[4]").text if datax != value fail("Expected right unit picker value is #{value}, Actual value is #...
TypeScript
UTF-8
2,838
2.546875
3
[ "MIT" ]
permissive
import { GraphQLFieldResolver } from 'graphql' import { intArg, stringArg } from '../definitions/args' import { NexusObjectTypeDef, objectType } from '../definitions/objectType' import { dynamicOutputMethod } from '../dynamicMethod' const relayConnectionMap = new Map<string, NexusObjectTypeDef<string>>() let pageInfo...
Markdown
UTF-8
1,543
2.8125
3
[]
no_license
--- layout: post title: "How to use semantic-ui in rails" date: 2016-01-03 21:35:00 -0200 categories: semantic rails --- I've been using [semantic-ui](http://semantic-ui.com/) on some rails project and it's a good UI framework to work with because of it's social clean and flex design. But I didn't find any blog pos...
Java
UTF-8
1,189
2.359375
2
[]
no_license
package pl.sdacademy; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; // 20180707 so // checking 2018-10-15 public class DodajServlet extends HttpServlet { @Overr...
Java
UTF-8
4,485
2.203125
2
[ "Apache-2.0" ]
permissive
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.redkale.net.sncp; import org.redkale.service.Service; import org.redkale.util.AnyValue; import java.util.*; impo...
Swift
UTF-8
2,699
2.984375
3
[]
no_license
// // Post.swift // MyOlympia // // Created by Michael Russo on 8/6/17. // Copyright © 2017 ToeMoss. All rights reserved. // import Foundation import Firebase import FirebaseDatabase class Post { private var _username: String! private var _userImg: String! private var _postImg: String! privat...
Python
UTF-8
5,670
3.328125
3
[ "MIT" ]
permissive
from .Player_Class import Player class Game(Player): def __init__(self, more_player = False): self.more_player = more_player self.players = [Player()] self.players.append(Player()) if self.more_player else self.players.append(Player(ai = True)) def __players__(self): if sel...
Python
UTF-8
8,111
2.875
3
[]
permissive
""" start_time, end_time, is_only_by_appointment, is_or_by_appointment, is_subject_to_change, start_date, end_date, hours_open_id, id """ import pandas as pd import config from utah_polling_location import PollingLocationTxt import datetime import re class ScheduleTxt(object): """ Inherits from PollingLocati...
Java
UTF-8
1,504
2.453125
2
[]
no_license
package com.bfong.notepadbf; import android.text.format.DateFormat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import java.util.List; public class NoteAdapter extends RecyclerView....
Java
UTF-8
1,465
2.4375
2
[]
no_license
package com.example.jstalin.servicios; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; public class ServiciosHiloSecundario01Activity extends AppCompatActivity { Intent servicio...
Java
UTF-8
300
2.34375
2
[]
no_license
package ru.timofeeva.box; import ru.timofeeva.sweets.Sweet; public interface Box { void add(Sweet sweet); double getBoxWeight(); double getBoxPrice(); void delete(int index); void optimizeWeight(double maxWeight); void optimizePrice(double maxPrice); void printBox(); }
TypeScript
UTF-8
39,085
3
3
[ "Apache-2.0" ]
permissive
/// <reference types="angular" /> declare namespace ArrayHelpers { /** * Removes elements in the target array based on the new collection, returns true if * any changes were made */ function removeElements(collection: Array<any>, newCollection: Array<any>, index?: string): boolean; /** *...
C++
UTF-8
1,622
2.53125
3
[]
no_license
#pragma once /** \file SDLMusic.h */ /** TODO: Specialization of IMusic interface for SDL */ #include <SDL/SDL_mixer.h> #include ".\IMusic.h" //! \namespace yang Contains all Yangine code namespace yang { /** \class SDLMusic */ /** SDL Music resource */ class SDLMusic : public IMusic { public: // ------------------...
Java
UTF-8
320
1.8125
2
[]
no_license
package controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public interface Controller { // request�� ó���� �� �̵��� URL�� ��ȯ public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception; }
PHP
UTF-8
814
2.578125
3
[]
no_license
<?php require_once "app/admin.php"; $admin = new admin(); if (isset($_POST['tsimpan'])) { $admin = new admin(); $admin->input(); } ?> <h2>INPUT DATA ADMIN</h2> <table> <form action="" method="POST"> <tr> <th>NAMA</th> <td><input type="text" name="nama"></td> </tr> <tr> <th>ALAMAT</th> <td><te...
Markdown
UTF-8
351
2.5625
3
[]
no_license
# Fiddling with react Basically running through the [React tutorial][1]. I added some additional functionality by .e.g using [FireBase][2] and added some simple UI elements like a delete &#x2717; and edit &#x270E; icon. The edit function doesn't work though. [1]: http://facebook.github.io/react/docs/tutorial.html...
Markdown
UTF-8
5,218
2.75
3
[ "Apache-2.0" ]
permissive
--- layout: base title: 'Old Church Slavonic UD' udver: '2' --- # UD for Old Church Slavonic <span class="flagspan"><img class="flag" src="../../flags/svg/MORAVA.svg" /></span> ## Tokenization and Word Segmentation * In general, words are delimited by whitespace characters. * Punctuation such as commas and periods ...
Python
UTF-8
2,180
2.609375
3
[]
no_license
#!/usr/bin/python # coding=utf-8 import pycurl, json, os, sys, time from StringIO import StringIO #setup InstaPush variables # set this to Application ID from Instapush appID = "5826bf64a4c48ad384b54902" # set this to the Application Secret from Instapush appSecret = "ad55eaf6f79ccea20aa10e331a5ec343" # leave this...
Java
UTF-8
7,037
1.835938
2
[]
no_license
package demo.wang.com.cosplay.thirdlogintest; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.Log; import android.view.View; import android.widget.TextView; import android.widget.To...
Markdown
UTF-8
16,898
2.59375
3
[]
no_license
# openstack之keystone部署 **前言**   openstack更新频率是挺快的,每六个月更新一次(命名是是以A-Z的方式,Austin*,Bexar...Newton*)。博主建议大家先可一种版本研究,等某一版本研究透彻了,在去研究新的版本。其实更新来说,也就是无非对于软件来说的一些优化。对于用户角度并没有多大的改变。切记不要追着新版本走,那样只会是丢了西瓜拣芝麻!   看一下官网的图   ![img](assets/1092539-20170120102018406-40875988.png)   我们按照Newton这个版本来部署。大家也可以上官网看下官方文档,写的也挺详细。 ...
C++
UTF-8
824
3.34375
3
[]
no_license
#include <iostream> using namespace std; class Movie { int prs[3],mtype[4],sum; public: Movie() { prs[0]=50; prs[1]=70; prs[2]=90; mtype[0]=50; mtype[1]=70; mtype[2]=90; mtype[3]=110; } int prize(int n1,int n2,int n3) //n1 for sitting type and n2 is for movie type //n3 is for number of...
Go
UTF-8
563
2.703125
3
[ "MIT" ]
permissive
package model import "time" // UserTableSQL is the SQL statement for createing a table corresponding to the User model var UserTableSQL = `CREATE TABLE IF NOT EXISTS user ( user_id CHARACTER(36) PRIMARY KEY, account_id CHARACTER(36), is_active INTEGER, created_at DATETIME, updated_at DATETIME );` // User repres...
Java
UTF-8
1,319
3.09375
3
[]
no_license
package com.example.kpadmin.encryptionapp; /** * ObjectListNode Class * @author Kunal Purohit * @version 1.0 - November 11,2015 */ public class ObjectListNode { private Object info1; private Object info2; private ObjectListNode next; // Default ctor public ObjectListNode() { info1 = ...
C++
UTF-8
735
3.15625
3
[]
no_license
#include <iostream> #include <functional> #include <utility> using std::bind; using std::function; using std::cout; using std::endl; using std::placeholders::_1; using std::placeholders::_2; void f (int x, int y, int z) { cout << x << " " << y << " " << z << endl; } void fb (int n1, int n2, int n3, ...
Java
UTF-8
607
2.78125
3
[]
no_license
import com.codingame.gameengine.runner.MultiplayerGameRunner; public class Main { public static void main(String[] args) { MultiplayerGameRunner gameRunner = new MultiplayerGameRunner(); gameRunner.addAgent(Player1.class); gameRunner.addAgent(Player2.class); // gam...
Markdown
UTF-8
5,179
3.59375
4
[]
no_license
# 模式-代理模式(Proxy) ## 代理模式(Proxy) 代理模式是一种结构型的模式。结构型模式的特定是影响对象之间的连接方式,确保系统的变化不需要改变对象间的连接。 代理模式引入一个新的对象,来实现对真实对象的操作,或将新的对象作为真实对象的一个替身,即代理对象。 代理模式的一些作用使用情况: 1. 远程代理:为一个位于不同地址空间的对象提供一个本地的代理对象。 2. 虚拟代理:根据需要创建开销很大的对象,当需要创建一个资源消耗很大的对象时,先创建一个消耗相对较小的对象来表示,真实对象只有在需要时才会被真正创建。 3. 保护代理:控制对原始对象的访问。保护代理用于对象应该有不同的访问权限时。 4. 智能代理:...
Java
UTF-8
492
2.84375
3
[]
no_license
package utility_classes; public class Reservation_Time { public int Minute; public int Hour; public Reservation_Time(){ this.Minute = 0; this.Hour=0; } public Reservation_Time(int Minute,int Hour){ this.Minute = Minute; this.Hour=Hour; } public void Set_Reservation_Time(in...
Java
UTF-8
3,918
2.921875
3
[]
no_license
package pokemonstuff; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTextArea...
Markdown
UTF-8
9,710
2.6875
3
[ "Apache-2.0" ]
permissive
grunt-nunjucks-render ===================== [![Build Status](https://travis-ci.org/piwi/grunt-nunjucks-render.svg?branch=master)](https://travis-ci.org/piwi/grunt-nunjucks-render) [![Code Climate](https://codeclimate.com/github/piwi/grunt-nunjucks-render/badges/gpa.svg)](https://codeclimate.com/github/piwi/grunt-nunju...
Java
UTF-8
1,911
3.515625
4
[]
no_license
package dataStructuresAndAbstractionsGennemgang; public class Noter { /** * Noter: While the roots of most plants are firmly in the ground, the root * of an ADT tree is at the tree’s top; it is the origin of a hierarchical * organization. Each node can have children. A node with children is a * parent;...
C#
UTF-8
5,785
2.890625
3
[]
no_license
using System; using System.Collections.Immutable; using System.Linq; namespace NNLib.Csv { /// <summary> /// Used to choose input, target and ignored attributes of training data from csv file. /// </summary> public class SupervisedSetVariableIndexes { private readonly ImmutableArray<int> _...
Java
UTF-8
822
1.601563
2
[]
no_license
package com.netty.battery.maintenance.service; import com.netty.battery.maintenance.config.ServerResponse; import com.netty.battery.maintenance.pojo.BasChaPilPojo; import com.github.pagehelper.PageInfo; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; /** * ******************...
C++
UTF-8
732
2.59375
3
[]
no_license
#pragma once #include "GraphicObject.h" struct WeaponInfo { int bullets_id; short xw, yw; float deley; char *particle; char *sprite; }; class Weapon: public GraphicObject { Weapon(); public: Weapon(hgeVector pos, short layer); virtual ~Weapon(); void Initiate(WeaponInfo &info); ...
C#
UTF-8
7,843
3.03125
3
[]
no_license
using System; using System.Drawing; using System.Linq; using Vkm.Api.Basic; using Vkm.Api.Options; namespace Vkm.Common { public static class DefaultDrawingAlgs { public static void DrawIconAndText(BitmapEx bitmap, FontFamily iconFontFamily, string iconSymbol, FontFamily textFontFamily, string text, s...
Python
UTF-8
149
3.046875
3
[]
no_license
from random import randint import sys n = int(sys.argv[1]) a = [] for i in range(n): a.append(randint(1,6)) b = sum(a)/n print(a) print(b)
Java
UTF-8
3,523
2.375
2
[]
no_license
/* * 广州丰石科技公司有限公司拥有本软件版权2017并保留所有权利。 * Copyright 2017, Guangzhou Rich Stone Data Technologies Company Limited, * All rights reserved. * */ package com.richstonedt.road.query.engine.cs.common; import com.richstonedt.road.query.engine.model.common.RoadQueryEngineException; import com.richstonedt.road.query.engine...
Markdown
UTF-8
2,619
2.546875
3
[]
no_license
# Resume * * * ## Work Experience - **RuleMeister Inc. | Software Application/ Full-stack Developer Nov 2018 - PRESENT | Alhambra, CA** - Maintained and built a healthcare management system. Including authorization, claim submission, process and reporting. This suite also includes patient/healthcare provider/ven...
Shell
UTF-8
1,913
2.6875
3
[ "MIT" ]
permissive
#!/bin/bash # Place the CUDA_VISIBLE_DEVICES="xxxx" required before the python call # e.g. to specify the first two GPUs in your system: CUDA_VISIBLE_DEVICES="0,1" python ... # SEGAN with no pre-emph and no bias in conv layers (just filters to downconv + deconv) #CUDA_VISIBLE_DEVICES="2,3" python main.py --init_noise...
PHP
UTF-8
434
3.40625
3
[]
no_license
<?php /** * Class AddressManager * 使用拦截器 __call() */ class Person{ function __call($method, $args){ $i = 1; $args_str = ''; foreach($args as $v){ $args_str .= "arg ".$i." is (".$v.")"; $i ++; } exit("you called an unexist funciton {$method}, and...
C#
UTF-8
254
3.09375
3
[]
no_license
using System; namespace pattern_Bridge { class DrawingAPI2 : DrawingAPI { public void drawCircle(double x, double y, double radius) { Console.WriteLine($"API2.circle at {x}:{y} radius {radius}\n"); } } }
Python
UTF-8
444
2.953125
3
[]
no_license
import socket import sys HOST='127.0.0.1' PORT=50007 s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) try: s.connect((HOST,PORT)) except Exception as e: print('Server not found or not open') sys.exit() while True: c=input('Input the content you want to send:') s.sendall(c.encode()) ...
Java
UTF-8
826
3.0625
3
[]
no_license
package com.polopoly.ps.pcmd.parser; import java.io.File; import java.io.IOException; public class ExistingFileParser implements Parser<File> { public String getHelp() { return "a file name (relative or absolute)"; } public File parse(String fileName) throws ParseException { File file = ...
C#
UTF-8
1,122
2.703125
3
[]
no_license
using Movies.Core.Entities; using Movies.Core.Interfaces; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; namespace Movies.Infrastructure.DataAccess.Repositories { public class MovieSampleRepository : IMovieRepository { public Task<Movie> AddMovieAsync(...
Java
UTF-8
1,087
4.125
4
[]
no_license
package project4; /** * Point class * Creates variables and methods for a point object * @author Carole-Anne */ public class Point { private int x; private int y; /** * Point constructor * Instantiates coordinates of a point object * @param a - x coordinate * @param b - y coordinate */ public Poin...
PHP
UTF-8
34,658
2.578125
3
[]
no_license
<?php require_once("includes/validate_credentials.php"); ?> <!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]--> <!--[if...
Markdown
UTF-8
12,941
3.21875
3
[ "MIT", "Apache-2.0" ]
permissive
+++ author = ["Alexander Neumann"] title = "Splitting Data with Content-Defined Chunking" date = 2018-12-01T00:00:00Z series = ["Advent 2018"] +++ In this post you'll learn what Content-Defined Chunking (CDC) is and how you can use it to split large data into smaller blocks in a deterministic way. These blocks can be ...
C++
UTF-8
652
3.125
3
[]
no_license
class Solution { public: Node* connect(Node* root) { if(!root) return NULL; queue<Node*> bfs; bfs.push(root); while(!bfs.empty()){ int size = bfs.size(); while(size--){ Node* curr = bfs.front(); ...
JavaScript
UTF-8
293
3.03125
3
[]
no_license
'use strict'; const filterByDistrict = (stations,query) => { //console.log(stations) const valor = query.toLowerCase(); const district=stations.filter((e)=>{ return e.district.toLowerCase().indexOf(valor)!=-1; }) console.log(district); return district; };
Python
UTF-8
1,219
3.6875
4
[]
no_license
# 3. Написать программу, которая обходит не взвешенный ориентированный граф без петель, # в котором все вершины связаны, по алгоритму поиска в глубину (Depth-First Search). # # # Примечания: # a. граф должен храниться в виде списка смежности; # b. генерация графа выполняется в отдельной функции, которая принимает на вх...
Ruby
UTF-8
398
2.96875
3
[ "MIT" ]
permissive
class Episode attr_reader :attributes def initialize filename @filename = filename @attributes = nil process end def process if @filename =~ /^(.*)s(\d{2})e(\d{2})[^\d]+/i @attributes = { season: $2, episode: $3 } @attributes[:name] = $1.gsub(/(1080|720)p?/,'').gsub(/20\d{2}/,'').g...
Python
UTF-8
620
3.15625
3
[]
no_license
class Solution: def strStr(self, source, target): # write your code here self.source=source self.target=target if target=="": return 0 if source=="" or source==None or target==None: return -1 length = len(target)-1 for i in range(0,len(...
Java
UTF-8
17,565
2.875
3
[]
no_license
package com.mkyong.IO; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io....
Java
UTF-8
434
1.695313
2
[]
no_license
package com.procrastinators.malayalammemes.malayalammemes; import android.support.v7.app.AppCompatActivity; import android.widget.LinearLayout; /** * Created by Jazeem on 03/09/15. */ public abstract class RefreshableFragmentActivity extends AppCompatActivity{ public abstract void refreshFavourites(); publi...
C++
UTF-8
1,203
2.59375
3
[]
no_license
/************************************************* ** Tad Ultrasonic Sensor: Reads the distance between the sensor and objects ** Enginyers: Ignasi Ballarà Franco, Joaquim Porte Jimenez, Arnau Tienda Tejedo ** Date: 02/05/2017 *************************************************/ const int PIN_Trig = 2; const int P...
Java
UTF-8
1,164
2.375
2
[]
no_license
package TrackBuddy.plugin.trackmate.features.BCellobject; import java.util.Iterator; import tracking.BCellobject; import net.imagej.ImgPlus; import net.imglib2.type.numeric.RealType; public abstract class IndependentBCellobjectFeatureAnalyzer< T extends RealType< T >> implements BCellobjectAnalyzer< T > { protecte...
Python
UTF-8
3,200
3.109375
3
[ "MIT" ]
permissive
#!/usr/bin/env python # https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Script_Launcher.py import PySimpleGUI as sg import glob import ntpath import subprocess LOCATION_OF_YOUR_SCRIPTS = '' TRANSPARENCY = .6 # how transparent the window looks. 0 = invisible, 1 = normal window # Execute ...
Java
UTF-8
2,569
2.21875
2
[]
no_license
package com.shareshow.airpc.activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app....
JavaScript
UTF-8
1,085
2.9375
3
[]
no_license
import React, { Component } from 'react' class Game extends Component { render () { return ( // So i've gotten the math of the scores and the basic framework of the assignment looking // like how i wanted it to. But i still need the function to randomize images and display // them as buttons t...
Python
UTF-8
3,953
2.71875
3
[]
no_license
from rest_framework import serializers, renderers, parsers import re import os import csv import logging LOG = logging.getLogger('impaqd') class ResponseStatusRenderer(renderers.JSONRenderer): """ Default renderer. Should be used on ALL views. All views should implement this renderer OR if it implements a...
Ruby
UTF-8
1,980
3.65625
4
[]
no_license
class Sudoku def initialize(board_string) @cloned_string = board_string @cloned_string.gsub!(/-/, '0') @array_of_characters = @cloned_string.chars @board = [] 0.upto(8) do |i| @board << @array_of_characters.slice(i * 9, 9).map{|x| x.to_i} end p @board end def valid_row?(index_...
Python
UTF-8
664
2.59375
3
[]
no_license
import gtk class QTTable(gtk.TreeView): def __init__(self, colinfo, model): gtk.TreeView.__init__(self) self.set_model(model) self.set_grid_lines(gtk.TREE_VIEW_GRID_LINES_BOTH) self.set_headers_visible(True) self._colinfo = colinfo index = 0 for colname,...
Java
UTF-8
297
1.9375
2
[]
no_license
package pe.edu.upeu.gth.interfaz; import java.util.ArrayList; import java.util.Map; public interface CRUDOperations { public ArrayList<Map<String, Object>> listar(); public boolean add(Object o); public boolean edit(Object o); public boolean delete(Object o); }
C#
UTF-8
1,387
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading; using System.Threading.Tasks; using AutoMapper; using MediatR; namespace MovieData.Models { public class GetAllMoviesRequest :IRequest<GetAllMoviesResponse> { public ...
Python
UTF-8
398
3.359375
3
[]
no_license
class Solution: # @param {integer} n # @return {string} def convertToTitle(self, n): times = 0 res = [] while n >= 27: res.append(n % 27) n %= 27 times += 1 if times == 10000: break res.append(n) return r...
Java
UTF-8
1,599
2.546875
3
[]
no_license
package nc.ccas.gasel.services.doc; import static java.util.regex.Pattern.compile; import java.util.Arrays; import java.util.Collection; import java.util.Set; import java.util.TreeSet; import java.util.regex.Matcher; import java.util.regex.Pattern; public class XmlDocChecker implements DocumentChecker { public sta...
JavaScript
UTF-8
960
2.5625
3
[]
no_license
/* Funciones Javascript para flotas_editar.php */ $(function(){ // Boton atrás: $("a#botvolver").click(function(){ $("form#detflota").submit(); }); // Boton cancelar: $("a#botreset").click(function(){ $("form#formflota")[0].reset() }); // Validar formulario $("form#formf...
TypeScript
UTF-8
2,259
2.640625
3
[]
no_license
import { ethers } from "hardhat"; import { assert, expect } from "chai"; import { Contract } from "@ethersproject/contracts"; describe("Bishop", function () { let bishop: Contract; before(async function () { const KnightMove = await ethers.getContractFactory("Bishop"); bishop = await KnightMov...
Python
UTF-8
2,252
3.5625
4
[]
no_license
from math import gcd from random import randint, choice task = """6. Реализовать алгоритм построения ПСП методом Фиббоначи с запаздываниями. Обосновать выбор коэффициентов алгоритма. Для начального заполнения использовать стандартную линейную конгруэнтную ПСП с выбранным периодом. Реализовать возможность для пользоват...
Java
UTF-8
157
2.046875
2
[]
no_license
package com.smartglossa.calculator; public class Sample { public static void main(String[] args) { System.out.println("Hari is Best"); } }
Java
UTF-8
4,793
1.804688
2
[]
no_license
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010.0...
PHP
UTF-8
173
2.5625
3
[ "MIT" ]
permissive
<?php namespace Swiftcore\Utility; interface ErrorBag { public function getErrors(); public function hasErrors(); public function addErrors(array $errors); }
C++
UTF-8
1,461
2.640625
3
[ "MIT" ]
permissive
/** * @defgroup Examples Examples of how to use OMiSCID. * */ /** * @file Examples/Accumulator.h * @ingroup Examples * @brief Demonstration of an accumulator server. Header file. * * @author Dominique Vaufreydaz */ #ifndef __ACCUMULATOR_WITH_STRUCTURED_MESSAGE_H__ #define __ACCUMULATOR_WITH_STRUCTURED_MESSA...
Markdown
UTF-8
1,034
2.515625
3
[]
no_license
## 0x15 JAVASCRIPT - Web JQuery ![JQUERY](https://s3.amazonaws.com/intranet-projects-files/holbertonschool-higher-level_programming+/305/4724718.jpg) #### AUTHOR Spencer Cheng: [github account](https://github.com/spencerhcheng), [twitter](https://twitter.com/spencerhcheng) #### SETUP All files are interpreted on Chr...
C++
UTF-8
608
2.921875
3
[]
no_license
#include <Asset.h> TEST_CASE("Assets & Resources", "[CPU Memory Ops][Core]") { SECTION("Assets") { Asset<std::string> test; test.Set("Hello World"); REQUIRE(test.Get() == "Hello World"); Asset<int> iTest; iTest.Set(42); REQUIRE(iTest.Get() == 42); } SECTION(...