repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
aasiutin/electrum | plugins/trezor/qt_generic.py | 24505 | from functools import partial
import threading
from PyQt4.Qt import Qt
from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton
from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL
from electrum_gui.qt.util import *
from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC
from ..hw_wallet.qt import QtHandlerBase, QtPlugi... | mit |
ashmaroli/jekyll-plus | lib/jekyll-plus.rb | 1015 | require "jekyll"
require "jekyll-plus/version"
require_relative "jekyll/commands/new_site"
require_relative "jekyll/commands/extract_theme"
# Plugins
require "jekyll-data" # read "_config.yml" and data files within a theme-gem
# ------------------------------ Temporary Patches ------------------------------
# TODO:
#... | mit |
lsaFreedev/Portfolio | app/cache/dev/annotations/4ca0c3fa9d8720c7c2c0dc5656cd9e5aafc7a71e$school.cache.php | 262 | <?php return unserialize('a:1:{i:0;O:27:"Doctrine\\ORM\\Mapping\\Column":9:{s:4:"name";s:6:"school";s:4:"type";s:6:"string";s:6:"length";N;s:9:"precision";i:0;s:5:"scale";i:0;s:6:"unique";b:0;s:8:"nullable";b:0;s:7:"options";a:0:{}s:16:"columnDefinition";N;}}'); | mit |
jmcaffee/admin_module | spec/lib/admin_module/rulesets_spec.rb | 2306 | require 'spec_helper'
describe AdminModule::Rulesets do
context "api" do
let(:rs_list) { ['TstRuleset1', 'TstRuleset2'] }
let(:rulesets_page_stub) do
obj = double('rulesets_page')
allow(obj).to receive(:get_rulesets).and_return(rs_list)
allow(obj).to receive(:open_ruleset).and_return(obj... | mit |
IDCI-Consulting/StepBundle | Navigation/NavigatorType.php | 4944 | <?php
/**
* @author: Gabriel BONDAZ <gabriel.bondaz@idci-consulting.fr>
* @license: MIT
*/
namespace IDCI\Bundle\StepBundle\Navigation;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\F... | mit |
IT-Berater/TWRestUmgebung | src/main/java/de/wenzlaff/umgebung/resource/Mindmap.java | 223 | package de.wenzlaff.umgebung.resource;
import org.restlet.resource.Get;
/**
* Das Interface für die Mindmap.
*
* @author Thomas Wenzlaff
*
*/
public interface Mindmap {
@Get
public MindmapModell getMindmap();
}
| mit |
PedrosWits/smart-cameras | smartcameras/test/test_azure.py | 1568 | import smartcameras.azurehook
import mock
import time
azure = smartcameras.azurehook.AzureHook()
def test_constructor():
assert azure.serviceBus.service_namespace == 'middle-earth'
def test_pupsub():
test_topic = "TESTING_TOPIC"
azure.createTopic(test_topic)
azure.publish(test_topic, "Hello")
s... | mit |
papyLaPlage/Ripple | Assets/Scripts/MyGUIManager.cs | 1893 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.EventSystems;
public enum eGUIScreen
{
E_None,
E_Greyscale,
E_MainTitle,
E_MainMenu,
E_LevelSelect,
E_Credits,
E_InGame,
E_Pause
}
public class MyGUIManager : MonoBehaviour
{
public s... | mit |
YoannDupont/SEM | sem/modules/label_consistency.py | 19226 | #-*- coding:utf-8 -*-
"""
file: label_consistency.py
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
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 restr... | mit |
andremourato/programacao | programacao-3/guiao4/ex3/aula4_e3/VideoClube.java | 3581 | package aula4_e3;
import java.util.*;
public class VideoClube {
private UserList users = new UserList();
private VideoList videos = new VideoList();
private int movieLimit;
public VideoClube(int N) {
movieLimit = N;
}
public void addUser(Utilizador student) {
users.addUser(student);
}
public void... | mit |
akhilpm/Masters-Project | UMKL/textData/getdata_20NG.py | 3671 | '''
KPCA based feature engineering for 20-newsgroup document classification
Author : Akhil P M
Kernel used : Arc-cosine Kernel
'''
from settings import *
import kernel
def size_mb(docs):
return sum(len(s.encode('utf-8')) for s in docs) / 1e6
def trim(s):
"""Trim string to fit on terminal (assuming 80-column displ... | mit |
ublaboo/api-router | src/Exception/ApiRouteWrongPropertyException.php | 153 | <?php
declare(strict_types=1);
namespace Contributte\ApiRouter\Exception;
use Exception;
class ApiRouteWrongPropertyException extends Exception
{
}
| mit |
9swampy/NEventStoreExample | NEventStoreExample.Infrastructure/Tests/SimpleDomain/SimpleAggregateUpdated.cs | 435 | namespace NEventStoreExample.Infrastructure.Tests.SimpleDomain
{
using System;
using System.Linq;
using NEventStoreExample.Infrastructure;
public class SimpleAggregateUpdated : DomainEvent
{
public SimpleAggregateUpdated(Guid aggregateID, int originalVersion, DateTime lastUpdate) : base(aggregateID, ori... | mit |
byllyfish/libofp | test/ofp/setasync_unittest.cpp | 1501 | // Copyright (c) 2015-2018 William W. Fisher (at gmail dot com)
// This file is distributed under the MIT License.
#include "ofp/setasync.h"
#include "ofp/asyncconfigproperty.h"
#include "ofp/unittest.h"
using namespace ofp;
const OFPPacketInFlags kPacketInFlags =
static_cast<OFPPacketInFlags>(0x11111112);
const... | mit |
gaal/shstat | internal/lib.go | 2051 | package internal
import (
"flag"
"fmt"
"os"
"regexp"
"strconv"
)
// AtoiList runs strconv.Atoi on every element in nums. If this fails it
// returns the first error encountered.
func AtoiList(nums []string) ([]int, error) {
var res []int
for _, v := range nums {
n, err := strconv.Atoi(v)
if err != nil {
... | mit |
nickhsine/keystone | admin/server/api/cloudinary.js | 1630 | var cloudinary = require('cloudinary');
var keystone = require('../../../');
module.exports = {
upload: function (req, res) {
if (req.files && req.files.file) {
var options = {};
if (keystone.get('wysiwyg cloudinary images filenameAsPublicID')) {
options.public_id = req.files.file.originalname.substring(... | mit |
ramonh/sunshine-app | app/src/main/java/com/example/ramonh/sunshine/app/SettingsActivity.java | 2846 | package com.example.ramonh.sunshine.app;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
/**
* A {@link PreferenceActivity} that presents a set of application settings.... | mit |
reactjs/react-codemod | transforms/__testfixtures__/create-element-to-jsx-preserve-comments.output.js | 793 | var React = require('react');
const render = () => {
return (
/*1*//*4*//*2*//*3*/<div
/*8*/className/*9*/=/*10*/"foo"/*11*/
/*12*/
/*13*///17
onClick/*14*/={/*15*/ this.handleClick}/*16*/>
{/*19*///25
<TodoList.Item />/*24*//*20*//*23*//*21*//*22*//*20*//*23*//*21*//*22*//*21... | mit |
opendata-heilbronn/poetryslam | src/modules/admin/EntityUtils.js | 412 | (function () {
'use strict';
angular.module('psadmin').service('EntityUtils', function () {
this.getUid = function () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
... | mit |
dnshi/Leetcode | algorithms/BinaryTreeInorderTraversal.js | 1192 | // Source : https://leetcode.com/problems/binary-tree-inorder-traversal
// Author : Dean Shi
// Date : 2017-02-27
/***************************************************************************************
*
* Given a binary tree, return the inorder traversal of its nodes' values.
*
* For example:
* Given binary t... | mit |
innogames/gitlabhq | app/controllers/passwords_controller.rb | 2138 | # frozen_string_literal: true
class PasswordsController < Devise::PasswordsController
skip_before_action :require_no_authentication, only: [:edit, :update]
before_action :resource_from_email, only: [:create]
before_action :check_password_authentication_available, only: [:create]
before_action :throttle_reset,... | mit |
Steffkn/ASP.NET | MVC/BlogSystem/Source/Web/Blog.Web/Controllers/AccountController.cs | 17912 | namespace Blog.Web.Controllers
{
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Blog.Data.Models;
using Blog.Web.ViewModels.Account;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
... | mit |
CrustyJew/OwinOAuthProviders | Owin.Security.Providers/Properties/AssemblyInfo.cs | 1423 | 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("Ow... | mit |
farpostdesign/activeadmin-dropzone | app/helpers/active_admin/view_helpers/dropzone_helper.rb | 786 | module ActiveAdmin::ViewHelpers::DropzoneHelper
def dropzone_object_title dropzone_object
title = dropzone_object.send(dropzone_object.class.dropzone_field(:title))
if title.present?
title.squish
else
''
end
end
def render_mock_dropzone_files dropzone_objects
dropzone_objects.map... | mit |
darkless456/Python | 循环语句_无限循环.py | 149 | # 无限循环
var = 1
while var == 1:
num = input ("Enter a number : ")
print("You entered: ", num)
print("Good bye!")
| mit |
mjeanroy/junit-servers | junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/client/impl/async/AsyncHttpResponse.java | 3710 | /**
* The MIT License (MIT)
*
* Copyright (c) 2014-2022 <mickael.jeanroy@gmail.com>
*
* 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 ... | mit |
yoshuawuyts/base-package-json | test.js | 774 | const concat = require('concat-stream')
const test = require('tape')
const pkg = require('./')
test('should create a base package.json', function (t) {
t.plan(1)
pkg().pipe(concat({ object: true }, function (arr) {
const obj = arr[0]
t.deepEqual(obj, {
name: '<name>',
version: '1.0.0',
s... | mit |
jsGiven/jsGiven | examples/jest-node-8/parameter-formatting.parametrized.test.js | 721 | import {
scenario,
scenarios,
setupForRspec,
Stage,
buildParameterFormatter,
} from 'js-given';
import { sum } from './sum';
setupForRspec(describe, it);
const LoudFormatter = bangCharacter =>
buildParameterFormatter(text => text.toUpperCase() + `${bangCharacter}`);
class MyStage extends Stage {
@Loud... | mit |
nsarno/knock | test/dummy/app/controllers/vendor_token_controller.rb | 61 | class VendorTokenController < Knock::AuthTokenController
end
| mit |
thoughtram/blog | gatsby/src/pages/404.js | 986 | import React from "react"
import { Link, graphql } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
class NotFoundPage extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
return (
<Layout locati... | mit |
AideTechBot/expo | pi/gps.py | 1734 | #!/usr/bin/env python
"""
GPS.PY
v.2
written by: Manuel Dionne
credit to: the internet
"""
import time
import os
import urllib2
from subprocess import *
fname = "send.wav"
baud = "1000"
pos = "300_600"
identifier = 1
def internet_on():
try:
response=urllib2.urlopen('http://74.125.228.... | mit |
NeonWilderness/f5skin2day | src/js/app/directives/index.js | 269 | 'use strict';
/**
* Browserify all directives
*
*/
require('angular')
.module('f5SkinApp')
.directive('convertcss', [require('./convertcss')])
.directive('encode', [require('./encode')])
.directive('resizable', ['$window', require('./resizable')]); | mit |
skyostil/tracy | src/analyzer/TraceOperationsTest.py | 3155 | # Copyright (c) 2011 Nokia
#
# 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, publish, distribu... | mit |
gisele-tool/gisele-vm | spec/unit/kernel/runner/test_stack.rb | 642 | require 'spec_helper'
module Gisele
class VM
class Kernel
describe Runner, "stack" do
it 'pushes at the end' do
runner.stack = [:hello]
runner.push :world
runner.stack.should eq([:hello, :world])
end
it 'pops from the end' do
runner.stack = [... | mit |
geometryzen/davinci-eight | build/module/lib/math/Vector4.js | 6442 | import { __extends } from "tslib";
import { Coords } from '../math/Coords';
/**
* @hidden
*/
var Vector4 = /** @class */ (function (_super) {
__extends(Vector4, _super);
/**
* @param data Default is [0, 0, 0, 0] corresponding to x, y, z, and w coordinate labels.
* @param modified Default is false.
... | mit |
chriswilley/leash | leash/run.py | 92 | from leash import app
if (__name__) == '__main__':
app.run(host='0.0.0.0', port=5000)
| mit |
Drillster/drillster-api | src/main/java/com/drillster/api2/invoice/InvoiceRecipient.java | 887 | package com.drillster.api2.invoice;
import com.drillster.api2.user.Organization;
public class InvoiceRecipient {
private String name;
private String emailAddress;
private String vatNumber;
private Organization organization;
public InvoiceRecipient setName(String name) { this.name = name; return this; }
public... | mit |
claytuna/pixlogic-c5 | application/blocks/pix_tabs/view.php | 2524 | <?php defined('C5_EXECUTE') or die("Access Denied.");
$c = Page::getCurrentPage();?>
<div class="tabs-row">
<div class="tabs-row__title-group">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 class="tabs-row__title"><?php print $tabTitle ?></h2>
</div>
</div>
... | mit |
mindsnacks/Zinc | src/zinc/archives.py | 1085 | import os
import tarfile
import tempfile
import zinc.utils as utils
import zinc.helpers as helpers
from zinc.formats import Formats
def build_archive_with_manifest(manifest, src_dir, dst_path, flavor=None):
files = manifest.get_all_files(flavor=flavor)
with tarfile.open(dst_path, 'w') as tar:
for ... | mit |
nicky-lenaers/ngx-scroll-to | projects/ngx-scroll-to/src/lib/scroll-to.directive.spec.ts | 3076 | import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { ScrollToModule } from './scroll-to.module';
import { ScrollToDirective } from './scroll-to.directive';
import { ScrollToService } from './scroll-to.service';
import { DEFAU... | mit |
AcademiaBinaria/SemillaBinaria | src/client/lib/services/usersDataService.js | 2585 | import * as angular from 'angular'
import * as ngrs from 'angular-resource'
import * as ngstorage from 'ngstorage'
const name = 'usersDataService'
function theService($localStorage, $resource, $q, $rootScope) {
var User = $resource(
'/api/users/:id',
{
id: '@_id'
},
{... | mit |
jmurty/xml4h | xml4h/impls/lxml_etree.py | 19913 | import re
import copy
from xml4h.impls.interface import XmlImplAdapter
from xml4h import nodes, exceptions
try:
from lxml import etree
except ImportError:
pass
class LXMLAdapter(XmlImplAdapter):
"""
Adapter to the `lxml <http://lxml.de>`_ XML library implementation.
"""
SUPPORTED_FEATURES =... | mit |
GMaiolo/remove-w3schools | scripts/remover.js | 4036 | (function() {
var W3SchoolsRemover = {
currentUrl: {},
constants: {
queries: {
result_links: '.g div > a[href*="www.w3schools.com"]',
link_parent_node: '#rso div.g',
main_google_node: 'main'
},
events: {
... | mit |
Masa331/pohoda | lib/pohoda/parsers/stk/categories_type.rb | 402 | module Pohoda
module Parsers
module Stk
class CategoriesType
include ParserCore::BaseParser
def id_category
array_of_at(String, ['stk:idCategory'])
end
def to_h
hash = {}
hash[:attributes] = attributes
hash[:id_category] = id_categor... | mit |
tangrams/mapillary-explorer | node_modules/mapillary-js/src/utils/Settings.ts | 470 | import {IViewerOptions} from "../Viewer";
export class Settings {
private static _baseImageSize: number;
public static setOptions(options: IViewerOptions): void {
if (options.baseImageSize) {
Settings._baseImageSize = options.baseImageSize;
} else {
Settings._baseImageS... | mit |
takaruz/Schema2XML | lib/driver/postgres.php | 5544 | <?php
/**
* File: postgres.php
*
* PHP version 5
*
* @category Backend
* @package Driver
* @author Pongpat Poapetch <p.poapetch@gmail.com>
* @license The MIT License (MIT) Copyright (c) 2014 takaruz
* @version GIT: master In development. Very unstable.
* @link https://github.com/takaruz/Sc... | mit |
afroraydude/First_Unity_Game | Real_Game/Assets/Scripts/WebFileLoader.cs | 351 | using UnityEngine;
using System.Collections;
using System.Xml;
using System.IO;
public class WebFileLoader : MonoBehaviour {
public WWW www;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public IEnumerator GetURL (string url) {
www = new WWW (ur... | mit |
CSALucasNascimento/Personal-APP | modules/listings/client/admin/controllers/dashboard-listings.client.admin.controller.js | 819 | (function () {
'use strict';
angular
.module('listings.admin.controllers')
.config(['$mdIconProvider', function ($mdIconProvider) {
$mdIconProvider.icon('md-close', 'modules/core/client/common/assets/angular-material-assets/img/icons/ic_close_24px.svg', 24);
}])
.controller('ListingsDashboar... | mit |
Nylle/JavaFixture | src/main/java/com/github/nylle/javafixture/annotations/testcases/ReflectedTestCase.java | 1835 | package com.github.nylle.javafixture.annotations.testcases;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static java.util.Arrays.stream;
publi... | mit |
AlienArc/VegasBluff | src/Bluff/_kindOfMagic.cs | 128 | using System;
namespace Bluff
{
public class MagicAttribute:Attribute{}
public class NoMagicAttribute:Attribute{ }
} | mit |
ztane/jaspyx | jaspyx/visitor/variable.py | 1563 | from __future__ import absolute_import, division, print_function
import _ast
from jaspyx.builtins import BUILTINS
from jaspyx.visitor import BaseVisitor
class Variable(BaseVisitor):
def visit_Name(self, node):
scope = self.stack[-1].scope
global_scope = scope.get_global_scope()
if isinsta... | mit |
moccalotto/hayttp | src/Exceptions/Response/ContentTypeException.php | 383 | <?php
/**
* This file is part of the Hayttp package.
*
* @author Kim Ravn Hansen <moccalotto@gmail.com>
* @copyright 2018
* @license MIT
*/
namespace Hayttp\Exceptions\Response;
use Hayttp\Exceptions\ResponseException;
/**
* Http connection exception.
*
* Thrown when the response has an invalid content typ... | mit |
ma2gedev/chrono_logger | lib/chrono_logger.rb | 4000 | require "chrono_logger/version"
require 'logger'
require 'pathname'
# A lock-free logger with timebased file rotation.
class ChronoLogger < Logger
# @param logdev [String, IO] `Time#strftime` formatted filename (String) or IO object (typically STDOUT, STDERR, or an open file).
# @example
#
# ChronoLogger.ne... | mit |
drebrez/DiscUtils | Library/DiscUtils.Nfs/Nfs3SetTimeMethod.cs | 142 | namespace DiscUtils.Nfs
{
public enum Nfs3SetTimeMethod
{
NoChange = 0,
ServerTime = 1,
ClientTime = 2
}
} | mit |
imdeakin/yunxi-admin | src/app/admin/msg/index.ts | 109 | /**
* Created by Deakin on 2017/5/22 0022.
*/
export * from './msg-list';
export * from './feedback-list';
| mit |
TinkuNaresh/symfony2 | app/cache/dev/twig/99/f7/f3ebf62bfc974696afd9420644563b9a9492c9a543b3e03f906c5479ddd6.php | 2966 | <?php
/* SensioDistributionBundle::Configurator/steps.html.twig */
class __TwigTemplate_99f7f3ebf62bfc974696afd9420644563b9a9492c9a543b3e03f906c5479ddd6 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this... | mit |
MaxMorgenstern/DynDNS-Updater | dyndns updater/Properties/Resources.Designer.cs | 6137 | //------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut gener... | mit |
HasanSa/hackathon | node_modules/radium-grid/lib/index.js | 478 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Cell = exports.Grid = undefined;
var _grid = require("./components/grid");
var _grid2 = _interopRequireDefault(_grid);
var _cell = require("./components/cell");
var _cell2 = _interopRequireDefault(_cell);
function _interopRequi... | mit |
Nvt2106/angular2-code-template | app/login/googlelogin.component.ts | 2721 | import { Component, ApplicationRef } from '@angular/core';
import { Router } from '@angular/router';
import { AuthenticationService } from '../_services/authentication.service';
import { AppContainerComponent } from '../app-container.component';
// Google's login API namespace
declare const gapi:any;
@Component({
... | mit |
creyke/Orleans.Sagas | Orleans.Sagas.Samples.Activities/ChewBubblegumActivity.cs | 470 | using System.Threading.Tasks;
namespace Orleans.Sagas.Samples.Activities
{
public class ChewBubblegumActivity : IActivity
{
public Task Execute(IActivityContext context)
{
// comment in to test compensation.
//throw new AllOuttaGumException();
return Task.Co... | mit |
fulmicoton/tantivy | src/query/phrase_query/phrase_scorer.rs | 8898 | use docset::{DocSet, SkipResult};
use fieldnorm::FieldNormReader;
use postings::Postings;
use query::bm25::BM25Weight;
use query::{Intersection, Scorer};
use DocId;
struct PostingsWithOffset<TPostings> {
offset: u32,
postings: TPostings,
}
impl<TPostings: Postings> PostingsWithOffset<TPostings> {
pub fn n... | mit |
steindornatorinn/nyaa | util/log/logger.go | 3237 | package log
import (
"net/http"
"os"
"github.com/NyaaPantsu/nyaa/config"
"github.com/Sirupsen/logrus"
lumberjack "gopkg.in/natefinch/lumberjack.v2"
)
// LumberJackLogger : Initialize logger
func LumberJackLogger(filePath string, maxSize int, maxBackups int, maxAge int) *lumberjack.Logger {
return &lumberjack.L... | mit |
dvsa/mot | mot-web-frontend/module/Vehicle/src/Vehicle/CreateVehicle/Factory/Action/MakeActionFactory.php | 929 | <?php
namespace Vehicle\CreateVehicle\Factory\Action;
use DvsaCommon\Auth\MotAuthorisationServiceInterface;
use Vehicle\CreateVehicle\Action\MakeAction;
use Vehicle\CreateVehicle\Service\CreateVehicleStepService;
use Zend\ServiceManager\Factory\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use I... | mit |
icefox0801/jaguarjs-jsdoc | Gruntfile.js | 3527 | /**
* http://gruntjs.com/configuring-tasks
*/
module.exports = function (grunt) {
var path = require('path');
var DEMO_PATH = 'demo/dist';
var DEMO_SAMPLE_PATH = 'demo/sample';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
options: {
... | mit |
SetBased/py-kerapu | kerapu/boom/boom_parameter/BoomParameter.py | 778 | import abc
from kerapu.lbz.Subtraject import Subtraject
class BoomParameter:
"""
Abstracte klasse voor boomparameters.
"""
# ------------------------------------------------------------------------------------------------------------------
@abc.abstractmethod
def tel(self, waarde, subtraject... | mit |
PiotrDabkowski/Js2Py | tests/test_cases/built-ins/RegExp/S15.10.2.6_A1_T2.js | 1405 | // Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The production Assertion :: $ evaluates by returning an internal
AssertionTester closure that takes a State argument x and performs the ...
es5id: 15.10.2.6_A1_T2
de... | mit |
pwnall/sphero_pwn | test/session_test.rb | 429 | require_relative './helper.rb'
describe SpheroPwn::Session do
describe '#valid_checksum?' do
it 'works on a correct example without data' do
assert_equal true, SpheroPwn::Session.valid_checksum?([0x00, 0x01, 0x01],
[], 0xfd)
end
it 'fails an incorrect example without data' do
asser... | mit |
plotly/plotly.py | packages/python/plotly/plotly/validators/indicator/gauge/axis/_dtick.py | 493 | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="dtick", parent_name="indicator.gauge.axis", **kwargs
):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | mit |
M3kH/tire-bouchon | node_modules/grunt-react/node_modules/react-tools/build/modules/ReactDOMIDOperations.js | 5957 | /**
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | mit |
venogram/ExpressiveJS | test-servers/mary-server.js | 757 | const usingExpressive = true;
const express = usingExpressive ? require('./../expressive.js') : require('express');
const app = express();
const cookieParser = require('cookie-parser');
//app.use(cookieParser);
app.listen(3000)
app.get('/', function(req, res) {
res.status(200).json({ name: 'VENOGRAM' });
});
app.ge... | mit |
kristenhazard/hanuman | db/migrate/20170120223424_add_gps_data_to_hanuman_observations.rb | 366 | class AddGpsDataToHanumanObservations < ActiveRecord::Migration
def change
add_column :hanuman_observations, :latitude, :float
add_column :hanuman_observations, :longitude, :float
add_column :hanuman_observations, :speed, :float
add_column :hanuman_observations, :direction, :float
add_column :hanu... | mit |
sivertsenstian/boom | source/code/boom/constants.js | 5699 | Boom.Constants = {
TRUE: '46e25702-b22f-4d18-a391-7f7e0bba137c',
FALSE: '1cf21342-39c3-4bf0-865c-d28f19448112',
PLAYER_CAMERA: null,
HOSTILE: '63fc00f3-416d-43db-9fcf-315ae62c01e9',
FRIENDLY: 'ba75d021-1988-4cbb-a6c5-05071b69572f',
UI: {
BASE_WIDTH:10,
HEIGHT: 0,
WIDTH: 0,
MOUSE_LOCKED: ... | mit |
Happyr/Doctrine-Specification | src/Operand/PlatformFunction/Executor/CurrentDateExecutor.php | 649 | <?php
declare(strict_types=1);
/**
* This file is part of the Happyr Doctrine Specification package.
*
* (c) Tobias Nyholm <tobias@happyr.com>
* Kacper Gunia <kacper@gunia.me>
* Peter Gribanov <info@peter-gribanov.ru>
*
* For the full copyright and license information, please view the LICENSE
* file th... | mit |
masonsbro/ea-competition | app/controllers/matches.server.controller.js | 111 | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
_ = require('lodash');
| mit |
kybarg/material-ui | docs/src/pages/components/progress/CustomizedProgressBars.tsx | 2154 | import React from 'react';
import { lighten, makeStyles, createStyles, withStyles, Theme } from '@material-ui/core/styles';
import CircularProgress, { CircularProgressProps } from '@material-ui/core/CircularProgress';
import LinearProgress from '@material-ui/core/LinearProgress';
const ColorCircularProgress = withStyl... | mit |
jessepeterson/commandment | ui/src/components/react-tables/DeviceCommandsTable.tsx | 1217 | import * as React from "react";
import ReactTable, {TableProps} from "react-table";
import {Command} from "../../store/device/types";
import {RelativeToNow} from "../react-table/RelativeToNow";
import {CommandStatus} from "../react-table/CommandStatus";
import {JSONAPIDataObject} from "../../store/json-api";
import {DE... | mit |
wingmingchan/php-cascade-ws-ns-examples | recipes/data_definition_blocks/replace_structured_data.php | 924 | <?php
/* This program shows how to replace the data definition associated
with a data definition block. In effect, the block will have a new
data container, with no data inside. For data mapping, see
https://github.com/wingmingchan/php-cascade-ws-ns-examples/tree/master/recipes/data_mapping
*/
require_once( 'auth_tuto... | mit |
astral-keks/vscode-folder-indexing | src/extension.ts | 971 | 'use strict'
import * as vscode from 'vscode'
import {ExtensionSettings} from './settings'
import {ExtensionCommands} from './commands'
import {ExtensionStatus} from './status'
import {IndexStorage} from './indexing/indexStorage'
import {FileSystem} from './indexing/fileSystem'
export function activate(context: vsco... | mit |
mre/the-coding-interview | problems/anagram-detection/anagram-detection.java | 1267 | import java.util.HashMap;
import java.util.Vector;
public class Anagram {
public static void main(String[] args) {
System.out.println(occurences("AdnBndAndBdaBn", "dAn"));
System.out.println(occurences("AbrAcadAbRa", "cAda"));
}
static int hash(String str) {
/*
* Map letters to prime numbers... the Jav... | mit |
SLongofono/448_Project4 | REKTUser.py | 11539 | ## @file REKTUser.py
# REKTUser
# @author Stephen Longofono
# @brief The user class for the recommendation system
# @details This file defines the User class which is used to generate and manipulate a user profile from
# their Spotify profile
import Mutators
import traceback
import Variance
import functools
im... | mit |
PuercoPop/EleccionesPeru | excerpt.py | 887 | #-*- coding:utf-8 -*-
from BeautifulSoup import BeautifulSoup
with open( 'test_cases/tmp_resultados.html', 'r') as f:
soup = BeautifulSoup( f.read() )
for item in soup.findAll('a'):
print item.attrs[0][1]
#print item
with open( 'test_cases/tmp_resultados.html', 'r') as f:
soup = Beautiful... | mit |
the-ress/vscode | src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts | 4833 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | mit |
LegiDrone/LegiDrone | src/FOS/UserBundle/Tests/EventListener/FlashListenerTest.php | 1278 | <?php
namespace FOS\UserBundle\Tests\EventListener;
use FOS\UserBundle\EventListener\FlashListener;
use FOS\UserBundle\FOSUserEvents;
use Symfony\Component\EventDispatcher\Event;
class FlashListenerTest extends \PHPUnit_Framework_TestCase
{
/** @var Event */
private $event;
/** @var FlashList... | mit |
erikzhouxin/CSharpSolution | NetSiteUtilities/AopApi/Domain/AlipayDataDataserviceBillDownloadurlQueryModel.cs | 960 | using System;
using System.Xml.Serialization;
namespace EZOper.NetSiteUtilities.AopApi
{
/// <summary>
/// AlipayDataDataserviceBillDownloadurlQueryModel Data Structure.
/// </summary>
[Serializable]
public class AlipayDataDataserviceBillDownloadurlQueryModel : AopObject
{
/// <summary>... | mit |
ReneSchwarzer/InventoryExpress | src/core/InventoryExpress/WebControl/ControlAppNavigationManufactor.cs | 1437 | using InventoryExpress.WebResource;
using WebExpress.Attribute;
using WebExpress.Html;
using WebExpress.Internationalization;
using WebExpress.UI.Attribute;
using WebExpress.UI.Component;
using WebExpress.UI.WebControl;
using WebExpress.WebApp.Components;
namespace InventoryExpress.WebControl
{
[Section(Section.A... | mit |
bebraw/taskist | demo/just_instant.js | 236 | #!/usr/bin/env node
var taskist = require('../');
var tasks = require('./tasks');
var config = require('./config');
main();
function main() {
taskist(config.tasks, tasks, {
instant: true,
series: true
});
}
| mit |
PaulGilchrist/OCIdeas | src/app/ocadmin-module/option-edit.component.ts | 2900 | import { Component } from '@angular/core';
// Data
import { CONFIG } from './data/config.data';
// Models
import { Option, OptionImage, OptionHeader, OptionCategory, OptionSubcategory, OptionAttribute, OptionAttributeSelection, OptionAttributeSelectionImage } from './models/option.model';
// Services
import { OCService... | mit |
Azure/azure-sdk-for-java | sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesListSamples.java | 1699 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.generated;
import com.azure.core.util.Context;
import com.azure.resourcemanager.network.models.FilterItems;
import com.a... | mit |
azat-co/react-quickly | spare-parts/rock-paper-scissors/client/main.js | 3395 | // import { Template } from 'meteor/templating';
// import { ReactiveVar } from 'meteor/reactive-var';
//
// import './main.html';
//
// Template.hello.onCreated(function helloOnCreated() {
// // counter starts at 0
// this.counter = new ReactiveVar(0);
// });
//
// Template.hello.helpers({
// counter() {
// ... | mit |
MobilityLabs/pdredesign-server | app/assets/javascripts/client/controllers/responses/ResponseQuestionCtrl.js | 2079 | (function() {
'use strict';
angular.module('PDRClient')
.controller('ResponseQuestionCtrl', ResponseQuestionCtrl);
ResponseQuestionCtrl.$inject = [
'$scope',
'$rootScope',
'$timeout',
'$stateParams',
'$location',
'Response',
'ResponseHelper'
];
function ResponseQuestionCtr... | mit |
Absike/sf2 | src/Ens/LoginBundle/EnsLoginBundle.php | 201 | <?php
namespace Ens\LoginBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class EnsLoginBundle extends Bundle
{
public function getParent() {
return 'FOSUserBundle';
}
}
| mit |
NetOfficeFw/NetOffice | Source/MSHTML/DispatchInterfaces/DispHTMLWindow2.cs | 33710 | using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.MSHTMLApi
{
/// <summary>
/// DispatchInterface DispHTMLWindow2
/// SupportByVersion MSHTML, 4
/// </summary>
[SupportByVersion("MSHTML", 4)]
[EntityType(EntityType.IsDispatchInterface), ... | mit |
PomeloFoundation/Pomelo.EntityFrameworkCore.MySql | src/EFCore.MySql/Query/Internal/MySqlDateTimeMemberTranslator.cs | 5942 | // Copyright (c) Pomelo Foundation. All rights reserved.
// Licensed under the MIT. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.En... | mit |
rebroad/bitcoin | src/qt/clientmodel.cpp | 10120 | // Copyright (c) 2011-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 "clientmodel.h"
#include "bantablemodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "peertablemodel.... | mit |
ohmygodvt95/wevivu | vendor/assets/components/moment/locale/pa-in.js | 4770 | //! moment.js locale configuration
//! locale : Punjabi (India) [pa-in]
//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typ... | mit |
atton16/bluerpc | lib/spec/http.js | 139 | 'use strict';
var BlueRPC = require('../../lib');
describe('HTTP', require('./tests.skip.js')(BlueRPC.Server.HTTP, BlueRPC.Client.HTTP)); | mit |
rubytobi/Design-it-like-Darwin-2.0 | Design-it-like-Darwin-2.0/BpmSolution/App_Start/FilterConfig.cs | 1404 | #region license
// MIT License
//
// Copyright (c) [2017] [Tobias Ruby]
//
// 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
/... | mit |
delete/jira-score | tests/src/auth.test.js | 595 | const auth = require('../../src/auth')
describe('auth method must return login:pass as base64', () => {
test('fellipe.user:123213 must return ZmVsbGlwZS51c2VyOjEyMzIxMw==', () => {
const actual = auth('fellipe.user', '123213')
const expected = 'ZmVsbGlwZS51c2VyOjEyMzIxMw=='
expect( actual )... | mit |
pushbullet/engineer | vendor/github.com/google/martian/har/har.go | 20169 | // Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | mit |
flumbee/mobiledb | src/MobileDB.Core/Common/ExpressiveAnnotations/Lexer.cs | 5731 | #region Copyright (C) 2014 Dennis Bappert
// The MIT License (MIT)
// Copyright (c) 2014 Dennis Bappert
// 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 wi... | mit |