code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
module SynapseClient
class Merchant
attr_accessor :client_id
attr_accessor :client_secret
attr_accessor :oauth_merchant_key
attr_accessor :merchant_email
attr_accessor :device_id
def initialize(options ={})
options = Map.new(options)
@client_id = options[:client_id] ... | milesmatthias/synapse_client | lib/synapse_client/merchant.rb | Ruby | mit | 734 |
import qor
from scripts import ctf
class Mod(qor.Mod):
def __init__(self):
# set up specific things that engine needs to know about the mod
# possibly setting up customized gui, background music, theming, etc.
# include possible selections of things, and which customizations to
# en... | flipcoder/qor | bin/mods/example/__init__.py | Python | mit | 1,487 |
<?php
namespace Imp\AppBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com... | AlexanderPok/Football | src/Imp/AppBundle/DependencyInjection/Configuration.php | PHP | mit | 869 |
import { Injector, Pipe, PipeTransform } from '@angular/core';
import { AppComponentBase } from '@shared/app-component-base';
@Pipe({
name: 'localize'
})
export class LocalizePipe extends AppComponentBase implements PipeTransform {
constructor(injector: Injector) {
super(injector);
}
transfor... | aspnetboilerplate/module-zero-core-template | angular/src/shared/pipes/localize.pipe.ts | TypeScript | mit | 406 |
"use strict";
var Client_1 = require('./src/helpers/Client');
exports.Client = Client_1.Client;
//# sourceMappingURL=index.js.map | alormil/put.io-node | js/ts/index.js | JavaScript | mit | 129 |
(function() {
angular.module('signup', [ 'userServiceMod' ])
.controller('SignupCtrl', ['$location', 'userService', 'validator', function($location, userService, validator) {
var signup = this;
signup.buttonEnabled = true;
signup.err = {
username: ... | BYossarian/focus | public/js/controllers/signup.js | JavaScript | mit | 2,063 |
from __future__ import absolute_import, print_function, division
import operator
from petl.compat import text_type
from petl.util.base import Table, asindices, itervalues
from petl.transform.sorts import sort
def duplicates(table, key=None, presorted=False, buffersize=None, tempdir=None,
cache=Tru... | alimanfoo/petl | petl/transform/dedup.py | Python | mit | 15,217 |
from composite import *
from ensemble import *
from metrics import *
# from parametrization import *
from pdf import *
from utils import *
| aimalz/qp | qp/__init__.py | Python | mit | 145 |
'use strict';
angular.module('spc')
.factory('Auth', function Auth($location, $rootScope, $http, User, CremaAuth, spcServerUrl, apiKey, $cookieStore, $q) {
var currentMetaData = {};
if ($cookieStore.get('access_token')) {
currentMetaData = CremaAuth.get();
}
return {
/**
* Authen... | tobistw/spc-web-client | client/components/auth/auth.service.js | JavaScript | mit | 6,192 |
const WEEKDAYS_LONG = {
ru: [
'Воскресенье',
'Понедельник',
'Вторник',
'Среда',
'Четверг',
'Пятница',
'Суббота',
],
it: [
'Domenica',
'Lunedì',
'Martedì',
'Mercoledì',
'Giovedì',
'Venerdì',
'Sabato',
],
};
const WEEKDAYS_SHORT = {
ru: ['Вс', 'Пн', 'Вт', ... | saenglert/react-day-picker | docs/examples/src/localization.js | JavaScript | mit | 2,036 |
{
TITLE : 'HiddenColony',
API : 'API',
USED_BY : 'Used by',
LAS_MOD : 'Last update',
EXPIRES : 'Next update',
SER_TIM : 'Server time',
LOC_TIM : 'Local time',
REM_TIM : 'Remaining time'
}
| EliasGrande/OGameHiddenColony | dist/locale/en_GB.js | JavaScript | mit | 202 |
#!/usr/bin/env python
import sys
import os
import argparse
import h5py
import numpy
import shutil
import logging
import json
from skimage import morphology as skmorph
from scipy.ndimage import label
import traceback
from . import imio, agglo, morpho, classify, evaluate, app_logger, \
session_manager, pixel, feat... | jni/ray | ray/segmentation_pipeline.py | Python | mit | 18,742 |
<?php
class Movie_model extends CI_Model{
public function __construct() {
parent::__construct();
$this->load->database();
}
public function get_movies() {
$query = $this->db->query("select time, movie_name, movie_play_times from `movie-times`");
return $query->resu... | pepfi/tripserver | application/models/Movie_model.php | PHP | mit | 342 |
'''
Created on Oct 31, 2011
@author: robertsj
'''
import abc
class Bundle(object):
'''
An abstract base class for representing bundles.
'''
__metaclass__ = abs.ABCMeta
def __init__(self):
'''
Constructor
'''
| robertsj/poropy | poropy/bundletools/bundle.py | Python | mit | 264 |
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'tweakphoeus'
| basestylo/Tweakphoeus | spec/spec_helper.rb | Ruby | mit | 81 |
<?php
namespace Oro\Bundle\LocaleBundle\Migrations\Schema\v1_3;
use Doctrine\DBAL\Types\Type;
use Oro\Bundle\MigrationBundle\Migration\ArrayLogger;
use Oro\Bundle\MigrationBundle\Migration\ParametrizedMigrationQuery;
use Oro\Bundle\UserBundle\Entity\User;
use Psr\Log\LoggerInterface;
class CreateRelatedLanguagesQuer... | orocrm/platform | src/Oro/Bundle/LocaleBundle/Migrations/Schema/v1_3/CreateRelatedLanguagesQuery.php | PHP | mit | 3,307 |
<?php
/*
* This file is part of the Studio Fact package.
*
* (c) Kulichkin Denis (onEXHovia) <onexhovia@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$MESS['ID'] = 'ID HL блока или обычного инфоблока';
$MESS['TYPE'] ... | studiofact/citfact.form | install/components/citfact/form/lang/ru/.parameters.php | PHP | mit | 1,946 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _utils = require('./utils');
var metaFactory = function metaFactory(_ref) {
var name = _ref.name;
var checker = _ref.checker;
var types = _ref.types;
var meta = { name: name, checker: checker, types: types, isGeneric: false }... | Gwash3189/stronganator | dist/type.js | JavaScript | mit | 1,152 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 The VoxelBox
*
* 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,... | Deamon5550/VisualScripting | src/main/java/com/thevoxelbox/vsl/api/variables/VariableScope.java | Java | mit | 2,100 |
module Sequel::Reporter
class Cell
attr_reader :title, :value, :style
attr_accessor :text, :align
def initialize(title, value)
@title = title
@value = value
@style = {}
@text = value
@align = 'left'
end
end
class Report
attr_accessor :error, :fields, :rows
... | peterkeen/sequel-reporter | lib/sequel-reporter/report.rb | Ruby | mit | 2,604 |
"""
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import functools
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from ba... | James-Firth/pip | pip/wheel.py | Python | mit | 31,114 |
<?php
namespace MairieVoreppe\DemandeTravauxBundle\Entity;
/**
* ArreteModelRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ArreteModelRepository extends \Doctrine\ORM\EntityRepository
{
}
| chadyred/demandeTravaux | src/MairieVoreppe/DemandeTravauxBundle/Entity/ArreteModelRepository.php | PHP | mit | 266 |
<?php
namespace perf\PresetString;
/**
* This class allows to handle and validate strings representing a standardized time (HH:MM:SS).
*
*/
class Time extends PresetStringBase
{
const REGEX = '/^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/D';
/**
* Validates specified time string (HH:MM:SS).
*
* ... | jmfeurprier/perf-preset-string | lib/perf/PresetString/Time.php | PHP | mit | 613 |
<?php
/**
* @package Moar\Log\Monolog
*/
namespace Moar\Log\Monolog;
use Moar\Log\Helpers\HierarchicalLoggerFactory;
use Monolog\Logger;
use Psr\Log\LoggerInterface;
/**
* Logger factory for Monolog instances.
*
* @package Moar\Log\Monolog
* @copyright 2013 Bryan Davis and contributors. All Rights Reserved.
*... | bd808/moar-log | src/Moar/Log/Monolog/LoggerFactory.php | PHP | mit | 1,244 |
module.exports = {
"level": [
{
"level": "1",
"name": "trick"
},
{
"level": "1",
"name": "destiny-bond"
},
{
"level": "1",
"name": "ally-switch"
},
{
"level": "1",
... | leader22/simple-pokedex-v2 | _scraping/XYmoves/720.js | JavaScript | mit | 2,423 |
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
import Home from "@/pages/home.vue";
import CategoryIndex from "@/pages/categoryIndex.vue";
import ExpenditureIndex from "@/pages/expenditureIndex.vue";
export default new Router({
routes: [
{
path: '/',
name: 'home',
c... | trtstm/budgetr | web/src/router/index.ts | TypeScript | mit | 572 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TournamentsMVC.Data.Contracts;
using TournamentsMVC.Models;
using TournamentsMVC.Services.Contracts;
namespace TournamentsMVC.Services
{
public class RatingService : IRatingService
{
... | Krassimir-ILLIEV/TournamentsMVC | TournamentsMVC.Services/RatingService.cs | C# | mit | 1,629 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Roles in this namespace are meant to provide `Nginx <http://wiki.nginx.org/Main>`_ web server utility methods for Debian distributions.
'''
from provy.core import Role
from provy.more.debian.package.aptitude import AptitudeRole
class NginxRole(Role):
'''
This ro... | python-provy/provy | provy/more/debian/web/nginx.py | Python | mit | 7,202 |
// SPDX-License-Identifier: MIT
package mealplaner.plugins.utensil;
import static bundletests.BundleCommons.allMessageTests;
import java.io.File;
import org.junit.jupiter.api.Test;
class ObligatoryUtensilBundleTest {
@Test
void testBundle() {
allMessageTests("ObligatoryUtensilMessagesBundle", "plugins" + F... | Martin-Idel/mealplaner | mealplaner-plugins/utensil/src/test/java/mealplaner/plugins/utensil/ObligatoryUtensilBundleTest.java | Java | mit | 354 |
from django.core.exceptions import ValidationError
from django.forms import UUIDField
import six
from django.utils.module_loading import import_string
from django.utils.translation import ugettext_lazy as _
from django_smalluuid import settings
class ShortUUIDField(UUIDField):
default_error_messages = {
... | adamcharnock/django-smalluuid | django_smalluuid/forms.py | Python | mit | 1,158 |
const ROOT_PATH = process.cwd()
module.exports = {
bail: false,
cache: false,
devtool: 'eval',
devServer: {
compress: true,
contentBase: `${ROOT_PATH}/public/`,
historyApiFallback: true,
hot: true,
port: 8000,
stats: {
colors: true
}
... | jbarinas/cake-hub | _configs/webpack.config.dev.js | JavaScript | mit | 600 |
(function( $, SocialCount ) {
SocialCount.selectors.facebook = '.facebook';
SocialCount.getFacebookAction = function( $el ) {
return ( $el.attr('data-facebook-action' ) || 'like' ).toLowerCase();
};
SocialCount.plugins.init.push(function() {
var $el = this;
$el.addClass( SocialCount.getFacebookAc... | filamentgroup/SocialCount | src/networks/facebook.js | JavaScript | mit | 937 |
/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Flax from '... | osmanpontes/flax | examples/todos/src/stores/TodoStore.js | JavaScript | mit | 2,773 |
require_relative "../spec_helper"
require_relative "../../lib/daily_affirmation/validators/presence_validator"
describe "PresenceValidator" do
subject { DailyAffirmation::Validators::PresenceValidator }
it "passes validation if the attribute is present" do
obj = double(:name => :foo)
validator = subject.... | teamsnap/daily_affirmation | spec/validators/presence_validator_spec.rb | Ruby | mit | 914 |
package net.cassite.daf4j.types;
import net.cassite.daf4j.DataIterable;
import java.util.ArrayList;
import java.util.List;
/**
* 针对List在实体中的简化
*/
public class XList<E> extends DataIterable<E, List<E>> {
/**
* 使用ArrayList初始化该数据项
*
* @param entity 该数据项所在的实体,使用(this)填入该参数
*... | wkgcass/common | Data/src/main/java/net/cassite/daf4j/types/XList.java | Java | mit | 797 |
module.exports = {
update: function(data) {
var _ = this;
_.dom.update(data || _._data);
},
dispose: function dispose() {
var _ = this;
_.$element.innerHTML = '';
},
render: function render() {
var _ = this;
_.dispose();
_.dom = _.bars.compi... | Mike96Angelo/Custom-Element | lib/events.js | JavaScript | mit | 438 |
import { createStore, applyMiddleware, compose } from 'redux'
import { autoRehydrate } from 'redux-persist'
import createLogger from 'redux-logger'
import rootReducer from '../reducers/'
import Config from '../../config/debug_settings'
import createSagaMiddleware from 'redux-saga'
import sagas from '../sagas'
import R ... | igorlimansky/react-native-redux-boilerplate | src/core/store/store.js | JavaScript | mit | 2,872 |
/*
* 根据贝塞尔曲线获取两个经纬度之间的曲线
*/
'use strict';
var PI = Math.PI;
/*
* 初始贝塞尔曲线值
* params:
* start: {lat:112,lng:22} 起点
* end: {lat:112,lng:22} 终点
* isClockWise: bool 是否顺时针
*/
var BezierPath = function(start,end,isClockWise){
this.geometries = [];
this.start = start;
this.end = end;
this.clockWise = is... | ZacksTsang/BezierPath | bezierpath.js | JavaScript | mit | 3,579 |
/** @jsx jsx */
import { jsx } from 'slate-hyperscript'
export const input = (
<element>
<text>word</text>
</element>
)
export const output = {
children: [
{
text: 'word',
},
],
}
| ianstormtaylor/slate | packages/slate-hyperscript/test/fixtures/element-text-string.tsx | TypeScript | mit | 207 |
// Plugin.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using Cirrious.CrossCore;
using Cirrious.CrossCore.Plugins;... | MatthewSannes/MvvmCross-Plugins | File/MvvmCross.Plugins.File.Touch/Plugin.cs | C# | mit | 615 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Nanite</source>
<translation type="unfinished"/>
</message>
<message>
<location line... | xNanite/Nanite | src/qt/locale/bitcoin_ur_PK.ts | TypeScript | mit | 107,598 |
namespace StockportWebapp.Emails.Models
{
public class GroupPublish
{
public string Name { get; set; }
public string Slug { get; set; }
}
}
| smbc-digital/iag-webapp | src/StockportWebapp/Emails/Models/GroupPublish.cs | C# | mit | 171 |
import './adventure_status_bar.html';
import { Template } from 'meteor/templating';
/**
* Template Helpers
*/
Template.AdventureStatusBar.helpers({
getHeaderMargin(){
return Template.instance().headerMargin.get();
},
adventureStatus(){
return this.adventure.get().status
}
});
/**
* Template Event ... | austinsand/doc-roba | meteor/client/ui/pages/adventure_console/adventure_status_bar.js | JavaScript | mit | 1,164 |
/*
* ofxBox2dWeldJoint.cpp
* Taken from ofxBox2dJoint by Nick Hardeman
*
*
* Created by Joel Gethin Lewis on 20/2/2011
*
*/
#include "ofxBox2dWeldJoint.h"
//----------------------------------------
ofxBox2dWeldJoint::ofxBox2dWeldJoint() {
world = NULL;
alive = false;
}
ofxBox2dWeldJoint::ofxBox2dWeldJoi... | HellicarAndLewis/NorwegianWood | addons/ofxBox2d/src/ofxBox2dWeldJoint.cpp | C++ | mit | 2,839 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Okcoin</source>
<translation>Sobre Okcoin</translation>
</mes... | stamhe/okcoin | src/qt/locale/bitcoin_es_CL.ts | TypeScript | mit | 106,839 |
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use App\User;
use App\Models\Role;
use App\Models\Permission;
class DashboardController extends Controller
{
/**
* Instantiate a new DashboardController instance.
*/
public function __construct()
{
$this->... | ricardoaugusto/starter | app/Http/Controllers/DashboardController.php | PHP | mit | 576 |
import {Component, Injectable} from '@angular/core';
import {Injectable} from '@angular/core';
import {Http, Response} from "@angular/http";
import {Observable} from "rxjs/Rx";
@Injectable()
export class GameService {
constructor(private http:Http) {
}
stopGame(gameId:string) {
console.log('in stopGame');
... | Ehofas/rocketPuncherFrontEnd | src/app/Games/game.service.ts | TypeScript | mit | 1,329 |
import DOMExporter from './DOMExporter'
import DefaultDOMElement from '../ui/DefaultDOMElement'
import { isBoolean } from 'lodash-es'
import forEach from '../util/forEach'
import isNumber from '../util/isNumber'
import isString from '../util/isString'
var defaultAnnotationConverter = {
tagName: 'span',
export: fun... | stencila/substance | model/HTMLExporter.js | JavaScript | mit | 1,923 |
package net.buycraft.plugin;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.buycraft.plugin.data.Coupon;
import net.buycraft.plugin.data.GiftCard;
import net.buycraft.plugin.data.RecentPayment;
import net.buycraft.plugin.data.ServerEvent;
import net.buycraft.plugin.data.responses.*;
import... | BuycraftPlugin/BuycraftX | common/src/main/java/net/buycraft/plugin/BuyCraftAPI.java | Java | mit | 9,014 |
'use strict';
var tomasi = require('..');
var fs = require('fs');
var path = require('path');
var join = path.join;
var test = require('tape');
var RELATIVE_PATH = path.relative(process.cwd(), __dirname);
var FIXTURES_DIR = join(RELATIVE_PATH, 'fixtures');
var FIXTURES_ABS_DIR = join(__dirname, 'fixtures');
test('w... | yuanqing/tomasi | test/build.js | JavaScript | mit | 11,000 |
<?php
namespace spec\IonAuth\IonAuth\Lang;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class LangSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedWith('English');
}
function it_is_initializable()
{
$this->shouldHaveType('IonAuth\IonAuth\Lang\Lang');
}... | IonAuth/IonAuth | spec/Lang/LangSpec.php | PHP | mit | 1,400 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _15.Neighbour_Wars
{
class NeighbourWars
{
static void Main(string[] args)
{
int peshoDamage = int.Parse(Console.ReadLine());
int goshoDamage = ... | plamenrusanov/Programming-Fundamentals | Conditional Statements and Loops - Exercises/15. Neighbour Wars/NeighbourWars.cs | C# | mit | 1,621 |
from collections import OrderedDict
from conans.paths import SimplePaths
from conans.client.output import Color
from conans.model.ref import ConanFileReference
from conans.model.ref import PackageReference
from conans.client.installer import build_id
import fnmatch
class Printer(object):
""" Print some specific... | mropert/conan | conans/client/printer.py | Python | mit | 12,165 |
<?php
/**
* @author Boris Guéry <guery.b@gmail.com>
*/
namespace Bgy\EventStore\Transport;
interface Transport {}
| fedir/EventStoreForPHP | src/Bgy/EventStore/Transport/Transport.php | PHP | mit | 119 |
/*
This script generates mock data for local development.
This way you don't have to point to an actual API,
but you can enjoy realistic, but randomized data,
and rapid page loads due to local, static data.
*/
/* eslint-disable no-console */
import jsf from 'json-schema-faker';
import {schema} from './mockData... | davefud/js-dev-env | buildScripts/generateMockData.js | JavaScript | mit | 604 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MathML
{
public abstract class MathMLElement : IMathMLNode
{
[MathMLAttributeName("id")]
[MathMLAttributeOrderIndex(1)]
[DefaultValue("")]
public string... | BenjaminTMilnes/MathML | MathML/MathMLElement.cs | C# | mit | 1,408 |
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { NgBusyModule } from 'ng-busy';
import { SurvivalRoutingModule } from './survival-routing.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
... | brevinL/longevity-visualizer-front-end | src/app/survival/survival.module.ts | TypeScript | mit | 1,553 |
package fi.csc.chipster.sessionworker;
public class SupportRequest {
private String message;
private String mail;
private String session;
private String app;
private String log;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public ... | chipster/chipster-web-server | src/main/java/fi/csc/chipster/sessionworker/SupportRequest.java | Java | mit | 748 |
using System;
namespace RecurringInterval
{
public abstract class Interval
{
protected Interval(Period period)
{
Period = period;
}
public int TotalDays => (int)EndDate.Subtract(StartDate).TotalDays + 1;
public DateTime StartDate { get; protect... | ribbles/RecurringInterval | RecurringInterval/Interval.cs | C# | mit | 786 |
/* global describe,it */
var getSlug = require('../lib/speakingurl');
describe('getSlug symbols', function () {
'use strict';
it('should convert symbols', function (done) {
getSlug('Foo & Bar | Baz')
.should.eql('foo-and-bar-or-baz');
getSlug('Foo & Bar | Baz', {
... | jotamaggi/react-calendar-app | node_modules/speakingurl/test/test-lang.js | JavaScript | mit | 12,387 |
#include "SoundSource.hpp"
#include "../Entity/Entity.hpp"
#include "../Hymn.hpp"
#include "../Audio/SoundFile.hpp"
#include "../Audio/SoundBuffer.hpp"
#include "../Manager/Managers.hpp"
#include "../Manager/ResourceManager.hpp"
using namespace Component;
SoundSource::SoundSource() {
alGenSources(1, &source);
... | Chainsawkitten/HymnToBeauty | src/Engine/Component/SoundSource.cpp | C++ | mit | 1,089 |
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homep... | jussiip/wamefork | Gruntfile.js | JavaScript | mit | 2,290 |
/**
* Using Rails-like standard naming convention for endpoints.
* GET /things -> index
* POST /things -> create
* GET /things/:id -> show
* PUT /things/:id -> update
* DELETE /things/:id -> destroy
*/
import {notFound, invalidData} from ... | fixjs/user-management-app | src/apis/user-group.api.js | JavaScript | mit | 3,703 |
<?php
namespace Korsmakolnikov\InternalBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Class DependencyFactory
* @package Korsmakolnikov\InternalBundle\DependencyInjection
*/
class DependencyFactory... | korsmakolnikov/InternalBundle | DependencyInjection/DependencyFactory.php | PHP | mit | 2,196 |
var express = require('express');
var app = express();
var uid = require('uid');
var databaseUrl = 'mongodb://dev:angular@ds047107.mongolab.com:47107/getitrightdev';
var collections = ['active_users'];
var db = require('mongojs').connect(databaseUrl, collections);
app.use(express.static('public'));
app.use(express.jso... | getitrightio/getitright-server | app/server.js | JavaScript | mit | 1,356 |
<?php
namespace Veta\HomeworkBundle\Controller;
use RedCode\TreeBundle\Controller\TreeAdminController;
class CategoryAdminController extends TreeAdminController
{
}
| eltrubetskaya/blog | src/Veta/HomeworkBundle/Controller/CategoryAdminController.php | PHP | mit | 168 |
// 74: String - `endsWith()`
// To do: make all tests pass, leave the assert lines unchanged!
var assert = require("assert");
describe('`str.endsWith(searchString)` determines whether `str` ends with `searchString`.', function() {
const s = 'el fin';
describe('1st parameter, the string to search for', function(... | jostw/es6-katas | tests/74-string-ends-with.js | JavaScript | mit | 2,438 |
# frozen_string_literal: true
require 'spec_helper'
module Steam
module Networking
describe Packet do
it 'requies a tcp body' do
expect do
Packet.new(nil)
end.to raise_error(RuntimeError)
expect do
Packet.new('')
end.to raise_error(RuntimeError)
en... | fastpeek/steam | spec/steam/networking/packet_spec.rb | Ruby | mit | 2,516 |
require 'spec_helper'
describe AridCache do
describe 'results' do
before :each do
Company.destroy_all
@company1 = Company.make(:name => 'a')
@company2 = Company.make(:name => 'b')
Company.class_caches do
ordered_by_name { Company.all(:order => 'name ASC') }
end
Company... | kjvarga/arid_cache | spec/arid_cache/arid_cache_spec.rb | Ruby | mit | 2,815 |
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define dump(x) cerr << #x << " = " << (x) << endl;
int n=16;
int a[16] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
int dp[100];
... | k-ori/algorithm-playground | src/dp/longest-increasing-subsequence/longest-increasing-subsequence-org.cpp | C++ | mit | 823 |
<?php
namespace Pandora\MainBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class PandoraMainBundle extends Bundle
{
}
| Kilo3/pandora | src/Pandora/MainBundle/PandoraMainBundle.php | PHP | mit | 130 |
package io.cucumber.core.backend;
/**
* Marks a glue class as being scenario scoped.
* <p>
* Instances of scenario scoped glue can not be used between scenarios and will
* be removed from the glue. This is useful when the glue holds a reference to a
* scenario scoped object (e.g. a method closure).
*/
public int... | cucumber/cucumber-jvm | core/src/main/java/io/cucumber/core/backend/ScenarioScoped.java | Java | mit | 742 |
var merge = require('merge');
var clone = require('clone');
var Field = require('./field');
var maxCounter = require('../mixins/max-counter');
module.exports = function() {
return merge.recursive(Field(), {
props: {
placeholder: {
type:String,
required:false,
default:''
},
disabled: ... | matfish2/vue-formular | lib/components/fields/textarea.js | JavaScript | mit | 2,395 |
package jnesulator.core.nes.audio;
public class TriangleTimer extends Timer {
private static int periodadd = 1;
private static int[] triangle = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 14, 13, 12, 11, 10, 9,
8, 7, 6, 5, 4, 3, 2, 1, 0 };
private int divider = 0;
public TriangleTimer() {
pe... | thomas-kendall/jnesulator | jnesulator-core/src/main/java/jnesulator/core/nes/audio/TriangleTimer.java | Java | mit | 1,785 |
<?php
namespace Ghw\UserBundle\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use FOS\UserBundle\Controller\RegistrationController as BaseController;
class LoginController extends BaseController
{
public function loginAction()
{
$request = $this->container->get('request');
... | deuxnids/Wiloma | src/Ghw/UserBundle/Controller/LoginController.php | PHP | mit | 1,652 |
import i18n from 'mi18n'
import Sortable from 'sortablejs'
import h, { indexOfNode } from '../common/helpers'
import dom from '../common/dom'
import { ANIMATION_SPEED_SLOW, ANIMATION_SPEED_FAST } from '../constants'
import { merge } from '../common/utils'
const defaults = Object.freeze({
type: 'field',
displayType... | Draggable/formeo | src/js/components/panels.js | JavaScript | mit | 9,240 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiscordSharp.Commands
{
public abstract class IModule
{
/// <summary>
/// The name of the module.
/// </summary>
public virtual string Name { get; set; ... | Luigifan/DiscordSharp | DiscordSharp.Commands/IModule.cs | C# | mit | 1,662 |
/*
* Copyright (c) 2012 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, ... | s2js/probes | test/stats/mean-test.js | JavaScript | mit | 3,493 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("01... | ni4ka7a/TelerikAcademyHomeworks | DataStructuresAndAlgorithms/05.AdvancedDataStructures/01.PriorityQueueImplementation/Properties/AssemblyInfo.cs | C# | mit | 1,436 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RevStack.Client.API.Membership
{
public interface IValidation
{
void Validate(Object obj);
bool IsValid { get; }
Exception Exception { get; }
Validation... | MISInteractive/revstack-net | src/REVStack.Client/API/Membership/IValidation.cs | C# | mit | 359 |
/**
* Copyright (c) 2010 by Gabriel Birke
*
* 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, ... | kurbmedia/transit-legacy | app/assets/javascripts/libs/sanitize.js | JavaScript | mit | 9,555 |
export default {
actions: {
edit: '編集',
save: 'セーブ',
cancel: 'キャンセル',
new: '新しい',
list: 'リスト',
},
}
| HospitalRun/hospitalrun-frontend | src/shared/locales/ja/translations/actions/index.ts | TypeScript | mit | 156 |
const router = require('express').Router()
const albumsQueries = require('../../db/albums')
const albumsRoutes = require('./albums')
const usersQueries = require('../../db/users')
const usersRoutes = require('./users')
const reviewsQueries = require('../../db/reviews')
const {getSimpleDate} = require('../utils')
route... | hhhhhaaaa/phase-4-challenge | src/server/routes/index.js | JavaScript | mit | 4,027 |
# Abstract model
class Abstract < ActiveRecordShared
belongs_to :study_subject, :counter_cache => true
with_options :class_name => 'User', :primary_key => 'uid' do |u|
u.belongs_to :entry_1_by, :foreign_key => 'entry_1_by_uid'
u.belongs_to :entry_2_by, :foreign_key => 'entry_2_by_uid'
u.belongs_to :merged_by,... | ccls/ccls_engine | app/models/abstract.rb | Ruby | mit | 5,798 |
package com.tehreh1uneh.cloudstorage.common.messages.files;
import com.tehreh1uneh.cloudstorage.common.messages.base.Message;
import com.tehreh1uneh.cloudstorage.common.messages.base.MessageType;
import java.io.File;
import java.util.ArrayList;
public class FilesListResponse extends Message {
private final Arra... | tehreh1uneh/CloudStorage | common/src/main/java/com/tehreh1uneh/cloudstorage/common/messages/files/FilesListResponse.java | Java | mit | 701 |
class PagesController < ApplicationController
def home
@emptyphoto = Photo.new
@top5 = Photo.popular
end
end | jannewaren/toukoaalto_generator | app/controllers/pages_controller.rb | Ruby | mit | 126 |
require "active_record"
require "authem/token"
module Authem
class Session < ::ActiveRecord::Base
self.table_name = :authem_sessions
belongs_to :subject, polymorphic: true
before_create do
self.token ||= Authem::Token.generate
self.ttl ||= 30.days
self.expires_at ||= ttl_from_now
... | rwz/authem2 | lib/authem/session.rb | Ruby | mit | 784 |
require 'rails_helper'
include OmniauthHelpers
describe Users::SignIn do
describe '#call' do
it 'returns object with user_id and organisation_id' do
auth = create_auth
sign_in = Users::SignIn.new(auth: auth)
membership = sign_in.call
expect(membership.user_id).to eq(User.first.id)
... | netguru/props | spec/services/sign_in_spec.rb | Ruby | mit | 1,728 |
using System;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using NSubstitute;
using PactNet.Mocks.MockHttpService;
using PactNet.Mocks.MockHttpService.Models;
using PactNet.Mocks.MockHttpService.Validators;
using PactNet.Models... | mvdbuuse/pact-net | PactNet.Tests/PactVerifierTests.cs | C# | mit | 27,525 |
<?php
/*
* This file is part of the TraitorBundle, an RunOpenCode project.
*
* (c) 2017 RunOpenCode
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RunOpenCode\Bundle\Traitor\Traits;
use Symfony\Component\EventDispatche... | RunOpenCode/traitor-bundle | src/RunOpenCode/Bundle/Traitor/Traits/EventDispatcherAwareTrait.php | PHP | mit | 734 |
let path = require('path');
let glob = require('glob');
let fs = require('fs');
let net = require('net');
let webpack = require('webpack');
let HtmlWebpackPlugin = require('html-webpack-plugin');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
let slash = require('slash');
let autoprefixer = require("au... | IveChen/saber-cli | build/util.js | JavaScript | mit | 6,228 |
<?php
/**
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/
namespace UserFrosting\Sprinkle\Core\Throttle;
/**
* ThrottleRule Class
*
* Represen... | splitt3r/UserFrosting | app/sprinkles/core/src/Throttle/ThrottleRule.php | PHP | mit | 4,106 |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.List;
/**
* Created by liuxz on 17-3-19.
*/
public class Leet54SpiralMatrix {
public List<Integer> spiralOrder(int[][] matrix) {
List<Integer> res = new ArrayList<>();
int n = matrix.le... | LiuXiaozeeee/OnlineJudge | src/Leet54SpiralMatrix.java | Java | mit | 1,600 |
<?php
require_once("support/config.php");
if(!isLoggedIn()){
toLogin();
die();
}
if(!AllowUser(array(1))){
redirect("index.php");
}
$to_do="";
// var_dump($_GET['id']);
// die;
if(!empty($_GET['id'])){
$to_do=$con->myQuery("SELECT ev.stat_id,ev.event_s... | sgtsi-jenny/crmv2 | frm_to_do.php | PHP | mit | 10,845 |
import React from 'react';
import { Image, Text, View } from 'react-native';
import Example from '../../shared/example';
const Spacer = () => <View style={{ height: '1rem' }} />;
const Heading = ({ children }) => (
<Text
accessibilityRole="heading"
children={children}
style={{ fontSize: '1rem', fontWeig... | necolas/react-native-web | packages/examples/pages/text/index.js | JavaScript | mit | 15,012 |
package org.wycliffeassociates.translationrecorder.project;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by sarabiaj on 4/17/2017.
*/
public class TakeInfo implements Parcelable {
ProjectSlugs mSlugs;
int mChapter;
int mStartVerse;
int mEndVerse;
int mTake;
public... | WycliffeAssociates/translationRecorder | translationRecorder/app/src/main/java/org/wycliffeassociates/translationrecorder/project/TakeInfo.java | Java | mit | 5,206 |
def ReadLines(filename):
content = []
with open(filename) as f:
content = [x.rstrip() for x in f.readlines()]
return content
| aawc/cryptopals | sets/1/challenges/common/read_lines.py | Python | mit | 136 |
const ACCOUNTS = [
'all',
'default',
'kai-tfsa',
'kai-rrsp',
'kai-spouse-rrsp',
'kai-non-registered',
'kai-charles-schwab',
'crystal-non-registered',
'crystal-tfsa',
'crystal-rrsp',
'crystal-spouse-rrsp'
];
export default ACCOUNTS; | kaiguogit/growfolio | client/src/constants/accounts.js | JavaScript | mit | 276 |
package charlotte.tools;
import java.util.Arrays;
import java.util.List;
public class QueueData<T> {
private LinkNode<T> _top;
private LinkNode<T> _last;
private int _count;
public QueueData(T[] entries) {
this(Arrays.asList(entries));
}
public QueueData(List<T> entries) {
this();
for(T entry : entries... | stackprobe/Java | charlotte/tools/QueueData.java | Java | mit | 1,092 |
using Nucleus.Logs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nucleus.Game
{
/// <summary>
/// Interface for components, status effects, items etc. that
/// modify critical hit chance
/// </summary>
public interfac... | pnjeffries/Nucleus | Nucleus/Nucleus.Game/Components/ICritChanceModifier.cs | C# | mit | 617 |