id stringlengths 64 64 | content stringlengths 500 100k | language stringclasses 29
values | path stringlengths 4 333 | repo stringlengths 5 116 | license stringclasses 15
values | size int64 500 100k | lines int64 26 8.06k | source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
a3c49d9518d0ce1c9988996c4b6ca710371a5f94b00ca0a8f4cf414c52a94da4 | package edu.hm.hafner.analysis.parser;
import org.junit.jupiter.api.Test;
import edu.hm.hafner.analysis.Issue;
import edu.hm.hafner.analysis.Issues;
import edu.hm.hafner.analysis.Priority;
import static edu.hm.hafner.analysis.assertj.IssuesAssert.*;
import static edu.hm.hafner.analysis.assertj.SoftAssertions.*;
/**
... | Java | src/test/java/edu/hm/hafner/analysis/parser/LinuxKernelOutputParserTest.java | whaph/analysis-model | mit | 8,907 | 219 | codeparrot/github-code |
381259ba1b3bce50a7fe49778de6c534fdb22ed6b265325ed4bf115cb9f6bd24 | 'use strict';
angular.module('articles').controller('ArticlesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Articles',
function($scope, $stateParams, $location, Authentication, Articles) {
$scope.authentication = Authentication;
$scope.create = function() {
var article = new Articles(... | JavaScript | public/modules/articles/controllers/articles.client.controller.js | rodrigowirth/IELTS | mit | 1,352 | 58 | codeparrot/github-code |
20a5bc723123352623a9bc76ce4cd14a359fc7011b7b42cc9766a8ac154052dc | using System;
using CoreGraphics;
using UIKit;
using Foundation;
namespace MonoTouch.Dialog
{
public class ActivityElement : Element {
public ActivityElement():base(""){
}
UIActivityIndicatorView indicator;
public bool Animating {
get {
return indicator.IsAnimating;
}
set {
if (value)
... | C# | MonoTouch.Dialog/Elements/ActivityElement.cs | hisystems/MonoTouch.Dialog | mit | 1,275 | 67 | codeparrot/github-code |
04b4566f07aaa2cb5e8b6cf73cc7bce5c4f397d28da28a78c31848335ee2d292 | #include <rte_config.h>
#include <rte_ethdev.h>
#include <rte_mempool.h>
#include <rte_ether.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <ixgbe_type.h>
#include <rte_mbuf.h>
#include "device.h"
#include <rte_power.h>
// default descriptors per queue
#define DEFAULT_RX_DESCS 512
#define DEFAULT_TX_DESCS ... | C | src/device.c | schoenb/MoonGen | mit | 23,372 | 661 | codeparrot/github-code |
4b1d3002fb8fd780aaa3a06f3e1a799e8ec36aa24fdd9e27da128595350c13e8 | '''
This module corresponds to ARDroneLib/Soft/Common/navdata_common.h
'''
import ctypes
import functools
from pyardrone.utils.structure import Structure
uint8_t = ctypes.c_uint8
uint16_t = ctypes.c_uint16
uint32_t = ctypes.c_uint32
int16_t = ctypes.c_int16
int32_t = ctypes.c_int32
bool_t = ctypes.c_uint32 # ARDro... | Python | pyardrone/navdata/options.py | afg984/pyardrone | mit | 14,941 | 647 | codeparrot/github-code |
acbbd473298506d7815136a0d57f80ce926a8cf46e5cdf9f5041687adc0094b8 | #pragma once
#include <string>
#include <functional>
#include <net/asio/http/uri.h>
namespace net {
namespace http {
/**
* Represents an endpoint with distinct connection
* characteristics.
*
* Details may include:
* * Hostname, IP or vhost
* * Port
* * SSL certificate
*/
class details {
public:
details(
c... | C | include/net/asio/http/details.h | tm604/asio-protocols | mit | 1,373 | 68 | codeparrot/github-code |
7a159d8dc498e35c412491a8aac07446897c05022acdf32378d0a1f82f0b63a4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace N64Track
{
public static class CustomFontEffect
{
public static readonly BindableProperty FontFileNameProperty = BindableProperty.CreateAttached("FontFileN... | C# | N64Track/N64Track/CustomFontEffect.cs | hackmods/N64Track | mit | 1,346 | 47 | codeparrot/github-code |
60083822cc9ba16a65a88c6d83d505a9ac34f5596aef9ad173cb65ec9e1453dd | package com.jetbrains.ther.lexer;
import com.google.common.collect.ImmutableMap;
import com.intellij.psi.TokenType;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import com.jetbrains.ther.psi.TheRElementType;
//deprecated
// DO NOT USE
public class TheRTokenTypes {
/*
* There ... | Java | src/com/jetbrains/ther/lexer/TheRTokenTypes.java | ktisha/TheRPlugin | mit | 12,301 | 208 | codeparrot/github-code |
998f4ce394cdf8f74050b2a6dd8e465a0aa216c621337f1ffdbd44ce75fe176f | // CVDemo.Image.Overlay.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/video.hpp>
#include <stdio.h>
#include <sstream>
#include <stdexcept>
// #include <boost/program_opt... | C++ | CVDemo.Image/CVDemo.Image.Overlay/CVDemo.Image.Overlay.cpp | cvdemo/image-win32 | mit | 3,416 | 123 | codeparrot/github-code |
d37d12232735385050d18612cfc3ec4cd8ebb39791841737bfbc515e126f0f9b | package hammer
import (
"context"
"log"
"github.com/antihax/evedata/internal/datapackages"
)
func init() {
registerConsumer("killmail", killmailConsumer)
}
func killmailConsumer(s *Hammer, parameter interface{}) {
parameters := parameter.([]interface{})
hash := parameters[0].(string)
id := int32(parameters[1... | GO | services/hammer/killmail.go | antihax/evedata | mit | 1,513 | 82 | codeparrot/github-code |
d4ec916a2d4d9e4ff0f0b01a8081be7ffabbf4a550b6ce4dbbf04c828a7bcec8 | module.exports = {
options: {
templateCompilerPath: 'bower_components/ember/ember-template-compiler.js',
handlebarsPath: 'bower_components/handlebars/handlebars.js',
preprocess: function (source) {
return source.replace(/\s+/g, ' ');
},
templateName: function (sourceFile) {
/*
These are how templa... | JavaScript | app/templates/grunt/emberTemplates.js | geekingreen/generator-anthracite | mit | 1,794 | 59 | codeparrot/github-code |
eb32afa129e66b6cf9fbd97c74fbb5206b0a2052ccb994088fa5c35c970c11fd | <!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<!... | HTML | _site/index.html | giovanni-bb/giovanni-bb.github.io | mit | 7,875 | 212 | codeparrot/github-code |
8a9978e70421bcf1d008c7fcaa4d3844809d11e44f07ff60b9d03c9d04c471e6 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* righ... | C | uv/libuv/src/unix/stream.c | ccheever/CoreNode | mit | 40,172 | 1,553 | codeparrot/github-code |
d1c870ffb082be543e16a675dc4e415085ed3b5946afbcd591fb0aef658f0244 | # -*- coding: utf-8 -*-
#!/usr/bin/python
import numpy as np
import scipy
from sklearn import preprocessing
from sklearn.feature_extraction import DictVectorizer
from sklearn.cross_validation import train_test_split
from sklearn.metrics import classification_report, confusion_matrix
from collections import Counter
fro... | Python | icgauge/experiment_frameworks.py | ptoman/icgauge | mit | 11,989 | 324 | codeparrot/github-code |
9b25f13daf620abea192c833269486a56e32596a6c0636aab256c892537bb5e1 | package com.artbeatte.launchpad;
import com.google.common.collect.ImmutableMap;
import io.dropwizard.Configuration;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.db.DataSourceFactory;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Collections;... | Java | src/main/java/com/artbeatte/launchpad/LaunchpadConfiguration.java | abeatte/launchpad | mit | 1,603 | 49 | codeparrot/github-code |
f6f55f2ebb2e29db7473e25f75593cb14dc843bebcdcb7cb9ac837db3968a973 | using myOC_WebApp.IoC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace myOC_WebApp.Controllers
{
public class HomeController : Controller, IHomeController
{
private readonly ILogger _logger;
public HomeController(ILogger log... | C# | myOC-WebApp/myOC-WebApp/Controllers/HomeController.cs | theamazingfedex/IoCsharp | mit | 1,122 | 41 | codeparrot/github-code |
efec4e5239b869dc1ddd60c5a366a8955193a23b1be5497ade0cf78a6fb2756f | import sys, os, fabric
class PiServicePolicies:
@staticmethod
def is_local():
return (not fabric.api.env.hosts or fabric.api.env.hosts[0] in ['localhost', '127.0.0.1', '::1'])
@staticmethod
def is_pi():
return os.path.isdir('/home/pi')
@staticmethod
def check_local_or_exit():
if not PiService... | Python | lib/piservices/policies.py | creative-workflow/pi-setup | mit | 867 | 33 | codeparrot/github-code |
8b3c63c384d4ae0702cc6daca67d4faf0aa3c7e3d594cf8ef7df56831d79f7e9 | import cv2, numpy as np
from dolphintracker.singlecam_tracker.camera_filter.FindDolphin import SearchBlobs
from dolphintracker.singlecam_tracker.camera_filter.BackGroundDetector import BackGroundDetector
import datetime
class PoolCamera(object):
def __init__(self, videofile, name, scene, maskObjectsNames, filters, f... | Python | dolphintracker/singlecam_tracker/pool_camera.py | UmSenhorQualquer/d-track | mit | 3,437 | 106 | codeparrot/github-code |
41bbd3d1fd1b72560148497631233856241773126f6517254e0f3e12c2d3e084 | <?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Worldpay\Payments\Test\Unit\Controller\Apm;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
class RedirectTest extends \PHPUnit_Framework_TestCase
{
public function... | PHP | Test/Unit/Model/Controller/Apm/RedirectTest.php | Worldpay/worldpay-magento2 | mit | 6,660 | 186 | codeparrot/github-code |
26e50455fc7c5fb72ed3cd108c800c2a84291c907b9dcd4fa88231ad17f64c4a | /*
* Copyright (c), NXP Semiconductors Gratkorn / Austria
*
* (C)NXP Semiconductors
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any... | C | src/NxpRdLibPublicReleas-2.1/NxpRdLib_PublicRelease/comps/phKeyStore/src/Sw/phKeyStore_Sw.c | zhang1career/1PAY.SYS | mit | 18,088 | 499 | codeparrot/github-code |
a387234709d0a0eecfa3fbcb66b60a6d2d27a74f29499769aefd1fc6e47af2bc | package com.edinubuntu.petlove.fragment;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.LayoutInflater;
import android.vi... | Java | PetLove/src/main/java/com/edinubuntu/petlove/fragment/MarketSuggestionFragment.java | edwardinubuntu/PetBook | mit | 6,305 | 152 | codeparrot/github-code |
ab9def30b0fae00e4b8cd423a219475f5bb5805f4f96d4fe6d9bf568d6064ea7 | import * as Debug from 'debug';
import * as Models from '../models';
const debug = Debug('neeo:device:ComponentFactory');
// TODO declare types in models/components to use here and in requestHandler.
const TYPE_BUTTON = 'button';
const TYPE_SWITCH = 'switch';
const TYPE_SLIDER = 'slider';
const TYPE_SENSOR = 'sensor'... | TypeScript | src/lib/device/componentFactory.ts | NEEOInc/neeo-sdk | mit | 8,031 | 311 | codeparrot/github-code |
7fa0bf9ed1f4587f3d49850b3e2b45935fe1f4b0d1d1416b7ac18c72c085e650 | {% extends path2+"/_layout.html" %}
{% block scoring_content %}
<h3 class="heading-large mt10">Moving around and using steps</h3>
<div class="evidence__box citizen">
<div class="evidence__label">Claimant statements</div>
<div class="evidence__content">
<p>Tony says he can move safely and repeatedly... | HTML | app/views/assess/v5/victorcastillo/scoring/mobility.html | dwpdigitaltech/healthanddisability | mit | 4,269 | 103 | codeparrot/github-code |
8442d394a41a8844abeab77377248cbe011e87868f29b1632cee4ef4c7be6c99 | /**
xxHash64 implementation in pure Javascript
Copyright (C) 2016, Pierre Curto
MIT license
*/
var UINT64 = require('cuint').UINT64
/*
* Constants
*/
var PRIME64_1 = UINT64( '11400714785074694791' )
var PRIME64_2 = UINT64( '14029467366897019727' )
var PRIME64_3 = UINT64( '1609587929392839161' )
var PRIME64_4 = UIN... | JavaScript | lib/xxhash64.js | pierrec/js-xxhash | mit | 8,389 | 345 | codeparrot/github-code |
7bad32d430c5b84d423bd96f9ba71b8570d7246208b0b5e4fbca80a5e0262c5c | module powerbi.visuals {
export class ForceGraph implements IVisual {
public static capabilities: VisualCapabilities = {
dataRoles: [
{
name: 'Values',
kind: VisualDataRoleKind.GroupingOrMeasure,
},
],
... | TypeScript | PowerBIVisual/forceGraph/src/forceGraph0-0-1.ts | liupeirong/Azure | mit | 8,251 | 217 | codeparrot/github-code |
70ab4dae72cf1031a9cc9235ed39536bae0be7ed5c295904b37d234e9eb011c1 | #!/usr/bin/python
#
# Copyright 2016 Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['prev... | Python | dev/scratch/docker/image/qb_docker_image.scratch.py | nrser/qb | mit | 26,930 | 772 | codeparrot/github-code |
c1c783848a80df29b69f12493d67eba26ca6b00418f9387b0da552a94f691223 | // instanciando módulos
var gulp = require('gulp');
var watch = require('gulp-watch');
var del = require('del');
var shell = require('gulp-shell');
var connect = require('gulp-connect');
gulp.task('run:pelican', shell.task([
'pelican content -s pelicanconf.py'
]));
gulp.task('clean:pelican', function () {
return ... | JavaScript | gulpfile.js | gustavofoa/blog.musicasparamissa.com.br | mit | 1,079 | 40 | codeparrot/github-code |
b9ac1dd88a7a204dd2e69d02cbe436851fc3a191b134aa22279c44e21a04b9ed | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... | C | libjsconsole/JSConsole.h | LianaHus/webthree | mit | 2,672 | 114 | codeparrot/github-code |
bd62973ccb91706b282c04ea5857d9afaceec9dfb52e30c88a82a94947e5c4df | // Copyright (c) 2012-2018 The DigiByte Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DIGIBYTE_BLOOM_H
#define DIGIBYTE_BLOOM_H
#include <serialize.h>
#include <vector>
class COutPoint;
class CTransa... | C | src/bloom.h | digibyte/digibyte | mit | 5,355 | 144 | codeparrot/github-code |
86e4136e938f972084b7420f51a719afe4d326f0792568fb32e70b88453e0451 | #include "hash.h"
#include "list.h"
extern void *hash_init(hash_table *h, size_t elem_size,
hash_fn_t hash_fn, comp_fn_t comp,
unsigned long table_size) {
array *a;
if ((a = malloc(sizeof(array))) == NULL)
return NULL;
h->a = a;
h->table_size = table_size;
h->tsize = elem_size;
h->hash_fn = h... | C | src/hash.c | mihaiolteanu/algorithms | mit | 2,014 | 75 | codeparrot/github-code |
77fdb6ad1562eafec5e8f226fcad7f96858593e1a60ab862ffc2d5afedda9e4b | var smidig = smidig || {};
smidig.voter = (function($) {
var talk_id, $form, $notice, $loader;
function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
function save_vote($form, talk_id) {
var vote... | JavaScript | public/javascripts/feedback_vote.js | smidig/smidig-conference | mit | 2,752 | 114 | codeparrot/github-code |
2ca4b8d661d7c3bc986e51e8bb719274e60dbbae75920cfcba713dea26081b88 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.SharePoint.Client;
using OfficeDevPnP.Core.Framework.Provisioning.Model;
using OfficeDevPnP.Core.Diagnostics;
using ContentType = OfficeDevPnP.Core.Framework.Provisioning.Model.ContentType;
using OfficeDevPnP.Core.Framework.Provisioning... | C# | Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectContentType.cs | Oaden/PnP-Sites-Core | mit | 23,911 | 495 | codeparrot/github-code |
21eab2ca977871aae16f30aea14eadccd522090a26fa40c987ca3944756367fa | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using MixedRealityToolkit.Common;
using UnityEngine;
namespace MixedRealityToolkit.Utilities
{
/// <summary>
/// A Tagalong that stays at a fixed distance f... | C# | Two-hands manipulation/Assets/MixedRealityToolkit/Utilities/Scripts/SphereBasedTagalong.cs | davidezordan/MixedRealitySamples | mit | 3,507 | 100 | codeparrot/github-code |
8cb7042de62d9205efb742fc90a7c54dea9dd6404880a994f9bdfb4dee169d52 | <?php
namespace MCPI;
/**
* Transaction Recurrance Type Month
* - Repeat every X months on the Y day of the month
*/
class Transaction_Recurrance_Type_Month extends Transaction_Recurrance_Type_Abstract
{
protected static $type = 'month';
protected static $fields = array(
'month_count',
'mo... | PHP | app/code/transaction/recurrance/type/month.php | chrisputnam9/money | mit | 1,304 | 54 | codeparrot/github-code |
c408aa6e69b817fc4e3fa8dfc207a1bfe22e0f8f4bc8e6494e67272367242f77 | module.exports = (function () {
'use strict';
var strings = require('../../strings').dead,
style = require('../../style');
return {
create: function(){
this.game.world.width = this.game.canvas.width;
this.game.world.height = this.game.canvas.height;
this.game.camera.reset();
this... | JavaScript | public/game/play/states/dead.js | bericp1/capstone | mit | 1,451 | 53 | codeparrot/github-code |
bb34590dd351b8e6781fa48a1e8bbf5829f1626768a9469a00f8af51d24c5ea2 | // We only need to import the modules necessary for initial render
import CoreLayout from '../layouts/CoreLayout';
import Home from './Home';
import CounterRoute from './Counter';
/* Note: Instead of using JSX, we recommend using react-router
PlainRoute objects to build route definitions. */
export const creat... | JavaScript | src/routes/index.js | Rodjers/gitletask-web | mit | 1,071 | 37 | codeparrot/github-code |
a61334f4fa4db89d628f79578150a4f27098158b6faf000c6d247ce0704d6687 | /*
* Header: semaphore.h
*
* Provides wrapper functions around POSIX system calls semget,
* semctl and semop allowing the creation, initialization, opening
* and removal of a single semaphore at a time and implementing
* operations down (also known as P or wait) and up (also known as V
* or signal) on it.
*... | C | lib/semaphore.h | rogerxaic/legendary-spoon | mit | 1,725 | 79 | codeparrot/github-code |
acfe4f101d3d522e020b8af986ff8b8f2db361b11535dba4af144283d0f39138 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="search... | HTML | OpenLibraClient/docs/html/search/properties_63.html | vbergae/OpenLibraClient | mit | 2,360 | 45 | codeparrot/github-code |
37e249172f4a306b96c2a4537e0558e1cf74c17ac401e3294c520231404f55b9 | #include <iostream>
#include <vector>
#include "PointerVectorExample.h"
#include "Score.h"
using namespace std;
namespace samples
{
void PointerVectorExample()
{
vector<Score*> scores;
scores.reserve(5);
Score* cppScore = new Score(30, "C++");
Score* algoScore = new Score(59, "Algorithm");
Score* javaSco... | C++ | 06/PointerVectorExample.cpp | popekim/CppSamples | mit | 1,489 | 74 | codeparrot/github-code |
e1e7caf8df5cb1096b61ead220b87f6b37533be6b3fac75da29eef6b0f2f88ac | #!/usr/bin/python
import math
def trapezint(f, a, b, n) :
"""
Just for testing - uses trapazoidal approximation from on f from a to b with
n trapazoids
"""
output = 0.0
for i in range(int(n)):
f_output_lower = f( a + i * (b - a) / n )
f_output_upper = f( a + (i + 1) * (b - a) / ... | Python | adaptive_trapezint.py | chapman-phys227-2016s/hw-1-seama107 | mit | 1,279 | 42 | codeparrot/github-code |
76360c6326ea674e294f601020e095e0977ffcf4fa390cec583aa288e6789f99 | import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from '../Tooltip';
import SvgExclamation from '../svg/Exclamation.js';
import styles from './Input.scss';
class InputErrorSuffix extends React.Component {
render() {
return (
<Tooltip
dataHook="input-tooltip"
dis... | JavaScript | src/Input/InputErrorSuffix.js | skyiea/wix-style-react | mit | 919 | 36 | codeparrot/github-code |
43428c3b5ae41e4db9917287c233935ca13fe83de35cc1ba42780f9b26ca6e7b | const fs = require("fs");
const path = require("path");
const {template} = require("lodash");
const minimist = require("minimist");
const yaml = require("js-yaml");
const argv = minimist(process.argv.slice(2));
const conf = {};
try {
const src = fs.readFileSync(path.resolve(__dirname, "../deploy-config.yml"));
co... | JavaScript | .deploy/build.js | tyler-johnson/shorturl | mit | 1,479 | 63 | codeparrot/github-code |
c911d90a1a33e7a64e1c11d889025df4a98fea7e0f75ad04659100651d5bac49 | var set = new HashSet();
//Array size
var arrElementWidth = 150;
var arrElementHeight = 40;
//Key size
var keyWidth = 50;
var keyMargin = 5;
var width = 800;
var height = DEFAULT_TABLE_SIZE * (arrElementHeight + 5);
//Hash function block size
var blockWidth = keyWidth + keyMargin + arrElementWidth;
var blockHeight ... | JavaScript | js/visualization/HashVisualization.js | DAT200-Visualization-Team/DAT200-Visualization | mit | 9,652 | 292 | codeparrot/github-code |
a3e32015422e1ea87286ea74f1fa269e1a4a0c4c56a0a0da94c30c3409045ec7 | "use strict";
function Wall(layer, id) {
powerupjs.GameObject.call(this, layer, id);
// Some physical properties of the wall
this.strokeColor = 'none';
this.fillColor = 'none';
this.scoreFrontColor = "#FFC800";
this.scoreSideColor = "#B28C00";
this.defaultFrontColor = '#0018FF';
this.defaultSideColor = '#001... | JavaScript | ballsy/js/gameobjects/Wall.js | rseigel/ballsy-javascript-game | mit | 7,813 | 266 | codeparrot/github-code |
e105c0be06aba9903c6c43e1c64249706334d1ca68a8b6e10364b57ab3b8ed6f | package cmd
import (
"fmt"
"net"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
"github.com/ferrariframework/ferrariserver/config"
"github.com/ferrariframework/ferrariserver/grpc/gen"
rpcservices "github.com/ferrariframework/ferrariserver/grpc/services"
"githu... | GO | cmd/serve.go | ferrariframework/ferrariserver | mit | 2,025 | 69 | codeparrot/github-code |
bb1d4d5f9097eeb615fb869125a6357328888284d1d41b2d2757341ca2c83661 | package iso20022
// Characteristics of the ownership of an investment account.
type InvestmentAccountOwnershipInformation4 struct {
// Organised structure that is set up for a particular purpose, eg, a business, government body, department, charity, or financial institution.
Organisation *Organisation3 `xml:"Org"`
... | GO | InvestmentAccountOwnershipInformation4.go | fgrid/iso20022 | mit | 3,315 | 73 | codeparrot/github-code |
bf8c823c08d474329012d0af409fafef63553c4b5ba839ee089327008cbf4fb3 | export default function createRegistry(repositories) {
const storage = { ...repositories };
const registry = {
register(repositoryName, repository) {
storage[repositoryName] = repository;
return registry;
},
has(repositoryName) {
return !!storage[re... | JavaScript | src/createRegistry.js | RobinBressan/json-git-redux | mit | 780 | 32 | codeparrot/github-code |
402d3ae13b614240d0881436aae5cdb1fa9f9faebd1c55afcdfd649d8bc1711c | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 24 16:25:41 2016
@author: pavel
"""
from gi.repository import Gtk
import parameter_types as ptypes
from logger import Logger
logger = Logger.get_logger()
#
import gobject
gobject.threads_init()
#decorator is used to update gtk objects from ano... | Python | gtk_wrapper.py | i026e/python_ecg_graph | mit | 5,750 | 181 | codeparrot/github-code |
d2897d3213c234c7e78b4cc09b3e7f71b90522a67846b59d99f3f5cd11368888 | /**
* Created by cc on 15-8-1.
*/
angular.module('app.services').factory('loginWithCode', ['app.api.http', '$ionicPopup','Storage','ENV','$state', function (http, $ionicPopup,Storage,ENV,$state) {
var dataJSON = {}
function login(){
if(ENV.code){
http.get('loginWithCode', {code:ENV.code... | JavaScript | www/client/js/services/loginWithCode.js | honeyzhaoAliyun/als-wechat | mit | 1,458 | 54 | codeparrot/github-code |
766b342b7c307b99624e1ae8532fa732986d9f4eb5bb4522f6a08fcc79e6c90b | lookup = {}
lookup = dict()
lookup = {'age': 42, 'loc': 'Italy'}
lookup = dict(age=42, loc='Italy')
print(lookup)
print(lookup['loc'])
lookup['cat'] = 'cat'
if 'cat' in lookup:
print(lookup['cat'])
class Wizard:
# This actually creates a key value dictionary
def __init__(self, name, level... | Python | apps/09_real_estate_data_miner/concept_dicts.py | derrickyoo/python-jumpstart | mit | 933 | 41 | codeparrot/github-code |
197c700112de96620482a6fbc44f0c5a081d832841c7b2700b436e4cf5554577 | import React, { PropTypes, Component } from 'react';
import { View, ScrollView, Text, TouchableOpacity, Keyboard, ListView, Platform,
AsyncStorage } from 'react-native';
import getEmojiData from './data';
import ScrollableTabView from 'react-native-scrollable-tab-view';
const STORAGE_KEY = 'RNEI-latest';
class Emoji... | JavaScript | lib/selector.js | camlahoud/react-native-emoji-input | mit | 6,918 | 234 | codeparrot/github-code |
ceeaec6686ccf95df6ed7f61fa4f6893fd95231c28bf37bf7127a117f8ca9eac | class G5::Jobbing::JobRetriever
include G5::Jobbing::JobFetcher
attr_accessor :location_setting_urns
def initialize(params={})
self.location_setting_urns = params[:location_setting_urns]
end
def current
fetch_get jobs_url_for_locations
end
def perform
warn "[DEPRECATION] `perform` is deprec... | Ruby | lib/g5/jobbing/job_retriever.rb | G5/g5-jobbing | mit | 823 | 36 | codeparrot/github-code |
a31f94cd3afc41c6e89caf8b1559dd4d2c5dc15c71c08260b4e7fd024ca8f698 | 'use strict';
// dts
import {IGlobalSumanObj} from "suman-types/dts/global";
import {IIntegrantsMessage, ISumanModuleExtended} from "suman-types/dts/index-init";
// polyfills
const process = require('suman-browser-polyfills/modules/process');
const global = require('suman-browser-polyfills/modules/global');
// core
... | TypeScript | src/index-helpers/handle-integrants.ts | sumanjs/suman | mit | 5,414 | 172 | codeparrot/github-code |
218f275fea6f67d4b7ad5793a7916ee6f3077c15b19de05e426ffa5602738881 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# run as:
# python web2py.py -S eden -M -R applications/eden/static/scripts/tools/build.sahana.py
# or
# python web2py.py -S eden -M -R applications/eden/static/scripts/tools/build.sahana.py -A gis
#
#
# Built with code/inspiration from MapFish, OpenLayers & Michael C... | Python | static/scripts/tools/build.sahana.py | smeissner/eden | mit | 14,872 | 455 | codeparrot/github-code |
1fbd06b38cc9f1cd23e4fc486d98776587e4d6656c66536b7d394ca2a2aa6b30 | import * as React from 'react';
import {Items,Item,Row,Col,Table,Code} from 'yrui';
let thead=[{
key:'key',
value:'参数',
},{
key:'expr',
value:'说明',
},{
key:'type',
value:'类型',
},{
key:'values',
value:'可选值',
},{
key:'default',
value:'默认值',
}];
//
let route=[{
key:'url',
expr:'路径',
type:'strin... | JavaScript | app/api/frame.js | ahyiru/phoenix-boilerplate | mit | 7,316 | 422 | codeparrot/github-code |
ec235c0a1d7051479522b7d1e45b980db0792bf68a7377bb3d21026dc7307ca4 | #include <cstdio>
#include <vector>
using namespace std;
long long phi(long long n)
{
long long ans = n;
for (long long i = 2LL; i*i <= n; i++) {
if (n % i == 0LL) {
ans -= ans / i;
while (n % i == 0LL) {
n /= i;
}
}
}
if (n > 1) {
ans -= ans / n;
}
return ans;
}
vect... | C++ | poj/2/2480.cc | eagletmt/procon | mit | 870 | 48 | codeparrot/github-code |
fecc333a933aafaaa4490213d3a600f94862b79efa831da63ceb60ce64faa547 | """
Consider this game: Write 8 blanks on a sheet of paper. Randomly pick a digit 0-9. After seeing the digit, choose one
of the 8 blanks to place that digit in. Randomly choose another digit (with replacement) and then choose one of the 7
remaining blanks to place it in. Repeat until you've filled all 8 blanks. You wi... | Python | DailyProgrammer/20120430B.py | DayGitH/Python-Challenges | mit | 1,804 | 56 | codeparrot/github-code |
098e5f07b704e319336be84a94b296c07748665d0274d1b832d2b8cb2a87fb74 | <?php
namespace Cs278\Mktemp\Exception;
final class CreateFailedException extends \RuntimeException
{
public static function failedFile($dir)
{
$dir = $dir
? rtrim($dir, DIRECTORY_SEPARATOR)
: sprintf('cwd[%s]', getcwd());
return new self(sprintf(
'Failed t... | PHP | src/Exception/CreateFailedException.php | cs278/php-mktemp | mit | 681 | 31 | codeparrot/github-code |
f92d40bb82041d05e417740c3c5f300931a30963f3c132623a3034c11e8fa07c | /*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012,2013 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foun... | C | OS_PORT/os/ports/GCC/ARM/AT91SAM7/wfi.h | nikhil9/nayan_slave_firmware | mit | 1,512 | 44 | codeparrot/github-code |
3d4c3551cc0dc21dba33d643263831520c84aa4de5e7e58d2f964c62400abe69 | //====================================================================================================================
// Copyright (c) 2012 IdeaBlade
//====================================================================================================================
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARR... | C# | AccoBooking/ViewModels/Booking/Reminder/BookingReminderSummaryViewModel.cs | jkattestaart/AccoBooking | mit | 7,519 | 220 | codeparrot/github-code |
aa98480093e3b9737bac0dd210f48dd2894575255164b84f539455b7f830e914 | //
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado ... | Java | src/main/java/br/com/swconsultoria/cte/schema_300/evPrestDesacordo/TUFSemEX.java | Samuel-Oliveira/Java_CTe | mit | 2,318 | 97 | codeparrot/github-code |
a0781fcca08eb7da7ee5c1ffc7e324d9da4a4057540d2de1141565cc13b27470 | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors.server.controller'),
Product = mongoose.model('Product'),
multiparty = require('multiparty'),
uuid = require('node-uuid'),
fs = require('fs'),
_ = require('lodash');
/**
* Create a Product
*/
... | JavaScript | app/controllers/products.server.controller.js | B1aZer/yaltatoys | mit | 2,922 | 130 | codeparrot/github-code |
5c4584480990c85ca0bc04b79566d7c0f725fc0e3754ae6845faf93073dc2cce | package trusis.config.personaggi;
import java.util.ArrayList;
import java.util.List;
import trusis.config.personaggi.define.Personaggio;
import trusis.config.personaggi.define.stdPersonaggio;
import trusis.config.poteri.UccisioneNotturna;
import trusis.config.poteri.define.Potere;
public class Trusis exten... | Java | src/trusis/config/personaggi/Trusis.java | rudidudi/Trusis | mit | 1,137 | 40 | codeparrot/github-code |
0775cd66d9ee979a4e4fb59afdbf9663207d90e9043741aea22561f219774b75 | #!/usr/bin/python
import sys
import re
re_valid_email = re.compile(r'^[-_0-9a-zA-Z]+@[0-9a-zA-Z]+\.[0-9a-zA-Z]{1,3}$')
def valid_email(s):
return not (re_valid_email.search(s) == None)
N = int(raw_input().strip())
A = []
for i in range(N):
A += [ str(raw_input().strip()) ]
A.sort()
V = filter(valid_email, ... | Python | validate-list-of-email-address-with-filter.py | nabin-info/hackerrank.com | mit | 747 | 40 | codeparrot/github-code |
893fe6fb17d156817f75c90b5053357bb79e2c11830e63fbf7c06b6108ee5961 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace DocoptNet
{
public class Docopt
{
public event EventHandler<PrintExitEventArgs> PrintExit;
public IDictionary<string, ValueObject> Ap... | C# | src/DocoptNet/Docopt.cs | Comandermuffif/docopt.net | mit | 19,154 | 487 | codeparrot/github-code |
f69f89393215eaeed540e2bc0844244df1c416591a5a753d22377908a6294fab | package modtweaker.mods.botania.handlers;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import stan... | Java | src/main/java/modtweaker/mods/botania/handlers/Apothecary.java | elucent/ModTweaker | mit | 3,285 | 89 | codeparrot/github-code |
74d08d7bbacff30175cdbec3447f77a24b1ae0a6fafc0de7945c8901c80960ba | package com.github.badoualy.telegram.tl.api.request;
import com.github.badoualy.telegram.tl.TLContext;
import com.github.badoualy.telegram.tl.api.TLAbsInputUser;
import com.github.badoualy.telegram.tl.api.TLAbsUpdates;
import com.github.badoualy.telegram.tl.core.TLMethod;
import com.github.badoualy.telegram.tl.core.TL... | Java | tl/src/main/java/com/github/badoualy/telegram/tl/api/request/TLRequestMessagesAddChatUser.java | badoualy/kotlogram | mit | 3,599 | 118 | codeparrot/github-code |
435bf0a06fe32b75fd5238ffcfdcc79f496e9213ad30c5ac393cceb0538b0adb | /*
* Copyright (C) 2013 Google Inc. 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 condition... | C++ | Source/core/platform/chromium/support/WebMediaStreamTrack.cpp | lordmos/blink | mit | 4,409 | 147 | codeparrot/github-code |
183c7467583e647ff8620cc09ae5234802aa751c53d41369526a4a288087379f | /*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2016 Eric Lafortune @ GuardSquare
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the F... | Java | app/proguard5.3.1/src/proguard/GPL.java | anphetamina/GG-well-trade | mit | 6,530 | 197 | codeparrot/github-code |
48133f57dcc5e913afa6a9eae89a9ff7578c7320346a098036fa044f2f805497 | <?php
namespace DD\ShopBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ResourceType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
... | PHP | src/DD/ShopBundle/Form/ResourceType.php | dima7em/Itra | mit | 893 | 41 | codeparrot/github-code |
6b149e9c55964cdab9f9d346f32cfa66cba49cbfbaab0d9ee1878eccbf9db950 | 'use strict'
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ManifestPlugin = require('webpack-manifest-plugin')
const InterpolateHtmlPlugin = require('react-dev-utils/Interpo... | JavaScript | config/webpack.config.prod.js | antoinechalifour/Reddix | mit | 13,420 | 310 | codeparrot/github-code |
4c7d690047f260fc8ad6f9c5755595db64e056bb5135d32af843618156e79e14 |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>W30725_text</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div style="margin-left: auto; margin-right: auto; width: 800px; overflow: hidden;">
... | HTML | ocr_extracted/W30725_text/page37.html | datamade/elpc_bakken | mit | 2,818 | 61 | codeparrot/github-code |
1d6619936393079201fe4e138394c5a15d52e2e598f4f0ab6c5f7ade79dfda93 | <?php
/* FinanceiroBundle:Endereco:edit.html.twig */
class __TwigTemplate_1dc971c36abf90e00714509b23da42af7e32f6d9a7851853410b161779a15e2d extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
try {
$this->parent =... | PHP | app/cache/dev/twig/1d/c9/71c36abf90e00714509b23da42af7e32f6d9a7851853410b161779a15e2d.php | adrianoGaspar/ags | mit | 2,069 | 78 | codeparrot/github-code |
aea9413c4bc1bf0ed32189dbc9f6205aacd790de28c9632f514e38d897025ce1 | #ifndef BIOSENSOR_MODELING_PARAMETERS_UTILS_H
#define BIOSENSOR_MODELING_PARAMETERS_UTILS_H
#include <cmath>
#include <string>
struct parameters {
// Width of bio-sensor parts widths
double d_e;
double d_m;
// Width and time mesh parameters
unsigned N_b;
unsigned T;
unsigned M;
// Mode... | C | src/parameters-utils.h | vined/biosensor-modeling | mit | 2,486 | 99 | codeparrot/github-code |
c8ac538047204d8a5fcd8926746cb050c4bdce62762fb9840dffbe142d8ae207 | var scene;
var camera;
var renderer;
var stats;
var geometry;
var material;
var line;
var ambientLight;
var loader;
var cow;
var cowMixer;
var walkCow;
var walkCowMixer;
var cowStatus = "walkings"; // none standing walking
cowCur = "walking"; // standing
var milk;
var loopAnim;
var loopFallMilk; // 循环滴落奶
var grass;
v... | JavaScript | threejs_gallary/front/src/script/canvas_cow_game_cow2url.js | chenjsh36/ThreeJSForFun | mit | 17,864 | 601 | codeparrot/github-code |
24b0d8e997787c0bba179eff1afd06e23cbde199c0ab57e55b63ae653d85f86e | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.forms import models
from djanban.apps.hourly_rates.models import HourlyRate
from django import forms
# Hourly rate creation and edition form
class HourlyRateForm(models.ModelForm):
clas... | Python | src/djanban/apps/hourly_rates/forms.py | diegojromerolopez/djanban | mit | 1,137 | 33 | codeparrot/github-code |
a55d1cc2442138bbe71b8a0d42f38c28b8de5f78445e6135dba223b83a270ffa | import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {MdcListDivider} from './list-divider';
import {
MdcList,
MdcListGroup,
MdcListGroupSubheader
} from './list';
import {
MdcListItem,
MdcListItemGraphic,
MdcListItemMeta,
MdcListItemSecondary,
MdcListItemText
} ... | TypeScript | packages/list/module.ts | trimox/angular-mdc-web | mit | 679 | 36 | codeparrot/github-code |
6f730b8001495b3f58c0725a96d5e8b8c6ba0a4d1c3d7b2bf02dbb9801ade136 | package com.tinkerrocks.process.traversal;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import java.util.function.BiPredicate;
/** <p> Class with predicate of string Ignore case contains</p>
* Created by ashishn on 8/16/15.
*/
public class Predicate<V> extends P<V> {
public Predicate(BiPredicate<V,... | Java | src/main/java/com/tinkerrocks/process/traversal/Predicate.java | anagav/TinkerRocks | mit | 927 | 32 | codeparrot/github-code |
e9bbb001903992c176e1dac517de82dfbb357e296696cc86d652a294e409572e | #pragma once
#include "VoreealActor.h"
#include "VoreealPagedVolumeComponent.h"
#include "VoreealPagedVolumeActor.generated.h"
UCLASS(ComponentWrapperClass)
class VOREEAL_API APagedVolumeActor : public AVoreealActor
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Voreeal", met... | C | Source/Voreeal/Classes/VoreealPagedVolumeActor.h | ChillyFlashER/Voreeal | mit | 935 | 34 | codeparrot/github-code |
a0fa240a591d1c86556986be98412ece1dab201f711802f93beade1e68003da7 | <?php
/*
* Copyright 2013 Yurii Ishchenko <ishenkoyv@gmail.com>
*
* Licensed u... | PHP | src/Ishenkoyv/Otrs/Client/Soap.php | ishenkoyv/otrs-lib | mit | 2,208 | 83 | codeparrot/github-code |
42de7be82d969f14f2c84d4e5ba0528d7f47be70903c35256c97cd07bfe426eb | import { Injectable } from 'angular2/core'
import { Http, Response } from 'angular2/http';
import { Beer } from './beer'
import 'rxjs/Rx';
@Injectable()
export class BeerService {
private _breweryDbKey = '2d18b2531035b441a50dddc3aed32a1b';
private _beerUrl = "http://localhost:1337/api.brewerydb.com/v2/beers?availa... | TypeScript | app/beer.service.ts | brmstephenson/Angular2-demo | mit | 1,542 | 45 | codeparrot/github-code |
3707b2e8131119131e2737dc60257fe14540f25e6a8114dd28dcd1fcfbc2b6be | package miquilini.felipe.intermediario.carta;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public enum Carta {
PAUS_4(0, "Quatro de Paus", 1), COPAS_4(1, "Quatro de Copas", 1), ESPADAS_4(2, "Quatro de Espadas", 1), OUROS_4(3, "Quatro de Ouros", 1),
PAUS_5(4, "Cinco de Paus", 2), CO... | Java | src/miquilini/felipe/intermediario/carta/Carta.java | felipexpert/truco | mit | 3,583 | 113 | codeparrot/github-code |
1717fe072b099d0f76cc93d7daab7477de72711649d48682c7ec01fcfc497fa4 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.azure.servicebus;
import com.microsoft.azure.servicebus.management.AccessRights;
import com.microsoft.azure.servicebus.management.AuthorizationRule;
import com.microsoft.azure.servicebus.management.En... | Java | sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/ManagementTests.java | navalev/azure-sdk-for-java | mit | 27,721 | 540 | codeparrot/github-code |
ab555e7ebe23cd1ba4cc0c812c653a01b8fbf47670d47431a588f909e03b3c7e | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The daemon that calls auto_copy.py uppon optical disc insertion
"""
import signal
import sys
import time
sys.path.append('/usr/local/bin')
import auto_copy
SIGNAL_RECEIVED = False
def run_daemon(config):
"""
Run the damon
config: configParser object
... | Python | auto_copy/auto_copy_daemon.py | shoubamzlibap/small_projects | mit | 798 | 40 | codeparrot/github-code |
5e8869f30c4ca338a26a551dfadd8e9d159b344af2572a8c1eceab78ad3d95f8 | // Copyright (c) 2014 Xiaomi.com, Inc. All Rights Reserved
// @file logger.go
// @author 王靖 (wangjing1@xiaomi.com)
// @date 14-11-25 20:02:50
// @version $Revision: 1.0 $
// @brief
package log
import (
"crypto/rand"
"fmt"
"math/big"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
)
// SysLog 系统Lo... | GO | log/logger.go | melong007/go-mysql-proxy | mit | 2,543 | 123 | codeparrot/github-code |
3d51d5f3a0572881dda2201d8266bcff53ccb793623050bc6b723ce50fec8ed7 | //============== IV: Multiplayer - http://code.iv-multiplayer.com ==============
//
// File: CMutex.cpp
// Project: Shared
// Author(s): jenksta
// License: See LICENSE in root directory
//
//==============================================================================
#include "CMutex.h"
#include <SharedUtility.h>
... | C++ | IvmpDotNet.Proxy/SDK/Shared/Threading/CMutex.cpp | purm/IvmpDotNet | mit | 2,225 | 121 | codeparrot/github-code |
a09e22886cbced77cfa82da5327e0dac81776b33490b956d97a880fb35fcb6c7 | <!DOCTYPE html>
<html class="light page-post">
<head>
<meta charset="utf-8">
<title>产品岗面试题 | Cain</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="面试,产品,题目," />
<meta name="description" content="面试产品岗的问题
先介绍下自己,试着用... | HTML | 2016/05/17/Interview Questions/index.html | caincho/caincho.github.io | mit | 9,370 | 405 | codeparrot/github-code |
20c654816bbec9acf6b927a7b96b76379a85ba89c53dc0c34d9ea2163d08e389 | #include <zmq.h>
#include <zlib.h>
#include <czmq.h>
#include <zframe.h>
#include "Crowbar.h"
#include "boost/thread.hpp"
#include "g2log.hpp"
#include "Death.h"
/**
* Construct a crowbar for beating things at the binding location
*
* @param binding
* A std::string description of a ZMQ socket
*/
Crowbar::Crow... | C++ | src/Crowbar.cpp | alexweltman/QueueNado | mit | 5,762 | 238 | codeparrot/github-code |
501c52b7822fcb8f80317d94e059bb66d37b68ace4f3560329b0b869a478f32f | using System.Diagnostics;
namespace ChainUtils.BouncyCastle.Math.EC.Custom.Sec
{
internal class SecP192K1Field
{
// 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
internal static readonly uint[] P = new uint[]{ 0xFFFFEE37, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
... | C# | ChainUtils.BouncyCastle/math/ec/custom/sec/SecP192K1Field.cs | assinnata/ChainUtils | mit | 5,313 | 176 | codeparrot/github-code |
a6554b6d51d0b51a7e6d1042b33faca79b32d2eb194ae0109fb3ce20338fb697 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sigil;
using System.Reflection;
using Jil.Common;
namespace Jil.Serialize
{
class SerializeDynamicThunk<T>
{
public static Action<object, TextWriter, Options> Thun... | C# | Jil/Serialize/SerializeDynamicThunk.cs | mgravell/Jil | mit | 1,209 | 46 | codeparrot/github-code |
31f9fae068c9275102d4e0d4d209c6bf8c34b2dcdffa4f1683fdf8cbfdbffa83 | # frozen_string_literal: true
module Gitlab
module GithubImport
# HTTP client for interacting with the GitHub API.
#
# This class is basically a fancy wrapped around Octokit while adding some
# functionality to deal with rate limiting and parallel imports. Usage is
# mostly the same as Octokit, f... | Ruby | lib/gitlab/github_import/client.rb | stoplightio/gitlabhq | mit | 6,728 | 219 | codeparrot/github-code |
6297220e1a56a65b2012880aaf3f0f2252dabdf1fa40e3d03a1b9d20c7fdf372 | # frozen_string_literal: true
require 'slack-notifier'
module ChatMessage
class BaseMessage
attr_reader :markdown
attr_reader :user_full_name
attr_reader :user_name
attr_reader :user_avatar
attr_reader :project_name
attr_reader :project_url
attr_reader :commit_message_html
def initi... | Ruby | app/models/project_services/chat_message/base_message.rb | stoplightio/gitlabhq | mit | 1,757 | 85 | codeparrot/github-code |
869c6cd298ab487cdb95660d7171f0388ffff6daa386149f8d77b3088698ff69 | package sales.bucket.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import sales.users.domain.User;
import javax.persistence.*;
import java.util.List;
/**
* Created by taras on 13.08.15.
*/
@Entity
@Table(name="buckets")
public class Bucket {
... | Java | src/main/java/sales/bucket/domain/Bucket.java | softjourn-internship/sales-if-ua | mit | 968 | 47 | codeparrot/github-code |
1e46fc4156d05fa46535deb525a03b863e0a6bd43c527dd264ce342f5e5d272f | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="shortcut icon" href="img/favicon.png">
<title>FreeMarket</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.... | HTML | public/ViewYourActiveItems.html | blackyblack/freemarket-lite | mit | 12,352 | 278 | codeparrot/github-code |
5f6b6bc69d9843af9b9c2fd83cd9847d7626a0d9618f4b3b4003fc5bf9f06fc7 | import React, { useEffect, useMemo, useRef } from 'react'
import styled from 'styled-components'
import {
Box,
Button,
Dialog,
extend,
Paragraph,
Progress,
RefreshIcon,
themeGet,
} from '../../components'
import { useFullSizeMode } from '../FullSizeView'
import { useIntersection } from '../IntersectionO... | TypeScript | packages/core/features/StandardView/StandardView.tsx | 8th713/cockpit-for-pixiv | mit | 4,678 | 197 | codeparrot/github-code |
6e15708324a0e73f1f23474fafaf362beb8dce5a0d6020bacd983c3bff216fd0 | <?php
namespace LaravelDoctrine\Extensions\Uploadable;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\EventManager;
use Doctrine\ORM\EntityManagerInterface;
use Gedmo\Uploadable\UploadableListener;
use LaravelDoctrine\ORM\Extensions\Extension;
class UploadableExtension implements Extension
{
public ... | PHP | src/Uploadable/UploadableExtension.php | jee7/extensions | mit | 954 | 37 | codeparrot/github-code |
aadd06c9b02cf87cca452eeda1007d90ad7f4588152b1db3602fb364ea570c4b | {template '_header'}
<div class="page-heading">
<span class='pull-right'>
{ifp 'shop.nav.add'}
<a class="btn btn-primary btn-sm" href="{php echo merchUrl('shop/nav/add')}">添加新首页导航</a>
{/if}
<a class="btn btn-default btn-sm" href="{php echo merchUrl('shop/nav')}">返回列表</a>
</span>
<h2>{if !e... | HTML | addons/ewei_shopv2/plugin/merch/template/web/manage/shop/nav/post.html | Broomspun/shanque | mit | 4,863 | 92 | codeparrot/github-code |
ad516df1c2cc5ece93afdf02990dc3ec0735c4d5952915e817df941656807e6d | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net.Http.Headers;
namespace food_therapist.Areas.HelpPage
{
/// <summary>
/// This is used to identify the place where the sample should be applied.
/// </summary>
public class HelpPageSampleKey
{
/// ... | C# | food-therapist/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs | raduaron26/food-therapist | mit | 6,478 | 173 | codeparrot/github-code |
c9c56f441e07afead6c0dd1ea9a699ed4e732607956c85f3d8a913c4a09f459a | package com.f2prateek.segment.model;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.Collections;
import java.util.Date;
import java.util.Map;
import static com.f2prateek.segment.model.Utils.assertNotNull;
import static com.f2prateek.segment.model.Utils.assertNo... | Java | segment-model/src/main/java/com/f2prateek/segment/model/ScreenMessage.java | f2prateek/segment-android | mit | 5,218 | 168 | codeparrot/github-code |
ebcdb2d915053424de7fd2e12b33fb6754e2c8cd7d2c133c9ffd34cb9dbfb8bb | import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import sinon from 'sinon';
import RadioInput from './';
describe('RadioInput', () => {
let wrapper;
let value;
let style;
let onChange;
beforeEach(() => {
value = 'test';
style = { backgroundColor: 'blue' };... | JavaScript | src/components/RadioInput/RadioInput.spec.js | bjlaa/facebook-clone | mit | 1,012 | 45 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.