repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
ochi51/CybozuHttpBundle | tests/DependencyInjection/CybozuHttpExtensionTest.php | 1672 | <?php
namespace CybozuHttpBundle\Tests\DependencyInjection;
use CybozuHttpBundle\DependencyInjection\CybozuHttpExtension;
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
/**
* @author ochi51 <ochiai07@gmail.com>
*/
class CybozuHttpExtensionTest extends AbstractExtensionTestCase
{
... | mit |
janij/ionic | js/angular/directive/sideMenuContent.js | 9465 | /**
* @ngdoc directive
* @name ionSideMenuContent
* @module ionic
* @restrict E
* @parent ionic.directive:ionSideMenus
*
* @description
* A container for the main visible content, sibling to one or more
* {@link ionic.directive:ionSideMenu} directives.
*
* @usage
* ```html
* <ion-side-menu-content
* edg... | mit |
laincloud/hagrid | models/user.go | 4742 | package models
import (
"time"
"github.com/jinzhu/gorm"
"github.com/laincloud/hagrid/config"
)
type User struct {
ID int `gorm:"primary_key:true" form:"-"`
Name string `gorm:"type:varchar(64);not null;unique" form:"-"`
EmailAddress string `gorm:"type:varchar(64);not null" form:... | mit |
TBoehm/greedyaur | src/checkpoints.cpp | 2529 | // Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Copyright (c) 2013 AuroraCoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp... | mit |
AndrewGaspar/Podcasts | Podcasts.Shared/Transport/ForeroundMessageTransport.cs | 2449 | using System;
using System.Threading.Tasks;
using Podcasts.Messages;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Media.Playback;
namespace Podcasts.Transport
{
using ServiceReadyHandler = TypedEventHandler<ForeroundMessageTransport, ServiceReadyNotification>;
public class Fo... | mit |
myhgew/JGame_Slogo_Team11 | src/model/Model.java | 646 | package model;
import java.util.ResourceBundle;
import java.util.Map;
import controller.ControllerToModelInterface;
import java.util.Stack;
import model.expression.Expression;
import model.parser.Parser;
import Exceptions.SlogoException;
public abstract class Model {
public abstract void updateTrace (String user... | mit |
node-opcua/node-opcua | packages/node-opcua-nodeset-ua/source/ua_highly_managed_alarm_condition_class.ts | 824 | // ----- this file has been automatically generated - do not edit
import { UABaseConditionClass, UABaseConditionClass_Base } from "./ua_base_condition_class"
/**
* | | |
* |----------------|--------------------------------------------------|
* |namespac... | mit |
MassDebaters/DebateApp | DebateAppDomain/DebateAppDomainAPI/Program.cs | 610 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace DebateAppDomainAPI
{
public class Program
{
... | mit |
nickb1080/fast-poser | test/test.js | 20153 | var should = require('should'),
expect = require('expect.js'),
fast = require('../lib')();
describe('fast.bind()', function () {
var input = function (a, b, c) {
return a + b + c + this.seed;
};
var object = {
seed: 100
};
it('should bind to a context', function () {
var bound = fast.bin... | mit |
chafey/cornerstone | src/internal/calculateTransform.js | 3500 | import { Transform } from './transform.js';
/**
* Calculate the transform for a Cornerstone enabled element
*
* @param {EnabledElement} enabledElement The Cornerstone Enabled Element
* @param {Number} [scale] The viewport scale
* @return {Transform} The current transform
* @memberof Internal
*/
export default f... | mit |
sidoh/ha_gateway | ha_gateway.rb | 900 | require 'sinatra'
require 'sinatra/json'
require 'sinatra/param'
require 'sinatra/namespace'
require 'ledenet_api'
require 'bravtroller'
require 'easy_upnp'
require 'color'
require 'openssl'
require 'net/ping'
require 'open-uri'
require_relative 'helpers/config_provider'
require_relative 'helpers/security'
require_r... | mit |
maksa988/MyUCP | engine/protected/Response/Redirect.php | 488 | <?php
class Redirect
{
private $url;
public function __construct($value, $params = [])
{
if(gettype($value) == "object") {
$this->url = $value->getRedirectURL($params);
} else {
$this->url = $value;
}
return $this;
}
public function with($n... | mit |
bollsal/pikicast-java-study | src/test/java/quiz/elevator/ElevatorTest.java | 4097 | package quiz.elevator;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Created by bollsal on 2016. 11. 28..
*
* 10층짜리 건물.
*
* tick()호출시 1층씩 이동 (위아래상관없음)
*
*
* 1. 탑승객 인원 체크
*
* 2. 한사람만 타는 경우
* - 위로 올... | mit |
tokenly/bitsplit | app/Console/Commands/DeleteDistroTx.php | 2676 | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Models\Distribution as Distro, Models\DistributionTx as DistroTx;
use Models\Fuel;
class DeleteDistroTx extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature ... | mit |
gjeck/design-patterns | command/ruby/stock_command.rb | 1444 | class Stock
attr_reader :name, :market
def initialize(name, market)
@name = name
@market = market
end
def key
"#{market}:#{name}"
end
end
class Portfolio
attr_reader :store
def initialize(store={})
@store = store
end
def buy(stock, count)
... | mit |
VMatrixTeam/open-matrix | src/judgesystem/uniTest/testSandbox/main.cpp | 91 | #include <iostream>
int main() {
int a;
std::cin >> a;
std::cout << a;
return 0;
}
| mit |
fabiojaniolima/PGR | modulos/ssh/vendor/phpseclib/File/ASN1.php | 57159 | <?php
/**
* Pure-PHP ASN.1 Parser
*
* PHP versions 4 and 5
*
* ASN.1 provides the semantics for data encoded using various schemes. The most commonly
* utilized scheme is DER or the "Distinguished Encoding Rules". PEM's are base64 encoded
* DER blobs.
*
* File_ASN1 decodes and encodes DER formatt... | mit |
RobertFoll/RevMob-Xamarin-iOS | obj/Debug/ios/SupportDelegates.g.cs | 1961 | //
// Auto-generated from generator.cs, do not edit
//
// We keep references to objects, so warning 414 is expected
#pragma warning disable 414
using System;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Ru... | mit |
Wolframcheg/symfotest | src/AppBundle/Controller/Admin/ModuleUserController.php | 3258 | <?php
namespace AppBundle\Controller\Admin;
use AppBundle\Entity\ModuleUser;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;... | mit |
jacksonps4/jutils | src/main/java/com/minorityhobbies/util/ExceptionUtilities.java | 1605 | /*
Copyright (c) 2013 Chris Wraith
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, su... | mit |
nodoid/ChiSquared | ChiSquared/Properties/Settings.Designer.cs | 1095 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.488
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>... | mit |
carefree0910/MachineLearning | Zhihu/NN/_extra/two/Test.py | 630 | from Zhihu.NN._extra.two.Networks import *
from Util.Util import DataUtil
np.random.seed(142857) # for reproducibility
def main():
nn = NNDist()
epoch = 1000
timing = Timing(enabled=True)
timing_level = 1
nn.feed_timing(timing)
x, y = DataUtil.gen_spiral(100)
nn.ad... | mit |
saulmadi/Encomiendas | src/Encomiendas.Domain.Specs/Properties/AssemblyInfo.cs | 1424 | 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("En... | mit |
AcklenAvenue/surgicor_spike | src/SurgicorSpike.Web/Api/Infrastructure/RestExceptions/RestExceptionRepackager.cs | 869 | using System;
using System.Linq;
using Nancy.Bootstrapper;
namespace SurgicorSpike.Web.Api.Infrastructure.RestExceptions
{
public static class RestExceptionRepackager
{
public static RestExceptionRepackagingRegistrar Configure(Action<RestExceptionConfiguration> config)
{
var configu... | mit |
ScullinSteel/apple2js | js/roms/apple2plus.js | 75692 | function Apple2ROM()
{
var rom = [
0x6f,0xd8,0x65,0xd7,0xf8,0xdc,0x94,0xd9,
0xb1,0xdb,0x30,0xf3,0xd8,0xdf,0xe1,0xdb,
0x8f,0xf3,0x98,0xf3,0xe4,0xf1,0xdd,0xf1,
0xd4,0xf1,0x24,0xf2,0x31,0xf2,0x40,0xf2,
0xd7,0xf3,0xe1,0xf3,0xe8,0xf6,0xfd,0xf6,
0x68,0xf7,0x6e,0xf7,0xe6,0xf... | mit |
iawells/spark-parse | firmware/spark-parse.cpp | 617 | #include "spark-parse.h"
static const String hex_digits = String("0123456789ABCDEF");
// Turn a hex string into a number. NB: string has to be in uppercase.
int parse_hex(String s)
{
int val = 0;
int len = s.length();
int i;
for(i=0;i<len;i++) {
char digit = s.charAt(i);
int digit... | mit |
codeforabq/Open-Budget-ABQ | server.js | 493 | const express = require('express')
const path = require('path')
const port = process.env.PORT || 3000
const app = express()
// serve static assets normally
app.use(express.static(__dirname + '/'))
// handle every other route with index.html, which will contain
// a script tag to your application's JavaScript file(s).... | mit |
hypertiny/notches | app/models/notches/url.rb | 217 | class Notches::URL < ActiveRecord::Base
self.table_name = "notches_urls"
has_many :hits, :class_name => "Notches::Hit",
:foreign_key => 'notches_url_id'
validates :url, :presence => true
end
| mit |
ResolveWang/WeiboSpider | admin/weibo_config/apps.py | 126 | from django.apps import AppConfig
class WeiboConfig(AppConfig):
name = 'weibo_config'
verbose_name = '微博配置'
| mit |
Azure/azure-sdk-for-java | sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/MetricAggregationType.java | 1984 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.databoxedge.models;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import... | mit |
delitamakanda/jobboard | inventory/recommender.py | 2204 | import redis
from django.conf import settings
from .models import Product
# connect to redis
if settings.DEBUG:
r = redis.StrictRedis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=settings.REDIS_DB)
else:
r = redis.from_url(settings.REDISTOGO_URL)
class Recommender(object):
def get_product_key(s... | mit |
GenoGenov/KnowledgeSpreadSystem | KnowledgeSpreadSystem/KnowledgeSpreadSystem.Web/Controllers/EnrolmentController.cs | 3272 | namespace KnowledgeSpreadSystem.Web.Controllers
{
using System.Linq;
using System.Web.Mvc;
using AutoMapper;
using AutoMapper.QueryableExtensions;
using KnowledgeSpreadSystem.Data;
using KnowledgeSpreadSystem.Web.Controllers.Base;
using KnowledgeSpreadSystem.Web.ViewModels.Course;
usi... | mit |
okyereadugyamfi/softlogik | SPCode/CS/UI/Form/RecordForm.cs | 16436 | using System.Text.RegularExpressions;
using System.Diagnostics;
using System;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Collections;
using System.Drawing;
using Microsoft.VisualBasic;
using System.Data.SqlClient;
using System.Data;
using System.Collections.Generic;
using WeifenLuo.WinForm... | mit |
commonsensesoftware/More | src/More.UI.Presentation/Platforms/net45/More/Microsoft.Win32/OverwriteResponse.cs | 139 | namespace Microsoft.Win32
{
using System;
enum OverwriteResponse
{
Default,
Accept,
Refuse,
}
} | mit |
auth0/auth0-java | src/test/java/com/auth0/client/mgmt/ConnectionsEntityTest.java | 15050 | package com.auth0.client.mgmt;
import com.auth0.client.mgmt.filter.ConnectionFilter;
import com.auth0.json.mgmt.Connection;
import com.auth0.json.mgmt.ConnectionsPage;
import com.auth0.net.Request;
import okhttp3.mockwebserver.RecordedRequest;
import org.junit.Test;
import java.util.List;
import java.util.Map;
impor... | mit |
pempel/musk | spec/lib/musk/formatter/pretty_spec.rb | 748 | require "spec_helper"
describe Musk::Formatter::Pretty do
describe ".print(tracks)" do
let(:tracks) { [build(:jets_track), build(:kamakura_track)] }
let(:stdout) do
tracks.map { |t| Musk::Decorator::PrintableTrack.new(t) }.map do |track|
"Path: #{track.path}\n"\
"Title: #{track.t... | mit |
Hiroto-K/hk_sub_ | core/memo.rb | 884 | Plugin.command(:memo, /#(メモ|(hk)?memo)/i) do |obj|
next unless obj.hashtags?
uri = URI.parse("https://csrf.cf/api/memo/create")
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data({:id => obj.id})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SS... | mit |
khlieng/dispatch | client/js/components/pages/Chat/Search.js | 922 | import React, { memo, useRef, useEffect } from 'react';
import { FiSearch } from 'react-icons/fi';
import SearchResult from './SearchResult';
const Search = ({ search, onSearch }) => {
const inputEl = useRef();
useEffect(() => {
if (search.show) {
inputEl.current.focus();
}
}, [search.show]);
c... | mit |
neuecc/MagicOnion | samples/ChatApp/ChatApp.Unity/Assets/Scripts/MessagePack/SequenceReaderExtensions.cs | 10802 | // Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
/* 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... | mit |
alexbol99/palabras2 | js/views/textbox.js | 3702 | /**
* Created by alexbol on 1/8/2015.
*/
define(['models/quiz', 'views/editItemForm'],
function (quiz, editItemForm) {
return Backbone.View.extend({
className: "palabra",
initialize: function () {
this.render();
if (quiz.get("mode") == "Play") {
... | mit |
thunderhoser/GewitterGefahr | gewittergefahr/scripts/compare_human_vs_machine_interpretn.py | 26120 | """Compares human-generated vs. machine-generated interpretation map.
This script handles 3 types of interpretation maps:
- saliency
- Grad-CAM
- guided Grad-CAM
"""
import os.path
import argparse
import numpy
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as pyplot
from gewittergefahr.gg_utils imp... | mit |
PrinceOfAmber/PersonalWebsite | blog/views/layout/head.php | 651 |
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="css/icons.css">
<link rel="stylesheet" type="text/css" href="css/left_menu.css">
<script src="plugins/modernizr-2.7.1.js" type="text/javascript" defer="defer"></script>
<script src="plugins/html5boil... | mit |
ralphpina/VideoPlayer | app/src/main/java/net/ralphpina/famigo/videoplayer/app/VideoPlayingActivity.java | 6363 | package net.ralphpina.famigo.videoplayer.app;
import android.annotation.TargetApi;
import android.app.Activity;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
i... | mit |
RonAlmog/meanjs | app/models/car.server.model.js | 586 | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Car Schema
*/
var CarSchema = new Schema({
name: {
type: String,
default: '',
required: 'Please fill Car name',
trim: true
},
maker:{
type: String,
default: '',
required: 'Please fill ... | mit |
WiTH-Collective/ie-prompt | ie-prompt.js | 4871 | /*! IE Prompt - v0.1; Copyright 2015 WiTH Collective; Licensed MIT */
(function () {
"use strict";
var props = {
// namespace
name: "ie-prompt",
// min IE version - override with <script data-ie="{version}">
ie: 11,
// default prompt element
prompt: {
id: "ie-prompt",
clos... | mit |
samybob1/down-checker | core/Fetcher.php | 1143 | <?php
class Fetcher
{
/**
* @var resource
*/
protected $ch;
public function __construct()
{
$this->ch = curl_init();
curl_setopt_array($this->ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_FOLLOWLOCATI... | mit |
RsxBox/RsxBox.Email | src/RsxBox.Email.Core.Models/Models/StringTokens.cs | 211 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace RsxBox.Email.Core.Models
{
public class StringTokens : Dictionary<string, string>
{
}
}
| mit |
CaptainCrowbar/prion-lib | rs-core/range-expansion.hpp | 22503 | #pragma once
#include "rs-core/range-core.hpp"
#include <algorithm>
#include <functional>
#include <iterator>
#include <limits>
#include <memory>
#include <type_traits>
namespace RS::Range {
// combinations
struct CombinationsObject:
AlgorithmBase<CombinationsObject> {
size_t num;
Combin... | mit |
mastoj/NestDemo | NestDemo/Program.cs | 739 | using System;
using Nowin;
namespace NestDemo
{
class Program
{
const int Port = 1337;
public static Type[] EnforceReferencesFor =
{
typeof (Simple.Web.Razor.RazorHtmlMediaTypeHandler),
typeof (Simple.Web.JsonNet.JsonMediaTypeHandler)
};
static... | mit |
MontealegreLuis/edeco | src/PhpThumb/Plugin/GdReflection.php | 5084 | <?php
/**
* GD Reflection Lib Plugin Definition File
*
* This file contains the plugin definition for the GD Reflection Lib for PHP Thumb
*
* PHP Version 5 with GD 2.0+
* PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com>
* Copyright (c) 2009, Ian Selby/Gen X Design
*
* Author(s): Ian Selby <ian@gen-x-... | mit |
shageman/cbra_book_code | c2s05/sportsball/components/app_component/spec/helpers/app_component/teams_helper_spec.rb | 463 | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the TeamsHelper. For example:
#
# describe TeamsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# ... | mit |
jdonsan/my-cv | api/models/skill.js | 399 | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var skillSchema = new Schema({
name: String,
description: String,
category: String,
type: {
type: String,
enum: ['FRONT', 'BACK', 'BOTH', 'OTHERS']
},
level: Number,
yearsExperience: Number,
logo: String,
... | mit |
kubkowski/live_assets | test/dummy/app/controllers/home_controller.rb | 113 | class HomeController < ApplicationController
def index
render text: "Hello", layout: true
end
end | mit |
thomasgibson/tabula-rasa | SWE/solver.py | 15689 | from firedrake import *
from firedrake.petsc import PETSc
from firedrake.utils import cached_property
from pyop2.profiling import timed_stage
import numpy as np
def fmax(f):
fmax = op2.Global(1, np.finfo(float).min, dtype=float)
op2.par_loop(op2.Kernel("""
void maxify(double *a, double *b) {
a[0] = a[0] <... | mit |
vandersonmr/GEOS | docs/html/search/all_14.js | 377 | var searchData=
[
['u_5flong_5flong',['u_long_long',['../papi_8h.html#a88b2f548f11fcd6920d85595904d0dd1',1,'papi.h']]],
['uncondbranch',['UncondBranch',['../structllvm_1_1GCOVOptions.html#a6dbf83a66464f6bfd8893244a4bd3744',1,'llvm::GCOVOptions']]],
['us',['us',['../struct__papi__multiplex__option.html#a8f9ae34f95... | mit |
EmmetBlue/Emmet-Blue-Ui | plugins/accounts/main/assets/controllers/accounting-period-management-controller.js | 2608 | angular.module("EmmetBlue")
.controller('accountsAccountingPeriodsManagementController', function($scope, utils){
$scope.dttInstance = {};
$scope.dttOptions = utils.DT.optionsBuilder
.fromFnPromise(function(){
var periods = utils.serverRequest('/financial-accounts/accounting-period/view-period-history', 'GET');
... | mit |
gomidi/midi | examples/simple/simple_test.go | 1234 | package simple_test
import (
"fmt"
"io"
"time"
"gitlab.com/gomidi/midi/reader"
"gitlab.com/gomidi/midi/writer"
)
type printer struct{}
func (pr printer) noteOn(p *reader.Position, channel, key, vel uint8) {
fmt.Printf("NoteOn (ch %v: key %v vel: %v)\n", channel, key, vel)
}
func (pr printer) noteOff(p *reade... | mit |
sweetlandj/Platibus | Source/Platibus/Config/Extensibility/ISecurityTokenServiceProvider.cs | 2207 | // The MIT License (MIT)
//
// Copyright (c) 2016 Jesse Sweetland
//
// 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 u... | mit |
tripmode/pxlcoin | src/qt/paymentserver.cpp | 4470 | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <QApplication>
#include "paymentserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#i... | mit |
nicksenger/mydegreen | infoParsing/universityParser.py | 1561 | def findBetween(string, before, after):
cursor = 0
finished = False
matchArray = []
while finished == False:
try:
start = string.index(before, cursor) + len(before)
end = string.index(after, start)
matchArray.append(string[start:end])
curs... | mit |
rolandwz/pymisc | matrader/indicators/macd.py | 500 | # -*- coding: utf-8 -*-
from rwlogging import log
from indicators import ma
def calc_macd(prices, fast = 12, slow = 26, sign = 9):
ps = [p['close'] for p in prices]
macds = {}
macds['fast'] = ma.calc_ema(ps, fast)
macds['slow'] = ma.calc_ema(ps, slow)
macds['diff'] = list(map(lambda f,s: round(f - s, 5), macds['f... | mit |
afton77/p2e-lib-dev | assets/angular-javantech/login.js | 2633 | 'use strict';
//var myJavanTech = angular.module('myJavanTech', []);
//var myJavanTech = angular.module('myJavanTech', ['ui.bootstrap', 'dialogs', 'ngFileUpload', 'ngDialog']);
var myJavanTech = angular.module('myJavanTech', ['ui.bootstrap', 'ngFileUpload', 'ngDialog', 'ngRoute']);
/**
*
* @param int ID
* @param o... | mit |
ALGEBRU/TwitchAFKGame | Game/core/src/com/afkgame/Commands.java | 3388 | package com.afkgame;
import com.afkgame.Twitch.TwitchHandler;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.Array;
import com.gikk.twirk.enums.USER_TYPE;
import com.gikk.twirk.types.users.TwitchUser;
public class Commands {
private static boolean voteIsActive = false;
private static float voteTi... | mit |
ankitguptag18/CardDeck | src/main/java/com/ankitgupta/Card.java | 391 | package com.ankitgupta;
/**
* Created by ankitgupta on 9/9/16.
*/
public class Card {
CardShape shape;
CardNumber number;
Card(CardShape shape,CardNumber number){
this.shape = shape;
this.number = number;
}
public CardNumber getNumber() {
return number;
}
public CardShape getShape() {
return shape... | mit |
kamsar/Unicorn | src/Unicorn/ControlPanel/Pipelines/UnicornControlPanelRequest/UnicornControlPanelRequestPipelineArgs.cs | 667 | using System.Web;
using Sitecore.Pipelines;
using Unicorn.ControlPanel.Responses;
using Unicorn.ControlPanel.Security;
namespace Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest
{
public class UnicornControlPanelRequestPipelineArgs : PipelineArgs
{
public string Verb { get; private set; }
public HttpC... | mit |
MayasHaddad/netFlox | tools/SessionManager.class.php | 756 | <?php
/**
* This controller is responsible of session management
* @author Mayas Haddad
*/
class SessionManager
{
function __construct($sessionVariables = array())
{
}
public function newOrResetSession($posteData)
{
if(session_status() === PHP_SESSION_ACTIVE)
{
$this->endSession();
}
session_sta... | mit |
buriburisuri/ByteNet | train.py | 1185 | import sugartensor as tf
from model import *
from data import ComTrans
__author__ = 'namju.kim@kakaobrain.com'
# set log level to debug
tf.sg_verbosity(10)
#
# hyper parameters
#
batch_size = 16 # batch size
#
# inputs
#
# ComTrans parallel corpus input tensor ( with QueueRunner )
data = ComTrans(batch_size... | mit |
believer/atom-react-alt-templates | assets/Project/src/views/App/App.js | 176 | import React from 'react'
import CSSModules from 'react-css-modules'
import styles from './App.css'
export const App = () =>
<div />
export default CSSModules(App, styles)
| mit |
igorrKurr/ember-cli-photoswipe | tests/test-helper.js | 447 | import resolver from './helpers/resolver';
import { setResolver } from 'ember-qunit';
setResolver(resolver);
document.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>');
QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
var containerVisibility = QUnit.urlParams.... | mit |
gerritdrost/aes-java | src/main/java/com/gerritdrost/lib/cryptography/symmetrical/tests/Test.java | 1002 | package com.gerritdrost.lib.cryptography.symmetrical.tests;
import com.gerritdrost.lib.cryptography.symmetrical.blockciphers.aes.Aes;
import com.gerritdrost.lib.utils.ByteUtils;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
byte[] block = ByteU... | mit |
atlaschan/TooterSymfony | app/cache/dev/twig/c1/f9/31a28ffd374c10bd65aac2984ade.php | 13229 | <?php
/* TwigBundle:Exception:exception.html.twig */
class __TwigTemplate_c1f931a28ffd374c10bd65aac2984ade extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protec... | mit |
dvaJi/ReaderFront | packages/web/src/__tests__/components/layout/header.test.js | 1686 | import React from 'react';
import { mountWithIntl } from 'utils/enzyme-intl';
import * as nextRouter from 'next/router';
import Header from '@components/layout/header';
jest.mock('@components/layout/RouteNavItem', () => ({ children }) => (
<a>{children}</a>
));
it('should render Public Nav without throwing an erro... | mit |
betteridiots/ddf-maven-plugin | src/test/java/org/betteridiots/maven/plugins/ddf/DDFInstallAppMojoTest.java | 944 | package org.betteridiots.maven.plugins.ddf;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import java.io.File;
public class DDFInstallAppMojoTest extends AbstractMojoTestCase
{
protected void setUp() throws Exception
{
super.setUp();
}
public void testMojoGoal() throws Excepti... | mit |
michaeldwan/static | vendor/github.com/aws/aws-sdk-go/service/ecs/examples_test.go | 28161 | // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package ecs_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/service/ecs"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleECS... | mit |
bpreece/Frodo | src/com/bpreece/lotr/FrodoTokenManager.java | 74995 | /* Generated By:JavaCC: Do not edit this line. FrodoTokenManager.java */
package com.bpreece.lotr;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.Reader;
import java.util.... | mit |
axelpale/ghosture | lib/ObjectMap.js | 754 | module.exports = function ObjectMap() {
// See MDN WeakMap
var objects = [];
var values = [];
this.get = function (obj) {
return values[objects.indexOf(obj)];
};
this.set = function (obj, value) {
var index = objects.indexOf(obj);
if (index < 0) {
// Not found. Create.
objects.pus... | mit |
kgigova/BookStoreCatalog | BookStoreCatalog/Resources/js/custom.js | 257 | $(document).ready(function(){
$('.responsive-buttons a').click(function() {
$('.responsive-sidebar-hide').toggle();
var text = $(this).text();
$(this).text(
text == "Show sidebar" ? "Hide sidebar" : "Show sidebar");
});
}); | mit |
pagesource/fusion | fusion/Link 2.js | 389 | // import PropTypes from 'prop-types';
// const Link = styled('a.attrs({
// href: props => props.href,
// })`
// color: violet;
// text-decoration: none;
// `;
// /* Props Check */
// Link.propTypes = {
// /**
// * URL
// */
// href: PropTypes.string,
// };
// /* Deafult Props */
// Link.defaultProps... | mit |
Akoceru/EzSymf | app/AppKernel.php | 1694 | <?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\Sec... | mit |
restorer/gloomy-dungeons-2 | tools/site/source/gloomy/js/tex.js | 2754 | window.Tex = {
BASE_ICONS: 0x00,
BASE_WALLS: 0x10,
BASE_TRANSPARENTS: 0x30,
BASE_DOORS_F: 0x40,
BASE_DOORS_S: 0x44,
BASE_OBJECTS: 0x50,
BASE_DECORATIONS: 0x48,
HAND: 5,
PIST: 9,
SHTG: 14,
CHGN: 19,
MAPS: [
{ img: 'background.jpg', wdt: 250, hgt: 175 }, // 0
{ img: 'texmap.png', wdt: 64, hgt: 64, cols:... | mit |
hanickadot/syntax-parser | single-header/ctre.hpp | 196754 | /*
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproductio... | mit |
samuilll/BeginnerExams | PrgrammingFundametnalsFast/09_FilesAndExeptions/Task01MostFrequentNumber/Properties/AssemblyInfo.cs | 1419 | 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("Tas... | mit |
fabstr/stackomat | User.php | 7228 | <?php
require_once('Exceptions.php');
require_once('log.php');
class User {
// the pdo handle
private $db;
// the id of this user
private $id;
public function __construct($db, $id) {
$this -> db = $db;
$this -> id = hash('SHA256', $id);
}
/**
* Add a user to the database.
* Hash the id with sha256 ... | mit |
node-modules/cluster-client | test/supports/invoke.js | 1354 | 'use strict';
const co = require('co');
const is = require('is-type-of');
const assert = require('assert');
const cluster = require('../../');
const NotifyClient = require('./notify_client');
const client = cluster(NotifyClient, {
port: 6789,
transcode: {
encode(obj) {
if (is.date(obj)) {
return... | mit |
ltrem/cliniquecoderre2 | src/AppBundle/Form/UserRequestPasswordForm.php | 391 | <?php
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\FormBuilderInterface;
class UserRequestPasswordForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
... | mit |
jelhan/croodle | public/assets/internet-explorer-11-deprecation.js | 1029 | var outerContainer = document.createElement('div');
outerContainer.style.display = 'flex';
outerContainer.style.height = '100vh';
var container = document.createElement('div');
container.style.alignSelf = 'center';
container.style.margin = 'auto';
container.style.maxWidth = '50rem';
container.style.textAlign = 'center... | mit |
andviro/grayproxy | vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go | 26963 | // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/weaveworks/common/httpgrpc/httpgrpc.proto
/*
Package httpgrpc is a generated protocol buffer package.
It is generated from these files:
github.com/weaveworks/common/httpgrpc/httpgrpc.proto
It has these top-level messages:
HTTPRequest
H... | mit |
uni-react/react-native-navigation | android/app/src/main/java/com/reactnativenavigation/utils/ViewUtils.java | 6993 | package com.reactnativenavigation.utils;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.Nullable;
import androi... | mit |
roberino/linqinfer | src/LinqInfer/Text/Analysis/VectorExtractionResult.cs | 973 | using LinqInfer.Data.Serialisation;
using LinqInfer.Maths;
namespace LinqInfer.Text.Analysis
{
public sealed class VectorExtractionResult : IExportableAsDataDocument
{
internal VectorExtractionResult(PortableDataDocument model, LabelledMatrix<string> vectors)
{
ModelData = model;
... | mit |
Rudhie/simlab | application/config/autoload.php | 4082 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the fr... | mit |
ruanmartinelli/terra-core | src/app/event/event-dispatcher.js | 3117 | let io
const config = require('../../config')
const eventModel = require('./event-model')
const random = require('lodash/random')
const chalk = require('chalk')
const mda100_temperature = require('../../helpers/mda100-temperature')
const sht1x_temperature = require('../../helpers/sht1x-temperature')
const moment = requ... | mit |
endercrest/UWaterloo-API | src/main/java/com/endercrest/uwaterlooapi/resources/models/ResourceTutor.java | 1258 | package com.endercrest.uwaterlooapi.resources.models;
import com.google.gson.annotations.SerializedName;
/**
* Created by Thomas Cordua-von Specht on 12/5/2016.
*/
public class ResourceTutor {
private String subject;
@SerializedName("catalog_number")
private String catalogNumber;
private String ti... | mit |
UMKC-Law/permit-matrix | src/main/java/edu/umkc/permitme/domain/enumeration/MeterLocation.java | 138 | package edu.umkc.permitme.domain.enumeration;
/**
* The MeterLocation enumeration.
*/
public enum MeterLocation {
INSIDE,OUTSIDE
}
| mit |
ryw/pinboard | lib/pinboard.rb | 290 | require 'pinboard/util'
require 'pinboard/client'
require 'pinboard/post'
require 'pinboard/tag'
require 'pinboard/note'
module Pinboard
class << self
def new(options={})
Pinboard::Client.new(options)
end
def endpoint
Pinboard::Client.base_uri
end
end
end
| mit |
yasutaka/nlp_100 | kiyota/05.py | 959 | '''
05. n-gram
与えられたシーケンス(文字列やリストなど)からn-gramを作る関数を作成せよ.この関数を用い,
"I am an NLPer"という文から単語bi-gram,文字bi-gramを得よ
単語n-gram:隣り合うn個の単語を一塊として考える
文字gram:隣り合うn個の文字を一塊として考える
'''
# coding: utf-8
def do_ngram(ori,mode,num):
if mode == "word": #単語bi-gram
str = []
str = ori.split()
elif mode =... | mit |
NoRoboto/Coursera | Multiplatform Mobile App Development with Web Technologies/Week4/04 Assignment 04/ionic/conFusion/www/js/services.js | 2011 | 'use strict';
angular.module('conFusion.services', ['ngResource'])
.constant("baseURL", "http://192.168.0.5:3000/")
.factory('menuFactory', ['$resource', 'baseURL', function($resource, baseURL) {
return $resource(baseURL + "dishes/:id", null, {
'update': {
method: 'PUT'
}
});
}])
.... | mit |
szymonwelgus/interpreter | src/token_type.hpp | 119 | #pragma once
enum class token_type : unsigned int
{
E_ERROR = 0,
E_INVALID,
E_INTEGER,
E_PLUS,
E_EOF,
}; | mit |
gre/gl-react | packages/cookbook/src/examples/textanimated/index.source.js | 2623 | module.exports=`//@flow
import React, { PureComponent, Component } from "react";
import { Shaders, Node, GLSL, LinearCopy } from "gl-react";
import { Surface } from "gl-react-dom";
import JSON2D from "react-json2d";
import timeLoop from "../../HOC/timeLoop";
const shaders = Shaders.create({
animated: {
frag: GLS... | mit |
juanbond/doctorcoin | src/qt/locale/bitcoin_fi.ts | 113261 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Doctorcoin</source>
<translation>Tietoa Doctorcoinista</translation>... | mit |
Pinetrax/sw-outlook | src/lib/main.js | 2685 | //Todo: option to count all unread mail
var request = require("sdk/request").Request;
var tabs = require("sdk/tabs");
var tmr = require('sdk/timers');
var self = require("sdk/self");
var preferences = require("sdk/simple-prefs").prefs;
var notifications = require("sdk/notifications");
var { ActionButt... | mit |