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 |
|---|---|---|---|---|---|
fig, ax = plt.subplots()
count_weekday_years.median(axis=0).plot(kind='barh', ax=ax, color='#66b266')
xticks = ax.set_yticklabels(['Monday', 'Tuesday', 'Wednesday', "Thursday", "Friday", "Saturday", "Sunday"]) | jorisvandenbossche/DS-python-data-analysis | notebooks/_solutions/case2_biodiversity_analysis41.py | Python | bsd-3-clause | 209 |
// Copyright (c) 2018, Smart Projects Holdings Ltd
// All rights reserved.
// See LICENSE file for license details.
/*
* Properties class implementation.
*/
#include <ugcs/vsm/properties.h>
#include <ugcs/vsm/platform.h>
#include <ugcs/vsm/debug.h>
#include <ugcs/vsm/utils.h>
#include <climits>
#include <cmath>
#i... | UgCS/vsm-cpp-sdk | src/properties.cpp | C++ | bsd-3-clause | 27,390 |
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... | was4444/chromium.src | third_party/WebKit/Source/core/workers/SharedWorkerThread.cpp | C++ | bsd-3-clause | 2,689 |
# -*- coding: utf-8 -*-
"""STOMP client
.. module:: network.jms.stomp_client
:platform: Unix
:synopsis: STOMP client
.. moduleauthor:: Petr Rašek <bowman@hydratk.org>
"""
"""
Events:
-------
jms_before_connect
jms_after_connect
jms_before_send
jms_after_send
jms_before_receive
jms_after_receive
jms_before_brow... | hydratk/hydratk-lib-network | src/hydratk/lib/network/jms/stomp_client.py | Python | bsd-3-clause | 13,434 |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.db import transaction
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from greenmine.core.generi... | niwinz/Green-Mine | src/greenmine/base/views/export.py | Python | bsd-3-clause | 10,254 |
var apiResourcesUrl = '#';
/*
* X-Editable configurations
*/
$.fn.editable.defaults.mode = 'inline';
$.fn.editable.defaults.send = 'always';
$.fn.editable.defaults.ajaxOptions = {type: "patch", contentType: "application/json"};
$.fn.editable.defaults.error = function(response){
if(response.responseJSON.detail !=... | futurice/futurice-ldap-user-manager | fum/common/static/js/main.js | JavaScript | bsd-3-clause | 13,070 |
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must r... | ft-/opensim-optimizations-wip | OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | C# | bsd-3-clause | 10,305 |
using System.Collections.Generic;
namespace Swartz.Mvc.ModelBinders
{
public interface IModelBinderProvider : IDependency
{
IEnumerable<ModelBinderDescriptor> GetModelBinders();
}
} | tuizhis/Swartz | Swartz.Framework/Mvc/ModelBinders/IModelBinderProvider.cs | C# | bsd-3-clause | 205 |
/* ========================================================================== */
/* === Source/Mongoose_EdgeCut.cpp ========================================== */
/* ========================================================================== */
/* -------------------------------------------------------------------------... | jlblancoc/suitesparse-metis-for-windows | SuiteSparse/Mongoose/Source/Mongoose_EdgeCut.cpp | C++ | bsd-3-clause | 6,402 |
import itertools
import functools
import operator
import warnings
from distutils.version import LooseVersion
import numpy as np
from pandas import compat
from pandas._libs import tslib, algos, lib
from pandas.core.dtypes.common import (
_get_dtype,
is_float, is_scalar,
is_integer, is_complex, is_float_dtyp... | winklerand/pandas | pandas/core/nanops.py | Python | bsd-3-clause | 24,684 |
# -*- coding: utf-8 -*-
#
# malepierre documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values hav... | EliotBerriot/malepierre | docs/conf.py | Python | bsd-3-clause | 7,814 |
// Copyright 2017 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... | youtube/cobalt | starboard/shared/stub/speech_recognizer_create.cc | C++ | bsd-3-clause | 909 |
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\VendorRoundTripRate */
$this->title = 'Update Vendor Round Trip Rate: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Vendor Round Trip Rates', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => ... | brijeshm4013/test | common/modules/vendorManagement/views/vendor-round-trip-rate/update.php | PHP | bsd-3-clause | 589 |
<?php
namespace PhpInk\Nami\CoreBundle\Model\Orm\Analytics;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use PhpInk\Nami\CoreBundle\Model\Orm\Core;
/**
* Base analytics (ip, createdAt)
*
* @ORM\MappedSuperclass
*/
class BaseAnalytics extends Core\Entity
{
/**
* Primary Key
... | phpink/nami-core-bundle | Model/Orm/Analytics/BaseAnalytics.php | PHP | bsd-3-clause | 2,875 |
var functions_dup =
[
[ "_", "functions.html", null ],
[ "a", "functions_a.html", null ],
[ "b", "functions_b.html", null ],
[ "c", "functions_c.html", null ],
[ "d", "functions_d.html", null ],
[ "e", "functions_e.html", null ],
[ "f", "functions_f.html", null ],
[ "g", "functions_g.htm... | improve-project/platform | doc/database_handler/functions_dup.js | JavaScript | bsd-3-clause | 762 |
//go:build ios
// +build ios
package attachments
/*
#cgo LDFLAGS: -framework MobileCoreServices
*/
import "C"
| keybase/client | go/chat/attachments/preview_darwin_ios.go | GO | bsd-3-clause | 112 |
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* The examp... | shrutic/react-native | Examples/UIExplorer/js/MultiColumnExample.js | JavaScript | bsd-3-clause | 5,181 |
#!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
readme = f.read()
with open('CHANGES.rst') as f:
changes = f.read()
setup(
name='sdict',
version='0.1.0',
description='dict subclass with slicing and insertion.',
author='Jared Suttles',
url='https://git... | jaredks/sdict | setup.py | Python | bsd-3-clause | 511 |
import { LightningElement, api, track, wire } from "lwc";
//labels
import stgColAccountRecordType from "@salesforce/label/c.stgColAccountRecordType";
import stgColAutoEnrollmentStatus from "@salesforce/label/c.stgColAutoEnrollmentStatus";
import stgColAutoEnrollmentRole from "@salesforce/label/c.stgColAutoEnrollmentRol... | SalesforceFoundation/HEDAP | force-app/main/default/lwc/autoEnrollmentMappingModalBody/autoEnrollmentMappingModalBody.js | JavaScript | bsd-3-clause | 7,220 |
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\models\Salary */
$this->title = 'Create Salary';
$this->params['breadcrumbs'][] = ['label' => 'Salaries', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="salary-create">
<h1><?= Html::encode($this->t... | kimniyom/transport | views/salary/create.php | PHP | bsd-3-clause | 413 |
<?php
namespace core\control;
use core\util\param\Validator as Validator;
/**
* Simple timer class. If the timer is started on can call Timer::get()
* to check if the timeout already passed.
* @author Marc Bredt
*/
class Timer {
/**
* Default timer timeout
*/
const timer_default_timeout = 60;
/**
... | marcbredt/heili | trunk/src/core/control/timer.class.php | PHP | bsd-3-clause | 3,021 |
<?php
if(!defined('SLINEINC'))
{
exit("Request Error!");
}
function lib_getchildcomment(&$ctag,&$refObj)
{
global $dsql;
$attlist="row|8,typeid|,groupname|";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = trim($ctag->GetIn... | lz1988/stourwebcms | include/taglib/smore/getchildcomment.lib.php | PHP | bsd-3-clause | 1,998 |
require 'active_record'
require 'pure_record/pure_class'
require 'pure_record/actions'
module PureRecord
def self.Create(*args)
PureRecord::Actions::Create.new(*args)
end
def self.Update(*args)
PureRecord::Actions::Update.new(*args)
end
def self.Delete(*args)
PureRecord::Actions::Delete.new(*ar... | MichaelBaker/pure_record | lib/pure_record.rb | Ruby | bsd-3-clause | 4,267 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Goal: Implement simple tasks executed during deployment with deploy.sh
#
# @authors
# Andrei Sura <sura.andrei@gmail.com>
# Taeber Rapczak <taeber@ufl.edu>
"""
Fabric deployment file.
@see
http://fabric-docs.readthedocs.org/en/latest/
... | indera/redi-dropper-client | app/deploy/fabfile.py | Python | bsd-3-clause | 19,299 |
/*
* Copyright (c) 2005-2010, KNOPFLERFISH project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* noti... | knopflerfish/knopflerfish.org | osgi/bundles/event/src/org/knopflerfish/bundle/event/TimeoutDeliver.java | Java | bsd-3-clause | 4,529 |
<?php
namespace Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\Session\Container;
class MytestController extends AbstractActionController {
private $title = "";
private $keyword = "";
private $description = "";
private $raw = null;
private... | cybersolutions/pubdr | module/Application/src/Application/Controller/MytestController.php | PHP | bsd-3-clause | 1,773 |
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace backend\assets;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class AppAsset extends AssetBundle
{
public $b... | ASzczesna/LemiRestaurant | backend/assets/AppAsset.php | PHP | bsd-3-clause | 551 |
#ifndef SPREADSHEET_EXTENSION_HPP
#define SPREADSHEET_EXTENSION_HPP
#include "core_data_model/i_model_extension.hpp"
#include "core_data_model/i_item_role.hpp"
#include "core_data_model/abstract_item_model.hpp"
#include <unordered_map>
#include <ctime>
#include <vector>
namespace wgt
{
class SpreadsheetExtension : p... | wgsyd/wgtf | src/core/testing/plg_grid_editor_test/spreadsheet_extension.hpp | C++ | bsd-3-clause | 853 |
<?php
define("SERVER", "127.0.0.1");
define("PORT", 9090);
define("USERNAME", "root");
define("PASSWORD", "");
?>
| wfcreations/ANNClient | config.php | PHP | bsd-3-clause | 122 |
#pragma once
//=====================================================================//
/*! @file
@brief DS3231 RTC ドライバー @n
Maxim Integrated @n
https://datasheets.maximintegrated.com/en/ds/DS3231.pdf @n
中華製モジュールの注意点:@n
・バッテリーバックアップにリチウム電池を使う場合、直列抵抗を除く事
@author 平松邦仁 (hira@rvf-rc45.net)
@copyright Copyr... | hirakuni45/RX | chip/DS3231.hpp | C++ | bsd-3-clause | 4,347 |
package dev.kkorolyov.pancake.platform.event;
/**
* {@link Event} requesting an entity be destroyed.
*/
public class DestroyEntity implements Event {
private final int id;
/**
* Constructs a new destroy entity event.
* @param id ID of entity to destroy
*/
public DestroyEntity(int id) {
this.id = id;
}
... | kkorolyov/Pancake | pancake-platform/src/main/java/dev/kkorolyov/pancake/platform/event/DestroyEntity.java | Java | bsd-3-clause | 400 |
module Hippo::TransactionSets
module HIPAA_277
class L2000A < Hippo::TransactionSets::Base
loop_name 'L2000A' #Information Source Level
#Information Source Level
segment Hippo::Segments::HL,
:name => 'Information Source Level',
:minimum => 1,... | Aprexis/hippo | lib/hippo/transaction_sets/HIPAA_277/L2000A.rb | Ruby | bsd-3-clause | 1,392 |
<?php
/**
* \PEAR2\Pyrus\DER\Schema
*
* PHP version 5
*
* @category PEAR2
* @package PEAR2_Pyrus
* @author Greg Beaver <cellog@php.net>
* @copyright 2010 The PEAR Group
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @version SVN: $Id$
* @link http://svn.php.net... | pear2/pear2.php.net | vendor/php/PEAR2/Pyrus/DER/Schema.php | PHP | bsd-3-clause | 8,073 |
module.exports.BaseController = require('./BaseController');
| olalonde/chungking | lib/index.js | JavaScript | bsd-3-clause | 61 |
// Copyright 2015 The Serulian Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package packageloader defines functions and types for loading and parsing source from disk or VCS.
package packageloader
import (
"fmt"
"log"
"path... | Serulian/compiler | packageloader/packageloader.go | GO | bsd-3-clause | 23,170 |
from .factory import factorize, ArgumentError, NonExistentTypeError, NonExistentModuleError | engine-cl/ng-factory | ng_factory/__init__.py | Python | bsd-3-clause | 91 |
using System;
using System.Collections.Generic;
namespace Protobuild
{
public class KnownToolProvider : IKnownToolProvider
{
private readonly IPackageGlobalTool _packageGlobalTool;
private readonly IPackageManager _packageManager;
private readonly IHostPlatformDetector _hostPlatformD... | dellis1972/Protobuild | Protobuild.Internal/Packages/PackageGlobalTool/KnownToolProvider.cs | C# | mit | 1,836 |
module('lunr.tokenizer')
test("splitting simple strings into tokens", function () {
var simpleString = "this is a simple string",
tokens = lunr.tokenizer(simpleString)
deepEqual(tokens, ['this', 'is', 'a', 'simple', 'string'])
})
test('downcasing tokens', function () {
var simpleString = 'FOO BAR',
... | nodoio/kb-pulseeditor | node_modules/lunr/test/tokenizer_test.js | JavaScript | mit | 1,694 |
/*
* Copyright (c) 2017. MIT-license for Jari Van Melckebeke
* Note that there was a lot of educational work in this project,
* this project was (or is) used for an assignment from Realdolmen in Belgium.
* Please just don't abuse my work
*/
//! moment.js locale configuration
//! locale : Klingon (tlh)
//! author ... | N00bface/Real-Dolmen-Stage-Opdrachten | stageopdracht/src/main/resources/static/vendors/moment/src/locale/tlh.js | JavaScript | mit | 3,713 |
#!/usr/bin/env php
<?php
$COMPOSER = getenv("COMPOSER")?:"composer.json";
$COMPOSER_LOCK = getenv("COMPOSER_LOCK")?:"composer.lock";
$STACK = getenv("STACK")?:"cedar-14";
// prefix keys with "heroku-sys/"
function mkdep($require) { return array_combine(array_map(function($v) { return "heroku-sys/$v"; }, array_keys($r... | Hyra/heroku-buildpack-enc | bin/util/platform.php | PHP | mit | 4,934 |
// Generated on 12/11/2014 19:02:10
using System;
using System.Collections.Generic;
using System.Linq;
using BlueSheep.Common.IO;
namespace BlueSheep.Common.Protocol.Types
{
public class InteractiveElementNamedSkill : InteractiveElementSkill
{
public new const short ID = 220;
public override shor... | Sadikk/BlueSheep | BlueSheep/Common/Protocol/types/game/interactive/InteractiveElementNamedSkill.cs | C# | mit | 1,077 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About judgecoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line... | judgecrypto/judgecoin | src/qt/locale/bitcoin_sr.ts | TypeScript | mit | 112,779 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-12-21 01:22
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('simplesite', '0003_auto_20161006_2321'),
]
operations = [
migrations.AddFiel... | marsxn/simple-site | simplesite/migrations/0004_page_alternative_url.py | Python | mit | 514 |
<?php
/**
* TOP API: taobao.promotionmisc.activity.range.list.get request
*
* @author auto create
* @since 1.0, 2013-09-13 16:51:03
*/
class Taobao_Request_PromotionmiscActivityRangeListGetRequest {
/**
* 活动id
**/
private $activityId;
private $apiParas = array();
public function setActivityId($activity... | musicsnap/LearnCode | php/code/yaf/application/library/Taobao/Request/PromotionmiscActivityRangeListGetRequest.php | PHP | mit | 944 |
/************************************************************************************
Filename : CAPI_DistortionRenderer.cpp
Content : Combines all of the rendering state associated with the HMD
Created : February 2, 2014
Authors : Michael Antonov
Copyright : Copyright 2014 Oculus VR, Inc. ... | mplanck/ShaderToyVR | third/LibOVR_043/Src/CAPI/CAPI_DistortionRenderer.cpp | C++ | mit | 4,430 |
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2016-2018 Baldur Karlsson
*
* 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... | etnlGD/renderdoc | renderdoc/os/posix/linux/linux_process.cpp | C++ | mit | 3,811 |
package launcher
import (
"fmt"
"io"
"github.com/influxdata/influxdb/v2/kit/cli"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"gopkg.in/yaml.v3"
)
func NewInfluxdPrintConfigCommand(v *viper.Viper, influxdOpts []cli.Opt) (*cobra.Command, error) {
var keyToPrint string
printOpts := make([]cli.Opt, len(in... | influxdata/influxdb | cmd/influxd/launcher/print_config.go | GO | mit | 2,427 |
class User
include I18n::Alchemy
attr_accessor :created_at
localize :created_at, :using => :date
end
| sho-wtag/catarse-2.0 | vendor/bundle/ruby/2.2.0/gems/i18n_alchemy-0.2.1/test/models/user.rb | Ruby | mit | 108 |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GetCaasServerAntiAffinityRuleCmdlet.cs" company="">
//
// </copyright>
// <summary>
// The get caas server anti affinity rule cmdlet.
// </summary>
// -----------------------... | DimensionDataCBUSydney/DimensionData.ComputeClient | PowershellModule/CloudCompute.Powershell/Networks/GetCaasServerAntiAffinityRuleCmdlet.cs | C# | mit | 3,395 |
# A Nested Array to Model a Bingo Board SOLO CHALLENGE
# I spent [1] hours on this challenge.
# Release 0: Pseudocode
# Outline:
# Create a method to generate a letter ( b, i, n, g, o) and a number (1-100)
# create an instance variable of the list of letters in initialize
# generate a random number between 0 to 4 t... | zinosama/dbc-phase-0 | week-6/bingo_solution.rb | Ruby | mit | 2,975 |
<?php
namespace PSR2R\Sniffs\WhiteSpace;
use PHP_CodeSniffer_File;
use PHP_CodeSniffer_Tokens;
/**
* No whitespace should be at the beginning and end of an array.
*
* @author Mark Scherer
* @license MIT
*/
class ArraySpacingSniff implements \PHP_CodeSniffer_Sniff {
/**
* @inheritDoc
*/
public function re... | drulm/user-form-robot | vendor/fig-r/psr2r-sniffer/PSR2R/Sniffs/WhiteSpace/ArraySpacingSniff.php | PHP | mit | 2,045 |
/**
* @fileoverview Get data value from data-attribute
* @author NHN FE Development Lab <dl_javascript@nhn.com>
*/
'use strict';
var convertToKebabCase = require('./_convertToKebabCase');
/**
* Get data value from data-attribute
* @param {HTMLElement} element - target element
* @param {string} key - key
* @re... | nhnent/fe.code-snippet | domUtil/getData.js | JavaScript | mit | 564 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bermuda.AdminLibrary.Interfaces;
namespace Bermuda.AdminLibrary.Models
{
public class CloudInstance : ICloudEntity
{
public string Id { get; set; }
public string Name { get; set; }
}
... | melnx/Bermuda | BermudaAdmin/Bermuda.AdminLibrary/Models/CloudInstance.cs | C# | mit | 325 |
<div class="uk-grid">
<div class="uk-width-1-1 uk-width-medium-1-2 uk-text-center">
<img src="{{ url('images/original/' . $image->filename) }}" alt="{{ $image->alt }}">
</div>
<div class="uk-width-1-1 uk-width-medium-1-2">
<div class="url uk-alert uk-alert-success uk-text-break">
... | philsquare/LaraManager | src/views/images/edit.blade.php | PHP | mit | 1,549 |
jQuery(document).ready(function() {
var makemap = function() {
$('#oabpositioner').html('<div style="position:relative;top:0;left:0;z-index:1000;"> \
<p style="text-align:center;"> \
<a href="https://openaccessbutton.org" style="font-weight:bold;color:#212f3f;"> \
openaccessbutton.org \
... | OAButton/oab_static | static/map.js | JavaScript | mit | 3,167 |
'use strict';
var Stream = require('stream');
var expect = require('chai').expect;
var Excel = require('../../../excel');
describe('Workbook Writer', function() {
it('returns undefined for non-existant sheet', function() {
var stream = new Stream.Writable({write: function noop() {}});
var wb = new Excel.s... | peakon/exceljs | spec/unit/doc/workbook-writer.spec.js | JavaScript | mit | 474 |
module.exports = [ [ 'zero', 'one', 'two', 'three' ] ]
| bigeasy/packet | test/generated/packed/nested.lookup.js | JavaScript | mit | 55 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace PerplexMail
{
/// <summary>
/// This class is used as a model class to specify which tag (in the email) should be replaced with which value
/// </summary>
public class EmailTag
{
string _tag;
... | PerplexInternetmarketing/PerplexMail-for-Umbraco | PerplexMail/EmailTag.cs | C# | mit | 2,800 |
package com.snobot.xlib;
import edu.wpi.first.wpilibj.Preferences;
public class PropertyManager
{
private static boolean sPropertyAdded = false;
public static abstract class IProperty<Type>
{
protected String mKey;
protected Type mDefault;
public IProperty(String aKey, Type aDefa... | ArcticWarriors/snobot-2017 | RobotCode/snobot2016/src/com/snobot/xlib/PropertyManager.java | Java | mit | 3,643 |
# -*- coding: utf-8 -*-
'''
# Copyright (c) 2015 Microsoft Corporation
#
# 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 us... | OneDrive/onedrive-sdk-python | src/python3/request/item_delta_collection.py | Python | mit | 2,730 |
require "pathname"
require "vagrant/action/builder"
module VagrantPlugins
module CommandPlugin
module Action
# This middleware sequence will install a plugin.
def self.action_expunge
Vagrant::Action::Builder.new.tap do |b|
b.use ExpungePlugins
end
end
def self.... | jtopper/vagrant | plugins/commands/plugin/action.rb | Ruby | mit | 2,093 |
module DiffHelper
def mark_inline_diffs(old_line, new_line)
old_diffs, new_diffs = Gitlab::Diff::InlineDiff.new(old_line, new_line).inline_diffs
marked_old_line = Gitlab::Diff::InlineDiffMarker.new(old_line).mark(old_diffs, mode: :deletion)
marked_new_line = Gitlab::Diff::InlineDiffMarker.new(new_line).m... | openwide-java/gitlabhq | app/helpers/diff_helper.rb | Ruby | mit | 5,138 |
package April2021Leetcode;
public class _0832FlippingAnImage {
public static void main(String[] args) {
System.out.println(flipAndInvertImage(
new int[][] { new int[] { 1, 1, 0 }, new int[] { 1, 0, 1 }, new int[] { 0, 0, 0 } }));
System.out.println(flipAndInvertImage(new int[][] { new int[] { 1, 1, 0, 0 }, ne... | darshanhs90/Java-InterviewPrep | src/April2021Leetcode/_0832FlippingAnImage.java | Java | mit | 472 |
/**
* istanbul ignore next
*/
define(function(require, exports, module) {
'use strict';
var Observable = require('./Observable').Class;
/**
* @constructor
* @extends Observable
* @alias RCSDK.core.PageVisibility
*/
function PageVisibility() {
Observable.call(this);
... | grokify/ringcentral-cti-demo-js | public/vendor/rcsdk/1.2.1/lib/core/PageVisibility.js | JavaScript | mit | 2,319 |
require File.join(File.dirname(File.expand_path(__FILE__)), "spec_helper")
describe "Model#values" do
before do
@c = Class.new(Sequel::Model(:items))
end
it "should return the hash of model values" do
hash = {:x=>1}
@c.load(hash).values.should equal(hash)
end
it "should be aliased as to_hash" d... | Marketcircle/sequel | spec/model/record_spec.rb | Ruby | mit | 65,212 |
<?php
class f_form_decor_formBody extends f_form_decor_default
{
protected $_separator;
/**
* @return f_form_decor_formBody
*/
public static function _(array $config = array())
{
return new self($config);
}
public function separator($sSeparator = null)
{
if (fun... | serafin/fine | src/lib/f/form/decor/formBody.php | PHP | mit | 885 |
# frozen_string_literal: true
class MigrateVulnerabilityDismissalFeedback < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
MIGRATION = 'UpdateVulnerabilitiesFromDismissalFeedback'
BATCH_SIZE = 500
DELAY_INTERVAL = 2.minutes.to_i
class ... | mmkassem/gitlabhq | db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb | Ruby | mit | 986 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Console\Formatter;
/**
* @author Tien Xuan Vo <tien.... | OskarStark/symfony | src/Symfony/Component/Console/Formatter/NullOutputFormatter.php | PHP | mit | 1,394 |
/*
Copyright (c) 2013-2014, Maik Schreiber
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the f... | RealGrep/NavHud | Source/ToolbarWrapper.cs | C# | mit | 25,318 |
from __future__ import division, print_function
import myhdl
from myhdl import intbv, instance, delay
from rhea.system import Barebone
from . import SPIBus
@myhdl.block
def spi_controller_model(clock, ibus, spibus):
"""A model of an SPI controller
Arguments:
ibus (Barebone): internal bus
spibu... | cfelton/rhea | rhea/cores/spi/spi_models.py | Python | mit | 1,479 |
items_found_can_i_use = None
can_i_use_file = None
can_i_use_popup_is_showing = False
can_i_use_list_from_main_menu = False
path_to_can_i_use_data = os.path.join(H_SETTINGS_FOLDER, "can_i_use", "can_i_use_data.json")
path_to_test_can_i_use_data = os.path.join(H_SETTINGS_FOLDER, "can_i_use", "can_i_use_data2.json")
url_... | pichillilorenzo/JavaScript-Completions | helper/can_i_use/can_i_use_command.py | Python | mit | 10,624 |
package online.zhaopei.myproject.domain.para;
import java.io.Serializable;
public class Para implements Serializable {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -6856542086478273749L;
private String code;
private String name;
public String getCode() {
return code;
}
publ... | zhaopei0418/maintain | src/main/java/online/zhaopei/myproject/domain/para/Para.java | Java | mit | 482 |
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.storage.v2019_06_01;
import com.fasterxml.jackso... | selvasingh/azure-sdk-for-java | sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/KeyPermission.java | Java | mit | 1,352 |
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation;
import... | selvasingh/azure-sdk-for-java | sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountMapImpl.java | Java | mit | 5,910 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Minimal Flask application example for development.
SPHINX-START
Run example deve... | inveniosoftware/invenio-jsonschemas | examples/app.py | Python | mit | 1,706 |
const mockDevice = { moveAbsolute: jest.fn(() => Promise.resolve()) };
jest.mock("../../device", () => ({ getDevice: () => mockDevice }));
let mockPath = "";
jest.mock("../../history", () => ({
getPathArray: jest.fn(() => mockPath.split("/")),
history: { push: jest.fn() }
}));
import * as React from "react";
impo... | gabrielburnworth/Farmbot-Web-App | frontend/farm_designer/__tests__/move_to_test.tsx | TypeScript | mit | 4,612 |
<?php defined('BASEPATH') OR exit('No direct script access allowed');
define("IS_AJAX",isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER["HTTP_X_REQUESTED_WITH"]) == 'xmlhttprequest');
class Reporte extends CI_Controller{
function __construct(){
parent::__construct();
}
function Index(){
... | mike2c/SCSEUNI | application/controllers/Reporte.php | PHP | mit | 2,508 |
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("9. ... | RAstardzhiev/Software-University-SoftUni | Databases Advanced - Entity Framework 6/DB Apps Introduction/9. Increase Age Stored Procedure/Properties/AssemblyInfo.cs | C# | mit | 1,435 |
<?php
namespace knx\FarmaciaBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use knx\FarmaciaBundle\Entity\Traslado;
use knx\FarmaciaBundle\Entity\Almacen;
use knx\FarmaciaBundle\Entity\Inventario;
use knx\FarmaciaBundle\Entity\Imv;
use knx\FarmaciaBundle\Entity\Farmacia;
use knx\FarmaciaB... | Kenovix/san-miguel | src/knx/FarmaciaBundle/Controller/TrasladoController.php | PHP | mit | 22,433 |
<?php
/**
* kitFramework::Basic
*
* @author Team phpManufaktur <team@phpmanufaktur.de>
* @link https://kit2.phpmanufaktur.de
* @copyright 2013 Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT
*/
namespace phpManufaktur\Basic\Control\CMS;
use phpM... | phpManufakturHeirs/kfBasic | Control/CMS/OutputFilter.php | PHP | mit | 908 |
const bodyParser = require('body-parser')
module.exports = [
bodyParser.json({ limit: '10mb', extended: false }),
bodyParser.urlencoded({ extended: false }),
]
| legovaer/json-server | src/server/body-parser.js | JavaScript | mit | 165 |
import cnn
import numpy as np
if __name__ == '__main__':
#import input_data
import random
from PIL import Image
#mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
ocr = cnn.CNN()
ocr.build()
#ocr.predict()
show_image2 = Image.open('G:/Users/kakoi/Desktop/无标题... | kelifrisk/justforfun | python/cnn/mnist_resnet/main.py | Python | mit | 672 |
namespace Exrin.Abstraction
{
using System;
public interface IInjectionProxy
{
void Init();
void Complete();
bool IsRegistered<T>();
void Register<T>(InstanceType type = InstanceType.SingleInstance) where T : class;
void RegisterInterface<I, T>(InstanceType ty... | adamped/exrin | Exrin/Exrin.Framework/Abstraction/IInjection.cs | C# | mit | 716 |
package com.adobe.epubcheck.ctc.xml;
import java.util.HashSet;
import java.util.Locale;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
impor... | WSchindler/epubcheck | src/main/java/com/adobe/epubcheck/ctc/xml/ScriptTagHandler.java | Java | mit | 7,447 |
export function getEthernetSource(packet: any): string {
return decimalToHex(packet.payload.shost.addr);
}
export function decimalToHex(numbers: number[]): string {
let hexStrings = numbers.map(decimal => decimal.toString(16).padStart(2, '0'));
return hexStrings.join(':');
}
| ide/dash-button | src/MacAddresses.ts | TypeScript | mit | 283 |
import { equal } from '@ember/object/computed';
import Component from '@ember/component';
import { action, computed } from '@ember/object';
import { htmlSafe } from '@ember/template';
export default Component.extend({
tagName: '',
position: 0,
side: '',
isRight: equal('side', 'right'),
isLeft: equal('side', ... | emberjs/ember-inspector | lib/ui/addon/components/drag-handle.js | JavaScript | mit | 2,789 |
package tests
import (
"time"
. "github.com/smartystreets/assertions"
"flywheel.io/sdk/api"
)
func (t *F) TestBatch() {
_, _, _, acquisitionId := t.createTestAcquisition()
gearId := t.createTestGear()
poem := "The falcon cannot hear the falconer;"
t.uploadText(t.UploadToAcquisition, acquisitionId, "yeats.tx... | flywheel-io/core-sdk | tests/batch_test.go | GO | mit | 1,847 |
'use strict';
const debug = require('debug')('risk:Game');
const Battle = require('./Battle');
const stateBuilder = require('./state-builder');
const constants = require('./constants');
const ERRORS = require('./errors');
const createError = require('strict-errors').createError;
const events = require('./events');
... | arjanfrans/conquete | lib/Game.js | JavaScript | mit | 19,761 |
using System.Collections.Generic;
using System.Linq;
using Microsoft.SharePoint.Client;
using OfficeDevPnP.Core.Entities;
using OfficeDevPnP.Core.Framework.Provisioning.Model;
using File = Microsoft.SharePoint.Client.File;
using OfficeDevPnP.Core.Diagnostics;
using OfficeDevPnP.Core.Framework.Provisioning.ObjectHandle... | OfficeDev/PnP-Sites-Core | Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs | C# | mit | 18,721 |
<?php
namespace Swarrot\SwarrotBundle\Event;
use Symfony\Component\EventDispatcher\Event;
use Swarrot\Broker\Message;
class MessagePublishedEvent extends Event
{
const NAME = 'swarrot.message_published';
protected $messageType;
protected $message;
protected $connection;
protected $exchange;
... | stof/SwarrotBundle | Event/MessagePublishedEvent.php | PHP | mit | 1,399 |
goog.provide('Mavelous.MavlinkAPI');
goog.provide('Mavelous.MavlinkMessage');
goog.require('Mavelous.FakeVehicle');
goog.require('goog.debug.Logger');
/**
* A mavlink message.
*
* @param {{_type: string, _index: number}} attrs The message attributes.
* @constructor
* @extends {Backbone.Model}
*/
Mavelous.Mav... | jiusanzhou/mavelous | modules/lib/mavelous_web/script/mavlinkapi.js | JavaScript | mit | 4,319 |
# coding=utf-8
from __future__ import unicode_literals
from .. import Provider as SsnProvider
import random
class Provider(SsnProvider):
#in order to create a valid SIN we need to provide a number that passes a simple modified Luhn Algorithmn checksum
#this function essentially reverses the checksum step... | venmo/faker | faker/providers/ssn/en_CA/__init__.py | Python | mit | 1,457 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | karan/dotfiles | .vscode/extensions/redhat.vscode-yaml-0.7.2/node_modules/yaml-language-server/out/server/node_modules/vscode-json-languageservice/lib/esm/parser/jsonParser.js | JavaScript | mit | 57,377 |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M4.41 22H21c.55 0 1-.45 1-1V4.41c0-.89-1.08-1.34-1.71-.71L3.71 20.29c-.63.63-.19 1.71.7 1.71zM20 20h-3V9.83l3-3V20z"
}), 'NetworkCellRounded'); | oliviertassinari/material-ui | packages/mui-icons-material/lib/esm/NetworkCellRounded.js | JavaScript | mit | 307 |
using System.Diagnostics.Contracts;
using LanguageExt.Attributes;
namespace LanguageExt.TypeClasses
{
/// <summary>
/// Fractional number type-class
/// </summary>
/// <typeparam name="A">The type for which fractional
/// operations are being defined.</typeparam>
[Typeclass("Fraction*")]
... | StanJav/language-ext | LanguageExt.Core/TypeClasses/Fraction/Fraction.cs | C# | mit | 670 |
<?php
/* FilmwebWebsiteBundle:Order:order_information.html.twig */
class __TwigTemplate_faeebbfa7b62f5cd62c9c149e2739a6decc2df0faf94344f589c73bc191c7784 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
try {
$... | paskalov/webs | app/cache/dev/twig/fa/ee/bbfa7b62f5cd62c9c149e2739a6decc2df0faf94344f589c73bc191c7784.php | PHP | mit | 4,259 |
using System.Web.Mvc;
using System.Web.Routing;
namespace MySite.WebUI.App_Start
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",... | michaelmello/mysite-retired | MySite.WebUI/App_Start/RouteConfig.cs | C# | mit | 506 |
<script type="text/javascript">
$(document).ready(function(){
$('#spm_tab a').click(function(e) {
e.preventDefault();
$(this).tab('show');
});
// store the currently selected tab in the hash value
$("ul.nav-tabs > li > a").on("shown.bs.tab", function(e) {
var id = $(... | swdmnd/rsa | application/views/rsa_tup/spm_tup_verifikator.php | PHP | mit | 185,786 |
/**
* @class angular
* @method routes
*/
var routes = module.exports = function() {
};
/* EOF */ | dianavermilya/todo-app | node_modules/angular/lib/node-angular/routes.js | JavaScript | mit | 103 |
window.abi = require("ethereumjs-abi");
| 15chrjef/ico-wizard | assets/javascripts/application/main.js | JavaScript | mit | 40 |