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 |
|---|---|---|---|---|---|---|---|---|
1e36a3ffe410ec6d682395ebf579cd37876575fd9a0608d7088f701e9b9c058f | /*
Suppose you save $100 each month into a savings account with the annual
interest rate 5%. Thus, the monthly interest rate is 0.05/12 = 0.00417.
After the first month, the value in the account becomes
100 * (1 + 0.00417) = 100.417
After the second month, the value in the account becomes
(100 + 100.417)... | Java | 02/E2_13/E2_13.java | maxalthoff/intro-to-java-exercises | mit | 1,311 | 46 | codeparrot/github-code |
728a090fb19e000e444a0bc3bcf2e13d8e88c38dc3b94a1f5c37e324f74bdc22 | // pages/list/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHi... | JavaScript | pages/list/index.js | simsir-lin/simui-wxapp | mit | 638 | 66 | codeparrot/github-code |
93c76f5a13ae5dec2549c41e736ecf5577e92730b5778c07ac76807181c4af1a | #include "sr-main.h"
#include <sys/resource.h>
#define HOST_NAME_SIZE 64
static int init_sockaddr_in(struct sockaddr_in *sa_in, char *host, char *port) {
struct hostent *he = gethostbyname(host);
if (he == NULL || he->h_addr_list == NULL || (he->h_addr_list)[0] == NULL ) {
log_msg(ERROR, "%s: gethost... | C | sr-init.c | hulu/statsd-router | mit | 12,688 | 332 | codeparrot/github-code |
c4e96ba2227f8b3090972dbc9b1013b76792fd5cdd87a4688ce4a9d45d5c0fc0 | from rest_framework import serializers
from workers.models import (TaskConfig,
Task,
Job,
TaskProducer)
from grabbers.serializers import (MapperSerializer,
SequenceSerializer)
from grabbers.models impor... | Python | workers/serializers.py | VulcanoAhab/delphi | mit | 2,526 | 77 | codeparrot/github-code |
40b60757c7f268eb7017eb07b8ded290f3983aaed2cb15f84a9096a6e9bad341 | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WebAPI.API.Comparers;
using WebAPI.API.DataStructures;
using WebAPI.API.Executors.Geocode;
using WebAPI.Common.Abstractions;
using WebAPI.Common.Executors;
using WebAPI.Domain.Addresses;
using WebAPI.Domain.ArcServerResponse.Geolo... | C# | WebAPI.API/Commands/Geocode/GeocodeAddressCommand.cs | agrc/api.mapserv.utah.gov | mit | 2,882 | 82 | codeparrot/github-code |
b0f27b4f59f82fbd7e5222497ff001efb47deb9cd7f3c3e66a404365a2e6d446 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
// Utility routine for allocating a two dimensional array
float **malloc_2d(int nx, int ny)
{
float **array;
int i;
array = (float **) malloc(nx * sizeof(float *));
array[0] = (float ... | C | exercises/jacobi/c/jacobi.c | csc-training/openacc | mit | 3,595 | 156 | codeparrot/github-code |
4f596668da2e4afd2b926e16822d153744fd9e74520c80b0ad72d928c26b5d14 | using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Windows.Forms;
using DpSdkEngLib;
using DPSDKOPSLib;
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using Sy... | C# | C-Sharp/frmBlockTest.cs | nodoid/PointOfSale | mit | 99,988 | 2,150 | codeparrot/github-code |
b28dfea0e01bd2a44e5c3be2de49389b791343c00617e4d8223d43d91fbdfbea | import tensorflow as tf
from tensorflow.contrib.rnn import LSTMCell, GRUCell, MultiRNNCell, DropoutWrapper
from tqdm import tqdm
from decoder import pointer_decoder
import dataset
import matplotlib.pyplot as plt
# TODO
"""
Michel:
_____________________________________________________________________
... | Python | MD/nnet.py | pcournut/deep-learning-for-combinatorial-optimization | mit | 12,765 | 316 | codeparrot/github-code |
460f7f75acae0bcc1de550ceb1e558aa4cfe5f0c72cb350d72a814a717d2cb11 | import java.util.Arrays;
/**
* <code>LinearAlgebra</code> performs basic linear algebra routines.
*
* @author <a href="mailto:knapp@american.edu">Adam Knapp</a>
* @version 1.0
*/
@SuppressWarnings({"WeakerAccess", "SameParameterValue"})
public class LinearAlgebra {
/**
* Adds two vectors
*
* @param ve... | Java | LinearAlgebra.java | knappa/CSC281S17 | mit | 6,063 | 210 | codeparrot/github-code |
ffbab5e464fc80769b0ced8200bc1ea7fb0f6b78f4786c617e91ccb2a88f8768 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Product_route_admin_c extends CI_Controller
{
public $uid;
public $main_menu = 'Product Route';
public function __construct()
{
parent::__construct();
//load model
// $this->load->model('admin/state_province_admin_m'... | PHP | application/controllers/admin/product_route_admin_c.php | SarathLUN/courier | mit | 991 | 32 | codeparrot/github-code |
edec2f573e502f6f6b34acdcc2f514ac87e8b3cfdf158ab400564917029897a0 |
<div class="docs-api">
<h2>
API reference for Angular Material autocomplete-testing
</h2><p class="docs-api-module-import">
<code>
import {MatAutocompleteHarness} from '@angular/material/autocomplete/testing';
</code>
</p>
<h3 id="material-autocomplete-testing-classes"... | HTML | docs-content/api-docs/material-autocomplete-testing.html | angular/material2-docs-content | mit | 17,297 | 598 | codeparrot/github-code |
29205f46dd0f7375d6e1eb549e2db476b52b559586088acae2f1cf6726d07bee | module App {
export class Filter extends LionSoftAngular.Filter {
$filter: ng.IFilterService;
protected static addFactoryInjections(injects: string[]) {
LionSoftAngular.Filter.addFactoryInjections(injects);
this.addInjection(injects, "$filter");
}
Translat... | TypeScript | Sam/app/common/Filter.ts | lionsoft/SampleSPA | mit | 1,510 | 47 | codeparrot/github-code |
3a8ea4d4158d907cead05f6140dd68384b7c70dc29ac6cee33c2da23a5415b99 | /*
* Copyright (C) 2015-2017 Pavel Dolgov
*
* See the LICENSE file for terms of use.
*/
#include <bits/stdc++.h>
typedef long double LLD;
int Vp, Vf;
LLD Oy;
LLD getTime(LLD coordinate) {
LLD field_dist = std::sqrt(
coordinate * coordinate + (1 - Oy) * (1 - Oy)
);
LLD forest_dist = std::sqrt... | C++ | mshp/algo/search/ternary_search.cpp | zer0main/problems | mit | 893 | 44 | codeparrot/github-code |
7a3a47a6273e6750b3452fb2a673d5e26f692d6fee534f9f888fe3f104483ccb | import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import { withStyles } from 'material-ui/styles';
import IconButton from 'material-ui/IconButton';
import CloseIcon from 'material-ui-icons/Close';
import InfoIcon from 'material-ui-icons/Info';
import TimelineIcon from 'material... | JavaScript | imports/ui/components/ZoomerHolder/components/Inner.js | ShinyLeee/meteor-album-app | mit | 2,433 | 99 | codeparrot/github-code |
8f5c20178fa0ce665ecd6f9c2d5b8c7e1344b7ea9c5b428f7a3e001165ce08ee | // @flow
import React from 'react';
import { generateStreamUrl } from 'util/web';
export default function useGetThumbnail(
uri: string,
claim: ?Claim,
streamingUrl: ?string,
getFile: string => void,
shouldHide: boolean
) {
let thumbnailToUse;
// $FlowFixMe
const isImage = claim && claim.value && claim... | JavaScript | ui/effects/use-get-thumbnail.js | lbryio/lbry-electron | mit | 1,406 | 52 | codeparrot/github-code |
d7ffe48a8e97b45bada712e49ca114aa916e3b61aad926f045560f408829a0a4 | var Core = require('cw-core');
var Exception = Core.Exception;
var ArgumentNullException = Core.ArgumentNullException;
var ArgumentException = Core.ArgumentException;
var Arr = Core.Arr;
var Enumerable = require('linq');
var _ = require('underscore');
var Field = (function () {
function Field(form, name) {
... | JavaScript | lib/Field.js | catwalkagogo/cw-validation | mit | 4,756 | 157 | codeparrot/github-code |
49953d2475a76d751f9aa749c3724f817446d2c1bfc157f0c5ce49b54e372751 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _06.UserLogs
{
class UserLogs
{
static void Main(string[] args)
{
var users = new SortedDictionary<string, Dictionary<string, int>>();
string input = Console.ReadLine();
... | C# | Exercises/08. DictionariesLambdaLINQ-Exercises/06. UserLogs/UserLogs.cs | KristiyanSevov/Technology-Fundamentals---Exercises | mit | 1,476 | 48 | codeparrot/github-code |
68acd8750a1c93d1e5beb0fa9723b5be2751400698de5b9f929a97c26162d38e | define(function(require) {
var $ = require('./jquery');
var marked = require('./marked');
var prettify = require('./prettify');
var title = document.title;
function initPage() {
marked.setOptions({
highlight: function(code) {
return prettify.prettyPrintOne(escape(code));
}
});
$('.section').each... | JavaScript | docs/assets/js/main.js | Lanfei/GoJS | mit | 1,982 | 90 | codeparrot/github-code |
7525694d44974d671f3c3e4ebed1a6d562ce5a4a1ec6bce97f0248733e3b96e0 | /*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | Java | src/accessors/java/org/spongepowered/common/accessor/world/entity/animal/SheepAccessor.java | SpongePowered/Sponge | mit | 2,016 | 49 | codeparrot/github-code |
41ac0ac5c75332a87fcf2c4b11ecc130e32fdbe93ba9389c5cdd3b94a075462d | <?php
namespace mcc\obj\instagram;
class instagram {
static private $accessToken;
static private $TMPKEY;
const CACHE_TIME = 30;
static public function config($accessToken) {
$mid = array_key_exists('SERVER_NAME', $_SERVER) ? $_SERVER['SERVER_NAME'] : 'cli';
self::$TMPKEY = 'mcc-instagram-' . $mid ... | PHP | obj/instagram/instagram.php | mathCodingClub/mcc-php-backend | mit | 4,047 | 112 | codeparrot/github-code |
82aa744b038e980dd00be20c44c1366f99b58fa8de0ed1adb2d0e3ff9e9f2f50 | package com.android.shelter.user;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import com.android.shelter.HomeActivity;
import com.android.shelter.R;
import com.android.shelter.... | Java | Shelter/app/src/main/java/com/android/shelter/user/LoginActivity.java | CMPE277Shelter/shelterApp | mit | 3,544 | 95 | codeparrot/github-code |
bd9ff9bcbc6fcd8183d74a5024ba29fcdc06aee1861ecc89fff53ca425ba13ac | require File.expand_path('../spec_helper', File.dirname(__FILE__))
require File.expand_path("../../lib/ing/files", File.dirname(__FILE__))
describe Ing::Files::Directory do
include TestHelpers
def reset
::FileUtils.rm_rf(destination_root)
invoker.class.send(:define_method, :file_name, Proc.new{ "rdoc" }... | Ruby | test/actions/directory_spec.rb | ericgj/ing | mit | 5,061 | 175 | codeparrot/github-code |
d3f18c5878de6a28c85233ee69737a58f4af73da62465e4f526fe9a7bd38c3b0 | <?php
/**
* Foundation PHP template
*
* @package Semantique
* @since Semantique 1.0.0
*/
// Pagination.
if ( ! function_exists( 'semantique_pagination' ) ) :
function semantique_pagination() {
global $wp_query;
$big = 999999999; // This needs to be an unlikely integer
// For more options and info view the do... | PHP | library/foundation.php | Timoti/Semantique | mit | 6,557 | 193 | codeparrot/github-code |
2c950a4602551637d33ca0d15dc42470141bda5bbdf6be8f7d135d7328678f41 | package it.mediv.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import o... | Java | server/spring/src/main/java/it/mediv/controller/AuthenticationController.java | Mediv85/jwtExample | mit | 2,137 | 57 | codeparrot/github-code |
f62b1f820ddb49df55a1842d224e19eccf58e2f4ebc1e7604560a24d2b0f4c72 | <?php
/*
* 欢迎来到代码世界,如果你想修改多梦主题的代码,那我猜你是有更好的主意了~
* 那么请到多梦网络( http://www.dmeng.net/ )说说你的想法,数以万计的童鞋们会因此受益哦~
* 同时,你的名字将出现在多梦主题贡献者名单中,并有一定的积分奖励~
* 注释和代码同样重要~
* @author 多梦 @email chihyu@aliyun.com
*/
/*
* 投票 @author 多梦 at 2014.07.04
*
*/
/*
*
* 获取投票数
*
*/
function get_dmeng_user_vote( $uid, $count=true, $ty... | PHP | inc/vote.php | zhulukun/bocool | mit | 5,006 | 197 | codeparrot/github-code |
4c52dcf858879fbdf42ee804687ecc01023f03856097faf6a2f003712a925cb0 | /*********************************************************\
* Copyright (c) 2012-2021 The Unrimp Team
*
* 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 wit... | C++ | Source/Renderer/Public/Resource/Material/MaterialPropertyValue.cpp | cofenberg/unrimp | mit | 7,771 | 231 | codeparrot/github-code |
e581ef7c0dca14dece481b171f1d957a2beac499bd322ea8f0617f5f5dc9355b | class OffersController < ApplicationController
skip_authorization_check
skip_before_action :authenticate_user!
before_action :set_offer, only: [:show, :edit, :update, :destroy]
before_action :set_meta, only: [:show, :edit, :update, :destroy]
def index
@offers = Offer.where('"endDate" > ?', Date.current()... | Ruby | app/controllers/offers_controller.rb | nfelix/mvmt | mit | 1,771 | 67 | codeparrot/github-code |
b7973cbe0c97faf1aab24481115ee336fa1dbab82681750cfe485601619992e7 | package Application.DTO;
import Domain.Interfaces.IInstrumentation;
import Domain.Interfaces.IMusicalWork;
/**
* Created by timor on 27.04.2017.
*/
public class MusicalWorkDTO implements IMusicalWork {
private int instrumentationId;
private int id;
private String name;
private String composer;
p... | Java | src/Application/DTO/MusicalWorkDTO.java | ITB15-S4-GroupD/Planchester | mit | 1,493 | 64 | codeparrot/github-code |
285edd676ba1b98997cf93864379620ec28a43b146148ae54f678edd2ba83392 | 'use strict';
require('./connectionHelper');
const expect = require('chai').expect;
const supertest = require('supertest');
const app = require('../app.js');
const Appointment = require('../models/appointment');
const agent = supertest(app);
describe('appointment', function() {
let appointment = {};
beforeEach(f... | JavaScript | test/appoinment.spec.js | TwilioDevEd/appointment-reminders-node | mit | 3,584 | 124 | codeparrot/github-code |
21c80bc6fb618a4f0b5109502668b107f4aaebfcb938865ea85cc7e256bd53f8 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Aphysoft.Event
{
... | C# | Aphysoft.Event/Program.cs | afisd/jovice | mit | 18,211 | 487 | codeparrot/github-code |
18cc9e52a3f5153df8e60abc8c979bb80784a5abfc53af5eafc5301bf69ad102 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.analysis.path_finder module — pymatgen 2019.5.1 documentation</title>
<link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.c... | HTML | docs/pymatgen.analysis.path_finder.html | dongsenfo/pymatgen | mit | 19,696 | 307 | codeparrot/github-code |
7b0403e681c0f187eebe16f8534835444ed601c293ba10869ecc6fcd9d1d84a9 | package unluac.decompile.condition;
import unluac.decompile.Registers;
import unluac.decompile.expression.BinaryExpression;
import unluac.decompile.expression.Expression;
public class OrCondition implements Condition {
private Condition left;
private Condition right;
public OrCondition(Condition left, Con... | Java | src/unluac/decompile/condition/OrCondition.java | trarck/unluac | mit | 1,111 | 52 | codeparrot/github-code |
fc1c967771fd3e91edc4ccc3e6585cc03a7fb1ce94ba110e4133af58f2cd026e | #include "apu.h"
#include "emulator.h"
constexpr byte_t length_table[] = { 11, 254, 20, 2, 40, 4, 80, 6, 160, 8, 60, 10, 14, 12, 26, 14,
12, 16, 24, 18, 48, 20, 96, 22, 192, 24, 72, 26, 16, 28, 32, 30 };
constexpr uint16_t dmc_rate_table[] = { 428, 380, 340, 320, 286, 254, 226... | C++ | src/apu.cpp | gmatte11/nesemul | mit | 6,380 | 311 | codeparrot/github-code |
8462d739cd6343832b76ab8de9bca0f0b410c8e572390bff95edf892a8a817ef | # utils.py
"""
Utilities module containing various useful
functions for use in other modules.
"""
import logging
import numpy as np
import scipy.linalg as sl
import scipy.sparse as sps
import scipy.special as ss
from pkg_resources import Requirement, resource_filename
from scipy.integrate import odeint
from scipy.int... | Python | enterprise/signals/utils.py | jellis18/enterprise | mit | 29,066 | 1,034 | codeparrot/github-code |
ae3216801b07dd06e213fc84acf2013f1ace6f1309fc0ac33b0f5a9c8901affb | <?php
namespace Deployer;
require_once 'recipe/common.php';
require_once 'recipe/rsync.php';
use Symfony\Component\Console\Input\InputOption;
// Disable ssh multiplexing handled by deployer.
// The dotsunited/deployer Docker image handles multiplexing by itself.
// Can be re-enabled with `dep --option=ssh_multiplex... | PHP | deploy.dist.php | dotsunited/wordpress-boilerplate | mit | 3,977 | 139 | codeparrot/github-code |
a24693135e757b9e46763809e31b464b28e32b2206ab41f8a553ed84da662191 | using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.OutlookApi
{
#region Delegates
#pragma warning disable
#pragma warning restore
#endregion
/// <summary>
/// CoClass BusinessCardView
/// SupportByVersion Outlook, 12,14,15,16
/// </s... | C# | Source/Outlook/Classes/BusinessCardView.cs | NetOfficeFw/NetOffice | mit | 3,988 | 138 | codeparrot/github-code |
6ba998148bacaa3d43d37be8af76cc6d8b25b52399cebfe6fe61fedde05c9d0b | <?php
namespace Projek\Slim;
use Projek\Slim\Http\Response;
use Slim\Http\Request;
use Psr\Http\Message\UriInterface;
/**
* Middleware to create basic http authentication.
*/
class DefaultMiddleware
{
/**
* Execute the middleware.
*
* @param Request $req
* @param Response $res
* @par... | PHP | src/DefaultMiddleware.php | projek-xyz/slim-framework | mit | 2,006 | 84 | codeparrot/github-code |
c3c298369700fff7f38d9a87453c86aa4fb19fa93efd395796e36ebc6f465ea3 | <?php
/* ProjetSymfonyBundle/Tests/Controller/DefaultControllerTest.php */
class __TwigTemplate_488ca8e05e838bbd62373badcdf565acc30afa30cc0ea450830ddc6d45e19fdd extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
... | PHP | app/cache/dev/twig/d9/d9a7402ad8bc025dc98afd4caa989d73aebb6362bc76228c88d4e0ee8c68ea2f.php | pellu/LeCoinDesPious | mit | 1,570 | 67 | codeparrot/github-code |
6e7773c4d7b696c16354bf75a500b6f81cf065b17a54c928a013684615b965cf | require 'delegate'
module ActiveMapper
class Relation
extend Forwardable
def_delegators :to_a, :each, :map
def initialize(mapped_class, adapter, &block)
@mapped_class = mapped_class
@adapter = adapter
@block = block
end
def initialize_copy(other)
super
... | Ruby | lib/active_mapper/relation.rb | artinboghosian/active_mapper | mit | 2,522 | 133 | codeparrot/github-code |
f00d3772d620c0610cd031c68838d88d9d0b5a72b74234e97333eafdf7943693 | import sys
import glob
import numpy as np
from .netcdf import netcdf_file
_exclude_global = ['close',
'createDimension',
'createVariable',
'dimensions',
'filename',
'flush',
'fp',
'mode'... | Python | utils/python/MITgcmutils/MITgcmutils/mnc.py | altMITgcm/MITgcm66h | mit | 14,112 | 429 | codeparrot/github-code |
ab8239ececcd96f8fbee1cc7921d610391b46cb655878cbe8c353a85e4197fd6 | <?php
namespace AppBundle\Form\Settings;
use AppBundle\Entity\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 ProfileType
**
*
*/
class P... | PHP | client/src/AppBundle/Form/Settings/ProfileType.php | ministryofjustice/opg-digi-deps-client | mit | 1,968 | 61 | codeparrot/github-code |
4d2f99ed36e165649b3d5042d1ef28774e7a8ad8cfd1e391911ac9660dd63ee6 | var _ = require('lodash');
var path = require('path');
function cucumberJUnitReporter(providedConfig, builder) {
var config = _.defaults(providedConfig || {}, {
reportDir: 'test_reports',
reportPrefix: 'TEST-',
reportSuffix: '.xml',
reportFile: 'test_results.xml',
oneReportPerFeature: true,
... | JavaScript | src/reporter.js | davidparsson/cucumber-junit-reporter | mit | 3,752 | 139 | codeparrot/github-code |
64fc00440615fa24e937b21dc9348a574cefe98c58a35c670992daa0ba2234da | require "mediawiki-vagrant/plugin_environment"
require "mediawiki-vagrant/settings/definitions"
require "mediawiki-vagrant/settings_plugin"
require "optparse"
module MediaWikiVagrant
# Configures port forwarding from the host to the guest VM.
#
class ForwardPort < Vagrant.plugin(2, :command)
include PluginEn... | Ruby | lib/mediawiki-vagrant/forward_port.rb | ankita-kumari/mediawiki-vagrant | mit | 2,245 | 86 | codeparrot/github-code |
634d5499718f5b0d748be5a9f2fd3cded42c2904104aec511520a322940d0cbf | package im.AfriChat.messenger.app.util.images.sources;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import im.AfriChat.messenger.app.util.images.common.*;
import java.io.FileNotFoundException;
import java.io.IOE... | Java | actor-apps/app-android/src/main/java/im/AfriChat/messenger/app/util/images/sources/UriSource.java | dsaved/africhat-platform-0.1 | mit | 4,657 | 149 | codeparrot/github-code |
30b0e87a019cdd5a7f916eacb825ccb9559ebcfff997c1976b2b3f0071297f6b | /**
* Created by shuis on 2017/5/29.
*/
import React, { Component } from 'react';
import {
View,
Image,
FlatList,
TouchableWithoutFeedback
} from 'react-native';
import {TabBarIcon, TweetSeparator} from '../component/base';
import Tweet from '../component/Tweet';
import {public_timeline} from '../api/api';
... | JavaScript | app/screen/LookAround.js | shuiszhang/fanfou | mit | 1,772 | 85 | codeparrot/github-code |
903b95f21c279ab29d38a4f75c283349537135fa03191211e4f1f456e1955eee | using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.VBIDEApi
{
/// <summary>
/// DispatchInterface Property
/// SupportByVersion VBIDE, 12,14,5.3
/// </summary>
[SupportByVersion("VBIDE", 12,14,5.3)]
[EntityType(EntityType.IsDispatchInterf... | C# | Source/VBIDE/DispatchInterfaces/Property.cs | NetOfficeFw/NetOffice | mit | 12,090 | 393 | codeparrot/github-code |
664a3916b3e992c2f6688ec631989d204e3d160a7059f772690d92514f722127 | require_relative 'connection'
module Scouter
module Base
class SingleUrlApi < Scouter::Base::Object
# Get Count
# @param [String or Array] urls
# @return [Hashie::Mash, Array] URL & count hash, Error
def self.get_count(urls)
results, errors = {}, []
# check valid url or ... | Ruby | lib/scouter/base/single_url_api.rb | morizyun/scouter | mit | 1,151 | 43 | codeparrot/github-code |
ab0d0716ce1530bda16977a06fc9db96715bcc89f9da8e59db2f01a2a3ed4006 | using System;
namespace AE.Net.Mail {
public class Attachment : ObjectWHeaders {
public virtual string Filename {
get {
return Headers["Content-Disposition"]["filename"].NotEmpty(
Headers["Content-Disposition"]["name"],
Headers["Content-Type"]["filename"],
Head... | C# | aenetmail-master/Attachment.cs | xy2041/GmailNotifierClone | mit | 1,421 | 53 | codeparrot/github-code |
223184682c2cd70678476cdaab03244b5d2088b1cfc213eaccc68549cbc2845e | """Publishing native (typically pickled) objects.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from traitlets.config import Configurable
from ipykernel.inprocess.socket import SocketABC
from traitlets import Instance, Dict, CBytes
from ipykernel.jsonutil imp... | Python | venv/lib/python2.7/site-packages/ipykernel/datapub.py | bdh1011/wau | mit | 1,761 | 59 | codeparrot/github-code |
f682801b4fc81de722f025fb3c8cf1c10b998d01a259363dfd117fe201f0e8e8 | var should = require('should');
var annotationRouter = require('../../index.js');
var path = './mock.js';
describe('get basic routes', function(){
describe('asynchronous', function(){
var err;
before(function(done){
routes = {};
annotationRouter(path, function(e, rou... | JavaScript | test/router/index.js | mastilver/node-annotation-router | mit | 4,514 | 141 | codeparrot/github-code |
cf1e9bfbdb3b47c115759740d03b505ae3c24da2d963f1393d9e94045f347dd3 | // Copyright (c) 2016 Antony Arciuolo. See License.txt regarding use.
#include <oBase/osc.h>
#include <oCore/assert.h>
#include <oCore/byte.h>
#include <oCore/endian.h>
#include <oString/string.h>
#define oUNKNOWN_SIZE SIZE_MAX
#define oASSERT_ALIGNED(x) oAssert(aligned(x, 4), "The destination pointer must be 4-byte... | C++ | Ouroboros/Source/oBase/osc.cpp | igHunterKiller/ouroboros | mit | 19,644 | 588 | codeparrot/github-code |
f8be578f27109a7c305489a84f6c4e363a9575462c5bf2d89d01021069db2a98 | package it.unisa.dia.gas.plaf.jpbc.pairing;
import it.unisa.dia.gas.jpbc.PairingParametersGenerator;
import it.unisa.dia.gas.plaf.jpbc.pbc.curve.*;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import static org.junit.Assume.assumeTrue;
/**
* @author Angelo De Caro (... | Java | RewardScheme/lib/jpbc-2.0.0/jpbc-test/src/test/java/it/unisa/dia/gas/plaf/jpbc/pairing/PBCCurveGeneratorPairingTest.java | woojung3/RewardScheme | mit | 1,193 | 40 | codeparrot/github-code |
9dc5533839c528df04459c7d8578e9614ca9136d3e895e7cac050b16d0e23f45 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using OpenTelemetry;
using OpenTelemetry.Trace;
using System;
using System.Diagnostics;
namespace Azure.Monitor.OpenTelemetry.Exporter
{
/// <summary>
/// test
/// </summary>
public static class AzureMonito... | C# | sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs | brjohnstmsft/azure-sdk-for-net | mit | 1,415 | 37 | codeparrot/github-code |
5b1a9f518feb5c6f1f4a7269e206d0a131dd7b4cd517421ace6948cdf77e255c | //
// AnnotatedImage+Create.h
// DetectMe
//
// Created by Josep Marc Mingot Hidalgo on 11/10/13.
// Copyright (c) 2013 Josep Marc Mingot Hidalgo. All rights reserved.
//
#import <CoreLocation/CoreLocation.h>
#import <coreMotion/CoreMotion.h>
#import "AnnotatedImage.h"
#import "Detector.h"
#import "Box.h"
@interf... | C | CoreData/AnnotatedImage+Create.h | mingot/detectme | mit | 1,075 | 33 | codeparrot/github-code |
2b3bfbfb33ecbf9c1c07333d3caab6192dda5d840b68ef8f66ae98b1a15cf268 | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
use Psr\Container\Container... | PHP | src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php | andreia/symfony | mit | 1,972 | 75 | codeparrot/github-code |
af699dc6a85ce3655025a429047d71555faed58114dc0d960f70256f738532f1 | package edu.gatech.cs2340.trydent.test;
import static edu.gatech.cs2340.trydent.test.TestUtil.objectEquals;
import org.junit.Test;
import edu.gatech.cs2340.trydent.math.curve.IndexWrapMode;
import edu.gatech.cs2340.trydent.math.curve.TimeWrapMode;
public class TimingTest {
@Test
public void testIndexClamp... | Java | src/test/java/edu/gatech/cs2340/trydent/test/TimingTest.java | AaronFriesen/Trydent | mit | 2,924 | 101 | codeparrot/github-code |
29c5663781c42f02573594971867a016cceba0194687ee81d09e89e0def35f74 | // ReSharper disable once CheckNamespace
namespace Fluent
{
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Fluent.Extensions;
using Fluent.Internal;
u... | C# | Fluent.Ribbon/Controls/RibbonContextualTabGroup.cs | robertmuehsig/Fluent.Ribbon | mit | 9,202 | 276 | codeparrot/github-code |
567f2fac325d09eea5843026d123401a18d06fab8fcb1f4edb574fde836603cb | using System;
using System.Runtime.Serialization;
using ProApiLibrary.Api.Clients;
using ProApiLibrary.Data.Entities;
namespace ProApiLibrary.Data.Associations
{
/// <summary>
/// The <seealso cref="IPhone"/> type specific <seealso cref="Association"/>
/// </summary>
/// <remarks>
/// <p>This class al... | C# | ProApiLibrary_PCL/Data/Associations/PhoneAssociation.cs | anthonyrstevens/proapi-client-csharp | mit | 1,618 | 70 | codeparrot/github-code |
f6d657988f295a481ae3f522aedd58086b47ec89038f3a6bdaea98c0cdd5e12d | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hammer: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" re... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/released/8.5.2/hammer/1.2.1+8.11.html | coq-bench/coq-bench.github.io | mit | 7,319 | 179 | codeparrot/github-code |
7290b1434a05d74a32b87b1ebea523ba96514a4c05af9ee4c5a1fb138180c7d6 |
var Drag={
obj: null,
leftTime: null,
rightTime: null,
init: function (o,minX,maxX,btnRight,btnLeft) {
o.onmousedown=Drag.start;
o.hmode=true;
if(o.hmode&&isNaN(parseInt(o.style.left))) { o.style.left="0px"; }
if(!o.hmode&&isNaN(parseInt(o.style.right))) { o.style.right="0px"; }
o.minX=typeof minX!='unde... | JavaScript | src/SiteGroupCms.Files/sites/Demo/Templates/atts/新建文件夹/slide/js/slide.core.js | binghuo365/SiteGroupCms | mit | 4,408 | 132 | codeparrot/github-code |
549d45a2584c6b5c319feaf495b98c802c4cbd5736eea884f3fc39269b2c5823 | namespace Diploma.DAL.Entities
{
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Diploma.DAL.Entities.Enums;
public abstract class UserEntity
{
public DateTime? BirthDate { get; set; }
[Required]
publi... | C# | src/Diploma.DAL/Entities/UserEntity.cs | nestquik/diploma | mit | 835 | 36 | codeparrot/github-code |
f9c9d1c5de692eb1f5efba52130806d443ad0979729a2157cde646aeb40eab42 | <HTML><HEAD>
<TITLE>Review for Pay It Forward (2000)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0223897">Pay It Forward (2000)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Harvey+S.... | HTML | data science/machine_learning_for_the_web/chapter_4/movie/26386.html | xianjunzhengbackup/code | mit | 7,190 | 126 | codeparrot/github-code |
b807e8a722751954e6d76208bb98e5f650e7ac5cee56da253d393013371be2c5 | /*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.... | JavaScript | js/jquery.js | giatro/TranslateSelection | mit | 78,601 | 167 | codeparrot/github-code |
876b2b0779e1dbb7a624c677c43083d7b70019a890a0acf74049504a70e9cd82 | <?php
namespace Code4mk\Multitrust\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;
use Code4mk\Multitrust\Exceptions\LevelDeniedException;
class VerifyLevel
{
/**
* @var Guard
*/
protected $auth;
/**
* Create a new filter instance.
*
* ... | PHP | src/Middleware/VerifyLevel.php | code4mk/multitrust | mit | 909 | 45 | codeparrot/github-code |
d976df4fe78b44c4e197268114fd46b50ebfce6d07c5e6513a661f625abc14fb | /* This class supports functionality used to find and remove regions in the map.*/
using AKSaigyouji.Maps;
using System.Collections.Generic;
using UnityEngine.Assertions;
namespace AKSaigyouji.GraphAlgorithms
{
static class BFS
{
/// <summary>
/// Get a list of all the connected regions in th... | C# | Project/Scripts/MapGeneration/GraphAlgorithms/GraphSearch/BFS.cs | AK-Saigyouji/Procedural-Cave-Generator | mit | 4,979 | 126 | codeparrot/github-code |
df882d75759c3aff2900de67ee2a421bb0bb05ba66febcc99f7cb41f5c707ec6 | package collectors
import (
"bufio"
"encoding/json"
"fmt"
"io"
"os"
"strings"
"time"
"github.com/leapar/bosun/metadata"
"github.com/leapar/bosun/opentsdb"
)
type crSummary struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
ElapsedTime float32 `json:"elapsed_time"`
Sta... | GO | cmd/scollector/collectors/chef_linux.go | leapar/bosun | mit | 2,955 | 139 | codeparrot/github-code |
2f775c63b40397a8f5684bd29cf3814d7aac8065104144b91e9a6f385cbc86d8 | using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using MonoTouch.Dialog;
using System.IO;
using System.Drawing;
namespace Sample
{
public class Application
{
static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
// The name... | C# | Sample/Main.cs | migueldeicaza/MonoTouch.Dialog | mit | 3,611 | 108 | codeparrot/github-code |
87861d1bdae42579c5c5df7651ae6a2923e61f569b8d789a409a54e838054364 | import { browser, element, by } from 'protractor';
describe('Form Component', function () {
var _modelName: string, _modelDesc: string, _modelStatus: string;
beforeEach(function () {
});
it('should display: the correct url', function(){
browser.get('addTicket');
browser.getCurrentUrl().then(function ... | TypeScript | e2e/form.component/cenario1/form.e2e-spec.ts | camposmandy/Tickets | mit | 3,180 | 96 | codeparrot/github-code |
54070aba652eadefad37de74a85b0307aea7e893db9868a7ec21b781cea608a7 | const ADD_TODO = 'ADD_TODO';
const TOGGLE_TODO = 'TOGGLE_TODO';
const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
const SHOW_ALL = 'SHOW_ALL';
const todo = (state = {}, action) => {
switch (action.type) {
case ADD_TODO:
return {
id: action.id,
text: action.text,
completed: fals... | JavaScript | src/redux/modules/todo.js | yogakurniawan/cerebral-app | mit | 1,465 | 83 | codeparrot/github-code |
787d365ffd99ad6a2b65b3f97c8b4d49fa1a470920e785aa3040831ff6e1ae0a | import { createStore, compose, applyMiddleware } from 'redux';
import reduxImmutableStateInvariant from 'redux-immutable-state-invariant';
import thunk from 'redux-thunk';
import axios from 'axios';
import axiosMiddleware from 'redux-axios-middleware';
import rootReducer from '../reducers';
const client = axios.create... | JavaScript | src/store/configureStore.js | guiconti/Buildev | mit | 2,037 | 69 | codeparrot/github-code |
e938b9a795858988adc4b931ddcf8efd5177cda26113ca1a04c0a60cabc167ad | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For ... | C++ | src/qt/guiutil.cpp | digiwhite/litebar | mit | 13,477 | 464 | codeparrot/github-code |
e728a6a5819d8aa4126d39fd285f727dfa17faa259fc6dfc1e8602f922f0dc95 | <?php
/* @WebProfiler/Profiler/base_js.html.twig */
class __TwigTemplate_ae056cb8a330276cc4561a2e713ee0f5489318f7ac1443c94398f9f61fbbd02e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = arra... | PHP | app/cache/dev/twig/ae/05/6cb8a330276cc4561a2e713ee0f5489318f7ac1443c94398f9f61fbbd02e.php | NewRehtse/GastosTallerSf | mit | 4,632 | 134 | codeparrot/github-code |
e2627411633eaa21471f106840202db7cebe7a1f8fa15bc4208e77b35636f578 | #include <vector>
#include <iostream>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <sstream>
#include <algorithm>
#include <queue>
#include <set>
#include <functional>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#if 0
This algorithm's idea is:
to iteratively determine what ... | C++ | leetcode/medium_maximum_xor_of_two_numbers_in_an_array.cpp | wonghoifung/tips | mit | 2,278 | 77 | codeparrot/github-code |
8fdf249b24e8aafad470cecbb0752a888e728a9d8a6abcdb222eaa045140a582 | /* eslint-disable security/detect-object-injection */
const path = require("path").posix;
const { calculateInstability, metricsAreCalculable } = require("../module-utl");
const {
getAfferentCouplings,
getEfferentCouplings,
getParentFolders,
object2Array,
} = require("./utl");
function upsertCouplings(pAllDepen... | JavaScript | src/enrich/derive/folders/aggregate-to-folders.js | sverweij/dependency-cruiser | mit | 3,202 | 107 | codeparrot/github-code |
fdb2ac02b99a7338eaf89fdafd7c2e99930737367bffb2ebf93e17ea99af6da3 | #ifndef PIGEON_H_
#define PIGEON_H_
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PIGEON_ALIGNSIZE 4
#define PIGEON_LINESIZE 80
// Typedefs {{{
typedef void
(*PortalEntryHandler)(void * target, char * message, char * response);
typedef char *
(*PigeonIn)(char * buffer, int maxSize); // g... | C | include/pigeon.h | ErnWong/NothingButNet-Mark-III | mit | 1,856 | 127 | codeparrot/github-code |
048338fbba466412b5bf65dc3f31cc6b5d679ad0f7fadc84e871f95642c051d2 | using System.Data.SQLite;
using System.IO;
namespace FunWithSQLite.Db
{
public class Database
{
public const string CREATE_TABLE_SQL = @"
CREATE TABLE MyTable (
Id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
Created varchar(28),
LastModified varchar(28),
MyColumn varcha... | C# | ConsoleApps/FunWithSQLite/FunWithSQLite/Db/Database.cs | jquintus/spikes | mit | 2,602 | 85 | codeparrot/github-code |
62bdbcc186c39a631316c697a011abd7d829a6f3cf438c7e8bb3e0954fc28146 | class WikiHouse::DoorPanelOuterSide < WikiHouse::WallPanelOuterSide
def initialize(parent_part: nil, sheet: nil, group: nil, origin: nil, label: label)
part_init(origin: origin, sheet: sheet, label: label, parent_part: parent_part)
@length_method = :length
@width_method = :depth
init_board(right_co... | Ruby | models/parts/door_panel_outer_side.rb | WikiHouseSATX/WikiHouseSATXSketchUpPlugin | mit | 3,182 | 79 | codeparrot/github-code |
4f9b8ab6470d6b3f8c6c99200fcadc6e953066008c710ccbecbf8d46a867b58b | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 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 "main.h"
#include "db.h"
#include "init.h"
#include "bitcoinrpc.h"
using name... | C++ | src/rpcmining.cpp | TimMaylon/corecoin | mit | 21,099 | 589 | codeparrot/github-code |
0f0db950d2ea3ad8e8cc656f95f00a99d1b4376a0bfcc6fb88a783ff2e004d04 |
/*
* grunt-tankipas
* https://github.com/Leny/grunt-tankipas
*
* Copyright (c) 2014 Leny
* Licensed under the MIT license.
*/
"use strict";
var chalk, error, spinner, tankipas;
tankipas = require("tankipas");
chalk = require("chalk");
error = chalk.bold.red;
(spinner = require("simple-spinner")).change_seque... | JavaScript | tasks/tankipas.js | leny/grunt-tankipas | mit | 1,766 | 59 | codeparrot/github-code |
fe37130a1b6e7aaac9715b57a7779945376eff75245f2076ceda4f5f60e5f9bb | // test: indent_only
const
foo
=
1
+
2
;
const foo =
[1, 2];
const foo = [
1, 2];
const foo =
{a, b};
const foo = {
a, b};
someMethod(foo, [
0, 1, 2,], bar);
someMethod(
foo,
[0, 1, 2,],
bar);
someMethod(foo, [
0, 1,
2,
], bar);
someMethod(
f... | JavaScript | test/js/indent.js | codemirror/google-modes | mit | 995 | 121 | codeparrot/github-code |
702e765f940f710b904a80a0e0bbb6302082b37f9eb85966a108d1f9dd704f2d | // Copyright (c) 2012-2016 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 "dbwrapper.h"
#include "uint256.h"
#include "random.h"
#include "test/test_digibyte.h"
#include <boost/assign/std/v... | C++ | src/test/dbwrapper_tests.cpp | DigiByte-Team/digibyte | mit | 10,641 | 324 | codeparrot/github-code |
f2355831ddc325341761637c63de7165a112df3a76bad97a3f21e5e78dbd3b23 | /*
* Snapshot multiple pages using arrays.
*
* Use an array to snapshot specific urls.
* Use per-page selectors.
* Use per-page output paths.
* Remove all script tags from output.
* Use javascript arrays.
*/
var path = require("path");
var util = require("util");
var assert = require("assert");
var htmlSnapsho... | JavaScript | examples/html5rocks/snapshot.js | open-grabhouse/html-snapshots | mit | 1,558 | 61 | codeparrot/github-code |
4a37550e843f148333fd1b16024edc126e1a7fdb9d817a7c7b01b638947e1330 | import * as React from "react";
import { connect } from 'react-redux'
import { searchSubTitle } from '../actions'
function natcmp(a, b) {
var ra = a.match(/\D+|\d+/g);
var rb = b.match(/\D+|\d+/g);
var r = 0;
while (!r && ra.length && rb.length) {
var x = ra.shift(), y = rb.shift(),
... | TypeScript | app/ts/modules/MediaTable.tsx | zqjimlove/subox | mit | 2,785 | 90 | codeparrot/github-code |
a93dcf4b73dc8f670962c483357981285bee4264c5d068c48a1cfc39050d2740 | var async = require('async'),
fs = require('graceful-fs'),
path = require('path'),
colors = require('colors'),
swig = require('swig'),
spawn = require('child_process').spawn,
util = require('../../util'),
file = util.file2,
commitMessage = require('./util').commitMessage;
// http://git-scm.com/docs/git... | JavaScript | lib/plugins/deployer/github.js | 007slm/hexo | mit | 3,302 | 127 | codeparrot/github-code |
e61df023055eb0c59d9e6c2667bff929277bcdd9600661c44ec12a268e2fa2ac | require 'socket'
'''
The API to this is very simple
GET / - returns all keys
GET /key - returns value of key "key"
GET /key/value - sets value of key "key" to value
'''
class SocketListen
def initialize port=8181
@data = { 'apache' => 'apache', 'bsd' => 'mit', 'chef' => 'apache' }
@port = port || 8181
... | Ruby | day_3/rest_5b.rb | dsklopp/ruby_class_2015_samples | mit | 1,010 | 53 | codeparrot/github-code |
8262eb5e1a08912723d348b6635ddabdec340cfd989db1813face06038c2e7e4 | #----------------------------
# アイテム購入処理 (事前にアイテム登録が行われていない場合)
#----------------------------
#### 決済トランザクションの作成
# transactionの作成に必要なitemのmaster dataを取得
select * from items where id = 'item_001'; # slaveで取得
## transaction作成request -> response (platformへのAPIで取得)
#### Order データの作成, OrderIDの取得 ####
## transaction_id 受け取... | SQL | db_setting/query.sql | DeNADev/mobage-jssdk-sample-payment | mit | 5,570 | 225 | codeparrot/github-code |
a13f132f6c3bd184edb9b0da43a1faee6d565be146cbd73a04ee0d54804feb88 | package app
import (
"time"
"github.com/urfave/cli"
)
type innerContext interface {
Args() cli.Args
Bool(name string) bool
BoolT(name string) bool
Duration(name string) time.Duration
FlagNames() (names []string)
Float64(name string) float64
Generic(name string) interface{}
GlobalBool(name string) bool
Glo... | GO | cmd/bytemark/app/clicontext.go | BytemarkHosting/bytemark-client | mit | 1,799 | 65 | codeparrot/github-code |
09b0b80fbea0214b4e6ac822063f19bee146e9850052b51b96bc9831c38d3af2 | package com.zoinks.waterreporting.model;
import android.util.Log;
import com.github.mikephil.charting.data.Entry;
import com.google.gson.Gson;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
i... | Java | app/src/main/java/com/zoinks/waterreporting/model/Facade.java | seantitus/WaterReporting | mit | 9,500 | 283 | codeparrot/github-code |
eddfdc0c3f72124e8bc1ce62396dd0358828c4c9fdb74b563a2a259ba878923a | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="ht... | HTML | lib/assets/css/css_compiled/@{photonImagePath}plugins/elrte/js/plugins/prettify/js/plugins/css/css_compiled/js/plugins/jquery.pnotify.min.js.html | user-tony/photon-rails | mit | 17,059 | 197 | codeparrot/github-code |
23d242db93aeee885439ebbf8793b14d9013b4903747fcb8631e67718dfde0ad | // ImGui Win32 + DirectX11 binding
// Implemented features:
// [X] User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this bi... | C++ | VIsualStudio_EuroRackSimulator/libs/imgui-master/examples/directx11_example/imgui_impl_dx11.cpp | ThisIsNotRocketScience/Eurorack-KDS | mit | 30,064 | 672 | codeparrot/github-code |
5f088b10af09d15f2a9148f0693cf98192113ee681a81a0b8488f14b0da31cce | #include "pi_SharedTypes_0.h"
#include "GenericSharedDeclarations.h"
#include "queue_SharedTypes_0.h"
void pi_SharedTypes_0_mutexDestroy_3(pi_SharedTypes_0_FlaggedQueue_t* var)
{
pthread_mutex_destroy(&var->itemCount.mutex);
queue_SharedTypes_0_mutexDestroy_2(&var->queue);
pthread_mutex_destroy(&var->isFull.m... | C | generated_programs/pi/optimized/pi_parallel_sync_extended/pi_SharedTypes_0.c | aloifolia/ParallelMbeddr | mit | 2,126 | 63 | codeparrot/github-code |
44e8b06f9a8def62b62a2457425449e708d08625c31550233c64ad62160bed60 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Busquedas_model extends CI_Model {
public function __construct() {
parent::__construct();
}
public function pendientes_mdl(){
$this->load->model("actividades_model");
$html="";
$w_buscar = $this->input->post('buscar');
$sql... | PHP | application/modules/admin/models/Busquedas_model.php | carlosmast23/vm | mit | 2,750 | 115 | codeparrot/github-code |
739d44fe7ce4041487d0a3adf6ce01df0a586092e61918aff4c62d0b26f6bd3a | import org.apache.commons.math3.optim.nonlinear.vector.Weight;
import org.datavec.api.records.reader.RecordReader;
import org.datavec.api.records.reader.impl.ComposableRecordReader;
import org.datavec.api.records.reader.impl.csv.CSVRecordReader;
import org.datavec.api.split.CollectionInputSplit;
import org.datavec.api.... | Java | dl4j/AllConvolutionDL4J.java | unisar/CIFARClassification | mit | 9,129 | 211 | codeparrot/github-code |
c6bcaa472d0259b7dbb796770dc00fcee3fe4b1353c98f4f1c1fa9d9e8949929 | /*jshint quotmark: false*/
'use strict';
var Blueprint = require('../models/blueprint');
var Task = require('../models/task');
var parseOptions = require('../utilities/parse-options');
var merge = require('lodash-node/modern/objects/merge');
module.exports = Task.extend({
run: function(options) {... | JavaScript | lib/tasks/generate-from-blueprint.js | treyhunner/ember-cli | mit | 830 | 34 | codeparrot/github-code |
2b4960976e9e990de057a53217d64dd43bf7b5b725919f6e34c460abb770bdd2 | package edison.yaml
import edison.util.SmartSpec
import org.yaml.snakeyaml.error.YAMLException
class YamlLoaderTest extends SmartSpec {
behavior of "YamlLoader"
implicit class YamlHelper(str: String) {
def load(process: Any => Unit): Unit = process(ScalaYaml.load(str.strip))
}
it must "parse list of int... | Scala | service/src/test/scala/edison/yaml/YamlLoaderTest.scala | pawel-wiejacha/edison | mit | 2,439 | 119 | codeparrot/github-code |
59f49bb2cdb81325d800a18035ed260b5c68e05451b3edeb8072868f5af3723c | module OAWidget
module Preserver
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
# Preserve ivars between widgets, rendering and ajax calls
# example:
# class MyWidget < OAWidget
# preserves_attr :page, :from => '../content'
# p... | Ruby | lib/oa_widget/preserver.rb | Orion98MC/oa_widget | mit | 3,948 | 118 | codeparrot/github-code |
d5cc642b5b785fc63ead8ebd8a864c7bc7cf89f464a79e31eb088b63686a7cbd | using System;
using System.Data.Entity;
using System.Data.Entity.Hooks.Fluent;
using Microsoft.AspNet.Identity.EntityFramework;
namespace MICCookBook.Web.Models
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
private ApplicationDbContext()
: base("DefaultConnecti... | C# | src/MICCookBook/MICCookBook.Web/Models/ApplicationDbContext.cs | micbelgique/MICCookBook | mit | 987 | 36 | codeparrot/github-code |
bf0a43cad50a191b1c505ad46aad08cad886994f63717f478e594379c093145c | #!/usr/bin/env python
'''
Creates an html treemap of disk usage, using the Google Charts API
'''
import json
import os
import subprocess
import sys
def memoize(fn):
stored_results = {}
def memoized(*args):
try:
return stored_results[args]
except KeyError:
result = store... | Python | treemap.py | geekoftheweek/disk-treemap | mit | 2,734 | 93 | codeparrot/github-code |
508c366d0b9c2beabe07e9d695c8973198815c46aeb192792dc8467681ccf766 | /* google-paper.js */
'use strict';
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
var RAD_2_DEG = 180/Math.PI;
function moving_average(period) {
var nums = [];
return function(num) {
nums.push(num);
if (nums.length > period)
nums.splic... | JavaScript | examples/js/goggle-paper.js | mkeblx/goggle-paper | mit | 3,793 | 167 | codeparrot/github-code |
95639c32e2145668d3f885d4be9a8ac37a3933a96211796615f9c940929bbf62 | 'use strict';
/* jasmine specs for services go here */
describe('base', function()
{
beforeEach(function(){
module('d3-uml-modeler.base');
module('d3-uml-modeler.uml-abstract-factory');
module('d3-uml-modeler.constants');
module('d3-uml-modeler.notifications');
});
describe('BaseModelElement', function(... | JavaScript | test/unit/baseSpec.js | elfakamal/d3-uml-modeler | mit | 7,756 | 261 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.