text stringlengths 2 1.04M | meta dict |
|---|---|
'use strict';
const Blog = require('../models/Blog');
/**
* GET /blog
*/
exports.getIndex = (req, res) => {
Blog.find({owner: req.user.id}, (err, result, next) => {
if (err) {
return next(err);
}
res.render('blog/index', {
blogs: result,
title: 'Articl... | {
"content_hash": "fa25561e81d54cd368b7ac647f8d52eb",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 73,
"avg_line_length": 22.79230769230769,
"alnum_prop": 0.5072561592980088,
"repo_name": "alexgoncharcherkassy/express-blog",
"id": "ace0f268a6ece65aef493a6d55f5fd18cd46869e... |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | {
"content_hash": "3b70f89b301227e0ff99b1bf72f2f842",
"timestamp": "",
"source": "github",
"line_count": 361,
"max_line_length": 562,
"avg_line_length": 41.90027700831025,
"alnum_prop": 0.4781832606108687,
"repo_name": "kuhlenh/port-to-core",
"id": "cbf63cf01f8b3fc62c041197634c2661caba5025",
"size":... |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
import logging
import emission.storage.timeseries.abstract_timeseries as est... | {
"content_hash": "74dda49e463f37253f5a0f0c08f2ac0c",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 113,
"avg_line_length": 44.285714285714285,
"alnum_prop": 0.7064516129032258,
"repo_name": "shankari/e-mission-server",
"id": "3eb81c7ace07d472f74736aef826474837546f73",
"s... |
static const NSInteger kVideoListCellThumbnailTag = 0x78;
#pragma mark Private methods
@interface VideoListViewController (Private)
- (void)requestVideosForActiveSection;
@end
@implementation VideoListViewController
@synthesize dataManager;
@synthesize videos = _videos;
@synthesize videoSections;
@synthesize act... | {
"content_hash": "999eb0ee7d7c26599265d9a10277553e",
"timestamp": "",
"source": "github",
"line_count": 253,
"max_line_length": 121,
"avg_line_length": 32.980237154150196,
"alnum_prop": 0.7068552253116012,
"repo_name": "modolabs/Harvard-Tour-iOS",
"id": "abe8a5b4a852b0f3a076a6fce41942d8254cf728",
"... |
package org.hawkular.inventory.api;
import org.hawkular.inventory.api.model.DataEntity;
import org.hawkular.inventory.api.model.RelativePath;
import org.hawkular.inventory.api.model.StructuredData;
import org.hawkular.inventory.api.paging.Page;
import org.hawkular.inventory.api.paging.Pager;
/**
* @author Lukas Kre... | {
"content_hash": "0400063561fdc0a6347c278617ce42f4",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 118,
"avg_line_length": 39,
"alnum_prop": 0.6410256410256411,
"repo_name": "jkandasa/hawkular-inventory",
"id": "d323298c8df83449c9f85626058891e1471eac75",
"size": "5708",... |
section.text
global_start ;must be declared for linker (ld)
_start: ;tells linker entry point
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system c... | {
"content_hash": "5a3c05e425b361b1c7daad5ae69efd6b",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 62,
"avg_line_length": 40.13333333333333,
"alnum_prop": 0.5182724252491694,
"repo_name": "zhmz90/Daily",
"id": "e25a3b0d0f67e12d214cc0c180ad05d0479c949b",
"size": "602",
... |
package dialogs;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.Empty... | {
"content_hash": "ebc81482e56e508c843fc96d29b9814a",
"timestamp": "",
"source": "github",
"line_count": 118,
"max_line_length": 106,
"avg_line_length": 31.89830508474576,
"alnum_prop": 0.6182252922422954,
"repo_name": "ProgettoRadis/ArasuiteIta",
"id": "6723fc31890133eccad0fd1b8a902f03acd83e1b",
"s... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_33) on Tue Aug 20 12:20:55 EDT 2013 -->
<TITLE>
mars
</TITLE>
<META NAME="date" CONTENT="2013-08-20">
<LINK REL ="stylesheet" TYPE="text/css" HREF=... | {
"content_hash": "1bb3772ef9fdb64648beca50c7254a21",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 112,
"avg_line_length": 30.017543859649123,
"alnum_prop": 0.695499707773232,
"repo_name": "aaaustin10/Mars",
"id": "7948d04679ce1458d21a8d71056f569b8a052189",
"size": "1711... |
package com.github.jparse;
import static com.github.jparse.ParseResult.failure;
import static java.util.Objects.requireNonNull;
final class PhraseParser<T, U> extends FluentParser<T, U> {
private final Parser<T, ? extends U> parser;
PhraseParser(Parser<T, ? extends U> parser) {
this.parser = requi... | {
"content_hash": "aa484bbe7104952c5d119944f734d793",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 73,
"avg_line_length": 28.12,
"alnum_prop": 0.6401137980085349,
"repo_name": "yngui/jparse",
"id": "385cd3d073e63604b7e0489987a38c23d4cb0305",
"size": "1845",
"binary": f... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | {
"content_hash": "c54b69ede1043d1802db0e7b30a4de62",
"timestamp": "",
"source": "github",
"line_count": 187,
"max_line_length": 79,
"avg_line_length": 28.080213903743317,
"alnum_prop": 0.6842506189297277,
"repo_name": "rsocket/rsocket-cpp",
"id": "c5128152ec764d7717f323ac70989b74cc285577",
"size": ... |
<?php
/*
* Simple WordPress URL change
* Run me in the browser, no config required in here.
*/
?>
<html>
<head>
<style>body { padding-top: 60px; font-family: monospace; background: black; color: #18e113; } label{ width: 155px; display: block; float: left; } form div {margin: 5px 0; } #warning { font-size: 18px; wi... | {
"content_hash": "d256f802181f186599f8d71d2ddca540",
"timestamp": "",
"source": "github",
"line_count": 133,
"max_line_length": 450,
"avg_line_length": 43.62406015037594,
"alnum_prop": 0.5942778352292313,
"repo_name": "LukeKM7/simple-wp-url-change",
"id": "2831c4d06055db30a1d607e011206ce94b25d728",
... |
<?php
namespace Kpacha\Helmet\Plugin;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
/**
*
* @author Kpacha <kpacha666@gmail.com>
*/
class Plugin
{
/**
* @var string
*/
private $command;
/**
* @var string
*/
private $output;
/**
* @var TableN... | {
"content_hash": "a6fc46da9dde1517484eb9808ae52441",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 98,
"avg_line_length": 22.677419354838708,
"alnum_prop": 0.5462304409672831,
"repo_name": "kpacha/helmet",
"id": "e629a5e0567a907ce2412dfde914a7cbddcd3dac",
"size": "2109",... |
/*.postbox.acf_postbox > .inside > .field {
padding: 0 10px 30px;
}
#acf_after_title-sortables .acf_postbox > .inside > .field {
padding-top: 15px;
padding-bottom: 15px;
}
#acf_after_title-sortables .acf_postbox > .inside > .field:nth-last-child(2),
#normal-sortables .acf_postbox > .inside > .field:nth-last-child(2... | {
"content_hash": "c45b65259a93736377f9e26c39f0b834",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 77,
"avg_line_length": 19.135593220338983,
"alnum_prop": 0.6846767050487157,
"repo_name": "MrVoltz/wordpress-bootstrap",
"id": "118522a5f1992d92edd39184104120b1f53dc4ef",
"... |
/**
* @class SlideNavigationExample.controller.Main
*
* This {@link Ext.app.Controller} serves as a demonstration of how to
* listen to various events relating to a {@link Ext.ux.slidenavigation.View}.
*
*/
Ext.define("SlideNavigationExample.controller.Main", {
extend: 'Ext.app.Controller',
config... | {
"content_hash": "083252868f90ceb26595db9ec22ec259",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 97,
"avg_line_length": 31.197183098591548,
"alnum_prop": 0.4654627539503386,
"repo_name": "wnielson/sencha-SlideView",
"id": "a56fced9aae6146916b750a7873e36e153eb0091",
"si... |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Routing;
using FakeN.Web;
using Microsoft.Owin.Host.SystemWeb.Tests.FakeN;
namespace Microsoft.Owin.Host.SystemWeb.Tests
{
public class TestsBase
{
protected bool WasCalled { get; set; }
protected ID... | {
"content_hash": "d2c5dc1960843d98a72cfd72f9517e66",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 116,
"avg_line_length": 36.291666666666664,
"alnum_prop": 0.6768082663605052,
"repo_name": "mind0n/hive",
"id": "c53197e7c35121f987d7030c61bbd333f6c83cd1",
"size": "1876",
... |
#pragma once
#include "Analyzer.h"
/*
keyword 1 Line
Keyword 2 Line
between (keyword1 , keyword2 ) Lines tiemstemp Interval
*/
enum E_BETWEEN_POS
{
BPOS_LINE_1 = 0,
BPOS_LINE_2,
BPOS_LINE_MAX
};
struct STBetween_Class
{
char *pKeyword[BPOS_LINE_MAX];
STDTime stPreTime;
STInterval stInterval;
};
class CAnal... | {
"content_hash": "dadeaaafb46c265d3aff253fff687246",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 55,
"avg_line_length": 16.073170731707318,
"alnum_prop": 0.7298937784522003,
"repo_name": "appleeh/leviathan",
"id": "90850c485700733fa4f8e7f7a74c9c23ac62d35a",
"size": "65... |
/*******************************************************************
** m a t h 6 4 . c
** Forth Inspired Command Language - 64 bit math support routines
** Authors: Michael A. Gauland (gaulandm@mdhost.cse.tek.com)
** Larry Hastings (larry@hastings.org)
** John Sadler (john_sadler@alum.mit.edu)
** Cre... | {
"content_hash": "f10f3fad7f2bad1353fe2372de26f828",
"timestamp": "",
"source": "github",
"line_count": 479,
"max_line_length": 98,
"avg_line_length": 29.532359081419624,
"alnum_prop": 0.5217729393468118,
"repo_name": "createuniverses/praxis",
"id": "419186e6433693fe4f2c612db0e0038b1fccf2b9",
"size... |
#include <osapi.h>
#include <os_type.h>
#include <c_types.h>
#include <user_interface.h>
#include "gpio.h"
#include "dhcommands.h"
#include "dhdebug.h"
#include "dhsender_queue.h"
#include "dhterminal.h"
#include "dhsettings.h"
#include "dhap.h"
typedef struct {
unsigned int magic;
unsigned int resetCounter;
} RES... | {
"content_hash": "1bc334e1d52714bc19d5e79b92f953d6",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 80,
"avg_line_length": 23.830985915492956,
"alnum_prop": 0.6932624113475178,
"repo_name": "clandestin/esp8266-firmware",
"id": "015fc4fee45e4e405812f3facccfb228839b44da",
"... |
using System;
using System.Linq;
namespace Breeze.Sharp {
// TODO: make immutable later
/// <summary>
/// A ValidationOptions instance is used to specify the conditions under which validation will be executed.
/// This may be set via the <see cref="EntityManager.ValidationOptions"/> property.
/// </summary... | {
"content_hash": "f00d7d259b28cf952f9f4ef450f9eff7",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 109,
"avg_line_length": 31.196428571428573,
"alnum_prop": 0.683457355466514,
"repo_name": "Breeze/breeze.sharp",
"id": "6166630f8ebe7f42565c6aa28d852e34eeee3910",
"size": "... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_listen_socket_modulo_21.c
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-21.tmpl.c
*/
/*
* @description
* CWE: 369 Divide by Zero
* BadSource: listen_socket Read data using a listen socket (serv... | {
"content_hash": "910b9968c69d6a5deaacf3d4c9380d03",
"timestamp": "",
"source": "github",
"line_count": 392,
"max_line_length": 124,
"avg_line_length": 27.841836734693878,
"alnum_prop": 0.5251969946857248,
"repo_name": "JianpingZeng/xcc",
"id": "7b2dd6e00fd6f8d266a002bd9f31dc43ee1140b0",
"size": "1... |
//
// AGDrawing.h
// HighlighterDetector
//
// Created by Aleksander Grzyb on 25/05/14.
// Copyright (c) 2014 Aleksander Grzyb. All rights reserved.
//
#ifndef __HighlighterDetector__AGDrawing__
#define __HighlighterDetector__AGDrawing__
#include <opencv2/opencv.hpp>
class AGDrawing {
public:
void static... | {
"content_hash": "4e6e925c16e6ed3fe6c53df12ae711c2",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 97,
"avg_line_length": 27.7,
"alnum_prop": 0.7111913357400722,
"repo_name": "aleksandergrzyb/HighlighterDetectorApplication",
"id": "7a8ea9345541e0a75f0a3e9c3c48f3423f9117a8"... |
using UnityEngine;
using System.Collections;
public class GameStorageRetriever
{
private GameStorageKey key;
private GameStorageRetriever(GameStorageKey key)
{
this.key = key;
}
public static GameStorageRetriever ForKey(GameStorageKey key)
{
return new GameStorageRetriever(key);
}
public GameStorage<T> ... | {
"content_hash": "224e2aea54d699dce817bedd9043817a",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 73,
"avg_line_length": 20.555555555555557,
"alnum_prop": 0.7873873873873873,
"repo_name": "alvarogzp/nextation",
"id": "27a98b6d369339e96237e8e335dadb9a05288d7e",
"size": "... |
#include "../challenge_1_5/challenge_1_5.h"
#include <climits>
#include <numeric>
inline int BitsSet(unsigned char c)
{
auto set = 0;
set += c >> 0 & 1;
set += c >> 1 & 1;
set += c >> 2 & 1;
set += c >> 3 & 1;
set += c >> 4 & 1;
set += c >> 5 & 1;
set += c >> 6 & 1;
... | {
"content_hash": "d32174b4cd9fe77e67e10d71c7433d4c",
"timestamp": "",
"source": "github",
"line_count": 115,
"max_line_length": 131,
"avg_line_length": 33.869565217391305,
"alnum_prop": 0.562772785622593,
"repo_name": "mrexodia/cryptopals",
"id": "ce9b299bbfea66addab34a0580e2a3766d5992f6",
"size": ... |
<?php
namespace Symfony\Bundle\FrameworkBundle\Command;
use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Completion\CompletionInput;
use Symfony\Component\Console\Comple... | {
"content_hash": "079c32b767a34179cc3f65e3813a006b",
"timestamp": "",
"source": "github",
"line_count": 304,
"max_line_length": 201,
"avg_line_length": 42.00328947368421,
"alnum_prop": 0.6137520557600439,
"repo_name": "symfony/framework-bundle",
"id": "c5c2da4a4407c908b9780f59e7595acf11018abc",
"si... |
extern "C"
{
#endif
/// Print input to stdout (convert to string if needed).
FORCE_EXPORT void sioPrint_(rtclosure *closure, rtdata data, rtt_t rtt);
EXPORT_CLOSURE(sioPrint)
/// Read a line of text from stdin.
FORCE_EXPORT rtstring *sioRead_(rtclosure *closure, rtt_t *retvalrtt);
EXPORT_CLOSURE(sioRead)
/// Rea... | {
"content_hash": "cb846c4cc9e48c8c218a0ff1f742f260",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 128,
"avg_line_length": 37.333333333333336,
"alnum_prop": 0.7461734693877551,
"repo_name": "orycho/Intro",
"id": "e9eadb19904c22b83b09e4ab7f9473f40c654cf4",
"size": "862",
... |
@implementation NSString (StringSize)
- (CGSize)sizeWithFont:(UIFont*)font maxSize:(CGSize)size
{
//特殊的格式要求都写在属性字典中
NSDictionary*attrs =@{NSFontAttributeName:font};
//返回一个矩形,大小等于文本绘制完占据的宽和高。
return [self boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:attrs context:ni... | {
"content_hash": "4139dc0d245216bb21dd75ce25ca7715",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 124,
"avg_line_length": 39.86666666666667,
"alnum_prop": 0.7876254180602007,
"repo_name": "315355504/KWTest",
"id": "c7ac6c4851b010c088f8ca8b3b2c137f2021d361",
"size": "822... |
import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Mixin.create({
deletedAt: DS.attr('date'),
isDeleted: function() {
return Ember.isPresent(this.get('deletedAt'));
}.property('deletedAt')
});
| {
"content_hash": "a7d76763d201b95d3a1cc8483942f628",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 50,
"avg_line_length": 23.1,
"alnum_prop": 0.6883116883116883,
"repo_name": "NullVoxPopuli/aeonvera-ui",
"id": "971d6c66f000c29aac2642408a48c414d5d0828a",
"size": "231",
... |
ActiveRecord::Schema.define(version: 20150828140021) do
create_table "sensitives", force: :cascade do |t|
t.string "encrypted_message"
t.string "encrypted_message_iv"
end
end
| {
"content_hash": "2f61be568c14e9658e60b4c3fb7bd1d5",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 55,
"avg_line_length": 23.625,
"alnum_prop": 0.7248677248677249,
"repo_name": "gsamokovarov/claude",
"id": "c03272e1a6e452b074730b5158de876c4aeea8ad",
"size": "930",
"bina... |
/*!
* jQuery Form Plugin
* version: 2.64 (25-FEB-2011)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(functi... | {
"content_hash": "fcec13f909016a2ebac2f02ef137c5e2",
"timestamp": "",
"source": "github",
"line_count": 807,
"max_line_length": 115,
"avg_line_length": 29.219330855018587,
"alnum_prop": 0.6105173876166242,
"repo_name": "mozilla/spark-eol",
"id": "b52f189eb98249a305a94a267a8a2ee4ee770c0a",
"size": "... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML style="overflow:auto;">
<HEAD>
<meta name="generator" content="JDiff v1.1.0">
<!-- Generated by the JDiff Javadoc doclet -->
<!-- (http://www.jdiff.org) -->
<meta name="description" content="JDiff is a Javadoc doclet which ... | {
"content_hash": "956adebcdf3072c8f27b16120e095763",
"timestamp": "",
"source": "github",
"line_count": 143,
"max_line_length": 366,
"avg_line_length": 44.81818181818182,
"alnum_prop": 0.6370728662817913,
"repo_name": "AzureZhao/android-developer-cn",
"id": "ad3f94b175157e6e16d4bee72c9aeca2669e2a5b",... |
package org.openkilda.floodlight.feature;
import static org.apache.commons.lang3.StringUtils.containsIgnoreCase;
import org.openkilda.model.SwitchFeature;
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.core.SwitchDescription;
import java.util.Optional;
public class PktpsFlagFeatu... | {
"content_hash": "d922240ce137b1c9f183e19ce60bbf43",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 118,
"avg_line_length": 40.285714285714285,
"alnum_prop": 0.6973995271867612,
"repo_name": "jonvestal/open-kilda",
"id": "a241d1d39edffea8d60cb303449176329c663177",
"size":... |
patternExample002
| {
"content_hash": "21aa9f40692d0564ae44b098ebaa6b6c",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 17,
"avg_line_length": 18,
"alnum_prop": 0.9444444444444444,
"repo_name": "fishkingsin/patternExample002",
"id": "ced3190da14469b2d2c9373b625fa8cf90a3b6ea",
"size": "38",
... |
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Params extends Model
{
//
}
| {
"content_hash": "db2a54115609e264921805482d9e9c10",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 39,
"avg_line_length": 10.2,
"alnum_prop": 0.7058823529411765,
"repo_name": "komorowskidev/laravel-senOszambali",
"id": "4de44c52b0f203709a8a2b7243eae7e653a70b32",
"size": ... |
"use strict";
var EventListener = require('fbjs/lib/EventListener');
var ReactDOM = require('react-dom');
module.exports = {
EventListener,
ownerDocument,
isNodeInRoot,
listen
}
/**
* listen
*/
function listen(node, event, func) {
return EventListener.listen(ownerDocument(node), event, func);
}... | {
"content_hash": "6556b7f8660af4a1f7d984f5cf5c321c",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 73,
"avg_line_length": 21.48,
"alnum_prop": 0.6638733705772812,
"repo_name": "subschema/subschema",
"id": "33f6d06bd7eb3a474b75c831c8d8f168e1ab7ce2",
"size": "1074",
"bin... |
require File.dirname(__FILE__) + '/../test_helper'
require 'sessions_controller'
# Re-raise errors caught by the controller.
class SessionsController; def rescue_action(e) raise e end; end
class SessionsControllerTest < ActionController::TestCase
# Be sure to include AuthenticatedTestHelper in test/test_helper.rb i... | {
"content_hash": "a13cef50e1138f4c5aff3ab77cc71b6e",
"timestamp": "",
"source": "github",
"line_count": 88,
"max_line_length": 81,
"avg_line_length": 28.693181818181817,
"alnum_prop": 0.6815841584158416,
"repo_name": "ehedberg/travis",
"id": "b9fe1721e69abbac0cd0195c94171213f50e0f8b",
"size": "2525... |
//// [modulePrologueSystem.ts]
"use strict";
export class Foo {}
//// [modulePrologueSystem.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var Foo;
return {
setters: [],
execute: function () {
... | {
"content_hash": "98f4f5e8a787f2a203573f03a2070f16",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 53,
"avg_line_length": 23.545454545454547,
"alnum_prop": 0.4420849420849421,
"repo_name": "synaptek/TypeScript",
"id": "afa319820eb752318c8ef17155f47cecb28a087c",
"size": "... |
"""
Copyright (c) 2016, Jose Dolz .All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the f... | {
"content_hash": "c97d891361794d5270f996c6fe1d1645",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 95,
"avg_line_length": 30.822222222222223,
"alnum_prop": 0.6398702235039654,
"repo_name": "josedolz/LiviaNET",
"id": "2bbf33c46f6886279972559af098cd9be5284764",
"size": "27... |
package io.fabric8.tooling.archetype.builder;
import io.fabric8.tooling.archetype.ArchetypeUtils;
import io.fabric8.utils.DomHelper;
import io.fabric8.utils.Files;
import io.fabric8.utils.IOHelpers;
import io.fabric8.utils.Objects;
import io.fabric8.utils.Strings;
import org.apache.commons.text.StringEscapeUtils;
imp... | {
"content_hash": "2771dbf2ce4b51d1143e2d1ac3d8cfcb",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 194,
"avg_line_length": 42.10227272727273,
"alnum_prop": 0.6377867746288799,
"repo_name": "fabric8io/ipaas-quickstarts",
"id": "f5081fa83e17da3868facc9b1d4895b8eab3643e",
... |
<div class="container-fluid scrollable" style="background-color: white;">
<div ui-content-for="title">
<span>Fuel Economizer</span>
</div>
<div class="scrollable-content">
<div class="header-text">
About Fuel Economizer
</div>
<div class="text-text">
... | {
"content_hash": "2bb94315e7b7b8380d283276fc2265b0",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 119,
"avg_line_length": 47.911764705882355,
"alnum_prop": 0.6138735420503376,
"repo_name": "Dorthu/EconomizerWeb",
"id": "e687f9e16b78cdc67b607b2f12cdef63b4ed0908",
"size":... |
{% load i18n %}
<div class="table_actions clearfix">
{% block table_filter %}
{% if filter.filter_type == 'fixed' %}
<div class="table_filter btn-group" data-toggle="buttons-radio">
{% for button in filter.fixed_buttons %}
<button name="{{ filter.get_param_name }}" type="submit" value="{{ button... | {
"content_hash": "bbb8328504c84cf3e6119701f9427ffb",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 333,
"avg_line_length": 57.464285714285715,
"alnum_prop": 0.5668116842759477,
"repo_name": "kaiweifan/horizon",
"id": "44b43f6749b40b39dc2b9fa9d53e02d74dc3ad84",
"size": "1... |
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import { purple } from '@material-ui/core/colors';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Switch from '@material-ui/core/Switch';
import Grid from '@m... | {
"content_hash": "d453563ee9f6d0179e08b881f3deb44e",
"timestamp": "",
"source": "github",
"line_count": 143,
"max_line_length": 99,
"avg_line_length": 24.321678321678323,
"alnum_prop": 0.5830937320299022,
"repo_name": "lgollut/material-ui",
"id": "32ff2e0e92fc05b92210a712bb1880d0a74ad7eb",
"size": ... |
package steambot.api;
public class SteamID {
private long communityId;
public SteamID(long communityId)
{
this.communityId = communityId;
}
public long getAccountId()
{
return (communityId & 0xFFFFFFFFL);
}
public long getCommunityId()
{
return communityId;... | {
"content_hash": "9c61ce0cbd0ef4066077e45053b1f48a",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 119,
"avg_line_length": 22.085714285714285,
"alnum_prop": 0.6028460543337646,
"repo_name": "tichok/SteamBot",
"id": "d6526020d1d09c5ff68204896c43ac935ae25890",
"size": "773... |
package com.palantir.baseline.errorprone;
import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
import com.google.errorprone.VisitorState;
import com.google.errorprone.bugpatterns.BugChecker;
import com.google.errorprone.fixes.SuggestedFix;
import com.google.errorprone.fixes.SuggestedF... | {
"content_hash": "a4d2c6e2e4840436975ab56b8067569f",
"timestamp": "",
"source": "github",
"line_count": 346,
"max_line_length": 118,
"avg_line_length": 49.274566473988436,
"alnum_prop": 0.6362249985336383,
"repo_name": "palantir/gradle-baseline",
"id": "df72f2ea87c2e509c97c23b301be621140c80fa2",
"s... |
'use strict';
var test = require('../');
test('parent', function (t) {
t.plan(3);
var firstChildRan = false;
t.pass('assertion in parent');
t.test('first child', function (st) {
st.plan(1);
st.pass('pass first child');
firstChildRan = true;
});
t.test('second child'... | {
"content_hash": "1a1c041ab41ae97211b5826bd2033f96",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 54,
"avg_line_length": 20.130434782608695,
"alnum_prop": 0.5377969762419006,
"repo_name": "substack/tape",
"id": "b3063b96ee1424b8213e59539d95a1e96c21556c",
"size": "463",
... |
Plotting - Correlate
==============================
This module is for plotting correlation analysis resutls between multiple masts. The typical format is to give the method the results from a method in an.analysis.correlate. The method then returns a plotly go.Figure object which consists of data and layout Python... | {
"content_hash": "14dcd12611b883da63491be572ea2101",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 279,
"avg_line_length": 43.1875,
"alnum_prop": 0.7163531114327062,
"repo_name": "coryjog/anemoi",
"id": "2a50c4dc89c166411e81ad230b75624cc70370ab",
"size": "691",
"binary... |
package com.dw.leetcode;
public class LongestWordinDictionary_720 {
class TrieNode {
public char val;
public TrieNode[] hash;
public boolean isWord;
public TrieNode(char c) {
this.val = c;
this.hash = new TrieNode[26];
this.isWord = false;
}
public StringBuilder dfs(StringBuilder re... | {
"content_hash": "294ea6df4837fd77437cfb41709581f2",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 114,
"avg_line_length": 25.196969696969695,
"alnum_prop": 0.5538184004810583,
"repo_name": "emacslisp/Java",
"id": "ffae17639795304d91ab1f0274afc3879b090765",
"size": "1663... |
#include <algorithm>
#include <iterator>
#include <vector>
#include <catch2/catch_template_test_macros.hpp>
#include <cpp-sort/adapters/indirect_adapter.h>
#include <cpp-sort/adapters/stable_adapter.h>
#include <cpp-sort/sorters.h>
#include <testing-tools/distributions.h>
TEMPLATE_TEST_CASE( "every random-access sort... | {
"content_hash": "297cb71c6eef4945a52e165742d14446",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 93,
"avg_line_length": 41.13793103448276,
"alnum_prop": 0.559094719195306,
"repo_name": "Morwenn/cpp-sort",
"id": "9ef662df28676c370f25914d644a3302dd0931ec",
"size": "3652"... |
class CreateAppConfigs < ActiveRecord::Migration[4.2]
def change
create_table :app_configs do |t|
t.string :rulebook_name
t.string :front_page
t.string :faq
t.timestamps
end
end
end
| {
"content_hash": "fa09eaec8692c4ecb6c03af903169bb4",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 53,
"avg_line_length": 19.90909090909091,
"alnum_prop": 0.6484018264840182,
"repo_name": "rdunlop/unicycling-rulebook",
"id": "60ed591190cdf40fee70fe86757b38ba9f028736",
"s... |
define([
'dojo/parser',
'app/App'
],
function (
parser
) {
window.AGRC = {
// errorLogger: ijit.modules.ErrorLogger
errorLogger: null,
// app: app.App
// global reference to App
app: null,
// version: String
// The version numbe... | {
"content_hash": "13c484fd5ef38f7c46f470c1a9953e3c",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 72,
"avg_line_length": 21.86842105263158,
"alnum_prop": 0.53309265944645,
"repo_name": "inkenbrandt/ugs-chemistry",
"id": "cb0d162c52fe43b126b46483d21a9ca87ef3a27f",
"size"... |
"""File comparison methods for different file formats.
This module provides a main file comparison method, :meth:`file_cmp()`, that compares two files and returns
True if they are equivalent, False otherwise. The comparison is made differently depending on the file format.
For instance, two Newick files are considered... | {
"content_hash": "f792fe411e79d1fe8960b19c2d823144",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 110,
"avg_line_length": 35.68852459016394,
"alnum_prop": 0.6871841984382178,
"repo_name": "Ensembl/ensembl-compara",
"id": "bd758c35d56d3ad2144e28a64caf0e86d2fe9f7a",
"size... |
package gate.termraider.gui;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.table.*;
import org.apache.commons.lang.StringUtils;
import gate.creole.*;
import java.util.*;
import gate.termraider.bank.*;
import gate.termrai... | {
"content_hash": "d4deb5c0b533d4c32eb50fbc65164070",
"timestamp": "",
"source": "github",
"line_count": 153,
"max_line_length": 104,
"avg_line_length": 27.235294117647058,
"alnum_prop": 0.6942644588432926,
"repo_name": "Network-of-BioThings/GettinCRAFTy",
"id": "1d01b1f846ec03e88e1e07561ae34177b7170d... |
from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.utils.geo import Point, D
from ..models import Store
from ..utils import caching_geo_lookup
class DistanceSearchView(ListView):
template_name = 'stores/store_search.html'
distance = 25
def get_location(self... | {
"content_hash": "35505e1cbcce03ff6f105bc98edea843",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 72,
"avg_line_length": 32,
"alnum_prop": 0.6195652173913043,
"repo_name": "nikdoof/vapemap",
"id": "2de0a70ebdf4b2a83dbc12d5638b55b6c5761098",
"size": "1472",
"binary": f... |
require File.expand_path('../../../spec_helper', __FILE__)
module Backup
describe 'Database::Redis' do
shared_examples 'redis specs' do
specify 'No Compression' do
create_model :my_backup, <<-EOS
Backup::Model.new(:my_backup, 'a description') do
database Redis do |db|
db.mod... | {
"content_hash": "841b371c1648122cf03e4415c8c11485",
"timestamp": "",
"source": "github",
"line_count": 98,
"max_line_length": 58,
"avg_line_length": 26.316326530612244,
"alnum_prop": 0.5529274912756883,
"repo_name": "backup/backup",
"id": "8c5dbb4289078b3e21ca7f9d9a7f892612660fb5",
"size": "2579",... |
{-# LANGUAGE RecordWildCards #-}
-- | DSL for testing the modular solver
module UnitTests.Distribution.Client.Dependency.Modular.DSL (
ExampleDependency(..)
, Dependencies(..)
, ExPreference(..)
, ExampleDb
, ExampleVersionRange
, ExamplePkgVersion
, exAv
, exInst
, exFlag
, exResolve
, extractI... | {
"content_hash": "0ce3ecd011eb91b2390ccb8e90b45669",
"timestamp": "",
"source": "github",
"line_count": 398,
"max_line_length": 94,
"avg_line_length": 41.64572864321608,
"alnum_prop": 0.6226244343891403,
"repo_name": "edsko/cabal",
"id": "91a00ac6d281a1d7e76cce01705cc57114c727f9",
"size": "16575",
... |
using System;
using FluentAssertions;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using Windows.Foundation.Collections;
using Windows.Storage;
namespace PK.Settings.StoreApps
{
[TestClass]
public class LocalSettingsSettin... | {
"content_hash": "3b2f0785c3eda3782e70223a17b73010",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 65,
"avg_line_length": 27.51851851851852,
"alnum_prop": 0.6716016150740243,
"repo_name": "PascalK/PK",
"id": "03f3c8f80e4c532e68ce930c86e58d1c18008b21",
"size": "745",
"b... |
@interface MSDayColumnHeader : UICollectionReusableView
@property (nonatomic, strong) NSDate *day;
@property (nonatomic, assign) BOOL currentDay;
@end
| {
"content_hash": "479465e5a9a78fa957982ba43eb44e7c",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 55,
"avg_line_length": 25.5,
"alnum_prop": 0.7973856209150327,
"repo_name": "neonaldo/MSCollectionViewCalendarLayout",
"id": "8364467e119e8a7eda9f7ed0652f9c0bae406ba9",
"siz... |
function solve(args) {
let studentsData = args
.map(studentString => studentString.split(' -> '));
let student = {};
studentsData.forEach(tokens => {
let key = tokens[0];
let value = tokens[1];
if (['grade', 'age'].includes(key)){
value = Number(val... | {
"content_hash": "a382f1070c2b0d81c0e2e3ad02ee3048",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 59,
"avg_line_length": 22.346153846153847,
"alnum_prop": 0.4784853700516351,
"repo_name": "Menkachev/Software-University",
"id": "aa8af60314526840f3faa379f5beda5d54b393ef",
... |
import T2
import sys
from prompt_toolkit import prompt
from prompt_toolkit.contrib.completers import WordCompleter
bird_person = T2.Hand("Bird Person", "bp@gmail.com")
rick = T2.Hand("Rick Sanches", "rs@gmail.com")
morty = T2.Hand("Morty", "mr@gmail.com")
b1 = T2.Book("Coders at Work: Reflections on the Craft of Pro... | {
"content_hash": "1088ee814b4f6e6d5b9a6125c92a2dc0",
"timestamp": "",
"source": "github",
"line_count": 102,
"max_line_length": 88,
"avg_line_length": 29.19607843137255,
"alnum_prop": 0.5936870382807253,
"repo_name": "kvantos/intro_to_python_class",
"id": "bed1bbaf730db271792e28e3ef5c7256236e9265",
... |
"""
QUOTE函数返回列所对应的原生SQL表达式。
Ref: https://www.sqlite.org/lang_corefunc.html
"""
from sqlite4dummy.tests.basetest import BaseUnittest
from datetime import datetime, date
import unittest
class Unittest(BaseUnittest):
def setUp(self):
self.connect_database()
def test_all(self):
cursor = ... | {
"content_hash": "0e8b94c5d3cb16e88a3d6b80ced552f7",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 71,
"avg_line_length": 27.03076923076923,
"alnum_prop": 0.4632896983494593,
"repo_name": "MacHu-GWU/sqlite4dummy-project",
"id": "6a0a9698cbab91a25dcb4564f2fd0d4a756554ee",
... |
namespace prefs {
// CookieControlsMode enum value that decides when the cookie controls UI is
// enabled. This will block third-party cookies similar to
// kBlockThirdPartyCookies but with a new UI.
const char kCookieControlsMode[] = "profile.cookie_controls_mode";
// Version of the pattern format used to define con... | {
"content_hash": "73a698c57672b00adcb416cab6919cc1",
"timestamp": "",
"source": "github",
"line_count": 141,
"max_line_length": 80,
"avg_line_length": 50.0709219858156,
"alnum_prop": 0.7997167138810198,
"repo_name": "ric2b/Vivaldi-browser",
"id": "07498435b25319c0d3311bc842905ef00bd10412",
"size": ... |
package org.maera.plugin.web.conditions;
import org.apache.commons.lang.exception.NestableException;
public class ConditionLoadingException extends NestableException {
public ConditionLoadingException() {
}
public ConditionLoadingException(String string) {
super(string);
}
public Conditi... | {
"content_hash": "48f73f25adcac3cbc000c53fb31bccb7",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 74,
"avg_line_length": 25.6,
"alnum_prop": 0.732421875,
"repo_name": "majianxiong/maera",
"id": "4597516750ae85ae693f30914fae4336a44ed512",
"size": "512",
"binary": false... |
package org.apache.camel.component.openshift.build_configs.springboot;
import javax.annotation.Generated;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* The Kubernetes Build Config component provides a pro... | {
"content_hash": "025f54511535c3a76dcd96259553b839",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 80,
"avg_line_length": 35.264150943396224,
"alnum_prop": 0.7517388978063135,
"repo_name": "Fabryprog/camel",
"id": "8e110981f9443da74701741287f2551abb8ca03e",
"size": "2671... |
#pragma once
#include <aws/kinesisanalytics/KinesisAnalytics_EXPORTS.h>
#include <aws/kinesisanalytics/model/ApplicationSummary.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace... | {
"content_hash": "2ae0ae0a1bd91ae1e31cc26ea36bb628",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 144,
"avg_line_length": 37.34177215189873,
"alnum_prop": 0.727457627118644,
"repo_name": "jt70471/aws-sdk-cpp",
"id": "0ea5b86600eb4415bd185bf17ff1ef8d4eb91670",
"size": "3... |
<?xml version="1.0" encoding="utf-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="kernel.root_dir">... | {
"content_hash": "ee52b3043a736a7a922a21d1c786a30a",
"timestamp": "",
"source": "github",
"line_count": 2906,
"max_line_length": 228,
"avg_line_length": 59.167240192704746,
"alnum_prop": 0.6926951262068163,
"repo_name": "elenaGonzalez/CursoSymfony",
"id": "a84b61adca47a1c5a33402dc9c63c198857c4297",
... |
.. _install:
============
Installation
============
The easiest way to install Elephant is by creating a conda environment, followed by ``pip install elephant``.
Below is the explanation of how to proceed with these two steps.
.. _prerequisites:
*************
Prerequisites
*************
Elephant requires `Python ... | {
"content_hash": "f0a8635afc8ea77bfa3a8e22370fc3b7",
"timestamp": "",
"source": "github",
"line_count": 221,
"max_line_length": 120,
"avg_line_length": 27.194570135746606,
"alnum_prop": 0.6119800332778702,
"repo_name": "mdenker/elephant",
"id": "541e445655b8b81864a12eb39f157b5bd746815b",
"size": "6... |
{% extends "horizon/common/_modal_form.html" %}
{% load i18n %}
{% load url from future %}
{% block form_id %}add_contract_form{% endblock %}
{% block form_action %}{% url 'horizon:project:policytargets:add_contract' policy_target_id %}{% endblock %}
{% block modal-header %}{% trans "Add Policy Rule Set" %}{% endbloc... | {
"content_hash": "b5c5ffbc90699f686a717f21d8fcd24b",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 119,
"avg_line_length": 35.28,
"alnum_prop": 0.6326530612244898,
"repo_name": "tbachman/group-based-policy-ui",
"id": "b8cfd152a675cb2c2e3c43fa07713403e7620352",
"size": "8... |
<?php
namespace OpenCFP\Http\Controller;
use Cartalyst\Sentry\Sentry;
use Cartalyst\Sentry\Users\UserExistsException;
use OpenCFP\Http\Form\SignupForm;
use OpenCFP\Infrastructure\Crypto\PseudoRandomStringGenerator;
use Silex\Application;
use Spot\Locator;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Sym... | {
"content_hash": "9c9a2dfb4968fe51ac2dd97b1446e82c",
"timestamp": "",
"source": "github",
"line_count": 170,
"max_line_length": 122,
"avg_line_length": 38.83529411764706,
"alnum_prop": 0.49378976067858227,
"repo_name": "OpenWestConference/opencfp",
"id": "0f03c0a588e24102087b767c789df97941fb6f83",
... |
require 'spec_helper'
describe 'orphaning a vm', type: :integration do
with_reset_sandbox_before_each
let(:cloud_config) do
cloud_config = Bosh::Spec::NewDeployments.simple_cloud_config
cloud_config['networks'][0]['type'] = 'manual'
cloud_config
end
let(:manifest) do
manifest = Bosh::Spec::Ne... | {
"content_hash": "f06bba49867381f4085e4ec1ccd20e6c",
"timestamp": "",
"source": "github",
"line_count": 128,
"max_line_length": 97,
"avg_line_length": 37.3671875,
"alnum_prop": 0.6656909889190884,
"repo_name": "barthy1/bosh",
"id": "12e39541f95c53a73273a04da87bcf8bbb379f38",
"size": "4783",
"bina... |
package org.seasar.doma.internal.jdbc.command;
import java.util.Map;
import java.util.stream.Collector;
import org.seasar.doma.MapKeyNamingType;
/**
*
* @author nakamura-to
*
* @param <RESULT>
*/
public class MapCollectorHandler<RESULT> extends
AbstractCollectorHandler<Map<String, Object>, RESULT> {
... | {
"content_hash": "2dcd9519c1c53b578c8dc362bfc49bc7",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 66,
"avg_line_length": 23.458333333333332,
"alnum_prop": 0.6909413854351687,
"repo_name": "backpaper0/doma2",
"id": "740f692a3695fa2c6b32f6396add4344781c5475",
"size": "118... |
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/pwm.h>
#include <zephyr/device.h>
#include <zephyr/display/mb_display.h>
#define PERIOD_MIN PWM_USEC(50)
#define PERIOD_MAX PWM_USEC(3900)
#define BEEP_DURATION K_MSEC(60)
#define NS_TO_HZ(... | {
"content_hash": "487678f6dc0f4059034aa3c5df763b4b",
"timestamp": "",
"source": "github",
"line_count": 111,
"max_line_length": 99,
"avg_line_length": 24.99099099099099,
"alnum_prop": 0.6719538572458543,
"repo_name": "zephyrproject-rtos/zephyr",
"id": "13ff462c0ea20ef1afe9deba069e34af6589a840",
"si... |
module.exports = require('./dist');
| {
"content_hash": "d986934eb73670bc0319a7632e3fc54c",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 35,
"avg_line_length": 36,
"alnum_prop": 0.6666666666666666,
"repo_name": "tajo/bulldozer",
"id": "c1b27797befaa635c09b720e47b96f0f786cc77f",
"size": "57",
"binary": false... |
import { BasicBadgeModule } from './basic-badge.module';
describe('BasicBadgeModule', () => {
let basicBadgeModule: BasicBadgeModule;
beforeEach(() => {
basicBadgeModule = new BasicBadgeModule();
});
it('should create an instance', () => {
expect(basicBadgeModule).toBeTruthy();
});
});
| {
"content_hash": "e154c3765f5da856d32bde2d09e24ad2",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 56,
"avg_line_length": 23.692307692307693,
"alnum_prop": 0.6558441558441559,
"repo_name": "A-l-y-l-e/Alyle-UI",
"id": "d3381266aad2f859c47482741f2fb6aebac1baca",
"size": "3... |
package java.io;
import com.facebook.infer.models.InferUndefined;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class ObjectInputStream extends InputStream {
private InputStream emptyStream;
private static Object UNSHARED_OBJ;
private boolean hasPushbackTC;
priv... | {
"content_hash": "61ab68d19b750cf8b32c13afb50fb3f0",
"timestamp": "",
"source": "github",
"line_count": 146,
"max_line_length": 77,
"avg_line_length": 29.15068493150685,
"alnum_prop": 0.7065319548872181,
"repo_name": "hawkinchina/facebook-",
"id": "cc4f690a3ab7b596fa00b02ca556ee9bad1c12b7",
"size":... |
Event.simulateMouse = function(element, eventName) {
var options = Object.extend({
pointerX: 0,
pointerY: 0,
buttons: 0,
ctrlKey: false,
altKey: false,
shiftKey: false,
metaKey: false
}, arguments[2] || {});
var oEvent = document.createEvent("MouseEvents");
oEvent.initMouseEvent... | {
"content_hash": "1e89c8cafff26a39fda84775b70b1d4c",
"timestamp": "",
"source": "github",
"line_count": 550,
"max_line_length": 155,
"avg_line_length": 35.28363636363636,
"alnum_prop": 0.6070802844481088,
"repo_name": "pandoraui/scriptaculous",
"id": "980fb167fb54a967e237cb27297f8a4806102b6a",
"siz... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE690_NULL_Deref_From_Return__wchar_t_calloc_82_goodB2G.cpp
Label Definition File: CWE690_NULL_Deref_From_Return.free.label.xml
Template File: source-sinks-82_goodB2G.tmpl.cpp
*/
/*
* @description
* CWE: 690 Unchecked Return Value To NULL Pointer
* BadSource: ca... | {
"content_hash": "d7a069c58c2733926a2ed41cfea29f26",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 114,
"avg_line_length": 31.86111111111111,
"alnum_prop": 0.6887532693984307,
"repo_name": "JianpingZeng/xcc",
"id": "16737902b9f0cb0724045095aadaec3f238fad97",
"size": "114... |
function Remove-DbaDbCertificate {
<#
.SYNOPSIS
Deletes specified database certificate
.DESCRIPTION
Deletes specified database certificate
.PARAMETER SqlInstance
The SQL Server to create the certificates on.
.PARAMETER SqlCredential
Login to the target instance usi... | {
"content_hash": "70af2769432b7815a80b6d72d269a632",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 171,
"avg_line_length": 41.333333333333336,
"alnum_prop": 0.6436950146627566,
"repo_name": "alevyinroc/dbatools",
"id": "0d6c4d7f43661c7c7eeb60e5513801c8356ef5cc",
"size": ... |
var TestRunner = require("../../test-runner.js"),
test = new TestRunner();
describe("regions/viewportanchor tests", function(){
before(function(onDone) {
test.init(onDone);
});
after(function() {
test.shutdown();
});
it("correct.vtt", function(onDone){
test.jsonEqualParsing("regions/viewpo... | {
"content_hash": "9bcfcbbdac50cbe5ae8328ab85900b92",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 137,
"avg_line_length": 38.6551724137931,
"alnum_prop": 0.7346119536128457,
"repo_name": "amandatru/amandatru.github.io",
"id": "711441324927611afe39fc610af963b26d76ba43",
... |
using System;
using System.Xml.Serialization;
namespace Aop.Api.Domain
{
/// <summary>
/// OpenPromoCamp Data Structure.
/// </summary>
[Serializable]
public class OpenPromoCamp : AopObject
{
/// <summary>
/// 简短活动名,默认和活动名称相同
/// </summary>
[XmlElement("camp_alia... | {
"content_hash": "2cef839143be438667e3d1ca0c1858c0",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 49,
"avg_line_length": 23.604166666666668,
"alnum_prop": 0.500441306266549,
"repo_name": "oceanho/AnyPayment",
"id": "f1e1df5292b68ff01a596d1e281b6a2e392ed016",
"size": "12... |
'use strict';
/**
* @ngdoc function
* @name kivipeli.controller:GameCtrl
* @description
* # GameCtrl
* Controller of the kivipeli
*/
angular.module('kivipeli')
.controller('GameCtrl', function(
$scope,
aiPlayer,
gameService,
turnMediatorService
) {
gameService.newGame();
$scope.gameS... | {
"content_hash": "e5c77710ba64b2bd7792d7571f4d51e8",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 54,
"avg_line_length": 19.869565217391305,
"alnum_prop": 0.6411378555798687,
"repo_name": "joelmertanen/stonegame",
"id": "14200f48bd87acdeaacb64dba1e6176d5ada710f",
"size"... |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" />
<link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media... | {
"content_hash": "6713eca9cf95d0a2de0a1e085a7a95ab",
"timestamp": "",
"source": "github",
"line_count": 209,
"max_line_length": 296,
"avg_line_length": 43.9377990430622,
"alnum_prop": 0.5098551671567026,
"repo_name": "dcarda/aba.route.validator",
"id": "44599aea96c4d87a5523836e70357b1a852094af",
"s... |
<?php
namespace Oro\Bundle\WorkflowBundle\Tests\Unit\Configuration\Handler;
use Oro\Bundle\WorkflowBundle\Configuration\Handler\AttributeHandler;
use Oro\Bundle\WorkflowBundle\Configuration\WorkflowConfiguration;
class AttributeHandlerTest extends \PHPUnit_Framework_TestCase
{
/**
* @var AttributeHandler
... | {
"content_hash": "008c0a81c72ffaa23685248ef638d8af",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 112,
"avg_line_length": 33.72727272727273,
"alnum_prop": 0.44324648098233005,
"repo_name": "geoffroycochard/platform",
"id": "4d338bab5801aa1d01bf188faf14d8a77481b103",
"si... |
FN="hu35ksubacdf_2.18.0.tar.gz"
URLS=(
"https://bioconductor.org/packages/3.14/data/annotation/src/contrib/hu35ksubacdf_2.18.0.tar.gz"
"https://bioarchive.galaxyproject.org/hu35ksubacdf_2.18.0.tar.gz"
"https://depot.galaxyproject.org/software/bioconductor-hu35ksubacdf/bioconductor-hu35ksubacdf_2.18.0_src_all.tar.... | {
"content_hash": "187f3ff1ee45b23f4350d49dc1371985",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 118,
"avg_line_length": 28.955555555555556,
"alnum_prop": 0.6692248656945511,
"repo_name": "acaprez/recipes",
"id": "dc654a48b1d6445a618e43b76ba766996f40a1a4",
"size": "131... |
The security plugin allows to manage user, roles and permissions.
It also provides middleware for authentification and authorization. Authentification is using [Passport](http://passportjs.org/) middleware. Sessions are persisted in MongoDB.
Authorization is role and permission based. Plugins can add permissions, e... | {
"content_hash": "ad2cdd9e5078daf3e7df5eb1f17a4baf",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 470,
"avg_line_length": 35.51162790697674,
"alnum_prop": 0.7166557520192097,
"repo_name": "bauhausjs/bauhausjs",
"id": "0664aecc86a2a665098cc591726d28b599f4aff4",
"size": ... |
require 'spec_helper'
describe Gitlab::Middleware::BasicHealthCheck do
let(:app) { double(:app) }
let(:middleware) { described_class.new(app) }
let(:env) { {} }
describe '#call' do
context 'outside IP' do
before do
env['REMOTE_ADDR'] = '8.8.8.8'
end
it 'returns a 404' do
... | {
"content_hash": "c791c48d883cdc477108688c1c213bf3",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 69,
"avg_line_length": 22.473684210526315,
"alnum_prop": 0.570647931303669,
"repo_name": "dreampet/gitlab",
"id": "187d903a5e192414b5aa31e757d036c70640403a",
"size": "1281"... |
{% extends '!footer.html' %}
{% block extrafooter %}
<div class="footer">
<table style="margin: 0px auto;">
<tbody>
<tr>
<td style="text-align: center; padding: 30px;">
<a href="http://stackoverflow.com/questions/tagged/chatterbot">
<d... | {
"content_hash": "5d9f65ea6f472fa3a1cff102cc4899bc",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 255,
"avg_line_length": 47.02777777777778,
"alnum_prop": 0.4477259303012404,
"repo_name": "gunthercox/ChatterBot",
"id": "b0f07384a1222c4a04eb7644f65314624e3bae58",
"size":... |
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rvRepos"
android:layout_width="match_parent"
android:layout_height="match_parent" /> | {
"content_hash": "31527b4ed132750e1017dee7a5ef8c6e",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 98,
"avg_line_length": 50.2,
"alnum_prop": 0.7211155378486056,
"repo_name": "pierreduchemin/poec-android-03-2017",
"id": "eed87bd23ebfd52a456431c2235cbf539c2196f3",
"size": ... |
namespace chromeos {
class AuthStatusConsumer;
class UserContext;
// Interaction with cryptohomed: mount home dirs, create new home dirs, update
// passwords.
//
// Typical flow:
// AuthenticateToMount() calls cryptohomed to perform offline login,
// AuthenticateToCreate() calls cryptohomed to create new cryptohome.
... | {
"content_hash": "2989718222754e8bce34fe12a9b49c8d",
"timestamp": "",
"source": "github",
"line_count": 144,
"max_line_length": 80,
"avg_line_length": 45.236111111111114,
"alnum_prop": 0.6727049431992631,
"repo_name": "sencha/chromium-spacewalk",
"id": "589989f02cba952326119b8371c948d7cf095796",
"s... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interop... | {
"content_hash": "ce604804c18d00e6037329e86132c623",
"timestamp": "",
"source": "github",
"line_count": 183,
"max_line_length": 124,
"avg_line_length": 28.2896174863388,
"alnum_prop": 0.5344794282402936,
"repo_name": "jpoeng/jpoeng.github.io",
"id": "32e9fe73e4ec729935b2dc39e93c70b3616c0a27",
"size... |
package org.apache.druid.segment.column;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.druid.java.util.common.StringUtils;
import javax.annotation.Nullable;
import java.util.Objects;
/**
* This interface serves as a common foundation for Druids native type system, and provides common metho... | {
"content_hash": "8292dd50705a3a6e858414e21eef3837",
"timestamp": "",
"source": "github",
"line_count": 147,
"max_line_length": 120,
"avg_line_length": 43.53741496598639,
"alnum_prop": 0.72609375,
"repo_name": "druid-io/druid",
"id": "acf5eef4a505bde86024101c2954f8eb9bc42fd4",
"size": "7207",
"bi... |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2016 Red Hat, Inc.
Red Hat licenses this file to you under the Apache License, version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apach... | {
"content_hash": "2d3346f654d55490c9a24c1247d34d6c",
"timestamp": "",
"source": "github",
"line_count": 240,
"max_line_length": 107,
"avg_line_length": 40.1875,
"alnum_prop": 0.5518921721099015,
"repo_name": "jludvice/fabric8",
"id": "1e29305d8e8a7da90347c70e072f52046ee56f9c",
"size": "9645",
"bi... |
#include <linux/mii.h>
#include <linux/phy.h>
#include <linux/slab.h>
#include <asm/io.h>
#include "stmmac.h"
#define MII_BUSY 0x00000001
#define MII_WRITE 0x00000002
static int stmmac_mdio_busy_wait(void __iomem *ioaddr, unsigned int mii_addr)
{
unsigned long curr;
unsigned long finish = jiffies + 3 * HZ;
do ... | {
"content_hash": "641058efc7494ede9b5a41f700492ccf",
"timestamp": "",
"source": "github",
"line_count": 248,
"max_line_length": 80,
"avg_line_length": 24.786290322580644,
"alnum_prop": 0.6497478444769806,
"repo_name": "manuelmagix/kernel_bq_piccolo",
"id": "cc15039eaa4739a33e916b5f9506ce0b1c0f4ccc",
... |
from __future__ import print_function
import copy
import numpy
import theano
from theano import Variable, Constant
from theano import tensor
from theano.compile import SharedVariable
from theano.sandbox.cuda.type import CudaNdarrayType
try:
# We must do those import to be able to create the full doc when nvcc
... | {
"content_hash": "603753ba55c4496d11edc4141950ffce",
"timestamp": "",
"source": "github",
"line_count": 250,
"max_line_length": 94,
"avg_line_length": 35.344,
"alnum_prop": 0.6420325939339068,
"repo_name": "rizar/attention-lvcsr",
"id": "17501cc6cb50fa24ce0fe81b81ee059fb889188e",
"size": "8836",
... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace bootstrap_git_auto_notes
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
name: "DefaultApi",
... | {
"content_hash": "69585000883c5f1e183b7dc3f3d249f4",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 147,
"avg_line_length": 37.083333333333336,
"alnum_prop": 0.648314606741573,
"repo_name": "hamiltondanielb/GitHub-Release-Notes",
"id": "dc7800aef5931f7700b32602304843286888a... |
import os
import pwd
from st2common import log as logging
from st2common.models.system.action import RemoteAction
from st2common.util.shell import quote_unix
__all__ = [
'ParamikoRemoteCommandAction',
]
LOG = logging.getLogger(__name__)
LOGGED_USER_USERNAME = pwd.getpwuid(os.getuid())[0]
class ParamikoRemoteC... | {
"content_hash": "5177133ee4bf0ab194f82c228231821f",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 88,
"avg_line_length": 30.15,
"alnum_prop": 0.5530679933665008,
"repo_name": "punalpatel/st2",
"id": "b3bda0251e992cf8de9771896d7a17663975ad49",
"size": "1986",
"binary":... |
/**
* Everything in one source file is kept in a TopLevel structure.
* @param pid The tree representing the package clause.
* @param sourcefile The source file name.
* @param defs All definitions in this file (ClassDef, Import, and Skip)
* @param packge ... | {
"content_hash": "a42a3aa150d2b95907da74039ec8fb3e",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 89,
"avg_line_length": 43.535353535353536,
"alnum_prop": 0.5814385150812065,
"repo_name": "fengshao0907/Open-Source-Research",
"id": "5be996122e097b95524b0a5389db2c284670c589... |
using System;
using L4p.Common.FunnelsModel.comm;
using L4p.Common.Loggers;
using L4p.Common.Wcf;
namespace L4p.Common.FunnelsModel.hub
{
public static class WcfHelpers
{
public static IDisposable AsServiceAt(this IFunnelsResolver target, ILogFile log, string uri)
{
var wcf = hub.wc... | {
"content_hash": "6fe875cf3eb8525f094c5605a5139911",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 101,
"avg_line_length": 25.515151515151516,
"alnum_prop": 0.6021377672209026,
"repo_name": "Ubinary/L4p",
"id": "157f01c0e9a89f89313b859625ecd6c2e2567de0",
"size": "842",
... |
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
using Raft.Persistance.Journaler.Transformers;
namespace Raft.Persistance.Journaler.Tests.Unit.Transformers
{
[TestFixture]
public class EntryDataTests
{
[Test]
public void Pre... | {
"content_hash": "14799bc3b7906e35bf9f898f244da045",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 86,
"avg_line_length": 27.933333333333334,
"alnum_prop": 0.6121718377088305,
"repo_name": "yburke94/Raft.net",
"id": "6ed5be55c2edbe2d103c94344a4dfb9207e77adf",
"size": "84... |
/* All OK */
#include <pthread.h>
static pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;
static int shared;
static void *th(void *v)
{
pthread_mutex_lock(&mx);
shared++;
pthread_mutex_unlock(&mx);
return 0;
}
int main()
{
pthread_t a, b;
pthread_mutex_lock(&mx);
pthread_mutex_unlock(&mx);
pthread_create... | {
"content_hash": "736c44bac02dbe1adbd3177157432a08",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 54,
"avg_line_length": 13.84375,
"alnum_prop": 0.6523702031602708,
"repo_name": "indashnet/InDashNet.Open.UN2000",
"id": "144ce608d1f68c44efe9bab7fd2fc330cb735f1e",
"size":... |
/* still unfinished */
#define sys_sysmp printargs
#define sys_sginap printargs
#define sys_sgikopt printargs
#define sys_sysmips printargs
#define sys_sigreturn printargs
#define sys_recvmsg printargs
#define sys_sendmsg printargs
#define sys_nfssvc printargs
#define sys_getfh printargs
#define sys_async_daemon pri... | {
"content_hash": "97768b01c2866e77ff6d2a24a2816afc",
"timestamp": "",
"source": "github",
"line_count": 277,
"max_line_length": 40,
"avg_line_length": 29.498194945848375,
"alnum_prop": 0.82193122016889,
"repo_name": "timmattison/strace-arm",
"id": "9ee09272255b315ee5ae2cfa517d13f5e16df003",
"size":... |
namespace chrono {
namespace vehicle {
/// @addtogroup vehicle_powertrain
/// @{
/// Simple CVT-like powertrain subsystem (specified through JSON file).
class CH_VEHICLE_API SimpleCVTPowertrain : public ChSimpleCVTPowertrain {
public:
SimpleCVTPowertrain(const std::string& filename);
SimpleCVTPowertrain(con... | {
"content_hash": "2aaaa9f848960de2c654489d0be8da22",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 79,
"avg_line_length": 32.6,
"alnum_prop": 0.7072743207712533,
"repo_name": "rserban/chrono",
"id": "5fa4ad58d4f657fdf1a5d63e4f1be1a4ed7dcc91",
"size": "2126",
"binary": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.