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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 6,577 | 2.25 | 2 | [] | no_license | package com.ganesh.mahindra.model;
import java.util.List;
import javax.persistence.Id;
public class BreakdownProblemsList {
@Id
private int id;
List<BreakdownProblems> list1;
List<BreakdownProblems> list2;
List<BreakdownProblems> list3;
List<BreakdownProblems> list4;
List<BreakdownProblems> list5;
... |
Markdown | UTF-8 | 8,055 | 3.03125 | 3 | [] | no_license |
```python
#Analysis:
#Observed Trend #1: Rural rides, unsurprisingly, have less rides per city data available, and the greatest range of average fare cost.
#Observed Trend #2: While about 78% of drivers are urban drivers, about 68% of rides were urban rides, meaning some urban drivers could be driving in suburban ar... |
C++ | UTF-8 | 1,636 | 2.8125 | 3 | [] | no_license | #pragma once
class Spielfeld;
#include <memory>
#include <vector>
#include "..\Interfaces/Model.h"
#include "Spieler.h"
#include "Feld.h"
#include "Spielfigur.h"
#include "Sperrstein.h"
class Spielfeld : public Model {
private:
int width;
int height;
std::shared_ptr<Feld> zielFeld;
std::vector<std::... |
Python | UTF-8 | 1,701 | 2.65625 | 3 | [] | no_license | # import libraries
import requests
from bs4 import BeautifulSoup
from win10toast import ToastNotifier
import schedule
import time
import json
toaster = ToastNotifier()
def notify_mobile(name, price, url, ifttt_key, ifttt_event):
iftttUrl = 'https://maker.ifttt.com/trigger/'+ifttt_event+'/with/key/'+ifttt_key
... |
C++ | UTF-8 | 768 | 3.03125 | 3 | [] | no_license | #include "plane_axis_calculator.h"
#include <fstream>
using namespace std;
int main()
{
ifstream inFile;
vector<Vector3d> TestPoints;
inFile.open("TestPoints.txt");
if(!inFile)
{
cerr << "Unable to open file";
exit(1);
}
double PointCoord;
Vector3d Point(0.0, 0.0, 0.0);
in... |
Markdown | UTF-8 | 545 | 2.671875 | 3 | [] | no_license | # Sentiment Analysis
This is a sentiment analysis program which can find sentiment of the sentence.
**Usage**
.\program.exe --pos "path/to/positive-sentiment.txt" --neg "path/to/negative-sentiment.txt"
**Data**
This program require you to have 2 file. One of the file need to contain a positive sentiment and
anothe... |
Ruby | UTF-8 | 409 | 3.453125 | 3 | [] | no_license | class FakeArray
def initialize
@info = ["puppies", "kittens", "baby sloths", "puppies"]
end
def each
@info.each do |element|
yield element if block_given?
end
end
def first
@info[0]
end
def compact
new_array = []
@info.each do |element|
new_array << element unless n... |
Java | UTF-8 | 1,066 | 2.671875 | 3 | [] | no_license | package com.dyc.model;/**
* @Auther: tony_jaa
* @Date: 2018/7/23 19:58
* @Description:
*/
/**
* @Auther: tony_jaa
* @Date: 2018/7/23 19:58
* @Description:
*/
public class User {
private String name;
private String passwaord;
private Integer age;
public User(String name, String passwaord, Inte... |
SQL | UTF-8 | 1,090 | 3.6875 | 4 | [] | no_license | DROP DATABASE IF EXISTS gut_app;
CREATE DATABASE gut_app;
USE gut_app;
/*------------- Haupt- Tabellen ---------------*/
CREATE TABLE tbl_abschlüsse(
pk_abschluss_id MEDIUMINT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(pk_abschluss_id)
)ENGINE=InnoDB;
CREATE TABLE tbl_bildungsgänge(
pk_bildungsgang_id MEDIUMIN... |
Java | UTF-8 | 1,611 | 2.453125 | 2 | [] | no_license | package com.mojaz.assignment.util;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.content.Context;
import com.mojaz.assignment.R;
import com.mojaz.assignment.photo.data.source.PhotosDataSource;
import static com.mojaz.assignment.Config.SERVER_ERROR;
public clas... |
Java | UTF-8 | 400 | 1.585938 | 2 | [] | no_license | package com.aspire.mirror.alert.server.vo.leakScan;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
public class SecurityLeakScanReportVo {
private String id;
private String scanId;
private String ip;
private String reportPath;
private Integer highLeaks;
private I... |
Python | UTF-8 | 3,985 | 2.671875 | 3 | [] | no_license | import re
from django.core.cache import cache
from django.template.defaultfilters import slugify
from .exceptions import WikiException
from .fix_unicode import fix_unicode
from .helpers import get_wiki_objects
from .constants import WIKIBRACKETS
def make_cache_key(token):
return "wiki::%s" % slugify(token)
cla... |
Python | UTF-8 | 252 | 4.09375 | 4 | [] | no_license | m = input("Enter values upto: ")
n = 1
even = []
odd = []
while n<=m:
if n%2==0:
even.append(n)
else:
odd.append(n)
n = n+1
print ('Even Numbers are {0}'.format(even, odd))
print ('Odd Numbers are {1}'.format(even, odd))
|
Java | UTF-8 | 1,670 | 2.484375 | 2 | [] | no_license | package com.example.a2019cap_ver2;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class MyCafeMenuAdapter extends RecyclerView.Adapter<RecyclerView.ViewH... |
C# | UTF-8 | 8,503 | 2.640625 | 3 | [] | no_license | using System.Text;
using System.Threading.Tasks;
using TreeStruct;
namespace WPFDBApp.Services.TreeServices
{
/// <summary>
/// A class that helps create sql script
/// </summary>
public class SQLCreateHelper
{
#region Create Sql Script Async
internal static async Task<StringBuild... |
TypeScript | UTF-8 | 1,232 | 2.578125 | 3 | [
"MIT"
] | permissive |
import { CollectionCache, CollectionKey } from "../../../common";
import { Ancillaries } from "./Ancillaries";
import { AgentSubtypes } from "./AgentSubtypes";
export namespace AncillariesIncludedAgentSubtypes {
export const KEY = new CollectionKey("ancillaries_included_agent_subtypes");
export class Entry {
... |
C++ | UTF-8 | 2,955 | 2.875 | 3 | [] | no_license | // Nombre del alumno: Irene Martin Berlanga
// Usuario del Juez: EDA35
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#define INF 1000000000
//==========================> EJERCICIO 28 (SIN ESTIMACION)<==========================//
bool esSolucion(int columnas, int indiceProducto){
... |
Python | UTF-8 | 1,192 | 4.1875 | 4 | [] | no_license | """
The **left shift** operation is similar to **multiplication by powers of two**
, thus, the process is _repetitive_ and can be done _recursively_.
Sample calculation using the left shift operator (`<<`):
10 << 3 = 10 * 2^3 = 10 * 8 = 80
-32 << 2 = -32 * 2^2 = -32 * 4 = -128
5 << 2 = 5 * 2^2 = 5 * 4 ... |
Go | UTF-8 | 1,576 | 3.28125 | 3 | [] | no_license | package pngio
import (
"fmt"
"image"
"testing"
)
func TestImagePack_Write(t *testing.T) {
type fields struct {
Image *image.RGBA
offset int
}
tests := []struct {
name string
i *ImagePack
b []byte
wantN int
wantErr bool
}{
{
name: "hello world",
i: NewPack(2),
... |
TypeScript | UTF-8 | 623 | 2.75 | 3 | [] | no_license | namespace Aufgabe10 {
export class Tree {
x: number;
y: number;
draw(): void {
crc2.beginPath();
crc2.moveTo(this.x, this.y);
crc2.lineTo(this.x - 100, this.y);
crc2.lineTo(this.x - 50, this.y - 120);
crc2.lineTo(this.x, ... |
C++ | UTF-8 | 8,031 | 3.96875 | 4 | [] | no_license | //generic programing
//Standard Template Library(STL) 主要有两种构建:即容器(container)和泛型算法(generic algorithm)
#include<vector>
#include<list>
#include<map>
#include<set>
#include<iostream>
#include<string>
#include<algorithm>//使用泛型算法必须 加入头文件<algorithm>
#include<functional>//使用函数对象必须加入头文件
#include<iterator>//使用插入适配器(iterator ada... |
Java | UTF-8 | 404 | 2.390625 | 2 | [] | no_license | package composite;
/**
* Created by abedormancy@gmail.com on 2018/3/15.
* 图片文件 - 充当 Leaf 叶子构件
*/
public class ImageFile extends AbstractFile {
private final String name;
public ImageFile(String name) {
this.name = name;
}
@Override
public void killVirus() {
Sys... |
Python | UTF-8 | 831 | 2.890625 | 3 | [] | no_license | import sys
sys.setrecursionlimit(500005)
#import pypyjit # this is for solving slow issue for pypy when using recursion but python will not need this (test will fail but submit works)
#pypyjit.set_param('max_unroll_recursion=-1')
import math
A, B = list(map(int, input().split()))
a2 = 4*(B**2)
b2 = B**2
def ch(x):
... |
C# | UTF-8 | 3,869 | 2.515625 | 3 | [] | no_license | using Microsoft.Extensions.Configuration;
using Pedidos.Core;
using Pedidos.Repository.Comun;
using System;
using System.Collections.Generic;
using System.Text;
namespace Pedidos.Repository.Productos
{
public class ProductosRepository : BaseRepository, IProductosRepository
{
public ProductosRepository... |
Python | UTF-8 | 198 | 3.5 | 4 | [] | no_license | __author__ = 'Hanzhiyun'
a = -6
b = a * a - a - 1
c = a *b
if (a < 0):
print("a<0")
print(c)
else:
print("a is not less than 0")
print(c - a)
print("we are done with the program")
|
Markdown | UTF-8 | 5,828 | 2.78125 | 3 | [] | no_license | ## About
This is a template project demonstrating how to deploy Elrond nodes using our [elrond-cookbook](https://github.com/mr-staker/elrond-cookbook). It uses `cinc-solo`, so no Chef server is required (it's slow and expensive anyway). It also demonstrates the usage of thin wrapper cookbooks to fulfil a role (i.e rol... |
Python | UTF-8 | 2,321 | 2.765625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
import argparse
import glob
import sys
import logging
from os.path import basename
from time import strptime, mktime
from vehicle_tracker import VehicleTracker
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger('vehicle_tracker')
def video_start_time(video_source):
try:
... |
TypeScript | UTF-8 | 1,013 | 2.859375 | 3 | [] | no_license | import { DraftedTeam } from './DraftedTeam';
import { IDraftedTeamData } from '../DraftedTeams/IDraftedTeamData';
export namespace DraftedTeamData {
export async function getDraftedTeamData(): Promise<DraftedTeam[]> {
return new Promise<DraftedTeam[]>((resolve, reject) => {
const draftedTeamUrl = './Fantas... |
TypeScript | UTF-8 | 464 | 2.53125 | 3 | [] | no_license | import { BASE_IMAGE_PATH, imagePathFor } from './images'
describe('imagePathFor', () => {
const fakePath = 'abcd1234'
test('returns path for a specific width', () => {
expect(imagePathFor(fakePath, 185)).toEqual(
`${BASE_IMAGE_PATH}/w185/${fakePath}`
)
})
test('uses the original image if no wid... |
Python | UTF-8 | 3,261 | 2.75 | 3 | [] | no_license | #coding:utf8
from db_util import *
import json
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from collections import Counter
from collections import defaultdict
import os
def gen_stats(filepath):
## generate gender with degree
lines = []
for line in open(filepath):
line = line.strip()
... |
C | UTF-8 | 1,856 | 2.78125 | 3 | [] | no_license | #include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <time.h>
#include <stdlib.h>
#define N 10000
static char input[40960];
static int inputsize;
static int inputpos = 0;
static int getsint() {
int val = 0, neg = 0;
if (input[inputpos]=='-') inputpos++, neg = 1;
for(;;) {
char c = i... |
Python | UTF-8 | 125 | 3.046875 | 3 | [] | no_license | from turtle import*
shape ("turtle")
speed(0)
a = 30
for i in range (80):
forward(a )
a+=10
left(90)
mainloop()
|
Java | UTF-8 | 2,807 | 2.59375 | 3 | [] | no_license | package com.huaqin.notes;
import java.util.HashMap;
import android.content.AsyncQueryHandler;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
public class TodoAsyncQuery extends AsyncQueryHandler{
private static final String TAG = "Tod... |
C | UTF-8 | 155 | 2.53125 | 3 | [] | no_license | #include<stdio.h>
int main(){
int s, m = 0;
scanf("%d",&s);
m = s/60;
s = s%60;
printf("%d %d",m, s);
}
|
C# | UTF-8 | 1,695 | 2.609375 | 3 | [] | no_license | private const int PBKDF2IterCount = 1000; // default for Rfc2898DeriveBytes
private const int PBKDF2SubkeyLength = 256 / 8; // 256 bits
private const int SaltSize = 128 / 8; // 128 bits
public static string HashPassword(string password)
{
byte[] salt;
byte[] subkey;
using (... |
Shell | UTF-8 | 292 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env bash
readonly FIFO="$MY_RUN/presel"
[[ -p "$FIFO" ]] || mkfifo "$FIFO"
while read line; do
if [[ line =~ '^.*dir.*$' ]]; then
echo 'p' >> "$FIFO"
elif [[ line =~ '^.*cancel.*$' ]]; then
echo 'c' >> "$FIFO"
fi
done < <(bspc subscribe node_presel)
|
JavaScript | UTF-8 | 952 | 2.71875 | 3 | [] | no_license | import { ADD_FAVORITE,REMOVE_FAVORITE,TOGGLE_FAVORITE } from "../actions/favoriteActions"
import { ADD_MOVIE } from "../actions/movieActions"
const initialState = {
favorites: [],
displayFavorites: false
}
const reducer= (state = initialState, action) =>{
switch(action.type){
case TOGGLE_FAVORITE... |
Java | UTF-8 | 4,763 | 2.015625 | 2 | [] | no_license | package com.example.djd.fingertest;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import and... |
Python | UTF-8 | 430 | 3.078125 | 3 | [] | no_license | n,l=map(int,input().split())
a=list(map(int,input().split()))
flag=0
for i in range(n-1):
if a[i]+a[i+1]>=l:
flag=1
break
if flag==0:
print("Impossible")
else:
print("Possible")
if i>0:
for j in range(1,i+1):
print(j)
if i+2<n:
tmp=[]
for j in ra... |
C# | UTF-8 | 796 | 2.859375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Restaurant.Converter
{
public class convDatetime : IValueConverter
{
public object Convert(object value, Type targetType,... |
Java | UTF-8 | 10,887 | 1.976563 | 2 | [] | no_license | package com.comino.mavmap.map.map3D.impl.octomap;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.comino.mavmap.map.map3D.impl.octomap.esdf.D2.DynamicESDF2D;
import com.comino.mavmap.map.map3D.impl.octomap.rule.MAVOccupancyUpdateRule;
import georegressio... |
Python | UTF-8 | 969 | 2.84375 | 3 | [] | no_license | import unittest
import l399
class testSolution( unittest.TestCase ):
def setUp( self ):
self.s = l399.Solution()
def test_solution(self):
#import pdb;pdb.set_trace()
got = self.s.findStrobogrammatic(1)
self.assertItemsEqual(got, ['0', '1', '8'])
print got
... |
JavaScript | UTF-8 | 471 | 2.765625 | 3 | [] | no_license | // import the server
var app = require("../server");
// import an assertion
// assert => say or do something
// test => test its validity
var supertest = require("supertest");
// write the test
describe(`1. GET requests from Todo API`, function () {
// invoke our first test
it("1.1 should return HTTP status of 20... |
TypeScript | UTF-8 | 700 | 3.140625 | 3 | [] | no_license | /// <reference path="../../../../references.ts" />
/** @enum
* @name CommandType
* @desc Specifies what commands can be sent through the system
* - i.e. communication that _some_ action has occured
*/
export enum CommandType {
Empty,
TaskEdit,
TaskSave,
TaskCompleteToggle,
TaskGetAllStart,
TaskGetAllCo... |
Java | UTF-8 | 10,155 | 2.328125 | 2 | [] | no_license | package org.apache.flink;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.tuple.Tuple3;
import org.apache.flink.core.fs.FileSystem;
import org.apache.flink.entities.Comment;
import org.apache.flink.entities.CommentSchema;
import ... |
Java | UTF-8 | 1,898 | 2.59375 | 3 | [] | no_license | package playerTest.Entity;
import junit.framework.TestCase;
import player.models.Letter;
import player.models.RandomLetter;
public class testLetter extends TestCase {
public void testLetter(){
Letter random = new Letter("");
random.setS("a");
assertEquals(random.getS(), "a");
Letter e = new Letter("e");
L... |
JavaScript | UTF-8 | 557 | 2.640625 | 3 | [] | no_license | module.exports = {
post : function(server, list){
server.post('/postAnimal', function(req,res) {
const animalKind = req.body.inputAnimalKind;
const animalsize = req.body.inputAnimalSize;
const animalAge = req.body.inputAnimalDays;
if(animalAge > 0 && animalAge... |
Python | UTF-8 | 1,185 | 3.859375 | 4 | [] | no_license | """
Program to encrypt and decrypt a 'Caesar Code' for a given string.
"""
def main():
s = input("\nEnter the string you'd like to encrypt: ")
while True:
n = input("How many characters would you like to shift? (Enter a number): ")
try:
n = int(n)
break
except V... |
C# | UTF-8 | 1,159 | 2.65625 | 3 | [] | no_license | // Copyright(C) 2020 Shawn Hodgson All Rights Reserved
using UnityEngine;
[CreateAssetMenu(fileName = "GameState", menuName = "ScriptableObjects/GameState", order = 1)]
public class GameState : ScriptableObject
{
// TODO: Naming conventions on proporties.
public string State { get; private set; }
public... |
TypeScript | UTF-8 | 1,114 | 2.59375 | 3 | [] | no_license | import * as HttpStatus from 'http-status-codes';
import logger from '../logger';
import { ResponseErrorCode } from '../common/responseCodes.enum';
import {ErrorResponse, SuccessResponse} from '../common/response.model';
import { AuthManager } from './auth.manager';
export const authenticate = async (req, res) => {
... |
Java | UTF-8 | 1,390 | 1.859375 | 2 | [] | no_license | package com.playbasis.pbcore.rest.service;
import android.support.annotation.NonNull;
import com.playbasis.pbcore.rest.form.ParamsMap;
import com.playbasis.pbcore.rest.result.organize.RemovePlayerFromOrganizeApiResult;
import com.playbasis.pbcore.rest.result.organize.StoreOrganizeApiResult;
import com.playbasis.pbcor... |
C++ | UTF-8 | 2,280 | 3.21875 | 3 | [] | no_license | //============================================================================
// Name : StudentReportCardCpp.cpp
// Author : RonakSuchak
// Version :
// Copyright : setvbuf(stdout, NULL, _IONBF, 0);
// Description : Hello World in C++, Ansi-style
//====================================================... |
JavaScript | UTF-8 | 448 | 2.65625 | 3 | [] | no_license | const Engineer = require('../lib/Engineer');
describe("Employee", () => {
describe("Initialization", () => {
it("should create a new Employee class with given information", () => {
let eng = new Engineer(1, "Bob", "Bob@bob.com", "Bob");
expect(eng.Id).toBe(1);
expect(en... |
C++ | UTF-8 | 1,666 | 3.46875 | 3 | [] | no_license | /*
Find the max continous series of ones. Zeros can be flipped K times.
https://www.interviewbit.com/problems/max-continuous-series-of-1s/
TC: O(n)
*/
/*
Range[j:i] maintains the longest sequence of 1s. If the number of zeros in that
range is more than flips, we try shifting the starting index, ... |
JavaScript | UTF-8 | 696 | 3.78125 | 4 | [] | no_license | Array.prototype.bubbleSort = function() {
var sorted = false;
while(!sorted) {
sorted = true;
for(var i = 0; i < (this.length - 1); i++) {
if(this[i] > this[i + 1]){
var first = this[i];
var second = this[i + 1];
this[i] = second;
this[i + 1] = first;
sorted = f... |
C# | UTF-8 | 2,100 | 2.90625 | 3 | [] | no_license | using System.Collections;
namespace AustinsExamples.GameState {
// don't want to type out full namespace every time
public abstract class UIManager : AustinsExamples.UI.UIManager { }
public abstract class GameStateUIManager : UIManager {
static GameStateUIManager _main;
// base input da... |
Ruby | UTF-8 | 4,346 | 3.359375 | 3 | [] | no_license | require_relative 'spec_helper'
require_relative '../player'
require_relative '../tilebag'
describe Scrabble::Player do
describe "#initialize" do
jane = Scrabble::Player.new("Jane")
it "should create an instance of Player" do
jane.must_be_instance_of(Scrabble::Player)
end
... |
Java | ISO-8859-1 | 17,722 | 1.867188 | 2 | [] | no_license | /*COMENTARIO DE NUEVA BRANCH*/
package Views;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import concentrarbdinfys.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.JButton... |
Python | UTF-8 | 796 | 3.21875 | 3 | [] | no_license | def compute(opcode, in1, in2):
if opcode == 1:
return in1 + in2
if opcode == 2:
return in1 * in2
program = []
with open('input.txt', 'r') as f:
line = f.readline()
program = line.split(',')
program[-1] = program[-1].strip() #remove \n
program = [int(x) for x in program] #conver to ints
original_state = pr... |
C | UTF-8 | 1,286 | 3.609375 | 4 | [] | no_license | /*Задача 19:
Напишете стандартната програма за Linux cat , която приема като
аргументи от командния ред имена на файлове и изкарва съдържанието
им на стандартния изход. Ако на програмата не са подадени никакви
аргументи, то тя да изкара съдържанието подадено от стандартния вход
на стандартния изход.*/
#include ... |
Python | UTF-8 | 490 | 3.3125 | 3 | [] | no_license | #https://leetcode.com/problems/backspace-string-compare/
class Solution(object):
def backspaceCompare(self, S, T):
"""
:type S: str
:type T: str
:rtype: bool
"""
def compress(A):
stack = list()
for c in A:
if c != "#":
... |
C | UTF-8 | 6,080 | 2.796875 | 3 | [] | no_license | const unsigned char font[96][8] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //
{0xdf, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // !
{0x07, 0x07, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00}, // "
{0x24, 0x24, 0xff, 0x24, 0x24, 0xff, 0x24, 0x24}, // #
{0xdf, 0xdf, 0xdb, 0xff, 0... |
Markdown | UTF-8 | 6,931 | 2.953125 | 3 | [] | no_license | * * * * *
**Council Bill Number: [](#h0)[](#h2)112550**
**Ordinance Number: 119360**
* * * * *
AN ORDINANCE relating to the Seattle City Employees' Retirement System; changing the payment schedule of the annual bonus dividend for current retirees; and amending Chapter 4.36 of the Seattle Municipal Cod... |
Python | UTF-8 | 1,222 | 2.625 | 3 | [] | no_license | """
This file exists for pre-release version tracking. Please do not edit anything in this file unless
you are contributing to the development of InSPy Kit (or this particular sub-package)!
"""
# What stage of pre-release is this?
pr_type = 'pre-alpha'
# What build version of the pre-release is it?
pr_version = '0.... |
Markdown | UTF-8 | 1,012 | 2.5625 | 3 | [] | no_license | # Article R814-18
Les élections sont organisées par le conseil d'administration de la caisse de garantie qui détermine les modalités qui leur
sont applicables selon des règles soumises à l'approbation du garde des sceaux, ministre de la justice. Le bureau chargé du
dépouillement des votes comprend le président, le vic... |
Java | UTF-8 | 433 | 1.867188 | 2 | [
"MIT"
] | permissive | package com.boluozhai.snowflake.xgit.http.client.toolkit;
import com.boluozhai.snowflake.context.SnowflakeContext;
import com.boluozhai.snowflake.xgit.http.client.impl.toolkit.ToolkitImplementation;
public interface GitClientToolkit {
class Factory {
public static GitClientToolkit newInstance(SnowflakeContext co... |
Java | UTF-8 | 758 | 1.90625 | 2 | [] | no_license | package domain.service;
public class ServiceProvider {
private static BlogPostService blogPostService = new BlogPostService();
private static UserService userService = new UserService();
private static ValidateService validateService = new ValidateService();
private static EmailService emailService = n... |
JavaScript | UTF-8 | 1,135 | 3.328125 | 3 | [] | no_license | class Weapon{
/**
* Caractéristiques de l'arme.
* @param {Number} id - id de l'arme
* @param {string} name - nom de l'arme
* @param {Number} force - Puissance de l'arme
*/
constructor(id, name, force){
this.id = id;
this.position = false;
this.x = Number;
... |
JavaScript | UTF-8 | 2,013 | 2.765625 | 3 | [] | no_license | // const marvelUrl = 'http://gateway.marvel.com/v1/public/characters'
// const publicKey = `apikey=${process.env.REACT_APP_PUBLIC_API_KEY}`;
// const privateKey = `apikey=${process.env.REACT_APP_PRIVATE_API_KEY}`;
// const timestamp = new Date().getTime();
// const hash = sha256(timestamp + privateKey + publicKey);
// ... |
PHP | UTF-8 | 1,261 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: usersio
* Date: 15/03/17
* Time: 09:54
*/
namespace BDD\Table;
class Link
{
private $_id;
private $_startingHarbor;
private $_arrivalHarbor;
private $_sector;
public function __construct($id)
{
$this->_id = $id;
}
/**
* @par... |
C# | UTF-8 | 1,666 | 2.53125 | 3 | [] | no_license | using Codebreak.Framework.Database;
using Codebreak.Service.World.Database.Structure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Codebreak.Service.World.Database.Repository
{
/// <summary>
///
/// </summary>
public sea... |
Python | UTF-8 | 511 | 3.078125 | 3 | [
"MIT"
] | permissive | #coding=utf8
__author__ = 'WangHaizhen'
from w_1_1 import *
def my_bin(num):
num = int(num)
L = []
if num == 0:
return('0')
else:
while(num != 0):
L.append(str(num%2))
num=num//2
return(''.join(L[::-1]))
while True:
s=input('Please enter string:')... |
Java | UTF-8 | 1,075 | 2.75 | 3 | [] | no_license |
/**
* Write a description of class Aplicacion here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Aplicacion extends Producto
{
private Categoria categoria;
private double pesoEnMB;
private static final int DESCARGAS_PARA_SER_POPULAR = 2;
private static final doub... |
Python | UTF-8 | 1,927 | 3.296875 | 3 | [] | no_license | import pandas as pd
df = pd.read_csv("stock_data.csv")
print(df)
#Removes header
print("====")
df = pd.read_csv("stock_data.csv", skiprows=1)
print(df)
#Removes header
print("XXXX")
df = pd.read_csv("stock_data.csv", header=1)
print(df)
#New column headers and also removes index
df = pd.read_csv("stock_data.csv", h... |
Swift | UTF-8 | 5,438 | 2.734375 | 3 | [] | no_license | //
// PokemonDetailViewController.swift
// Pokesearch
//
// Created by Nuno Silva on 31/12/2020.
//
import UIKit
class PokemonDetailViewController: UIViewController {
private let httpClient = HTTPClient()
private var tableView: UITableView = {
let table = UITableView(frame: .zero, style: .grouped... |
Java | UTF-8 | 2,899 | 2.5 | 2 | [] | no_license | package com.example.seekbarwidget;
import android.media.AudioManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.SeekBar.OnSeekBa... |
C++ | UTF-8 | 2,309 | 2.90625 | 3 | [] | no_license | //------------------------------------------------------------------------------
//
// Contributors:
// 1) Tommy Hinks
//
//------------------------------------------------------------------------------
#ifndef LAS_VARIABLE_LENGTH_RECORD_HPP_INCLUDED
#define LAS_VARIABLE_LENGTH_RECORD_HPP_INCLUDED
... |
Java | UTF-8 | 161 | 1.507813 | 2 | [
"BSD-3-Clause"
] | permissive | @Test public void override() throws Exception {
assertThat(this.dependencies.find("org.sample","sample02").toString(),equalTo("org.sample:sample02:2.0.0"));
}
|
Python | UTF-8 | 250 | 3.25 | 3 | [] | no_license | def canVisitAllRooms(rooms):
visited = set()
stack = [0]
while stack:
r = stack.pop()
visited.add(r)
for x in rooms[r]:
if x not in visited:
stack.append(x)
return len(visited) == len(rooms)
print(canVisitAllRooms([[1],[2],[3],[]])) |
JavaScript | UTF-8 | 858 | 2.765625 | 3 | [
"MIT"
] | permissive | function lockedProfile() {
let buttons = document.querySelectorAll('.profile > button');
let buttonsArray = Array.from(buttons);
buttonsArray.forEach(btn => {
btn.addEventListener('click', function () {
let lockInput = this.parentNode.querySelector('input[value="lock"]');
le... |
JavaScript | UTF-8 | 1,921 | 3.015625 | 3 | [] | no_license | function calcDistance(origin, destination, outputDest) {
var x, y;
origin = origin.split(';');
x = parseFloat(origin[0]);
y = parseFloat(origin[1]);
var service = new google.maps.DistanceMatrixService();
origin = new google.maps.LatLng(x, y);
service.getDistanceMatrix(
{
... |
Python | UTF-8 | 264 | 4.125 | 4 | [] | no_license | """Ejercicio 1
Escribe un programa en Python que almacene la cadena ¡Hola Mundo! en una variable y luego muestre
por pantalla el contenido de la variable."""
variable = "hola mundo"
print(variable)
variable = "1234"
print(variable)
variable2 = "10.4"
print(variable2)
|
Python | UTF-8 | 11,979 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env python
"""
Various utility code that gets used throughout the command-line tools.
Recent changes
- Moved scipy and numpy imports into relevant functions so that
other python builds (e.g. PyMOL) can easily use this.
"""
import os,sys,bz2
from copy import copy
from optparse import Option, Option... |
Markdown | UTF-8 | 1,943 | 2.515625 | 3 | [] | no_license | ```yaml
area: Hertfordshire
og:
description: "Officers investigating a theft from a shop in Bishop\u2019s Stortford have released an image of a man they would like to speak to as part of their enquiries."
publish:
date: 9 May 2018
title: "CCTV appeal following theft from shop \u2013 Bishop\u2019s Stortford"
url: ht... |
Markdown | UTF-8 | 396 | 2.953125 | 3 | [] | no_license | # LinearRegression_2_VS2019
Learnt to handle '.csv' file. Automated certain processes.
This linear regression predicts salary based on the experience of the employee.
The function used for curve fitting is salary = a0 + a1*experience + a2*experience*experience + a3*experience*experience*experience.
The program takes ex... |
Java | UTF-8 | 3,105 | 1.851563 | 2 | [] | no_license | package fr.k2i.adbeback.webapp.controller;
import com.google.common.collect.Lists;
import fr.k2i.adbeback.dao.ICategoryDao;
import fr.k2i.adbeback.webapp.bean.CartBean;
import fr.k2i.adbeback.webapp.bean.search.ArtistBean;
import fr.k2i.adbeback.webapp.bean.search.MusicBean;
import fr.k2i.adbeback.webapp.bean.search.P... |
C | UTF-8 | 748 | 2.921875 | 3 | [
"MIT"
] | permissive | #include <MLV/MLV_all.h>
#include <stdio.h>
int main( int argc, char *argv[] ){
int l, h, p, r, dim;
printf("Largeur:");
scanf("%d",&l);
printf("Hauteur:");
scanf("%d",&h);
printf("Rayon du cercle:");
scanf("%d",&r);
printf("Pas:");
scanf("%d",&p);
MLV_create_window( "beginner - 1 - hello wo... |
JavaScript | UTF-8 | 1,565 | 3.09375 | 3 | [] | no_license | function pass_check() {
pass_str = $("#password").val();
if (pass_str.length < 8) {
$("#length_error").html("Пароль должен быть не короче 8 символов");
document.getElementById("form_btn").disabled = true;
} else {
document.getElementById("form_btn").disabled = false;
$("#le... |
Java | UTF-8 | 1,522 | 1.976563 | 2 | [] | no_license | /**
* 2018-10-15
* Administrator
*/
package com.axp.service.goods;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.axp.model.AdminUser;
import com.axp.model.GameActivity;
import com.axp.query.PageR... |
Python | UTF-8 | 4,159 | 2.765625 | 3 | [] | no_license | import tensorflow as tf
import keras
import pickle
import argparse
import random
import numpy as np
from pool import Pool
parser = argparse.ArgumentParser()
parser.add_argument("-gen", "--generate", help="Generate Workers")
parser.add_argument("-sav", "--save", help="Save Directory")
parser.add_argument("-rt", "--re... |
C# | UTF-8 | 1,569 | 2.640625 | 3 | [] | no_license | using Modelos;
using Repositorio;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Logica
{
public class CiudadLogica
{
private CiudadRepositorio repositorio = new CiudadRepositorio();
public List<CiudadModel> GetList... |
C++ | UTF-8 | 350 | 3.0625 | 3 | [
"MIT"
] | permissive | #include "Stack.H"
#include <iostream>
using namespace std;
void Stack::push(T a)
{
if(stk.empty())
{
top = a;
}
stk.push_back(a);
}
void Stack::pop_back()
{
stk.pop_back();
if(stk.empty())
{
top = "";
}
}
int Stack::size()
{
return stk.size();
}
bool Stack::empty... |
Java | UTF-8 | 640 | 2.203125 | 2 | [
"MIT"
] | permissive | package jv.freeorm.query;
import jv.freeorm.base.DbParameter;
/**
*
* @author Mustafa SACLI
*/
public class Query implements IQuery {
private String text_ = "";
private DbParameter[] prms_ = null;
public Query() {
text_ = "";
prms_ = new DbParameter[]{};
}
@Override
publi... |
PHP | UTF-8 | 4,224 | 2.625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace XpBar\Sniffs\Namespaces;
use PHP_CodeSniffer\Files\File as PHP_CodeSniffer_File;
use PHP_CodeSniffer\Sniffs\Sniff as PHP_CodeSniffer_Sniff;
use SlevomatCodingStandard\Helpers\ClassHelper;
use SlevomatCodingStandard\Helpers\NamespaceHelper;
use SlevomatCodingStandard\Helpers\... |
Java | UTF-8 | 377 | 1.898438 | 2 | [] | no_license | package sa.com.saib.web.dgi.repository;
import sa.com.saib.web.dgi.domain.KycPersonal;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
/**
* Spring Data repository for the KycPersonal entity.
*/
@SuppressWarnings("unused")
@Repository
public interface KycPersona... |
TypeScript | UTF-8 | 8,359 | 3.421875 | 3 | [
"MIT"
] | permissive | const naturalAminoAcids = 'ARNDCEQGHILKMFPSTWYV';
const ambiguousAminoAcids = 'XBZJ';
const baseNucleicAcids = 'ACGTU';
const ambiguousNucleicAcids = 'WSMKRYBDHVNZ';
// Characters unique only to their subset e.g. 'U' is not a valid AA.
const aminoAcidsOnly = /[EQILFPXJ]/gi;
const nucleicAcidsOnly = /U/gi;
export cons... |
Java | UTF-8 | 1,126 | 3.59375 | 4 | [] | no_license | package com.example.evgsa.androidgraphics.logic;
/**
* This class describes a 'cell' - one pixel at game table
* */
public class Cell
{
private int timeLeft; //variable that decreases with any tick. When it reaches 0, the cell is no more lit up
public boolean isCellActivated = false;
/**
* This me... |
SQL | UTF-8 | 410 | 3.40625 | 3 | [] | no_license | -- START:issue
SELECT *
FROM Bugs AS b JOIN Comments AS c
ON (b.issue_id = c.issue_id AND c.issue_type = 'Bugs')
WHERE b.issue_id = 1234;
-- END:issue
-- START:comment
SELECT *
FROM Comments AS c
LEFT OUTER JOIN Bugs AS b
ON (b.issue_id = c.issue_id AND c.issue_type = 'Bugs')
LEFT OUTER JOIN FeatureRequests A... |
Python | UTF-8 | 5,430 | 2.828125 | 3 | [] | no_license | """
This is deployed as a lambda function in AWS.
"""
import decimal
from distutils.util import strtobool
from functools import lru_cache
import itertools
import json
from pathlib import Path
import boto3
from boto3.dynamodb.conditions import Key
print("Loading function")
dynamodb = boto3.resource("dynamodb")
bibles... |
Go | UTF-8 | 971 | 3.734375 | 4 | [] | no_license | package main
import "fmt"
func main() {
root := &TreeNode{
Val: 1,
Left: &TreeNode{
Val: 2,
Left: &TreeNode{Val: 3},
Right: &TreeNode{Val: 4},
},
Right: &TreeNode{
Val: 5,
Right: &TreeNode{Val: 6},
},
}
flatten(root)
fmt.Println(root)
}
func flatten(root *TreeNode) {
if root == nil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.