repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
JaDogg/__py_playground | reference/sketchbook/lex/deriv2.py | 4558 | """
Regular expression matching, and incremental DFA construction, using
even-more-simplified and memoized Brzozowski derivatives.
Rather less clunky, but also less Pythonic, than deriv.py.
"""
from memo import memoize
def match(re, s):
for c in s:
re = re.deriv(c)
# (This redundant test lets us ... | mit |
fingo/urlopia | view.react/src/contexts/request-context/actions/createRequest.js | 3092 | import {getCurrentUser} from "../../../api/services/session.service";
import {pushSuccessNotification} from "../../../helpers/notifications/Notifications";
import {sendPostRequest} from "../../../helpers/RequestHelper";
import {CREATE_REQUEST_ACTION_PREFIX, CREATE_REQUEST_URL} from "../constants";
export const createR... | mit |
PulsarBlow/SuperMassive | src/SuperMassive/Helpers/XmlHelper.cs | 12026 | namespace SuperMassive
{
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System;
using System.Collections.Specialized;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
using System.Xml.Linq;
/// <summary>
/// DataCont... | mit |
SkillsFundingAgency/das-employerapprenticeshipsservice | src/SFA.DAS.EmployerFinance.UnitTests/Commands/RefreshPaymentDataTests/WhenIHAveCompletedProcessing.cs | 7492 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediatR;
using Moq;
using NServiceBus;
using NUnit.Framework;
using SFA.DAS.EmployerFinance.Commands.RefreshPaymentData;
using SFA.DAS.EmployerFinance.Data;
using SFA.DAS.EmployerFinance.Messages.Events;
using SFA.DA... | mit |
nestharus/JASS | Antlr/PreAntlr/src/compile/antlr/TestGrammar.java | 22556 | package compile.antlr;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.LinkedList;
import java.util.List;
import org.antlr.v4.... | mit |
aarongraham/mocha-dot-only | lib/onlyCallsSearch.js | 211 | 'use strict';
var esprima = require('esprima'),
fs = require('fs'),
utils = require('./utils.js');
function checkFolder(folderPath) {
return [];
}
module.exports = {
checkFolder: checkFolder
}; | mit |
atmanager/atmanager | src/ATManager/AtBundle/Entity/AtServicioTerceroRepository.php | 595 | <?php
namespace ATManager\AtBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* AtServicioTerceroRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class AtServicioTerceroRepository extends EntityRepository
{
public function findByServiciosPor... | mit |
nil1990/sheduling_admin | application/config/database.php | 4536 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
|... | mit |
Innmind/TimeContinuum | src/Earth/Timezone/America/Bahia.php | 293 | <?php
declare(strict_types = 1);
namespace Innmind\TimeContinuum\Earth\Timezone\America;
use Innmind\TimeContinuum\Earth\Timezone;
/**
* @psalm-immutable
*/
final class Bahia extends Timezone
{
public function __construct()
{
parent::__construct('America/Bahia');
}
}
| mit |
diminishedprime/.org | reading-list/seven_languages_in_seven_weeks/ruby/day_2_floating_down_from_the_sky.rb | 3787 | def tell_the_truth(options = {})
if options[:profession] == :lawyer
'it could be believed that this is almost certainly not false.'
else
true
end
end
tell_the_truth(profession: :lawyer)
tell_the_truth(prefession: :shipbuilder)
tell_the_truth
# Code Blocks and Yield
3.times { puts 'hiya there, kiddo' }
... | mit |
mieky/we-love-cake | server.ts | 245 | const express = require("express");
const app = express();
const HTTP_PORT = process.env.HTTP_PORT || 3000;
app.use(express.static(__dirname + "/build"));
app.listen(HTTP_PORT, () => {
console.log(`Listening to port ${HTTP_PORT}...`);
});
| mit |
anzev/hedwig | run_tests.py | 148 | import unittest
if __name__ == '__main__':
suite = unittest.TestLoader().discover('tests')
unittest.TextTestRunner(verbosity=2).run(suite)
| mit |
kubal5003/LegoCar | Android/app/src/main/java/pl/earduino/rclimoble/Shapes/SteeringWheel.java | 3283 | package pl.earduino.rclimoble.Shapes;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.opengl.GLUtils;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import javax.microedition.khronos.opengles.GL10;
import pl.... | mit |
lmarinov/Exercise-repo | Java_Advanced_2021/src/FunctionalProgramming/Lab/FilterByAge.java | 2754 | package FunctionalProgramming.Lab;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Scanner;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class FilterByAge {
public static void main(String[] args... | mit |
mavoweb/mavo | src/backend.github.js | 13964 | (function($, $$) {
let _ = Mavo.Backend.register(class Github extends Mavo.Backend {
id = "Github"
constructor (url, o) {
super(url, o);
this.permissions.on(["login", "read"]);
this.login(true);
}
update (url, o) {
super.update(url, o);
// Extract info for username, repo, branch, filepath from URL
... | mit |
javanigus/zabuun | dialogue/0020-school-life-help-from-a-classmate.php | 1530 | <!doctype html>
<html class="no-js" lang="">
<head>
<title>Zabuun - Learn Arabic for English Speakers</title>
<meta name="description" content="">
<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>
</head>
<body>
<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
<?php include $_SERVER... | mit |
alberthw/ruby | models/models.go | 942 | package models
import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
)
func init() {
initSqlite()
//initPostgresql()
orm.RegisterModel(new(Rubyconfig), new(Command), new(Reposetting), new(Filerepo), new(Devicesystemconfig), new(Devicehardwarec... | mit |
mdzurenko/just-gestures | JustGestures/ControlItems/UC_TP_doubleBtn.Designer.cs | 9264 | namespace JustGestures.ControlItems
{
partial class UC_TP_doubleBtn
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </su... | mit |
rigregs/ez-rules | ez-rules-core/src/test/java/com/opnitech/rules/core/test/engine/test_workflow/exchanges/Exchange2.java | 421 | package com.opnitech.rules.core.test.engine.test_workflow.exchanges;
/**
* @author Rigre Gregorio Garciandia Sonora
*/
public class Exchange2 {
private String value;
public Exchange2(String value) {
this.value = value;
// Default constructor
}
public String getValue() {
re... | mit |
nithinvnath/PAVProject | com.ibm.wala.core/src/com/ibm/wala/util/ref/CacheReference.java | 1898 | /*******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is avail... | mit |
ShaneStevenLei/laravel5-file-uploader | src/config/resumable/resumable.js | 37330 | /*
* MIT Licensed
* http://www.23developer.com/opensource
* http://github.com/23/resumable.js
* Steffen Tiedemann Christensen, steffen@23company.com
*/
(function(){
"use strict";
var Resumable = function(opts){
if ( !(this instanceof Resumable) ) {
return new Resumable(opts);
}
this.version = 1.0;... | mit |
uutils/coreutils | tests/by-util/test_relpath.rs | 4414 | use crate::common::util::*;
use std::borrow::Cow;
use std::path::Path;
struct TestCase<'a> {
from: &'a str,
to: &'a str,
expected: &'a str,
}
const TESTS: [TestCase; 10] = [
TestCase {
from: "A/B/C",
to: "A",
expected: "../..",
},
TestCase {
from: "A/B/C",
... | mit |
wizawu/1c | @types/jdk/org.w3c.dom.html.HTMLLabelElement.d.ts | 451 | declare namespace org {
namespace w3c {
namespace dom {
namespace html {
interface HTMLLabelElement extends org.w3c.dom.html.HTMLElement {
getForm(): org.w3c.dom.html.HTMLFormElement
getAccessKey(): java.lang.String
setAccessKey(arg0: java.lang.String | string): void
... | mit |
TechnicalBro/CraftBuildTools | craftbuildtools/utils/__init__.py | 2991 | import fnmatch
import os
from urllib.parse import urlsplit, urlparse
def save_python_script(script_folder, script_url):
import requests
if not os.path.exists(script_folder):
os.makedirs(script_folder)
script_name = get_filename(script_url)
script_data = requests.get(script_url).text
scr... | mit |
guided1/virgin-symfony-test | src/Virgin/ChannelApiBundle/DependencyInjection/Configuration.php | 890 | <?php
namespace Virgin\ChannelApiBundle\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 |
tzigy/TelerikAcademy | Homeworks/C#-OOP/HW_04_OOP_Principles _Part1/AnimalHierarchy/Models/Gender.cs | 124 | namespace AnimalHierarchy.Models
{
using System;
public enum Gender
{
Male,
Female
};
}
| mit |
suitejs/suitejs | packages/icons/src/md/image/MusicNote.js | 319 | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMusicNote(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 6v21.11c-1.18-.69-2.54-1.11-4-1.11-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8V14h8V6H24z" />
</IconBase>
);
}
export default MdMusicNote;
| mit |
indefinitelee/Learning | complete-intro-to-react/flow-typed/npm/jest_v20.x.x.js | 19985 | <<<<<<< HEAD
// flow-typed signature: 336a37cc59a5628d581d11f98d1d94ab
// flow-typed version: ef52b40a4e/jest_v20.x.x/flow_>=v0.33.x
type JestMockFn = {
(...args: Array<any>): any,
=======
// flow-typed signature: 5960ed076fe29ecf92f57584d68acf98
// flow-typed version: b2a49dc910/jest_v20.x.x/flow_>=v0.39.x
type Je... | mit |
amalajeyan/Jenkins | src/app/modules/countryList/components/country.list.item.component.ts | 366 | import { Component, Input } from '@angular/core';
import { country } from '../classes/country';
@Component({
selector: 'country-item',
template: `
<tr> <td [style.color] = "'red'"> {{ country.label }} </td>
<td> {{ country.value }} </td>
</tr>`
})
export class CountryListItemCompone... | mit |
adebar/PyOE1 | oe1.py | 2662 | import argparse
import datetime
import sys
import pandas as pd
import requests
BASE_URL = 'http://oe1.orf.at/programm/konsole/tag/'
DEFAULT_COLUMNS = ['time', 'title', 'info']
def get_oe1_program(date='20160423', offline=False):
if offline:
return _get_oe1_program_offline()
try:
url = BASE_U... | mit |
bacta/swg | couchbase-connector/src/main/java/com/ocdsoft/bacta/soe/data/couchbase/CouchbaseNetworkIdGenerator.java | 690 | package com.ocdsoft.bacta.soe.data.couchbase;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.ocdsoft.bacta.swg.shared.database.GameDatabaseConnector;
import com.ocdsoft.bacta.swg.shared.database.NetworkIdGenerator;
/**
* Created by kburkhardt on 2/23/14.
*/
@Singleton
public class C... | mit |
bryanhaines/InQuick | InQuick/InQuick/Models/ManageViewModels/RemoveLoginViewModel.cs | 340 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace InQuick.Models.ManageViewModels
{
public class RemoveLoginViewModel
{
public string LoginProvider { get; set; }
public string ProviderKey { ge... | mit |
achristodoulou/calendar | src/Today.php | 5680 | <?php
namespace Achristodoulou\Calendar;
/**
* Class Today
* @package Ac\Calendar
*/
class Today extends Day{
/**
* @var \DateTime
*/
protected $dateTime;
/**
* @var ListOfDates
*/
protected $publicHolidays;
/**
* @var TimeRange
*/
private $workingHours;
... | mit |
DavidCWebs/address | includes/class-address-deactivator.php | 596 | <?php
/**
* Fired during plugin deactivation
*
* @link http://dev-notes.eu
* @since 1.0.0
*
* @package Address
* @subpackage Address/includes
*/
/**
* Fired during plugin deactivation.
*
* This class defines all code necessary to run during the plugin's deactivation.
*
* @since 1.0.0
... | mit |
al-nenov/telerik-nodejs-tw | Offers App/test/browser/test.js | 881 | /* eslint-disable no-unused-expressions */
const { expect } = require('chai');
const { setupDriver } = require('./utils/setup-driver');
const webdriver = require('selenium-webdriver');
describe('Offers routes', () => {
let driver = null;
// let driver =
// new webdriver.Builder()
// .buil... | mit |
hellofresh/janus-dashboard | src/store/reducers/request.reducer.js | 496 | import {
REQUEST_START,
REQUEST_COMPLETE,
REQUEST_FAILURE
} from '../constants'
export const initialState = {
isFetching: false
}
export default function reducer (state = initialState, action) {
switch (action.type) {
case REQUEST_START: {
return {
...state,
isFetching: true
... | mit |
TylorS/cycle-snabbdom | test/browser/select.js | 4678 | 'use strict'
/* global describe, it */
let assert = require('assert')
let Cycle = require('@cycle/core')
let CycleDOM = require('../../src/index')
let Observable = require('rx').Observable
let {svg, div, p, span, h2, h3, h4, makeDOMDriver} = CycleDOM
function createRenderTarget (id = null) {
let element = document.c... | mit |
n-educatio-pl/TestBundle | src/Neducatio/TestBundle/Tests/DataFixtures/UniqueDependencyResolverForComponentWithOneChildShould.php | 601 | <?php
namespace Neducatio\TestBundle\Tests\DataFixtures;
/**
* Do sth.
*
* @covers Neducatio\TestBundle\DataFixtures\UniqueDependencyResolver
*/
class UniqueDependencyResolverForComponentWithOneChildShould extends UniqueDependencyResolverTestCase
{
/**
* Do sth.
*
* @test
*/
public function returnA... | mit |
OptionalLanguor/ihcNucleoPedagogico | application/controllers/Apresentar_deadline.php | 3775 | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Apresentar_deadline extends CI_Controller
{
public function __construct()
{
parent::__construct();
if (!($this->session->userdata('esta_logado'))) {
redirect('login');
}
$this->loa... | mit |
ZhangFly/WTFSocket_Server_JAVA | test/controller/RegisterController.java | 1788 | package controller;
import model.ApplicationMsg;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import wtf.socket.controller.WTFSocketController;
import wtf.socket.exception.WTFSocketException;
import wtf.socket.exception.fatal.WTFSocketInvalidSourceException;
import wtf.... | mit |
artisanofcode/flask-generic-views | tests/utils.py | 199 | import string
ASCII = bytes(range(0, 127)).decode('ascii')
SLUG = string.ascii_lowercase + string.digits + '_'
DIGITS = string.digits
def nondigit(value):
return value and not value.isdigit()
| mit |
tahminak/tracker_web | app/js/services/jsonFilesService.js | 558 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
(function () {
'use strict';
//Tracker App module
var app = angular.module("trackerApp");
app.factory('jsonFilesS... | mit |
GoogleChrome/workbox | packages/workbox-precaching/src/precache.ts | 1192 | /*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {getOrCreatePrecacheController} from './utils/getOrCreatePrecacheController.js';
import {PrecacheEntry} from './_types.js';
import... | mit |
jsdir/deployer | cmd/deployer/deployer_test.go | 1358 | package main
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCliCreateRelease(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
t.Error(err)
return
}
... | mit |
compasses/elastic-spark | scala-base/src/main/scala/programming/fp_part2/chap7_orignal/Nonblocking.scala | 6698 | package programming.fp_part2.chap7_orignal
import java.util.concurrent.{Callable, CountDownLatch, ExecutorService}
import java.util.concurrent.atomic.AtomicReference
import language.implicitConversions
object Nonblocking {
trait Future[+A] {
private[chap7_orignal] def apply(k: A => Unit): Unit
}
type Par[... | mit |
ericpony/scala-examples | testcases/repair/Heap/Heap5.scala | 2972 | /* Copyright 2009-2013 EPFL, Lausanne
*
* Author: Ravi
* Date: 20.11.2013
**/
import leon.lang._
import leon.collection._
object Heaps {
sealed abstract class Heap {
val rank : BigInt = this match {
case Leaf() => 0
case Node(_, l, r) =>
1 + max(l.rank, r.rank)
}
def content :... | mit |
mafiya69/corefx | src/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.cs | 23579 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Immutable;
using System.Diagnostics;
using System.IO;
using System.Reflection.Internal;
usi... | mit |
Power-LAB/gls-unibox-delivery | src/Api/Resource/Parcel.php | 4152 | <?php
/**
* This file is part of the gls-unixbox-delivery.
* (c) 2016 Pierre Tomasina
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Plab\GlsUniboxDelivery\Api\Resource;
use Plab\GlsUniboxDelivery\Api\Api;
use Plab\GlsUni... | mit |
jccaicedo/localization-agent | learn/cnn/convertProtobinToNumpy.py | 447 | from caffe import io as c
import numpy as np
import os,sys
if len(sys.argv) < 3:
print 'Use: convertProtobinToNumpy protobinFile numpyOutput'
sys.exit()
protoData = c.caffe_pb2.BlobProto()
f = open(sys.argv[1],'rb')
protoData.ParseFromString(f.read())
f.close()
array = c.blobproto_to_array(protoData)
np.save(sys.... | mit |
fjz13/Medusa | Tool/GameKit/GameKit/Analyzer/RandomNameConfigAnalyzer.cs | 4329 | // Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using GameKit.Log;
using GameKit.Publish;
us... | mit |
codeflo/cubehack | source/CubeHack.Core/Game/WorldGenerator.cs | 2990 | // Copyright (c) the CubeHack authors. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt in the project root.
using CubeHack.Geometry;
using CubeHack.Randomization;
using CubeHack.State;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace CubeHack.Game
{
public class W... | mit |
kelunik/acme | src/Protocol/Account.php | 2618 | <?php
/**
* This file is part of the ACME package.
*
* @copyright Copyright (c) 2015-2017, Niklas Keller
* @license MIT
*/
namespace Kelunik\Acme\Protocol;
use Kelunik\Acme\AcmeException;
use League\Uri\Http;
use Psr\Http\Message\UriInterface;
final class Account
{
public static function fromResponse(?stri... | mit |
uupaa/URI.js | test/browser/template/worker.js | 748 | // URI test
onmessage = function(event) {
self.unitTest = event.data; // { message, setting: { secondary, baseDir } }
if (!self.console) { // polyfill WebWorkerConsole
self.console = function() {};
self.console.dir = function() {};
self.console.log = function() {};
self.console... | mit |
GuMiner/TemperFine | src/MapManager.cpp | 4300 | #include <map>
#include <string>
#include <sstream>
#include "ConversionUtils.h"
#include "Logger.h"
#include "StringUtils.h"
#include "MapManager.h"
MapManager::MapManager()
{
}
bool MapManager::LoadMapBlockData(std::vector<std::string>& lines, unsigned char* dataStorage, unsigned int xSize, unsigned int... | mit |
NetOfficeFw/NetOffice | Source/Excel/Enums/XlPhoneticAlignment.cs | 1263 | using System;
using NetOffice;
using NetOffice.Attributes;
namespace NetOffice.ExcelApi.Enums
{
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
///<remarks> MSDN Online Documentation: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.XlPhoneticAlignment"/> </rem... | mit |
LugosFingite/LudOS | kern/fs/devfs/kbdev.hpp | 1807 | /*
kbdev.hpp
Copyright (c) 13 Yann BOUCHER (yann)
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... | mit |
tijme/not-your-average-web-crawler | nyawc/CrawlerThread.py | 4243 | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017 Tijme Gommers
#
# 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... | mit |
Maikell84/gitter-bot | gitter_bot.rb | 4209 | require 'eventmachine'
require 'em-http'
require 'json'
require 'net/http'
require 'open-uri'
require 'giphy'
require 'imgflip'
require_relative 'time_service'
require_relative 'leet_service'
class GitterBot
Giphy::Configuration.configure do |config|
config.api_key = ENV['GIPHY_API_KEY']
end
def initialize
... | mit |
zrrrzzt/pagelt | index.js | 568 | 'use strict'
const validUrl = require('valid-url')
const getPage = require('./lib/get-page')
module.exports = (uri, callback) => {
if (!uri) {
return callback(new Error('Missing required param'), null)
}
if(!validUrl.isWebUri(uri)){
return callback(new Error('Invalid uri'), null)
}
const start = ... | mit |
cmattson/threetrack | lib/threetrack/version.rb | 45 | module Threetrack
VERSION = "0.0.1pre"
end
| mit |
dotKom/onlineweb4 | apps/sso/migrations/0001_initial.py | 2053 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-30 17:52
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import oauth2_provider.generators
import oauth2_provider.validators
class Migration(migrations.Mi... | mit |
eventualbuddha/add-variable-declarations | test/fixtures/variable-reassignment/input.js | 36 | var a = 0;
let b = 1;
a = 2;
b = 3;
| mit |
ShuaiPointChen/def | Code/ShareLib/Photon-Unity3D_v3-2-0-1_SDK/demo-litelobby-chatroom/Assets/Photon/PhotonClient.cs | 10736 | // --------------------------------------------------------------------------------------------------------------------
// <copyright company="Exit Games GmbH">
// Protocol & Photon Client Lib - Copyright (C) 2010 Exit Games GmbH
// </copyright>
// <summary>
// Part of the "Demo Lobby" for Photon in Unity.
// </summa... | mit |
radjivC/graph-connected | proba.rb | 1285 | #!/usr/bin/env ruby
# calculate the empirical probabilities.rb
#
#
# Created by radjiv on 10/24/13.
#
#calculate all distance
require 'logger'
$logger = Logger.new('proba.log')
def bubble_sort(list)
return list if list.size <= 1 # already sorted
swapped = true
while swapped do
swapped = false
0.... | mit |
lettenj61/vuescale | vuescale-core/src/main/scala/vuescale/tags/VFragment.scala | 527 | package vuescale
package tags
import scala.scalajs.js
import vuescale.facade.CreateElement
import vuescale.facade.VNode
/** DSL to write Vue.js VNode descriptors. The API design is heavily
* inspired by Scalatags ones.
*/
sealed trait VFragment {
/** Serialize this fragment into VNode descriptors
*/
def as... | mit |
s-ueno/uENLab | SimpleApp/ExceptionPolicy.cs | 804 | using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using uEN;
using uEN.UI.DataBinding;
namespace SimpleApp
{
[PartCreationPolicy(CreationPolicy.Shared)]
[ExportMetadata(Repository.P... | mit |
sievins/sarahs-footsteps | src/components/routes/Book/Book.js | 290 | import React from 'react'
import cover from 'images/book-cover.png'
import ImageAndTextTemplate from '../ImageAndTextTemplate'
import Overview from './Overview'
const Book = () => (
<ImageAndTextTemplate img={{ src: cover, alt: 'book-cover' }} Text={Overview} />
)
export default Book
| mit |
innogames/gitlabhq | spec/features/merge_request/user_assigns_themselves_spec.rb | 1834 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Merge request > User assigns themselves' do
let(:project) { create(:project, :public, :repository) }
let(:user) { project.creator }
let(:issue1) { create(:issue, project: project) }
let(:issue2) { create(:issue, project: project) }
let(:mer... | mit |
jeidee/goutils | aws/dynamo.go | 3240 | package aws
import (
"errors"
"strconv"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
)
// DynamoDB 다이나모 DB 관련 기능 포함
type DynamoDB struct {
Session *session.Session
DB *dynamodb.... | mit |
skybrud/Skybrud.Umbraco.SelfService | src/Skybrud.Umbraco.SelfService/Install/SelfServiceProperty.cs | 714 | using System;
namespace Skybrud.Umbraco.SelfService.Install {
internal class SelfServiceProperty {
public Guid Guid { get; set; }
public string Alias { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public SelfServicePrope... | mit |
tvnweb/grandprix | assets/components/foundation-sites/js/foundation.sticky.js | 14940 | 'use strict';
!function($) {
/**
* Sticky module.
* @module foundation.sticky
* @requires foundation.util.triggers
* @requires foundation.util.mediaQuery
*/
class Sticky {
/**
* Creates a new instance of a sticky thing.
* @class
* @param {jQuery} element - jQuery object to make sticky.... | mit |
spatie/laravel-uptime-monitor | tests/Integration/Events/CertificateCheckFailedTest.php | 902 | <?php
namespace Spatie\UptimeMonitor\Test\Integration\Events;
use Illuminate\Support\Facades\Event;
use Spatie\UptimeMonitor\Events\CertificateCheckFailed;
use Spatie\UptimeMonitor\Models\Monitor;
use Spatie\UptimeMonitor\Test\TestCase;
class CertificateCheckFailedTest extends TestCase
{
/** @var \Spatie\UptimeM... | mit |
eventualbuddha/decaffeinate-parser | script/check-file.ts | 1233 | #!/usr/bin/env node -r ts-node/register -r babel-register
import { readdirSync, readFileSync, statSync } from 'fs';
import { basename, extname, join } from 'path';
import { parse } from '../src/parser';
for (let i = 2; i < process.argv.length; i++) {
processPath(process.argv[i]);
}
function processPath(path: strin... | mit |
NikolaLyutsov/TelerikAcademy | Homeworks/C#1/01. Introduction-to-Programming/15. Age/Properties/AssemblyInfo.cs | 1382 | 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("Ag... | mit |
yogeshsaroya/new-cdnjs | ajax/libs/rxjs/2.3.25/rx.all.compat.min.js | 131 | version https://git-lfs.github.com/spec/v1
oid sha256:e843b3ea9100d7ba69449785fa689884ec2b29f3aefcc531677ca2b95110fefb
size 104789
| mit |
fc-io/react-tape-redux | app/containers/root.dev.js | 340 | import React from 'react'
import {Router} from 'react-router/es6'
import {Provider} from 'react-redux'
import routes from '../routes'
import DevTools from '../dev_tools'
export default ({store, history}) =>
<Provider store={store}>
<div>
<Router history={history} routes={routes} />
<DevTools />
<... | mit |
tourze/html | src/Feature/StandardEventAttributes.php | 453 | <?php
namespace tourze\Html\Feature;
/**
* 标准 Event 属性
*
* @package tourze\Html\Feature
*/
trait StandardEventAttributes
{
/**
* 读取指定属性值
*
* @param $name
*
* @return string|array
*/
protected function getAttribute($name)
{
}
/**
* 设置属性值
*
* @param... | mit |
MMF-FE/vue-svgicon | demo/taro-demo/src/app.config.ts | 241 | export default {
pages: ['pages/index/index'],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black',
},
}
| mit |
DrRaider/Unishare | node_modules/couch-db/test/exec.js | 398 | var Executor = require('../lib/exec'),
assert = require('chai').assert;
describe('executor', function() {
it('add properties', function() {
var exec = new Executor('a_B', 'bcd_aff');
assert(typeof exec.aB == 'function' && typeof exec.bcdAff == 'function');
exec = new Executor(['a__b', 'b_c_d']);
as... | mit |
justphil/angular-es6-components-seed | gulp/tasks/inject-reload.js | 255 | var gulp = require('gulp'),
gulpSequence = require('gulp-sequence'),
browserSync = require('browser-sync');
gulp.task('inject:reload', function(cb) {
gulpSequence('inject', function() {
browserSync.reload();
cb();
});
});
| mit |
ALEXIUMCOIN/alexium | src/txdb-leveldb.cpp | 20632 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include <map>
#include <boost/version.hpp>
#include <boost/filesystem.hpp>
#... | mit |
raulmedinacampos/sicipac | application/models/Leyendas_md.php | 1892 | <?php
class Leyendas_md extends CI_Model {
const tabla="LEYENDAS";
function __construct() {
// Call the Model constructor
parent::__construct();
}
function GetAll() {
$query = $this->db->get(self::tabla);
return $query->result();
}
function GetAllAdmin() {
$... | mit |
Luukschoen/ngx-frozen | src/common/shape.helper.ts | 904 | /**
* Generates a rounded rectanglar path
*
* @export
* @param {*} x, y, w, h, r, tl, tr, bl, br
* @returns {string}
*/
export function roundedRect(x, y, w, h, r, [tl, tr, bl, br]: boolean[]) {
let retval = '';
w = Math.floor(w);
h = Math.floor(h);
w = w === 0 ? 1 : w;
h = h === 0 ? 1 : h;
retval =... | mit |
bkahlert/seqan-research | raw/pmsb13/pmsb13-data-20130530/sources/fjt74l9mlcqisdus/2013-04-17T22-58-12.907+0200/sandbox/my_sandbox/apps/tutorial_23/tutorial_23.cpp | 257 | #include <seqan/sequence.h>
using namespace seqan;
using namespace std;
int main(){
String<String<int>> x;
String<int>y;
append(y,1);
append(y,2);
append(y,3);
append(x,y);
append(y,4);
append(x,y);
//cout<<x<<endl;
return 0;
} | mit |
poifox/marionette-require-starter | js/fixtures/menu.js | 1085 | define(["app"], function(App) {
App.module("Fixtures", function(Fixtures, App, Backbone, Marionette, $, _) {
Fixtures.MenuItem = Backbone.Model.extend({
defaults: {
name: "UNDEFINED",
url: "/",
trigger: "boilerplates:index",
icon: "",
}
});
Fixtures.MenuCollection = Backbone.Collection.e... | mit |
jimeh/zynapse | config/environment.php | 1449 | <?php
/*
Zynapse Environment
- configure server environments and display modes
*/
# default environment - overridden by $host_config
# ( development | test | production )
$environment = 'development';
# default server display mode - overridden by $host_config
$mode = 'web';
# if you don't need any of th... | mit |
goodwinxp/Yorozuya | library/ATF/LPGOPHER_VIEW_ATTRIBUTE_TYPE.hpp | 302 | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <GOPHER_VIEW_ATTRIBUTE_TYPE.hpp>
START_ATF_NAMESPACE
typedef GOPHER_VIEW_ATTRIBUTE_TYPE *LPGOPHER_VIEW_ATTRIBUTE_TYPE;
END_ATF_NAMESPACE
| mit |
intuinno/vistalk | vistalk3/settings/base.py | 7984 | # Django settings for vistalk3 project
# Django settings for Django celery
import djcelery
djcelery.setup_loader()
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_ps... | mit |
zeno15/Ascendancy | include/Infrastructure/FontManager.hpp | 505 | #ifndef INCLUDED_ASCENDANCY_INFRASTRUCTURE_FONT_MANAGER_HPP_
#define INCLUDED_ASCENDANCY_INFRASTRUCTURE_FONT_MANAGER_HPP_
#include <map>
#include <SFML/Graphics.hpp>
namespace asc {
class FontManager {
public:
FontManager();
~FontManager();
bool loadFont(const std::string& _filepath, const std::string& _fon... | mit |
FanHuaRan/interview.algorithm | java/concurrentdemo/src/com/fhr/concurrentdemo/threadcon/characterprinters/TwoLockPrinter.java | 2317 | package com.fhr.concurrentdemo.threadcon.characterprinters;
import org.junit.Test;
/**
* 基于两个lock实现连续打印abcabc....
*
* @author fhr
* @since 2017/09/04
*/
public class TwoLockPrinter {
@Test
public void test() throws InterruptedException {
// 打印A线程的锁
Object lockA = new Object();
// 打印B线程的锁
Object lockB... | mit |
cybernude/hipth | test-env.php | 663 | <?php
function GetClientMac(){
$macAddr=false;
$arp=`arp -n`;
$lines=explode("\n", $arp);
foreach($lines as $line){
$cols=preg_split('/\s+/', trim($line));
if ($cols[0]==$_SERVER['REMOTE_ADDR']){
$macAddr=$cols[2];
}
}
return $macAddr;
}
$client_mac = GetCl... | mit |
AldorEla/albinuta | src/Alb/Bundle/AppBundle/Controller/StoryController.php | 4852 | <?php
namespace Alb\Bundle\AppBundle\Controller;
use Alb\Bundle\AppBundle\Entity\Story;
use Alb\Bundle\AppBundle\Repository\StoryRepository;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
/**
* Story controller.
*
*/
class StoryController extends Controller... | mit |
skeiter9/javascript-para-todo_demo | webapp/node_modules/webpack/benchmark/fixtures/926.async.js | 172 | require.ensure([], function(require) {
require("./115.async.js");
require("./231.async.js");
require("./463.async.js");
require("./925.async.js");
});
module.exports = 926; | mit |
devfreak/skim | src/Vimtag/DevBundle/Entity/Url.php | 5328 | <?php
namespace Vimtag\DevBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Url
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Vimtag\DevBundle\Entity\UrlRepository")
*/
class Url
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integ... | mit |
mrpapercut/wscript | testfiles/COMobjects/JSclasses/DXImageTransform.Microsoft.Barn.1.js | 597 | class dximagetransform_microsoft_barn_1 {
constructor() {
// int Capabilities () {get}
this.Capabilities = undefined;
// float Duration () {get} {set}
this.Duration = undefined;
// string Motion () {get} {set}
this.Motion = undefined;
// string Orientation ... | mit |
soulchainer/qtile | test/test_bar.py | 12819 | # Copyright (c) 2011 Florian Mounier
# Copyright (c) 2012-2013 Craig Barnes
# Copyright (c) 2012 roger
# Copyright (c) 2012, 2014-2015 Tycho Andersen
# Copyright (c) 2014 Sean Vig
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | mit |
aaronSig/jBetfair | src/main/java/com/jbetfair/api/params/MarketSort.java | 253 | package com.jbetfair.api.params;
public enum MarketSort implements APIRequestParam {
MINIMUM_TRADED, MAXIMUM_TRADED, MINIMUM_AVAILABLE, MAXIMUM_AVAILABLE, FIRST_TO_START, LAST_TO_START;
public String getParameterName() {
return "sort";
};
}
| mit |
GeoSmartCity-CIP/adminCS | src/featureDetail.js | 5622 | var cs = cs || {};
cs.featureDetail = function(feature) {
cs.featureDetail.feature_ = feature;
//cs.feature.zoom2feature(feature);
cs.featureDetail.renderFeature();
cs.featureDetail.showDetail();
$('.sidebar-header-text').html(feature.get('label'));
return this;
};
cs.featureDetail.featureElem... | mit |
nours/RestAdminBundle | Util/Inflector.php | 1013 | <?php
/*
* This file is part of RestAdminBundle.
*
* (c) David Coudrier <david.coudrier@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nours\RestAdminBundle\Util;
use Doctrine\Inflector\InflectorFactory;
/*... | mit |
CodeCatz/litterbox | Lena/ex1.py | 400 | print "Is this real life?"
print "Why am I here?"
print "How about some pizza?"
print "another line"
print "exercise two already?" #this is for using hash
print "chickens time!"
print "poulets", 1 + 1
print "birds", 65 / 4
print "eggs:"
print 27*76/5
print "Is it greater?", 5 > 2
print "Is it greater", 5 < 2
# print... | mit |