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 |
|---|---|---|---|---|---|---|---|---|
aa81627ae935dd9954491e143808df5d92365bc40a02a8fcaa71794ef32370c2 | package cli
import (
"net/url"
"github.com/takecy/bob/entity"
gojenkins "github.com/yosida95/golang-jenkins"
d "github.com/tj/go-debug"
)
var debug = d.Debug("cli")
// ListJobs jenkins jobs
func ListJobs(conf *entity.JenkinsConfig) (jobs []gojenkins.Job, err error) {
debug("[ListJobs]conf", *conf)
auth := &... | GO | cli/jenkins.go | takecy/bob | mit | 1,748 | 88 | codeparrot/github-code |
2177f1f76c6c872c19d6c3c294b6bb8b9584fbd4d234ea519886b245a061bc4c | import praw, argparse, sys, json, re, os, time, traceback
from peewee import *
from logins import *
from var_dicts import *
user_agent = "StunfiskHelperBot v0.1.1 by /u/0ffkilter"
reddit = praw.Reddit(user_agent=user_agent)
reddit.login(bot_name, bot_password)
c_db = MySQLDatabase(database='stunbot', host='localhos... | Python | StunfiskBot.py | 0ffkilter/StunfiskBot | mit | 15,210 | 447 | codeparrot/github-code |
7ba5aa3abbd04c3dd60dadec431d28ab20f763c5209c21fff7ab3bc366486d5b | class EventInstancePresenter < BasePresenter
presents :event_instance
def created_at
event_instance.created_at.strftime('%H:%M %d/%m')
end
def title
event_instance.title || 'No title given'
end
def category
event_instance.category || '-'
end
def project_link
event_instance.project ? ... | Ruby | app/presenters/event_instance_presenter.rb | SergiosLen/WebsiteOne | mit | 1,755 | 73 | codeparrot/github-code |
90307541f82062df2ce89e54310bb49601e8c336fd60ede2ee36e711f1420ddb | from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
# Map PageElement constructor arguments to webdriver locator enums
_LOCATOR_MAP = {'css': By.CSS_SELECTOR,
'id_': By.ID,
'name': By.NAME,
'xpath': By.XPATH,
... | Python | page_objects/__init__.py | julietalucia/page-objects | mit | 4,653 | 136 | codeparrot/github-code |
a6084932411e6cdf78700068a0b76bbe1f247e83ecb6920a89d7a4d4926a1e50 | import { BaseTool } from './BaseTool';
import globals from '../globals'
export class FillTool extends BaseTool {
constructor(ctx) {
super(ctx)
}
draw(pos, color) {
this.ctx.fillStyle = color
this.ctx.fillRect(pos.x, pos.y,1,1);
}
onLeftMouseDown(pos) {
this.startColor = this.ctx.getImageData(... | JavaScript | app/js/tools/FillTool.js | Rabrennie/WewPixel | mit | 2,048 | 80 | codeparrot/github-code |
87f166bc8a18d87fa12983252b4c0e3a08562202cbf9a21bccee3a5c052b9f6e | package io.vrap.rmf.raml.test;
import java.util.List;
public class TckTest {
private String description;
private String input;
private Boolean valid;
private List<String> tags;
public String getDescription() {
return description;
}
public String getInput() {
return input;... | Java | raml-test/src/test/java/io/vrap/rmf/raml/test/TckTest.java | vrapio/rest-modeling-framework | mit | 785 | 43 | codeparrot/github-code |
7ed6e3abade88a20198b3d538fbc0540e79c2114bf756b14900366f7b327fbcd | #!/usr/bin/env bash
# This script will use rsync to
# Enable maintenance mode
# copy the files for the Jenkins job workspace to the provided target server:directory,
# copy the asset files for the Jenkins job workspace to the provided target server:directory,
# excluding the files listed in exclude.txt (regular express... | Shell | deployment-scripts/deploy_prod_remote_key.sh | bardius/BardisCMS | mit | 5,892 | 94 | codeparrot/github-code |
43e6e3f51df35c47335f607eddc38cfa6cf8ea829302f4a8606350095dd105da | #include "sdl_common.hpp"
namespace
{
std::function<void(const std::string&)> error_callback;
std::string last_error = "";
}
namespace sdl {
void
log_error(const std::string &error)
{
last_error = error;
if(error_callback)
{
error_callback("sdl-wrapper: " + error);
}
}
void
log_debug_error_... | C++ | sdl_common.cpp | PhilCK/sdl-wrapper | mit | 751 | 59 | codeparrot/github-code |
ef28b1c76bef95dfabbd9314df02d16826cda00fcbda0f784620bb2473508d75 | #include "SphereCollider.h"
#include "typeinfo"
#include <iostream>
#include <GL/glut.h>
#include <math.h>
#include "../../Objects/Wall.h"
bool firstcol =false;
SphereCollider::SphereCollider(GameObject *object,float radius, float relativeX, float relativeY, float relativeZ)
{
this->Setobject(object);
this->S... | C++ | Source/src/Engine/Physics/SphereCollider.cpp | LeandroSJN/CrashBall | mit | 6,548 | 162 | codeparrot/github-code |
f1462ee4f20bb02470b7f9f92591e882fd4fbfe5a989e1c69e24567e813b59b4 | <?php
/* AcmeDemoBundle:Welcome:index.html.twig */
class __TwigTemplate_a0d15a9de858981cdf8a607cdc5f4b057d6703143664164de4a4ed227170c75a extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTemplate... | PHP | app/cache/dev/twig/a/0/a0d15a9de858981cdf8a607cdc5f4b057d6703143664164de4a4ed227170c75a.php | guspaulg/pfa | mit | 9,908 | 205 | codeparrot/github-code |
b9528c5a14b4423e587eb1b9b7a24d64a34e9ac321b43c2e4fc3ba71d340c4b2 | module.exports.readFile = function(filepath) {
return ['cat', filepath];
};
module.exports.scanWiFi = function() {
return ['iwinfo', 'wlan0', 'scan'];
};
module.exports.getWifiInfo = function() {
return ['ubus', 'call', 'iwinfo', 'info', '{"device":"wlan0"}'];
};
module.exports.getIPAddress = function() {
retur... | JavaScript | lib/tessel/commands.js | Student007/t2-cli | mit | 5,327 | 157 | codeparrot/github-code |
04602b1750209617f4948ee9708debc549cae70a95bd1e6430f0176b04acda48 | /**
* Agent.java
*
* Agents model actors in the simulation's Grid.
*
* @author Agent Team
* Wheaton College, CSCI 335, Spring 2013
*/
package edu.wheaton.simulator.entity;
import java.awt.Color;
import net.sourceforge.jeval.EvaluationException;
import edu.wheaton.simulator.datastructure.Element... | Java | src/edu/wheaton/simulator/entity/Agent.java | tsmacdonald/simulator | mit | 7,412 | 301 | codeparrot/github-code |
2e7a7a30b589ea58e5a0c3a7d4bf0acec42141a8ec58e64c12bf71eee3681668 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ErrnoException | picturepark-sdk-v1-pickers API</title>
<meta name="description" content="Documentation for picturepark-sdk-v1-pickers API">
<meta name="viewport" content="width=d... | HTML | docs/picturepark-sdk-v1-pickers/api/interfaces/nodejs.errnoexception.html | Picturepark/Picturepark.SDK.TypeScript | mit | 11,999 | 262 | codeparrot/github-code |
25b560a25ac3a648c3b1fdc0055ecd7b586c2ebe9121e382f6d3b61d1ad35bd8 | package com.test.ui;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swin... | Java | Budget/src/com/test/ui/NewScheCard.java | allotory/tilmatura | mit | 4,975 | 176 | codeparrot/github-code |
b21f991ec911c49e84f47663e54a603eb07c6cde4ca5a4da82de16cce51747eb | #include "mex.h" /* Always include this */
#include <math.h>
#include <stdlib.h>
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
using namespace std;
/* nlhs: number of output variables
plhs : Array of mxArray pointers ... | C++ | Source/C++/GetBorderDist.cpp | JiaHaoSyu/IterativeContractionAndMerging | mit | 3,021 | 102 | codeparrot/github-code |
e4dbd04e3022d9ebe9927b90995fdb18833b276af37d88e2d390bea75abc80ee | ---
redirect_from: /docs/1.0.22/interfaces/state.hrefoptions.html
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>HrefOptions | @uirouter/angularjs</title>
<meta name="description" content="">
<meta name="viewport" content=... | HTML | _ng1_docs/1.0.22/interfaces/state.hrefoptions.html | ui-router/ui-router.github.io | mit | 22,688 | 466 | codeparrot/github-code |
b993356594b2d937851688a6a77606452d9d81d65d2bf7f4fe15eff97b846dc1 | <?php
/* HeticSearchBundle:Home:index.html.twig */
class __TwigTemplate_1170bc166915baf9652e98fc2ea4d703 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("HeticSearchBundle::layout.html.twig");
... | PHP | app/cache/dev/twig/11/70/bc166915baf9652e98fc2ea4d703.php | plberret/cinhetic | mit | 8,836 | 174 | codeparrot/github-code |
226ac99de121f1fe479ece0df5aef48900eb507fcd69cb5c995e5f95a1f04b7b | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 Justin Palinkas
*
* 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 rights
* to... | Java | src/jp77/beta/utillib/classloader/v2/wrappers/InstanceWrapper.java | J-P-77/utilities | mit | 23,053 | 701 | codeparrot/github-code |
bcbd97de918ca138f9c14186fd7e41d1c6f3880c0ba0c8fb79732588f625f771 | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics
{
public static class OsuFont
{
/// <summary>
/// The default font size.
... | C# | osu.Game/Graphics/OsuFont.cs | UselessToucan/osu | mit | 6,157 | 152 | codeparrot/github-code |
5c1b70bd69311a4e66178a679d3bf9232f83b7d074d58042c84d5bfc0f4c77c7 | // Tuneshuffle datastore module
const constants = require('./constants'),
uuid = require('uuid'),
DataStore = require('nedb'),
users = new DataStore({
filename: `${constants.DB.DATA_DIR}/${constants.DB.COLLECTIONS.USER}`,
autoload: true
}),
tracks = new DataStore({
filename:... | JavaScript | lib/dataStore.js | ArunMichaelDsouza/tuneshuffle | mit | 1,706 | 60 | codeparrot/github-code |
d73f18d758fbf0dc9cfc1f9ca750fd61de30629635803ff9914254cdcba1869c | package network.iut.org.flappydragon;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
public class Background {
private int height;
private int width;
private Bitmap background1;
private Bitmap background2;
private Bitma... | Java | FlappyDragon/app/src/main/java/network/iut/org/flappydragon/Background.java | vferries/iut-android | mit | 3,403 | 50 | codeparrot/github-code |
d4a8834fceb4f88707be2e587d01ff76986d5417fd8254f0974de44a8e51cfb3 | <?php
/**
* (c) FSi sp. z o.o. <info@fsi.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace FSi\Bundle\AdminBundle\Admin;
use FSi\Bundle\AdminBundle\Admin\Manager\Visitor;
interface ManagerInt... | PHP | Admin/ManagerInterface.php | chives/admin-bundle | mit | 683 | 33 | codeparrot/github-code |
ac2fa63067cc70310497840a42760e2b67206b40497271ba09e901fb60381df5 | "use strict";
var should = require('should');
var V4Validator = require('../../src/factory')();
describe('max', function() {
it('should not pass without the max argument', function (done) {
var data = {
field_1: 'hello',
field_2: 5,
field_3: ['hello', 'hey', 'hi', 'yo'... | JavaScript | test/rules/max.js | musejs/v4-validator | mit | 2,128 | 82 | codeparrot/github-code |
1a41732fbb67a83b70fd24e5310f70cadd3cb63a0d1a2ace8b11245160163cb2 | //! moment.js locale configuration
//! locale : german (de)
//! author : lluchs : https://github.com/lluchs
//! author: Menelion Elensúle: https://github.com/Oire
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function... | JavaScript | src/Ts/Superkicker/SuperkickerBundle/Resources/public/js/moment-js-de.js | timoschmidt/superkicker | mit | 2,340 | 74 | codeparrot/github-code |
19c86baa32cc9ee02a3b96b964e85b914a89f8a48b6c98202f78394ece9e986f | import axios from 'axios'
import { Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// 创建axios实例
const service = axios.create({
baseURL: process.env.BASE_API, // api的base_url
timeout: 5000 // 请求超时时间
})
// request拦截器
service.interceptors.request.use(config => {
// D... | JavaScript | src/renderer/utils/fetch.js | JoeShi/i18n-editor | mit | 1,841 | 67 | codeparrot/github-code |
2ee6ca579de41827efc89d582d44582580e93cc7b1cbc524b9679c3117b8f6f9 | using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
// Must be attached to the camera so that OnPostRender gets called
namespace BGE
{
public class LineDrawer : MonoBehaviour
{
struct Line
{
public Vector3 start;
public V... | C# | Assets/Code/LineDrawer.cs | skooter500/UnitySteeringBehaviours | mit | 8,438 | 226 | codeparrot/github-code |
5baeabc19036874cbde727d36906fcd69c225d6ca775914a9efe94f430746b14 | package com.example.plugintest.activity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.example.plugintest.receiver.PluginTestReceiver;
import com.example.plugintest.serv... | Java | PluginTest/src/com/example/plugintest/activity/PluginTestOpenPluginActivity.java | shper/Android-Plugin-Framework | mit | 1,520 | 56 | codeparrot/github-code |
4e293f8cde33105a994f0417d3d6d32565fd4c83f5358da60dfa84fb4924edf9 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// see: https://github.com/mariuszgromada/MathParser.org-mXparser
using org.mariuszgromada.math.mxparser;
[RequireComponent(typeof(LineRenderer))]
public class FunctionGenerator : MonoBehaviour {
public string y = "sin(x^2)*x^2 / 10";
... | C# | Assets/Scripts/FunctionGenerator.cs | Domiii/UnityLoopyLoops | mit | 1,659 | 60 | codeparrot/github-code |
1c387dc11f906b85c965d5b1f76a544bb1d9b48cfb298082febf532ffd972b8b | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>保证书内容设置 - LRMS</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></scri... | PHP | ms/guaranty.php | zhangpeng96/lrms | mit | 5,232 | 131 | codeparrot/github-code |
66066f2e268a1d5d9711909b3a39c994f125a38b5cd66886c7be3f93349fb072 | /**
* React Starter Kit for Firebase
* https://github.com/kriasoft/react-firebase-starter
* Copyright (c) 2015-present Kriasoft | MIT License
*/
let count = 0;
const listeners = new Set();
let notification;
export default {
listen(cb) {
listeners.add(cb);
return () => listeners.delete(cb);
},
notif... | JavaScript | src/utils/loading.js | kriasoft/react-static-boilerplate | mit | 787 | 32 | codeparrot/github-code |
ac5f9af01ae2b53c707ee1f9b44fdceba72f6bd0eb4edd043ffec891fc76eda4 |
package huffmancecilia;
/**
*
* @author Cecília Assis
*/
public class No /*implements Comparable<No> */{
private char letra;
private No direito, esquerdo;
private Integer pesoLetra; //porque int nao deu certo?
//public int valAresta;
public No(char letra, Integer pesoLetra) {
... | Java | algoritmos-ed2/huffmancecilia/No.java | ceciliassis/UFU | mit | 1,318 | 66 | codeparrot/github-code |
04d404d7418cc50fd57d9a7c3d54eeffc207e831a7390bc877a1772221982567 | (function() {
var restangular = angular.module('restangular', []);
restangular.provider('Restangular', function() {
// Configuration
var Configurer = {};
Configurer.init = function(object, config) {
object.configuration = config;
/**
* Those are HTTP safe methods for which there is no need to pass... | JavaScript | src/restangular.js | hartz89/restangular | mit | 49,661 | 1,422 | codeparrot/github-code |
5c4ae0faf0a45acc243a6461c0120d9f9ffd6bf8bd1dedc233281199efb61e2e | package com.mycompany.myfirstapp;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
public class DisplayMessageActivity extends AppCompatActivity {
@Override
protect... | Java | app/src/main/java/com/mycompany/myfirstapp/DisplayMessageActivity.java | discotroll65/FastPreventJetlag | mit | 1,300 | 43 | codeparrot/github-code |
ff296d07f896400b35e19fba667988b3aaaf324e6ce166474a51c9b78aa141d2 | <?php
namespace BeUbi\JobeetBundle\Controller;
use Sonata\AdminBundle\Controller\CRUDController as Controller;
class JobAdminController extends Controller
{
public function batchActionExtend(ProxyQueryInterface $selectedModelQuery)
{
if ($this->admin->isGranted('EDIT') === false || $this->admin->isGranted... | PHP | src/BeUbi/JobeetBundle/Controller/JobAdminController.php | tiagobrito/jobeet | mit | 2,033 | 59 | codeparrot/github-code |
f3d526541ceafdd66287c9c336e70010d6bb9806d4687f513a7a7d90aeb50730 | (function ($) {
"use strict";
$.fn.tautocomplete = function (options, callback) {
// default parameters
var settings = $.extend({
width: "500px",
columns: [],
onchange: null,
norecord: "No Records Found",
dataproperty: null,
... | JavaScript | tautocomplete.js | jartaud/tAutocomplete | mit | 14,338 | 432 | codeparrot/github-code |
61368ff269eedff0949519ee1b6e022f74856ec291a43749c3018528f934f27c | /*!
* Jaspe
* Copyright(c) 2017 - 2018 Quentin SAIEB
* MIT Licensed
*/
'use strict'
function parallel (tasks, callback) {
let index = 0
let completed = 0
let results = {}
const errors = []
const length = tasks.length
if (length === 0) {
callback(null)
}
while (index < length) {
tasks[ind... | JavaScript | src/parallel.js | devOups/jaspe | mit | 586 | 37 | codeparrot/github-code |
c137aaa3e0b58424e234fac6642c91f0fa362562e52333f2dc7410dd29c5a0af | import React from 'react'
import { action as MetaAction, AppLoader } from 'mk-meta-engine'
import config from './config'
import utils from 'mk-utils'
import { fromJS } from 'immutable'
import extend from './extend'
class action {
constructor(option) {
this.metaAction = option.metaAction
this.extend... | JavaScript | apps/mk-app-stock-card/action.js | ziaochina/mk-demo | mit | 6,983 | 256 | codeparrot/github-code |
bb73c2cfc2f34f7e2b12aef6b5659d59e21766932878c94b4a0589ed12b0047c | package me.yamakaja.irc.client.network.event.channel;
import me.yamakaja.irc.client.chat.ChatChannel;
import net.lahwran.fevents.Event;
import java.util.Date;
/**
* Created by Yamakaja on 04.02.17.
*/
public class TopicEvent extends Event {
private ChatChannel channel;
public TopicEvent(ChatChannel chann... | Java | client/src/main/java/me/yamakaja/irc/client/network/event/channel/TopicEvent.java | Yamakaja/irc-client | mit | 671 | 36 | codeparrot/github-code |
94c660f7c0c412afc432d51ceb7b4dff9f3971a9e9d4261e1c588df4339840ae | // pnode.cpp
// Every object in a scene is a node. A node has transformation interface and
// hierachical organization.
//
// Copyright 2012 - 2014 Future Interface.
// This software is licensed under the terms of the MIT license.
//
// Hongwei Li lihw81@gmail.com
//
//
#include "pnode.h"
#include <Paper3D/pscene.h... | C++ | src/scene_graph/pnode.cpp | lihw/paper3d | mit | 5,060 | 226 | codeparrot/github-code |
cad777d1637eb397e4d0d74d0c763d8f31473bfc4d58b0aad627e183c0fe6989 | /*global KhanUtil */
"use strict";
var av, // The JSAV object
answerArr = [], // The (internal) array that stores the correct answer
cloneArr = [], // Copy of (internal) array at start of exercise for reset
jsavArr, // The array that the user manipulates (JSAV object)
currArr, ... | JavaScript | Exercises/List/alistDeletePRO.js | hosamshahin/OpenDSA | mit | 3,913 | 123 | codeparrot/github-code |
4e1aff539a373d90e32c58fed3e3326337af521921cc767c6dd7bb9654b5835f | import io
import logging
import os
import re
log = logging.getLogger(__name__)
class file2(io.TextIOWrapper):
"""
Provides tools useful for navigating through and finding data
in the output files
"""
def __init__(self, name, mode='r', *args, **kwargs):
# super().__init__(*args, **kwargs)... | Python | terse/Tools/file2.py | talipovm/terse | mit | 5,523 | 197 | codeparrot/github-code |
74df690a78d862d16e42ae1ddc2b1cf71ec9aaae25c9daf4903d6c5866d511e9 | /* eslint-disable max-classes-per-file */
const pagination = require('./library/pagination');
const symPrivate = Symbol('dp-node.private');
class Finisher {
constructor(controller) {
this[symPrivate] = controller;
}
notfound(body) {
return this[symPrivate].finishWithCode(404, body);
}
invalid(body)... | JavaScript | lib/controller/index.js | why2pac/dp-node | mit | 4,556 | 178 | codeparrot/github-code |
fec1a1ad0a13f80f1056adc5899ae937772facaa142d62bee1dcd0da4eab89b9 | # -*- coding: utf-8 -*-
"""
Helper functions used in views.
"""
import csv
import xml
import urllib2
import time
import threading
from json import dumps
from functools import wraps
from datetime import datetime
from lxml import etree
from flask import Response
import logging
log = logging.getLogger(__name__) # pylin... | Python | src/presence_analyzer/utils.py | stxnext-kindergarten/presence-analyzer-jjanuzik | mit | 5,272 | 195 | codeparrot/github-code |
e7fa0a19207a49dfbf61e3f75b746f59ad84066ff3affd048fa578fe2d36ba79 | #ifndef KEEPSTICK_HPP
#define KEEPSTICK_HPP
#include "Game.hpp"
#include "Display.hpp"
#include "Accelerometer.hpp"
#include "PushSwitch.hpp"
class Stick {
public:
//重心位置は棒の先端
float rad, rad_v; //棒の角度, 棒の角速度
float cos, sin;
int length; //棒のながさ
void tri(void){
float x = rad, x2, x3, x4, x5;
x2 = x * x;
x3 =... | C++ | firmware/games/inc/KeepStick.hpp | exp-3/MayFesAdvanced | mit | 951 | 65 | codeparrot/github-code |
777a16902aa58f352359b09883854f00bd0b840a7af285c57599cff6bf37c4a9 | /**
*
*/
package com.skht777.chatwork.impl;
import java.util.List;
import com.skht777.chatwork.RequestMyTasks;
import com.skht777.chatwork.api.MyTask;
import com.skht777.chatwork.parameter.Status;
/**
* @author skht777
*
*/
class RequestMyTasksImpl extends ChatworkRequest implements RequestMyTasks {
/**
* ... | Java | src/com/skht777/chatwork/impl/RequestMyTasksImpl.java | skht777/chatwork-java | mit | 736 | 35 | codeparrot/github-code |
e2d6312bd0b1be8149e27d9cf5a95cd5b40b2be2fc65da9fa6e617bcc9fd8cd8 | #ifdef NALL_STRING_INTERNAL_HPP
namespace nall {
namespace Eval {
inline string evaluateExpression(Node* node) {
#define p(n) evaluateExpression(node->link[n])
switch(node->type) {
case Node::Type::Null: return "Null";
case Node::Type::Literal: return {"Literal:", node->literal};
case Node::Type::Function: ... | C++ | nall/string/eval/evaluator.hpp | apollolux/hello-phoenix | mit | 6,168 | 158 | codeparrot/github-code |
2016fea9e56289d0d139768ccbe69f5977bff048d8c796e5bfa69cf943777540 | #include <stdexcept>
#include <kernel_argument/kernel_argument.h>
namespace ktt
{
KernelArgument::KernelArgument(const ArgumentId id, const size_t numberOfElements, const size_t elementSizeInBytes, const ArgumentDataType dataType,
const ArgumentMemoryLocation memoryLocation, const ArgumentAccessType accessType, c... | C++ | source/kernel_argument/kernel_argument.cpp | Fillo7/KTT | mit | 5,802 | 234 | codeparrot/github-code |
6061a4df26404d542575d13b17f463af568592e848f132bd667a0c946d55a1fb |
/* tslint:disable */
/** DO NOT MANUALLY EDIT THIS FILE, IT IS GENERATED VIA GULP 'build-examples-module' */
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common';
import {ExampleMaterialModule} from './material-module';
e... | TypeScript | src/material-examples/example-module.ts | ChronosWS/material2 | mit | 29,960 | 882 | codeparrot/github-code |
e64977b6208d393adbb21e23500fb90dd580fbe83cc1ee646b6bbd2fb2fff601 | using System;
using Microsoft.AspNetCore.Mvc;
using MSSqlRestApi.Models;
namespace MSSqlRestApi.Controllers
{
[Route(Constants.RoutePathRoot + "/databases/{dbName}")]
public class ScriptsController : Controller
{
private ServerContext _context;
public ScriptsController(ServerCo... | C# | Controllers/ScriptsController.cs | sanagama/mssql-restapi | mit | 1,360 | 37 | codeparrot/github-code |
bd673302a427bb4ad5d3ed5d005d9ee8b42db4611f139cec05b436eb71435446 | namespace AutoyaFramework.Purchase
{
public class PurchaseSettings
{
/*
immutable purchasable item infos.
*/
public static readonly ProductInfos IMMUTABLE_PURCHASE_ITEM_INFOS = new ProductInfos
{
productInfos = new ProductInfo[] {
new ProductInfo("100_g... | C# | Assets/Autoya/Settings/PurchaseSettings.cs | sassembla/Autoya | mit | 1,703 | 40 | codeparrot/github-code |
e1ec3cfb4f76679904e0092e587ec393371a42e72e91965a7eac58db7fa4db65 | <?php
/**
* Created by PhpStorm.
* User: Kenrick
* Date: 7/11/2016
* Time: 8:07 AM
*/
namespace ResultSetTable\Traits;
use Assert\Assertion;
/**
* Class Tokenize
* @package ResultSetTable\Traits
*/
trait Tokenize
{
/**
* @var array
*/
protected $tokens;
/**
* create an array of to... | PHP | src/Traits/Tokenize.php | nsbucky/resultset-table | mit | 1,958 | 91 | codeparrot/github-code |
ce89445dcd1fa4c532011435a1109ff70ec10220cc72a284c45322ffba08ca77 | package de.gesellix.docker.engine;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.IntStream;
public class DockerVersion implements Comparable<DockerVersion> {
private int ... | Java | engine/src/main/java/de/gesellix/docker/engine/DockerVersion.java | docker-client/docker-engine | mit | 2,223 | 85 | codeparrot/github-code |
6c8e9efa953007619ac3cb6e60c0a9d0dad4701dc31307837dd334538121597e | package com.cultome.bizlang.language;
import com.cultomebizlang.language.interpreter.Bindings;
public class BizlangConditionalExpression extends BizlangExpression {
private BizlangLogicOperation condition;
private BizlangBlock mainBlock;
private BizlangBlock alternativeBlock;
public BizlangConditionalExpressio... | Java | src/main/java/com/cultome/bizlang/language/BizlangConditionalExpression.java | cultome/bizlang-language | mit | 1,309 | 53 | codeparrot/github-code |
30a9fa14004c874ad4d4e58ba195b1004446674b32dc656c3651a1db3642a3f7 | #
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Homebrew doesn't support specifying anything more recent than 'nehalem',
# but nehalem is 19x slower than sandybrdige ... | Ruby | Formula/hhvm-4.13.rb | hhvm/homebrew-hhvm | mit | 9,868 | 282 | codeparrot/github-code |
e9e372470554c8aa593126d609a6a8091d420dc2b9819aa2c845a3ee82a496d6 | Meteor.methods({
newFollowerNotification: function (followingId) { // initiated by the follower
check(followingId, String);
var follower = Meteor.user();
if (!follower) return;
var notificationData = {
follower: { '_id': follower._id, 'name': follower.profile.name }
};
// notify user ... | JavaScript | server/notifications.js | erasaur/binary | mit | 4,042 | 130 | codeparrot/github-code |
6d03f8eaa399f305d3bfff5dc7ab46d1bcd1119d6709b5ccfd3aee27b8bb7899 | import { FunctionComponent } from "react"
import TagsList from "./TagsList"
import FormattedDate from "./FormattedDate"
import HorizontalRule from "./HorizontalRule"
import { GitHubRelease } from "../models/GitHubRelease"
interface Props {
release: GitHubRelease
}
const GitHubReleasePreview: FunctionComponent<Props... | TypeScript | components/GitHubReleasePreview.tsx | JosephDuffy/josephduffy.co.uk | mit | 1,027 | 36 | codeparrot/github-code |
c1225952d2b8031fa0a4ba4f3264def9ef28bd1df88f7a297eff361436f99eb8 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content=... | HTML | posts/creating-a-new-theme/index.html | wjwcan10482/wjwcan10482.github.io | mit | 61,912 | 1,341 | codeparrot/github-code |
99feb0585d5c14b940de70a3e92af3e4957822ad1db863c5fd8953551802b44b | package amerifrance.guideapi.api.impl;
import amerifrance.guideapi.api.IPage;
import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract;
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
import amerifrance.guideapi.gui.GuiBase;
import amerifrance.guideapi.gui.GuiEntry;
import net.minecraft.client... | Java | src/main/java/amerifrance/guideapi/api/impl/Page.java | TeamAmeriFrance/Guide-API | mit | 2,133 | 60 | codeparrot/github-code |
ff3b2c4f3c6f48fb9d1077b3cfe234fceab67bc501120e7fed67fd520146268b | <?php
Class Invitation {
private $id;
private $db;
private $email;
private $hash;
private $portalId;
private $title;
public function __construct($db, $email, $portalId, $title) {
$this->db = $db;
$this->email = $email;
$this->portalId = $portalId;
$this->title = $title;
$this->hash = $this->generateHash();
... | PHP | model/invitation.class.php | mkrmpotic/DOIO-Project-Management | mit | 1,835 | 93 | codeparrot/github-code |
9525c6a2d810052a19b9df6603a10e04d37958b8da5944d398bf920f4e25fb8a | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>We Aren't Dead Yet: HubPress Roadmap</title>
<meta name="description" content="" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=de... | HTML | 2017/02/22/We-Arent-Dead-Yet-Hub-Press-Roadmap.html | luckypoem/blog.hubpress.io | mit | 15,046 | 352 | codeparrot/github-code |
e08b1eb860b282b19d6df84289da078dc37fea10d71669ea9ff992340c34b244 | package references
import (
"github.com/zxh0/jvm.go/instructions/base"
"github.com/zxh0/jvm.go/rtda"
"github.com/zxh0/jvm.go/rtda/heap"
)
// Create new object
type New struct {
base.Index16Instruction
class *heap.Class
}
func (instr *New) Execute(frame *rtda.Frame) {
if instr.class == nil {
cp := frame.GetCo... | GO | instructions/references/new.go | zxh0/jvm.go | mit | 613 | 32 | codeparrot/github-code |
5591b99c1bf0b9f9dd70034e8f51ef023cf9d79dca7d0fbceebfb6d56196bbbb |
#region → Usings .
using System;
using System.ComponentModel.DataAnnotations;
#endregion
#region → History .
/*
* Date User Change
* *********************************************
* 18.08.11 mwahab • creation
* **********************************************
*/
# endregion... | C# | citPoint.eNeg.Data.Web/DataTypes/UserProfileStatisticalsResult.cs | ivconsult/eNeg | mit | 1,513 | 74 | codeparrot/github-code |
605f0e6d53152028e22ec20ed553d7f3e99fd57de4e06bcdc38781249a8806ae | import websocket
import thread
import time
import cv2
from StringIO import StringIO
import base64
from PIL import Image
import numpy as np
import time
def on_message(ws, message):
img = base64.b64decode(message)
print img
def on_error(ws, error):
print error
def on_close(ws):
print "### closed ###"
... | Python | project/col/client.py | TE-ToshiakiTanaka/stve | mit | 829 | 35 | codeparrot/github-code |
cea1eecfd06f9f5c3f662b4f04cc97453fc7a51b9a8c077729e26595a29b69ca | ---
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>UrlMatcherFactory | @uirouter/react</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="styleshee... | HTML | _react_docs/0.8.3/classes/url.urlmatcherfactory.html | ui-router/ui-router.github.io | mit | 39,529 | 739 | codeparrot/github-code |
7a3f8f45d6bdb8672513cd9a7bf565c212e7b9deda83131b603c912c2b02dba6 | # Copyright © 2016 Jakub Wilk <jwilk@jwilk.net>
#
# 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 rights
# to use, copy, modify, merge, p... | Python | lib/articles.py | jwilk/anorack | mit | 1,623 | 48 | codeparrot/github-code |
0b4e967603232e8c0d5c7ef0c5d110e63997a763eb07dcd5264bd51bf9d7a116 | // Copyright (c) 2012-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coins.h"
#include <assert.h>
// calculate number of bytes for the bitmask, and its number of non-zero bytes
// eac... | C++ | src/coins.cpp | zw/bitcoin | mit | 6,547 | 197 | codeparrot/github-code |
cd7643fbfd550349c96d543de937639f1a78e3573f64ef3349e0690d9c6ae943 | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Differentially Private Gaussian Processes</title>
<meta name="description" content="Differentially Private Gaussian Processes">
<meta name="author" content="Mike Smith">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta ... | HTML | index.html | lionfish0/cloaking_talk | mit | 25,204 | 451 | codeparrot/github-code |
5adaf25f372540cd15936d8cc6eb3415d7c3cf7a4a6ec5f632636af14c0e899d | search = function () {
return {
init: function () {
},
linear: function(a, val){
var n = a.length
for(var i=0; i < n; ++i)
if(a[i] == val)
return i
},
binary: function(a, val){
var i=0,
... | JavaScript | js/algorithms/search.js | jonmann20/JavaScript | mit | 847 | 44 | codeparrot/github-code |
507b7393babbc1e937a21ed3878b8ba4ffd03d7b200af5f5ff2b2657a7264cae | #define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
void eprintf(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
exit(EXIT_FAILURE);
}
void *emalloc(size_t size) {
void *p;
p = malloc(size);
if (!p)
eprintf("Out ... | C | util.c | causes-/albumdetails | mit | 944 | 69 | codeparrot/github-code |
6fd7efb7c30e4121e1573184e13f08a71bbeb88cef0c0b8db035d5d2923a36ad | {% extends 'snippet/layout.html' %}
{% load forum_extras %}
{% block title %}
{{ topic.title }} - F2E
{% endblock %}
{% block stylesheet %}
<link rel="stylesheet" href="/static/css/codehilite.css" />
{% endblock %}
{% block javascript %}
<script type="text/javascript" src="/static/js/widget/emmet.min.js"... | HTML | forum/templates/topic/view.html | zhu327/forum | mit | 12,144 | 253 | codeparrot/github-code |
f9da554845bc9d1c655ac16644e80501b6581286e0d2b2918ca6fd517f09c836 | package io.github.mstuefer;
public class SelectionOperator {
private String Key;
private String Operator;
private int Value;
SelectionOperator(String Key, String Operator, int Value) {
this.Key = Key;
this.Operator = Operator;
this.Value = Value;
}
String getKey() {
... | Java | src/io/github/mstuefer/SelectionOperator.java | mstuefer/QueryOptimiser | mit | 572 | 32 | codeparrot/github-code |
f5e90688975ccf39453d241cd275db9c635c0e562fac9182a8a9cda6973d697d | extern crate ffigen;
extern crate msbuild_util;
use std::process::Command;
use std::fs;
use std::env;
fn main() {
let mut context = ffigen::Context::new();
context.set_root("../scaffold".to_string());
context.add_lang(ffigen::Lang::CSharp, &[ffigen::Config::Output(".".to_string())]);
ffigen::gen(&co... | Rust | test/CSharp/build.rs | vvanders/ffigen | mit | 2,629 | 91 | codeparrot/github-code |
05aceea6499fb3aae5bce0cb2b108c4678cfb428fe3d85fac147da1e1acd81d6 | // server.js
/**
* BASE SETUP
*/
var mongoose = require('mongoose');
var DB_HOST = process.env.DB_HOST;
var DB_USER = process.env.DB_USER;
var DB_PASSWORD = process.env.DB_PASSWORD;
var DB_DATABASE = process.env.DB_DATABASE;
var connectionString = 'mongodb://' +
DB_USER +
... | JavaScript | server.js | vjwilson/node_api | mit | 2,741 | 126 | codeparrot/github-code |
39e9ad41397e3f27b37cbda5fa7a77c6479dd40644d9e00fbd238e1ce864cc5e | package com.mthwate.datlib.math;
import com.mthwate.datlib.math.fraction.FractionBigInteger;
import org.junit.Assert;
import org.junit.Test;
import java.util.Random;
/**
* @author mthwate
*/
public class MatrixTest {
@Test
public void testTranspose() {
for (int i = 0; i < 100; i++) {
int r = nextInt(i, 1... | Java | src/test/java/com/mthwate/datlib/math/MatrixTest.java | Mthwate/DatLib | mit | 2,508 | 133 | codeparrot/github-code |
4374b2c8b6ff8c69d9f846304ec6662b83aa7de82fadf5046df19310ded922d5 | 'use strict';
var createDist = require( './../lib' );
// Define the distribution parameters...
var lambda = 10,
k = 20;
// Create a vector...
var vec = new Array( 1000 ),
len = vec.length;
for ( var i = 0; i < len; i++ ) {
vec[ i ] = lambda * Math.pow( -Math.log( 1 - Math.random() ) , 1/k );
}
// Create a Weibu... | JavaScript | examples/index.js | distributions-io/weibull | mit | 770 | 33 | codeparrot/github-code |
77ebe197175a153dd7ef1afc72ad2ce1df6f7b91cd10e2ac30497bcca2ade152 | <?php
namespace AppBundle\Form\User;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type as FormTypes;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class UserDetailsBasicType extends AbstractType
{
public function buil... | PHP | client/src/AppBundle/Form/User/UserDetailsBasicType.php | ministryofjustice/opg-digi-deps-client | mit | 878 | 32 | codeparrot/github-code |
2d6841aad431f5bdff256141b5303e149927e8a2de726003bef4031abd15af8d | // Copyright (c) 2015-2016 The URALS Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef URALS_BENCH_BENCH_H
#define URALS_BENCH_BENCH_H
#include <map>
#include <string>
#include <boost/function.hpp>
#inclu... | C | src/bench/bench.h | JohnMnemonick/UralsCoin | mit | 2,366 | 81 | codeparrot/github-code |
183de522d8df95a20f481bea72f11a3c44f6048decee7bdd77e5d0e6f3512472 | /**YEngine2D
* author:YYC
* date:2014-02-09
* email:395976266@qq.com
* qq: 395976266
* blog:http://www.cnblogs.com/chaogex/
* homepage:
* license: MIT
*/
(function(){
YE.Node = YYC.AClass(YE.Entity, {
Private: {
ye_parent: null,
ye_zOrder: 0,
ye_setZOrder: functi... | JavaScript | src/base/Node.js | yyc-git/YEngine2D | mit | 1,027 | 46 | codeparrot/github-code |
ce13b56fce7b4163b9d63e8e546225c2076097467faa09ec97cb215c9f19cb8d | /**
* Created by Josias Montag on 13/10/16.
*/
(function () {
'use strict';
angular
.module('artemisApp')
.component('editorFileBrowser', {
bindings: {
participation: '<',
file: '=',
onCreatedFile: '&',
onDeletedFile:... | JavaScript | src/main/webapp/app/editor/file-browser/editor-file-browser.component.js | LisLo/ArTEMiS | mit | 7,513 | 239 | codeparrot/github-code |
2882ec2b0232d958a070d627a0d46362c475b2fb148f80761b95a138cc9a5611 | --[[
##########################################################
S V U I By: Munglunch
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--LUA
local unpack = unpack;
local select = select;
local pairs ... | Lua | SVUI_UnitFrames/view.lua | joev/SVUI-Temp | mit | 7,416 | 235 | codeparrot/github-code |
f7d79bb1c57498a92bb710111afc246cdcc7d5cccf2ea65efb0df74c16530a54 | // Copyright (c) 2016-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <base58.h>
#include <fs.h>
#include <util/system.h>
#include <wallet/wallet.h>
#include <wallet/walletutil.h>
names... | C++ | src/wallet/wallettool.cpp | afk11/bitcoin | mit | 5,116 | 136 | codeparrot/github-code |
987866a8e615d7120d7fbd202b085091c667c4d0b81eabb2925f0341764684a0 | /* LICENSE_BEGIN
MIT License
SPDX:MIT
https://spdx.org/licenses/MIT
See LICENSE.txt file in the top level directory.
LICENSE_END */
#ifndef ZED5_CORE_IO_SRCADDR_H_
#define ZED5_CORE_IO_SRCADDR_H_
#include "zed5/core/base/base.h"
#include "zed5/core/net/inetaddress.h"
#include "zed5/core/net/sock... | C | src/core/io/srcaddr.h | ekline/zed5 | mit | 894 | 44 | codeparrot/github-code |
2801d937a1b93128d46c85e778b6eb51c33f29c9f7035213a2b71bd701459552 | package gov.wicourts.json.formlet
import argonaut.Argonaut.jString
import argonaut.Json
import scalaz.std.list._
import scalaz.std.option._
import scalaz.syntax.monadPlus._
import scalaz.{@>, Lens}
import Predef.ArrowAssoc
case class FieldView(name: String, value: Option[Json], label: Option[String], errorName: St... | Scala | src/main/scala/gov/wicourts/json/formlet/FieldView.scala | ccap/json-formlets | mit | 1,116 | 51 | codeparrot/github-code |
a16d507dfc85aab667c67e4b88b7b2bba34eb9029643a3da6b9ab1ece3049145 | /**
* @file 图像二值化相关的阈值处理函数
*
* 代码来源于:
* http://blog.csdn.net/laviewpbt/article/details/11306685
*
* @author mengke01(kekee000@gmail.com)
*/
/**
* 检测直方图是否为双峰
*
* @param {Array} HistGram 灰度数据
* @return {boolean} 是否为双峰
*/
function isDimodal(HistGram) {
// 对直方图的峰进行计数,只有峰数位2才为双峰
let Count = 0;
for (... | JavaScript | src/graphics/image/util/threshold.js | ecomfe/fonteditor | mit | 7,244 | 294 | codeparrot/github-code |
36cd86c6d32b0c6bf57f93081fed9217a4b10e74ba8252776fa9bc42a0237e5c | # various converters between country codes and names
# including the possibility to look up the continent
# a country belongs to.
#
# source: ISO 3166 and
# http://en.wikipedia.org/wiki/List_of_countries_by_continent_(data_file)
import data
import types
def ccn_to_ccn(code):
"""Normalize the numeric country code... | Python | countryutils/transformations.py | jamesporter/InternationalTrade | mit | 7,163 | 246 | codeparrot/github-code |
5e8c0bbb78a68f9340f3859cda61111ec4fb07a5280c04513c593d3b39f85dad | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<!-- Page Content Here -->
<!--[if lt IE 9]><script src="js/excanvas.min.js"></script><![endif]-->
<div id="chart" style="width: 600px; height: 300px;"></div>
<script src="lib/flotr2.min.js"></script>... | HTML | flotr2/scatter.html | guozheng/learn-dataviz | mit | 3,514 | 121 | codeparrot/github-code |
890fdf93970920a4ddc7c9bf610dc9e57fd41a8517ba9365146031a1cec6616b | // Copyright (c) 2014 Couchbase, Inc.
// 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 applicable law or agreed to in w... | GO | Godeps/_workspace/src/github.com/blevesearch/bleve/analysis/byte_array_converters/string/string_byte_array_conveter.go | postfix/name_pending | mit | 1,305 | 34 | codeparrot/github-code |
c0703a7252c1d65c3fa328dc3a11ef1f1f710d18b71414413bced8ee29c0fdb3 | /*
* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
* See LICENSE in the project root for license information.
*/
package com.microsoft.office365.meetingfeedback.inject;
import com.microsoft.graph.authentication.MSALAuthenticationProvider;
import com.microsoft.identity.client.PublicCl... | Java | android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/inject/ActivityModule.java | OfficeDev/O365-Android-MeetingFeedback | mit | 3,012 | 80 | codeparrot/github-code |
f543193bf2a1551f4559b9b290790c8af27917f149333e75656c2ec30a29ef03 | <!DOCTYPE html>
<html>
<head>
<script>
/**
* source.html
*
* Copyright 2013-2014 Web Power, www.webpower.nl
* @author Arjan Haverkamp
*/
// Global vars:
var tinymce, // Reference to TinyMCE
editor, // Reference to TinyMCE editor
codemirror, // CodeMirror instance
chr = 0, // Unus... | HTML | uDrive/uDrive.Site/Umbraco/lib/tinymce/plugins/codemirror/source.html | msinnott22/uDrive | mit | 7,671 | 256 | codeparrot/github-code |
1d71b765a1231d42411d0f1f2f232aec3b3e7806d01863ff04a77f7af109d5d0 | <?php
namespace Dreamhood\MainBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
class TodoAdmin extends Admin
{
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier(... | PHP | src/Dreamhood/MainBundle/Admin/TodoAdmin.php | chanakasan/cms-sandbox | mit | 717 | 32 | codeparrot/github-code |
7d7802ce27c90a3b81f0ea92fe970566affc2be00631acebe28b29b234d74e69 | using System;
namespace DesignPatterns.GoF.Creational.Prototype
{
public sealed class ClonableClass : ICloneable
{
private Random random = new Random();
public ClonableClass()
{
Number = random.Next(10);
Name = $"{DateTime.Now.ToLongDateString()}";
A... | C# | CSharp/DesignPatterns/GoF/Creational/Prototype/ClonableClass.cs | mika-s/Misc | mit | 1,086 | 39 | codeparrot/github-code |
70e277c3942ae484bbb5ddf534e861e719407c382c53c8b7724ac5697817edfd | from .endpoint import Endpoint
from .exceptions import MissingRequiredFieldError
from .. import ViewItem, PaginationItem
import logging
logger = logging.getLogger('tableau.endpoint.views')
class Views(Endpoint):
@property
def baseurl(self):
return "{0}/sites/{1}".format(self.parent_srv.baseurl, self.... | Python | tableauserverclient/server/endpoint/views_endpoint.py | Talvalin/server-client-python | mit | 1,391 | 32 | codeparrot/github-code |
7fd23ec00d749fadab1a65e3a2849b03b14094ab2e8a4c780b35259baba4415e | #include "retsetmidiportremap.h"
#include <cmath>
RetSetMidiPortRemap::RetSetMidiPortRemap(Device *device)
: SysExMessage(Command::RET_SET_MIDI_PORT_REMAP, SysExMessage::QUERY,
device) {}
RetSetMidiPortRemap::~RetSetMidiPortRemap() {
delete *m_pMidiPortRemap->midiControllerRemap;
for (int i = 0; i < MIDI_CH... | C++ | src/sysex/retsetmidiportremap.cpp | dehnhardt/mioconfig | mit | 6,826 | 184 | codeparrot/github-code |
d8575134947ef2f557453dbc273ba8765c24cecaa6ccc5e44c6b71b4903eea49 | <template name="AdminLayout">
{{#if AdminConfig}}
{{#if isInRole 'admin'}}
<div class="admin-layout">
{{# AdminLTE skin=admin_skin }}
{{> AdminHeader }}
{{> AdminSidebar }}
<div class="content-wrapper" style="min-height:... | HTML | packages/meteor-admin-master/lib/client/html/admin_layouts.html | dakarpt/PSocial | mit | 3,769 | 103 | codeparrot/github-code |
082369b22d085fad2cc84d297fc247fb2523672ccaf3cf2ad8b13ce8b0194984 | package gsf
import (
"errors"
"fmt"
"reflect"
"strings"
)
func ConvertStruct(src, dest interface{}) error {
t1, err := typeOf(src)
if err != nil {
return err
}
t2, err := typeOf(dest)
if err != nil {
return err
}
v1, err := valueOf(src)
if err != nil {
return err
}
v2, err := valueOf(dest)
if err... | GO | conv_struct.go | WindomZ/go-struct-filler | mit | 1,359 | 77 | codeparrot/github-code |
145281409ac0ddb3840d17ddc360beafdbc7c573f9626ad010f68655cbf0c373 | #include "qrcodedialog.h"
#include "ui_qrcodedialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include <QPixmap>
#include <QUrl>
#include <qrencode.h>
QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent) :
... | C++ | src/qt/qrcodedialog.cpp | DecryptRcoin/DecryptRcoin | mit | 4,316 | 172 | codeparrot/github-code |
414e5f24db98d2ca4b62c59750b3dbe6de3413b6c222cadff357b92fdfbeddaa | #include <stdlib.h>
#include <stdio.h>
#include "soundpipe.h"
#include "config.h"
int main() {
sp_data *sp;
sp_create(&sp);
sp_srand(sp, 12345);
sp->sr = SR;
sp->len = sp->sr * LEN;
uint32_t t, u;
SPFLOAT in = 0, out = 0;
sp_dtrig *unit[NUM];
for(u = 0; u < NUM; u++) {
sp... | C | test/p/p_dtrig.c | aure/Soundpipe | mit | 601 | 32 | codeparrot/github-code |
820cb0794dccea20618050cff3ab7f1c9a8e670266bc9c75c1e18cb60422982f | <?php
namespace IBM\MTMBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use IBM\MTMBundle\Entity\Users;
use IBM\MTMBundle\Form\UsersType;
/**
* Users controller.
*
*/
class ATMController extends Controller
{
/**
* Lists all Users... | PHP | src/IBM/MTMBundle/Controller/ATMController.php | MortI2C/mtmcontest | mit | 683 | 34 | codeparrot/github-code |
8e80eb843c4f8296320e86fb8d9bb2da934f7257347ce32f5ff1b0061e4e5177 | (function (factory) {
if (typeof define === 'function' && define.amd) {
/*
In AMD environments, you will need to define an alias
to your selector engine. i.e. either zepto or jQuery.
*/
define(['$'], factory);
} else {
/*
Browser globals
*/
... | JavaScript | src/scooch.js | lucie-dream/lucie-dream.github.io | mit | 18,636 | 559 | codeparrot/github-code |
bb8610f7970ca2528db179a19646c312bfb9d36fd32b95b6583b9cc8b5687be5 | from .. import Provider as CurrencyProvider
class Provider(CurrencyProvider):
# Format: (code, name)
currencies = (
("AED", "Dírham de los Emiratos Árabes Unidos"),
("AFN", "Afghaní"),
("ALL", "Lek albanés"),
("AMD", "Dram armenio"),
("ANG", "Florín de las Antillas Hola... | Python | faker/providers/currency/es_ES/__init__.py | joke2k/faker | mit | 6,201 | 177 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.