repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
DailyGrind/Chain-Reaction
client/src/state/players/actions/creators.js
374
import action from 'src/state/action'; import t from './types'; export const nextPlayer = () => ({ type: t.GET_NEXT_PLAYER }); export const updateCurrentPlayer = current => action(t.SET_CURRENT_PLAYER, { current }); export const playerIsBot = () => action(t.PLAYER_IS_BOT, { isBot: true }); export const playerIsHuman...
mit
astrapi69/bundle-app-ui
src/main/java/io/github/astrapi69/bundle/app/spring/rest/HttpResponseExtensions.java
2100
package io.github.astrapi69.bundle.app.spring.rest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.List; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http...
mit
davidepedone/spring-social-sample
src/main/java/it/dpedone/social/controller/PostController.java
795
package it.dpedone.social.controller; import org.springframework.social.facebook.api.PagePostData; import org.springframework.social.facebook.api.impl.FacebookTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.a...
mit
teoreteetik/api-snippets
rest/subaccounts/voice-example/subaccount-call.6.x.py
551
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account sub_account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" sub_auth_token = "your_auth_token" sub_account_client = Client(sub_account_sid, sub_auth_token) ...
mit
nekikara/book
perfect_ruby.rb
433
#! /usr/bin/env ruby # coding: utf-8 ######### block ########## # 繰り返し以外に用いられるブロック def write_with_lock File.open 'time.txt', 'w' do |f| f.flock File::LOCK_EX yield f f.flock File::LOCK_UN end end write_with_lock do |f| f.puts.Time.now end ### キーワード引数 ### 仮引数の順序 ### alias: メソッドに別名を付ける # Karnel#pはデ...
mit
OnlyD/Agenda_ILM
src/Agenda_ILM/EstadoBundle/DependencyInjection/Configuration.php
878
<?php namespace Agenda_ILM\EstadoBundle\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://s...
mit
elliotcw/Journey
public/app/scripts/services/main.js
8445
'use strict'; angular.module('journey.services', []) .service('journeyService', function ($http) { this.getJourneyInfo = function (journeyOptions) { var params = { 'language': 'en', 'sessionID': 0, 'place_origin': 'London', 'type_origin': 'stop', 'name_origin': jou...
mit
Tresint/worldherb
forum/applications/core/interface/ckeditor/ckeditor/plugins/ipscontextmenu/lang/th.js
84
CKEDITOR.plugins.setLang("ipscontextmenu","th",{options:"Context Menu Options"});
mit
shinji-yoshida/Lockables
src/Lockables/AndLockStatus.cs
790
using System; using UniRx; using System.Collections.Generic; using System.Linq; namespace Lockables { public class AndLockStatus : LockStatus { List<LockStatus> statuses = new List<LockStatus>(); bool locked; Subject<bool> lockUpdatedSubject = new Subject<bool>(); public void Add(LockStatus status) { sta...
mit
x0156/gh-stats
src/app/stats/traffic/traffic.component.ts
823
import { Component, OnInit,Input } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { StatsService } from 'app/services/stats.service'; @Component({ selector: 'app-traffic', templateUrl: './traffic.component.html', styleUrls: ['./traffic.component.css'] }) export class TrafficComponent i...
mit
cordoval/rollerworks-datagrid
tests/DatagridViewTest.php
6558
<?php /* * This file is part of the RollerworksDatagrid package. * * (c) Sebastiaan Stok <s.stok@rollerscapes.net> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Rollerworks\Component\Datagrid\Tests; use Rollerworks\Component\Datagr...
mit
trademachines/ecd
spec/lambda/core/config-modifiers.spec.ts
4473
import { DecryptSecureValuesConfigModifier, EnvironmentFromHashConfigModifier, PortMappingFromStringConfigModifier } from '../../../src/lambda/core/config-modifiers'; describe('Config modifications', () => { describe('modify environment vars', () => { let envFromHashModifier; beforeEach(() => { envF...
mit
maiha/ircbot
lib/ircbot/client/eventable.rb
471
module Ircbot class Client include Extlib::Hook class << self def event(name, &block) name = "on_#{name}".intern unless instance_methods.include?(name.to_s) define_method(name){|m|} end before name, &block end end # escape from nil black hole ...
mit
hardikhirapara91/java-se-core
002_Comments/Documentation/DocCommentDemo/src/main/java/com/hardik/javase/App.java
416
package com.hardik.javase; /** * Java Documentation Comment Example * * The documentation comment is used to create documentation API. To create * documentation API, you need to use javadoc tool. * * @author HARDIK HIRAPARA */ public class App { /** * This is main method of App class * * @param args ...
mit
GalacticGlum/memescraper
src/googlememe_scraper.py
1674
from bs4 import BeautifulSoup import requests import urllib import time import json import link_shortener class GoogleMemeScraper(): def __init__(self): self.header = { 'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36" } self.baseUrl = "...
mit
paulot/NodeVector
node-0.12.0/deps/v8/src/heap/spaces.cc
101579
// Copyright 2011 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/v8.h" #include "src/base/platform/platform.h" #include "src/full-codegen.h" #include "src/heap/mark-compact.h" #include "src/macro-assemb...
mit
powmedia/update-props
mongoose-plugin.js
348
/** * Plugin for Mongoose * * Usage: * schema.plugin(updatePropsPlugin); * ... * (From within a model method:) * this.updateProps(attrs, allowedKeys) */ var update = require('./index.js'); module.exports = function(schema) { schema.methods.updateProps = function(attrs, allowedKeys) { return update(this, ...
mit
SkillSmart/ConferenceManagementSystem
UserManagement/migrations/0011_auto_20170309_1206.py
3567
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-09 11:06 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('UserManagement', '0010_auto_20170305_2040'), ] ope...
mit
tapomayukh/projects_in_python
classification/Classification_with_HMM/Single_Contact_Classification/Variable_Stiffness_Variable_Velocity/HMM/with 0.8s/hmm_crossvalidation_force_10_states.py
27332
# Hidden Markov Model Implementation import pylab as pyl import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy as scp import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu import hrl_lib.viz ...
mit
jwlockhart/socialinsignificance
js/math.js
2807
/** * math functions used by the site. Almost all borrowed and slightly modified from other sources. */ /** * given the json descriptions for each group's distribution * generates data for plotting the probability density functions (bell curves) */ function gen_data(json, x){ var data = {}; //create a vari...
mit
todorm85/TelerikAcademy
Projects/VoiceShoppingList/VoiceShoppingList/app/src/main/java/com/telerik/academy/voiceshoppinglist/utilities/speech/MenuSpeechListener.java
2825
package com.telerik.academy.voiceshoppinglist.utilities.speech; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.speech.SpeechRecognizer; import android.widget.TextView; import android.widget.Toast; import com.telerik.academy.voiceshoppinglist.R; import com.telerik....
mit
scentuals-natural-organic-skincare/scentuals
.modman/seo_suite_ultimate/app/code/community/MageWorx/XSitemap/Block/Adminhtml/Xsitemap.php
642
<?php /** * MageWorx * MageWorx XSitemap Extension * * @category MageWorx * @package MageWorx_XSitemap * @copyright Copyright (c) 2015 MageWorx (http://www.mageworx.com/) */ class MageWorx_XSitemap_Block_Adminhtml_Xsitemap extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __constr...
mit
c910335/GHShop
view/artist.html.php
1420
<table class="table table-hover"> <thead> <tr> <th>#</th> <th>作者</th> </tr> </thead> <?php for($i = 0 ; isset($_['artist'][$i]) ; $i++): ?> <tr <?php if(! ($i % 2)) echo ' class="success"' ; ?>> <td> <div class="artistAnchor" id="<?php echo $_['artist'][$i]['Name'] ...
mit
Qiyue-Lin/ecpim-mobile
src/js/code-behind/PrdOrCoSearchCodeBehind.js
5433
/** * Created by ceprei2598 on 2016/5/9. */ define(['text!../html/PrdOrCoSearchView.html','config', 'CompanyDetailViewCodeBehind', 'jquery', 'jquerymobile'], function (PrdOrCoSearch, config, CompanyDetailViewCodeBehind, $) { var PrdOrCoSearchCodeBehind = function () { var self = this; this.do...
mit
Laylan/E-sim
www/app/inbox/messages/writeMessage/write-message.controller.js
1960
(function () { 'use strict'; angular .module('write-message.module') .controller('WriteMessageController', WriteMessageController); WriteMessageController.$inject = ['$scope', '$ionicScrollDelegate', '$stateParams', 'Toast', 'WriteMessageData', 'MessagesData']; /* @ngInject */ function WriteMessage...
mit
Azure/azure-sdk-for-java
sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/src/test/java/com/azure/spring/cloud/config/stores/KeyVaultClientTest.java
7926
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.spring.cloud.config.stores; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.times; import static...
mit
crafn/clover
code/source/visual/armatureattachment_def.hpp
811
#ifndef CLOVER_VISUAL_ARMATUREATTACHMENT_DEF_HPP #define CLOVER_VISUAL_ARMATUREATTACHMENT_DEF_HPP #include "build.hpp" #include "util/objectnodetraits.hpp" #include "util/optional.hpp" #include "util/transform.hpp" #include "util/string.hpp" namespace clover { namespace visual { struct ArmatureAttachmentDef { usin...
mit
rocketnia/mvtron
src/main/groovy/com/rocketnia/mvtron/analyzer/ISceneDetector.java
190
// ISceneDetector.java // // Copyright 2009, 2010 Ross Angle package com.rocketnia.mvtron.analyzer; public interface ISceneDetector { public double measureDistance( int[] p, int[] n ); }
mit
GrUSP/opencfp
tests/Integration/Http/Controller/ForgotControllerTest.php
2391
<?php declare(strict_types=1); /** * Copyright (c) 2013-2019 OpenCFP * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. * * @see https://github.com/opencfp/opencfp */ namespace OpenCFP\Test\Integration\Http\Controller; use OpenCFP\Do...
mit
phpManufakturHeirs/kfEvent
Control/Backend/Subscribe.php
22892
<?php /** * Event * * @author Team phpManufaktur <team@phpmanufaktur.info> * @link http://www.phpmanufaktur.info/de/kitframework/erweiterungen/event.php * @copyright 2013 Ralf Hertsch <ralf.hertsch@phpmanufaktur.de> * @license MIT License (MIT) http://www.opensource.org/licenses/MIT */ namespace phpManufaktur\...
mit
JornWildt/ZimmerBot
ZimmerBot.Core/Utilities/StringTemplateErrorHandler.cs
790
using Antlr4.StringTemplate; using Antlr4.StringTemplate.Misc; using log4net; namespace ZimmerBot.Core.Utilities { // Avoid error output to console // - Especially relevant when allowing using of undefined attributes in templates. public class StringTemplateErrorHandler : ITemplateErrorListener { ...
mit
rockwotj/PieServer
test_scripts/get_test.py
1982
import re import socket HOST = '127.0.0.1' # The remote host PORT = 8080 # The same port as used by the server ### TEST HELPER METHODS ### def ormap(func, seq): result = False booleans = map(func, seq) for b in booleans: result = bool(b) or result return result def andmap(fun...
mit
joekhoobyar/cardiac
spec/rails-3.2/app_root/config/environments/test.rb
449
CardiacTest::Application.configure do config.cache_classes = true config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" config.whiny_nils = true config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_dispatch.show_exc...
mit
mikolalysenko/regl
www/gallery/tile.min.js.js
118006
(function e$$0(u,y,c){function f(e,m){if(!y[e]){if(!u[e]){var b="function"==typeof require&&require;if(!m&&b)return b(e,!0);if(h)return h(e,!0);b=Error("Cannot find module '"+e+"'");throw b.code="MODULE_NOT_FOUND",b;}b=y[e]={exports:{}};u[e][0].call(b.exports,function(b){var c=u[e][1][b];return f(c?c:b)},b,b.exports,e$...
mit
damianh/LimitsMiddleware
src/LimitsMiddleware.Tests/MaxUrlLengthTests.cs
1973
namespace LimitsMiddleware { using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; using Microsoft.Owin.Builder; using Owin; using Shouldly; using Xunit; public class MaxUrlLengthTests { [Fact] public async Task When_max_urlLength_...
mit
AlloyTeam/Nuclear
components/icon/esm/date-range.js
305
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z" }), 'DateRange');
mit
RedHatQE/mgmtsystem
wrapanapi/entities/__init__.py
568
""" wrapanapi.entities """ from .template import Template, TemplateMixin from .vm import Vm, VmState, VmMixin from .instance import Instance from .physical_container import PhysicalContainer from .stack import Stack, StackMixin from .server import Server, ServerState from .network import Network, NetworkMixin from .vo...
mit
pocky/person
src/Black/Component/Person/Domain/Model/Person.php
2237
<?php namespace Black\Component\Person\Domain\Model; use Black\DDD\DDDinPHP\Domain\Model\Entity; use Email\EmailAddress; /** * Class Person */ class Person implements Entity { /** * @var PersonId */ protected $personId; /** * @var Name */ protected $name; /** * @var E...
mit
42wim/matterircd
config/config.go
595
package config import ( "fmt" "runtime" "strings" "github.com/sirupsen/logrus" "github.com/spf13/viper" ) var Logger *logrus.Entry func LoadConfig(cfgfile string) (*viper.Viper, error) { v := viper.New() v.SetConfigFile(cfgfile) v.SetEnvPrefix("matterircd") v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"...
mit
devacto/grobot
Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/index.go
4547
// Copyright 2012-2015 Oliver Eilhard. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package elastic import ( "encoding/json" "fmt" "net/url" "github.com/devacto/grobot/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2...
mit
fran93/TresEnRayas
routes/bot.js
2241
//Router const express = require('express'); const router = express.Router(); exports.router = router; const Game = require('../models/game'); //sesiones const usersRouter = require('./users'); //Solo se le manda al usuario la vista del tablero, el resto se hace con socket.io router.get('/', usersRouter.ensureAuthent...
mit
justcarakas/forkcms
src/Modules/MediaGalleries/Domain/MediaGallery/StatusDBALType.php
316
<?php namespace ForkCMS\Modules\MediaGalleries\Domain\MediaGallery; use ForkCMS\Core\Domain\Doctrine\ValueObjectDBALType; use Stringable; final class StatusDBALType extends ValueObjectDBALType { protected function fromString(string $value): Stringable { return Status::fromString($value); } }
mit
mtils/xtype
src/XType/Casting/Contracts/TypeProvider.php
383
<?php namespace XType\Casting\Contracts; /** * A TypeProvider is a central place to store the types **/ interface TypeProvider { /** * Returns an object describing the type of $attribute of $modelClass * * @param string $modelClass * @param string $attribute * @return \XType\AbstractType...
mit
fondbot/framework
tests/Unit/Templates/Keyboard/UrlButtonTest.php
658
<?php declare(strict_types=1); namespace FondBot\Tests\Unit\Templates\Keyboard; use FondBot\Tests\TestCase; use FondBot\Templates\Keyboard\UrlButton; class UrlButtonTest extends TestCase { public function test() { $label = $this->faker()->word; $url = $this->faker()->url; $parameters...
mit
dbrugne/ftp-nanny
webpack.init.js
160
const host = window.location.host.split(':')[0]; __webpack_public_path__ = `http://${host}:8080/`; __webpack_require__.p = __webpack_public_path__ + 'bundles/';
mit
siddhartham/mangoapps
e2e/app.e2e-spec.ts
309
import { MangoappsPage } from './app.po'; describe('mangoapps App', () => { let page: MangoappsPage; beforeEach(() => { page = new MangoappsPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });
mit
MeTooThanks/Perceptron
PerceptronOrGate.java
4204
import java.io.*; public class PerceptronOrGate { public static void main(String[] args) { OutputPerceptron output = new OutputPerceptron(); InputPerceptron input1 = new InputPerceptron(output, null); InputPerceptron input2 = new InputPerceptron(output, input1.getInputPerceptrons()); InputPerceptron[...
mit
weshaggard/corefxlab
src/System.Text.Formatting/GenerateCompatibilityTests/Program.cs
7494
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.IO; class Program { static Random random = new Random(1000); static void Main(string[] args) ...
mit
FubarDevelopment/FtpServer
samples/TestFtpServer.Shell/Commands/ExitCommandHandler.cs
1396
// <copyright file="ExitCommandHandler.cs" company="Fubar Development Junker"> // Copyright (c) Fubar Development Junker. All rights reserved. // </copyright> using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace TestFtpServer.Shell.Commands { /// <su...
mit
adrianbu/renderdoc
renderdoc/replay/replay_output.cpp
24153
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2015-2016 Baldur Karlsson * Copyright (c) 2014 Crytek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (t...
mit
wgertler/wgertler.github.io
MathJax-master/unpacked/localization/vi/MathML.js
3056
/************************************************************* * * MathJax/localization/vi/MathML.js * * Copyright (c) 2009-2018 The MathJax Consortium * * 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 c...
mit
AILanguages/WebClients
PatTuring2016.MVC5Web/Models/ManageViewModels.cs
2667
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Microsoft.AspNet.Identity; using Microsoft.Owin.Security; namespace PatTuring2016.MVC5Web.Models { public class IndexViewModel { public bool HasPassword { get; set; } public IList<UserLoginInfo> Logins { get; ...
mit
hitnoodle/Animu-Torrent-Checker
Classes/Models/Animu.cs
3104
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.IO; namespace AnimuTorrentChecker.Models { public class Animu { public string Title; public int Episode; // Assume max episode is 99 (two digits) public st...
mit
muziyoshiz/admiral_stats
app/models/special_ship_master.rb
1509
# 特別デザインのカードに関するマスタデータ class SpecialShipMaster < ApplicationRecord belongs_to :ship_master, foreign_key: :book_no, primary_key: :book_no # 追加されたカードの図鑑 No. validates :book_no, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 1, ...
mit
vgrem/phpSPO
src/SharePoint/Sharing/PermissionCollection.php
1145
<?php /** * Modified: 2019-10-12T20:10:10+00:00 API: 16.0.19402.12016 */ namespace Office365\SharePoint\Sharing; use Office365\Runtime\ClientValue; /** * This class * is returned when * Microsoft.SharePoint.Client.Sharing.SecurableObjectExtensions.GetSharingInformation * is called with the optional expand o...
mit
mattloper/opendr
opendr/test_camera.py
2453
#!/usr/bin/env python # encoding: utf-8 """ Author(s): Matthew Loper See LICENCE.txt for licensing and contact information. """ import unittest import numpy as np from .camera import * import chumpy as ch class TestCamera(unittest.TestCase): def get_cam_params(self): v_raw = np.sin(np.arange(90...
mit
Porterbg/FileSystemASP
FileSystem/FileSystem.Models/Image.cs
415
using System; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; namespace FileSystem.Models { public class Image { [Key] public int Id { get; set; }...
mit
chennqqi/goutils
consul.v2/app.go
5191
package consul import ( "errors" "fmt" "io/ioutil" "log" "net" "net/url" "os" "os/signal" "reflect" "strings" "github.com/chennqqi/goutils/closeevent" "github.com/chennqqi/goutils/utils" "github.com/chennqqi/goutils/yamlconfig" "gopkg.in/yaml.v2" ) type ConsulApp struct { *ConsulO...
mit
dmayhak/HyperSlackers.Localization
Localization/Attributes/MinValueAttribute.cs
3170
using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using HyperSlackers.Localization.Extensions; namespace HyperSlackers.Localization { /// <summary> ...
mit
davidteoran/freecodecamp-projects
intermediate-algorithm-scripting/pig_latin.js
1231
/* Translate the provided string to pig latin. Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay". If a word begins with a vowel you just add "way" to the end. Input strings are guaranteed to be English words in all lowercase. */ funct...
mit
easybiblio/easybiblio
server/person.php
3958
<?php include_once '_header.mandatory.php'; $fmw->checkOperator(); include '_header.php'; ?> <h1><?= $t->__('db.person') ?></h1> <?php $id = $_GET['id']; if ($id != '') { $columns = $database->get("tb_person", "*", array("id" => $id)); } ?> <form class="form-horizontal" action="personSave.php" ...
mit
kodefuguru/bungie
src/Bungie.Tests/Wrappers/AbstractMessage.cs
366
namespace Bungie.Tests.Wrappers { internal abstract class AbstractMessage<T> { public T Response { get; set; } public int ErrorCode { get; set; } public int ThrottleSeconds { get; set; } public string ErrorStatus { get; set; } public string Message { get; set; } p...
mit
nrvru/dummy-api-exercise
services/object_service.js
1466
var _ = require('lodash'); var fdb = require('../data/fake_db'); var rawObject; function getProperties(objects, cb){ var properties = []; _.forEach(objects, function(object){ _.forEach(object.properties, function(value, key){ properties.push(key); }); }); properties = _...
mit
zachmargolis/interjectable
spec/interjectable/rspec_spec.rb
10983
# frozen_string_literal: true require 'spec_helper' class Klass extend Interjectable inject(:dependency) { :dependency } inject_static(:static_dependency) { :static_dependency } define_method(:foo) { :foo } end SubKlass = Class.new(Klass) SubSubKlass = Class.new(SubKlass) describe "RSpec test helper #test_i...
mit
DavidHickman/ahps_alerts
setup.py
1690
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'feedparser', 'bea...
mit
SebastianoF/LabelsManager
examples/prototype_symmetrise_a_segmentation.py
2395
import os from os.path import join as jph import a_generate_phantoms_for_examples as gen from nilabels.agents.agents_controller import AgentsController as NiL from nilabels.definitions import root_dir # ---- GENERATE DATA ---- if not os.path.exists(jph(root_dir, 'data_examples', 'ellipsoids.nii.gz')): creation...
mit
sly01/ojs
tests/functional/plugins/generic/lucene/FunctionalLucenePluginBaseTestCase.inc.php
4265
<?php /** * @file tests/functional/plugins/generic/lucene/FunctionalLucenePluginBaseTestCase.inc.php * * Copyright (c) 2000-2013 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @class FunctionalLucenePluginBaseTestCase * @ingroup tests_functional_plugins_generic_...
mit
nano-byte/common
src/UnitTests/Dispatch/PerTypeDispatcherTest.cs
2046
// Copyright Bastian Eicher // Licensed under the MIT License namespace NanoByte.Common.Dispatch; /// <summary> /// Contains test methods for <see cref="PerTypeDispatcher{TBase,TResult}"/>. /// </summary> public class PerTypeDispatcherTest { private abstract class Base {} private class Sub1 ...
mit
utarahman/berita
application/models/News.php
787
<?php class News extends CI_Model { public function tampil_data_news($kode) { if ($kode=='all'){ $hasil=$this->db->get('tabel_news'); }else{ $this->db->where('kode_news',$kode); $hasil=$this->db->get('tabel_news'); } return $hasil->result(); } public function simpan_d...
mit
drumminhands/drumminhands_photobooth
drumminhands_photobooth.py
13012
#!/usr/bin/env python # created by chris@drumminhands.com # see instructions at http://www.drumminhands.com/2014/06/15/raspberry-pi-photo-booth/ import os import glob import time import traceback from time import sleep import RPi.GPIO as GPIO import picamera # http://picamera.readthedocs.org/en/release-1.4/install2.ht...
mit
yemrekeskin/IdentityKey
IdentityKey/IdentityKey/Areas/Admin/AdminAreaRegistration.cs
568
using System.Web.Mvc; namespace IdentityKey.Areas.Admin { public class AdminAreaRegistration : AreaRegistration { public override string AreaName { get { return "Admin"; } } public override void RegisterArea(AreaRegistrati...
mit
DAddYE/lipsiadmin
lib/view/helpers/ext/store.rb
3606
module Lipsiadmin#:nodoc: module Ext#:nodoc: # Generate a new Ext.data.GroupingStore # # Examples: # # var store = new Ext.data.GroupingStore({ # reader: new Ext.data.JsonReader({ # id:'id', # totalProperty:'count', root:'results', # fields:[{ # na...
mit
tiramizoo/oxid-plugin
copy_this/modules/oxtiramizoo/application/controllers/admin/oxtiramizoo_category_tab.php
3546
<?php /** * This file is part of the oxTiramizoo OXID eShop plugin. * * LICENSE: This source file is subject to the MIT license that is available * through the world-wide-web at the following URI: * http://opensource.org/licenses/mit-license.php * * @category module * @package oxTiramizoo * @author Tiram...
mit
KaberMohamed/Symfony2015
src/Qcm/SalleTpBundle/QcmSalleTpBundle.php
128
<?php namespace Qcm\SalleTpBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class QcmSalleTpBundle extends Bundle { }
mit
net7/Dyno
javascripts/dyno.jquery.js
8782
/// Copyright (c) 2010 Net7 SRL, <http://www.netseven.it/> /// This Software is released under the terms of the MIT License /// See LICENSE.TXT for the full text of the license. (function($) { $.fn.dyno = function(settings) { var rowPrototype = null; /// Sources found during rendering, used to disp...
mit
LanternPowered/LanternServer
src/main/java/org/lanternpowered/server/data/io/UserIO.java
4955
/* * Lantern * * Copyright (c) LanternPowered <https://www.lanternpowered.org> * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * This work is licensed under the terms of the MIT License (MIT). For * a copy, see 'LICENSE.txt' or <https://opensource.org/licenses/MIT>. ...
mit
gdott9/the_moderator
spec/the_moderator/moderation_model_spec.rb
1102
require 'spec_helper' describe TheModerator::ModerationModel do subject do page = Page.new(name: 'Name', content: 'Content') moderation = page.moderate(:name) page.save moderation end describe '#accept' do it 'accepts moderated data' do expect(subject.moderatable.name).to be_nil ...
mit
FacticiusVir/SharpVk
src/SharpVk/Interop/NVidia/Experimental/VkPhysicalDeviceGetGeneratedCommandsPropertiesDelegate.gen.cs
1637
// The MIT License (MIT) // // Copyright (c) Andrew Armstrong/FacticiusVir 2020 // // 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 r...
mit
andreas-eberle/settlers-remake
jsettlers.logic/src/main/java/jsettlers/logic/movable/strategies/specialists/PioneerStrategy.java
4937
/******************************************************************************* * Copyright (c) 2015 - 2017 * * 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...
mit
scottohara/tvmanager
cypress/support/series.ts
114
export const seriesName = "#seriesName"; export const nowShowing = "#nowShowing"; export const moveTo = "#moveTo";
mit
smoogipoo/osu
osu.Game/Rulesets/Edit/Checks/CheckAudioInVideo.cs
4140
// 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 System.Collections.Generic; using System.IO; using osu.Game.IO.FileAbstraction; using osu.Game.Rulesets.Edit.Checks.Components; using osu.Game.Storyboards; using Ta...
mit
reflectoring/coderadar
coderadar-vcs/src/test/java/io/reflectoring/coderadar/adapter/ComputeContributorAdapterTest.java
2800
package io.reflectoring.coderadar.adapter; import io.reflectoring.coderadar.domain.Contributor; import io.reflectoring.coderadar.domain.DateRange; import io.reflectoring.coderadar.vcs.adapter.ComputeContributorAdapter; import java.io.File; import java.io.IOException; import java.net.URL; import java.time.LocalDate; im...
mit
cs169-bizworld/bizworld-app
app/models/classroom.rb
2121
class Classroom < ActiveRecord::Base belongs_to :teacher has_many :students attr_accessible :class_type, :end_date, :name, :program, :start_date, :link, :short_link validates_presence_of :teacher, :class_type, :name TEST_URLS = {'pre' => 'https://docs.google.com/forms/d/18fGk0NX-z_Slad4WvlpPQFAugEsRoyVqpcscx...
mit
AmineEch/BrainCNN
brainNetCNN.py
3075
from __future__ import print_function, division import matplotlib.pyplot as plt plt.interactive(False) import tensorflow as tf import h5py from scipy.stats import pearsonr from keras.models import Sequential from keras.layers import Convolution2D from keras.layers import Dense, Dropout, Flatten from keras.layers.advan...
mit
cccqcn/php
svnhook_async/update-ftp.php
7801
<?php //----------------------------- // ¸Ã°æ±¾ÎªÒì²½ÉÏ´«£¬¸ÃÎļþÓÐftpÉÏ´«Ê§°ÜÈÝ´í£¬½«±£´æºÃµÄsvn¸üмǼÉÏ´«µ½ftp //----------------------------- // ³õʼ»¯ÉèÖà //----------------------------- date_default_timezone_set('PRC'); require_once("post-commit-param.php"); $config = unserialize(file_get_contents(...
mit
indus/gluex
src/test.ts
4953
'use strict'; declare var describe; declare var it; var expect = require('chai').expect; var fs = require('fs-extra'); var gluex = require('../index'); describe('#REGEX', function () { var REGEX = gluex.REGEX; it('should find HTML comment', function () { var ns = undefined; var file = `file....
mit
PagerDuty/whazzup
spec/app_spec.rb
2621
ENV['RACK_ENV'] = 'test' require 'app' require 'rspec' require 'rack/test' describe 'Galera health check' do include Rack::Test::Methods def app Whazzup.new end def db_client @db_client ||= Mysql2::Client.new(Whazzup.connection_settings) end before do Whazzup.set(:wsrep_state_dir, 'spec/dat...
mit
CS2103JAN2017-W14-B4/main
src/test/java/seedu/ezdo/storage/XmlFileStorageTest.java
1057
package seedu.ezdo.storage; import java.io.File; import java.io.FileNotFoundException; import javax.xml.bind.JAXBException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import mockit.Mock; import mockit.MockUp; import mockit.integration.jun...
mit
cold-brew-coding/protagonist
src/v8_wrapper.cc
2148
#include "v8_wrapper.h" using namespace v8; using namespace protagonist; // Forward declarations static Local<Value> v8_wrap_null(); static Local<Value> v8_wrap_string(const std::string& value); static Local<Value> v8_wrap_number(double value); static Local<Value> v8_wrap_boolean(bool value); static Local<Value> v8_w...
mit
urasandesu/Prig.Samples
12.ThreeOrMoreOutRef/ThreeOrMoreOutRefTest/Properties/AssemblyInfo.cs
1418
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("Th...
mit
hecateball/mastodon4j
src/main/java/mastodon4j/entity/ClientCredential.java
1344
package mastodon4j.entity; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * * @author hecateball */ @XmlRootElement @XmlAccessorType(XmlA...
mit
umutozel/QueryableProjector
QueryableProjector.Tests/Model/Company.cs
168
namespace QueryableProjector.Tests.Model { public abstract class Company { public int Id { get; set; } public string Name { get; set; } } }
mit
aileisun/bubbleimg
bubbleimg/obsobj/test/test_obsobj.py
2121
# test_obsobj.py # ALS 2017/05/16 import pytest import os import shutil from ..obsobj import obsObj ra = 150.0547735 dec = 12.7073027 dir_obj = './testing/SDSSJ1000+1242/' dir_parent = './testing/' @pytest.fixture(scope="module", autouse=True) def setUp_tearDown(): """ rm ./testing/ and ./test2/ before and after...
mit
kassisdion/Android-animated-toolbar
app/src/main/java/com/kassisdion/animatedToolbar/demo/activity/MainActivity.java
874
package com.kassisdion.animatedToolbar.demo.activity; import com.kassisdion.animatedToolbar.R; import com.kassisdion.animatedToolbar.demo.fragment.MainActivityFragment; import com.kassisdion.lib.toolbar.AnimatedToolbar; import android.os.Bundle; import butterknife.Bind; public class MainActivity extends BaseAppComp...
mit
jonaseck2/staxtest
src/main/java/Demo.java
2404
import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.util.Stack; import java.util.stream.Collectors; import javax.xml.namespace.QName; import javax.xml.stream.XMLEventFactory; import javax.xml.stream.XMLEventReader; import javax.xml.stream.X...
mit
Valpineware/ValpineCompiler
Src/Tests/.Ext/Graph.cpp
4384
#include "Graph.h" namespace ext { Statement* addStatement(Block &block, Statement *statement) { block.appendStatement(statement); return statement; } Preprocessor* addPreprocessor(Block &block, Preprocessor *preprocessor) { block.appendStatement(preprocessor); return preprocessor; } Class* addClass...
mit
dnna/petdate
src/PD/UserBundle/Wantlet/ORM/PointStr.php
890
<?php namespace PD\UserBundle\Wantlet\ORM; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\Lexer; /** * POINT_STR function for querying using Point objects as parameters * * Usage: POINT_STR(:param) where param should be mapped to $point where $point is \PD\UserBundle\Wantlet\ORM\Point *...
mit
martintito/desaeka
src/Jaxxes/RavenBundle/Entity/RavenBaremoAdulto.php
3425
<?php namespace Jaxxes\RavenBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * RavenBaremoAdulto * * @ORM\Table() * @ORM\Entity */ class RavenBaremoAdulto { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ ...
mit
mikeschinkel/learning-backbonejs-best-practices
js/src/layer-addition-form.js
773
/** * layer-addition-form.js - */ app.LayerAdditionForm = Backbone.View.extend({ viewType: "LayerAdditionForm", tagName: 'form', template: _.template(app.loadTemplate('layer-addition-form')), contentTypesSelect: false, layoutsSelect: false, addLayerButton: new app.AddLayerButton(), initialize: function(options...
mit
ufhy/Formstone
src/js/equalize.js
4265
;(function ($, Formstone, undefined) { "use strict"; /** * @method private * @name resize * @description Handles window resize */ function resize(windowWidth) { Functions.iterate.call($Instances, resizeInstance); } /** * @method private * @name cacheInstances * @description Cac...
mit