file_path
stringlengths
11
219
num_changed_lines
int64
0
58.4k
code
stringlengths
0
3.52M
repo_name
stringclasses
25 values
commit_date
stringdate
2017-01-24 00:00:00
2017-01-28 00:00:00
sha
stringclasses
25 values
numpy/lib/tests/test_packbits.py
178
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( assert_array_equal, assert_equal, assert_raises, run_module_suite ) def test_packbits(): # Copied from the docstring. a = [[[1, 0, 1], [0, 1, 0]], [[1, 1, 0], [0, 0, 1]]] for dt in...
numpy_numpy
2017-01-24
c5e1773f0d77755e21d072eb106b8e51a672bfa8
wp-admin/js/customize-controls.min.js
2
!function(a,b){var c,d,e,f=wp.customize;f.Setting=f.Value.extend({initialize:function(a,b,c){var d=this;f.Value.prototype.initialize.call(d,b,c),d.id=a,d.transport=d.transport||"refresh",d._dirty=c.dirty||!1,d.notifications=new f.Values({defaultConstructor:f.Notification}),d.bind(d.preview)},preview:function(){var a,b=...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/css/customize-nav-menus-rtl.min.css
1
#customize-theme-controls #accordion-section-menu_locations{position:relative;margin-bottom:15px}#customize-theme-controls #accordion-section-menu_locations>.accordion-section-title{border-bottom-color:#ddd}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-se...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/js/customize-nav-menus.min.js
2
!function(a,b,c){"use strict";function d(a){return"nav_menu_item["+a+"]"}function e(b){return b=b||"",b=c("<div>").text(b).html(),b=c.trim(b),b||a.Menus.data.l10n.unnamed}wpNavMenu.originalInit=wpNavMenu.init,wpNavMenu.options.menuItemDepthPerLevel=20,wpNavMenu.options.sortableItems="> .customize-control-nav_menu_item"...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/js/updates.min.js
2
!function(a,b,c){var d=a(document);b=b||{},b.updates={},b.updates.ajaxNonce=c.ajax_nonce,b.updates.l10n=c.l10n,b.updates.searchTerm="",b.updates.shouldRequestFilesystemCredentials=!1,b.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},available:!1},b...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/css/edit-rtl.min.css
1
#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#edit-slug-box .cancel,.submitbox .submit a:hover{text-decoration:underline}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{positio...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/css/edit.min.css
1
#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#edit-slug-box .cancel,.submitbox .submit a:hover{text-decoration:underline}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{positio...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/css/customize-nav-menus.min.css
1
#customize-theme-controls #accordion-section-menu_locations{position:relative;margin-bottom:15px}#customize-theme-controls #accordion-section-menu_locations>.accordion-section-title{border-bottom-color:#ddd}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-se...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/js/editor.min.js
1
!function(a){function b(){function b(){!i&&window.tinymce&&(i=window.tinymce,j=i.$,j(document).on("click",function(a){var b,c,e=j(a.target);e.hasClass("wp-switch-editor")&&(b=e.attr("data-wp-editor-id"),c=e.hasClass("switch-tmce")?"tmce":"html",d(b,c))}))}function c(a){var b=j(".mce-toolbar-grp",a.getContainer())[0],c=...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/css/customize-preview-rtl.min.css
1
.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{position:absolute;float:r...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/js/tinymce/plugins/wordpress/plugin.min.js
1
!function(a){a.ui.FloatPanel.zIndex=100100,a.PluginManager.add("wordpress",function(b){function c(c){var d,f,i,j=0;f="hide"===c,b.theme.panel&&(i=b.theme.panel.find(".toolbar:not(.menubar)")),!i||i.length<2||"hide"===c&&!i[1].visible()||(!c&&i[1].visible()&&(c="hide"),h(i,function(a,b){b>0&&("hide"===c?(a.hide(),j+=30)...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/js/nav-menu.min.js
1
var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11,sortableItems:"> *",targetTolerance:0},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,lastSearch:"",init:function(){b.menuList...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/css/customize-preview.min.css
1
.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{position:absolute;float:l...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-admin/js/image-edit.min.js
1
!function(a){var b=window.imageEdit={iasapi:{},hold:{},postid:"",_view:!1,intval:function(a){return 0|a},setDisabled:function(a,b){b?a.removeClass("disabled").prop("disabled",!1):a.addClass("disabled").prop("disabled",!0)},init:function(b){var c=this,d=a("#image-editor-"+c.postid),e=c.intval(a("#imgedit-x-"+b).val()),f...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/js/mce-view.min.js
1
!function(a,b,c,d){"use strict";var e={},f={};b.mce=b.mce||{},b.mce.views={register:function(a,c){e[a]=b.mce.View.extend(_.extend(c,{type:a}))},unregister:function(a){delete e[a]},get:function(a){return e[a]},unbind:function(){_.each(f,function(a){a.unbind()})},setMarkers:function(a){var b,c,d=[{content:a}],f=this;retu...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/js/wp-api.min.js
1
!function(a,b){"use strict";function c(){this.models={},this.collections={},this.views={}}a.wp=a.wp||{},wp.api=wp.api||new c,wp.api.versionString=wp.api.versionString||"wp/v2/",!_.isFunction(_.includes)&&_.isFunction(_.contains)&&(_.includes=_.contains)}(window),function(a,b){"use strict";var c,d;a.wp=a.wp||{},wp.api=w...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
wp-includes/js/tinymce/plugins/wpview/plugin.min.js
1
!function(a,b){a.PluginManager.add("wpview",function(c){function d(){}function e(a){return c.dom.hasClass(a,"wpview")}function f(a){function b(a,b){return"<p>"+window.decodeURIComponent(b)+"</p>"}return a?a.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g,b).repl...
WordPress_WordPress
2017-01-28
1015c3b3a07ad6b530bb3aed7e0e11549da791cb
libmscore/style.cpp
955
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2002-2011 Werner Schweer // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 // ...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
libmscore/fingering.cpp
170
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2010-2011 Werner Schweer // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 // ...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
libmscore/property.cpp
291
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2011 Werner Schweer // // 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 pu...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
libmscore/scoreElement.cpp
232
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2015 Werner Schweer // // 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 pu...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
libmscore/systemtext.cpp
61
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2011 Werner Schweer // // 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 pu...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
mscore/inspector/inspectorFingering.cpp
61
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2013-2017 Werner Schweer // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 // ...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
mscore/inspector/alignSelect.cpp
115
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2017 Werner Schweer and others // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version ...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
mtest/libmscore/element/tst_element.cpp
59
//============================================================================= // MuseScore // Music Composition & Notation // $Id:$ // // Copyright (C) 2012 Werner Schweer // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
mscore/inspector/inspectorText.cpp
33
//============================================================================= // MuseScore // Music Composition & Notation // // Copyright (C) 2011 Werner Schweer // // 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 pu...
musescore_MuseScore
2017-01-27
ac9de15554925578bc13dd4b3894e6fb880e6f1e
samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp
122
#include <iostream> #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> using namespace std; using namespace cv; namespace { //! [mandelbrot-escape-time-algorithm] int mandelbrot(const complex<float> &z0, const int max) { complex<float> z = z0; for (int t = 0; t < max; t++) { if (z.real()...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp
91
#include <iostream> #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" using namespace std; using namespace cv; namespace { /** Global Variables */ int alpha = 100; int beta = 100; int gamma_cor = 100; Mat img_original, img_corrected, img_gamma_corrected; void basicLinearTransform(const Mat &img, const ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
platforms/ios/build_framework.py
118
#!/usr/bin/env python """ The script builds OpenCV.framework for iOS. The built framework is universal, it can be used to build app and run it on either iOS simulator or real device. Usage: ./build_framework.py <outputdir> By cmake conventions (and especially if you work with OpenCV repository), the output dir sh...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
modules/core/misc/java/src/java/core+Rect2d.java
100
package org.opencv.core; //javadoc:Rect2d_ public class Rect2d { public double x, y, width, height; public Rect2d(double x, double y, double width, double height) { this.x = x; this.y = y; this.width = width; this.height = height; } public Rect2d() { this(0, 0...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
42
/** * @file BasicLinearTransforms.cpp * @brief Simple program to change contrast and brightness * @author OpenCV team */ #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <iostream> using namespace std; using namespace cv; /** * @function main * @brief Main function */ int main( int, ch...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
samples/cpp/tutorial_code/ImgProc/HitMiss.cpp
37
#include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> using namespace cv; int main(){ Mat input_image = (Mat_<uchar>(8, 8) << 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 0, 0, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 0, 0, ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
modules/core/misc/java/src/java/core+MatOfRect2d.java
81
package org.opencv.core; import java.util.Arrays; import java.util.List; public class MatOfRect2d extends Mat { // 64FC4 private static final int _depth = CvType.CV_64F; private static final int _channels = 4; public MatOfRect2d() { super(); } protected MatOfRect2d(long addr) { ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
modules/python/test/test_shape.py
23
#!/usr/bin/env python import cv2 from tests_common import NewOpenCVTests class shape_test(NewOpenCVTests): def test_computeDistance(self): a = self.get_sample('samples/data/shape_sample/1.png', cv2.IMREAD_GRAYSCALE); b = self.get_sample('samples/data/shape_sample/2.png', cv2.IMREAD_GRAYSCALE); ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
samples/python/tutorial_code/imgProc/hough_line_transform/probabilistic_hough_line_transform.py
12
import cv2 import numpy as np img = cv2.imread('../data/sudoku.png') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) edges = cv2.Canny(gray,50,150,apertureSize = 3) lines = cv2.HoughLinesP(edges,1,np.pi/180,100,minLineLength=100,maxLineGap=10) for line in lines: x1,y1,x2,y2 = line[0] cv2.line(img,(x1,y1),(x2,y2),(...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
cmake/checks/lapack_check.cpp
14
#include "opencv_lapack.h" static char* check_fn1 = (char*)sgesv_; static char* check_fn2 = (char*)sposv_; static char* check_fn3 = (char*)spotrf_; static char* check_fn4 = (char*)sgesdd_; int main(int argc, char* argv[]) { (void)argv; if(argc > 1000) return check_fn1[0] + check_fn2[0] + check_fn3[0] ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
samples/python/tutorial_code/imgProc/hough_line_transform/hough_line_transform.py
22
import cv2 import numpy as np img = cv2.imread('../data/sudoku.png') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) edges = cv2.Canny(gray,50,150,apertureSize = 3) lines = cv2.HoughLines(edges,1,np.pi/180,200) for line in lines: rho,theta = line[0] a = np.cos(theta) b = np.sin(theta) x0 = a*rho y0 = ...
opencv_opencv
2017-01-28
a8aff6f64330a0ab2c9d71033412af892dd9b710
tests/template_tests/syntax_tests/i18n/test_blocktrans.py
433
import os from threading import local from django.template import Context, Template, TemplateSyntaxError from django.test import SimpleTestCase, override_settings from django.utils import translation from django.utils.safestring import mark_safe from django.utils.translation import trans_real from ...utils import set...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/forms_tests/widget_tests/test_input.py
15
from django.forms.widgets import Input from .base import WidgetTest class InputTests(WidgetTest): def test_attrs_with_type(self): attrs = {'type': 'date'} widget = Input(attrs) self.check_html(widget, 'name', 'value', '<input type="date" name="name" value="value" />') # reuse the...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/queries/test_qs_combinators.py
108
from django.db.models import F, IntegerField, Value from django.db.utils import DatabaseError from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models import Number, ReservedName @skipUnlessDBFeature('supports_select_union') class QuerySetSetOperationTests(TestCase): @classmethod d...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/staticfiles_tests/project/loop/foo.css
1
@import url("bar.css")
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
django/contrib/gis/static/gis/js/OLMapWidget.js
208
/* global ol */ var GeometryTypeControl = function(opt_options) { 'use strict'; // Map control to switch type when geometry type is unknown var options = opt_options || {}; var element = document.createElement('div'); element.className = 'switch-type type-' + options.type + ' ol-control ol-unselec...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_trans.py
205
from threading import local from django.template import Context, Template, TemplateSyntaxError from django.test import SimpleTestCase, override_settings from django.utils import translation from django.utils.safestring import mark_safe from django.utils.translation import trans_real from ...utils import setup from .b...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/base.py
24
import os from django.conf import settings from django.test import SimpleTestCase from django.utils.translation import activate, get_language here = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) pdir = os.path.split(os.path.split(os.path.abspath(here))[0])[0] extended_locale_paths = settings.LOCALE_PATH...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
django/contrib/admindocs/utils.py
91
"Misc. utility functions/classes for admin documentation generator." import re from email.errors import HeaderParseError from email.parser import HeaderParser from django.urls import reverse from django.utils.encoding import force_bytes from django.utils.safestring import mark_safe try: import docutils.core ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_get_available_languages.py
14
from django.test import SimpleTestCase from ...utils import setup class GetAvailableLanguagesTagTests(SimpleTestCase): libraries = {'i18n': 'django.templatetags.i18n'} @setup({'i18n12': '{% load i18n %}' '{% get_available_languages as langs %}{% for lang in langs %}' ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/staticfiles_tests/project/loop/bar.css
1
@import url("foo.css")
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/backends/test_postgresql.py
54
import unittest from collections import namedtuple from django.db import connection from django.test import TestCase from .models import Person @unittest.skipUnless(connection.vendor == 'postgresql', "Test only for PostgreSQL") class ServerSideCursorsPostgres(TestCase): cursor_fields = 'name, statement, is_hold...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/forms_tests/widget_tests/test_widget.py
11
from django.forms import Widget from django.forms.widgets import Input from .base import WidgetTest class WidgetTests(WidgetTest): def test_value_omitted_from_data(self): widget = Widget() self.assertIs(widget.value_omitted_from_data({}, {}, 'field'), True) self.assertIs(widget.value_omi...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_underscore_syntax.py
107
from django.template import Context, Template from django.test import SimpleTestCase from django.utils import translation from ...utils import setup from .base import MultipleLocaleActivationTestCase class MultipleLocaleActivationTests(MultipleLocaleActivationTestCase): def test_single_locale_activation(self): ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/postgres_tests/test_indexes.py
49
from django.contrib.postgres.indexes import BrinIndex, GinIndex from django.db import connection from django.test import skipUnlessDBFeature from . import PostgreSQLTestCase from .models import CharFieldModel, IntegerArrayModel @skipUnlessDBFeature('has_brin_index_support') class BrinIndexTests(PostgreSQLTestCase): ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
django/db/backends/postgresql_psycopg2/__init__.py
9
import warnings from django.utils.deprecation import RemovedInDjango30Warning warnings.warn( "The django.db.backends.postgresql_psycopg2 module is deprecated in " "favor of django.db.backends.postgresql.", RemovedInDjango30Warning, stacklevel=2 )
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_get_language_info_list.py
45
from django.test import SimpleTestCase from django.utils import translation from ...utils import setup class GetLanguageInfoListTests(SimpleTestCase): libraries = { 'custom': 'template_tests.templatetags.custom', 'i18n': 'django.templatetags.i18n', } @setup({'i18n30': '{% load i18n %}' ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
django/contrib/postgres/indexes.py
34
from django.db.models import Index __all__ = ['BrinIndex', 'GinIndex'] class BrinIndex(Index): suffix = 'brin' def __init__(self, fields=[], name=None, pages_per_range=None): if pages_per_range is not None and pages_per_range <= 0: raise ValueError('pages_per_range must be None or a posi...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/backends/test_mysql.py
46
import unittest from django.core.exceptions import ImproperlyConfigured from django.db import connection from django.test import TestCase, override_settings @override_settings(DEBUG=True) @unittest.skipUnless(connection.vendor == 'mysql', 'MySQL specific test.') class MySQLTests(TestCase): @staticmethod def...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/auth_tests/client.py
41
import re from django.contrib.auth.views import ( INTERNAL_RESET_SESSION_TOKEN, INTERNAL_RESET_URL_TOKEN, ) from django.test import Client def extract_token_from_url(url): token_search = re.search(r'/reset/.*/(.+?)/', url) if token_search: return token_search.group(1) class PasswordResetConfirm...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_filters.py
47
from django.test import SimpleTestCase from django.utils import translation from ...utils import setup class I18nFiltersTests(SimpleTestCase): libraries = { 'custom': 'template_tests.templatetags.custom', 'i18n': 'django.templatetags.i18n', } @setup({'i18n32': '{% load i18n %}{{ "hu"|lan...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/template_tests/syntax_tests/i18n/test_get_language_info.py
36
from django.test import SimpleTestCase from django.utils import translation from ...utils import setup class I18nGetLanguageInfoTagTests(SimpleTestCase): libraries = { 'custom': 'template_tests.templatetags.custom', 'i18n': 'django.templatetags.i18n', } # retrieving language information ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
django/contrib/gis/static/gis/css/ol3.css
31
.switch-type { background-repeat: no-repeat; cursor: pointer; top: 0.5em; width: 22px; height: 20px; } .type-Point { background-image: url("../img/draw_point_off.svg"); right: 5px; } .type-Point.type-active { background-image: url("../img/draw_point_on.svg"); } .type-LineString { b...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/auth_tests/test_templates.py
28
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.views import ( PasswordChangeDoneView, PasswordChangeView, PasswordResetCompleteView, PasswordResetDoneView, PasswordResetView, ) f...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/messages_tests/test_api.py
31
from django.contrib import messages from django.test import RequestFactory, SimpleTestCase class DummyStorage: """ dummy message-store to test the api methods """ def __init__(self): self.store = [] def add(self, level, message, extra_tags=''): self.store.append(message) class ...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
tests/shell/tests.py
24
import sys import unittest from unittest import mock from django import __version__ from django.core.management import CommandError, call_command from django.test import SimpleTestCase from django.test.utils import captured_stdin, captured_stdout, patch_logger class ShellCommandTestCase(SimpleTestCase): def tes...
django_django
2017-01-28
e34f4e6f8735a6ad102fda096aa99cbb5600761e
common/network-common/src/main/java/org/apache/spark/network/crypto/AuthEngine.java
284
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
examples/src/main/java/org/apache/spark/examples/sql/JavaUserDefinedTypedAggregation.java
160
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/test/java/org/apache/spark/network/crypto/AuthIntegrationSuite.java
213
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/main/java/org/apache/spark/network/crypto/AuthRpcHandler.java
170
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/main/java/org/apache/spark/network/crypto/AuthClientBootstrap.java
128
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/test/java/org/apache/spark/network/crypto/AuthEngineSuite.java
109
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
examples/src/main/java/org/apache/spark/examples/sql/JavaUserDefinedUntypedAggregation.java
132
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/main/java/org/apache/spark/network/crypto/ClientChallenge.java
101
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
R/install-source-package.sh
57
#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); y...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
R/find-r.sh
34
#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); y...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/test/java/org/apache/spark/network/crypto/AuthMessagesSuite.java
80
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/main/java/org/apache/spark/network/crypto/AuthServerBootstrap.java
55
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
common/network-common/src/main/java/org/apache/spark/network/crypto/ServerResponse.java
85
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
R/create-rd.sh
37
#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); y...
apache_spark
2017-01-28
42ad93b2c9047a68c14cbf681508157101f43c0e
Wox.Infrastructure/Logger/Log.cs
112
using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; using NLog; using NLog.Config; using NLog.Targets; namespace Wox.Infrastructure.Logger { public static class Log { public const string DirectoryName = "Logs"; static Log() { var path = Path.C...
microsoft_PowerToys
2017-01-28
dc46277d0c088c48e1a13ea5f72209ea462de929
Wox.Infrastructure/Alphabet.cs
51
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using hyjiacan.util.p4n; using hyjiacan.util.p4n.format; namespace Wox.Infrastructure { public static class Alphabet { private static readonly HanyuPinyinOutputFormat Format = new HanyuPinyinOutputF...
microsoft_PowerToys
2017-01-28
dc46277d0c088c48e1a13ea5f72209ea462de929
Wox.Infrastructure/Image/ImageCache.cs
23
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Windows.Media; namespace Wox.Infrastructure.Image { [Serializable] public class ImageCache { private const int MaxCached = 200; public ConcurrentDictionary<string, int> Usag...
microsoft_PowerToys
2017-01-28
dc46277d0c088c48e1a13ea5f72209ea462de929
requests/packages/urllib3/util/selectors.py
524
# Backport of selectors.py from Python 3.5+ to support Python < 3.4 # Also has the behavior specified in PEP 475 which is to retry syscalls # in the case of an EINTR error. This module is required because selectors34 # does not follow this behavior and instead returns that no dile descriptor # events have occurred rath...
psf_requests
2017-01-27
8a58427d8aa73d6af81b6e5f6fd934b3386ef3de
requests/packages/urllib3/util/request.py
47
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b, integer_types from ..exceptions import UnrewindableBodyError ACCEPT_ENCODING = 'gzip,deflate' _FAILEDTELL = object() def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=...
psf_requests
2017-01-27
8a58427d8aa73d6af81b6e5f6fd934b3386ef3de
requests/packages/urllib3/util/wait.py
40
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
psf_requests
2017-01-27
8a58427d8aa73d6af81b6e5f6fd934b3386ef3de
keras/utils/generic_utils.py
146
"""Python utilities required by Keras.""" from __future__ import absolute_import import numpy as np import time import sys import six import marshal import types as python_types _GLOBAL_CUSTOM_OBJECTS = {} class CustomObjectScope(object): """Provides a scope that changes to `_GLOBAL_CUSTOM_OBJECTS` cannot esca...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
keras/utils/np_utils.py
63
"""Numpy-related utilities.""" from __future__ import absolute_import import numpy as np from six.moves import range from six.moves import zip from .. import backend as K def to_categorical(y, nb_classes=None): """Converts a class vector (integers) to binary class matrix. E.g. for use with categorical_cross...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
keras/preprocessing/text.py
127
# -*- coding: utf-8 -*- """Utilities for text input preprocessing. May benefit from a fast Cython rewrite. """ from __future__ import absolute_import from __future__ import division import string import sys import numpy as np from six.moves import range from six.moves import zip if sys.version_info < (3,): maket...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
tests/keras/test_multiprocessing.py
96
from __future__ import print_function import pytest import numpy as np from keras.models import Sequential from keras.layers.core import Dense from keras.utils.test_utils import keras_test @keras_test def test_multiprocessing_training(): reached_end = False arr_data = np.random.randint(0, 256, (500, 2)) ...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
keras/datasets/cifar100.py
16
from __future__ import absolute_import from .cifar import load_batch from ..utils.data_utils import get_file from .. import backend as K import numpy as np import os def load_data(label_mode='fine'): """Loads CIFAR100 dataset. # Arguments label_mode: one of "fine", "coarse". # Returns Tu...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
keras/datasets/cifar.py
13
# -*- coding: utf-8 -*- from __future__ import absolute_import import sys from six.moves import cPickle def load_batch(fpath, label_key='labels'): """Internal utility for parsing CIFAR data. # Arguments fpath: path the file to parse. label_key: key for label data in the retrieve d...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
tests/keras/utils/test_generic_utils.py
30
import pytest import keras from keras import backend as K from keras.utils.generic_utils import custom_object_scope, get_custom_objects, get_from_module def test_custom_object_scope_adds_objects(): get_custom_objects().clear() assert (len(get_custom_objects()) == 0) with custom_object_scope({"Test1": obje...
keras-team_keras
2017-01-28
ab3b93e8dd103f1d9729305825791a084c7c8493
fuzz/server.c
345
/* * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL licenses, (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * https://www.openssl.org/source/license.html * or in the file LICENSE in th...
openssl_openssl
2017-01-26
26a39fa953c11c4257471570655b0193828d4721
crypto/ui/ui_util.c
109
/* * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
openssl_openssl
2017-01-26
26a39fa953c11c4257471570655b0193828d4721
crypto/poly1305/poly1305_pmeth.c
192
/* * Copyright 2007-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
openssl_openssl
2017-01-26
26a39fa953c11c4257471570655b0193828d4721
test/uitest.c
141
/* * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
openssl_openssl
2017-01-26
26a39fa953c11c4257471570655b0193828d4721
crypto/poly1305/poly1305_ameth.c
67
/* * Copyright 2007-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
openssl_openssl
2017-01-26
26a39fa953c11c4257471570655b0193828d4721
sklearn/tests/test_multioutput.py
126
from __future__ import division import numpy as np import scipy.sparse as sp from sklearn.utils import shuffle from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_raises_regex from s...
scikit-learn_scikit-learn
2017-01-26
9f6b849c3523faf2271dea105e4129cb1e1a1cb8
build_tools/circle/checkout_merge_commit.sh
29
#!/bin/bash # Add `master` branch to the update list. # Otherwise CircleCI will give us a cached one. FETCH_REFS="+master:master" # Update PR refs for testing. if [[ -n "${CIRCLE_PR_NUMBER}" ]] then FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head" FETCH_REFS="${FETCH...
scikit-learn_scikit-learn
2017-01-26
9f6b849c3523faf2271dea105e4129cb1e1a1cb8
doc/sphinxext/sphinx_gallery/notebook.py
106
# -*- coding: utf-8 -*- r""" ============================ Parser for Jupyter notebooks ============================ Class that holds the Jupyter notebook information """ # Author: Óscar Nájera # License: 3-clause BSD from __future__ import division, absolute_import, print_function from functools import partial impor...
scikit-learn_scikit-learn
2017-01-26
9f6b849c3523faf2271dea105e4129cb1e1a1cb8
doc/sphinxext/sphinx_gallery/py_source_parser.py
88
# -*- coding: utf-8 -*- r""" Parser for python source files ============================== """ # Created Sun Nov 27 14:03:07 2016 # Author: Óscar Nájera from __future__ import division, absolute_import, print_function import ast import re from textwrap import dedent def get_docstring_and_rest(filename): """Separ...
scikit-learn_scikit-learn
2017-01-26
9f6b849c3523faf2271dea105e4129cb1e1a1cb8
doc/themes/scikit-learn/static/jquery.js
4
/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?wi...
scikit-learn_scikit-learn
2017-01-26
9f6b849c3523faf2271dea105e4129cb1e1a1cb8
src/platforms/weex/framework.js
416
import TextNode from 'weex/runtime/text-node' // this will be preserved during build const VueFactory = require('./factory') const instances = {} const modules = {} const components = {} const renderer = { TextNode, instances, modules, components } /** * Prepare framework config, basically about the virtua...
vuejs_vue
2017-01-25
af1ec1ba99b8312777770d21e9b2aded6e5944e3