language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,340 | 2.703125 | 3 | [
"MIT"
] | permissive | # DearInventoryRuby::SaleAdditionalCharge
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | Name of Service Product referenced by this Line |
**price** | **Float** | Decimal with up to 4 decimal places. Price per unit in Custom... |
Java | UTF-8 | 467 | 2.078125 | 2 | [
"CC-BY-4.0"
] | permissive | package com.gps.itunes.media.player.ui.theme;
/**
* @author leogps
* Created on 5/29/21
*/
public class UITheme {
private String name;
private String className;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Str... |
Python | UTF-8 | 7,768 | 2.90625 | 3 | [] | no_license | import numpy as np
def debug_signal_handler(signal, frame):
import pdb
pdb.set_trace()
import signal
signal.signal(signal.SIGINT, debug_signal_handler)
seq_size = 1000
def one_hot_encode_along_channel_axis(sequence):
#theano dim ordering, uses row axis for one-hot
to_return = np.zeros((len(sequence),... |
Python | UTF-8 | 1,552 | 3.390625 | 3 | [] | no_license | #Coder: Kbhkn
#Kesirlerde 4 işlem yapma.
class Kesir:
def __init__(self,Pay,Payda):
self.pay = Pay
self.payda = Payda
def __add__(self,DKesir):
yenipay = self.pay*DKesir.payda + DKesir.pay*self.payda
yenipayda = self.payda*DKesir.payda
ortak = Kesir.ebob(yenipa... |
Python | UTF-8 | 1,425 | 3.28125 | 3 | [] | no_license | #!/usr/bin/env python3
# The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330,
# is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit
# numbers are permutations of one another.
# There are no arithmetic sequences made up of three 1-, 2-, or 3... |
JavaScript | UTF-8 | 3,547 | 2.828125 | 3 | [] | no_license | /**
* In OJET, we can easily create Web component and use a custom HTML element.
* OJET actually allow you to organize the web component in a structure with
* sub folder etc. In this example, we will do it inline version and register
* the component manually, just so we can easily match to VueJS example for
* comp... |
Java | UTF-8 | 1,460 | 2.59375 | 3 | [] | no_license | package org.yaukie.special.rocketmq.event;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.rocketmq.client.producer.LocalTransactionState;
import org.apache.rocketmq.client.producer.TransactionCheckListener;
import org.apache.rocketmq.common.message.MessageExt;
import org.springframework.stereotyp... |
Rust | UTF-8 | 782 | 3.09375 | 3 | [
"MIT"
] | permissive | #![no_std]
use core::ops::{Drop, FnOnce};
pub struct Finally<F>
where
F: FnOnce(), {
f: Option<F>,
}
impl<F> Drop for Finally<F>
where
F: FnOnce(),
{
fn drop(&mut self) {
if let Some(f) = self.f.take() {
f()
}
}
}
pub fn finally<F>(f: F) -> Finally<F>
where
F: FnO... |
Java | UTF-8 | 694 | 3.390625 | 3 | [] | no_license | /*
* @author Jorge Alcaraz Bravo
* Tema 6 Ejercicio 05
*
*/
public class Ejercicio05 {
public static void main (String[] args) {
int maximo=100;
int minimo=199;
int sumatorioParaMedia=0;
int numeroRandom=0;
for (int i=0; i<50; i++) {
numeroRandom=(int)(Math.random()*100+100);
Syste... |
Java | UTF-8 | 1,294 | 2.71875 | 3 | [
"MIT"
] | permissive | package <missing>;
public class GlobalMembers
{
/*
* mm.cpp
*
* Created on: 2012-11-18
* Author: ada
*/
public static void get_array(int[] a)
{
int n1;
int n2;
n1 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
n2 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
for (int ... |
JavaScript | UTF-8 | 721 | 2.859375 | 3 | [] | no_license | function mostrar()
{
//tomo la edad
var mes
var mesDelAño = document.getElementById('mes').value;
//alert (mesDelAño);
switch (mesDelAño){
case "Febrero":
alert("este mes no tiene mas d 28 dias ");
break;
case "Abril":
case "Junio":
case "Septiembre":
... |
C# | UTF-8 | 658 | 2.625 | 3 | [] | no_license | using UnityEngine;
using System.Collections;
public class mouse : MonoBehaviour
{
public string cubeTag="button";
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
Ray ray = new Ray();
RaycastHit hit = new RaycastHit();
ray = Camera.main.ScreenPointToRay(Input.m... |
Java | UTF-8 | 2,471 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | package com.clevercloud.biscuit.datalog.expressions;
import biscuit.format.schema.Schema;
import com.clevercloud.biscuit.datalog.Term;
import com.clevercloud.biscuit.datalog.SymbolTable;
import com.clevercloud.biscuit.error.Error;
import io.vavr.control.Either;
import io.vavr.control.Option;
import java.util.ArrayDeq... |
C++ | UTF-8 | 2,963 | 2.59375 | 3 | [] | no_license | #include "stdafx.h"
#include "TileTerrain.h"
#include "RectangleTexture.h"
#include "ResourceManager.h"
#include "Export_Function.h"
CTileTerrain::CTileTerrain(eObjectType _eObjectType)
: CGameObject(_eObjectType)
, m_pVertexTexture(NULL)
, m_pTileVertex(NULL)
, m_iCountX(0)
, m_iCountZ(0)
{
}
CTileTerrain::~CTileTe... |
C# | UTF-8 | 2,017 | 3.3125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using CoffeeApp;
using FractionApp;
namespace UtilitiesApp
{
class Program
{
static void Main (string[] args)
{
//float x = 5.6f;
//float y = 3.4f;
//Coffee oneCoffee = new Coffee(CoffeeVariation.Double);
... |
Python | UTF-8 | 1,185 | 2.671875 | 3 | [
"MIT"
] | permissive | import json
from argparse import ArgumentParser
import tweepy
parser = ArgumentParser()
parser.add_argument('friends_repo')
parser.add_argument('-a', '--auth-filepath', help='Path to auth file',
required=True)
args = parser.parse_args()
FRIENDS_IDS = args.friends_repo
with open(args.auth_filepath) as f:
AUTH ... |
C# | UTF-8 | 1,144 | 2.734375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
namespace Uninstaller
{
class UninstallManager
{
private UI outputObj;
public UninstallManager()
{
outputObj = new ConsoleHandler... |
Python | UTF-8 | 4,704 | 2.921875 | 3 | [
"MIT"
] | permissive | # coding=utf-8
"""
A Diamond collector that collects memory usage of each process defined in it's
config file by matching them with their executable filepath or the process name.
This collector can also be used to collect memory usage for the Diamond process.
Example config file ProcessMemoryCollector.conf
```
enabl... |
Java | UTF-8 | 5,275 | 2.15625 | 2 | [] | no_license | package com.py.ysl.activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.py.ysl.R;
import com.py.ysl.base.BaseActivity;
import com.py.ysl.bean.RoundInfo;
import com.py.ysl.view.myview.BarGraphView;
import com.py.ysl.view.myview.Char... |
C# | UTF-8 | 7,275 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Business_Logic;
namespace AITMediaLibrary
{
public partial class AdminUserForm : Form
{
private readonly UserLogic _userLogic;
private readonly MediaLogic _mediaLogic;
private UserMode... |
C++ | UTF-8 | 1,013 | 3.21875 | 3 | [] | no_license | //Main idea: 단순
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> card;
vector<int> q;
int N, M;
void input() {
cin >> N;
for (int i = 0; i < N; i++) {
int tmp;
cin >> tmp;
card.push_back(tmp);
}
cin >> M;
for (int i = 0; i < M; ... |
JavaScript | UTF-8 | 732 | 2.640625 | 3 | [
"MIT"
] | permissive | const customer = require('../datasource/customer')
class CustomerRepository {
getCustomers() {
var customers = [];
customers.push(new customer({firstName: "Recipient", lastName: "One", emailAddress: "recipient1@example.com", favoriteColor: "Green"}));
customers.push(new customer(... |
Markdown | UTF-8 | 2,666 | 3.640625 | 4 | [] | no_license | ### 基础语法
#### 标题
Markdown支持6种级别的标题,对应html标签h1~h6

以上标记效果如下:
# h1
## h2
### h3
#### h4
##### h5
###### h6
除此之外,Markdown还支持另外一种形式标题展示形式,其类似于Setext标记语言的表现形式,使用下划线进行文本大小的空值
#### 段落及区块引用
需要记住的是,Markdown其实就是易于编写的普通文本,只不过加入了部分渲染文本的标签而已。其最终依然会转换为html标签,因此使用Markdown分段非常简单,前后至少保留一个空行即可。
而另... |
Java | UTF-8 | 2,608 | 2.578125 | 3 | [] | no_license | package com.daojia.toSql.util;
import com.daojia.toSql.util.Constant.SqlConstant;
/**
* @Title: GeneratorUtil.java
* @Description:
* @Author:daojia
* @CreateTime:2018年6月6日下午10:20:10
* @version v1.0
*/
public class GeneratorUtil {
public static String buildCreateTable(String tableName){
StringBuilder sb ... |
C++ | UTF-8 | 1,488 | 3.46875 | 3 | [] | no_license | #pragma once
class SameGameBoard
{
public:
/* Base Constructor */
SameGameBoard(void);
/* Base Destructor */
~SameGameBoard(void);
/* Function to randomly setup the board
Plan to have option for number of colors later */
void SetupBoard(void);
/* Get color at location on board */
COLORREF GetSpaceColor(int ro... |
Shell | UTF-8 | 2,595 | 3.8125 | 4 | [] | no_license | #!/bin/bash
. /etc/os-release
if [ -z "$PRETTY_NAME" ]; then
echo "Cannot get host information"
exit 1
fi
echo $PRETTY_NAME
if [ ! -e /usr/bin/rpmbuild ]; then
echo "Cannot find rpmbuild"
exit 1
fi
# config
SPECDIR=~chrism/jd
SPEC=$SPECDIR/jd-kernel.spec
# [ -z "$REPO" ] && REPO="git@github.com:mishu... |
TypeScript | UTF-8 | 2,546 | 2.609375 | 3 | [
"MIT"
] | permissive | import { IResource } from '../../../../types/resources';
import { getResourcesSupportedByVersion } from '../../../utils/resources/resources-filter';
import content from '../../../utils/resources/resources.json';
import {
createResourcesList, getAvailableMethods, getCurrentTree, getResourcePaths, getUrlFromLink, remov... |
Ruby | UTF-8 | 1,977 | 3.40625 | 3 | [] | no_license | require_relative "ingredient"
require_relative "drink"
require_relative "drink_maker"
class Baristomatic
INITIAL_QUANTITY = 10
def restok
inventory.each { |_, item| item.quantity = INITIAL_QUANTITY }
end
def drink(drink_number)
drinks[drink_number - 1]
end
def dispense(drink)
drink_maker.dis... |
Ruby | UTF-8 | 1,666 | 2.875 | 3 | [
"MIT"
] | permissive | require "test_helper"
require "talent_scout"
class ChoiceTypeTest < Minitest::Test
def test_cast_with_valid_value
type = TalentScout::ChoiceType.new(MAPPING)
MAPPING.each do |value, expected|
assert_equal expected, type.cast(value.to_sym)
assert_equal expected, type.cast(value.to_s)
assert... |
Java | UTF-8 | 14,082 | 1.867188 | 2 | [] | no_license | package gordenyou.huadian.activity;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.SharedPreferences;
import android.hardware.barcode.Scanner;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.os.Bundl... |
Python | UTF-8 | 204 | 3.125 | 3 | [] | no_license | import driver
def letter(row, col):
if ((row >=2 and row<=4) and (col>=3 and col<=6)):
return 'M'
else:
return 'S'
if __name__ == '__main__':
driver.compare_patterns(letter)
|
Java | UTF-8 | 2,240 | 2.578125 | 3 | [] | no_license | package YB101_5_VIEW_LOAD;
import java.sql.*;
import java.io.*;
import java.util.*;
public class ViewDAO implements IViewDAO {
private static final String INSERT_STMT = "INSERT INTO viewinfo VALUES (?, ?, ?, ?, ?, ?,?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?)";
private static final String INSERT_NEIGHBOR_STMT = "INSERT INTO vi... |
C++ | UTF-8 | 1,207 | 2.796875 | 3 | [] | no_license | #include "input/Controller.h"
GibEngine::Input::Controller::Controller(int controllerId)
: Controller(controllerId, false) { }
GibEngine::Input::Controller::Controller(int controllerId, bool connected)
: controllerId(controllerId), connected(connected), axisCount(0), buttonCount(0) { }
void GibEngine::Input::Contr... |
Java | UTF-8 | 18,056 | 2.359375 | 2 | [] | no_license | import java.util.Calendar;
public class CrimeReport
{
boolean isPrecinctReport;
boolean isBoroughReport;
boolean isCityReport;
/*
* precinct set to -1 for borough-level and citywide report otherwise set to
* actual precinct
*/
int precinct;
/*
* For Queens and Brooklyn, we consider the north and south... |
C | UTF-8 | 1,198 | 3.046875 | 3 | [] | no_license | #include <stdio.h>
#define cls system("cls")
void capt(int);
void ini(float*, int);
void jacobi(int o, float m[][o+1],float*, int);
int main(){
int o;
printf("Cuantas ecuaciones seran?");scanf("%d",&o);
capt(o);
return 0;
}
void capt(int o){
float m[o][o+1];
float rf[o];
int in, i, j;
p... |
Java | UTF-8 | 255 | 1.648438 | 2 | [] | no_license | package org.iqvis.nvolv3.mobile.bean;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.iqvis.nvolv3.domain.EventConfiguration;
public abstract class EventModifire {
@JsonIgnore(false)
abstract EventConfiguration getEventConfiguration();
}
|
Markdown | UTF-8 | 3,810 | 2.65625 | 3 | [] | no_license | ## N1DES
## 题目代码
```python
# -*- coding: utf-8 -*-
import hashlib,base64
def f(a,b):
digest = hashlib.sha256(a + b).digest()
return digest[:8]
def str_xor(a,b):
return ''.join( chr(ord(a[i]) ^ ord(b[i])) for i in range(len(a)))
def round_add(a, b):
res = str_xor(f(a,b),f(b,a))
return res
def perm... |
PHP | UTF-8 | 1,562 | 3.15625 | 3 | [] | no_license | <?php
$str = isset($_POST['myHTML']) ? $_POST['myHTML'] : "";
$res = htmlspecialchars($str);
echo "your input is: ".$res;
?>
<html>
<head>
<title>
Exercice 1
</title>
</head>
<script>
function HTMLElements(str) {
let openingTags = str.match(/<\w+>/g)
let clo... |
JavaScript | UTF-8 | 620 | 2.625 | 3 | [] | no_license | aroCityApp.filter('unique',function(){
return function(collection, keyname) {
//console.log('col --->' , collection , 'keyname--->',keyname);
var output = [],
keys = [];
angular.forEach(collection, function(item) {
//console.log('City --->' , item ,'Key Name--->' , keyname);
... |
Java | UTF-8 | 357 | 3.265625 | 3 | [] | no_license |
public class SelectionSort
{
public void DoSelectionSort( int[] array )
{
for( int i=0; i<array.length; i++ )
{
int keyindex = i;
for( int j=i+1; j<array.length; j++ )
{
if( array[j] < array[keyindex] )
{
keyindex = j;
}
}
int swp = array[i];
array[i] = array[keyindex];
... |
Python | UTF-8 | 413 | 3.6875 | 4 | [] | no_license | import numpy as np
def end():
print()
# 2.15.1 함수의 사용
def my_func1():
print("Hi!")
my_func1()
def my_func2(a, b):
c=a+b
return c
print(my_func2(1, 5))
end()
# 2.15.2 인수와 반환값
def my_func3(D):
m = np.mean(D)
s = np.std(D)
return m, s
data=np.random.randn(100)
data_mean, data_std=my_func3... |
Java | UTF-8 | 265 | 1.507813 | 2 | [] | no_license | package com.action.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.action.entity.Audit;
@Repository
public interface AuditRepo extends JpaRepository<Audit, Integer> {
}
|
JavaScript | UTF-8 | 2,881 | 3.640625 | 4 | [] | no_license | //Adiciona evento ao botão
document.getElementById("button").addEventListener("click",
//cria uma function para:
function mudarPaleta(){
//pegar uma paleta de cor através do id de forma aleatória
const pegaPaleta = document.getElementById('a'+`${Math.floor(Math.random() * 100 )}`);
//armazenar o código H... |
Markdown | UTF-8 | 2,644 | 2.546875 | 3 | [
"MIT"
] | permissive | ---
title: About
permalink: /about/
---
# Austin Apple Admins
<img src="/assets/images/aaa.png" alt="Austin Apple Admins" style="width: 200px;align: center;" />
Our goal is simple: to create a social network of Apple admins in and around Austin and Central Texas. We continually strive for this network to facilitate... |
Java | UTF-8 | 1,136 | 3.484375 | 3 | [] | no_license | import java.util.Arrays;
public class TwoSum {
public static int[] findTwoSum(int[] list, int sum) {
int[] returnArray = new int[list.length];
Arrays.sort(list);
// printArray(a);
int top = 0;
int bott = list.length - 1;
while (top < bott) {
while (list[bott] >... |
Markdown | UTF-8 | 19,762 | 3.0625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Celebrating 10 years of datajournalism"
category: posts
---
_This essay was written for my talk at the MINDS conference in Copenhagen, on 20 October 2016._
Datajournalism is turning 10! The starting point has been set (by me) to September 2006, when Adrian Holovaty published his oft-quoted pi... |
JavaScript | UTF-8 | 2,058 | 2.75 | 3 | [] | no_license | import { useState, useEffect } from "react";
import { createStage } from "../gameHelpers";
export const useStage = (player, resetPlayer) => {
const [stage, setStage] = useState(createStage());
const [rowsCleared, setRowsCleared] = useState(0); //dolanda 1 columu bosalt
useEffect(() => {
setRowsCleared(0);
... |
C++ | UTF-8 | 690 | 2.734375 | 3 | [] | no_license | /**
* Filename: Bullet.BULLET_HPP
*
* Represents a bullet.
**/
#ifndef BULLET_HPP
#define BULLET_HPP
#include <math.h>
#include <SFML/Graphics.hpp>
#include "GameApp.hpp"
#include "Player.hpp"
class Bullet {
public:
Bullet(GameDataRef data);
~Bullet();
void draw();
sf::CircleShape getShape();... |
JavaScript | UTF-8 | 867 | 3.015625 | 3 | [] | no_license | 'use strict';
const Notes = require('../lib/notes.js');
// Spies!
// Wouldn't it be great to know if something got called the right way?
// Or the right number of times?
// Or with the right arguments?
// This "spies" on console.log() so that we can watch it being called by our
// code and letting us make assertions... |
Java | UTF-8 | 10,324 | 1.585938 | 2 | [] | no_license | package ru.a5x5retail.frontproductmanagement.packinglistitems;
import android.annotation.SuppressLint;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.graphics.Rect;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.sup... |
Java | UTF-8 | 2,286 | 2.25 | 2 | [] | no_license | package com.farmatodo.tienda.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="cliente")
public class Cliente {
// `id_cliente` ... |
Markdown | UTF-8 | 655 | 3.78125 | 4 | [] | no_license | #### [1. 两数之和](https://leetcode-cn.com/problems/two-sum/)
给定一个整数数组 `nums` 和一个目标值 `target`,请你在该数组中找出和为目标值的那 **两个** 整数,并返回他们的数组下标。
你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。
```c++
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
unordered_map<int,int> map;
for(int i=0;i<=nums... |
Python | UTF-8 | 228 | 3.0625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from typing import List
class Solution:
def missingNumber(self, nums: List[int]) -> int:
return int((1 + len(nums)) * (len(nums) / 2) - sum(nums))
print(Solution().missingNumber([3,0,1]))
|
Java | UTF-8 | 2,855 | 2.28125 | 2 | [] | no_license | package com.ipartek.formacion.springsecurityejemplo.configuraciones;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.Authentica... |
TypeScript | UTF-8 | 416 | 2.8125 | 3 | [] | no_license | export interface Episode {
id?: number,
name: string,
air_date?: string,
episode?: string,
characters?: string[],
url?: string,
created?: string,
};
const fetchEpisodeData = async (url: string) => {
if(url) {
const result = await fetch(url);
const json = await result.json();
return { ...js... |
C++ | UTF-8 | 4,343 | 3.03125 | 3 | [] | no_license | //==========================================================
//
// Filename: P2PGMPicture.cpp
//
// Description: Laedt und speichert ein Bild im P2 Format
//
// Version: 1.0
// Created: 31.10.2015
// Compiler: g++
//
// Author: Sebastian Hoelscher, sebastian@hoelshare.de
//
//============================... |
Markdown | UTF-8 | 101,925 | 2.875 | 3 | [] | no_license | The Logical Form of Action Sentences
Davidson
1967
* _Jones did it slowly, deliberately, in the bathroom, with a knife, at midn._
* What he did was butter a piece of toast. We are roo familiar
* language of action
* the _it_ seems to refer to some entity, preswnably an action,
that is chen characterized in a... |
C++ | UTF-8 | 464 | 2.734375 | 3 | [] | no_license | #include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char* argv[])
{
char filename[] = "Balances.txt";
char buff[100];
ifstream infile(filename);
infile.open(filename);
if (infile.fail())
{
cout << "Unable to open " << filename << endl;
return 1;
... |
Java | UTF-8 | 677 | 2.921875 | 3 | [] | no_license | /**
*
*/
package ds.movement;
import java.awt.geom.Point2D;
/**
* @author f4
*
*/
public class HorizontalLine extends AntiGravityObject
{
/**
* Constructeur
* @param y
* @param weight
* @param gravityType
*/
public HorizontalLine( double y, double weight, double gravityType )
{
super( 400, y, w... |
Python | UTF-8 | 759 | 2.734375 | 3 | [] | no_license | # Scrapes result from http://result.vtu.ac.in using BeautifulSoup
from bs4 import BeautifulSoup
import requests
u="1mv15cs" # beginning part of the USN. Without serial
for i in range(1,135): # USN range for every branch
if (i<10):
pre='00'
elif (i<100):
pre='0'
else:
pre=''
no... |
Python | UTF-8 | 847 | 4.40625 | 4 | [] | no_license | """
2. Для списка реализовать обмен значений соседних элементов,
т.е. Значениями обмениваются элементы с индексами 0 и 1, 2 и 3 и т.д.
При нечетном количестве элементов последний сохранить на своем месте.
Для заполнения списка элементов необходимо использовать функцию input().
"""
my_list = []
#пусть будет 7 элементов... |
JavaScript | UTF-8 | 21,860 | 2.515625 | 3 | [
"MIT"
] | permissive | const scene = new THREE.Scene();
const renderer = new THREE.WebGLRenderer();
var allInterval = [];
const audio1 = new Audio(), audio2 = new Audio(), audio3 = new Audio();
audio1.src = 'https://static.wikia.nocookie.net/minecraft_ru_gamepedia/images/a/aa/Grass_hit1.ogg';
audio2.src = 'https://static.wikia.nocookie.net/m... |
Java | UTF-8 | 2,971 | 3.140625 | 3 | [] | no_license | package ir.parsdeveloper.commons.tags.utils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.UnhandledException;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* @author hadi tayebi
*/
public class MultipleHtmlAttribute implements Cloneable {
/... |
Markdown | UTF-8 | 2,226 | 3.0625 | 3 | [
"0BSD"
] | permissive | # About the "NetworkTime" sample
The "NetworkTime" sample extension is a server extension that can query an NTP server.
It uses the "RequestListener" interface to provide a single function symbol called "Now" that
fetches the current timestamp from the NTP server and returns it.
The NTP server URL is stored in the ext... |
Rust | UTF-8 | 2,996 | 2.8125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | // https://github.com/rvagg/ghauth/blob/master/ghauth.js
extern crate dialoguer;
extern crate directories;
extern crate failure;
extern crate mkdirp;
extern crate reqwest;
extern crate serde;
extern crate serde_json;
use self::dialoguer::{Input, PasswordInput};
use self::directories::ProjectDirs;
use self::failure::E... |
Ruby | UTF-8 | 540 | 2.6875 | 3 | [
"MIT"
] | permissive | module NewExcel
module BuiltInFunctions
module DateTime
def date(strs)
if strs.is_a?(Array)
each_list(strs) do |list|
list.map do |str|
date(str)
end
end
else
Date.parse(strs)
end
end
def time(*strs)
... |
Java | UTF-8 | 3,490 | 2.65625 | 3 | [] | no_license | package ru.ifmo.ctd.ngp.demo.paramchooser.experiments;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
* @author Arkadii Rost
*/
public class Extractor {
private static final String DIST = "dist_... |
JavaScript | UTF-8 | 668 | 4.59375 | 5 | [] | no_license | // #
// 16. 두 정수 사이의 합
// adder함수는 정수 x, y를 매개변수로 입력받는다.
// 두 수와 두 수 사이에 있는 모든 정수를 더해서 리턴하도록 함수를 완성하라.
// x와 y가 같은 경우는 둘 중 아무 수나 리턴한다.
// x, y는 음수나 0, 양수일 수 있으며 둘의 대소 관계도 정해져 있지 않다.
// 예를들어 x가 3, y가 5 이면 12 를 리턴한다.
function adder(x, y) {
res = 0;
big_number = x > y ? x : y;
small_number = x > y ? y : x;
for (i... |
SQL | UTF-8 | 1,160 | 3.203125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `minhab... |
Markdown | UTF-8 | 1,962 | 2.625 | 3 | [] | no_license | # Roadmap
| Product | Description | Recommended Start Time | Recommended Publish |
| :--- | :--- | :--- | :--- |
| Initial Website Release | Updating website for new conference information. | ~ Late April | ~ Early September |
| Registration Open | Opens registration online, through whatever means. | As set by SGs. | ... |
Java | UTF-8 | 2,786 | 2.09375 | 2 | [] | no_license | import com.sun.deploy.net.HttpRequest;
import org.jnetpcap.packet.PcapPacket;
import org.jnetpcap.packet.structure.JField;
import org.jnetpcap.protocol.application.Html;
import org.jnetpcap.protocol.application.HtmlParser;
import org.jnetpcap.protocol.network.Ip4;
import org.jnetpcap.protocol.tcpip.Http;
import ... |
Java | UTF-8 | 3,345 | 2.375 | 2 | [] | no_license | package br.com.samir.baas.repository;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.bson.BsonInvalidOperationException;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.anno... |
SQL | UTF-8 | 15,783 | 3.453125 | 3 | [] | no_license | DROP DATABASE IF EXISTS DBMS;
CREATE DATABASE DBMS;
USE DBMS;
DROP TABLE IF EXISTS Manuscript;
DROP TABLE IF EXISTS Author;
DROP TABLE IF EXISTS Issue;
DROP TABLE IF EXISTS AcceptedManuscript;
DROP TABLE IF EXISTS Feedback;
DROP TABLE IF EXISTS BeingReviewed;
DROP TABLE IF EXISTS ReviewerInterest;
DROP TABLE IF EXISTS ... |
JavaScript | UTF-8 | 9,963 | 2.84375 | 3 | [
"MIT"
] | permissive | import Mario from '../prefabs/mario'
import Clouds from '../prefabs/clouds'
import Hills from '../prefabs/hills'
import Bushes from '../prefabs/bushes'
import Ground from '../prefabs/ground'
import Dialog from '../prefabs/dialog'
import Score from '../prefabs/score'
import PowerUpFactory from '../prefabs/powerups/powe... |
JavaScript | UTF-8 | 3,363 | 4.125 | 4 | [] | no_license | /*
Задание "Шифр цезаря":
https://uk.wikipedia.org/wiki/%D0%A8%D0%B8%D1%84%D1%80_%D0%A6%D0%B5%D0%B7%D0%B0%D1%80%D1%8F
Написать функцию, которая будет принимать в себя слово и количество
симовлов на которые нужно сделать сдвиг внутри.
Написать функцию дешефратор которая вернет слово в изначальный в... |
Python | UTF-8 | 904 | 2.671875 | 3 | [] | no_license | import os
import json
dir = "annotations"
files = sorted(os.listdir(dir))
words = []
for file in files:
words_cur = []
with open(dir + "/" + file) as f:
json_content = json.load(f)
for box in json_content["form"]:
words_cur.extend(box["text"].split())
words.append(words_cur... |
Python | UTF-8 | 336 | 2.765625 | 3 | [] | no_license | import unittest
from datetime import datetime, timedelta
from project import get_last_value_date
today = datetime.now()
yesterday = (today - timedelta(1)).strftime('%Y-%m-%d')
class LastValueDateTestCase(unittest.TestCase):
def test_value(self):
result = get_last_value_date()
self.assertEqual(yes... |
C++ | UTF-8 | 1,867 | 3.140625 | 3 | [] | no_license | /*
* =====================================================================================
* Filename : TheGreatGame.cpp
* Description : So Funny
* Version : 0.1
* Created : 04/29/14 07:58
* Author : Liu Xue Yang (LXY), liuxueyang457@163.com
* Motto : How about today?
* =... |
Swift | UTF-8 | 1,235 | 2.71875 | 3 | [] | no_license | //
// ViewController_Player.swift
// LTM-interface
//
// Created by Louis Lenief on 09/05/2018.
// Copyright © 2018 Louis Lenief. All rights reserved.
//
import Foundation
import AVKit
extension ViewController {
func playSelectedVideo() {
if let video = getSelectedVideo() {
player?.re... |
JavaScript | UTF-8 | 1,280 | 3.484375 | 3 | [] | no_license | function KilometerToMeter(distance)
{
var convert=distance*1000;
return convert;
}
var result=KilometerToMeter(50);
console.log(result);
//budgetCalculator//
function budgetCalculator(watch,phone,laptop)
{
var watchQuantity=watch*50;
var phoneQuantity=phone*100;
var laptopQuantity=laptop*500;
... |
Markdown | UTF-8 | 476 | 2.5625 | 3 | [] | no_license | # Directory Contents
List of directory contents using PHP
Easy to list of localhost directory project folder especially document of sites or www or htdocs.
# Setup
Put folder in your directory
Example:
```php
/var/www
/Library/WebServer/Documents
/Xampp/htdocs
```
## Set path
Please change path in class.index.php i... |
C# | UTF-8 | 928 | 2.625 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class mono : MonoBehaviour {
public float[] fill = new float[1024];
private bool[] doneBox = { false };
protected int length;
public mono[] monoInputs = new mono[0];
public Knob[] knobInputs = new Knob[0];
public f... |
Ruby | UTF-8 | 1,240 | 2.640625 | 3 | [] | no_license | # frozen_string_literal: true
# 1/5/2018: specs complete, help complete.
require 'shellwords'
class Pomodoro::Commands::Commit < Pomodoro::Commands::Command
self.help = <<-EOF.gsub(/^\s*/, '')
now <magenta>commit</magenta> <bright_black># #{self.description}</bright_black>
now <magenta>commit</magenta> -a|-... |
Java | UTF-8 | 8,176 | 2.140625 | 2 | [] | no_license | package com.eshokin.socs.screens.main;
import com.arellomobile.mvp.InjectViewState;
import com.eshokin.socs.R;
import com.eshokin.socs.api.ApiService;
import com.eshokin.socs.api.enumerations.Interval;
import com.eshokin.socs.api.schemas.Point;
import com.eshokin.socs.api.schemas.requests.GetStatisticsMethodRequest;
i... |
Markdown | UTF-8 | 6,209 | 2.859375 | 3 | [] | no_license | # Sweater Weather [In Express]
#### [Refactor in progress]
###### Check me out here
https://polar-island-07844.herokuapp.com/
This is an API built with the Express Framework! A user will be able to pass an API key to retreive weather details from a desired city, using the Darksky API using the Google Geocoding Api. U... |
TypeScript | UTF-8 | 2,613 | 2.8125 | 3 | [] | no_license | import { RequestHandler } from 'express';
import { Training, validateTraining } from '../models/training';
import { notFoundTrainingResponse } from '../utils/trainings';
import { badRequest } from '../utils/common';
const TRAININGS: Training[] = [];
export const createTraining: RequestHandler = (req, res, next) => {
... |
Shell | UTF-8 | 2,748 | 3.265625 | 3 | [] | no_license | #!/bin/bash -l
#### grep read sequences from fastq lanes, compare them between mates, then truncate both accordingly, so they match.
#### checking specifically, og176_2, og179_2, and og275_2
########
#SBATCH -D /home/sbhadral/Projects/Rice_project/fixed_fastqs
#SBATCH -J fastq_check
#SBATCH -p serial
#SBATCH -o /home... |
PHP | UTF-8 | 680 | 2.671875 | 3 | [] | no_license | <?php
namespace PawsPlus\Doorknob;
class Autoloader
{
private static $namespace = __NAMESPACE__;
public static function register()
{
spl_autoload_register( array( __CLASS__, 'autoload' ) );
}
public static function autoload( $class )
{
$class = ltrim( $class, '\\' );
if ( 0 !== strpos( $class, self::$n... |
Markdown | UTF-8 | 1,638 | 2.828125 | 3 | [] | no_license | ---
title: 'Quick Tip: Remove Paypal logo from Catalog pages in Magento'
author: Ash Smith
layout: post
share: true
permalink: /2011/07/quick-tip-remove-paypal-logo-from-catalog-pages-in-magento/
categories:
- magento1
---
When setting your store up one of the first things you’ll come across is on the catalog p... |
Python | UTF-8 | 1,722 | 3.046875 | 3 | [] | no_license | class Human(object):
# def __init__(self,h=0,w=0):
# self.height=h
# self.weight=w
# def BMI(self):
# return self.weight / ((self.height/100)**2)
# def __add__(self,other):
# return self.height + other.height
# def __iadd__(self,other):
# self.height += other.heig... |
Markdown | UTF-8 | 1,911 | 3.578125 | 4 | [
"MIT"
] | permissive | Linear Regression: Check Your Understanding
===========================================
Before going on to the lab, here are some additional practice questions that you can use to check your understanding of linear regression.
### Question 1 of 4
Which of the following statements about linear regression are **incorr... |
C | UTF-8 | 374 | 3.5 | 4 | [] | no_license | #include<stdio.h>
int main()
{
int numero, temp, dig1, dig2, dig3;
printf("Numero de 3 digitos: ");
scanf("%d",&numero);
temp = numero;
dig1 = temp % 10;
temp = temp / 10;
dig2 = temp % 10;
temp = temp / 10;
dig3 = temp % 10;
printf("%d = %d x 1 + %d x 10 + %d ... |
Markdown | UTF-8 | 643 | 2.8125 | 3 | [] | no_license | # useMemo
1. useMemo invokes a function to calculate a memoized value. In computer science in general, memoization is a technique that’s used to improve performance. In a memoized function, the result of a function call is saved and cached. Then, when the function is called again with the same inputs, the cached value... |
C++ | UTF-8 | 962 | 3.21875 | 3 | [] | no_license | #include "SimpleFileFactory.h"
#include "SimpleFileSystem.h"
// studio 18 - simple file factory definitions
AbstractFile* SimpleFileFactory::createFile(string fileName)
{
bool isSuffix = false;//bool detrmining if the file that is to be created has a suffix (ex: .txt)
string suffix = "";//string that sto... |
C++ | UTF-8 | 621 | 2.515625 | 3 | [] | no_license | class Solution {
public:
vector<int> executeInstructions(int n, vector<int>& startPos, string s) {
int m = s.size();
vector<int> ret(m);
for(auto i = 0; i < m; ++i) {
int y = startPos[0], x = startPos[1];
for(auto j = i; j < m; ++j) {
if(s[j] == 'R') +... |
Java | UTF-8 | 523 | 1.773438 | 2 | [] | no_license | package crawler.documents;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
@Document
@Data
public class InstagramFeed {
@Id
private String id;
private String code;
private int commentCount;
pr... |
C# | UTF-8 | 2,914 | 3.203125 | 3 | [] | no_license | using System;
using System.Timers;
namespace YoutubeExplodeConsole
{
class Progress : IProgress<double>, IDisposable
{
private readonly string title;
private readonly string filePath;
private double percent;
private readonly long size;
private double bytesCount;
... |
Java | UTF-8 | 624 | 2 | 2 | [] | no_license | package com.spring.transformer.service.impl;
import org.springframework.stereotype.Service;
import com.spring.transformer.dto.InternalUserSearchDTO;
import com.spring.transformer.service.CustomUserService;
@Service("internalCustomUserService")
public class InternalCustomUserServiceImpl implements CustomUserService<I... |
TypeScript | UTF-8 | 8,123 | 2.671875 | 3 | [] | no_license | import { Clock } from '../clock.js';
import { DeepReadonlyObject } from '../deep_readonly.js';
import { integrateWithConstantAcceleration } from '../math.js';
import { Battery, PoweredSystem, PowerSource, Ship, System } from '../model/ship.js';
import { ShipComputer } from '../ship_computer.js';
import { SnapshotManage... |
Python | UTF-8 | 1,148 | 2.796875 | 3 | [] | no_license | import re
import cv2
import os
#import crop function to this file
#from cropfunction.py import crop
def crop(path_img, path_save, path_detection):
# parse txt file
myfile=open(path_detection,'r')
lines=myfile.readlines()
pattern= "Cat"
for line in lines:
if re.search(pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.