code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
using System; using System.Data.Entity; using System.Data.Entity.Migrations; using SimplePersistence.Example.Console.Models.Logging; using SimplePersistence.Example.Console.UoW.EF.Mapping; namespace SimplePersistence.Example.Console.UoW.EF.Migrations { public sealed class Configuration : DropCreateDatabaseIfModelC...
gravity00/SimplePersistence
Examples/SimplePersistence.Example.Console/SimplePersistence.Example.Console.UoW.EF/Migrations/Configuration.cs
C#
mit
2,232
class CreateItineraries < ActiveRecord::Migration def change create_table :itineraries do |t| t.references :user t.timestamps null: false end end end
nyc-fiddler-crabs-2015/Velox
db/migrate/20150328200056_create_itineraries.rb
Ruby
mit
176
import assert from 'assert' import { THREAD_COUNT, CURSOR_BUFFER_SIZE, THREAD_COUNTER_BYTE_LENGTH, } from './constants' import { InputCursor, StoredEventBatchPointer, StoredEventPointer, } from './types' const checkThreadArrayLength = (threadArray: Array<number>): void => { assert.strictEqual( thread...
reimagined/resolve
packages/runtime/adapters/eventstore-adapters/eventstore-base/src/cursor-operations.ts
TypeScript
mit
3,122
'use strict' let ugly = require('gulp-uglify') ,gulp = require('gulp') ,watch = require('gulp-watch') ,plumber = require('gulp-plumber') ,newer = require('gulp-newer') ,stylus = require('gulp-stylus') ,jade = require('gulp-jade') ,concat = require('gulp-concat') ,rename = require('gulp-rename') ,runSequence = require...
jade-press/jade-press.org
gulpfile.js
JavaScript
mit
2,290
<?php require_once __DIR__.'/../../../vendor/autoload.php'; require 'templates/base.php'; session_start(); $client = new Google_Client(); $client->setApplicationName("Slide-Summarizer"); if ($credentials_file = getOAuthCredentialsFile()) { // set the location manually $client->setAuthConfig($credentials_file)...
esimkowitz/Slide-Summarizer
web/public/views/oauth2callback.php
PHP
mit
998
/** --------------------------------------------------------------------------- * -*- c++ -*- * @file: particlebody.cpp * * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> * MIT License, see LICENSE file for more details. * ----------------------------------------------------------------------------...
ymherklotz/YAGE
yage/physics/particlebody.cpp
C++
mit
1,426
package hu.autsoft.nytimes.exception; public class OkHttpException extends RuntimeException { public OkHttpException(Throwable cause) { super(cause); } }
chriske/nytimes_api_demo
app/src/main/java/hu/autsoft/nytimes/exception/OkHttpException.java
Java
mit
172
const Lib = require("../src/main"); const assert = require("assert"); describe("plain object output", function () { context("for `JSON.stringify` serializable objects", function () { it("should have resembling structure", function () { const obj1 = { a: 1, b: "b", c: true }; const res = Lib.write(obj...
awto/effectfuljs
packages/serialization/test/main.js
JavaScript
mit
27,905
package se.leiflandia.lroi.utils; import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; import android.content.SharedPreferences; import android.text.TextUtils; import se.leiflandia.lroi.auth.model.AccessToken; import se.leiflandia.lroi.auth.model.UserCredentials; p...
Wadpam/lets-the-right-one-in
lroi-lib/src/main/java/se/leiflandia/lroi/utils/AuthUtils.java
Java
mit
3,349
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Xml.Linq; using Reportz.Scripting.Attributes; using Reportz.Scripting.Classes; using Reportz.Scripting.Interfaces; namespace Reportz.Scripting.Commands { [ScriptElementAlias("execute-script")] public class...
LazyTarget/Reportz
Reportz.Scripting/Commands/ExecuteScriptCommand.cs
C#
mit
4,213
(function () { 'use strict'; angular .module('crimes.routes') .config(routeConfig); routeConfig.$inject = ['$stateProvider']; function routeConfig($stateProvider) { $stateProvider .state('crimes', { abstract: true, url: '/crimes', template: '<ui-view/>' }) ...
ravikumargh/Police
modules/crimes/client/config/crime.client.routes.js
JavaScript
mit
1,154
<?php if( $kind = ic_get_post( 'kind' ) ) { if( $kind == 'c' || $kind == 'cod' ) { $sym = '#'; $kind = 'cod'; } else if( $kind == 'l' || $kind == 'loc' ) { $sym = '@'; $kind = 'loc'; } else if( $kind == 's' || $kind == 'str' ) { $sym = '*'; $kind = 'str'; } else if( $kind == 'u' || $kind == 'usr' ) { $sym = '+'; $k...
mhaddir/draco
apps/filters/filters-news.php
PHP
mit
1,680
class IssueTrackerService < Service validate :one_issue_tracker, if: :activated?, on: :manual_change default_value_for :category, 'issue_tracker' # Pattern used to extract links from comments # Override this method on services that uses different patterns # This pattern does not support cross-project refere...
dplarson/gitlabhq
app/models/project_services/issue_tracker_service.rb
Ruby
mit
3,048
/** * Compile sass files to css using compass */ module.exports = { dev: { options: { config: 'config.rb', environment: 'development' } }, };
timothytran/ngModular
grunt/compass.js
JavaScript
mit
192
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cognito.Stripe.Classes { public class FileUpload : BaseObject { public override string Object { get { return "file_upload"; } } public string Purpose { get; set; } public int Size { get; set; } public string Typ...
vc3/Cognito.Stripe
Cognito.Stripe/Classes/FileUpload.cs
C#
mit
377
class ChangeIntegerLimits < ActiveRecord::Migration def change change_column :projects, :federal_contribution, :integer, limit: 8 change_column :projects, :total_eligible_cost, :integer, limit: 8 end end
anquinn/infrastructure_projects
db/migrate/20170513191438_change_integer_limits.rb
Ruby
mit
214
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigiq_regkey_license_as...
F5Networks/f5-ansible-modules
ansible_collections/f5networks/f5_modules/plugins/modules/bigiq_regkey_license_assignment.py
Python
mit
19,962
<?php /** * * @author thiago */ interface ConsoleFactory { public function create_console_microsoft(); public function create_console_sony(); }
thiagorthomaz/design-patterns
abstractFactory/ConsoleFactory.class.php
PHP
mit
153
class ApplicationController < Sinatra::Base require 'bundler' Bundler.require end
timrourke/dotEnv
controllers/_ApplicationController.rb
Ruby
mit
84
// JSON Object of all of the icons and their tags export default { apple : { name : 'apple', color: '#be0000', image : 'apple67.svg', tags: ['apple', 'fruit', 'food'], categories: ['food', 'supermarket'] }, bread : { name : 'bread', color: '#c26b24', image : 'bread14.svg', tag...
una/heiroglyph
app/js/data/iconListInfo.js
JavaScript
mit
1,423
package sudoku import "fmt" const ( n = 3 N = 3 * 3 ) var ( resolved bool ) func solveSudoku(board [][]byte) [][]byte { // box size 3 row := make([][]int, N) columns := make([][]int, N) box := make([][]int, N) res := make([][]byte, N) for i := 0; i < N; i++ { row[i] = make([]int, N+1) columns[i] = make...
Catorpilor/LeetCode
37_sudoku_solver/sudoku.go
GO
mit
3,258
#include "Fractal.h" Color::Color() : r(0.0), g(0.0), b(0.0) {} Color::Color(double rin, double gin, double bin) : r(rin), g(gin), b(bin) {} Fractal::Fractal(int width, int height) : width_(width), height_(height), center_x_(0.0), center_y_(0.0), max_distance_sqr_(4.0), max_iteration_(32) { pixel_size_ = ...
theDrake/opengl-experiments
Fractals/Fractals/Fractal.cpp
C++
mit
2,212
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using Mechanical3.Core; namespace Mechanical3.IO.FileSystems { //// NOTE: For still more speed, you could ditch abstract file systems, file paths and streams alltogether, and just use byte arrays directly. //...
MechanicalMen/Mechanical3
source/Mechanical3.Portable/IO/FileSystems/SemiThreadSafeMemoryFileSystemReader.cs
C#
mit
17,319
http_path = "/" css_dir = "assets/css/src" sass_dir = "assets/sass" images_dir = "assets/img" javascripts_dir = "assets/js" fonts_dir = "assets/font" http_fonts_path = "assets/font" http_images_path = "assets/img" output_style = :nested relative_assets = false line_comments = fal...
LunneMarketingGroup/Grunt-Website-Template
config.rb
Ruby
mit
323
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.network.v2020_04_01; import com.fasterxml.jackso...
selvasingh/azure-sdk-for-java
sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/ExpressRouteCircuitSku.java
Java
mit
2,518
class JudgePolicy < ApplicationPolicy def create_scores? record.competition.unlocked? && (user_match? || director?(record.event) || super_admin?) end def view_scores? (user_match? || director?(record.event) || super_admin?) end def index? director?(record.event) || super_admin? end def togg...
rdunlop/unicycling-registration
app/policies/judge_policy.rb
Ruby
mit
827
const Nodelist = artifacts.require("./Nodelist.sol"); const BiathlonNode = artifacts.require("./BiathlonNode.sol"); const SecondNode = artifacts.require("./SecondNode.sol"); const BiathlonToken = artifacts.require("./BiathlonToken.sol"); const Ownable = artifacts.require('../contracts/ownership/Ownable.sol'); // const...
BiathlonHelsinki/BiathlonContract
test/3_biathlontoken.js
JavaScript
mit
7,223
package classfile import "encoding/binary" type ClassReader struct { data []byte } func (self *ClassReader) readUint8() uint8 { val := self.data[0] self.data = self.data[1:] return val } func (self *ClassReader) readUint16() uint16 { val := binary.BigEndian.Uint16(self.data) self.data = self.data[2:] return...
wonghoifung/tips
goworkspace/src/jvmgo/classfile/class_reader.go
GO
mit
874
import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.LinkedList; //this code contains the output assembly code that the program outputs. //will have at least three functions: //add(string, string, string, string) <- adds an assembly code line /...
mjsmith707/KSPCompiler
src/ASMCode.java
Java
mit
4,329
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; import { Filter, FilterType } from 'lib/filter'; @Component({ selector: 'iw-filter-input', templateUrl: './filter-input.component.html', styleUrls: ['./filter-input.component.css'] }) export class FilterInputComponent implements OnIn...
zorec/ng2-pack
src/app/filter-input/filter-input.component.ts
TypeScript
mit
1,320
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Express' }); }); router.get('/about', function(req, res, next) { res.render('about', { title: 'About' }); }); module.exports = router;
Studio39/node-snapclone
routes/index.js
JavaScript
mit
301
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("10....
NikolaySpasov/Softuni
C# Advanced/10. Advanced Retake Exam - 22 August 2016/10. Advanced Retake Exam - 22 August 2016/Properties/AssemblyInfo.cs
C#
mit
1,453
''' salt.utils ~~~~~~~~~~ ''' class lazy_property(object): ''' meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself. http://stackoverflow.com/a/6849299/564003 ''' def __init__(self, fget): self.fget = fget ...
johnnoone/salt-targeting
src/salt/utils/__init__.py
Python
mit
537
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Leap; namespace LeapMIDI { class LeapStuff { private Controller controller = new Controller(); public float posX { get; private set; } public float posY { get; pr...
LeifBloomquist/LeapMotion
C#/LeapMIDI/LeapStuff.cs
C#
mit
2,374
// // Created by Aman LaChapelle on 5/26/17. // // pytorch_inference // Copyright (c) 2017 Aman LaChapelle // Full license at pytorch_inference/LICENSE.txt // #include "../include/layers.hpp" #include "utils.hpp" int main(){ std::vector<pytorch::tensor> tests = test_setup({1, 1, 1}, ...
bzcheeseman/pytorch-inference
test/test_product.cpp
C++
mit
1,213
package com.github.weeniearms.graffiti; import com.github.weeniearms.graffiti.config.CacheConfiguration; import com.github.weeniearms.graffiti.generator.GraphGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stere...
weeniearms/graffiti
src/main/java/com/github/weeniearms/graffiti/GraphService.java
Java
mit
1,097
<?php /** * This file is part of the [n]core framework * * Copyright (c) 2014 Sascha Seewald / novael.de * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace nCore\Core\Router\Exception; use nCore\Core\Exception\DefaultExcep...
sSeewald/nCore
src/nCore/Core/Router/Exception/RouterException.php
PHP
mit
572
'use strict'; // Projects controller angular.module('about').controller('AboutUsController', ['$scope', '$stateParams', '$state', '$location', 'Authentication', function($scope, $stateParams, $state, $location, Authentication) { $scope.authentication = Authentication; } ]);
spiridonov-oa/people-ma
public/modules/about/controllers/about.client.controller.js
JavaScript
mit
281
<?php /** * AbstractField class file */ namespace Graviton\DocumentBundle\DependencyInjection\Compiler\Utils; /** * Base document field * * @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors> * @license https://opensource.org/licenses/MIT MIT License * @link http:/...
libgraviton/graviton
src/Graviton/DocumentBundle/DependencyInjection/Compiler/Utils/AbstractField.php
PHP
mit
2,983
<?php namespace Abe\FileUploadBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Confi...
Dabea/BasicLogin
src/Abe/FileUploadBundle/Controller/UploadController.php
PHP
mit
3,780
import { Dimensions, PixelRatio } from 'react-native'; const Utils = { ratio: PixelRatio.get(), pixel: 1 / PixelRatio.get(), size: { width: Dimensions.get('window').width, height: Dimensions.get('window').height, }, post(url, data, callback) { const fetchOptions = { ...
zhiyuanMA/ReactNativeShowcase
components/utils.js
JavaScript
mit
765
using Humanizer.Localisation; using Xunit; using Xunit.Extensions; namespace Humanizer.Tests.Localisation.ptBR { public class DateHumanizeTests : AmbientCulture { public DateHumanizeTests() : base("pt-BR") { } [Theory] [InlineData(-2, "2 segundos atrás")] [InlineData(-1, "um s...
hhariri/Humanizer
src/Humanizer.Tests/Localisation/pt-BR/DateHumanizeTests.cs
C#
mit
3,481
"""This module contains examples of the op() function where: op(f,x) returns a stream where x is a stream, and f is an operator on lists, i.e., f is a function from a list to a list. These lists are of lists of arbitrary objects other than streams and agents. Function f must be stateless, i.e., for any lists u, v: f(u...
zatricion/Streams
ExamplesElementaryOperations/ExamplesOpNoState.py
Python
mit
4,241
<?php /* * This file is part of the Black package. * * (c) Alexandre Balmes <albalmes@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Black\Bundle\MenuBundle\Model; /** * Class MenuInterface * * @package ...
pocky/MenuBundle
Model/MenuInterface.php
PHP
mit
845
<?php /** * Response Already Send Exception * * @author Tom Valk <tomvalk@lt-box.info> * @copyright 2017 Tom Valk */ namespace Arvici\Exception; class ResponseAlreadySendException extends ArviciException { /** * ResponseAlreadySendException constructor. * @param string $message * @param ...
arvici/framework
src/Arvici/Exception/ResponseAlreadySendException.php
PHP
mit
640
#!/usr/bin/env node // // cli.js // // Copyright (c) 2016-2017 Junpei Kawamoto // // This software is released under the MIT License. // // http://opensource.org/licenses/mit-license.php // const { start, crawl } = require("../lib/crawler"); const argv = require("yargs") .option("lang", { describe...
itslab-kyushu/youtube-comment-crawler
bin/cli.js
JavaScript
mit
867
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CollegeFbsRankings.Domain.Games; using CollegeFbsRankings.Domain.Rankings; using CollegeFbsRankings.Domain.Teams; namespace CollegeFbsRankings.Domain.Validations { public class ValidationServ...
mikee385/CollegeFbsRankings
Domain/Validations/ValidationService.cs
C#
mit
1,400
<div class="container" > <div class="row page-title"> <div class="col-xs-12 text-center"> <span>Consultation</span> </div> </div> </div> <script type="text/javascript"> /** * Created by Kupletsky Sergey on 05.11.14. * * Material Design Responsive Table * Tested on Win8.1 with browsers: Chrome 37, Fire...
r45r54r45/simplewe
application/views/consultation.php
PHP
mit
26,096
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("De...
StoikoNeykov/Telerik
CSharp1/Loops/DecimalToHex/Properties/AssemblyInfo.cs
C#
mit
1,400
const AppError = require('../../../lib/errors/app') const assert = require('assert') function doSomethingBad () { throw new AppError('app error message') } it('Error details', function () { try { doSomethingBad() } catch (err) { assert.strictEqual( err.name, 'AppError', "Name property ...
notmessenger/poker-analysis
test/lib/errors/app.js
JavaScript
mit
1,211
require 'spec_helper' describe Blogitr::Document do def parse text, filter=:html @doc = Blogitr::Document.new :text => text, :filter => filter end def should_parse_as headers, body, extended=nil @doc.headers.should == headers @doc.body.should == body @doc.extended.should == extended end it ...
emk/blogitr
spec/document_spec.rb
Ruby
mit
3,231
<?php namespace Grupo3TallerUNLP\ConfiguracionBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class ConfiguracionControllerTest extends WebTestCase { /* public function testCompleteScenario() { // Create a new client to browse the application $client = static...
Grupo3-TallerUNLP/InfoSquid
src/Grupo3TallerUNLP/ConfiguracionBundle/Tests/Controller/ConfiguracionControllerTest.php
PHP
mit
2,024
// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare const ...
alxhub/angular
aio/src/test.ts
TypeScript
mit
640
/**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /* @author Axel Anceau - 2014 Package api contains general tools */ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ package api import ( "fmt" "github.com/revel/revel" "runtime/debug" ) /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /...
Peekmo/RPGit
api/filters.go
GO
mit
953
<?php namespace SCL\ZF2\Currency\Form\Fieldset; use Zend\Form\Fieldset; class TaxedPrice extends Fieldset { const AMOUNT_LABEL = 'Amount'; const TAX_LABEL = 'Tax'; public function init() { $this->add([ 'name' => 'amount', 'type' => 'text', 'options' => ...
SCLInternet/SclZfCurrency
src/SCL/ZF2/Currency/Form/Fieldset/TaxedPrice.php
PHP
mit
581
var indexController = require('./controllers/cIndex'); var usuarioController = require('./controllers/cUsuario'); var clientesController = require('./controllers/cCliente'); var adminController = require('./controllers/cAdmin'); var umedController = require('./controllers/cUmed'); var matepController = require('./contr...
IsaacMiguel/ProchemBio
routes.js
JavaScript
mit
12,314
<?php /** * Created by PhpStorm. * User: tfg * Date: 25/08/15 * Time: 20:03 */ namespace AppBundle\Behat; use Sylius\Bundle\ResourceBundle\Behat\DefaultContext; class BrowserContext extends DefaultContext { /** * @Given estoy autenticado como :username con :password */ public function iAmAuth...
sergiormb/ritsiga
src/AppBundle/Behat/BrowserContext.php
PHP
mit
1,153
## Close ### What is the value of the first triangle number to have over five hundred divisors? print max([len(m) for m in map(lambda k: [n for n in range(1,(k+1)) if k%n == 0], [sum(range(n)) for n in range(1,1000)])])
jacksarick/My-Code
Python/python challenges/euler/012_divisable_tri_nums.py
Python
mit
219
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("Aut...
shopOFF/Autos4Sale
Autos4Sale/Data/Autos4Sale.Data.Models/Properties/AssemblyInfo.cs
C#
mit
1,415
from errors import * from manager import SchemaManager
Livefyre/pseudonym
pseudonym/__init__.py
Python
mit
55
<?php namespace Syrma\WebContainer; /** * */ interface ServerInterface { /** * Start the server. * * @param ServerContextInterface $context * @param RequestHandlerInterface $requestHandler */ public function start(ServerContextInterface $context, RequestHandlerInterface $requestHan...
syrma-php/web-container
src/Syrma/WebContainer/ServerInterface.php
PHP
mit
552
module Mailchimp class API include HTTParty format :plain default_timeout 30 attr_accessor :api_key, :timeout, :throws_exceptions def initialize(api_key = nil, extra_params = {}) @api_key = api_key || ENV['MAILCHIMP_API_KEY'] || self.class.api_key @default_params = {:apikey => @api_k...
herimedia/mailchimp-gem
lib/mailchimp/api.rb
Ruby
mit
1,894
/* Print.cpp - Base class that provides print() and println() Copyright (c) 2008 David A. Mellis. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1...
gokr/ardunimo
wrapper/src/cores/arduino/Print.cpp
C++
mit
5,552
import { Injectable } from '@angular/core'; /** * Created by AAAA on 3/21/2017. */ //http://stackoverflow.com/questions/9671995/javascript-custom-event-listener //http://www.typescriptlang.org/play/ class MyEvent{ private context:Object; private cbs: Function[] = []; constructor(context: Object){ this.c...
caohonghiep/lkth
src/app/services/events.service.ts
TypeScript
mit
1,639
import random from datetime import datetime from multiprocessing import Pool import numpy as np from scipy.optimize import minimize def worker_func(args): self = args[0] m = args[1] k = args[2] r = args[3] return (self.eval_func(m, k, r) - self.eval_func(m, k, self.rt) - ...
ndt93/tetris
scripts/agent3.py
Python
mit
5,234
RSpec.describe Porch::ProcStepDecorator do describe ".decorates?" do it "returns true if the step is a proc" do expect(described_class).to be_decorates Proc.new {} end it "returns true if the step is a lambda" do expect(described_class).to be_decorates lambda {} end it "returns false...
jwright/porch
spec/porch/step_decorators/proc_step_decorator_spec.rb
Ruby
mit
747
# -*- coding: utf-8 -*- """" ProjectName: pydemi Repo: https://github.com/chrisenytc/pydemi Copyright (c) 2014 Christopher EnyTC Licensed under the MIT license. """ # Dependencies import uuid from api import app from hashlib import sha1 from flask import request from flask import jsonify as JSON from api.models.user ...
chrisenytc/pydemi
api/controllers/users.py
Python
mit
1,151
using System.Web; using System.Web.Optimization; namespace WebAPI.Boilerplate.Api { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Ad...
Manoj-Bisht/WebAPI-Boilerplate
WebAPI.Boilerplate.Api/App_Start/BundleConfig.cs
C#
mit
1,123
package redes3.proyecto.nagiosalert; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; public class InfoServiceActivity extends Activity { String nom...
caat91/NagiosAlert
NagiosAlert-App/src/redes3/proyecto/nagiosalert/InfoServiceActivity.java
Java
mit
2,141
#include "MultiSelection.h" #include "ofxCogEngine.h" #include "EnumConverter.h" #include "Node.h" namespace Cog { void MultiSelection::Load(Setting& setting) { string group = setting.GetItemVal("selection_group"); if (group.empty()) CogLogError("MultiSelection", "Error while loading MultiSelection behavior: e...
dormantor/ofxCogEngine
COGengine/src/Behaviors/MultiSelection.cpp
C++
mit
2,863
// The MIT License (MIT) // // Copyright (c) 2016 Tim Jones // // 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,...
jonestimd/finances
src/main/java/io/github/jonestimd/finance/file/Reconciler.java
Java
mit
3,250
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class AddTemplatesToEvents extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('events', function (Blueprint $table) { $t...
ayimdomnic/Qicksite
src/PublishedAssets/Migrations/2016_03_20_186046_add_templates_to_events.php
PHP
mit
605
package plugin_test import ( "path/filepath" "code.cloudfoundry.org/cli/utils/testhelpers/pluginbuilder" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestPlugin(t *testing.T) { RegisterFailHandler(Fail) pluginbuilder.BuildTestBinary(filepath.Join("..", "fixtures", "plugins"), "test_...
jabley/cf-metrics
vendor/src/code.cloudfoundry.org/cli/plugin/plugin_suite_test.go
GO
mit
355
var express = require('express'), compression = require('compression'), path = require('path'), favicon = require('serve-favicon'), logger = require('morgan'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'), session = require('express-session'), session = re...
EdmonJiang/FA_Inventory
app.js
JavaScript
mit
2,979
/** * CircularLinkedList implementation * @author Tyler Smith * @version 1.0 */ public class CircularLinkedList<T> implements LinkedListInterface<T> { private Node<T> head = null, tail = head; private int size = 0; @Override public void addAtIndex(int index, T data) { if (index < 0 || ind...
tsmith328/Homework
Java/CS 1332/Homework 01/CircularLinkedList.java
Java
mit
4,722
import { Component, OnInit } from '@angular/core'; // import { TreeModule, TreeNode } from "primeng/primeng"; import { BlogPostService } from '../shared/blog-post.service'; import { BlogPostDetails } from '../shared/blog-post.model'; @Component({ selector: 'ejc-blog-archive', templateUrl: './blog-archive.compone...
ejchristie/ejchristie.github.io
src/app/blog/blog-archive/blog-archive.component.ts
TypeScript
mit
676
require 'active_record' module ActiveRecord class Migration def migrate_with_multidb(direction) if defined? self.class::DATABASE_NAME ActiveRecord::Base.establish_connection(self.class::DATABASE_NAME.to_sym) migrate_without_multidb(direction) ActiveRecord::Base.establish_connection(...
sinsoku/banana
lib/banana/migration.rb
Ruby
mit
462
const os = require("os"); const fs = require("fs"); const config = { } let libs; switch (os.platform()) { case "darwin": { libs = [ "out/Debug_x64/libpvpkcs11.dylib", "out/Debug/libpvpkcs11.dylib", "out/Release_x64/libpvpkcs11.dylib", "out/Release/libpvpkcs11.dylib", ]; break; ...
PeculiarVentures/pvpkcs11
test/config.js
JavaScript
mit
742
class RenameMembers < ActiveRecord::Migration[5.1] def change rename_table :members, :memberships end end
miljinx/helpdo-api
db/migrate/20170613234831_rename_members.rb
Ruby
mit
114
<?php # MantisBT - a php based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distribut...
eazulay/mantis
signup.php
PHP
mit
2,896
team_mapping = { "SY": "Sydney", "WB": "Western Bulldogs", "WC": "West Coast", "HW": "Hawthorn", "GE": "Geelong", "FR": "Fremantle", "RI": "Richmond", "CW": "Collingwood", "CA": "Carlton", "GW": "Greater Western Sydney", "AD": "Adelaide", "GC": "Gold Coast", "ES": "Es...
bairdj/beveridge
src/scrapy/afltables/afltables/common.py
Python
mit
1,563
from keras.applications import imagenet_utils from keras.applications import mobilenet def dummyPreprocessInput(image): image -= 127.5 return image def getPreprocessFunction(preprocessType): if preprocessType == "dummy": return dummyPreprocessInput elif preprocessType == "mobilenet": ...
SlipknotTN/Dogs-Vs-Cats-Playground
deep_learning/keras/lib/preprocess/preprocess.py
Python
mit
511
// 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; namespace TheS.Runtime { internal class CallbackException : FatalException { public...
teerachail/SoapWithAttachments
JavaWsBinding/TheS.ServiceModel/_Runtime/CallbackException.cs
C#
mit
874
<?php namespace App\Http\Controllers; use App\Jobs\GetInstance; use App\Models\Build; use App\Models\Commit; use App\Models\Repository; use App\RepositoryProviders\GitHub; use Illuminate\Support\Facades\DB; class DashboardController extends Controller { public function index() { $repositories = Repos...
michaelst/ci
app/Http/Controllers/DashboardController.php
PHP
mit
2,283
/* * @Author: justinwebb * @Date: 2015-09-24 21:08:23 * @Last Modified by: justinwebb * @Last Modified time: 2015-09-24 22:19:45 */ (function (window) { 'use strict'; window.JWLB = window.JWLB || {}; window.JWLB.View = window.JWLB.View || {}; //------------------------------------------------------------...
JustinWebb/lightbox-demo
app/js/helpers/view/gallery.js
JavaScript
mit
3,410
<?php session_start(); require_once('../php/conexion.php'); $conect = connect::conn(); $user = $_SESSION['usuario']; if($_SERVER['REQUEST_METHOD'] == 'POST'){ $sql = "insert into cotidiano (dir_origen,dir_destino,semana,hora,usuario,estado) values (?,?,?,?,?,?);"; $favo = sqlsrv_query($conect,$sql,array($_POST['...
smukideejeah/GaysonTaxi
cpanel/nuevoCotidiano.php
PHP
mit
822
using System; using NetOffice; using NetOffice.Attributes; namespace NetOffice.MSProjectApi.Enums { /// <summary> /// SupportByVersion MSProject 11, 12, 14 /// </summary> ///<remarks> MSDN Online Documentation: http://msdn.microsoft.com/en-us/en-us/library/office/ff863548(v=office.14).aspx </remarks> [Support...
NetOfficeFw/NetOffice
Source/MSProject/Enums/PjMonthLabel.cs
C#
mit
3,276
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("Ci...
frostblooded/TelerikHomework
C# Part 1/ConsoleInputOutput/CircleAreaAndCircumference/Properties/AssemblyInfo.cs
C#
mit
1,428
//#define USE_TOUCH_SCRIPT using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening; /* * ドラッグ操作でのカメラの移動コントロールクラス * マウス&タッチ対応 */ namespace GarageKit { [RequireComponent(typeof(Camera))] public class FlyThroughCamera : MonoBehaviour { public static bool...
sharkattack51/GarageKit_for_Unity
UnityProject/Assets/__ProjectName__/Scripts/Utils/CameraContorol/FlyThroughCamera.cs
C#
mit
13,347
"use strict"; const readdir = require("../../"); const dir = require("../utils/dir"); const { expect } = require("chai"); const through2 = require("through2"); const fs = require("fs"); let nodeVersion = parseFloat(process.version.substr(1)); describe("Stream API", () => { it("should be able to pipe to other strea...
BigstickCarpet/readdir-enhanced
test/specs/stream.spec.js
JavaScript
mit
7,232
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\Font; use JMS\Serializer\Annotation\ExclusionPolicy; us...
romainneutron/PHPExiftool
lib/PHPExiftool/Driver/Tag/Font/PreferredSubfamily.php
PHP
mit
792
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.synapse.v2019_06_01_preview; import java.util.Co...
selvasingh/azure-sdk-for-java
sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/IntegrationRuntimeState.java
Java
mit
2,607
// Copyright 2015 Peter Beverloo. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Base class for a module. Stores the environment and handles magic such as route annotations. export class Module { constructor(env) { this.env_...
beverloo/node-home-server
src/module.js
JavaScript
mit
981
package com.timotheteus.raincontrol.handlers; import com.timotheteus.raincontrol.tileentities.IGUITile; import com.timotheteus.raincontrol.tileentities.TileEntityInventoryBase; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net....
kristofersokk/RainControl
src/main/java/com/timotheteus/raincontrol/handlers/GuiHandler.java
Java
mit
2,028
version https://git-lfs.github.com/spec/v1 oid sha256:be847f24aac166b803f1ff5ccc7e4d7bc3fb5d960543e35f779068a754294c94 size 1312
yogeshsaroya/new-cdnjs
ajax/libs/extjs/4.2.1/src/app/domain/Direct.js
JavaScript
mit
129
<?php namespace Matthimatiker\CommandLockingBundle\Locking; use Symfony\Component\Filesystem\LockHandler; /** * Uses files to create locks. * * @see \Symfony\Component\Filesystem\LockHandler * @see http://symfony.com/doc/current/components/filesystem/lock_handler.html */ class FileLockManager implements LockMan...
Matthimatiker/CommandLockingBundle
Locking/FileLockManager.php
PHP
mit
2,166
// Core is a collection of helpers // Nothing specific to the emultor application "use strict"; // all code is defined in this namespace window.te = window.te || {}; // te.provide creates a namespace if not previously defined. // Levels are seperated by a `.` Each level is a generic JS object. // Example: // te....
tyleregeto/8bit-emulator
src/core.js
JavaScript
mit
1,772
import Ember from 'ember'; let __TRANSLATION_MAP__ = {}; export default Ember.Service.extend({ map: __TRANSLATION_MAP__ });
alexBaizeau/ember-fingerprint-translations
app/services/translation-map.js
JavaScript
mit
126
import React from 'react'; <<<<<<< HEAD import { Switch, Route } from 'react-router-dom'; import Home from './Home'; import About from './About'; import Blog from './Blog'; import Resume from './Resume'; import Error404 from './Error404'; ======= // import GithubForm from './forms/github/GithubForm'; import GithubRec...
slkjse9/slkjse9.github.io
src/components/Content.js
JavaScript
mit
2,049
package cmd import ( "github.com/fatih/color" out "github.com/plouc/go-gitlab-client/cli/output" "github.com/spf13/cobra" ) func init() { getCmd.AddCommand(getProjectVarCmd) } var getProjectVarCmd = &cobra.Command{ Use: resourceCmd("project-var", "project-var"), Aliases: []string{"pv"}, Short: "Get the ...
plouc/go-gitlab-client
cli/cmd/get_project_var_cmd.go
GO
mit
873