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
336
1.929688
2
[]
no_license
package gis4.al.composants; public class SmileyBean implements java.io.Serializable { public SmileyBean() {} public void toggleSmile () { ... } public void addSourireListener(gis4.al.composants.SourireListener listener) { ... }; public void removeSourireListener(gis4.al.composants.SourireListener liste...
Markdown
UTF-8
677
2.71875
3
[]
no_license
## API-EMpresa Ocupando el framework laravel desarrollar un API Restful JSON que permita crear, listar, editar y eliminar empresas. Una empresa debe poder guardar los siguientes atributos nombre(obligatorio), el número de trabajadores(opcional), Tipo Empresa (1: "Software" 2: "Retail") y la fecha de creación. Todo...
C++
UTF-8
4,080
2.921875
3
[ "MIT" ]
permissive
// Unit Test (spline) #include <gtest/gtest.h> #include <iostream> #include <map> #include <cmath> #include <cstdlib> #include "spline.h" using namespace nmlib; static double urand(void){ return (random()+0.5)/RAND_MAX; } static double urand(double x0,double x1){ return (x1-x0)*urand()+x0; } static std::map<do...
Python
UTF-8
2,254
3.671875
4
[]
no_license
#!/usr/bin/env python # coding: utf-8 import numpy as np outside_rock_prob = 0.5 distribution_outer = [outside_rock_prob, 1 - outside_rock_prob] distribution_inner = [1/3, 1/3, 1/3] num_food = 2 options = ['rock ', 'blank ', 'unique ', 'food'] food_options = ['mussel', 'clam', 'shrimp'] def randomize_tank(lengt...
C#
UTF-8
2,922
2.84375
3
[]
no_license
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _FinalProject__BeetleBug { public class MouseEventHelper : InvisibleGameEntity { private MouseState CurrentState, PrevState; priva...
C++
UTF-8
809
3.203125
3
[]
no_license
#include <iostream> #include "Trabalhador.h" #include "TrabalhadorAssalariado.h" #include "TrabalhadorPorHora.h" #include <string> using namespace std; int main() { TrabalhadorAssalariado Ta; Ta.setNome("Caio"); Ta.setSalarioMensal(9000); cout << "Trabalhador Assalariado" << endl; cout << "Nome: ...
Python
UTF-8
5,028
2.671875
3
[]
no_license
import requests import pandas as pd import matplotlib.pyplot as plt from matplotlib.patches import Circle, Rectangle, Arc import seaborn as sns import io import base64 from nba_api.stats.static import players from PIL import Image import os.path # Method to draw a halfcourt and populate it with the players data # Tak...
C#
UTF-8
3,230
2.625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class bulletFly : MonoBehaviour { public float destotyTime=3; public GameObject target; //飛行目標 private Vector3 flyto; public float moveSpeed; //飛行速度 public GameObject particle; private bool ex = false; ...
Swift
UTF-8
741
3.078125
3
[]
no_license
// // URLImage.swift // Tracker // // Created by Кирилл Чулков on 05.03.2020. // Copyright © 2020 Кирилл Чулков. All rights reserved. // import Foundation import SwiftUI struct URLImage: View { @ObservedObject var imageLoader:ImageLoader @State var image: UIImage = UIImage(systemName: "photo") ?? UII...
Shell
UTF-8
775
3.25
3
[]
no_license
#!/bin/bash # definitions export CODE_ROOT="/ceph/gammanet" export NB_SUBDIR="batch" export DATA_SUBDIR="data" export RESULTS_SUBDIR="results" export LOG_SUBDIR="logs" export DATA_FILE="sunnybrook_180.tar.bz2" # init code repo cd /root git clone https://github.com/jasonliam/gammanet-pytorch cd /root/gammanet-pytorch ...
Java
UTF-8
332
2.640625
3
[]
no_license
package strategy.session1; /** * @program: zen-of-design-pattern * @author: devinkin * @create: 2019-08-06 17:47 * @description: 乔国老开后门 **/ public class BackDoor implements IStrategy{ @Override public void operate() { System.out.println("找乔国帮忙,让吴国给孙权施加压力"); } }
Java
UTF-8
355
2.65625
3
[]
no_license
package com.haozhexu.interface_segregation_principle; public class Tester { public static void main(final String[] args) { Manager manager = new Manager(); manager.setWorkable(new Cleaner()); manager.orderToWork(); manager.setWorkable(new Programmer()); manager.orderToWork(); manager.setWorkable(new Robot...
Ruby
UTF-8
973
3.484375
3
[]
no_license
require 'nokogiri' require 'httparty' require 'byebug' def scraper page = 1 reached_last_page = false books = Array.new while !reached_last_page do puts "We are on page " + page.to_s start_count = books.count url = "http://books.toscrape.com/catalogue/page-" + page.to_s + ".html" unparsed_page = HTTP...
Python
UTF-8
4,461
2.546875
3
[ "MIT" ]
permissive
import os import sys import pandas as pd import praw from pprint import pprint from collections import defaultdict from datetime import datetime import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer as SIA # Global variables CLIENT_ID = "s6mgv6DEda9oaQ" CLIENT_SECRET = "qYOaYTL74kczAeRaVsVR8zb3j...
JavaScript
UTF-8
1,714
2.609375
3
[]
no_license
const mongoose = require('mongoose'); const ReviewSchema = new mongoose.Schema({ title : { type : String, trim : true, required : [ true, 'Please add course title for the review' ], maxlength : 100 }, text : { type : String, required : [ true, 'Plesa add some text' ], trim :...
Python
UTF-8
344
3.859375
4
[]
no_license
#!/usr/bin/python3 lower_bound=eval(input("Enter lower bound")) upper_bound=eval(input("Enter Upper bound")) even_sum=0 odd_sum=0 for i in range(lower_bound,upper_bound): if i%2==0: even_sum+=i else: odd_sum+=i print("Even number sum in given range is%d"%even_sum) print("Odd number sum in give...
Java
UTF-8
1,320
4
4
[ "MIT" ]
permissive
package com.coolslow.playground.binary_tree; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; /** * 剑指Offer 32 - 1. 从上到下打印二叉树 * 从上到下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。 * 例如: * 给定二叉树: [3, 9, 20, null, null, 15, 7] * 3 * / \ * 9 20 * / \ * ...
JavaScript
UTF-8
1,619
2.53125
3
[]
no_license
function hook(soBase) { console.log(soBase); var soPointer = new NativePointer(soBase); var targetAddrPointer = soPointer.add(0x73E50 + 1); // offset of some instruction, +1 means Thumb console.log(targetAddrPointer) Interceptor.attach(targetAddrPointer, { onEnter: function (args) { ...
Python
UTF-8
726
4.1875
4
[]
no_license
''' Enunciado: desenvolva um programa que ajude um jogador da MegaSena a criar palpites. O programa deverá perguntar qtos jogos serão gerados e vai sortear 6 números entre 1 e 60 para cada jogo (sem repetir números), cadastrando tudo em uma única lista composta. ''' from random import randint from time import sleep ...
Python
UTF-8
2,514
3.40625
3
[]
no_license
import copy def sum_of_divisors(n): summ = 0 for i in range(1, n + 1): if n % i == 0: summ += i return summ def is_prime(n): n = abs(n) if n == 1: return False for i in range(2, n): if n % i == 0: return False return True def prime_number...
Java
UTF-8
363
1.84375
2
[]
no_license
package com.brq.ecommerce.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.brq.ecommerce.models.UsuarioLoginModel; @Repository public interface UsuarioLoginRepository extends JpaRepository<UsuarioLoginModel, Integer>{ public Usu...
Python
UTF-8
150
2.671875
3
[]
no_license
import pyqb pyqb.cls() for i in range(0,16): pyqb.color(i) print "Hello" for i in range(0, 8): pyqb.color(0, i) print "Hello" print
C
UTF-8
1,227
4.21875
4
[]
no_license
#include <stdio.h> /* * Create a function that returns the largest value * of three integers */ // int, int, int -> int // Returns the maximum value of three integers /* stub int maxOfThree(int num1, int num2, int num3) { return 0; } */ /* template int maxOfThree(int num1, int num2, int num3) { return ... num...
Java
UTF-8
17,817
1.523438
2
[ "Apache-2.0" ]
permissive
package com.mediatek.vcs; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.Dialog; import android.app.DialogFragment; import android.content.Context; import android.content.DialogInterface; import android.content.res.Configuration; import android.database.Cursor; import android....
C#
UTF-8
4,030
2.78125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using Encript; using Microsoft.VisualBasic; namespace PL { public partial class Enc...
Java
UTF-8
11,289
2.28125
2
[]
no_license
/* * 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 modelo.dao; import java.io.Serializable; import javax.persistence.Query; import javax.persistence.EntityNotFoundExcep...
Markdown
UTF-8
10,042
2.796875
3
[ "MIT" ]
permissive
--- hrs_structure: division: '5' volume: '14' title: '37' chapter: '711' section: 711-1100 type: hrs_section tags: - Crime - Criminal Proceeding menu: hrs: identifier: HRS_0711-1100 parent: HRS0711 name: 711-1100 Definitions weight: 26005 title: Definitions full_title: 711-1100 Definitions -...
C#
UTF-8
1,063
3.09375
3
[ "MIT" ]
permissive
using System.Text; namespace Rook.Compiling.CodeGeneration { public class CodeWriter { private int indentation; private readonly StringBuilder builder = new StringBuilder(); public void Literal(string literal) { builder.Append(literal); } public vo...
JavaScript
UTF-8
831
2.8125
3
[]
no_license
var map; function initMap(x, y, tit, cont) { var mapCenter = { lat: parseFloat(x), lng: parseFloat(y) }; //========创建基本地图======== map = new google.maps.Map(document.getElementById('mapContainer'), { center: mapCenter, zoom: 15 }); //========创建地图标记======== var marker = new google...
SQL
UTF-8
2,067
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 27-04-2020 a las 23:32:10 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
Python
UTF-8
1,113
2.515625
3
[]
no_license
#coding=utf-8 import tornado.web import tornado.ioloop import platform if platform.system() == "Windows": import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) class GetRequestInfo(tornado.web.RequestHandler): def get(self, *args, **kwargs): print(self.request) ...
Python
UTF-8
3,176
3.515625
4
[]
no_license
#Topological sorting alg #create graph class Solution(object): def __init__(self): self.graph = {}} self.stack = [] self.visited = [] self.ans = True def topological_sort(self, req): if self.ans == False: return False self.visited.append(r...
Markdown
UTF-8
2,929
3.421875
3
[ "MIT" ]
permissive
# Thermostat <img width="1435" alt="Screenshot 2019-07-24 at 14 16 14" src="https://user-images.githubusercontent.com/39112648/61796705-db6ab980-ae1d-11e9-9d2d-0b3fd420ffcb.png"> The aim of the Thermostat project was to test drive a simple front-end web app using Javascript, with the specification below. It uses a we...
Markdown
UTF-8
11,973
2.859375
3
[]
no_license
# Всегда ли транзакции изолированы друг от друга? Рассказать про уровни изоляций --- **Реляционные базы данных в примерах, 2021, (Святослав Куликов):** Уровень изолированности транзакций (transaction isolation level) — условное значение, показывающее, насколько внутреннее состояние базы данных в момент выполнения тра...
C#
UTF-8
460
3
3
[]
no_license
using System; using System.Linq; using System.Collections.Generic; namespace ABC { class ProgramA { static void Main(string[] args) { var x = long.Parse(Console.ReadLine()); var a = long.Parse(Console.ReadLine()); var b = long.Parse(Console.ReadL...
Java
UTF-8
1,026
2.5625
3
[]
no_license
package de.vrd.ptvapi.deserialiser; import java.lang.reflect.Type; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import de.vrd.ptvapi.model.Direction; import...
Markdown
UTF-8
6,100
2.640625
3
[]
no_license
--- title: "Verktyg för att jobba med en sökmotor" tagline: "Då mitt arbete på senare tid har involverat utveckling mot sökmotorn Apache Solr har detta inspirerat till en ny bloggpost. Begrepp kommer därför därifrån men koncepten bör vara överförbara till andra sökmotorer." date: 2021-01-12 author: Erik Lenells, system...
Python
UTF-8
50
2.578125
3
[]
no_license
p, q = map(int, input().split()) print(str(p * q))
Java
UTF-8
7,915
2.59375
3
[]
no_license
package fiuba.algo3.tp2; import fiuba.algo3.tp2.modelo.Campo.Mapa; import fiuba.algo3.tp2.modelo.Campo.Posicion; import fiuba.algo3.tp2.modelo.Exception.SobrepoblacionException; import fiuba.algo3.tp2.modelo.Juego.Juego; import fiuba.algo3.tp2.modelo.Juego.Jugador; import fiuba.algo3.tp2.modelo.Piezas.Edificios.Castil...
JavaScript
UTF-8
3,126
2.984375
3
[]
no_license
//////////////////////////////////////////// // Created by: fjlacevedo // Created on: 19/06/2020 // // Version: 1.0.0-ol //////////////////////////////////////////// /* Return the layers from the current map. If no map is choosen, it will return the list of layers from the default map (#0). If the input of 'filter' i...
C#
UTF-8
2,949
2.65625
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ArrowRope : MonoBehaviour { // Config Params private Vector3 targetPosition; LineRenderer arrowLineRenderer; private Vector3 originalPosition; private Vector3 limitPosition; [Header("CONFI...
Ruby
UTF-8
1,476
2.78125
3
[ "MIT" ]
permissive
require 'thor' class Shard::CLI < Thor ######## # # # List # # # ######## desc "list USERNAME", "List all shards for Github user USERNAME" def list(username) lister = Shard::Lister.new(username) if lister.shards.any? puts "Shards for Github user #{ username }:" puts ...
Java
UTF-8
545
2.078125
2
[]
no_license
/* * Created by dnoakes on 21-Nov-2002 17:58:19 using IntelliJ IDEA. */ package com.skymiracle.image.metadata.iptc; import com.skymiracle.image.metadata.Directory; import com.skymiracle.image.metadata.TagDescriptor; /** * */ public class IptcDescriptor extends TagDescriptor { /** * */ private static final...
Markdown
UTF-8
2,613
2.828125
3
[ "BSD-3-Clause" ]
permissive
# The survey The survey was a grand success! I had 102 responses, mostly from [r/mtgfinance](https://www.reddit.com/r/mtgfinance). ## Niches Keep in mind that 2 niches could've been chosen and that the niches were fairly asymmetric-- some could be features of others. 1. The majority wanted price analytics in the ni...
C++
UTF-8
520
2.65625
3
[]
no_license
#pragma once #include "Actor.h" class Brock : public Actor { public: enum ContainItem { ENone, ECoin, EStar, EHatenaCoin, EHatenaMushroom }; Brock(class Game* game, int item); ~Brock(); void UpdateActor(float deltaTime) override; ContainItem GetContainItem() { return mContainItem; } void SetContai...
Java
UTF-8
798
3.921875
4
[]
no_license
public class FizzBuzzer { public String GetFizzBuzzValueFor(Integer number) { if (NumberDivisbleBy(3,number) || NumberDivisbleBy(5, number)) { return "FizzBuzz"; } if (NumberDivisbleBy(3, number)) { return "F...
Java
UTF-8
380
1.523438
2
[]
no_license
package com.snownaul.mvvmtest.practice_recycler_view; import com.snownaul.mvvmtest.BaseViewModel; public class ViewModel_PracticeRecyclerActivity implements BaseViewModel { @Override public void onCreate() { } @Override public void onResume() { } @Override public void onPause() { ...
Python
UTF-8
18,137
2.578125
3
[ "MIT" ]
permissive
#!/usr/bin/python3 # # A script that list DLL files properties for purpose of finding good Module Stomping candidates. # The results of this script can then be used in Cobalt Strike Malleable C2 Profiles and # for the sake of other shellcode process-injection tests. # # Let's the user find modules matching criterias su...
Java
UTF-8
3,553
2.5
2
[ "BSD-2-Clause" ]
permissive
package cs652.j.semantics; import cs652.j.parser.JBaseListener; import cs652.j.parser.JParser; import org.antlr.symtab.*; import static cs652.j.semantics.ComputeTypes.*; public class DefineScopesAndSymbols extends JBaseListener { private Scope currentScope; public DefineScopesAndSymbols(GlobalScope globals) { c...
TypeScript
UTF-8
800
2.765625
3
[]
no_license
import { observable, action } from 'mobx' import { CreateResource, transition } from './resource' import axios from 'axios' type Todo = { userId: number id: number title: string completed: boolean } class Todos { @observable list = CreateResource([] as Todo[]) @action.bound async fetch(): Promise<void> {...
PHP
UTF-8
2,220
2.703125
3
[]
no_license
<?php namespace App\Services\Production; use App\Repositories\OauthClientRepositoryInterface; use App\Repositories\TeamRepositoryInterface; use App\Repositories\UserPasswordResetRepositoryInterface; use App\Services\TeamServiceInterface; class TeamService extends AuthenticatableService implements TeamServiceInterface...
JavaScript
UTF-8
2,140
3.15625
3
[]
no_license
import React, { useState } from 'react' import ReactDOM from 'react-dom' const App = ({anecdotes}) => { const [random, setRandom] = useState(""); const [voted, setVoted] = useState({}); // const [maxVoted, setMaxVoted] = useState({}); const getRandom = (array) => { let anecdote = array[Math.floor(Math.ran...
C#
UTF-8
1,505
2.5625
3
[ "MIT" ]
permissive
using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; namespace Frederikskaj2.EmailAgent.Functions { public class TeamsIntegration : ITeamsIntegration { private readonly ILogger logger; priv...
Markdown
UTF-8
4,543
3.296875
3
[ "MIT" ]
permissive
--- layout: post title: Learning missing value distribution and its imputation using GANs published: false comments: true image: "/img/MAML.jpg" share-img: "/img/MAML.jpg" thumbnail: "/img/MAML.jpg" --- # GANs quick recap GANs as a generative modeling approach has demonstrated the ability to learn an underlying distr...
Java
UTF-8
870
2.203125
2
[]
no_license
package com.atlassian.jira.configurator.config; import javax.annotation.Nonnull; public enum ComplexConfigurationReason { AnotherSecurityConstraintExisting("There are multiple security-constraint tags existing in the web.xml."), MultipleHttpConnectors("There are multiple HTTP connector tags existing in the se...
Java
UTF-8
1,473
2.28125
2
[ "Apache-2.0" ]
permissive
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
Java
UTF-8
575
3.203125
3
[]
no_license
class Solution { public int lengthOfLongestSubstring(String s) { if (s == null) { return 0; } int max = 0; int l = 0, r = 0; Set<Character> set = new HashSet<>(); while (r < s.length()) { if (set.contains(s.charAt(r))) { ...
PHP
UTF-8
2,207
2.6875
3
[]
no_license
<?php require_once 'CrudOperations.php'; require_once 'GenerateId.php'; $data = new CrudOperations(); $admin = new Administrator(); $generateId = new GenerateId(); $login = new Login(); $employee = new Employee(); $firstname = filter_input(INPUT_POST, 'firstname'); $lastname = filter_input(INPUT_POST, 'lastname'); ...
C++
UTF-8
1,362
3.265625
3
[]
no_license
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int getHeight(TreeNode * root) { if(!root) return 0; return 1+ max(getHeig...
C
UTF-8
2,950
2.890625
3
[]
no_license
#include "kruskal.h" int * tableau_ligne(graph_t * graph,int noeuds,int nb_aretes) { for (int i=0; i<nb_aretes; i++) { diff=graph->liste[i].un - graph->liste[i].deux if (diff==1) tab[ } graph_t * kruskal(graph_t * graph,int noeuds, int nb_aretes,int * cours) { int c1; int c2; graph_t * A=creer_graph(noe...
Java
UTF-8
1,029
3.25
3
[]
no_license
public class Solution { public ArrayList<ArrayList<Integer>> generate(int numRows) { // Start typing your Java solution below // DO NOT write main() function ArrayList<ArrayList<Integer>> triangle = new ArrayList<ArrayList<Integer>>(); if(numRows == 0) { return ...
JavaScript
UTF-8
13,540
2.625
3
[ "MIT" ]
permissive
"use strict"; var path = require("path"); var _ = require("lodash"); var async = require("async"); var fs = require("fs-extra"); var ignoreParser = require("parse-gitignore"); var mm = require("micromatch"); var isBinaryFile = require("isbinaryfile"); var fileType = require("file-type"); // Lodash template setup. // ...
Python
UTF-8
2,401
2.640625
3
[]
no_license
import os import discord import chatbot import random from discord.ext import commands from discord.ext.commands import MissingPermissions from dotenv import load_dotenv load_dotenv() TOKEN = os.getenv('TOKEN') PREFIX= os.getenv('PREFIX') helpCmd=commands.DefaultHelpCommand(no_category="Other stuff") client = comman...
Markdown
UTF-8
916
2.640625
3
[]
no_license
# Eviction Prevention Landing Page This sites purpose is to provide information on the eviction prevention app. People who are Thinking of joining us in the creation of this app, investors & companies we have contacted to access software such as APIs can find information about the app here on this site. **Actual Evic...
Markdown
UTF-8
15,257
3.34375
3
[]
no_license
# Using Classification Models to Predict Song Popularity *** <img src= 'IMAGES/header.jpg' width=10000 /> ## Introduction *** In the age of technology, it has become a lot easier for artists to upload their music to streaming platforms and gain popularity. It seems that almost everyday, artists come out with new song...
C++
WINDOWS-1251
1,244
3.5625
4
[]
no_license
#ifndef MATRIX_H #define MATRIX_H #include<iostream> #include<fstream> #include<cmath> using namespace std; class Matrix { private: int n;// () double ** nums;// public: friend ostream & operator<<(ostream & out, const Matrix & matr);// Matrix();// , Matrix(int num, bool flag = fal...
C++
UTF-8
742
2.734375
3
[]
no_license
#ifndef _RAPR_UBI_STATE #define _RAPR_UBI_STATE #include "deque" class RaprUBIStateStore { public: RaprUBIStateStore(); ~RaprUBIStateStore(); unsigned int GetUBI() {return ubi;} void SetUBI(unsigned int inUBI) {ubi = inUBI;} int GetState() {return state;} void SetState(int inState) {state = inState;} pri...
Markdown
UTF-8
1,313
3.015625
3
[]
no_license
# Qlearning_MountainCar "The mountain car problem is commonly applied because it requires a reinforcement learning agent to learn on two continuous variables: position and velocity. For any given state (position and velocity) of the car, the agent is given the possibility of driving left, driving right, or not using t...
Java
UTF-8
692
1.757813
2
[]
no_license
package com.ll.autotransaction.dao.mode; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; @Data @TableName("stock_config") publi...
Java
UTF-8
1,249
2.703125
3
[]
no_license
package com.test.design.command; import com.alibaba.fastjson.JSON; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import lombok.extern.slf4j.Slf4j; /** * @program: ssmweb * @author: playboy * @create: 2022-02-24 22:09 * @description: 小二类-----命令模式 **/ @Slf4j public class XiaoEr { private ...
Markdown
UTF-8
519
2.703125
3
[]
no_license
# Pollution Monitoring A distributed system for air pollution monitoring written in Java. Developed for the course "Distributed and Pervasive Systems" @ University of Milan. The documentation of the project can be found [here](documentation.pdf) (italian). Overview of the system architecture: ![](architecture.png) ...
Python
UTF-8
369
3.890625
4
[]
no_license
#Grading Lab user_grade = int(input("Please enter your number grade: > ")) if user_grade >= 90: print('Wahoo!!!That\'s an \'A\'') elif user_grade >= 80: print('Nice job! That\'s a \'B\'') elif user_grade >= 70: print('Meh... That\'s a \'C\'') elif user_grade >= 60: print('That\'s a \'D\'') else:...
Markdown
UTF-8
3,744
2.640625
3
[]
no_license
# clone puxando submodules **git clone https://github.com/ErickWendel/semana-javascript-expert04 --recurse-submodules** o --resurse-submodules nos permite puxar o template html do projeto, que foi criado como um submodule, sem a flag, a initial-template pasta vem vazia ===============================================...
Markdown
UTF-8
8,278
3.0625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- permalink: /syntax title: Syntax toc: true --- Luau uses the baseline [syntax of Lua 5.1](https://www.lua.org/manual/5.1/manual.html#2). For detailed documentation, please refer to the Lua manual, this is an example: ```lua local function tree_insert(tree, x) local lower, equal, greater = split(tree.root, x) ...
C
UTF-8
371
3.34375
3
[]
no_license
#include <stdio.h> void LYcheck(int a); int main(){ int a; printf("Type year : "); scanf("%d",&a); LYcheck(a); return 0; } void LYcheck(int a){ if (a % 400 == 0) printf("This is leap year!\n"); else if (a % 100 == 0) printf("This is not leap year!\n"); else if (a % 4 == 0) printf("This is leap year!\n...
Markdown
UTF-8
1,681
2.515625
3
[]
no_license
# Article R6322-8 Une décision de refus de renouvellement de l'autorisation ne peut être prise que pour un ou plusieurs des motifs suivants : 1° Lorsque les installations et leur utilisation ne satisfont pas aux conditions d'autorisation fixées aux articles R. 6322-14 à R. 6322-29 ou aux conditions techniques de fon...
Python
UTF-8
1,244
2.8125
3
[ "MIT" ]
permissive
import re from chess import algebraic from chess import game from chess.const import * pgn_metadata_re = re.compile('\s*\[.*\]\s*') move_no_re = re.compile('^\d+\.') def parse_pgn(pgn): g = game.Game.new() pgn = pgn.split("\n") for i, line in enumerate(pgn): if pgn_metadata_re.match(line): ...
Shell
UTF-8
339
2.65625
3
[]
no_license
#!/bin/bash lang="nl" key="AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw" # send flac file to google and he return the text wget -q --post-file stt.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "https://www.google.com/speech-api/v2/recognize?client=chromium&lang=$lang&key=$key" | sed -e 's/[{}]/''/g' | awk -F"...
JavaScript
UTF-8
250
2.59375
3
[]
no_license
export let projectName = "HR Management"; export default class Employee { constructor(empId, empName) { this.empId = empId; this.empName = empName; } getInfo() { return ` ${this.empId} , ${this.empName} `; } }
Python
UTF-8
1,139
2.53125
3
[]
no_license
import core_types as core import datetime as dt from typing import List #import calender_read as msft #import google_cal_quickstart as ggl def parse_txt(input_file) -> List[core.Event]: d_len = 10 # expected date input YYYY-MM-DD t_len = 8 # expected time input HH:MM:00 user_events = [] input_file...
C#
UTF-8
978
3.6875
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; namespace Commons.Mathematics { public static class SequenceGeneration { public static IEnumerable<double> Linspace(double from, double to, int valueCount) { if(valueCount <= 1) throw new ArgumentException($"...
Markdown
UTF-8
2,129
2.5625
3
[]
no_license
--- layout: post title: MySQL 테이블 생성, 컬럼 추가, 삭제, 수정 author: 쭌프로 tags: JAVA MySQL subtitle: JAVA 멀티스레드 정리노트 category: JAVA --- <!-- Start Writing Below in Markdown --> ![Description](https://alalstjr.github.io/jjunpro.github.io/img/java_bg.png) # 테이블 속성 확인 desc [테이블명]; # 테이블 생성 create table ...
Python
UTF-8
43,693
2.640625
3
[ "MIT", "GPL-3.0-only" ]
permissive
#!/usr/bin/env python3 # Copyright (C) 2016 Christoph Gaukel <christoph.gaukel@gmx.de> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
C#
UTF-8
5,286
2.828125
3
[]
no_license
using System; using System.Threading; public static class Validating { public class InputData { public int Val1 { get; private set; } public int Val2 { get; private set; } public InputData(int v1, int v2) { Val1 = v1; Val2 = v2; } } public delegate bool Validation(InputData data); public s...
Markdown
UTF-8
557
2.71875
3
[]
no_license
<!-- * @Author: xiuquanxu * @Company: kaochong * @Date: 2020-12-13 12:37:25 * @LastEditors: xiuquanxu * @LastEditTime: 2020-12-13 12:41:05 --> 双指针主要用于遍历数组,两个指针指向不同元素,从而完成任务。指针玩法: 1. 两个指针指向同一个数组,遍历方向相同且不会相交,则称为滑动窗口(指针包围的区域就是当前的窗口),经常用于区间搜索 2. 两个指针指向同一个数组,遍历方向相反,则可以用来搜索,待搜索的数组往往是排好序的
Java
UTF-8
2,657
1.78125
2
[]
no_license
package org.xpup.hafmis.sysloan.loanapply.beforeloanadvisory.action; import java.math.BigDecimal; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.A...
Java
UTF-8
807
2.15625
2
[]
no_license
package com.example.skyscanner.Network; import javax.inject.Inject; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; public class ServiceManager { ServiceManager serviceManager; @Inject public ServiceManager(ServiceMana...
Python
UTF-8
558
2.546875
3
[ "Apache-2.0" ]
permissive
import pickle import numpy as np model = None labels = ["setosa", "versicolor", "virginica"] def init(model_path, metadata): global model model = pickle.load(open(model_path, "rb")) def predict(payload, metadata): measurements = [ [ sample["sepal_length"], sample["sepal...
JavaScript
UTF-8
9,482
2.5625
3
[]
no_license
var slideCount = 0 var activeSlide = 0 var scrollParam = 0 var menu_button = document.getElementById( 'menu-toggle' ) var input = document.getElementById('input') var mc = new Hammer(input) mc.on("panleft panright", slide) mc2 = new Hammer(document.body) mc2.on("pan", redirect) menu_button.onclick = toggle_menu docum...
JavaScript
UTF-8
389
2.71875
3
[]
no_license
/** * Use in this JS: preOpenDeposit.jsp */ function CheckDepositId() { var depositId = document.getElementById("depositIdToPreOpen").value; if(isNaN(depositId)) { alert("Deposit Id must be a number"); return false; } else if((depositId==null)||(depositId=="")) { alert("You have to fill Depos...
JavaScript
UTF-8
4,750
2.640625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
const {describe, it, beforeEach} = require('mocha') const {expect} = require('chai') const sinon = require('sinon') const moment = require('moment') const Logger = require('./logger') const fromLogMessage = function (output, {atIndex = 0} = {}) { const calledWith = output.args[atIndex] expect(calledWith, `The call...
JavaScript
UTF-8
277
2.65625
3
[]
no_license
export const getUser = async () => { try { const response = await fetch(`https://jsonplaceholder.typicode.com/users`); const responseUserInfo = await response.json(); return responseUserInfo; } catch (err) { console.log(err); } }; export const users = { getUser };
PHP
UTF-8
3,395
2.578125
3
[]
no_license
<?php require 'php/frontendheader.php'; require 'php/dbConnect.php'; $userid=$_SESSION['login_user']['id']; $sql='SELECT * FROM orders WHERE user_id=:value1 ORDER BY orderdate DESC'; $stmt=$conn->prepare($sql); $stmt->bindParam(':value1',$userid); $stmt->execute(); $orders=$stmt->fetchAll(); ?> <!-- Title ...
C#
UTF-8
2,462
2.625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class LSystem : MonoBehaviour { private string axiom = "F"; private float angle; private Dictionary<char, string> rules = new Dictionary<char, string>(); private string currentString; private Stack<TransformInfo>...
Java
UTF-8
5,399
2.515625
3
[]
no_license
package com.ssm.manager.service.impl; import java.util.ArrayList; import java.util.Currency; import java.util.Date; import java.util.List; import org.springframework.stereotype.Service; import com.alibaba.dubbo.config.annotation.Reference; import com.ssm.commons.pojo.Result; import com.ssm.commons.pojo.TreeNode; impor...
JavaScript
UTF-8
684
3.15625
3
[]
no_license
function calculator() { var values = document.getElementById("mylist"); var operationCode = values.options[values.selectedIndex].value; var txtname1 = document.getElementById("txtname1"); var txtname2 = document.getElementById("txtname2"); var calculatedValue; var a= parseInt(txtname1.value); ...
Markdown
UTF-8
2,815
3.375
3
[ "Apache-2.0" ]
permissive
--- layout: default title: Usage description: 'Usage instructions for @42.nl/react-error-store.' parent: Introduction permalink: /usage has_toc: true nav_order: 4 --- The idea behind this library is that you to have a way to set errors for fields from places very distant from you component, which renders the errors. T...
Markdown
UTF-8
572
2.734375
3
[ "Apache-2.0" ]
permissive
# `trelloader`: A quick and dirty utility to create a Trello board This utility creates a Trello board pre-populated with lists, cards, and labels from a JSON or YAML template. To get an AppKey and token, go [here](https://trello.com/app-key). ## Install To install via go (make sure `$GOPATH/bin` is in your `PATH`)...
Go
UTF-8
5,634
2.78125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
/* Onix Config Manager - Pilot Copyright (c) 2018-2020 by www.gatblau.org Licensed under the Apache License, Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0 Contributors to this project, hereby assign copyright in this code to the project, to be licensed under the same terms as the rest of the code....
Go
UTF-8
410
3.1875
3
[]
no_license
package types import ( "fmt" "github.com/shopspring/decimal" ) type Money struct { Currency string `json:"currency"` Amount decimal.Decimal `json:"amount"` } func (m *Money) String() string { if m == nil { return "" } return fmt.Sprintf("%s %s", m.Currency, m.Amount.String()) } func (m *Money) ...