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 |
|---|---|---|---|---|---|
#ifndef PYTHONIC_BUILTIN_TRUE_HPP
#define PYTHONIC_BUILTIN_TRUE_HPP
#include "pythonic/include/builtins/True.hpp"
#endif
| pombredanne/pythran | pythran/pythonic/builtins/True.hpp | C++ | bsd-3-clause | 123 |
import numpy as np
from numpy import diag, inf
from numpy import copy, dot
from numpy.linalg import norm
class ExceededMaxIterationsError(Exception):
def __init__(self, msg, matrix=[], iteration=[], ds=[]):
self.msg = msg
self.matrix = matrix
self.iteration = iteration
s... | mikecroucher/nearest_correlation | nearest_correlation.py | Python | bsd-3-clause | 4,572 |
using Shuttle.Core.Contract;
using Shuttle.Core.Pipelines;
namespace Shuttle.Esb
{
public class DistributorPipeline : Pipeline
{
public DistributorPipeline(IServiceBusConfiguration configuration,
IGetWorkMessageObserver getWorkMessageObserver,
IDeserializeTransportMessageObserv... | Shuttle/shuttle-esb-core | Shuttle.Esb/Pipeline/Pipelines/DistributorPipeline.cs | C# | bsd-3-clause | 2,779 |
package org.basex.gui.dialog;
import static org.basex.core.Text.*;
import java.awt.*;
import java.awt.event.*;
import org.basex.gui.*;
import org.basex.gui.GUIConstants.Msg;
import org.basex.gui.layout.*;
import org.basex.util.*;
/**
* URL dialog.
*
* @author BaseX Team 2005-16, BSD License
* @author Christian ... | drmacro/basex | basex-core/src/main/java/org/basex/gui/dialog/DialogInstallURL.java | Java | bsd-3-clause | 1,896 |
#!/usr/bin/env python
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_numbers('../data/fm_train_real.dat')
testdat = lm.load_numbers('../data/fm_test_real.dat')
parameter_list = [[traindat,testdat,1.1],[traindat,testdat,1.2]]
def kernel_sparse_gaussian (fm_train_real=traindat,fm_test_real=testdat... | shogun-toolbox/shogun | examples/undocumented/python/kernel_sparse_gaussian.py | Python | bsd-3-clause | 824 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__float_zero_33.cpp
Label Definition File: CWE369_Divide_by_Zero__float.label.xml
Template File: sources-sinks-33.tmpl.cpp
*/
/*
* @description
* CWE: 369 Divide by Zero
* BadSource: zero Fixed value of zero
* GoodSource: A hardcoded non-ze... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE369_Divide_by_Zero/s01/CWE369_Divide_by_Zero__float_zero_33.cpp | C++ | bsd-3-clause | 3,055 |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | NifTK/MITK | Modules/SceneSerialization/src/mitkGeometryDataSerializer.cpp | C++ | bsd-3-clause | 1,794 |
<?php
include "util.inc";
$state = isset($_GET['state']) ? $_GET['state'] : "schema";
switch($state)
{
case "schema":
if (isset($_SESSION['schema'])) {
unlink($_SESSION['schema']['path']);
}
$_SESSION = array();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-... | fresskarma/tinyos-1.x | contrib/nucleus/tools/php/nucleus/del.php | PHP | bsd-3-clause | 528 |
/*
* Copyright (c) Contributors, http://aurora-sim.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 mus... | NanaYngvarrdottir/Software-Testing | VirtualReality/Framework/DatabaseInterfaces/IGroupsServiceConnector.cs | C# | bsd-3-clause | 6,596 |
# $Id: __init__.py 5618 2008-07-28 08:37:32Z strank $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
This package contains Docutils Writer modules.
"""
__docformat__ = 'reStructuredText'
import os.path
import docutils
from docutils import languages, C... | spreeker/democracygame | external_apps/docutils-snapshot/docutils/writers/__init__.py | Python | bsd-3-clause | 4,258 |
import numpy as np
import paths
import pyregion
from astropy import coordinates
from astropy import units as u
from astropy import table
from astropy.table import Table,Column
import latex_info
from latex_info import latexdict, exp_to_tex, format_float
tbl = Table.read(paths.tpath('PPV_H2CO_Temperature.ipac'), format=... | adamginsburg/APEX_CMZ_H2CO | analysis/texify_dendro_table.py | Python | bsd-3-clause | 3,226 |
/*
* Copyright (c) 2014, Apptentive, Inc. All Rights Reserved.
* Please refer to the LICENSE file for the terms and conditions
* under which redistribution and use of this file is permitted.
*/
package com.apptentive.android.sdk.module.messagecenter.view;
import android.content.Context;
import android.view.View;
... | apptentive/apptentive-trigger-io | forge-workspace/modules/apptentive/inspector/an-inspector/ForgeModule/src/com/apptentive/android/sdk/module/messagecenter/view/MessageAdapter.java | Java | bsd-3-clause | 1,371 |
using System.Collections.Generic;
using System.Runtime.Serialization;
using Funq;
using ServiceStack.Common;
using ServiceStack.Common.Web;
using ServiceStack.DataAnnotations;
using ServiceStack.OrmLite;
using ServiceStack.Razor;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
using Serv... | meebey/ServiceStack | tests/RazorRockstars.Console.Files/AppHost.cs | C# | bsd-3-clause | 4,881 |
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.bgfx;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* GPU info.
*
* <h3>Layout</h3... | LWJGL-CI/lwjgl3 | modules/lwjgl/bgfx/src/generated/java/org/lwjgl/bgfx/BGFXCapsGPU.java | Java | bsd-3-clause | 5,587 |
import sys
import pytest
from numpy.testing import (
assert_, assert_array_equal, assert_raises,
)
import numpy as np
from numpy import random
class TestRegression:
def test_VonMises_range(self):
# Make sure generated random variables are in [-pi, pi].
# Regression test for ticket #986... | simongibbons/numpy | numpy/random/tests/test_randomstate_regression.py | Python | bsd-3-clause | 7,541 |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd
// DNS client: see RFC 1035.
// Has to be linked into package net for Dial.
// TODO(rsc):
// Check per... | TomHoenderdos/go-sunos | src/pkg/net/dnsclient_unix.go | GO | bsd-3-clause | 8,117 |
<?php
return array (
'Search' => 'Cerca',
);
| LeonidLyalin/vova | common/humhub/protected/humhub/modules/search/messages/it/base.php | PHP | bsd-3-clause | 47 |
<?php
namespace Contract\Service;
interface ContractManager {
/**
* Initiate sebuah kontrak.
*
* @param unknown $datas
*/
public function initiateContract($datas);
} | zakyalvan/eproc-ext | module/Contract/src/Contract/Service/ContractManager.php | PHP | bsd-3-clause | 177 |
dw.derive.variable = function(x) {
var variable = dw.derive.expression();
variable.transform = function(values, table) {
var result = table[x].copy();
return result;
}
return variable;
}
| uwdata/profiler | wrangler/src/transform/derive/variable.js | JavaScript | bsd-3-clause | 197 |
#!/usr/bin/env ruby
# -*- mode: ruby; coding: utf-8-unix -*-
require 'test/unit'
require 'opencv'
require File.expand_path(File.dirname(__FILE__)) + '/helper'
include OpenCV
# Tests for OpenCV::CvChain
class TestCvChain < OpenCVTestCase
def test_APPROX_OPTION
assert_equal(:approx_simple, CvChain::APPROX_CHAIN_... | ryanfb/ruby-opencv | test/test_cvchain.rb | Ruby | bsd-3-clause | 1,989 |
/*
* RandomConditional_test.cpp
*
* Copyright (c) 2015, Norman Alan Oursland
* All rights reserved.
*/
#include "cognitoware/math/data/Vector.h"
#include "cognitoware/math/probability/RandomConditional.h"
#include "cognitoware/math/probability/RandomDistribution.h"
#include "gtest/gtest.h"
using cognitoware::m... | ashfaqfarooqui/robotics | cognitoware/math/probability/RandomConditional_test.cpp | C++ | bsd-3-clause | 695 |
package org.usfirst.frc369.Robot2017Code.commands;
import org.usfirst.frc369.Robot2017Code.Robot;
import edu.wpi.first.wpilibj.command.Command;
/**
*
*/
public class highGearShift extends Command {
public highGearShift() {
// Use requires() here to declare subsystem dependencies
// eg. requires... | Krudeboy51/Robot2017Code | src/org/usfirst/frc369/Robot2017Code/commands/highGearShift.java | Java | bsd-3-clause | 1,005 |
<?php
/**
* Search Work Factory
*
* PHP version 5
*
* Copyright (c) Falvey Library 2017.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed i... | SravanthiVillanova/Learn_Bibliography | src/VuBib/Action/WorkType/SearchOptionFactory.php | PHP | bsd-3-clause | 2,231 |
<?php
namespace test\n\h;
class d { } | theosyspe/levent_01 | vendor/ZF2/bin/test/n/h/d.php | PHP | bsd-3-clause | 37 |
/**
* Copyright (c) 2015-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.
*
* @provides... | htc2u/react-native | Libraries/Inspector/InspectorUtils.js | JavaScript | bsd-3-clause | 1,329 |
<?php
class CestTest extends Codeception\TestCase\Test
{
/**
* @group core
*/
public function testFilename()
{
$cest = \Codeception\Util\Stub::make('\Codeception\TestCase\Cest', array(
'getTestClass' => new \Codeception\Util\Locator(),
'getTestMethod' => 'c... | slivas/hoz | vendor/codeception/codeception/tests/unit/Codeception/CestTest.php | PHP | bsd-3-clause | 436 |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using Nitra.Runtime.Reflection;
namespace Nitra.Visualizer
{
public class ReflectionStructColorConverter : IValue... | JetBrains/Nitra | Nitra.Visualizer.Old/Rendering/ReflectionStructColorConverter.cs | C# | bsd-3-clause | 1,303 |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
using VW;
using VW.Serializer;
namespace Experimentation
{
public sta... | eisber/mwt-ds | Experimentation/OfflineTrainer.cs | C# | bsd-3-clause | 8,502 |
#ifndef __CINT__
#include "TMath.h"
#include "AliCDBManager.h"
#include "AliTriggerScalers.h"
#include "AliTriggerRunScalers.h"
#include "AliTimeStamp.h"
#include "AliTriggerScalersRecord.h"
#include "AliTriggerConfiguration.h"
#include "AliLHCData.h"
#include "AliTriggerClass.h"
#include "AliTriggerBCMask.h"
#include ... | pbatzing/AliPhysics | PWGPP/EVS/triggerInfo.C | C++ | bsd-3-clause | 4,004 |
package com.dslplatform.client.json.StringWithMaxLengthOf9;
import com.dslplatform.client.JsonSerialization;
import com.dslplatform.patterns.Bytes;
import java.io.IOException;
public class OneStringWithMaxLengthOf9DefaultValueTurtle {
private static JsonSerialization jsonSerialization;
@org.junit.BeforeClass
publ... | ngs-doo/dsl-client-java | core/src/test/java-generated/com/dslplatform/client/json/StringWithMaxLengthOf9/OneStringWithMaxLengthOf9DefaultValueTurtle.java | Java | bsd-3-clause | 2,979 |
// Copyright 2007, 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 conditions ... | imoldman/google-mock-svn | test/gmock-matchers_test.cc | C++ | bsd-3-clause | 142,301 |
#include "signalhandler.h"
#include "signaldata.h"
#include "signaldescription.h"
#include <lcm/lcm-cpp.hpp>
SignalHandler::SignalHandler(const SignalDescription* signalDescription, QObject* parent) : LCMSubscriber(parent)
{
mDescription = *signalDescription;
mSignalData = new SignalData();
}
SignalHandler::~S... | openhumanoids/signal-scope | src/signal_scope/signalhandler.cpp | C++ | bsd-3-clause | 1,734 |
#!/usr/bin/python
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import idlnode
import idlparser
import logging.config
import sys
import unittest
class... | dartino/dart-sdk | tools/dom/scripts/idlnode_test.py | Python | bsd-3-clause | 14,699 |
/* Copyright (C) 2005-2011 Fabio Riccardi */
package com.lightcrafts.ui.editor;
import com.lightcrafts.app.ComboFrame;
import com.lightcrafts.ui.LightZoneSkin;
import static com.lightcrafts.ui.editor.Locale.LOCALE;
import com.lightcrafts.ui.toolkit.PaneTitle;
import javax.swing.*;
import javax.swing.event.ListSelect... | MarinnaCole/LightZone | lightcrafts/src/com/lightcrafts/ui/editor/DocUndoHistory.java | Java | bsd-3-clause | 5,625 |
#!/usr/bin/env python
"""Microbenchmark for function call overhead.
This measures simple function calls that are not methods, do not use varargs or
kwargs, and do not use tuple unpacking.
"""
# Python imports
#import optparse
import time
# Local imports
import util
def foo(a, b, c, d):
# 20 calls
bar(a, b... | kikocorreoso/brython | www/benchmarks/performance/bm_call_simple.py | Python | bsd-3-clause | 3,712 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE124_Buffer_Underwrite__wchar_t_alloca_memmove_72a.cpp
Label Definition File: CWE124_Buffer_Underwrite.stack.label.xml
Template File: sources-sink-72a.tmpl.cpp
*/
/*
* @description
* CWE: 124 Buffer Underwrite
* BadSource: Set data pointer to before the alloca... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE124_Buffer_Underwrite/s04/CWE124_Buffer_Underwrite__wchar_t_alloca_memmove_72a.cpp | C++ | bsd-3-clause | 2,996 |
namespace Rhino.DSL
{
using System;
using Boo.Lang.Compiler.Ast;
using Module=Boo.Lang.Compiler.Ast.Module;
/// <summary>
/// Takes all the code that exists in a module's global section and put it in a specificied
/// method of a class. Allow easy handling of the Anonymous Base Class pa... | brumschlag/rhino-tools | rhino-dsl/Rhino.DSL/ImplicitBaseClassCompilerStep.cs | C# | bsd-3-clause | 2,848 |
from __future__ import print_function
##
## See COPYING file distributed along with the ncanda-data-integration package
## for the copyright and license terms
##
# Mail-related stuff
from builtins import str
from builtins import object
import smtplib
import time
import json
from email.mime.multipart import MIMEMul... | sibis-platform/sibispy | sibis_email.py | Python | bsd-3-clause | 9,495 |
"""
=============================
Straight line Hough transform
=============================
The Hough transform in its simplest form is a method to detect straight lines.
In the following example, we construct an image with a line intersection. We
then use the `Hough transform <http://en.wikipedia.org/wiki/Hough_t... | rjeli/scikit-image | doc/examples/edges/plot_line_hough_transform.py | Python | bsd-3-clause | 4,764 |
"""
Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
plugin.
These tests are currently only supported when running against Darwin
targets.
"""
from __future__ import print_function
import lldb
import os
import re
from lldbsuite.test import decorators
from lldbsuite.test import lldbtest
fro... | youtube/cobalt | third_party/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py | Python | bsd-3-clause | 5,073 |
#pragma once
#include <samchon/API.hpp>
#include <samchon/protocol/ClientDriver.hpp>
#include <samchon/protocol/WebCommunicator.hpp>
namespace samchon
{
namespace protocol
{
class WebServer;
/**
* A communicator with remote web-client.
*
* The {@link WebClientDriver} class is a type of {@link WebCommunicator... | betterwaysystems/packer | cpp/src/samchon/protocol/WebClientDriver.hpp | C++ | bsd-3-clause | 2,932 |
class TransferSpreeOrdersSignifydScoreData < ActiveRecord::Migration
disable_ddl_transaction!
def up
Spree::Order.connection.execute(<<-SQL)
insert into spree_signifyd_order_scores (order_id, score, created_at, updated_at)
select o.id, o.signifyd_score, '#{Time.now.to_s(:db)}', '#{Time.now.to_s(:db... | jordan-brough/solidus_signifyd | db/migrate/20150206193231_transfer_spree_orders_signifyd_score_data.rb | Ruby | bsd-3-clause | 624 |
/*
* Copyright (c) 2004-2022, University of Oslo
* 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 cond... | dhis2/dhis2-core | dhis-2/dhis-api/src/main/java/org/hisp/dhis/feedback/ErrorCode.java | Java | bsd-3-clause | 24,795 |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The spm module provides basic functions for interfacing with matlab
and spm to access spm tools.
Change directory to provide relative paths for doctests
>>> import os
>>... | mick-d/nipype | nipype/interfaces/spm/model.py | Python | bsd-3-clause | 45,177 |
/*
* Copyright (C) 2010, British Broadcasting Corporation
* All Rights Reserved.
*
* Author: Philip de Nier
*
* 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 t... | kierank/bmxlib-bmx | src/essence_parser/VC3EssenceParser.cpp | C++ | bsd-3-clause | 6,934 |
// **********************************************************************
//
// Copyright (c) 2001
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************
#include "JTC/JTC.h"
#include <stdlib.h>
#include <assert.h>
#ifdef ... | wayfinder/Wayfinder-CppCore-v2 | cpp/Targets/CommonLib/POSIX/src/JTC/Tests/JTCTestTryLock.cpp | C++ | bsd-3-clause | 1,940 |
from django.core.management.base import BaseCommand
def module_to_dict(module, omittable=lambda k: k.startswith('_') or not k.isupper()):
"""Convert a module namespace to a Python dictionary."""
return {k: repr(getattr(module, k)) for k in dir(module) if not omittable(k)}
class Command(BaseCommand):
hel... | theo-l/django | django/core/management/commands/diffsettings.py | Python | bsd-3-clause | 3,370 |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Checks the RunMicrotasks event is emitted and nested into RunTask.\n`);
await TestRunner.loadModule('timelin... | scheib/chromium | third_party/blink/web_tests/http/tests/devtools/tracing/timeline-js/timeline-microtasks.js | JavaScript | bsd-3-clause | 1,650 |
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Tag */
$this->title = Yii::t('app', 'Update {modelClass}: ', [
'modelClass' => 'Tag',
]) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Tags'), 'url' => ['index']];
$this->params['breadcrumbs... | hdushku/npai | frontend/views/tag/update.php | PHP | bsd-3-clause | 606 |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Willow Garage, 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 mu... | ros-gbp/pcl-fuerte-release_defunct | filters/include/pcl/filters/impl/passthrough.hpp | C++ | bsd-3-clause | 8,506 |
/*
* Copyright (C) 2008-2011, Gostai S.A.S.
*
* This software is provided "as is" without warranty of any kind,
* either expressed or implied, including but not limited to the
* implied warranties of fitness for a particular purpose.
*
* See the LICENSE file for more information.
*/
/// \file libuco/urbi-main.... | urbiforge/urbi | sdk-remote/src/libuco/urbi-main.cc | C++ | bsd-3-clause | 1,282 |
<?php
/**
* Common Status Class
* User: funson
* Date: 2014/06/25
* Time: 9:50
*/
namespace funson86\cms\models;
use funson86\cms\Module;
class YesNo
{
const NO = 0;
const YES = 1;
public $id;
public $label;
public function __construct($id = null)
{
if ($id !== null) {
... | clh021/yii2cms | vendor/funson86/yii2-cms/models/YesNo.php | PHP | bsd-3-clause | 868 |
<?php
/**
* Console application, which extracts or replaces strings for
* translation, which cannot be gettexted
*
* @version $Id: not-gettexted.php 17220 2011-06-20 13:26:10Z nbachiyski $
* @package wordpress-i18n
* @subpackage tools
*/
// see: http://php.net/tokenizer
if (!defined('T_ML_COMMENT'))
define(... | oberlin/wp-class-blogs | assets/wpi18n/not-gettexted.php | PHP | bsd-3-clause | 7,409 |
from datetime import timedelta
from time import time
import warnings
from gdbn.dbn import buildDBN
from gdbn import activationFunctions
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import OneHotEncoder
warnings.warn("""
The nolearn... | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/nolearn-0.5/nolearn/dbn.py | Python | bsd-3-clause | 16,813 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE690_NULL_Deref_From_Return__int64_t_calloc_84a.cpp
Label Definition File: CWE690_NULL_Deref_From_Return.free.label.xml
Template File: source-sinks-84a.tmpl.cpp
*/
/*
* @description
* CWE: 690 Unchecked Return Value To NULL Pointer
* BadSource: calloc Allocate ... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE690_NULL_Deref_From_Return/s01/CWE690_NULL_Deref_From_Return__int64_t_calloc_84a.cpp | C++ | bsd-3-clause | 2,320 |
function save(e, link) {
$.ajax(link.attr("href"), {
success: function(data, textStatus, jqXHR) {
link.hide();
link.closest("tr").addClass("success");
link.closest("tr").find("div.remove").show();
},
error: ajax_error_handler
});
e.preventDefault();
}
... | hellhovnd/dentexchange | dentexchange/apps/matches/static/matches/js/posting_automatches.js | JavaScript | bsd-3-clause | 1,161 |
package gopher
import (
"fmt"
"io"
"log"
"math/rand"
"time"
"github.com/adamryman/gophersay/gopherart"
)
var (
sayings []string
gopherArt string
)
func init() {
// Load in gopher ascii art from go-bindata
gopherArtBytes, err := gopherart.Asset("gopherart/gopher.ascii")
if err != nil {
log.Fatal(err)
... | golang/scratch | zaquestion/vendor/github.com/adamryman/gophersay/gopher/say.go | GO | bsd-3-clause | 1,485 |
<?php
include_once("./eval_conf.php");
include_once("./functions.php");
include_once("./global.php");
include_once("./dwoo/dwooAutoload.php");
if (! checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::VIEW, $conf))
die("You do not have access to view views.");
$view_name = NULL;
if (isset($_GET['vn']) && !is_proper_vie... | luckypoem/ganglia-web | view_content.php | PHP | bsd-3-clause | 2,069 |
# coding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/../acceptance_helper')
feature "API 1.0 user layers management" do
before(:all) do
Capybara.current_driver = :rack_test
@user = create_user({:username => 'test'})
end
before(:each) do
delete_user_data @user
@table = create_tab... | datapolitan/cartodb20 | spec/acceptance/api/user_layers_spec.rb | Ruby | bsd-3-clause | 2,250 |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// A test application for the RLZ library.
//
// These tests should not be executed on the build server:
// - They assert for the failed cases.
// -... | danakj/chromium | rlz/lib/rlz_lib_test.cc | C++ | bsd-3-clause | 35,236 |
/*
**
** File: ymdeltat.c
**
** YAMAHA DELTA-T adpcm sound emulation subroutine
** used by fmopl.c (Y8950) and fm.c (YM2608 and YM2610/B)
**
** Base program is YM2610 emulator by Hiromitsu Shioya.
** Written by Tatsuyuki Satoh
** Improvements by Jarek Burczynski (bujar at mame dot net)
**
**
** History:
**
** 03-08-200... | clangen/musikcube | src/plugins/gmedecoder/gme/ymdeltat.cpp | C++ | bsd-3-clause | 22,627 |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2013 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | hainm/pythran | third_party/nt2/linalg/functions/lapack/symmetric/sysv.hpp | C++ | bsd-3-clause | 11,763 |
package net.ripe.db.whois.logsearch;
import com.google.common.collect.Sets;
import net.ripe.db.whois.logsearch.logformat.DailyLogEntry;
import net.ripe.db.whois.logsearch.logformat.LoggedUpdate;
import org.apache.lucene.queryparser.classic.ParseException;
import org.junit.Before;
import org.junit.Test;
import org.juni... | michelafrinic/WHOIS | whois-logsearch/src/test/java/net/ripe/db/whois/logsearch/LogFileSearchTest.java | Java | bsd-3-clause | 3,306 |
"""Utility module for creating transformation matrices
Basically this gives you the ability to construct
transformation matrices without needing OpenGL
or similar run-time engines. The result is that
design-time utilities can process files without
trading dependencies on a particular run-time.
This code is originall... | menpo/vrml97 | vrml/vrml97/transformmatrix.py | Python | bsd-3-clause | 11,368 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE588_Attempt_to_Access_Child_of_Non_Structure_Pointer__struct_82_bad.cpp
Label Definition File: CWE588_Attempt_to_Access_Child_of_Non_Structure_Pointer__struct.label.xml
Template File: sources-sink-82_bad.tmpl.cpp
*/
/*
* @description
* CWE: 588 Attempt to Access... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE588_Attempt_to_Access_Child_of_Non_Structure_Pointer/CWE588_Attempt_to_Access_Child_of_Non_Structure_Pointer__struct_82_bad.cpp | C++ | bsd-3-clause | 1,073 |
package org.motechproject.mrs.model;
import org.junit.Test;
import static junit.framework.Assert.assertTrue;
public class PasswordTest {
@Test
public void shouldGeneratePasswordWithUpperCaseLowerCaseAndNumberCharacterCombination() {
Password password = new Password(9);
for (int i = 0; i < 15... | bruceMacLeod/motech-server-pillreminder-0.18 | modules/openmrs/domain-bundle/src/test/java/org/motechproject/mrs/model/PasswordTest.java | Java | bsd-3-clause | 909 |
package org.petuum.jbosen.row.double_;
import org.petuum.jbosen.row.RowUpdate;
import java.nio.ByteBuffer;
/**
* This implementation of {@code DoubleRowUpdate} assumes a sparse set of
* columns, ie. column IDs can be any int value. In general, this class is less
* CPU and memory efficient than {@link DenseDoubleR... | codeaudit/jbosen | jbosen/src/main/java/org/petuum/jbosen/row/double_/SparseDoubleRowUpdate.java | Java | bsd-3-clause | 1,609 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE415_Double_Free__new_delete_array_char_73b.cpp
Label Definition File: CWE415_Double_Free__new_delete_array.label.xml
Template File: sources-sinks-73b.tmpl.cpp
*/
/*
* @description
* CWE: 415 Double Free
* BadSource: Allocate data using new and Deallocae data ... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE415_Double_Free/s01/CWE415_Double_Free__new_delete_array_char_73b.cpp | C++ | bsd-3-clause | 1,529 |
package org.basex.query.func.fetch;
import static org.basex.query.QueryError.*;
import java.io.*;
import org.basex.io.*;
import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.value.item.*;
import org.basex.util.*;
import org.basex.util.http.*;
/**
* Function implementation.
*
* @author ... | deshmnnit04/basex | basex-core/src/main/java/org/basex/query/func/fetch/FetchContentType.java | Java | bsd-3-clause | 1,202 |
package ca.fuwafuwa.kaku.Database;
import com.j256.ormlite.dao.Dao;
import java.sql.SQLException;
public interface IDatabaseHelper
{
<T> Dao<T, Integer> getDbDao(Class clazz) throws SQLException;
}
| Xyresic/Kaku | app/src/main/java/ca/fuwafuwa/kaku/Database/IDatabaseHelper.java | Java | bsd-3-clause | 205 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129_rand_13.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129.label.xml
Template File: sources-sinks-13.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: rand Set data... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE122_Heap_Based_Buffer_Overflow/s01/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129_rand_13.cpp | C++ | bsd-3-clause | 7,834 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__wchar_t_environment_open_01.cpp
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-01.tmpl.cpp
*/
/*
* @description
* CWE: 23 Relative Path Traversal
* BadSource: environment Read input from a... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE23_Relative_Path_Traversal/s04/CWE23_Relative_Path_Traversal__wchar_t_environment_open_01.cpp | C++ | bsd-3-clause | 3,289 |
import getpass
from django.core.management.base import BaseCommand
from hc.accounts.forms import SignupForm
from hc.accounts.views import _make_user
class Command(BaseCommand):
help = """Create a super-user account."""
def handle(self, *args, **options):
email = None
password = None
... | healthchecks/healthchecks | hc/accounts/management/commands/createsuperuser.py | Python | bsd-3-clause | 1,226 |
<?php
namespace AuthorBooks\Tests;
use Maghead\Testing\ModelTestCase;
use AuthorBooks\Model\Author;
use AuthorBooks\Model\AuthorSchema;
use AuthorBooks\Model\AddressSchema;
use AuthorBooks\Model\AuthorCollection;
use Maghead\Migration\Migration;
use Magsql\Universal\Syntax\Column;
use Magsql\Driver\PDOMySQLDriver;
us... | c9s/LazyRecord | examples/books/Tests/AuthorMigrationTest.php | PHP | bsd-3-clause | 2,889 |
/*L
* Copyright Oracle inc, SAIC-F
*
* Distributed under the OSI-approved BSD 3-Clause License.
* See http://ncip.github.com/cadsr-util/LICENSE.txt for details.
*/
package gov.nih.nci.ncicb.cadsr.common.persistence.dao;
import gov.nih.nci.ncicb.cadsr.common.resource.ClassSchemeItem;
import gov.nih.nci.ncicb.cads... | CBIIT/cadsr-util | cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/dao/ClassificationSchemeDAO.java | Java | bsd-3-clause | 982 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE590_Free_Memory_Not_on_Heap__delete_char_placement_new_82_bad.cpp
Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete.pointer.label.xml
Template File: sources-sink-82_bad.tmpl.cpp
*/
/*
* @description
* CWE: 590 Free Memory Not on Heap
* BadSource: p... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE590_Free_Memory_Not_on_Heap/s02/CWE590_Free_Memory_Not_on_Heap__delete_char_placement_new_82_bad.cpp | C++ | bsd-3-clause | 1,027 |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/surfaces/surface_aggregator.h"
#include <stddef.h>
#include <map>
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h... | highweb-project/highweb-webcl-html5spec | cc/surfaces/surface_aggregator.cc | C++ | bsd-3-clause | 27,333 |
from django.utils.datetime_safe import datetime
from django.utils.translation import ugettext_lazy as _
from poradnia.users.models import User
def users_total(*args, **kwargs):
return User.objects.count()
users_total.name = _("Users total")
users_total.description = _("Number of users registered total")
def ... | watchdogpolska/poradnia.siecobywatelska.pl | poradnia/users/metric.py | Python | bsd-3-clause | 1,040 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE124_Buffer_Underwrite__CWE839_fscanf_83_bad.cpp
Label Definition File: CWE124_Buffer_Underwrite__CWE839.label.xml
Template File: sources-sinks-83_bad.tmpl.cpp
*/
/*
* @description
* CWE: 124 Buffer Underwrite
* BadSource: fscanf Read data from the console usin... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE124_Buffer_Underwrite/s01/CWE124_Buffer_Underwrite__CWE839_fscanf_83_bad.cpp | C++ | bsd-3-clause | 1,727 |
/* Copyright (C) 2005-2011 Fabio Riccardi */
package com.lightcrafts.utils.filecache;
import java.io.File;
/**
* A <code>FileCacheKeyMapper</code> is used to map a cache key to a file on
* disk.
*
* @author Paul J. Lucas [paul@lightcrafts.com]
*/
public interface FileCacheKeyMapper {
/**
* Gets the ca... | MarinnaCole/LightZone | lightcrafts/src/com/lightcrafts/utils/filecache/FileCacheKeyMapper.java | Java | bsd-3-clause | 755 |
<?php
$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
'Login',
);
?>
<div class="form">
<?php
$form = $this->beginWidget('CActiveForm', array(
'id' => 'login-form',
'enableClientValidation' => true,
// 'enableAjaxValidation'=>true... | danielmoniz/red_torpedo | project-files/protected/views/site/login.php | PHP | bsd-3-clause | 1,348 |
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sandbox/win/src/window.h"
#include <aclapi.h>
#include <memory>
#include "base/notreached.h"
#include "base/win/win_util.h"
#include "bas... | scheib/chromium | sandbox/win/src/window.cc | C++ | bsd-3-clause | 6,157 |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/test/web_layer_tree_view_impl_for_testing.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#includ... | ds-hwang/chromium-crosswalk | content/test/web_layer_tree_view_impl_for_testing.cc | C++ | bsd-3-clause | 7,916 |
<?php
namespace test\h\l;
class c { } | theosyspe/levent_01 | vendor/ZF2/bin/test/h/l/c.php | PHP | bsd-3-clause | 37 |
<?php
/**
* Abstract property class
*
* Extend this class to create custom complex properties
*
* @package Sabre
* @subpackage DAV
* @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wi... | mgrauer/midas3score | modules/webdav/library/SabreDAV/lib/Sabre/DAV/Property.php | PHP | bsd-3-clause | 557 |
/*
* Copyright (c) 2009-2015, United States Government, as represented by the Secretary of Health and Human Services.
* 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 ... | beiyuxinke/CONNECT | Product/Production/Services/DocumentSubmissionCore/src/test/java/gov/hhs/fha/nhinc/docsubmission/adapter/proxy/AdapterDocSubmissionProxyJavaImplTest.java | Java | bsd-3-clause | 3,032 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Inbox2.Framework;
using Inbox2.Framework.Deployment;
namespace Inbox2.Core.Upgrade
{
public class upgrade_0_1_0_2 : UpgradeActionBase
{
public override Version TargetVersion
{
get { return new Version("0.... | Klaudit/inbox2_desktop | Code/Client/Inbox2/Core/Upgrade/upgrade_0_1_0_2.cs | C# | bsd-3-clause | 1,084 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int_memcpy_09.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805.label.xml
Template File: sources-sink-09.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocat... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE122_Heap_Based_Buffer_Overflow/s03/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int_memcpy_09.cpp | C++ | bsd-3-clause | 3,578 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
from os.path import dirname
from os.path import join
from setuptools import find_packages
from setuptools import setup
# requirements
with open('requirements.txt') as f:
required = f.read().splitlines()
with open(join(dirname(__file__), 'pyrcmd3/VERSION'), 'rb') a... | marreta-sources/pyrcmd3 | setup.py | Python | bsd-3-clause | 1,533 |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/shell/common/switches.h"
#include <iostream>
namespace shell {
namespace switches {
const char kAotInstructionsBlob[] = "instructions... | mpcomplete/engine | shell/common/switches.cc | C++ | bsd-3-clause | 1,637 |
/*
* Copyright (C) 2015 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... | sgraham/nope | third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.cpp | C++ | bsd-3-clause | 3,162 |
#########################################################################
# Copyright (C) 2007, 2008, 2009
# Alex Clemesha <alex@clemesha.org> & Dorian Raymer <deldotdr@gmail.com>
#
# This module is part of codenode, and is distributed under the terms
# of the BSD License: http://www.opensource.org/licenses/bsd-li... | ccordoba12/codenode | codenode/frontend/bookshelf/urls.py | Python | bsd-3-clause | 1,059 |
<?php
/**
* SimpleFw Framework
*
* @copyright Copyright (c) 2013 Kuldeep Kamboj
* @license New BSD License
*/
namespace SimpleFw\Core\Tools;
class Form
{
public static $instance = NULL;
public static function getInstance()
{
if(!isset(self::$instance))
{
self::$instance = new Form();
... | kuldeep-k/CodeCompare | core/tools/Form.php | PHP | bsd-3-clause | 2,638 |
#ifndef PYTHONIC_RANDOM_RANDINT_HPP
#define PYTHONIC_RANDOM_RANDINT_HPP
#include "pythonic/include/random/randint.hpp"
#include "pythonic/utils/proxy.hpp"
#include "pythonic/random/randrange.hpp"
namespace pythonic
{
namespace random
{
long randint(long a, long b)
{
// TODO: It should be implemen... | hainm/pythran | pythran/pythonic/random/randint.hpp | C++ | bsd-3-clause | 455 |
/**
* Copyright 2020 Google Inc. 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 applic... | ChromeDevTools/devtools-frontend | node_modules/puppeteer/lib/esm/puppeteer/common/fetch.js | JavaScript | bsd-3-clause | 889 |
import unittest
from django.db import connections
from wp_frontman.models import Site, Blog
from wp_frontman.wp_helpers import month_archives, year_archives
from wp_frontman.tests.utils import MultiBlogMixin
class HelpersArchivesTestCase(MultiBlogMixin, unittest.TestCase):
def setUp(self):
super(He... | ludoo/wpkit | attic/ngfrontman/wp_frontman/tests/test_helpers_archives.py | Python | bsd-3-clause | 1,742 |
from behave import *
# Unique to Scenario: User cancels attempt to request new account
@when('I cancel the request account form')
def impl(context):
context.browser.find_by_css('.cancel').first.click()
| nlhkabu/connect | bdd/features/steps/request_account.py | Python | bsd-3-clause | 208 |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/manifest/manifest_icon_downloader.h"
#include <string>
#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
class ... | Workday/OpenFrame | chrome/browser/manifest/manifest_icon_downloader_unittest.cc | C++ | bsd-3-clause | 4,221 |
<?php
/**
* aheadWorks Co.
*
* NOTICE OF LICENSE
*
* This source file is subject to the EULA
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://ecommerce.aheadworks.com/LICENSE-L.txt
*
* @category AW
* @package AW_Blog
*... | 5452/durex | includes/src/AW_Blog_Block_Post.php | PHP | bsd-3-clause | 6,215 |
require 'spree/api'
| ambertch/stylestalk-spree | api/lib/spree_api.rb | Ruby | bsd-3-clause | 20 |