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 |
|---|---|---|---|---|---|
/* eslint-disable comma-style, operator-linebreak, space-unary-ops, no-multi-spaces, key-spacing, indent */
'use strict'
const analyzeHoldem = require('./lib/holdem')
/**
* Analyzes a given PokerHand which has been parsed by the HandHistory Parser hhp.
* Relative player positions are calculated, i.e. cutoff, button... | thlorenz/hha | hha.js | JavaScript | mit | 1,658 |
import { h, render, rerender, Component } from '../../src/preact';
let { expect } = chai;
/*eslint-env browser, mocha */
/*global sinon, chai*/
/** @jsx h */
describe('render()', () => {
let scratch;
before( () => {
scratch = document.createElement('div');
(document.body || document.documentElement).appendChi... | okmttdhr/preact-fork | test/browser/render.js | JavaScript | mit | 10,825 |
/*
* Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your opt... | lordmos/blink | Source/core/rendering/InlineBox.cpp | C++ | mit | 10,882 |
<?php
/* OyatelCdrBundle:Default:index.html.twig */
class __TwigTemplate_fce6b668448a5b90084f0988441f2b64 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protect... | mehulsbhatt/cdr | app/cache/prod/twig/fc/e6/b668448a5b90084f0988441f2b64.php | PHP | mit | 625 |
using System;
using System.Globalization;
#if UNIVERSAL
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml;
#else
using System.Windows;
using System.Windows.Data;
#endif
namespace Newport
{
public abstract class BaseConverter : DependencyObject, IValueConverter
{
public object Convert(object value, Type targetT... | z1c0/Newport | Newport/Converters/BaseConverter.cs | C# | mit | 954 |
package dynamics.item;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.mine... | awesommist/DynamicLib | src/main/java/dynamics/item/IMetaItem.java | Java | mit | 947 |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
private:
ListNode* reverseList(ListNode* head) {
ListNode * reverse = NULL;
ListNode * node = head;
while (node) {
... | hawkphantomnet/leetcode | ReorderList/Solution.cpp | C++ | mit | 1,125 |
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include "game/ui/general/loadingscreen.h"
#include "framework/configfile.h"
#include "framework/data.h"
#include "framework/framework.h"
#include "framework/renderer.h"
#include "game/state/gamestate.h"
#include "game/ui/battle/battleview.h"
#include "game/ui/... | steveschnepp/OpenApoc | game/ui/general/loadingscreen.cpp | C++ | mit | 2,976 |
<?php
namespace System;
class Controller
{
const DEFINITIONS = null;
const VIEWS = null;
}
| headcruser/blog | src/lib/Controller.php | PHP | mit | 101 |
package com.suelake.habbo.moderation;
import java.util.Date;
import com.blunk.util.TimeHelper;
import com.suelake.habbo.communication.SerializableObject;
import com.suelake.habbo.communication.ServerMessage;
import com.suelake.habbo.spaces.Space;
import com.suelake.habbo.users.User;
/**
* CallForHelp represents a '... | Chnkr/Suelake | src/com/suelake/habbo/moderation/CallForHelp.java | Java | mit | 2,056 |
//namespace Instinct.Collections.RoutedCommand
//{
// /// <summary>
// /// RoutedCommand
// /// </summary>
// public class RoutedCommand : ICommand
// {
// private byte _commandId;
// private string _name;
// private System.Type _ownerType;
// private System.Collect... | Grimace1975/bclcontrib | Core/System.CoreEx_/System.Core.Routing/Collections.1/RoutedCommand/RoutedCommand.cs | C# | mit | 10,006 |
package config
const (
OutputFormatText = "text"
OutputFormatJSON = "json"
OutputTargetStdout = "stdout"
OutputTargetFile = "file"
)
type Output struct {
Format string `yaml:"format"`
Target string `yaml:"target"`
FileName string `yaml:"file_name"`
}
| chapsuk/frissgo | config/output.go | GO | mit | 267 |
version https://git-lfs.github.com/spec/v1
oid sha256:f7df841464cae1b61b2fb488b6174926c0e0251ceddf1dd360b031ab9fb83c3c
size 4289
| yogeshsaroya/new-cdnjs | ajax/libs/angular.js/1.2.6/angular-sanitize.min.js | JavaScript | mit | 129 |
package entities;
import javax.persistence.*;
import java.util.Set;
@Entity
@Table(name="store_locations")
public class StoreLocation {
private Long id;
private String locationName;
private Set<Sale> sales;
public StoreLocation() {
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY... | yangra/SoftUni | Java-DB-Fundamentals/DatabasesFrameworks-Hibernate&SpringData/07.HibernateCodeFirst/SalesDatabase/src/main/java/entities/StoreLocation.java | Java | mit | 834 |
<?php
use DBA\AnswerSession;
use DBA\JoinFilter;
use DBA\MediaObject;
use DBA\MediaType;
use DBA\OrderFilter;
use DBA\Query;
use DBA\QueryFilter;
use DBA\QueryResultTuple;
use DBA\RandOrderFilter;
use DBA\ResultTuple;
/**
*
* @author Sein
*
* Bunch of useful static functions.
*/
class Util {
/**
* Ca... | s3inlc/cineast-evaluator | inc/Util.class.php | PHP | mit | 24,052 |
const React = require('react')
const Layout = require('./src/components/layout').default
// Logs when the client route changes
exports.onRouteUpdate = ({ location, prevLocation }) => {
const body = document.querySelector('body')
body.setAttribute('data-current-page', location.pathname)
body.setAttribute('data-pr... | yowainwright/yowainwright.github.io | gatsby-browser.js | JavaScript | mit | 504 |
<?php
session_start();
include "../connection.php";
$error = false;
if (isset($_SESSION['auth']) && $_SESSION['auth'] != false) {
header('Location: index.php');
} else {
$_SESSION['auth'] = false;
}
if (isset($_POST['username']) && isset($_POST['password'])) {
// print_r($_POST);
$username = $_POST['us... | navatech-trainning/fashion-shopping | admin/login.php | PHP | mit | 17,076 |
// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "BLEConstantCharacteristic.h"
BLEConstantCharacteristic::BLEConstantCharacteristic(const char* uuid, const unsigned char value[], unsigned char length) :... | sandeepmistry/arduino-BLEPeripheral | src/BLEConstantCharacteristic.cpp | C++ | mit | 1,075 |
'''
Example which moves objects around in a 2D world.
This example requires matplotlib. The ros package doesnt have this as a
rosdep though, since nothing else needs it. Just do a system install
of matplotlib.
'''
import roslib; roslib.load_manifest('hierarchical_interactive_planning')
import numpy as np
from scipy im... | jonbinney/python-planning | python_task_planning/examples/move_stuff/move_stuff.py | Python | mit | 8,400 |
#ifndef __tcode_transport_tcp_pipeline_builder_h__
#define __tcode_transport_tcp_pipeline_builder_h__
#include <system_error>
#include <common/rc_ptr.hpp>
namespace tcode { namespace transport {
class event_loop;
namespace tcp {
class pipeline;
class pipeline_builder
: public tcode::ref_counted< pipeline_builder... | aoziczero/tcode | old/transport/tcp/pipeline_builder.hpp | C++ | mit | 526 |
using System;
using UsgsClient.Common;
namespace UsgsClient.Quakes
{
public class QuakesUriBuilder : IQuakesUriBuilder
{
private readonly IConfig _config;
public QuakesUriBuilder(IConfig config)
{
this._config = config;
}
public Uri ForDetail(
... | overridethis/usgsclient | UsgsClient/Quakes/QuakesUriBuilder.cs | C# | mit | 907 |
package hudson.plugins.keepSlaveOffline;
import org.kohsuke.stapler.DataBoundConstructor;
import hudson.Extension;
import hudson.model.Node;
import hudson.model.Queue.FlyweightTask;
import hudson.model.Queue.Task;
import hudson.model.queue.CauseOfBlockage;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodeP... | jenkinsci/keep-slave-offline | src/main/java/hudson/plugins/keepSlaveOffline/OfflineKeeper.java | Java | mit | 1,221 |
package com.example.alexeyglushkov.wordteacher.quizletlistmodules.setlistmodule.view;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.alexeyglushkov.quizletservice.entities.QuizletSet;
import com.example.alexeyglushkov.wordteach... | soniccat/android-taskmanager | app_wordteacher_old/src/main/java/com/example/alexeyglushkov/wordteacher/quizletlistmodules/setlistmodule/view/QuizletSetListFragment.java | Java | mit | 1,783 |
@extends('app')
@section('header-text') Log into your account @endsection
@section('header-subtext') Enter in your account information below @endsection
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="pa... | FujiMakoto/Pixel | resources/views/users/auth/login.blade.php | PHP | mit | 3,349 |
import { handleActions } from 'redux-actions';
import { Map, OrderedMap } from 'immutable';
import initialState from '../store/initialState';
const App = handleActions({
WINDOW_LOADED: (state) => ({
...state,
windowLoaded: true
}),
CLOSE_LEGAL_HINT: (state) => ({
...state,
showLegal... | NTU-ArtFest22/Monitor-web | src/Reducers/index.js | JavaScript | mit | 4,611 |
'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 = true; Object.defineProp... | 9o/react-color | lib/components/slider/SliderPointer.js | JavaScript | mit | 3,128 |
'use strict';
// Declare app level module which depends on views, and components
angular.module('collegeScorecard', [
'ngRoute',
'ui.bootstrap',
'nemLogging',
'uiGmapgoogle-maps',
'collegeScorecard.common',
'collegeScorecard.footer',
'collegeScorecard.home',
'collegeScorecard.schools',
'collegeScorec... | brianyamasaki/collegeScorecard | app/app.js | JavaScript | mit | 658 |
package com.cg.registration.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import... | brijeshsmita/commons-spring | EMSPhase3JSP/src/com/cg/registration/servlet/RegistrationServlet.java | Java | mit | 2,047 |
// © Copyright 2013 Paul Thomas <paul@stackfull.com>. All Rights Reserved.
// sf-virtual-repeat directive
// ===========================
// Like `ng-repeat` with reduced rendering and binding
//
(function(){
'use strict';
// (part of the sf.virtualScroll module).
var mod = angular.module('sf.virtualScroll');
... | looker/angular-virtual-scroll | src/virtual-repeat.js | JavaScript | mit | 14,764 |
require('../helpers');
const assert = require('assert');
const ironium = require('../../src');
const Promise = require('bluebird');
describe('processing', ()=> {
const errorCallbackQueue = ironium.queue('error-callback');
const errorPromiseQueue = ironium.queue('error-promise');
const errorGeneratorQueue... | djanowski/ironium | test/queues/error_test.js | JavaScript | mit | 2,127 |
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def mainRoute():
return render_template('hello.html')
@app.route('/jujitsu')
def jujitsu():
return render_template('jujitsu.html')
if __name__ == '__main__':
app.run(debug=True,host='0.0.0.0', port=8080)
| CrazyDiamond567/docker-cloud-test | unh698.py | Python | mit | 302 |
/**
* Created by Andrei on 10/14/2014.
*/
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.net.InetAddress;
public class ThreadPoolApp {
public static... | abrabete/threadpool_example | IntelliJ/src/ThreadPoolApp.java | Java | mit | 4,608 |
#ifndef WF_INPUT_DEVICE_HPP
#define WF_INPUT_DEVICE_HPP
#include <wayfire/nonstd/wlroots.hpp>
namespace wf
{
class input_device_t
{
public:
/**
* General comment
* @return The represented wlr_input_device
*/
wlr_input_device *get_wlr_handle();
/**
* @param enabled Whether the compos... | ammen99/wayfire | src/api/wayfire/input-device.hpp | C++ | mit | 758 |
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ContactList
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
... | gyuwon/TDK2015 | ContactList/App.xaml.cs | C# | mit | 327 |
require 'wasted'
begin
require 'pry'
# rescue LoadError
end
| tombroomfield/wasted | spec/spec_helper.rb | Ruby | mit | 64 |
<?php
namespace Oro\Bundle\EmailBundle\EventListener\Datagrid;
use Oro\Bundle\DataGridBundle\Datasource\Orm\OrmDatasource;
use Oro\Bundle\DataGridBundle\Event\BuildAfter;
use Oro\Bundle\EmailBundle\Datagrid\EmailQueryFactory;
class IncomingEmailGridListener
{
/** @var EmailQueryFactory */
protected $emailQu... | orocrm/platform | src/Oro/Bundle/EmailBundle/EventListener/Datagrid/IncomingEmailGridListener.php | PHP | mit | 847 |
<?php
namespace GhaenCollege\ScrumBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* TestRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class TestRepository extends EntityRepository
{
}
| mahmud-kasaei/Scrum4u | src/GhaenCollege/ScrumBundle/Entity/TestRepository.php | PHP | mit | 264 |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated ... | emoacht/WlanProfileViewer | Source/ReactivePropertyTest/Properties/AssemblyInfo.cs | C# | mit | 2,287 |
module.exports = {
getDates: function(d) {
var today = padDate(d);
return {
startTime: today + lowerBoundTime(),
endTime: today + upperBoundTime()
};
}
};
function padDate (d){
function pad (n) { return n < 10 ? '0' + n : n }
return d.getUTCFullYear() + '-'
+ pad(d.getUTCMonth() + 1 ) + '-'
+ pad... | iOnline247/heyo | utils/dateHelpers.js | JavaScript | mit | 449 |
/**
* Java Modular Image Synthesis Toolkit (JMIST)
* Copyright (C) 2018 Bradley W. Kimmel
*
* 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 lim... | bwkimmel/jmist | jmist-core/src/main/java/ca/eandb/jmist/framework/scatter/ABMSieveAbsorbingSurfaceScatterer.java | Java | mit | 2,738 |
module.exports = require("./src/moment-interval"); | luisfarzati/moment-interval | index.js | JavaScript | mit | 50 |
// namespace plexus
var plexus = plexus || {};
window._plexus = plexus;
(function(plx) {
console.log("plexus.js [loaded]");
//------------------------------
// Plexus utilties functions
//------------------------------
plx.each = function(obj, iterator, context) {
if (!obj) return;
... | keyhom/xstudio-html5 | src/plexus/js/plexus-base.js | JavaScript | mit | 12,046 |
using System;
namespace SingleSignOnKata.sso
{
public interface SingleSignOnRegistry
{
SSOToken RegisterNewSession(String userName, String password);
bool IsValid(SSOToken token);
void Unregister(SSOToken token);
}
}
| emilybache/Single-Sign-On-Kata | CSharp/SingleSignOnKata/sso/SingleSignOnRegistry.cs | C# | mit | 257 |
const http = require('http');
const server = http.createServer();
const io = require('socket.io');
const { spy } = require('sinon');
const { expect } = require('chai');
const client = require('./socket');
const TEST_URL = 'http://localhost:3001';
describe('test socket', () => {
let sock;
beforeEach( (done) =>... | EPSI-I5-Kaamelott/Kaamelott-rasp | src/socket.test.js | JavaScript | mit | 601 |
#!/usr/bin/env python
# encoding: utf-8
"""MoodleFUSE initialization
"""
import os
import errno
from moodlefuse.filesystem import Filesystem
from moodlefuse.core import setup, config
from moodlefuse.services import USERS
MOODLEFUSE_DATABASE_FILE = 'moodlefuse.sqlite'
MOODLEFUSE_CONFIG_FILE = 'moodlefuse.conf'
MOOD... | BroganD1993/MoodleFUSE | moodlefuse/__init__.py | Python | mit | 836 |
<?php
namespace Ackintosh\Snidel;
/**
* @codeCoverageIgnore
*/
function msg_send()
{
return false;
}
| ackintosh/snidel | tests/msg_send.php | PHP | mit | 108 |
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20120802054929 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migration... | theaudience-brett/podcasts | app/DoctrineMigrations/Version20120802054929.php | PHP | mit | 1,101 |
require 'spec_helper'
require 'date'
require 'bigdecimal'
require 'xeroid/objects/invoice'
require 'xeroid/objects/account'
require 'xeroid/objects/payment'
module Xeroid::Objects
describe Payment do
let(:invoice) { Invoice.new(id: "abcde-12345-abcde-12345") }
let(:account) { Account.new(code: "NWBC") }
... | fidothe/xeroid | spec/xeroid/objects/payment_spec.rb | Ruby | mit | 1,277 |
const sqlite = require('sqlite');
const exec = require('child_process').exec;
const program = require('commander');
const config = require('./config');
const fetchGroups = require('./lib/fetch-groups');
const fetchMembers = require('./lib/fetch-members');
program
.version('0.0.0')
.option('-a, --accessToken [valu... | suricactus/fb-group-members | index.js | JavaScript | mit | 3,912 |
<?php
namespace FS\Injection\Pico;
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly.
}
class Engine
{
protected $delimiter;
protected $pattern;
public function __construct($delimiter = ['\{{2}', '\}{2}'])
{
$this->setDelimiter($delimiter);
}
public function setDelim... | flagshipcompany/flagship-for-woocommerce | src/Injection/Pico/Engine.php | PHP | mit | 1,971 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Mysql::Mgmt::V2017_12_01
module Models
#
# The properties used to create a new server.
#
class ServerPropertiesForCreate
... | Azure/azure-sdk-for-ruby | management/azure_mgmt_mysql/lib/2017-12-01/generated/azure_mgmt_mysql/models/server_properties_for_create.rb | Ruby | mit | 2,647 |
import * as HTTPStatus from 'http-status-codes';
import * as express from 'express';
import Logger from './Logger';
export default class ErrorHandler {
private logger: Logger;
constructor() {
this.logger = new Logger('ErrorHandler');
}
handleError(err: Error, _, res: express.Response, next: Function): e... | simon-tannai/nodejs-typescript-boilerplate | src/utils/ErrorHandler.ts | TypeScript | mit | 599 |
'use strict';
let mongoose = require('mongoose'),
fs = require('fs');
require('../models/project-model');
let Project = mongoose.model('Project');
require('../models/user-model');
let User = mongoose.model('User');
let getCount = function(req, res, next) {
Project.count({}, function(err, count) {
if... | veselints/belin | controllers/projects-controller.js | JavaScript | mit | 3,316 |
import Logger from 'utils/logger';
const logger = new Logger('[push-simple/serviceworker]');
function onPush(event) {
logger.log("Received push message", event);
let title = (event.data && event.data.text()) || "Yay a message";
let body = "We have received a push message";
let tag = "push-simple-demo-notifica... | rossta/serviceworker-rails-sandbox | app/assets/javascripts/push-simple/serviceworker.js | JavaScript | mit | 697 |
var http = require('../simpleHttp'),
config = require('../config'),
zmq = require('zmq'),
_ = require('lodash'),
argv = require('yargs').argv,
logic = (argv.logic ? require('./' + argv.logic).logic : require('./sampleLogic').logic),
modelRoot = (argv.modelRoot ? argv.modelRoot : '/Store/TestOrg');
//Stuff going out
va... | JediMindtrick/Hyperloop | App3_BusinessLogicProcessor/serveBLP.js | JavaScript | mit | 1,833 |
// Generated by jsScript 1.10.0
(function() {
AutoForm.hooks({
updatePassword: {
onSubmit: function(insertDoc, updateDoc, currentDoc) {
if (insertDoc["new"] !== insertDoc.confirm) {
sAlert.error('Passwords do not match');
return false;
}
Accounts.changePassword(in... | patrickbolle/meteor-starter-purejs | client/views/account/account.js | JavaScript | mit | 879 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsIotLedDriver
{
// An interface used to get callbacks from the animator or in a chain of animation.
internal interface IAnimationTickListner
{
// This callback will ... | QuinnDamerell/WindowsIotLedDriver | WindowsIotLedDriver/Interfaces/IAnimationTickListener.cs | C# | mit | 487 |
import sys
import time as tmod
import warnings
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import pandas as pd
warnings.simplefilter("ignore")
sys.path.insert(0, "../FATS/")
import FATS
iterations = 100000
lc_size = 1000
random = np.random.RandomState(42)
results = {
... | carpyncho/feets | res/paper/reports/features_montecarlo.py | Python | mit | 1,591 |
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("sq... | LazarDL/TelerikHomeworks | C#1/Operators/squareSurface/Properties/AssemblyInfo.cs | C# | mit | 1,402 |
<?php
/**
* Group
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @package LinkIgniter
* @subpackage Models
* @author YOUR_NAME_HERE <YOUR@NAME.HERE>
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
class Group extends Base_Group
{
} | linkworks/linkigniter | application/models/Group.php | PHP | mit | 302 |
#!/usr/bin/ruby
##
##Author: Shashank Mathur
##
#
require "rubygems"
require "json"
require "net/http"
require "uri"
require 'open-uri'
require 'nokogiri'
require 'thread'
require 'monitor'
require 'io/console'
require 'openssl'
#Function to Analyze URL
def analyze(url)
#Preparing to call RESTapi and json results
b... | shashankm/ssllabs-report | ssllabs-report.rb | Ruby | mit | 6,298 |
import { View } from '../core/view';
import { Property } from '../core/properties';
/**
* Represents an time picker.
*/
export class TimePicker extends View {
/**
* Gets the native [android.widget.TimePicker](http://developer.android.com/reference/android/widget/TimePicker.html) that represents the user interfac... | NativeScript/NativeScript | packages/core/ui/time-picker/index.d.ts | TypeScript | mit | 2,307 |
using System;
namespace NgPlateVerifier
{
public class PlateInfo
{
public string PlateNumber { get; set; }
public string Owner { get; set; }
public string Color { get; set; }
public string Model { get; set; }
public string Chasis { get; set; }
public string Stat... | matmape/ngPlateNumberVerifier | PlateInfo.cs | C# | mit | 455 |
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Container,
TextInput,
Label,
Text,
View,
Button,
} from 'react-native';
import LoginScreen from './Login.js';
import RegisterScreen from './Register.js';
import { StackNavigator, TabNavigator } from 'react-navigation';
expo... | nyc-fiery-skippers-2017/AwesomeProject | Users/UserControl.js | JavaScript | mit | 671 |
require "spec_helper"
RSpec.describe Realms::Cards::TradingPost do
include_examples "type", :outpost
include_examples "defense", 4
include_examples "factions", :trade_federation
include_examples "cost", 3
describe "#primary_ability" do
include_context "base_ability" do
before do
game.base_... | tonywok/realms | spec/cards/trading_post_spec.rb | Ruby | mit | 809 |
import path from 'path';
const {
SupRuntime,
} = global;
SupRuntime.registerPlugin('dependencyBundle', {
loadAsset(player, asset, callback) {
window.__dependencyBundles = window.__dependencyBundles || {};
const bundleScript = document.createElement('SCRIPT');
bundleScript.addEventListener('load', () =... | antca/superpowers-package-manager-plugin | src/runtime/index.js | JavaScript | mit | 538 |
let path = document.location.pathname,
details,
login,
url;
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
login = m[1].trim();
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
url = 'http://coderstats.net/github#' + login;
details = document.getElementsByClassN... | coderstats/fxt_coderstats | coderstats/coderstats.js | JavaScript | mit | 997 |
using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class Kernel32
{
/// <summary>The memory allocation attributes.</summary>
[Flags]
public enum GMEM
{
/// <summary>Combines GMEM_MOVEABLE and GMEM_ZEROINIT.</summary>
GHND = 0x0042,
/// <summary>All... | dahall/vanara | PInvoke/Kernel32/WinBase.MemMgmt.cs | C# | mit | 44,045 |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... | jamesbigler/Legion | src/Support/openexr-2.0.1/IlmImfTest/testTiledLineOrder.cpp | C++ | mit | 21,673 |
package main
import "fmt"
// Bitcoin represents a number of Bitcoins
type Bitcoin int
func (b Bitcoin) String() string {
return fmt.Sprintf("%d BTC", b)
}
// Wallet stores the number of Bitcoin someone owns
type Wallet struct {
balance Bitcoin
}
// Deposit will add some Bitcoin to a wallet
func (w *Wallet) Depos... | a233894432/Golang-lesson | src/my_example/gctt/pointers_demo/v2/wallet.go | GO | mit | 595 |
import pymc3 as pm
from lasagne.layers.helper import *
from lasagne.layers.helper import __all__ as __helper__all__
__all__ = [
"find_parent",
"find_root",
] + __helper__all__
def find_parent(layer):
candidates = get_all_layers(layer)[::-1]
found = None
for candidate in candidates:
if isin... | ferrine/gelato | gelato/layers/helper.py | Python | mit | 551 |
import inspect
__all__ = ['GenericVisitor']
class GenericVisitor(object):
"""
A generic visitor.
To define handlers, subclasses should define :data:`visit_Foo`
methods for each class :data:`Foo` they want to handle.
If a specific method for a class :data:`Foo` is not found, the MRO
of the c... | opesci/devito | devito/tools/visitors.py | Python | mit | 4,134 |
package xsmeral.pipe.context;
import java.io.File;
/**
* A file system context, based on the notion of a single working directory.
* @author Ron Šmeral (xsmeral@fi.muni.cz)
*/
public interface FSContext {
/**
* Sets the working directory to the given path (relative or absolute)
*/
public void se... | rsmeral/semnet | PipedObjectProcessor/src/xsmeral/pipe/context/FSContext.java | Java | mit | 619 |
//---------------------------------------------------------------------------
//
// <copyright file="FillRuleValidation.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved.
// </copyright>
//
// This file was generated, please do not edit it directly.
//
// Please see http://wiki/de... | mind0n/hive | Cache/Libs/net46/wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs | C# | mit | 1,605 |
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("Ta... | Digiman/Tasker | Tasker.TaskAntImporter/Properties/AssemblyInfo.cs | C# | mit | 1,420 |
# Die Class 1: Numeric
# I worked on this challenge [by myself]
# I spent [.5] hours on this challenge.
# 0. Pseudocode
# Input: integer amount of sides on a die object
# Output: either integer number of sides or random integer
# Steps:
# => IF there is less than one side THEN
# => => RAISE an Argument Error
# => ... | themcny/phase-0 | week-5/die-class/my_solution.rb | Ruby | mit | 2,564 |
// Copyright (c) 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 <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
// for both bitco... | BlakeBitcoin/BlakeBitcoin | src/version.cpp | C++ | mit | 2,628 |
import base64
import demistomock as demisto
from WildFireReports import main
import requests_mock
def test_wildfire_report(mocker):
"""
Given:
A sha256 represents a file uploaded to WildFire.
When:
internal-wildfire-get-report command is running.
Then:
Ensure that the command ... | VirusTotal/content | Packs/Palo_Alto_Networks_WildFire/Integrations/WildFireReports/WildFireReports_test.py | Python | mit | 4,906 |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization;
using uWebshop.Domain;
using uWebshop.Domain.Helpers;
using uWebshop.Domain.Interfaces;
namespace uWebshop.API
{
[DataContract(Namespace = "")]
internal class BasketStore : IStore
{
private readonly Do... | uWebshop/uWebshop-Releases | Core/uWebshop.Domain/API/DataClasses/BasketStore.cs | C# | mit | 2,701 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Claims;
using Ascon.Pilot.Core;
using Ascon.Pilot.Server.Api;
using Ascon.Pilot.Server.Api.Contracts;
using Ascon.Pilot.Transport;
using Microsoft.AspNet.Http;
using ISession = Microsoft.AspNet.Http.Features.ISess... | perminov-aleksandr/askon-pilot-client-asp | src/Ascon.Pilot.WebClient/Extensions/ClientsStorage.cs | C# | mit | 4,520 |
package io.swagger.client.api;
import io.swagger.client.ApiClient;
import io.swagger.client.model.InlineResponse200;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for StoriesApi
*/
public class Stor... | amardeshbd/android-daily-headlines | api-lib/src/test/java/io/swagger/client/api/StoriesApiTest.java | Java | mit | 903 |
require 'calabash-android/operations'
INSTALLATION_STATE = {
:installed => false
}
Before do |scenario|
$calabashQueryView = self
scenario_tags = scenario.source_tag_names
if !INSTALLATION_STATE[:installed]
uninstall_apps
install_app(ENV['TEST_APP_PATH'])
install_app(ENV['APP_PATH'])
... | RuudPuts/CalabashTesting | features/android/support/app_life_cycle_hooks.rb | Ruby | mit | 521 |
/**
* @Author: shenyu <SamMFFL>
* @Date: 2016/12/08 10:18:06
* @Email: samfec@163.com
* @Last modified by: SamMFFL
* @Last modified time: 2016/12/13 14:39:33
*/
import React, {Component} from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableHighlight,
ScrollView,
} from 'react-na... | yeeFlame/animate-for-RN | studyAnimate/containers/examples/setNativePropsDemo.js | JavaScript | mit | 5,282 |
package simpul.core;
import simpul.Interfaces;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class EventEmitter implements Interfaces.EventEmitter{
private class RegisteredCallback{
private final Interfaces.EventCallback cb;
private fina... | parroit/simpul | src/main/java/simpul/core/EventEmitter.java | Java | mit | 2,783 |
#!/usr/bin/env python2
import argparse
import xml.etree.ElementTree as ET
import subprocess
import os.path as path
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
import time
OUT_DIR = './_out'
HAXE_PATH = 'haxe'
def get_main_info(meta_root):
server_main, client_main ... | Jusonex/haxe-mtasa-typings | example/build.py | Python | mit | 3,302 |
<?php
/**
* Copyright (c) 2017. Puerto Parrot Booklet. Written by Dimitri Mostrey for www.puertoparrot.com
* Contact me at admin@puertoparrot.com or dmostrey@yahoo.com
*/
namespace App\Http\Controllers;
use App\Models\City;
use App\Models\Province;
use App\Models\Service;
use DB;
/**
* Class ApiController
*
* ... | Dimimo/Booklet | app/Http/Controllers/ApiController.php | PHP | mit | 6,538 |
package utils.verbos;
/** Clase que representa una conjugación verbal
* Se ordena por valor completo, pero su igualdad se mira con la conjugación (sin tildes)
* @author andoni
*
*/
public class Conjugacion extends SufijoVerbal {
// en Conjugacion el modelo genérico pasa a ser ya el infinitivo concreto
private St... | andoni-eguiluz/UD-Prog3-ant | src/utils/verbos/Conjugacion.java | Java | mit | 4,580 |
# -*- coding: utf-8 -*-
from google.appengine.api import apiproxy_stub_map
from google.appengine.ext import db
from django.core.urlresolvers import resolve
from django.http import HttpRequest, QueryDict
from ragendja.testutils import ModelTestCase
from search.core import SearchIndexProperty
import base64
class Indexed... | nurey/disclosed | app2/search/tests.py | Python | mit | 2,896 |
const SPRINTER_COUNT = 7; // how many lanes there are, including the player
var runners = []; // lineup
var runner; // player
var laneWidth; // width of each lane
var startTime; // beginning of the game
function setup() {
createCanvas(window.innerWidth, window.innerHeight);
/* initialize opponents */
var opp... | Kaelinator/AGAD | Sprinter Game/SprinterGame.js | JavaScript | mit | 2,082 |
<?php
if (! defined('BASEPATH')) exit('No direct Script access allowed');
class Prova_model extends CI_Model
{
/*------------------------------
ATRIBUTOS
------------------------------*/
private $idProva;
private $nome;
private $introducao;
private $inicio;
private $termino... | Lasterblade/SGPLTE | application/models/Prova_model.php | PHP | mit | 8,474 |
#include "qrcodedialog.h"
#include "ui_qrcodedialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include <QPixmap>
#if QT_VERSION < 0x050000
#include <QUrl>
#endif
#include <qrencode.h>
QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bo... | Roxcoin/roxcointor | src/qt/qrcodedialog.cpp | C++ | mit | 4,343 |
using System;
using Microsoft.Tools.WindowsInstallerXml.Bootstrapper;
namespace Shimmer.Client.WiXUi
{
public interface IWiXEvents
{
IObservable<DetectBeginEventArgs> DetectBeginObs { get; }
IObservable<DetectPackageCompleteEventArgs> DetectPackageCompleteObs { get; }
IObservable<Detec... | stefanolson/Squirrel.Windows.MahApps | src/Shimmer.WiXUiClient/IWiXEvents.cs | C# | mit | 1,324 |
/**
* Tree View Collapse
* @see https://github.com/cpojer/mootools-tree
*/
export default new Class({
Implements: [Options, Class.Single],
options: {
animate: false,
fadeOpacity: 1,
className: 'collapse',
selector: 'a.expand',
listSelector: 'li',
childSelector: 'ul'
},
initialize: ... | codepolitan/caoutchouc | src/view/tree/utils/collapse.js | JavaScript | mit | 3,649 |
#ifndef ADD_BINARY_HPP_
#define ADD_BINARY_HPP_
#include <string>
using namespace std;
class AddBinary {
public:
string addBinary(string a, string b);
};
#endif // ADD_BINARY_HPP_
| yanzhe-chen/leetcode | include/AddBinary.hpp | C++ | mit | 188 |
package org.robolectric.shadows;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteQueryBuilder;
import android.provider.BaseColumns;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;... | qx/FullRobolectricTestSample | src/test/java/org/robolectric/shadows/SQLiteQueryBuilderTest.java | Java | mit | 2,586 |
require 'spec_helper'
describe Authorization do
let(:client_id) { "12345" }
let(:client_secret) { "Y9axRxR9bcvSW2cc0IwoWeq7" }
let(:expires_in) { 3600 }
let(:access_token) { "75sf4WWbwfr6HYd5URpC6KBk" }
subject do
described_class
end
before do
stub_requests
end
describe '#with_authorizat... | VAGAScom/exact_target_rest | spec/lib/exact_target_rest/authorization_spec.rb | Ruby | mit | 2,830 |
<?php
return array (
'id' => 'mot_xt882_ver1',
'fallback' => 'generic_android_ver2_3',
'capabilities' =>
array (
'uaprof' => 'http://uaprof.motorola.com/phoneconfig/motomb860/Profile/motoxt882.rdf',
'model_name' => 'XT882',
'brand_name' => 'Motorola',
'marketing_name' => 'MOTO XT882',
'phys... | cuckata23/wurfl-data | data/mot_xt882_ver1.php | PHP | mit | 461 |
'use strict'
const redis = require('redis')
const config = require('config-lite').redis
const logger = require('./logger.js')
Promise.promisifyAll(redis.RedisClient.prototype)
let client = redis.createClient(config)
client.on('error', (err) => {
if (err) {
logger.error('connect to redis error, check... | xiedacon/nodeclub-koa | app/middleware/redis.js | JavaScript | mit | 404 |
/*
* This file is part of UltimateCore, licensed under the MIT License (MIT).
*
* Copyright (c) Bammerbom
*
* 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, includi... | Bammerbom/UltimateCore | src/main/java/bammerbom/ultimatecore/sponge/modules/afk/AfkModule.java | Java | mit | 3,618 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace AssaultBird2454.VPTU.Server.Instances
{
public class ServerInstance
{
#region Variables and Objects
#region Base Server
/// <summary>
... | AssaultBird2454/Virtual-Pokemon-Tabletop | Virtual Pokemon Tabletop/AssaultBird2454.VPTU/Server/Instances/ServerInstance.cs | C# | mit | 13,894 |