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 |
|---|---|---|---|---|---|
<?php
$registration_notice = '';
$success = false;
if ( isset($_POST['submit_registration']) ) { // process registration
$username = isset($_POST['username']) ? trim($_POST['username']) : '';
$email = isset($_POST['email']) ? trim($_POST['email']) : '';
$password = isset($_POST['password']) ? trim($... | simonewebdesign/Fushi | application/accounts/register.php | PHP | mit | 1,329 |
'use strict';
var angular = require('angular');
module.exports = angular.module('services.notifications', [])
.factory('notifications', ['$rootScope', function ($rootScope) {
var notifications = {
'STICKY' : [],
'ROUTE_CURRENT' : [],
'ROUTE_NEXT' : []
};
var notificationsService = {};
var addNo... | evangalen/webpack-angular-app | client/src/common/services/notifications.js | JavaScript | mit | 1,830 |
import KolibriModule from 'kolibri_module';
import { getCurrentSession } from 'kolibri.coreVue.vuex.actions';
import router from 'kolibri.coreVue.router';
import Vue from 'kolibri.lib.vue';
import store from 'kolibri.coreVue.vuex.store';
import heartbeat from 'kolibri.heartbeat';
/*
* A class for single page apps tha... | christianmemije/kolibri | kolibri/core/assets/src/kolibri_app.js | JavaScript | mit | 3,037 |
#!/bin/python
"""Fixes some common spelling errors. Might I add that this is one of the
reasons why having a website is useful?
"""
import os
import sys
def levenshtein_ratio(s1, s2, cutoff=None):
max_len = max(len(s1), len(s2))
if cutoff is not None:
cutoff = int(math.ceil((1.0 - cutoff) * max_len) +... | bskari/park-stamper | parks/scripts/initialize_db/fix_spelling.py | Python | mit | 5,292 |
module.exports = require('./lib/tapioca'); | salomaosnff/tapioca-load | index.js | JavaScript | mit | 42 |
package com.thedreamsanctuary.main.java.dreamplus.commands;
import com.thedreamsanctuary.main.java.dreamplus.DreamPlus;
import com.thedreamsanctuary.main.java.dreamplus.executors.DPFood;
import java.util.Random;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
... | TheDreamSanctuary/DreamPlus | main/java/com/thedreamsanctuary/main/java/dreamplus/commands/GetOtherDrunkCommand.java | Java | mit | 3,041 |
module.exports = function(server){
return {
login: require('./login')(server),
logout: require('./logout')(server)
}
}
| julien-sarazin/learning-nodejs | actions/auth/index.js | JavaScript | mit | 135 |
namespace SubsetSums
{
using System.Collections.Generic;
using System.Linq;
public static class SubsetsSumEvaluator
{
/// <summary>
/// Evaluates all possible subset sums. Negative numbers not allowed.
/// </summary>
/// <param name="numbers"></param>
/// <retur... | bstaykov/Telerik-DSA | 2015/DynamicProgramming/SubsetSums/SubsetsSumEvaluator.cs | C# | mit | 5,009 |
import { Model } from 'type-r';
import { RestfulFetchOptions, RestfulEndpoint, RestfulIOOptions, HttpMethod } from './restful';
export declare type ConstructUrl = (params: {
[key: string]: any;
}, model?: Model) => string;
export declare function fetchModelIO(method: HttpMethod, url: ConstructUrl, options?: Restful... | Volicon/Type-R | endpoints/restful/lib/fetchModel.d.ts | TypeScript | mit | 785 |
class CreatePosts < ActiveRecord::Migration
def change
create_table :posts do |t|
t.integer :user_id
t.string :title
t.text :content
t.timestamps null: false
end
end
end
| Bulldogse45/website_on_rails | db/migrate/20151116004951_create_posts.rb | Ruby | mit | 207 |
<?php
// /var/www/symfony2.0/alf/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/error.atom.twig
return array (
);
| radzikowski/alf | app/cache/dev/assetic/config/e/e3d82803dd71bab66d782bbf081c9e4b.php | PHP | mit | 144 |
using Qwack.Core.Basic;
using Qwack.Core.Instruments;
namespace Qwack.Core.Models
{
public interface IAssetPathPayoff
{
IAssetInstrument AssetInstrument { get; }
double AverageResult { get; }
bool IsComplete { get; }
double ResultStdError { get; }
CashFlowSc... | cetusfinance/qwack | src/Qwack.Core/Models/IAssetPathPayoff.cs | C# | mit | 658 |
package org.scenarioo.pizza.pageObjects;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import static org.junit.jupiter.api.Assertions.*;
public class SummaryPage extends BasePage {
public static void assertPizzaVerduraAndRedWineAreListed() {
... | scenarioo/pizza-delivery | src/test/java/org/scenarioo/pizza/pageObjects/SummaryPage.java | Java | mit | 861 |
namespace ConsoleTestApp.Features.C
{
using System;
using Miruken.Mvc.Console;
using Buffer = Miruken.Mvc.Console.Buffer;
public class CView : View<CController>
{
private readonly Menu menu;
public CView()
{
var output = new Buffer();
Content = outp... | Miruken-DotNet/Miruken.Mvc | Test/ConsoleTestApp/Features/C/CView.cs | C# | mit | 1,574 |
/*
* Copyright (c) 2015 Phoenix Scholars Co. (http://dpq.co.ir)
*
* 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,... | phoenix-scholars/angular-pluf | src/collection/services/collection.js | JavaScript | mit | 2,721 |
package com.nestedworld.nestedworld.data.database.entities;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.nestedworld.nestedworld.data.database.entities.base.BaseEntity;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotati... | NestedWorld/NestedWorld-Android | app/src/main/java/com/nestedworld/nestedworld/data/database/entities/ShopItem.java | Java | mit | 2,768 |
package fi.guagua.pixrayandroid.models;
import java.io.Serializable;
import java.util.ArrayList;
public class ScoreTypes implements Serializable {
private ArrayList<Integer> mIds;
private ArrayList<String> mNames;
private ArrayList<String> mColors;
public ScoreTypes(ArrayList<Integer> ids, ArrayList... | huiningd/PixrayAndroid | app/src/main/java/fi/guagua/pixrayandroid/models/ScoreTypes.java | Java | mit | 657 |
'use strict'
// ensure endpoint starts w/ http:// or https://
module.exports = function normalizeEndpoint (endpoint, version) {
if (endpoint == null) throw new Error('endpoint is required')
if (typeof endpoint !== 'string') throw new Error('endpoint must be a string')
if (endpoint === '') throw new Error('endpoi... | nodesource/nsolid-statsd | node_modules/nsolid-apiclient/lib/normalize-endpoint.js | JavaScript | mit | 726 |
"""
Tahmatassu Web Server
~~~~~~~~~~~~~~~~~~~~~
HTTP-status codes containing module
:copyright: (c) 2014 by Teemu Puukko.
:license: MIT, see LICENSE for more details.
"""
from werkzeug.wsgi import LimitedStream
class StreamConsumingMiddleware(object):
def __init__(self, app):
self.app = app
def __call__(se... | puumuki/tahmatassu-api | tahmatassu-server/middlewares.py | Python | mit | 813 |
import React, { Component } from 'react'
import cx from 'classnames'
import Collapse from 'react-collapse'
import {
MdAutorenew as IconChecking,
MdNote as IconSimple,
MdViewDay as IconSeparated,
} from 'react-icons/md'
import fetchGallery from 'helpers/fetchGallery'
import Tabbable from 'components/Tabbable'
... | mjmlio/mjml-app | src/components/NewProjectModal/TemplateChooser.js | JavaScript | mit | 4,575 |
$(document).ready(function () {
$('.eacc-change-photo-btn').bind('click', function () {
$('#eacc-change-photo-file').click();
return false;
});
$('.icon-menu').on('click', function () {
var is_active = $('#main-menu').hasClass('active');
if (is_active) {
$('#main-... | wzywno/tescopl_ng | js/test.js | JavaScript | mit | 1,483 |
import { Component, Input, OnInit } from '@angular/core';
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs/Observable';
import { ImagesService } from '../../shared/shared.module';
import { ISkill } from '../../models/skill.model';
import { ITranslation, IWork } ... | plastikaweb/plastikaweb2017 | src/app/who-module/skill/skill.component.ts | TypeScript | mit | 1,587 |
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class AttributeRoute extends Route {
@service cognito;
async model({ name }) {
if (name) {
const attrs = await this.cognito.user.getUserAttributesHash();
const value = attrs[name];
re... | paulcwatts/ember-cognito | tests/dummy/app/routes/attribute.js | JavaScript | mit | 382 |
import React from 'react';
import clsx from 'clsx';
import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core/styles';
import NoSsr from '@material-ui/core/NoSsr';
import Divider from '@material-ui/core/Divider';
import Grid from '@material-ui/core/Grid';
import Container from '@material-... | lgollut/material-ui | docs/src/pages/landing/Users.js | JavaScript | mit | 4,076 |
import { LavaJsOptions } from "./types";
export const DefaultOptions: LavaJsOptions = {
autodraw: false,
autoloadGoogle: true,
debug: false,
language: "en",
mapsApiKey: "",
responsive: true,
// datetimeFormat: "",
debounceTimeout: 250,
chartPackages: ["corechart"],
timezone: "America/Los_Angeles"
}... | lavacharts/lava.js | src/DefaultOptions.ts | TypeScript | mit | 322 |
/*
Dorm Room Control Server
July 28, 2014
notify.js
Sends notifications through Pushover's notification API
Copyright (c) 2014 by Tristan Honscheid
<MIT License>
*/
var req = require("request");
var app_token = "abwQbZzfMK7v2GvJcnFy8h1bNYHrTj";
/* Send a POST request to... | tristantech/Dorm-Room-Automation | NodeServer/lib/notify.js | JavaScript | mit | 1,918 |
// you can use includes, for example:
#include <algorithm>
#include <vector>
using namespace std;
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
int solution(vector<int> &A);
int solution(vector<int> &A) {
// write your code in C++14 (g++ 6.2.0)
sort(A.b... | gonini/Codility-Lesson | Lesson6/MaxProductOfThree/maxProductOfThree.cpp | C++ | mit | 424 |
require 'chef_runner'
require_relative '../../../lib/chef_runner/windows/bootstrap'
require_relative '../../../lib/chef_runner/windows/solo'
require_relative 'spec_helper'
describe ChefRunner::Windows::Solo do
it 'should provision machine using chef-solo' do
ChefRunner.bootstrap(params)
ChefRunner.solo(p... | MYOB-Technology/chef_runner | spec/integration/windows/windows_solo_spec.rb | Ruby | mit | 754 |
//..............................................................................
//
// This file is part of the Jancy toolkit.
//
// Jancy is distributed under the MIT license.
// For details see accompanying license.txt file,
// the public copy of which is also available at:
// http://tibbo.com/downloads/archive/... | vovkos/jancy | src/jnc_ct/jnc_ct_Parser/jnc_ct_Parser.cpp | C++ | mit | 82,212 |
/********************************************************************
The Multiverse Platform is made available under the MIT License.
Copyright (c) 2012 The Multiverse Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "... | longde123/MultiversePlatform | tools/TerrainAssembler/TerrainAssembler/Properties/Resources.Designer.cs | C# | mit | 4,084 |
import { DataView } from '@antv/data-set';
import { Chart } from '@antv/g2';
const data = [
{
State: 'AL',
'Under 5 Years': 310504,
'5 to 13 Years': 552339,
'14 to 17 Years': 259034,
'18 to 24 Years': 450818,
'25 to 44 Years': 1231572,
'45 to 64 Years': 1215966,
'65 Years and Over': 6... | antvis/g2 | examples/column/dodge-stack/demo/circular-stacked.ts | TypeScript | mit | 3,914 |
#include "VulkanDebug.h"
#include <windows.h>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <cstring>
#include <fstream>
#include <assert.h>
#include <stdio.h>
#include <vector>
#include <fcntl.h>
#include <io.h>
#include <iostream>
#include <vulkan.h>
namespace VKDebug
{
int validationLayerCount ... | yunyinghu/CVCT_Vulkan | source/VulkanDebug.cpp | C++ | mit | 3,485 |
<?php
use ElasticSearcher\Parsers\FragmentParser;
use ElasticSearcher\Fragments\Queries\TermQuery;
use ElasticSearcher\Fragments\Analyzers\StandardAnalyzer;
use ElasticSearcher\Dummy\Fragments\Filters\IDFilter;
class FragmentParserTest extends ElasticSearcherTestCase
{
public function testParsingRootLevel()
{
$pa... | madewithlove/elasticsearcher | tests/Parsers/FragmentParserTest.php | PHP | mit | 2,850 |
using System.Data;
using System.Net;
using OhioTrackStats.API.ServiceModel;
using OhioTrackStats.API.ServiceModel.Types;
using ServiceStack;
using ServiceStack.OrmLite;
namespace OhioTrackStats.API.ServiceInterface
{
public class EventService : Service
{
public IAutoQueryDb AutoQuery { get; set; }
... | OhioTrackStats/OhioTrackStats.API | src/OhioTrackStats.API.ServiceInterface/EventService.cs | C# | mit | 3,859 |
var fs = require('fs');
var path = require('path');
var config = require('rc')('easy-workflow', {
projectName: process.cwd().split(path.sep).pop()
});
module.exports = function (gulp) {
fs.readdirSync(__dirname).filter(function (file) {
return (file.indexOf(".") !== 0) && (file.indexOf('task_') === 0);... | grassmu/easy-workflow | templates/tasks/index.js | JavaScript | mit | 465 |
require 'open3'
Given(/^that a queue parent directory exists$/) do
td = TestDir.new('features/fixtures/setup/queue')
td.nuke
td.create_root
end
When(/^I setup the queue$/) do
_, e, s = Open3.capture3('rake git_transactor:setup:queue QUEUE_ROOT=features/fixtures/setup/queue/work')
raise RuntimeError.new(e)un... | NYULibraries/git_transactor | features/step_definitions/setup_queue_steps.rb | Ruby | mit | 461 |
class CreateRooms < ActiveRecord::Migration[5.0]
def change
create_table :rooms do |t|
t.string :code
t.string :name
t.integer :capacity
t.boolean :active
t.integer :time_grid_id
t.references :department, foreign_key: true
t.belongs_to :building, index: true
t.time... | fga-gpp-mds/2017.1-SIGS | SIGS/db/migrate/20170414134440_create_rooms.rb | Ruby | mit | 345 |
function readCookie(name) {
var nameEQ = encodeURIComponent(name) + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substr... | nuanri/hiblog | src/js-dev/src/blog-home.js | JavaScript | mit | 5,466 |
import {CommonGraphAPI} from '../common/CommonGraphAPI'
import {CommonGraphBuilders} from '../common/CommonGraphBuilders'
import {UndirectedGraphAPI} from './UndirectedGraphAPI'
import {AdjacencyListGraph} from './AdjacencyListGraph'
import {BipartiteBFS} from './BipartiteBFS'
/**
* Factory functions for creating ins... | prishedko/algorithms-ts | src/graphs/undirected/UndirectedGraphBuilders.ts | TypeScript | mit | 2,254 |
<?php
function _esc($n) {
$ESC = chr(27);
return $ESC . "[{$n}m";
}
$RESET_ALL = _esc(0);
$BRIGHT = _esc(1);
$DIM = _esc(2);
$NORMAL = _esc(2);
$BLACK = _esc(30);
$RED = _esc(31);
$GREEN = _esc(32);
$YELLOW = _esc(33);
$BLUE = _esc(34);
$MAGENTA = _esc(35);
$CYAN... | basp/lily | style.php | PHP | mit | 603 |
package sample.spring.security.test;
import org.springframework.security.test.context.support.WithSecurityContext;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTI... | opengl-8080/Samples | java/spring-security/common/src/test/java/sample/spring/security/test/MyTestUser.java | Java | mit | 529 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| T... | 0x4164/olqt-ci | application/config/routes.php | PHP | mit | 2,114 |
using System;
using System.Globalization;
using System.IO;
using Newtonsoft.Json.Linq;
using Skybrud.Umbraco.GridData.Models;
using Skybrud.Umbraco.GridData.Models.Config;
using Skybrud.Umbraco.GridData.Models.Values;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Skybrud.Umbraco.GridData.Converters {
... | skybrud/Skybrud.Umbraco.GridData | src/Skybrud.Umbraco.GridData/Converters/GridConverterBase.cs | C# | mit | 3,891 |
namespace OmniXaml
{
public class DefaultInstanceLifeCycleListener : IInstanceLifeCycleListener
{
public void OnBegin(object instance)
{
}
public void OnAfterProperties(object instance)
{
}
public void OnAssociatedToParent(object instance)
{
... | Perspex/OmniXAML | Source/OmniXaml/DefaultInstanceLifeCycleListener.cs | C# | mit | 397 |
// Surface.cpp
#include <stdafx.h>
#include "Surface.h"
#include "Surfaces.h"
#include "Program.h"
#include "HeeksConfig.h"
#include "tinyxml.h"
#include "PropertyLength.h"
#include "PropertyCheck.h"
#include "Reselect.h"
#include "SurfaceDlg.h"
int CSurface::number_for_stl_file = 1;
CSurface::CSurf... | play113/swer | heekscam-read-only/src/Surface.cpp | C++ | mit | 4,554 |
<?php
/**
Using names.txt, a 46K text file containing over five-thousand first names, begin by
sorting it into alphabetical order. Then working out the alphabetical value for each name,
multiply this value by its alphabetical position in the list to obtain a name score.
For example, when the list is sorted into alph... | jbaldwin/project_euler | p022/p22.php | PHP | mit | 1,393 |
from setuptools import setup
readme = open('README.md').read()
setup(name='HDFserver',
version='0.1',
author='Yohannes Libanos',
license='MIT',
description='REST service for HDF5 data stores',
py_modules=['HDFserver'],
long_description=readme,) | yohannesHL/HDFserver | setup.py | Python | mit | 281 |
import copy
class ArtifactEmulator:
def __init__(self, random_str, ctx, base_url):
self._random_str = random_str
self._ctx = ctx
self._artifacts = {}
self._artifacts_by_id = {}
self._files = {}
self._base_url = base_url
self._portfolio_links = {}
def cr... | wandb/client | tests/utils/artifact_emu.py | Python | mit | 5,987 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class AnimalsTesting
{
public static Random rnd = new Random();
public static void Main()
{
TestCreatures();
Cat[] catArr = FillCatArr();
Dog[] dogArr = FillDogArr();
Frog[] f... | dzhenko/TelerikAcademy | OOP/OOP-4-Object-Oriented-Programming-Principles-Part1/03. Animals/AnimalTesting.cs | C# | mit | 3,715 |
import { Token } from './token';
// -------------------------------------------------------------------------------------------------
// FIXTURES
// -------------------------------------------------------------------------------------------------
const EXAMPLE_ENCODED_TOKEN = 'eyJhbGciOiJSUzI1NiJ9.eyJlbWFpbCI6ImFiZWx... | cookingfox/stibble-api-client-angular | src/app/stibble-api-client/token/token.spec.ts | TypeScript | mit | 3,236 |
package ast;
import java.util.*;
/**
* @author GAO RISHENG A0101891L
* This class is mainly for construction of AST nodes representing a constant array in C/Java/Python
* Program and its respective syntax generation
*
*/
public class ASTExpressionUnitLiteralArray extends ASTExpressionUnitLiteral{
private static ... | MartinGaoR/talk-to-code | src/ast/ASTExpressionUnitLiteralArray.java | Java | mit | 1,741 |
package com.mdb255.wedding.test.config;
import java.util.List;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMes... | mdb255/wedding | wedding-test-ws/src/main/java/com/mdb255/wedding/test/config/ServletConfig.java | Java | mit | 1,444 |
/**
* @since 15-08-13 11:38
* @author vivaxy
*/
import Url from './index.js';
let assert = chai.assert;
describe('new Url()', function () {
it('should return link', function () {
let link = 'https://www.test.com:8080/vivaxy/test/url?name=vivaxy&year=2015#some',
urlLink = new Url(link);
... | vivaxy/url | src/test.js | JavaScript | mit | 15,592 |
import React from 'react/addons';
import BaseComponent from './BaseComponent';
import Note from './Note';
/*
* @class Note
* @extends React.Component
*/
class Board extends BaseComponent {
constructor(props) {
super(props);
this.state = {
notes: []
}
this._bind(
'update',
'ad... | carmouche/es6-react-stickynotes | src/app/components/Board.js | JavaScript | mit | 2,320 |
namespace BlizzardAPI.Wow.Item
{
public class ItemSource
{
public int SourceId { get; set; }
public string SourceType { get; set; }
}
}
| EcadryM/BlizzardAPI | BlizzardAPI/BlizzardAPI.Wow/Item/ItemSource.cs | C# | mit | 167 |
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Input Sediaan Baru
</h1>
</section>
<section class="content">
<div class="row">
<!-- left column -->
<div class="col-md-12">
<!-- general form elements -->
<div... | Quallcode/forkes | application/views/body/master/sediaan/create_dsp.php | PHP | mit | 1,683 |
var path = require('path');
var md5 = require('./../lib/md5file');
describe('md5file', function() {
it('should return md5 of file', function(done) {
var testFile = path.join(__dirname, 'data', 'a');
md5(testFile, function(hash) {
hash.should.be.eql('9195d0beb2a889e1be05ed6bb1954837');
done();
... | seandou/koa-assets-minify | test/md5file.test.js | JavaScript | mit | 337 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HilbertTransformationTests.Data.NetflixReviews
{
public class Probe
{
/// <summary>
/// The key is a movie id, the value, a list of reviewer ids for re... | paulchernoch/HilbertTransformation | HilbertTransformationTests/Data/NetflixReviews/Probe.cs | C# | mit | 1,639 |
/*
* 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.
*/
package logica;
import javax.swing.ImageIcon;
import bibliothek.gui.dock.common.action.CButton;
import java.awt.Image;
import java.... | darkdrei/CoreTesis | Desarrollo/Core/src/logica/CargarArchivoArbol.java | Java | mit | 5,774 |
migration_file = `ls #{RAILS_ROOT}/db/migrate/*create_sic_uk_tables.rb`
if migration_file && migration_file[/[^\d](\d+)_create_sic_uk_tables.rb/]
version = $1
puts `cd #{RAILS_ROOT}; rake db:migrate:down VERSION=#{version} --trace`
puts "removing: #{migration_file}"
puts `rm #{migration_file}`
end
| robmckinnon/sic_uk | uninstall.rb | Ruby | mit | 308 |
#include "clustermove.h"
#include "aux/eigensupport.h"
namespace Faunus {
namespace Move {
double Cluster::clusterProbability(const Cluster::Tgroup &g1, const Cluster::Tgroup &g2) const {
if (spc.geo.sqdist(g1.cm, g2.cm) <= thresholdsq(g1.id, g2.id))
return 1.0;
return 0.0;
}
void Cluster::_to_json(js... | gitesei/faunus | src/clustermove.cpp | C++ | mit | 9,289 |
/**
* Created by osboxes on 21/02/17.
*/
export * from './notes.component';
export * from './notes.routes';
| origamyllc/Mangular | src/client/app/notes/index.ts | TypeScript | mit | 110 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _htmlPdf = require('html-pdf');
var _htmlPdf2 = _interopRequireDefault(_htmlPdf);
var _handlebars = require('handlebars');
var _handlebars2 = _interopRequireDefault(_handlebars);
var _fs = require('fs');
var _fs2 = _interopRequi... | manuelnelson/patient-pal | dist/lib/reportHelper.js | JavaScript | mit | 2,378 |
<?php
class CommentWidget extends CWidget
{
public $type;
public $id;
public $limit;
public $uid;
public function init()
{
}
public function run()
{
$criteria=new CDbCriteria();
if($this->type==0)
$criteria->addCondition('dpid='.$this->id);
else
$criteria->addCondition('fd... | laijingsong/lacms | protected/widget/CommentWidget.php | PHP | mit | 1,135 |
// development configuration
// author: Kirk Austin
module.exports = {
environment: 'development',
server: {
name: 'Node Scratch',
port: 3001
},
log: {
name: 'node-scratch',
path: 'node-scratch.log'
}
}
| kirkaustin/node-scratch | config/development.js | JavaScript | mit | 225 |
import warnings
from collections import defaultdict
from queryset import QuerySet, QuerySetManager
from queryset import DoesNotExist, MultipleObjectsReturned
from queryset import DO_NOTHING
from mongoengine import signals
import sys
import pymongo
from bson import ObjectId
import operator
from functools import part... | newvem/mongoengine | mongoengine/base.py | Python | mit | 50,511 |
import Users from 'meteor/vulcan:users';
import { Utils, addGraphQLMutation, addGraphQLResolvers } from 'meteor/vulcan:core';
/**
* @summary Verify that the un/subscription can be performed
* @param {String} action
* @param {Collection} collection
* @param {String} itemId
* @param {Object} user
* @returns {Objec... | acidsound/Telescope | packages/vulcan-subscribe/lib/mutations.js | JavaScript | mit | 6,946 |
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class MY_Loader extends CI_Loader{
public function _construct(){
parent::_construct();
}
public function view($view, $vars = array(), $layout='', $return = FALSE)
{
$layout=($layout=='')?config_item('layout'):$layout;
$vars['contenido']=$... | maxdarkx/batalla_naval | application/core/MY_Loader.php | PHP | mit | 575 |
<?php
/**
* Webiny Platform (http://www.webiny.com/)
*
* @copyright Copyright Webiny LTD
*/
namespace Apps\Webiny\Php\Lib\UserProvider;
use Apps\Webiny\Php\Entities\ApiToken;
use Apps\Webiny\Php\Entities\SystemApiTokenUser;
use Apps\Webiny\Php\Entities\User;
use Apps\Webiny\Php\Lib\WebinyTrait;
/**
* This class... | Webiny/Webiny | Php/Lib/UserProvider/UserProviderEventHandler.php | PHP | mit | 1,174 |
<?php
namespace MailchimpTests\Lists;
use MailchimpAPI\Resources\Lists\SignupForms;
use MailchimpAPI\Resources\Lists;
use MailchimpTests\MailChimpTestCase;
/**
* Class SignupFormsTest
* @package MailchimpTests\Lists
*/
class SignupFormsTest extends MailChimpTestCase
{
/**
* @throws \MailchimpAPI\Mailchim... | Jhut89/Mailchimp-API-3.0-PHP | tests/Lists/SignupFormsTest.php | PHP | mit | 1,017 |
package kamil09875.bfparser.syntax;
import java.io.IOException;
import kamil09875.bfparser.BFMemory;
import kamil09875.bfparser.Translator;
public enum BFISet implements BFInstruction{
LEFT{
@Override
public void execute(final BFMemory memory, final boolean debug){
if(debug){
System.out.println("Moving l... | kamil09875/brainfuck-parser | src/kamil09875/bfparser/syntax/BFISet.java | Java | mit | 2,972 |
import test from 'ava';
import { defaultColors } from './defaultColors.js';
const tests = [
{
name: 'Dark background color defined in theme',
theme: {
colors: {
background: '#333333'
}
},
expectedResult: {
tickText: {
... | datawrapper/datawrapper | libs/shared/defaultColors.test.js | JavaScript | mit | 1,909 |
// Common test code
var chai = require('chai');
exports.chai = chai;
exports.expect = chai.expect;
exports.should = chai.should();
exports.request = require('request'); | Huskie/ScottishPremiershipData | test/common.js | JavaScript | mit | 169 |
// Cloud normal
module.exports = function updateRole(params) {
/*
█████╗ ███████╗██╗ ██╗███╗ ██╗ ██████╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██╗ ██╗
██╔══██╗██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝ ██╔╝██╔══██╗██║ ██║██╔══██╗╚██╗ ██╔╝
███████║███████╗ ╚████╔╝ ██╔██╗ ██║██║ ██╔╝ ███████║██║ █╗ ██║███████║ ╚█... | cuduy197/parse-express | cloud/dev.js | JavaScript | mit | 3,221 |
using System.Collections.Generic;
using GraphLib.CommonOperations;
using GraphLib.VertexCreation;
using GraphLib.Vertices;
using GraphLib.Visiting;
namespace GraphLib.SccDetection
{
public class SccDetector
{
private readonly Graph _graph;
public SccDetector(Graph graph)
{
... | tihilv/GraphLib | GraphLib/SccDetection/SccDetector.cs | C# | mit | 1,143 |
namespace GeckoUBL.Ubl21.Cac
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.33440")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespa... | JohnGrekso/GeckoUBL | src/GeckoUBL/Ubl21/Cac/BillingReferenceType.cs | C# | mit | 1,419 |
import composeWithTracker from 'compose-with-tracker'
import { Meteor } from 'meteor/meteor'
export default composeWithTracker((props, onData) => {
onData(null, {
isLoggingIn: Meteor.loggingIn(),
user: Meteor.user() || {},
})
})
| FractalFlows/Emergence | app/imports/client/Pages/User/container.js | JavaScript | mit | 242 |
var ipc = require('ipc_utils')
var id = 1;
var binding = {
getCurrent: function () {
var cb, getInfo;
if (arguments.length == 1) {
cb = arguments[0]
} else {
getInfo = arguments[0]
cb = arguments[1]
}
var responseId = ++id
ipc.once('chrome-windows-get-current-response-' + ... | posix4e/electron | atom/common/api/resources/windows_bindings.js | JavaScript | mit | 1,251 |
package main
import (
"flag"
"fmt"
"log"
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/yuriadams/smssender/api/controllers"
)
var (
logOn *bool
port *int
urlBase string
)
func init() {
domain := flag.String("d", "localhost", "domain")
port = flag.Int("p", 8888, "port")
logOn = flag.B... | yuriadams/smssender | server.go | GO | mit | 797 |
// Template Source: BaseMethodRequestBuilder.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// -----------------------------... | microsoftgraph/msgraph-sdk-java | src/main/java/com/microsoft/graph/requests/ReportRootGetYammerActivityCountsRequestBuilder.java | Java | mit | 3,693 |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var _this = this;
var _1 = require("../../../");... | viktorkh/elastickit_express | node_modules/searchkit/lib/src/__test__/core/accessors/StatefulAccessorSpec.js | JavaScript | mit | 3,647 |
<?php
namespace LiveData\Bundle\ShopBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Customer
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="LiveData\Bundle\ShopBundle\Entity\CustomerRepository")
*/
class Customer
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @O... | MDBK/LiveData | src/LiveData/Bundle/ShopBundle/Entity/Customer.php | PHP | mit | 4,980 |
const {
SearchkitManager,SearchkitProvider,
SearchBox, Hits, RefinementListFilter, Pagination,
CheckboxFilter,
HierarchicalMenuFilter, HitsStats, SortingSelector, NoHits,
GroupedSelectedFilters, SelectedFilters, ResetFilters,
RangeFilter, NumericRefinementListFilter,
ViewSwitcherHits, ViewSwitcherToggle, ... | viktorkh/elastickit_express | node_modules/searchkit/test/e2e/server/apps/playground/index.tsx | TypeScript | mit | 12,381 |
/*
The MIT License
Copyright (c) 2010-2021 Paul R. Holser, Jr.
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, mod... | pholser/junit-quickcheck | core/src/test/java/com/pholser/junit/quickcheck/runner/PropertyFalsifiedUtilityClassTest.java | Java | mit | 7,581 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BorderControl
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static vo... | schumann2k/BorderControl | BorderControl/Program.cs | C# | mit | 514 |
<?php
/*
* Peasant
* Copyright 2015 Norbert Zakariás (A.K.A. ZackRave-N). All Rights Reserved.
* This program is free software. You can redistribute and/or modify it in
* accordance with the terms of the accompanying license agreement.
*/
require_once('lib/com/zrnprojects/peasant/renderer/IRenderer.php');... | ZackRave-N/Peasant | unitTests/JsonRendererTest.php | PHP | mit | 940 |
package openblocks.client.model;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.ent... | emmertf/OpenBlocks | src/main/java/openblocks/client/model/ModelCraneBackpack.java | Java | mit | 8,011 |
class TimeUtil
def self.timestamp_to_seconds(timestamp)
hours, minutes, seconds = timestamp.split(':').map(&:to_i)
hours * 3600 + minutes * 60 + seconds
end
def self.seconds_to_timestamp(seconds)
hours, remainder = seconds.divmod(3600)
minutes, seconds = remainder.divmod(60)
"#{hours}:#{min... | burennto/tennis-highlights-maker | src/util/time_util.rb | Ruby | mit | 338 |
/**
* @license
* Copyright UIUX Engineering All Rights Reserved.
*/
import { createIndexDict } from './create-indexed-dict';
import { IIndexedItem, IIndexedItemDict, IIndexedTableItem } from './interfaces';
import { createTableItem } from './create-table-item';
import { hasValue } from '@uiux/cdk/value';
describe(... | UIUXEngineering/ix-material | libs/z_deprecated-cdk/store/src/indexed-table/reducers/create-table-item.spec.ts | TypeScript | mit | 2,343 |
package edu.buffalo.cse.maybeclient.rest;
import retrofit.GsonConverterFactory;
import retrofit.Retrofit;
/**
* Created by xcv58 on 10/15/15.
*/
public class ServiceFactory {
public static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {
final Retrofit retrofit = new Retrofit.B... | blue-systems-group/project.maybe.java.client | src/main/java/edu/buffalo/cse/maybeclient/rest/ServiceFactory.java | Java | mit | 505 |
<?php
//-------------------------------------------------------------
// * Name: PHP-PostGIS2GeoJSON v2
// * Purpose: GeoLab
// * Date: 2018/10/18
// * Author: Chingchai Humhong (chingchaih@nu.ac.th)
// * Acknowledgement:
//-------------------------------------------------------------
// Database connection setting... | chingchai/workshop | leaflet/condata.php | PHP | mit | 1,942 |
import os
import sys
import numpy as np
import properties
svm = properties.svm_path
model = properties.svm_model_path
output = properties.svm_output_path
config = []
config.append("bsvm-train.exe")
config.append("bsvm-predict.exe")
t = " -t 1 "
c = " -c 1 "
m = " -m 1024 "
w0 = " -w0 0.0384 "
w1 = " -w1 1.136 "
w2 = "... | sureshbvn/nlpProject | SVM_A/svm.py | Python | mit | 891 |
import { curry } from 'lodash/fp';
const checkIfClickedOutSideContainer = (containerEle, element) => {
if (!element) {
return true;
} else if (element === containerEle) {
return false;
} else {
return checkIfClickedOutSideContainer(containerEle, element.parentNode);
}
}
const o... | Attrash-Islam/infinite-autocomplete | src/onDocumentClick/index.js | JavaScript | mit | 612 |
load 'setup/undefine.rb'
require 'elasticsearch/model/extensions/all'
ActiveRecord::Schema.define(:version => 1) do
create_table :articles do |t|
t.string :title
t.datetime :created_at, :default => 'NOW()'
end
create_table :comments do |t|
t.integer :article_id
t.string :body
t.datetime :cr... | crowdworks/elasticsearch-model-extensions | spec/setup/articles_with_comments.rb | Ruby | mit | 2,214 |
import pandas as pd
import os
import subprocess as sub
import re
import sys
from Bio import SeqUtils
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
path = os.path.join(os.path.expanduser('~'),'GENOMES_BACTER_RELEASE69/genbank')
# ['DbxRefs','Description','FeaturesNum','GenomicID','Genomi... | sergpolly/Thermal_adapt_scripts | composition_analysis_Thermo.py | Python | mit | 11,114 |
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to diction... | dman7/machine-learning-as-a-service | config/initializers/secret_token.rb | Ruby | mit | 679 |
package com.armandgray.seeme.views;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.suppo... | armandgray/SeeMe | SeeMe/app/src/main/java/com/armandgray/seeme/views/NotesFragment.java | Java | mit | 7,802 |
/*!
* jquery.analytics.js
* API Analytics agent for jQuery
* https://github.com/Mashape/analytics-jquery-agent
*
* Copyright (c) 2015, Mashape (https://www.mashape.com)
* Released under the @LICENSE license
* https://github.com/Mashape/analytics-jquery-agent/blob/master/LICENSE
*
* @version @VERSION
* @date @... | Mashape/analytics-agent-jquery | src/jquery.analytics.js | JavaScript | mit | 11,673 |
include_recipe "markosamuli_workstation::git"
brew "tmux"
brew "reattach-to-user-namespace"
| markosamuli/osx-dev-setup | markosamuli_workstation/recipes/tmux.rb | Ruby | mit | 92 |
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("RA... | bigfont/2013-128CG-Vendord | HelpfulStuff/rapi2-86240/RAPI2/RAPI2TestM/Properties/AssemblyInfo.cs | C# | mit | 1,395 |