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 |
|---|---|---|---|---|---|
# Namespace for library
module P3
module TV
# Settings for P3 TV
class Settings
attr_accessor :path
DEFAULT_PATH = File::expand_path( "~/.p3tv/p3tv" )
EPISODES_JSON = 'episodes.json'
DEFAULTS = {
:library_path => '~/Movies/P3TV',
:download_path => '~/Downloads',
... | poulh/tvtime | lib/p3-tv/settings.rb | Ruby | mit | 7,815 |
import * as React from 'react';
function CubeIcon(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
{...props}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
... | dreamyguy/gitinsight | frontend/src/components/primitives/Icon/Cube.js | JavaScript | mit | 442 |
# module Hello
class Identity < ActiveRecord::Base
module Password
extend ActiveSupport::Concern
included do
validates_presence_of :email, :password, if: :is_password?
# email
validates_email_format_of :email, if: :is_password?
validates_uniqueness_of :email,
... | stulzer/hello | app/models/concerns/identity/password.rb | Ruby | mit | 1,455 |
var repl = require('repl');
var server = repl.start({});
var con = server.context;
con.name='zfpx';
con.age = 5;
con.grow = function(){
return ++con.age;
}
| liushaohua/node-demo | part01/repl.js | JavaScript | mit | 160 |
//
// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
// LICENSE: Atomic Game Engine Editor and Tools EULA
// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
//
#include <Atomic/Core/ProcessUtils.h>
#i... | nonconforme/AtomicGameEngine | Source/AtomicTool/AtomicTool.cpp | C++ | mit | 9,385 |
/*
* boatWithSupport.cpp
*
* Created on: 16 de Abr de 2013
* Author: Windows
*/
#include "BoatWithSupport.h"
BoatWithSupport::BoatWithSupport(int extraCapacity) :
Boat() {
extraCap = extraCapacity;
lastMaxCap = 0;
lastTransported = 0;
}
BoatWithSupport::BoatWithSupport(int capacity, i... | jnadal/CAL | Projecto 1/codigo/source/BoatWithSupport.cpp | C++ | mit | 1,007 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "corponovo.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... | hhalmeida/corponovo | manage.py | Python | mit | 807 |
import time
t1=.3
t2=.1
path="~/Dropbox/Ingenieria/asignaturas_actuales"
time.sleep(t2)
keyboard.send_key("<f6>")
time.sleep(t2)
keyboard.send_keys(path)
time.sleep(t1)
keyboard.send_key("<enter>")
| andresgomezvidal/autokey_scripts | data/General/file manager/asignaturas_actuales.py | Python | mit | 200 |
package org.bitbucket.ytimes.client.main;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created by andrey on 27.05.17.
*/
public class Main {
public static void main( String[] args ) throws Exception {
ClassPathXmlApplicationContext ctx =
new ClassPath... | ytimesru/kkm-pc-client | src/main/java/org/bitbucket/ytimes/client/main/Main.java | Java | mit | 372 |
require 'oplogjam/noop'
require 'oplogjam/insert'
require 'oplogjam/update'
require 'oplogjam/delete'
require 'oplogjam/command'
require 'oplogjam/apply_ops'
module Oplogjam
InvalidOperation = Class.new(ArgumentError)
class Operation
def self.from(bson)
op = bson.fetch(OP, UNKNOWN)
case op
... | mudge/oplogjam | lib/oplogjam/operation.rb | Ruby | mit | 698 |
package alexp.blog.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import alexp.blog.repository.*;
import alexp.blog.model.Schedule;
@Service("ScheduleService")
public class ScheduleServiceImpl implements ScheduleService{
@Autowired
private... | ericjin527/MockInterview | src/main/java/alexp/blog/service/ScheduleServiceImpl.java | Java | mit | 569 |
export default {
queryRouteList: '/routes',
queryUserInfo: '/user',
logoutUser: '/user/logout',
loginUser: 'POST /user/login',
queryUser: '/user/:id',
queryUserList: '/users',
updateUser: 'Patch /user/:id',
createUser: 'POST /user',
removeUser: 'DELETE /user/:id',
removeUserList: 'POST /users/dele... | zuiidea/antd-admin | src/services/api.js | JavaScript | mit | 388 |
import Controller from '@ember/controller';
import { debounce } from '@ember/runloop';
import fetch from 'fetch';
import RSVP from 'rsvp';
export default class extends Controller {
searchRepo(term) {
return new RSVP.Promise((resolve, reject) => {
debounce(_performSearch, term, resolve, reject, 600);
})... | cibernox/ember-power-select | tests/dummy/app/templates/snippets/debounce-searches-1-js.js | JavaScript | mit | 534 |
import controller from './controller';
import template from './template.pug';
routes.$inject = ['$stateProvider', '$urlRouterProvider'];
export default function routes($stateProvider, $urlRouterProvider){
$stateProvider.state('main.item', {
url: '/:id/item',
template: template,
controllerAs: 'ctrl',
contro... | bfunc/AngularWebpack | src/main/item/routes.js | JavaScript | mit | 346 |
import { OnInit, SimpleChanges, OnChanges } from '@angular/core';
import { Validator, AbstractControl } from '@angular/forms';
export declare class NotEqualValidator implements Validator, OnInit, OnChanges {
notEqual: any;
private validator;
private onChange;
ngOnInit(): void;
ngOnChanges(changes: S... | Dackng/eh-unmsm-client | node_modules/ng2-validation/dist/not-equal/directive.d.ts | TypeScript | mit | 467 |
var margin = {top: 0, right: 0, bottom: 0, left: 130},
width = 1500 - margin.right - margin.left,
height = 470 - margin.top - margin.bottom;
var i = 0,
duration = 750,
root;
var tree = d3.layout.tree()
.size([height, width]);
var diagonal = d3.svg.diagonal()
.projection(function(d) { return [... | lzlarryli/limelight | app/templates/js/treeplot.js | JavaScript | mit | 4,263 |
import { EventBus } from '../wires/event_bus';
class EventStore {
constructor(storeAdapter) {
this.adapter = storeAdapter;
}
appendToStream(streamId, expectedVersion, events) {
if (events.length === 0) {
return;
}
events.forEach(function(event) {
thi... | goldoraf/osef | src/storage/event_store.js | JavaScript | mit | 1,162 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;
namespace _02_Convert_from_base_N_to_base_10
{
public class ConvertFromBaseNToBase10
{
public static void Main()
{
string[] parameters = Consol... | akkirilov/SoftUniProject | 01_ProgrammingFundamentals/Homeworks/09_Strings-Ex/02_Convert from base-N to base-10/ConvertFromBaseNToBase10.cs | C# | mit | 1,199 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
using System.Threading;
namespace Joddgewe
{
public partial class Form1 : Form
{
private stri... | avinet/joddgewe | Joddgewe/Form1.cs | C# | mit | 7,184 |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h... | AlloyTeam/Nuclear | components/icon/esm/assignment-returned.js | JavaScript | mit | 355 |
(function () {
'use strict';
angular
.module('app.home')
.config(appRun);
/* @ngInject */
function appRun($stateProvider) {
$stateProvider
.state('root.home', {
url: '/',
templateUrl: 'app/home/home.html',
controller: 'Home',
controllerAs: 'vm',
});
}
... | hawkup/github-stars | angularjs/app/home/config.route.js | JavaScript | mit | 326 |
using OTransport.Factory;
using OTransport.Serializer.protobuf;
namespace OTransport.Serializer.protobuf
{
public static class ObjectTransportAssemblyLine_protobufExtension
{
/// <summary>
/// Use Protobuf Serialization to serialize objects
/// </summary>
/// <returns></returns... | RhynoVDS/ObjectTransport | Implementation/ObjectTransport.Serializer.protobuf/ObjectTransportAssemblyLine_protobufExtension.cs | C# | mit | 682 |
import React from 'react';
import {
Text,
View,
TextInput,
} from 'react-native';
import newChallengeStyles from '../../styles/newChallenge/newChallengeStyles';
import mainStyles from '../../styles/main/mainStyles';
import ItemSelectView from './ItemSelectView';
const propTypes = {
onChallengeUpdate... | SamyZ/BoomApp | js/views/newChallenge/PrizeView.js | JavaScript | mit | 2,598 |
/*
* Copyright (c) 2012 M. M. Naseri <m.m.naseri@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, m... | agileapes/jpowerpack | string-tools/src/main/java/com/agileapes/powerpack/string/exception/NoMoreTextException.java | Java | mit | 1,068 |
import React, {PropTypes} from 'react';
import L from 'leaflet';
import gh from '../api/GitHubApi';
import RaisedButton from 'material-ui/RaisedButton';
const REPO_TIMESPAN = {
ALLTIME: 0,
THIRTYDAYS: 1,
SIXTYDAYS: 2,
ONEYEAR: 3
};
const defaultMapConfig = {
options: {
center: [
... | jefferey/octoviz | src/components/views/RepoUserHeatmap.js | JavaScript | mit | 2,707 |
import java.security.Security;
import java.util.Base64;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.engines.RijndaelEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.paddings.PKCS7Padding;
impor... | mseclab/AHE17 | Token-Generator/src/main/java/DotNet.java | Java | mit | 3,987 |
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("03... | delian1986/SoftUni-C-Sharp-repo | Old Courses/Programming Fundamentals Old/03. Methods/Methods/03. Printing Triangle/Properties/AssemblyInfo.cs | C# | mit | 1,418 |
function lessThan (a, b) {
return a < b
}
function main () {
for (var i = 0; i < 10000; i++) {
lessThan(1, 0x7fffffff)
}
for (var i = 0; i < 10000; i++) {
lessThan(1, Infinity)
}
for (var i = 0; i < 10000; i++) {
lessThan(1, 0x7fffffff)
}
}
main()
| bigeasy/hotspot | jit/less-than.js | JavaScript | mit | 304 |
/*!
* hybridify-all <https://github.com/hybridables/hybridify-all>
*
* Copyright (c) 2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.
*/
'use strict'
var reduce = require('object.reduce')
var hybridify = require('hybridify')
/**
* > Hybridifies all the selected functions in an object... | hybridables/hybridify-all | index.js | JavaScript | mit | 1,844 |
/*! p5.dom.js v0.3.3 May 10, 2017 */
/**
* <p>The web is much more than just canvas and p5.dom makes it easy to interact
* with other HTML5 objects, including text, hyperlink, image, input, video,
* audio, and webcam.</p>
* <p>There is a set of creation methods, DOM manipulation methods, and
* an extended p5.Eleme... | dsii-2017-unirsm/dsii-2017-unirsm.github.io | taniasabatini/10PRINT/libraries/p5.dom.js | JavaScript | mit | 70,383 |
<?php
namespace Nur\Database;
use Illuminate\Database\Eloquent\Model as EloquentModel;
/**
* @mixin \Illuminate\Database\Query\Builder
*/
class Model extends EloquentModel
{
/**
* Create Eloquent Model.
*
* @param array $attributes
*
* @return void
*/
function __construct(arra... | izniburak/nur-core | src/Database/Model.php | PHP | mit | 489 |
module Miro
class DominantColors
attr_accessor :src_image_path
def initialize(src_image_path, image_type = nil)
@src_image_path = src_image_path
@image_type = image_type
end
def to_hex
return histogram.map{ |item| item[1].html } if Miro.histogram?
sorted_pixels.collect { |pix... | oxoooo/miro | lib/miro/dominant_colors.rb | Ruby | mit | 4,361 |
<?php
include_once('Msidcalendar_LifeCycle.php');
class Msidcalendar_Plugin extends Msidcalendar_LifeCycle {
/**
* See: http://plugin.michael-simpson.com/?page_id=31
* @return array of option meta data.
*/
public function getOptionMetaData() {
// http://plugin.michael-simpson.com/?pa... | bretthamilton/msidcalendar | Msidcalendar_Plugin.php | PHP | mit | 6,513 |
<div class="container-fluid">
<div class="page-content">
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form action="<?php echo base_url(); ?>User/user_dashboard/editorginfo" method="POST" role="form" class="horizontal-form">
<div class="form-body">
... | mrkjohnperalta/ITSQ | application/views/USER/user_editorginfo.php | PHP | mit | 3,737 |
import {Server, Config} from "./server";
import * as path from "path";
/**
* Load configuration file given as command line parameter
*/
let config: Config;
if (process.argv.length > 2) {
const configPath = path.join(__dirname, process.argv[2]);
console.info("loading configuration file: " + configPath);
config... | filosofianakatemia/qne | server/src/index.ts | TypeScript | mit | 482 |
import { createStore } from '@utils/store.utils';
import placeholderImage from '../images/placeholder.jpeg';
import { getPhotoUrl, getPrefetchedPhotoForDisplay } from './api';
import { getLocalPhotoPath, getRandomLocalPhoto } from './photos.local';
import Settings from './settings';
export const getStateObject = (forc... | emadalam/mesmerized | src/modules/background/utils/store.js | JavaScript | mit | 1,498 |
using System;
using System.ComponentModel;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace Moen.KanColle.Dentan.ViewModel
{
public abstract class ViewModel<T> : ModelBase, IDisposable
where T : ModelBase
{
public T Model { get; private set; }
public IConnectableO... | KodamaSakuno/ProjectDentan | Dentan/ViewModel/ViewModel`T.cs | C# | mit | 1,000 |
import {Component} from 'react';
import {reduxForm} from 'redux-form';
import './CreateTodoForm.styl';
class CreateTodoForm extends Component {
render() {
return (
<form className="create-todo-form" onSubmit={this.props.handleSubmit} autoComplete="off">
<input type="text" placeholder="Todo text...... | malykhinvi/generator-spa | generators/app/templates/src/pages/TodosPage/CreateTodoForm.js | JavaScript | mit | 651 |
require 'spec_helper'
describe SK::GameObjectManager do
it "can create a game_object with a name" do
expect(SK::GameObjectManager.new).to respond_to(:create).with(1).argument
end
it "can not create a game_object without a name" do
expect(SK::GameObjectManager.new).to_not respond_to(:create).with(0).arguments
... | eriksk/shirokuro | spec/shirokuro/ecs/game_object_manager_spec.rb | Ruby | mit | 3,298 |
module DataMapper
# :include:/QUICKLINKS
#
# = Types
# Provides means of writing custom types for properties. Each type is based
# on a ruby primitive and handles its own serialization and materialization,
# and therefore is responsible for providing those methods.
#
# To see complete list of supported... | cardmagic/dm-core | lib/data_mapper/type.rb | Ruby | mit | 4,085 |
namespace Archient.Razor.TagHelpers
{
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
using Microsoft.AspNet.Razor.TagHelpers;
[TagName("asp-if-authenticated")]
[ContentBehavior(ContentBehavior.Modify)]
public class AuthenticatedUserTagHelper : ConditionalDisplayTagHelperBase
{
protec... | ericis/me | Web/src/Archient.Razor.TagHelpers/AuthenticatedUserTagHelper.cs | C# | mit | 557 |
<?php
/**
Telerivet_ScheduledMessage
Represents a scheduled message within Telerivet.
Fields:
- id (string, max 34 characters)
* ID of the scheduled message
* Read-only
- content
* Text content of the scheduled message
* Read-only
... | Telerivet/telerivet-php-client | lib/scheduledmessage.php | PHP | mit | 6,284 |
import React, { useState, useRef } from 'react';
import { computeOutOffsetByIndex, computeInOffsetByIndex } from './lib/Util';
// import { SVGComponent } from './lib-hooks/svgComp-hooks';
import Spline from './lib/Spline';
import DragNode from './lib/Node';
const index = ({
data,
onNodeDeselect,
onNodeMove... | lightsinthesky/react-node-graph | index.js | JavaScript | mit | 6,053 |
var t = require('chai').assert;
var P = require('bluebird');
var Renderer = require('../').Renderer;
var view = {
"name": {
"first": "Michael",
"last": "Jackson"
},
"age": "RIP",
calc: function () {
return 2 + 4;
},
delayed: function () {
return new P(function (resolve) {
setTimeout(r... | taoyuan/mustem | test/renderer.test.js | JavaScript | mit | 5,908 |
import { Component ,OnInit} from '@angular/core';
import {GlobalService} from '../_globals/global.service';
import {PermissionService} from './permission.service';
import {ContentTypeService} from '../content_types/content_type.service';
import {Permission} from './permission';
@Component({
selector: 'permission-in... | morfat/angular-quickstart | src/app/permissions/permission.component.ts | TypeScript | mit | 3,259 |
using Treefrog.Extensibility;
using Treefrog.Framework.Model;
using Treefrog.Plugins.Tiles.Layers;
using Treefrog.Presentation;
using Treefrog.Presentation.Layers;
using Treefrog.Render.Layers;
namespace Treefrog.Plugins.Tiles
{
public static class Registration
{
// Layer Presenter Creation
[... | jaquadro/Treefrog | Treefrog/Plugins/Tile/Registration.cs | C# | mit | 2,521 |
import collections
import re
import urlparse
class DSN(collections.MutableMapping):
''' Hold the results of a parsed dsn.
This is very similar to urlparse.ParseResult tuple.
http://docs.python.org/2/library/urlparse.html#results-of-urlparse-and-urlsplit
It exposes the following attributes:
... | mylokin/servy | servy/utils/dsntool.py | Python | mit | 4,496 |
package org.ebaloo.itkeeps.core.domain.vertex;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.ebaloo.itkeeps.api.enumeration.enAclAdmin;
import org.ebaloo.itkeeps.api.enumeration.enAclData;
import org.ebaloo.itkeeps.api.model.jAclGroup;
import org.ebaloo... | e-baloo/it-keeps | it-keeps-core/src/main/java/org/ebaloo/itkeeps/core/domain/vertex/vAclGroup.java | Java | mit | 6,089 |
import { expect } from 'chai';
import 'mocha';
import { Integer, TestContext } from '../../..';
import { makeInteger } from './make-integer';
describe('make-integer', () => {
it('should handle single digits', () => {
const ctx = new TestContext("test");
const delayedValue = makeInteger("5");
const value ... | lemtzas/rollem-discord | packages/language/src/rollem-language-2/evaluators/unary/make-integer.spec.ts | TypeScript | mit | 1,351 |
<?php
/**
* This file is part of GSSimpleOcr.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) 2014 Gordon Schmidt
* @license MIT
*/
namespace GSSimpleOcr\Service;
use GSImage\Entity\Image;
use GSOcr\S... | GordonSchmidt/GSSimpleOcr | src/GSSimpleOcr/Service/SimpleOcrService.php | PHP | mit | 8,111 |
package com.vexus2.jenkins.chatwork.jenkinschatworkplugin.api;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown... | jenkinsci/chatwork-plugin | src/main/java/com/vexus2/jenkins/chatwork/jenkinschatworkplugin/api/Room.java | Java | mit | 992 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors.server.controller'),
Task = mongoose.model('Task'),
Project = mongoose.model('Project'),
Person = mongoose.model('Person'),
_ = require('lodash');
/**
* Create a Task
*/
var person, project;... | andela-ajayeoba/Calendarize | app/controllers/tasks.server.controller.js | JavaScript | mit | 3,108 |
import { useCallback, useState, useEffect } from 'react';
import { KeyStore } from './keystore';
import type { Accounts, Hooks as HooksType } from './../types';
export const Hooks = {
useKeyStore: () => {
const [accounts, setAccounts] = useState<Accounts>();
const [error, setError] = useState<string>();
... | YsnKsy/react-native-geth | src/packages/hooks.tsx | TypeScript | mit | 960 |
package net.ihiroky.reservoir.coder;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
/**
* Created on 12/10/04, 19:26
*
* @author Hiroki Itoh
*/
public class ByteBufferOutputStream extends OutputStream {
ByteBuffer byteBuffer;
ByteBufferOutputStream(int initialCapaci... | ihiroky/reservoir | src/main/java/net/ihiroky/reservoir/coder/ByteBufferOutputStream.java | Java | mit | 1,244 |
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'directory' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'directory.services' is found in services.js
// 'directory.controllers' ... | zzeleznick/zzeleznick.github.io | hackerlove/main/www/js/app.js | JavaScript | mit | 3,330 |
const fs = require('fs');
class Loader {
static extend (name, loader) {
return { name, loader };
}
static get (name, options) {
const item = options.loaders.find((loader) => name === loader.name);
if (!item) {
throw new Error(`Missing loader for ${name}`);
}
return item.loader;
}
... | vuedoc/parser | lib/Loader.js | JavaScript | mit | 1,150 |
package org.ayo.ui.sample.material;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import... | cowthan/Ayo2022 | Ayo/app/src/main/java/org/ayo/ui/sample/material/ScaleTitlebarBehavior.java | Java | mit | 2,886 |
/*
* The MIT License
*
* Copyright 2019 Intuit Inc.
*
* 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, modi... | intuit/karate | karate-core/src/main/java/com/intuit/karate/job/JobUtils.java | Java | mit | 5,009 |
const storage = require("./storage");
const recognition = require("./recognition");
async function labelPictures(bucketName) {
const bucket = await storage.getOrCreateBucket(bucketName);
const fileNames = await storage.ls(bucket);
for (const file of fileNames) {
console.log(`Retrieve labels for fi... | zack17/klio-picture-labeler | labler.js | JavaScript | mit | 1,072 |
require "magnitude"
describe Magnitude::Registry do
context "#register" do
it "registers a unit and returns an instance" do
result = subject.register(:length, name: "meter", abbr: :m)
expect(result).to be_kind_of(Magnitude::Unit)
expect(result.name).to eq("meter")
end
end
context "#fet... | rwz/magnitude | spec/registry_spec.rb | Ruby | mit | 1,972 |
import Ember from 'ember';
export default Ember.Controller.extend({
resume: Ember.inject.controller(),
actions: {
scrollToElem: function(selector) {
this.get('resume').send('scrollToElem', selector);
},
selectTemplate: function(template) {
this.get('resume').send('selectTemplate', template)... | iorrah/you-rockstar | app/controllers/resume/index.js | JavaScript | mit | 439 |
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\XMPPlus;
use JMS\Serializer\Annotation\ExclusionPolic... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/XMPPlus/MinorModelAgeDisclosure.php | PHP | mit | 2,220 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 24 12:49:36 2017
@author: drsmith
"""
import os
from .globals import FdpError
def canonicalMachineName(machine=''):
aliases = {'nstxu': ['nstx', 'nstxu', 'nstx-u'],
'diiid': ['diiid', 'diii-d', 'd3d'],
'cmod': ['... | Fusion-Data-Platform/fdp | fdp/lib/datasources.py | Python | mit | 1,353 |
process.env.NODE_ENV = 'test';
const chai = require('chai');
const chaiHttp = require('chai-http');
const should = chai.should();
const CostCalculator = require("../libs/costcalculator");
describe('Calculate Cost', () => {
describe("Book Meeting Room", () => {
it("it should calcuate cost for meetin... | 10layer/jexpress | test/costcalculator.js | JavaScript | mit | 675 |
<?php
/**
* Created by PhpStorm.
* User: GuoHao
* Date: 2016/1/10
* Time: 14:32
*/
class BeauticianRestModel extends BaseModel
{
public function setTable()
{
$this->table = 'beautician_rest';
}
public function rules()
{
$validate = new ValidateUtil();
... | guohao214/xinya | application/models/BeauticianRestModel.php | PHP | mit | 561 |
package com.java.group34;
import java.util.ArrayList;
/**
* Created by dell-pc on 2017/9/11.
*/
public class NewsPictures {
private Value[] value;
private static class Value
{
String contentUrl;
}
public ArrayList<String> getFirstNthPictures(int n)
{
ArrayList<String> ans=ne... | bennyguo/AssemblyNews | app/src/main/java/com/java/group34/NewsPictures.java | Java | mit | 500 |
module.exports = {
// Token you get from discord
"token": "",
// Prefix before your commands
"prefix": "",
// Port for webserver (Not working)
"port": 8080,
// Mongodb stuff
"mongodb": {
// Mongodb uri
"uri": ""
},
// Channel IDs
"channelIDs": {
// Where to announce the events in A... | rey2952/RoverBot | config.js | JavaScript | mit | 455 |
Object.prototype.getKeyByValue = function( value ) {
for( var prop in this ) {
if( this.hasOwnProperty( prop ) ) {
if( this[ prop ] === value )
return prop;
}
}
}
| tametheboardgame/tametheboardgame.github.io | CrushTheCrown/tools.js | JavaScript | mit | 217 |
require('./ramda-mori')
| fractalPlatform/Fractal.js | tests/index.js | JavaScript | mit | 24 |
<?php
use Squarely\Setup;
use Squarely\Wrapper;
?>
<?php get_template_part('templates/head'); ?>
<body <?php body_class('main-body'); ?>>
<!--[if IE]>
<div class="alert alert-warning">
<?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade y... | jessicahawkins3344/SquarelyV.1 | base-template-home.php | PHP | mit | 810 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ach" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About CoinsBazar Core</source>
<translation type="unfinished"/>
</message>
<message>
<locati... | aqavi-paracha/coinsbazar | src/qt/locale/bitcoin_ach.ts | TypeScript | mit | 130,916 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
namespace DND.AspNetCore.Web.Models.ManageViewModels
{
public class IndexViewModel
{
public bool HasPassword { get; set; }
public IList<UserLoginInfo> Logins {... | davidikin45/DigitalNomadDave | DND.AspNetCore.Web/Models/ManageViewModels/IndexViewModel.cs | C# | mit | 490 |
/**
* Programmer: Minhas Kamal (BSSE0509,IIT,DU)
* Date: 30-Mar-2014
**/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define X 3
struct node{
int value;
int depth;
node *previous;
node *next[X];
} nullNode;
int main(){
///input array
... | MinhasKamal/AlgorithmImplementations | dataStructures/tree/BinomialTree.cpp | C++ | mit | 2,759 |
<?php
namespace PlaceFinder\APIBundle\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://sym... | yoannrenard/place-finder | src/PlaceFinder/APIBundle/DependencyInjection/Configuration.php | PHP | mit | 886 |
/*istanbul ignore next*/'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable =... | homer0/egojs | dist/utils.js | JavaScript | mit | 6,397 |
// shexmap-simple - Simple ShEx2 validator for HTML.
// Copyright 2017 Eric Prud'hommeux
// Release under MIT License.
const ShEx = ShExWebApp; // @@ rename globally
const ShExJsUrl = 'https://github.com/shexSpec/shex.js'
const RdfJs = N3js;
const ShExApi = ShEx.Api({
fetch: window.fetch.bind(window), rdfjs: RdfJs, ... | shexSpec/shex.js | packages/extension-map/doc/shexmap-simple.js | JavaScript | mit | 82,436 |
var Branch = function (origin, baseRadius, baseSegment, maxSegments, depth, tree) {
this.gid = Math.round(Math.random() * maxSegments);
this.topPoint = origin;
this.radius = baseRadius;
this.maxSegments = maxSegments;
this.lenghtSubbranch = tree.genes.pSubBranch !== 0 ? Math.floor(maxSegments * tree.gene... | tupini07/Brownian-Shrubs | js/Branch.js | JavaScript | mit | 3,324 |
/// <reference path="../../config/config.ts" />
/// <reference path="../interfaces/directives/IDirective.ts" />
declare var angular:any;
//Directive responsible for manipulating left (top) menu icons area when available size change
module Directives {
'use strict';
export class LeftMenuAutosize implements Di... | tsimeunovic/BerryForms | client/angular/directives/leftMenuAutosize.ts | TypeScript | mit | 6,839 |
package org.craft.client.render.blocks;
import java.util.*;
import java.util.Map.Entry;
import com.google.common.collect.*;
import org.craft.blocks.*;
import org.craft.blocks.states.*;
import org.craft.client.*;
import org.craft.client.models.*;
import org.craft.client.render.*;
import org.craft.client.render.textur... | OurCraft/OurCraft | src/main/java/org/craft/client/render/blocks/BlockModelRenderer.java | Java | mit | 8,599 |
// Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
usi... | xlgames-inc/XLE | Tools/NodeEditor/Program.cs | C# | mit | 1,542 |
# encoding: utf-8
module Eij
class Translator
def initialize(key)
@src = File.dirname(__FILE__) + "/func.sh"
@func = File.dirname(__FILE__) + "/../../data/kanjidicks.txt"
@col = %x{bash -lic 'echo $COLUMNS'}
@msg = key
@res = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }
... | jollywho/eij | lib/eij/translator.rb | Ruby | mit | 5,026 |
using System;
using System.Collections.Generic;
using System.Linq;
using Moq;
using NUnit.Framework;
using Ploeh.AutoFixture;
using RememBeer.Models.Contracts;
using RememBeer.Models.Dtos;
using RememBeer.Models.Factories;
using RememBeer.Services.RankingStrategies;
using RememBeer.Tests.Utils;
namespace RememBee... | J0hnyBG/RememBeerMeMvc | src/RememBeer.Tests/Services/RankingStrategies/DoubleOverallScoreStrategyTests/GetBeerRank_Should.cs | C# | mit | 6,676 |
using CreativeMinds.CQS.Commands;
using NForum.Core.Dtos;
using NForum.Datastores;
using NForum.Domain;
using NForum.Infrastructure;
using System;
using System.Security.Principal;
namespace NForum.CQS.Commands.Topics {
public class CreateTopicCommandHandler : CommandWithStatusHandler<CreateTopicCommand> {
protect... | steentottrup/NForum | src/NForum/CQS/Commands/Topics/CreateTopicCommandHandler.cs | C# | mit | 1,229 |
<?php
namespace js4php5;
/**
* Blatantly stolen from Yii2 for debug use, as it's much better than var_dump() or print_r() (but not as good as
* the one included in some other frameworks).
*/
class VarDumper
{
private static $_output;
private static $_depth;
private static $_objects;
/**
* Dis... | hiltonjanfield/js4php5 | VarDumper.php | PHP | mit | 6,924 |
/**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* ... | cscfa/bartleby | library/logBack/logback-1.1.3/logback-core/src/main/java/ch/qos/logback/core/pattern/color/GrayCompositeConverter.java | Java | mit | 970 |
<?php
namespace OroCRM\Bundle\ContactBundle\Tests\Unit\Twig;
use OroCRM\Bundle\ContactBundle\Twig\SocialUrlExtension;
use OroCRM\Bundle\ContactBundle\Model\Social;
class SocialUrlExtensionTest extends \PHPUnit_Framework_TestCase
{
/**
* @var SocialUrlExtension
*/
protected $twigExtension;
/**
... | MarkThink/OROCRM | vendor/oro/crm/src/OroCRM/Bundle/ContactBundle/Tests/Unit/Twig/SocialUrlExtensionTest.php | PHP | mit | 3,113 |
<?php
/**
* @author rugk
* @copyright Copyright (c) 2015-2016 rugk
* @license MIT
*/
// set end of line
$eol = PHP_EOL;
if (php_sapi_name() != 'cli') {
$eol .= '<br>';
}
//list all functions
$functions = get_extension_funcs('libsodium');
foreach ($functions as $func) {
echo $func . $eol;
}
echo $eol;
| rugk/threema-msgapi-webui | debug/libsodium_functions.php | PHP | mit | 317 |
require 'doorkeeper/oauth/assertion_access_token_request'
module Doorkeeper
module Request
class Assertion
def self.build(server)
new(server)
end
attr_reader :server
def initialize(server)
@server = server
end
def request
@request ||= OAuth::AssertionAccessTokenRequest.new(server, ... | kioru/doorkeeper-jwt_assertion | lib/doorkeeper/request/assertion.rb | Ruby | mit | 416 |
//process.argv.forEach(function (val, index, array) { console.log(index + ': ' + val); });
var fs = require('fs');
(function () {
function slugify(text) {
text = text.replace(/[^-a-zA-Z0-9,&\s]+/ig, '');
text = text.replace(/-/gi, "_");
text = text.replace(/\s/gi, "-");
return text;
}
var DocGen = {
... | alaingilbert/ttdashboard | server/gatherer/parser.js | JavaScript | mit | 5,796 |
require 'rest_client'
module WebHook
# Makes a http request to the target endpoint passing contents as data
def self.send_message(endpoint, content)
# TODO:
# - Make webrequest
# - If success return success
# - If error, return error
response = RestClient.post endpoint, content.to_json, :conten... | WiretapServer/wiretap-server | helpers/webhook.rb | Ruby | mit | 480 |
# -*- coding:utf-8 -*-
# This code is automatically transpiled by Saklient Translator
import six
from ..client import Client
from .model import Model
from ..resources.resource import Resource
from ..resources.licenseinfo import LicenseInfo
from ...util import Util
import saklient
str = six.text_type
# module saklien... | sakura-internet/saklient.python | saklient/cloud/models/model_licenseinfo.py | Python | mit | 4,306 |
'use strict';
exports.name = '/activation';
| longlh/di-linker | test/data/activation.js | JavaScript | mit | 45 |
<?php
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
* appdevUrlGenerator
*
* This class has been auto-generated
* by the Symfony Routing Component.
*/
class appdevUrlGenerator extends Symfony\Component\Routing\Generator\UrlGenerator
{
stati... | JKord/CreditUnionSoftwareDb | app/cache/dev/appdevUrlGenerator.php | PHP | mit | 20,470 |
const _ = require('lodash')
const Joi = require('joi')
module.exports = {
name: 'href',
params: {
href: Joi.array().items(
Joi.string(),
Joi.func().ref()
).min(1)
},
setup (params) {
params.href = [''].concat(params.href)
this._flags.href = params.href
},
validate (params, value... | hrithikp/joi-link | lib/rule.js | JavaScript | mit | 545 |
using System;
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using Neo.Gui.Base.Dialogs.Interfaces;
using Neo.Gui.Base.Dialogs.Results.Wallets;
using Neo.Gui.Base.Managers.Interfaces;
using Neo.Gui.Base.Services.Interfaces;
namespace Neo.Gui.ViewModels.Wallets
{
public c... | jlgaffney/neo-gui-wpf | Neo.Gui.ViewModels/Wallets/OpenWalletViewModel.cs | C# | mit | 3,211 |
// Mucking with different levels
let currentLevel = { cells: undefined, dims: undefined };
if (0) {
currentLevel.cells = level;
currentLevel.dims = level_dims;
} else {
currentLevel.cells = LEVEL_ONE;
currentLevel.dims = LEVEL_ONE_DIMS;
}
// Return a reference to the (logical) cell's unique object
const _getCel... | petertorelli/OldSchoolRPG | js/globals.js | JavaScript | mit | 1,316 |
var fastn = require('fastn')({
_generic: require('fastn/genericComponent'),
list: require('fastn/listComponent'),
templater: require('fastn/templaterComponent'),
text: require('fastn/textComponent'),
ratingControl: require('./ratingControlComponent')
});
module.exports = function(settings){
ret... | shotlom/rating-control-component | index.js | JavaScript | mit | 378 |
import os
import logging
from jsub.util import safe_mkdir
from jsub.util import safe_rmdir
class Submit(object):
def __init__(self, manager, task_id, sub_ids=None, dry_run=False, resubmit=False):
self.__manager = manager
self.__task = self.__manager.load_task(task_id)
self.__sub_ids = sub_ids
self.__dry_run ... | jsubpy/jsub | jsub/operation/submit.py | Python | mit | 4,925 |
<?php
namespace rg\injektor;
class InjectionLoopException extends InjectionException {
}
| researchgate/injektor | src/rg/injektor/InjectionLoopException.php | PHP | mit | 91 |
#!/usr/bin/env node
'use strict';
var assert = require('assert');
var depRep = require('../../lib/depRep');
var oldJson = require('../fixtures/old.json');
var newJson = require('../fixtures/new.json');
var unsupported = require('../fixtures/unsupported.json');
function key(number, dev) {
var prefix = "/dependen... | kevin-smets/dep-rep | test/specs/depRepSpec.js | JavaScript | mit | 2,302 |