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
TypeScript
UTF-8
251
2.640625
3
[]
no_license
import {AbstractControl} from "@angular/forms"; export const WordsValidator = (word:string, count:number)=>(control:AbstractControl)=>{ return control.value.toLowerCase().includes(word.toLowerCase()) ? null:{noWords: `Too few ${word} included!`} }
Python
UTF-8
406
3.515625
4
[ "MIT" ]
permissive
class parent: counter=10 hit=15 def __init__(self): print("Parent class initialized.") def SetCounter(self, num): self.counter= num class child(parent): # child is the child class of Parent def __init__(self): print("Child class being initialized.") def SetHit(self, num2): self.hit=num2 c= child() print...
Go
UTF-8
2,338
2.546875
3
[]
no_license
package redis import ( "errors" redisv7 "github.com/go-redis/redis/v7" "github.com/sirupsen/logrus" "github.com/tmsi-io/go-sardine/logger" "net/url" "strconv" "strings" "time" ) func (single *Single) Conn(_url string) error { single.logger = logger.GetLogger().WithFields(logrus.Fields{ "Config": _url, }) ...
Java
UTF-8
202
2.046875
2
[]
no_license
package com.imc.contructure.simpledemo; /** * @author luoly * @date 2018/12/4 14:50 * @description */ public class Product1 implements Product{ public String get() { return p; } }
Java
UTF-8
5,791
1.992188
2
[]
no_license
package com.qingclass.squirrel.cms.controller; import com.qingclass.squirrel.cms.Service.WxService; import com.qingclass.squirrel.cms.entity.cms.ConversionPush; import com.qingclass.squirrel.cms.entity.wechat.WxCustom; import com.qingclass.squirrel.cms.mapper.cms.ConversionPushMapper; import com.qingclass.squirrel.cms...
SQL
UTF-8
2,282
3.453125
3
[]
no_license
CREATE TABLE IF NOT EXISTS sequenceTypes ( sequenceId NUMBER PRIMARY KEY, sequenceTypeName TEXT, UNIQUE (sequenceTypeName) ); INSERT OR IGNORE INTO sequenceTypes (sequenceId, sequenceTypeName) VALUES (1, "DURATION"); INSERT OR IGNORE INTO sequenceTypes (sequenceId, sequenceTypeName) VALUES (2, "TIME"); CREATE T...
Python
UTF-8
1,824
2.6875
3
[]
no_license
import unit_convert_input as uci import unit_convert_output as uco import math def eqn3v(): global v uci.initial_velocity() print("\n===============================================================\n") uci.acceleration() print("\n=============================================================...
C++
UTF-8
1,685
3.53125
4
[]
no_license
// remove nth node from the end of the linked list // naive approach: to traverse the entire linked list initialising c = 1 at head and continuing to do so until the last node, then take the last N-n (the nth node to be deleted) and then traverse the list till that node and then put node->next = node->next->next; /* ...
Java
UTF-8
2,778
3.03125
3
[]
no_license
package ee.omis.item; import ee.omis.World; import ee.omis.WorldObject; public class Item implements WorldObject { private final String name; private final double strength; private int durability; private int xCoord; private int yCoord; private final char symbol; private final boolean isVi...
Java
UTF-8
2,426
3.25
3
[]
no_license
package graph; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; class Tuple { public final Object x; public final Object y; public Tuple(Object x, Object y) { this.x = x; this.y = y; } public ...
JavaScript
UTF-8
2,612
2.953125
3
[]
no_license
import React, {useState, useEffect} from 'react' import axios from 'axios' const Details = ({ country }) => { return ( <div> <h2>{country.name}</h2> <p>capital {country.capital}</p> <p>population {country.population}</p> <h3>Spoken languages</h3> <ul> { country.languages.map((language) => <l...
Python
UTF-8
734
2.75
3
[]
no_license
#Problem ID: 3191 #Submit Time: 2013-04-24 10:15:49 #Run Time: 10 #Run Memory: 320 #ZOJ User: calvinxiao import sys def getline(): return sys.stdin.readline() def getint(): return input() def getints(): return map(int, raw_input().split()) def getlist(): return raw_input().split() #sy...
Python
UTF-8
621
3.34375
3
[]
no_license
class Notebook(): # Class attributes here def __init__(self, entries=[]): """ Document constructor method """ # journal_entries is public because we can use helper functions to string together a list of all our # notes, tasks, and priority items, then write it to a file,...
Python
UTF-8
3,418
3.65625
4
[]
no_license
import pandas as pd import re def remove_percents(df, col): column = list(df[col]) new_col = [] for element in column: if type(element)== float: new_col.append(element) continue new_col.append(float(element.split("%")[0])) new_series = pd.Series(new_co...
Java
UTF-8
629
2.0625
2
[]
no_license
package com.toby.provider; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import org.springframework.validation.annotation.Validated; @ConfigurationProperties(prefix ...
TypeScript
UTF-8
340
2.78125
3
[]
no_license
import { IRandom } from '../interfaces/IRandom'; import { Injectable } from '@nestjs/common'; @Injectable() export class RandomService implements IRandom { public integer(start: number, end: number): number { const random = Math.random(); const randomBetween = (random * end) + start return Math.floor(ra...
Markdown
UTF-8
1,205
2.90625
3
[ "Apache-2.0" ]
permissive
# Drone ## Get Drones ### HTTP Request `GET http://tango.avetics.com/api/v1/drones` > JSON response: ```json { "data": [ { "id": "3", "type": "drones", "attributes": { "name": "Drone 101", "status": "Ok", "devise-sn": "" } }, { "id": "5", "t...
Java
UTF-8
2,350
4.03125
4
[]
no_license
package _4.dp; import java.util.Map; /** * 72.最小的编辑距离 - hard * https://leetcode-cn.com/problems/edit-distance/solution/bian-ji-ju-chi-by-leetcode/ * 编辑距离算法被数据科学家广泛应用,是用作机器翻译和语音识别评价标准的基本算法。 * 子问题:D[n][m] 表示输入单词长度为 n 和 m 的编辑距离 * D[i][j] 表示 word1 的前 i 个字母和 word2 的前 j 个字母之间的编辑距离 *我们获得 D[i-1][j],D[i][j-1] 和 D[i-1][j...
Markdown
UTF-8
2,957
2.671875
3
[ "LicenseRef-scancode-generic-cla", "CC-BY-4.0" ]
permissive
--- layout: developer title: Using Dweet with Android --- <div class="page-header"> <h1> Using Dweet with Android</h1> </div> <p>Open settings in Open XC android app</p> ![OpenXC Enabler Status image](/images/dweet-instructions-image1.png) <br> <br> <br> <p>Click “Recording”</p> ![OpenXC Enabler recording im...
Python
UTF-8
3,706
3.109375
3
[ "MIT" ]
permissive
# coding: utf-8 # In[25]: import nltk import csv import pickle from nltk.classify.scikitlearn import SklearnClassifier from sklearn.naive_bayes import MultinomialNB,BernoulliNB from sklearn.linear_model import LogisticRegression,SGDClassifier from sklearn.svm import SVC, LinearSVC, NuSVC # In[26]: f=open('/home/a...
Java
UTF-8
2,954
2.015625
2
[]
no_license
package org.castor.jaxb.reflection.processor.field; import java.lang.annotation.Annotation; import javax.xml.bind.annotation.XmlElementWrapper; import org.apache.commons.lang3.StringUtils; import org.castor.core.annotationprocessing.AnnotationProcessor; import org.castor.core.nature.BaseNature; import org.castor.jax...
Python
UTF-8
2,267
2.65625
3
[ "MIT" ]
permissive
''' matplotlib datasets ''' import numpy as np from matplotlib import pyplot as plt from mpl_toolkits import mplot3d class DatasetPlotter(object): def __init__(self, ax): self.ax = self._gca(ax) # axes object @staticmethod def _gca(ax): if ax is None: ax = plt.gca() else: assert isinstance(...
Python
UTF-8
2,773
2.765625
3
[]
no_license
from django.shortcuts import render # Create your views here. from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from .models import Page import urllib.parse import urllib.request from xml.sax.handler import ContentHandler from xml.sax import make_parser import sys titulares =...
Markdown
UTF-8
6,385
2.578125
3
[]
no_license
# Notes Part 6 ## Episode 58: The Will to Power The Flock take a bow in the wake of their arena victory, and head to the meeting room where the new treatise of Reece will be signed. They are greeted by Ephialtes (EFF-ee-all-tees), former magnate of the black faction, who coyly gave them a tip for their victory and im...
C#
UTF-8
9,984
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; using WebREST.Models; using MySql.Data.MySqlClient; using System.Security.Cryptography; using System.Text; namespace WebREST.Services { public class ContactRepository { private const string CacheKey = "ContactStore"; ...
C++
GB18030
1,532
3.234375
3
[]
no_license
//************************************************************************* // // 9㷨ܽо // // 2017-06-06 // //************************************************************************* #pragma once #include <string> #include <iostream> #include <t...
Markdown
UTF-8
9,618
2.671875
3
[ "Apache-2.0" ]
permissive
# Istio in a Kubernetes Engine Cluster ## Table of Contents <!--ts--> - [Istio in a Kubernetes Engine Cluster](#istio-in-a-kubernetes-engine-cluster) * [Table of Contents](#table-of-contents) * [Introduction](#introduction) * [Architecture](#architecture) + [Istio Overview](#istio-overview) - [Istio Co...
Java
UTF-8
21,776
2.15625
2
[]
no_license
package no.hioa.crawler.parser; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Scanner; import java.util.StringTokenizer; import java.u...
Shell
UTF-8
306
3.09375
3
[]
no_license
#!/bin/bash # Increase swap space from 4GB to 13GB # Usage: `_set_swap 13G` swap_file=/mnt/swapfile swap_file_size="${1}" sudo swapoff $swap_file sudo rm -f $swap_file sudo fallocate -l $swap_file_size $swap_file sudo chmod 600 $swap_file sudo mkswap $swap_file sudo swapon $swap_file sudo swapon --show
PHP
UTF-8
1,702
2.984375
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace site\models; use common\models\User; use yii\base\Model; use Yii; /** * change password form */ class ChangePasswordForm extends Model { public $old_password; public $new_password; private $user; /** * Creates a form model * * @param object $...
C#
UTF-8
11,410
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Web.Script.Serialization; using FluentValidation; using Model; using Service.Utilities; using System.Linq.Expressions; using System.Reflection; using AutoMapper.Internal; using FluentValidation.Results; namespace ...
Java
UTF-8
1,764
2.546875
3
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package AnalyzersAndFilters.Window; import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.lucene.document.Document; import org.apache.lucene.docu...
JavaScript
UTF-8
2,490
2.515625
3
[]
no_license
import { Paper, makeStyles, ButtonBase, Chip } from "@material-ui/core"; import React, { useEffect, useState } from "react"; import CategoriesContainer from "./CategoriesContainer"; import Filter from "./Filter"; const useStyles = makeStyles((theme) => ({ container: { position: "relative", width: "300px", ...
JavaScript
UTF-8
1,901
2.53125
3
[]
no_license
var express = require('express'); var router = express.Router(); let mongoose = require('mongoose'); //let signupControl = require('../controller/signupcontrol'); //let loginControl = require('../controller/logincontrol'); let movieSearch = require('../controller/moviecontrol'); /*route for signup*/ //router.get('/si...
C++
UHC
8,656
2.84375
3
[ "MIT" ]
permissive
#ifndef NEURALNETWORK_H_INCLUDED #define NEURALNETWORK_H_INCLUDED #include <wiz/global.h> /// for toString #include <wiz/newArrays.h> namespace wiz { // namespace NN // 0 or 1 template <typename INTEGER, typename NUMBER> INTEGER up(const NUMBER nx) /// move to main.cpp? { i...
Python
UTF-8
2,793
2.875
3
[ "Apache-2.0" ]
permissive
""" """ import pytest from bitvector import BitVector @pytest.mark.fast def test_bitvector_shift_negative(BV_1: BitVector): with pytest.raises(ValueError): BV_1 << -1 with pytest.raises(ValueError): BV_1 >> -1 @pytest.mark.fast def test_bitvector_shift_boundries(BV_1: BitVector, BV_HI: B...
Markdown
UTF-8
1,187
3.5
4
[]
no_license
不难得出结论:f(n) = f(n-1) + f(n-2) + ***+1 第一思路是递归外面套一个for循环,但是累加值依赖于返回值: 1、如果使用内部类,count作为参数每次返回结果都是1 ``` def helper(num,count) if num == 1: return 1 *** count += helper(num,count) 等价于 a = helper(num,count) count +=a *** 这样每次传进去的count值始终为0,最后返回的count其实只是计算了递归次数 *** ``` ...
C#
UTF-8
3,140
2.546875
3
[]
no_license
using MobileSchoolAPI.Models; using MobileSchoolAPI.ParamModel; using MobileSchoolAPI.ResultModel; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MobileSchoolAPI.BusinessLayer { public class GetExamScheduleBL { public object GetExamSchedule(ParamExamSche...
C
UTF-8
1,176
3.109375
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#include <stdio.h> #include <stdlib.h> #include <os2.h> /* declare the assembler function as 16 bit */ VOID _THUNK_FUNCTION (TEST) (ULONG); /* build an interface between the calling programm and the thunk function */ USHORT fill_array(ULONG i) { return((USHORT) (_THUNK_PROLOG(4); _THUNK_FAR16(i)...
PHP
UTF-8
2,246
2.65625
3
[ "ISC" ]
permissive
<?php /** * Class WPXRPINFO_Ledger * Contains code by Jesper Wallin (WooCommerce XRP Plugin https://github.com/empatogen/woocommerce-xrp) */ class WPXRPINFO_Ledger { private $node = false; private $headers = []; /** * Ledger constructor. * @param $node * @param $proxy */ functi...
Ruby
UTF-8
131
3.375
3
[]
no_license
puts "計算をはじめます" puts "2つの値を入力してください" a = gets.to_i b = gets.to_i puts "a * b = #{a * b}"
Markdown
UTF-8
671
2.734375
3
[ "MIT" ]
permissive
###LPF A 24db per octave resonant filter. Example: ```javascript d = XOX( 'x*o*x*o-' ) l = LPF() l.cutoff = Add( .4, Sine(.2, .3)._ ) l.resonance = 4 d.fx.add( d ) ``` #### Properties * _cutoff_ : Default range: { 0, 1 }. Float. The cutoff frequency for the filter measured from 0 to 1 where 1 is nyquist. In prac...
Markdown
UTF-8
1,514
2.796875
3
[ "MIT" ]
permissive
--- title: "Las cosas pequeñas importan" date: 2020-05-17 author: arthur tags: [principio] description: Uno de los principios fundamentales en el desarrollo de software que aparecen incluso en la vida misma --- Si alguna vez escuchaste las frases: "Dios está en los detalles" o "La honestidad en las cosas pequeñas no e...
Java
UTF-8
5,016
2.546875
3
[]
no_license
package com.sample.demo.controller; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; impo...
PHP
UTF-8
2,293
3.5
4
[ "MIT" ]
permissive
<?php namespace Brick\Html; /** * Represents an HTML tag. */ abstract class Tag { /** * The tag name. * * @var string */ protected $name; /** * The tag attributes as an associative array. * * @var array */ protected $attributes; /** * Class construc...
Java
UTF-8
977
3.375
3
[ "MIT" ]
permissive
package interview.tree; public class TreeCreator { public TreeNode createSampleTree() { TreeNode root = new TreeNode('A'); root.setLeft(new TreeNode('B')); root.getLeft().setLeft(new TreeNode('D')); root.getLeft().setRight(new TreeNode('E')); root.getLeft().getRight().setLeft(new TreeNode('G')); ...
C++
UTF-8
1,608
2.53125
3
[]
no_license
#include "quadrangle.h" Quadrangle::Quadrangle(QVector3D p1, QVector3D p2, QVector3D p3, QVector3D p4): point1(p1), point2(p2), point3(p3), point4(p4), t1(p1, p2, p3), t2(p3, p4, p1) { box.x_max = max({point1.x(), point2.x(), point3.x(), point4.x()}); box.x_min = min({point1.x(), point2.x(), point3.x(), po...
C#
UTF-8
1,483
3.359375
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using Xunit; using System.Linq; using Algorithms.Code; namespace Algorithms.Tests.Code { public class RecursionTests { [Theory] [InlineData(5, 0)] [InlineData(2, -2)] [InlineData(0, 0)] [InlineData(-2, 0...
Rust
UTF-8
13,117
2.65625
3
[]
no_license
use std::net::{TcpStream, UdpSocket, ToSocketAddrs}; use std::fs::File; use std::io::Read; use std::io::Write; use byteorder::{NetworkEndian, LittleEndian, ByteOrder}; use std::str; extern crate get_if_addrs; extern crate resolve; extern crate byteorder; extern crate bytes; extern crate minilzo; #[derive(Copy, Clone,...
C#
UTF-8
555
2.59375
3
[]
no_license
using HomeAutomation.Models.Abstract; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace HomeAutomation.Extensions { public static class ModelBuilderExtensions { public static void SeedData<T>(this ModelBuilde...
Java
UTF-8
874
3.375
3
[]
no_license
import java.util.Scanner; public class codeup_1097 { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int[][] arr = new int[19][19]; for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr[i].length; j++) { arr[i][j] = scanner.nextInt(); } } int n = sca...
JavaScript
UTF-8
6,899
3.3125
3
[]
no_license
/** * AdaptoidBoard * @constructor */ function AdaptoidBoard(scene, game, radiusOfTile, heightOfTile) { this.scene = scene; this.game = game; this.radiusOfTile = radiusOfTile; this.heightOfTile = heightOfTile; this.widthBoard = 7 * this.radiusOfTile * 2; this.tiles = []; thi...
Python
UTF-8
3,090
2.78125
3
[]
no_license
# Import dependencies import pandas as pd import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, inspect, func from flask import Flask, jsonify import datetime as dt import numpy as np # Create engine engine = create_engine("sqlite:///...
PHP
UTF-8
310
2.796875
3
[]
no_license
<?php namespace App\Classes; abstract class AbstractCommand { protected $firstPart; protected $secondPart; protected $firstBlock; protected $secondBlock; protected $fistPartValues = ['move','pile']; protected $secondPartValues = ['over','onto']; protected $exitCommand = 'quit'; }
Markdown
UTF-8
8,246
2.9375
3
[]
no_license
一、CSS概述 CSS是Cascading Style Sheets的简称,中文称为层叠样式表,对html标签的渲染和布局 CSS 规则由两个主要的部分构成:选择器,以及一条或多条声明。 ![css](https://images2017.cnblogs.com/blog/1184802/201709/1184802-20170919171511556-1338428350.png) 二、CSS的四种引入方式 1.行内式 行内式是在标记的style属性中设定CSS样式这种方式没有体现出CSS的优势,不推荐使用。 ![](https://images2017.cnblogs.com/blog/1184802/201709...
C++
UTF-8
418
2.609375
3
[]
no_license
#pragma once #include "Edge.h" namespace DataStructures { class EdgeList { public: EdgeList(Vertex* root); ~EdgeList(); bool MatchesKey(int key); Vertex* GetRoot(); void AddEdge(Edge* newEdge); std::list<Edge*> GetEdges(); private: bool Validate...
Markdown
UTF-8
1,890
2.625
3
[ "MIT" ]
permissive
# BSplineImgInterp Image Interpolation mex file for matlab allowing 2nd to 9th order BSplines. This is a simple wrapper use the excellent image interpolation code provided by P. Thevenaz on http://bigwww.epfl.ch/thevenaz/interpolation/interpolation.html. The file BSplineImgInterp.c can be compiled using the matlab mex...
Python
UTF-8
2,584
2.890625
3
[]
no_license
''' Injury Data from http://nhlinjuryviz.blogspot.ca/p/index-page.html ''' import pandas as pd import re # TODO: Get victim's team inj = pd.read_csv('NHL_Injuries.csv') # TODO: Change this CSV to the new stats one dops = pd.read_csv('Scrubbed_CSV.csv', encoding='latin1') def reformat_season_year(row)...
Markdown
UTF-8
1,026
2.78125
3
[]
no_license
Joshua Renewed the Covenant 15-13 =================================== **When Joshua was an old man**, he called all the people of **Israel** together. Then Joshua reminded the people of their obligation to **obey** the **covenant** that **God** had made with the **Israelites** at **Sinai**. The people **promised** to...
Java
UTF-8
1,471
2.296875
2
[]
no_license
package nl.Programit.urenregistratieModel1; import java.util.Date; public abstract class Persoon { private String voorNaam; private String achterNaam; private String straatNaam; private String postCode; private String woonPlaats; private int huisNummer; private Date geboorteDatum; private String rekeningNumm...
Java
UTF-8
682
3.296875
3
[]
no_license
package com.question.eg029; public class ReverseLinkedListUsingIterativeApproachTester { public static void main(String args[]) { LinkedList list = new LinkedList(); Node head = new Node(1); list.insertAtEnd(head); list.insertAtEnd(new Node(2)); list.insertAtEnd(new Node(3)); list.insertAtEnd(new Node(4...
Java
UTF-8
343
2.671875
3
[]
no_license
package com.javaguru.lesson4; import java.util.Random; public class NumberUtils { public static int getRandomNumber(){ Random random = new Random(); return random.nextInt(101); } public static int getRandomNumber(int bound) { Random random = new Random(); return random.n...
C++
UTF-8
2,740
2.75
3
[]
no_license
/******************************************************************************/ #ifndef _UTILITY_H_ #define _UTILITY_H_ /******************************************************************************/ /******************************************************************************/ namespace MG { public ref class...
Java
UTF-8
5,586
2.15625
2
[]
no_license
package com.example.demo.controller; import com.example.demo.configuration.Messages; import com.project.core.model.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.*; import org.springframework.security.core.Authentication; import org.springframework.security.core.co...
Python
UTF-8
1,058
3.125
3
[]
no_license
class employee: def __init__(self): self.eno=int(input("enetr the number")) self.ename=input("enter the name") self.dsg=input("enetr the designation") self.bsal=float(input("enetr the basic sal")) def calemploy(self): self.da=self.bsal*0.2 self.ta=self.bsal*0.1 self.cca=self.bsal*0.02 self.m...
Java
UTF-8
12,503
2.703125
3
[]
no_license
package com.zookeeper; import java.io.IOException; import java.util.ArrayList; import java.util.Random; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookee...
Python
UTF-8
450
2.953125
3
[]
no_license
import os def f(x): "User function calling an external script" # write variables to file f = open('energy_calc/variables.in', 'w') for i in range(len(x[0])): f.write('%15.7f\n'%(x[0][i])) f.close() # call bash script for AMBER simulation os.system('energy_calc/run_4D.sh') # r...
C#
UTF-8
3,156
2.515625
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Reflection; using System.Text; using DTcms.DBUtility; using DTcms.Common; using System.Linq; namespace DTcms.DAL { /// <summary> /// 数据访问类:OAuth应用 /// </summary> public partial c...
C
UTF-8
670
3.28125
3
[]
no_license
/*................................A programe by Mr.Arijit Ghosh.............................................*/ /*...............................To display the fibonanci series............................................*/ #include<stdio.h> int main() { int first,second,temp,end; printf("\t\t\t\tFibona...
Shell
UTF-8
131
2.734375
3
[]
no_license
#!/bin/bash function warn() { echo -en "$col_yellow[warning] $col_white" echo "$@" echo -en "$col_reset" } warn "$@"
Java
UTF-8
416
1.757813
2
[]
no_license
/** * Copyright (c) 2000-2006, Serhiy Yevtushenko * All rights reserved. * Please read license.txt for licensing issues. **/ package conexp.core.compareutils; import conexp.core.Lattice; public class LatticeComparator extends ConceptCollectionComparator { public LatticeComparator(Lattice one, Lattice two)...
C#
UTF-8
3,908
2.53125
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DrawOnTexture : MonoBehaviour { RenderTexture rt; public Texture2D brush; public int brushSize; Texture2D currentPaintMap; public Renderer worms; Material mat; [HideInInspect...
JavaScript
UTF-8
364
4.28125
4
[]
no_license
/* Instructions: A function called 'callAFunction' is defined below. Please call the function three different times Each call should have these return values. First call: 12 Second call: 0 Third call: NaN BE SURE TO PRINT THE VALUE OF YOUR FUNCTION CALLS */ function callAFunction(num1, num2) { ret...
C#
UTF-8
1,718
2.515625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Data.SqlClient; using Entidad; namespace Persistencia { public class datCliente { #region singleton private static readonly datCliente _instancia ...
Java
UTF-8
977
3.25
3
[]
no_license
package hw4; import java.awt.Color; import api.Block; import api.Cell; import api.Position; /** * Subclass for the T-shaped Shape * * @author Gendid * */ public class TShape extends AbstractShape { /** * Creates a T-shaped shape * * @param position * Origin position of ...
C#
UTF-8
2,316
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Practices.EnterpriseLibrary.Logging; namespace DataControl.Impl { public class ExceptionHandler { public static bool WriteLog(Exception ex, Dictionary<string, string> dic) { String...
Java
UTF-8
1,170
3.0625
3
[ "MIT" ]
permissive
package tictactoe.core; import tictactoe.core.players.PlayerSymbol; import java.util.Optional; import java.util.function.Function; public class Tile { private Optional<PlayerSymbol> playerSymbol; private int index; Tile(int index) { this.index = index; this.playerSymbol = Optional.empty...
PHP
UTF-8
1,957
2.546875
3
[]
no_license
<?php session_start(); require_once('conexion.php'); require_once('saneo.php'); $p=$_POST; $clase=new pv(); $r=$clase->pvi($p); /** * */ class pv { private $con; private $s; function __construct() { $this->con=new Database(); } public function pvi($p) { header("Content-type: text/plain...
C++
UTF-8
398
3.4375
3
[]
no_license
#include <iostream> using namespace std; int main() { int number, i; bool flag; flag = true; cout<<"Enter a number\n"; cin>>number; for(i=2; i<number/2;i++){ if(number%i==0){ flag = false; break; } } if(flag==true){ cout<<number<<"\nPrime N...
Go
UTF-8
451
3.34375
3
[ "BSD-3-Clause", "CC-BY-4.0", "LicenseRef-scancode-google-patent-license-golang" ]
permissive
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "unsafe" ) var intGlo int func main() { r := bar(&intGlo) fmt.Printf("r value is %d", r) } func bar(a *int) int { p := (*in...
Java
UTF-8
3,200
3.796875
4
[]
no_license
//************************************************************************ // Stars.java Author: Benjamin Prud'homme // Draws a triangle or diamond of a size specified by the user on the // screen with asterisks. //************************************************************************ import java.util.Scanner; pu...
JavaScript
UTF-8
1,516
2.6875
3
[]
no_license
/*global exports, setInterval, clearInterval, document, PVector, getRandomNumber */ (function (exports) { 'use strict'; var ParticleSystem = (function () { function ParticleSystem(opts) { var opts = this.getOptions() || {}; this.burst = opts.burst || 1; } ParticleSystem.prototype.getOp...
Java
UTF-8
1,042
2.953125
3
[]
no_license
package com.benjaminran.intonationcore; import be.tarsos.dsp.util.PitchConverter; public class Pitch implements Comparable<Pitch> { private double absoluteCents; private double frequency; private double time; public Pitch(double absoluteCents, double frequency, double time) { this.absoluteCe...
Markdown
UTF-8
7,885
2.59375
3
[ "Apache-2.0" ]
permissive
# Getting Started ## ダウンロードとインストール NLP4L/nlp4lの配布用ZIPファイルをダウンロードして、解凍しましょう。 * ダウンロードサイト:https://github.com/NLP4L/nlp4l/releases ```shell mkdir -p /opt/nlp4l cd /opt/nlp4l wget https://github.com/NLP4L/nlp4l/releases/download/rel-x.x.x/nlp4l-x.x.x.zip unzip nlp4l-x.x.x.zip cd nlp4l-x.x.x ``` ## NLP4LのGUIツール ##...
Java
UTF-8
1,082
2.875
3
[]
no_license
package PizzaFactory; import IngredientFactory.NYPizzaIngredientFactory; import IngredientFactory.PizzaIngredientFactory; import Pizza.Pizza; import Pizza.ChicagoStyleCheesePizza; import Pizza.NYStyleVeggiePizza; import Pizza.NYStyleClamPizza; import Pizza.NYStylePepperoniPizza; /** * @author sqw123az@sina.com * @d...
C
UTF-8
1,816
2.78125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* commands1.c :+: :+: :+: ...
Go
UTF-8
548
3.015625
3
[]
no_license
package utils import xerrors "github.com/pkg/errors" // 工具包内所有panic 转 error 向上抛 // 默认运行时异常处理,panic 转 error func deferError(msg string) { if r := recover(); r != nil { switch x := r.(type) { case string: errMsg = xerrors.New(x) case error: if xerrors.Cause(x) == x { //根因 errMsg = xerrors.Wrap(x, msg) ...
JavaScript
UTF-8
662
2.578125
3
[]
no_license
const Discord = require('discord.js'); const actions = require('../json/actions.json'); exports.run = async (bot, message, args) => { try { //for(i = 0; i < actions.winkP.length; i++) { const embed = new Discord.RichEmbed() .setColor('#FBCFCF') //.setImage(actions.winkP[args[0]]); .setImage...
C
UTF-8
561
3.1875
3
[]
no_license
#include <stdio.h> #include "ponto.h" #include "circulo.h" int main() { Ponto* p1 = pto_cria(8.0,15.0); // aloca dinamic. Ponto* p2 = pto_cria(8.0, 16.0); Circulo* circ = circ_cria(p2, 4.9); printf ("Area do Circulo: %.2f\n", circ_area(circ)); if(circ_interior(circ,p1) == 1 ) { prin...
Java
UTF-8
571
1.570313
2
[]
no_license
package com.lee.springbootdemo.service.impl; import com.lee.springbootdemo.entity.PcCpmReview; import com.lee.springbootdemo.mapper.PcCpmReviewMapper; import com.lee.springbootdemo.service.PcCpmReviewService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Serv...
Java
UTF-8
597
1.84375
2
[]
no_license
package com.quanliren.quan_one.activity.group; import android.os.Bundle; import com.quanliren.quan_one.activity.R; import com.quanliren.quan_one.activity.base.BaseActivity; import com.quanliren.quan_one.fragment.ChosePositionFragment; public class ChoseLocationActivity extends BaseActivity{ @Override protected vo...
Java
ISO-8859-1
10,156
2.703125
3
[]
no_license
package application; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.PrintStream; import java.net.Socket; import java.util...
C#
UTF-8
1,520
2.71875
3
[]
no_license
using System; using System.Text.RegularExpressions; using RadioReport.Common.Consts; namespace RadioReport.Common.Helpers { public static class RridHelper { private const string _uniPrefix = "uni"; public static bool CompareRridPageNumber(string rrid, byte pageNumber) { va...
C++
UTF-8
822
2.71875
3
[]
no_license
#include <fcntl.h> #include <sys/stat.h> #include <unistd.h> #include <iostream> #include <poll.h> #include "../Include/Pipe.hpp" #include "../Include/String_Utils.hpp" #include "../Include/File_Utils.hpp" using namespace String; using namespace File; Wrappers::Pipe::Pipe(const char *path, const size_t buffer_size) ...
Python
UTF-8
343
3.171875
3
[]
no_license
from matplotlib import pyplot as plt from matplotlib import style style.use("ggplot") x= [5,8,12] y= [12,16,6] x1= [6,9,11] y1= [6,15,17] plt.plot(x,y,'g',label="line 1", linewidth=5) plt.plot(x1,y1,'c',label="line 2", linewidth=5) plt.title("Info") plt.ylabel("Y-axis") plt.xlabel("X-axis") plt.legend() plt.grid(Tru...
Python
UTF-8
3,643
2.984375
3
[]
no_license
import tensorflow as tf from tensorflow.keras.layers import Dense, Conv1D, Embedding, GlobalMaxPooling1D from tensorflow.keras import Model from tensorflow import keras as kr import sys import numpy as np """ 用于文本分类的app,加载模型输入预测值,输出预测结果。右键直接运行查看 """ # 要使用模型 先还原模型 checkpoint_path = r"./ckpt/cnn_model/cnn_model.ckpt" e...
Markdown
UTF-8
2,060
3.03125
3
[]
no_license
# laravel-push-notification Based off of https://github.com/davibennun/laravel-push-notification with support for Laravel 5 and 5.1. Installation ---- Update your `composer.json` file to include this package as a dependency ```json "byrontudhope/pushnotificationlaravel": "dev-master" ``` Register the PushNotificat...
Java
UTF-8
1,311
2.21875
2
[]
no_license
package org.tensorflow.demo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import org.tensorflow.demo.R; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) ...
C++
UTF-8
521
3.046875
3
[]
no_license
bool searchMatrix(vector<vector<int>>& matrix, int target) { int row_num = matrix.size(); int col_num = matrix[0].size(); int begin = 0, end = row_num * col_num - 1; while(begin <= end){ int mid = (begin + end) / 2; int mid_value = matrix[mid/col_num][mid%col_num]; if( mid_value == target){ ...
Markdown
UTF-8
5,131
3.265625
3
[]
no_license
title: Haskell-2 date: 2015-09-25 19:32:14 category: Haskell tags: [Haskell] --- # Case Expressions and Pattern Matching `As-patterns` 语法糖 ``` haskell f s@(x:xs) = x:s -- where s means (x:xs) ``` `Wild-cards 通配符` `head (x: _) = x`, actually we don't care where _ is, but in fact, we all know _ must a list, for `:` oper...