repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
rnd0101/urbanmediator | urbanmediator/fckeditor.py | 1 | 4435 | """
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2007 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | bsd-3-clause | -8,651,350,915,387,884,000 | 25.214724 | 125 | 0.578805 | false |
skidzo/pydy | pydy/viz/shapes.py | 4 | 19419 | #!/usr/bin/env python
__all__ = ['Cube',
'Cylinder',
'Cone',
'Sphere',
'Circle',
'Plane',
'Tetrahedron',
'Octahedron',
'Icosahedron',
'Torus',
'TorusKnot',
'Tube']
import numpy as np
# This is a ... | bsd-3-clause | 4,142,942,683,133,290,000 | 23.48802 | 78 | 0.504351 | false |
ojengwa/oh-mainline | vendor/packages/oauthlib/oauthlib/oauth1/rfc5849/signature.py | 36 | 22922 | # -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module represents a direct implementation of `section 3.4`_ of the spec.
Terminology:
* Client: software interfacing with an OAuth API
* Server: the API provider
* Resource Owner: the user who is granting authoriza... | agpl-3.0 | 3,504,474,347,640,565,000 | 36.950331 | 99 | 0.597941 | false |
Omegaphora/external_chromium_org | build/android/findbugs_diff.py | 57 | 1391 | #!/usr/bin/env python
#
# 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.
"""Runs findbugs, and returns an error code if there are new warnings.
This runs findbugs with an additional flag to exclude know... | bsd-3-clause | 2,403,426,341,814,449,700 | 27.387755 | 76 | 0.712437 | false |
premanandchandrasekar/boto | boto/emr/__init__.py | 6 | 3243 | # Copyright (c) 2010 Spotify AB
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"),... | mit | 4,380,069,742,725,860,400 | 43.424658 | 80 | 0.655566 | false |
pjmaker/python-tsi-tools | tags.py | 1 | 32923 | # tags.py -- map tags from one namespace to another
# Copyright 2016 Ben Elliston
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later v... | bsd-3-clause | -1,354,862,000,757,330,000 | 43.132708 | 88 | 0.657565 | false |
happy56/kivy | examples/widgets/lists/list_cascade_images.py | 3 | 4936 | from kivy.adapters.dictadapter import DictAdapter
from kivy.uix.selectableview import SelectableView
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.listview import ListView, ListItemButton
from kivy.lang import Builder
from kivy.factory import Factory
from fixtures im... | lgpl-3.0 | 9,168,165,170,965,134,000 | 36.679389 | 79 | 0.612034 | false |
aquavitae/aafigure | aafigure/aafigure.py | 1 | 46035 | #!/usr/bin/env python
"""\
ASCII art to image converter.
This is the main module that contains the parser.
See svg.py and aa.py for output modules, that can render the parsed structure.
(C) 2006-2009 Chris Liechti <cliechti@gmx.net>
This is open source software under the BSD license. See LICENSE.txt for more
detai... | bsd-3-clause | 378,366,602,091,080,260 | 36.610294 | 122 | 0.503769 | false |
jcoady9/python-for-android | python3-alpha/python3-src/Lib/encodings/iso2022_jp_1.py | 816 | 1061 | #
# iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_1')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incrementa... | apache-2.0 | -3,339,413,472,680,567,300 | 26.205128 | 74 | 0.702168 | false |
StephenChusang/py-faster-rcnn-tracker | lib/datasetfactory/ILSVRC.py | 1 | 5021 | import os
import os.path as osp
import xml.etree.ElementTree as ET
import numpy as np
import scipy.sparse
import scipy.io as sio
# from utils.cython_bbox import bbox_overlaps
years = {'2013': '2013',
'2014': ['0000', '0001', '0002', '0003', '0004', '0005', '0006']}
name = 'ILSVRC'
_MAX_TRAIN_NUM = 20000
... | mit | 2,989,938,069,268,150,000 | 33.627586 | 103 | 0.599681 | false |
scott-maddox/fdint | scripts/gen_test_scfd.py | 1 | 5280 | # Copyright (c) 2015, Scott J Maddox. All rights reserved.
# Use of this source code is governed by the BSD-3-Clause
# license that can be found in the LICENSE file.
'''
Uses numerical integration to calculate accurate values to test against.
This should only be run after `python setup.py build_ext --inplace`.
'''
im... | bsd-3-clause | -5,182,951,187,604,252,000 | 37.540146 | 90 | 0.536742 | false |
Johnetordoff/osf.io | admin/osf_groups/views.py | 6 | 2534 | from django.contrib.auth.mixins import PermissionRequiredMixin
from django.urls import reverse
from django.views.generic import FormView, ListView
from osf.models import OSFGroup
from admin.osf_groups.forms import OSFGroupSearchForm
from admin.base.views import GuidView
from admin.osf_groups.serializers import seriali... | apache-2.0 | -2,715,642,400,069,713,400 | 31.487179 | 96 | 0.660221 | false |
ahmadio/edx-platform | lms/djangoapps/certificates/api.py | 23 | 14808 | """Certificates API
This is a Python API for generating certificates asynchronously.
Other Django apps should use the API functions defined in this module
rather than importing Django models directly.
"""
import logging
from django.conf import settings
from django.core.urlresolvers import reverse
from eventtracking ... | agpl-3.0 | 3,544,022,867,712,887,000 | 32.808219 | 105 | 0.643976 | false |
thezawad/flexx | make/copyright.py | 21 | 2104 | """ Update all copyright notices to the current year.
Does a search for a specific copyright notice of last year and replaces
it with a version for this year. Other copyright mentionings are listed,
but left unmodified.
If an argument is given, use that as the name of the copyright holder,
otherwise use the name speci... | bsd-2-clause | 1,865,558,450,328,426,500 | 33.491803 | 72 | 0.57462 | false |
ashutoshvt/psi4 | psi4/driver/qmmm.py | 7 | 5473 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 747,906,247,754,376,000 | 30.274286 | 138 | 0.595286 | false |
wgcv/SWW-Crashphone | lib/python2.7/site-packages/django/conf/locale/mk/formats.py | 43 | 1744 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'H:i:s'
DATE... | apache-2.0 | -2,941,194,111,753,959,000 | 37.755556 | 77 | 0.493693 | false |
vnpy/vnpy | vnpy/api/rohon/rohon_constant.py | 5 | 39659 | THOST_FTDC_EXP_Normal = '0'
THOST_FTDC_EXP_GenOrderByTrade = '1'
THOST_FTDC_ICT_EID = '0'
THOST_FTDC_ICT_IDCard = '1'
THOST_FTDC_ICT_OfficerIDCard = '2'
THOST_FTDC_ICT_PoliceIDCard = '3'
THOST_FTDC_ICT_SoldierIDCard = '4'
THOST_FTDC_ICT_HouseholdRegister = '5'
THOST_FTDC_ICT_Passport = '6'
THOST_FTDC_ICT_TaiwanCompatri... | mit | -3,915,091,831,393,606,700 | 30.931562 | 51 | 0.71729 | false |
flaviobarros/spyre | examples/stocks_example.py | 3 | 2387 | # tested with python2.7 and 3.4
from spyre import server
import pandas as pd
import json
try:
import urllib2
except ImportError:
import urllib.request as urllib2
class StockExample(server.App):
def __init__(self):
# implements a simple caching mechanism to avoid multiple calls to the yahoo finance api
self.d... | mit | -3,858,695,206,226,695,700 | 31.256757 | 137 | 0.607457 | false |
chongtianfeiyu/kbengine | kbe/res/scripts/common/Lib/pty.py | 120 | 4763 | """Pseudo terminal utilities."""
# Bugs: No signal handling. Doesn't set slave termios and window size.
# Only tested on Linux.
# See: W. Richard Stevens. 1992. Advanced Programming in the
# UNIX Environment. Chapter 19.
# Author: Steen Lumholt -- with additions by Guido.
from select import select
imp... | lgpl-3.0 | 3,724,770,915,884,572,000 | 27.017647 | 76 | 0.572538 | false |
shravya-ks/ECN-ns3 | src/bridge/bindings/modulegen__gcc_LP64.py | 2 | 194047 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | -2,043,327,947,544,714,200 | 63.339191 | 383 | 0.615279 | false |
ilc/imgserv | paste/util/doctest24.py | 26 | 99418 | # Module doctest.
# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
# Major enhancements and refactoring by:
# Jim Fulton
# Edward Loper
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
r"""Module doctest -- a framework for running examples in docstrings.
In... | mit | -7,089,454,714,428,406,000 | 36.305066 | 79 | 0.570209 | false |
pearlcoin-project/pearlcoin | qa/rpc-tests/keypool.py | 86 | 3165 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the wallet keypool, and interaction with wallet encryption/locking
from test_framework.test_f... | mit | -1,153,189,105,015,846,400 | 36.235294 | 96 | 0.62812 | false |
petemounce/ansible | lib/ansible/module_utils/rax.py | 27 | 12110 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
# Ansible still belong to the author of the module, and may assign their own
# license to the complete wo... | gpl-3.0 | -1,512,380,352,839,354,600 | 35.475904 | 78 | 0.601569 | false |
SciTools/cube_browser | lib/cube_browser/explorer.py | 1 | 15222 | from collections import OrderedDict
import glob
import os
try:
# Python 3
from urllib.parse import urlparse, parse_qs
except ImportError:
# Python 2
from urlparse import urlparse, parse_qs
import IPython.display
import cartopy.crs as ccrs
import ipywidgets
import iris
import iris.plot as iplt
import ma... | bsd-3-clause | -8,911,332,586,415,223,000 | 38.952756 | 83 | 0.543687 | false |
meduz/scikit-learn | benchmarks/bench_plot_lasso_path.py | 84 | 4005 | """Benchmarks of Lasso regularization path computation using Lars and CD
The input data is mostly low rank but is a fat infinite tail.
"""
from __future__ import print_function
from collections import defaultdict
import gc
import sys
from time import time
import numpy as np
from sklearn.linear_model import lars_pat... | bsd-3-clause | -3,816,992,223,906,853,400 | 33.230769 | 76 | 0.546567 | false |
naturali/tensorflow | tensorflow/contrib/learn/python/learn/__init__.py | 4 | 2319 | # Copyright 2016 The TensorFlow 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 applica... | apache-2.0 | 5,560,394,871,281,778,000 | 49.413043 | 85 | 0.793014 | false |
aaronsw/watchdog | vendor/pyExcelerator-0.6.3a/build/lib/pyExcelerator/Worksheet.py | 3 | 43893 | #!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Roman V. Kiseliov
# 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 reta... | agpl-3.0 | -1,635,084,034,952,873,500 | 31.108998 | 128 | 0.512337 | false |
renegelinas/mi-instrument | mi/instrument/ooici/mi/test_driver/driver.py | 7 | 21975 | # """
# @package mi.instrument.ooici.mi.test_driver.driver
# @file marine-integrations/mi/instrument/ooici/mi/test_driver/driver.py
# @author Bill French
# @brief Driver for the test_driver
# Release notes:
#
# This driver is used for coi testing
#
# """
#
# __author__ = 'Bill French'
# __license__ = 'Apache 2.0'
#
# i... | bsd-2-clause | 7,561,492,230,685,583,000 | 36.057336 | 143 | 0.56678 | false |
sputnick-dev/weboob | modules/attilasub/test.py | 7 | 1310 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 | -1,430,543,221,737,440,300 | 32.589744 | 77 | 0.70229 | false |
chwiede/pyads | pyads/adsclient.py | 1 | 6764 | import time
import select
import socket
import struct
import threading
import errno
from .amspacket import AmsPacket
from .adsconnection import AdsConnection
from .adsexception import AdsException
from .commands import *
class InvalidPacket(AdsException):
pass
class AdsClient:
def __init__(self, adsConnecti... | mit | -6,852,509,406,677,497,000 | 25.735178 | 98 | 0.603933 | false |
SirPigles/rsf | forums/test/python/test.py | 7 | 1204 | import sys
import os
import re
def print_environ(environ=os.environ):
"""Dump the shell environment as HTML."""
keys = environ.keys()
keys.sort()
i = 0
for key in keys:
if not re.search("^HTTP_|^REQUEST_", key):
continue
if i == 0:
print """<tr class="normal"><td>""",... | apache-2.0 | -1,709,632,533,602,733,600 | 26.363636 | 109 | 0.542359 | false |
OMNILab/CCFBDC2014 | data_process/feature_spatio-temporal/feature_spatio/feature_spatio.py | 1 | 2551 | # -*- coding: utf-8 -*-
import sys
import os
import math
#读写文件接口函数文件函数
def read_write_file(rfname,wfname,resource_files):
readf = open(rfname,'r')
writef = open(wfname,'w')
for line in readf:
#add other functions to deal with each line
result_line = location_extr(line.strip(),resource_files)
writef.write(re... | mit | 5,812,511,136,698,952,000 | 27.9875 | 67 | 0.684778 | false |
Axelio/pruebas_camelot | videostore/model.py | 1 | 1389 |
from sqlalchemy import Unicode, Date, Integer
from sqlalchemy.schema import Column, ForeignKey
from sqlalchemy.orm import relationship
import sqlalchemy.types
from camelot.admin.entity_admin import EntityAdmin
from camelot.core.orm import Entity
import camelot.types
class Movie( Entity ):
__tablename__ ... | gpl-3.0 | 5,921,483,481,911,714,000 | 26.78 | 78 | 0.587473 | false |
h-mayorquin/competitive_and_selective_learning | play.py | 1 | 1250 | """
This is the play
"""
import numpy as np
import matplotlib.pyplot as plt
import math
from sklearn.cluster import KMeans
from sklearn.datasets import make_blobs
from functions import selection_algorithm, scl
from csl import CSL
plot = True
verbose = False
tracking = True
selection = False
# Generate the data
n_sa... | mit | -4,808,629,288,575,466,000 | 20.186441 | 95 | 0.66 | false |
repotvsupertuga/tvsupertuga.repository | plugin.video.TVsupertuga/resources/lib/plugins/unidecode/x1d6.py | 248 | 3974 | data = (
's', # 0x00
't', # 0x01
'u', # 0x02
'v', # 0x03
'w', # 0x04
'x', # 0x05
'y', # 0x06
'z', # 0x07
'A', # 0x08
'B', # 0x09
'C', # 0x0a
'D', # 0x0b
'E', # 0x0c
'F', # 0x0d
'G', # 0x0e
'H', # 0x0f
'I', # 0x10
'J', # 0x11
'K', # 0x12
'L', # 0x13
'M', # 0... | gpl-2.0 | -1,488,419,387,175,585,300 | 14.403101 | 20 | 0.354051 | false |
GeyerA/android_external_chromium_org | chrome/common/extensions/docs/server2/api_list_data_source_test.py | 24 | 2930 | #!/usr/bin/env python
# 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.
import unittest
from api_list_data_source import APIListDataSource
from compiled_file_system import CompiledFileSystem
from copy import... | bsd-3-clause | 339,240,571,077,742,850 | 31.555556 | 78 | 0.603413 | false |
arrabito/DIRAC | DataManagementSystem/Client/DataManager.py | 3 | 74453 | """
:mod: DataManager
.. module: DataManager
:synopsis: DataManager links the functionalities of StorageElement and FileCatalog.
This module consists of DataManager and related classes.
"""
# # imports
from datetime import datetime, timedelta
import fnmatch
import os
import time
import errno
# # from DIRAC
import... | gpl-3.0 | -2,352,551,176,563,042,300 | 38.539565 | 112 | 0.635152 | false |
Sebubu/mushroom_crawler | mushroom/GoogleInceptionV3.py | 1 | 6668 | from keras.models import Graph
from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D
from keras.layers.advanced_activations import PReLU
import datetime
'''
Inception v3 paper
http://arxiv.org/pdf/1512.00567v1.pdf
Old inception paper
http://arxiv.org/pdf/1409.4842.pdf
'''
def activation_fu... | unlicense | -3,629,595,735,044,102,700 | 40.937107 | 123 | 0.671416 | false |
cloudera/hue | desktop/core/ext-py/celery-4.2.1/t/unit/bin/test_base.py | 2 | 12976 | from __future__ import absolute_import, unicode_literals
import os
import pytest
from case import Mock, mock, patch
from celery.bin.base import Command, Extensions, Option
from celery.five import bytes_if_py2
class MyApp(object):
user_options = {'preload': None}
APP = MyApp() # <-- Used by test_with_custom_... | apache-2.0 | -4,420,767,453,853,366,000 | 33.695187 | 76 | 0.551788 | false |
mudbungie/NetExplorer | env/share/doc/networkx-1.11/examples/advanced/parallel_betweenness.py | 51 | 2510 | """
Example of parallel implementation of betweenness centrality using the
multiprocessing module from Python Standard Library.
The function betweenness centrality accepts a bunch of nodes and computes
the contribution of those nodes to the betweenness centrality of the whole
network. Here we divide the network in chu... | mit | -3,663,657,029,364,220,000 | 33.383562 | 79 | 0.62988 | false |
vmturbo/nova | nova/cmd/idmapshift.py | 9 | 7512 | # Copyright 2014 Rackspace, Andrew Melton
#
# 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 applicable law or agreed to... | apache-2.0 | -1,965,350,524,618,179,800 | 31.37931 | 77 | 0.617279 | false |
gundalow/ansible-modules-extras | cloud/cloudstack/cs_configuration.py | 32 | 8629 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -5,238,826,330,936,015,000 | 28.544521 | 98 | 0.64217 | false |
Intel-bigdata/SSM | supports/integration-test/ssm_generate_test_data.py | 4 | 3241 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This script will be used to create test data set. It is also called by:
- test_small_file_rule.py
- test_small_file_actions.py
"""
import sys
import ast
import os
import re
import argparse
from util import *
def create_test_set(file_set_nums, file_size, base_dir, deb... | apache-2.0 | 7,959,431,885,895,326,000 | 37.583333 | 119 | 0.551373 | false |
OpenPIV/openpiv-python | openpiv/pyprocess.py | 2 | 29417 | import numpy.lib.stride_tricks
import numpy as np
from scipy.fft import rfft2, irfft2, fftshift
from numpy import ma
from scipy.signal import convolve2d
from numpy import log
"""This module contains a pure python implementation of the basic
cross-correlation algorithm for PIV image processing."""
__licence_ = """
Cop... | gpl-3.0 | -7,874,689,390,964,289,000 | 33.771868 | 80 | 0.614543 | false |
EvanK/ansible | lib/ansible/modules/network/nxos/nxos_snmp_location.py | 106 | 4000 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | 6,908,618,628,149,143,000 | 25.666667 | 81 | 0.654 | false |
brandond/ansible | lib/ansible/modules/network/f5/bigip_gtm_datacenter.py | 14 | 14902 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -6,094,070,602,254,276,000 | 29.165992 | 91 | 0.600725 | false |
luogangyi/bcec-nova | nova/virt/hyperv/migrationops.py | 3 | 12857 | # Copyright 2013 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -9,201,883,551,362,900,000 | 43.030822 | 79 | 0.568951 | false |
petrutlucian94/cinder | cinder/tests/unit/test_ibm_flashsystem_iscsi.py | 18 | 9722 | # Copyright 2015 IBM Corp.
# 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 app... | apache-2.0 | 4,882,847,486,622,533,000 | 35.548872 | 78 | 0.582288 | false |
geodynamics/snac | Snac/pyre/Inlet.py | 5 | 3206 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# <LicenseText>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
class Inlet(object):
def __init__(self):
self._handle = None
return
def impose(sel... | gpl-2.0 | -1,576,294,592,112,514,000 | 25.278689 | 80 | 0.471616 | false |
Yong-Lee/decode-Django | Django-1.5.1/django/contrib/gis/tests/geoapp/models.py | 112 | 1877 | from django.contrib.gis.db import models
from django.contrib.gis.tests.utils import mysql, spatialite
from django.utils.encoding import python_2_unicode_compatible
# MySQL spatial indices can't handle NULL geometries.
null_flag = not mysql
@python_2_unicode_compatible
class Country(models.Model):
name = models.Ch... | gpl-2.0 | -5,466,062,899,039,462,000 | 32.517857 | 79 | 0.710176 | false |
kagayakidan/scikit-learn | sklearn/metrics/setup.py | 299 | 1024 | import os
import os.path
import numpy
from numpy.distutils.misc_util import Configuration
from sklearn._build_utils import get_blas_info
def configuration(parent_package="", top_path=None):
config = Configuration("metrics", parent_package, top_path)
cblas_libs, blas_info = get_blas_info()
if os.name ==... | bsd-3-clause | -5,553,514,872,605,611,000 | 32.032258 | 79 | 0.508789 | false |
lferr/charm | charm/schemes/ibenc/ibenc_lsw08.py | 3 | 4047 | '''
Allison Lewko, Amit Sahai and Brent Waters (Pairing-based)
| From: "Revocation Systems with Very Small Private Keys"
| Published in: IEEE S&P 2010
| Available from: http://eprint.iacr.org/2008/309.pdf
| Notes: fully secure IBE Construction with revocable keys.
* type: identity-based encryption (public ... | lgpl-3.0 | 6,864,128,126,658,822,000 | 34.814159 | 105 | 0.451198 | false |
Ictp/indico | ez_setup.py | 11 | 10278 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | gpl-3.0 | 5,455,021,603,961,303,000 | 35.190141 | 86 | 0.652267 | false |
ibusybox/pkcs | src/main/python/pkcs/opensslconf.py | 1 | 3420 | #!/usr/bin/env python
# coding=utf8
caOpensslConf = '''
#http://www.phildev.net/ssl/opensslconf.html
[ ca ]
default_ca = CA_default
[CA_default]
caroot = %(caroot)s
certs = $caroot/certsdb
new_certs_dir = $certs
database = $caroot/index.txt
certificate = $caroot/%(cn)s.cer
private_key = $caro... | apache-2.0 | 6,637,962,201,002,830,000 | 20.352941 | 49 | 0.62076 | false |
saisiddhant12/time_management_system | db.py | 1 | 1248 | import time
import datetime
import sqlite3
conn = sqlite3.connect('diary.db')
c = conn.cursor()
c.execute('''CREATE TABLE executive (unid INTEGER PRIMARY KEY,name text,designation text, abs text)''')
no_of_exec = input() #enter the total number of executives
while(no_of_exec):
no_of_exec = no... | gpl-2.0 | 57,883,323,004,151,864 | 39.290323 | 136 | 0.651442 | false |
lra/boto | tests/unit/vpc/test_subnet.py | 113 | 5485 | from tests.compat import OrderedDict
from tests.unit import unittest
from tests.unit import AWSMockServiceTestCase
from boto.vpc import VPCConnection, Subnet
class TestDescribeSubnets(AWSMockServiceTestCase):
connection_class = VPCConnection
def default_body(self):
return b"""
<Describe... | mit | 5,908,669,427,398,076,000 | 40.240602 | 86 | 0.571559 | false |
pravsripad/jumeg | jumeg/jumeg_test.py | 3 | 1803 | #!/usr/bin/env python
import jumeg
import os.path
raw_fname = "109925_CAU01A_100715_0842_2_c,rfDC-raw.fif"
if not os.path.isfile(raw_fname):
print("Please find the test file at the below location on the meg_store2 network drive - \
cp /data/meg_store2/fif_data/jumeg_test_data/109925_CAU01A_100715_0842_... | bsd-3-clause | 3,525,905,056,052,199,000 | 35.06 | 102 | 0.770937 | false |
WoLpH/EventGhost | _build/builder/Logging.py | 1 | 1901 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either versio... | gpl-2.0 | -8,050,787,675,913,965,000 | 30.147541 | 77 | 0.652632 | false |
jgraham/servo | tests/wpt/web-platform-tests/tools/six/six.py | 426 | 27961 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2014 Benjamin Peterson
#
# 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 with... | mpl-2.0 | 8,156,796,184,431,290,000 | 34.52859 | 98 | 0.633382 | false |
ygenc/onlineLDA | onlineldavb_new/build/scipy/scipy/integrate/_ode.py | 5 | 28343 | # Authors: Pearu Peterson, Pauli Virtanen, John Travers
"""
First-order ODE integrators.
User-friendly interface to various numerical integrators for solving a
system of first order ODEs with prescribed initial conditions::
d y(t)[i]
--------- = f(t,y(t))[i],
d t
y(t=0)[i] = y0[i],
where::
... | gpl-3.0 | -3,308,868,915,932,437,000 | 30.917793 | 80 | 0.538334 | false |
brianmhunt/SIWorldMap | werkzeug/script.py | 89 | 11151 | # -*- coding: utf-8 -*-
r'''
werkzeug.script
~~~~~~~~~~~~~~~
.. admonition:: Deprecated Functionality
``werkzeug.script`` is deprecated without replacement functionality.
Python's command line support improved greatly with :mod:`argparse`
and a bunch of alternative modules.
Most ... | mit | 2,743,942,439,959,080,000 | 34.626198 | 85 | 0.603892 | false |
ner0x652/RElief | elfie.py | 1 | 6773 | #!/usr/bin/env python3
import lief
import sys
import termcolor as tc
def get_typeval_as_str(lief_type):
return str(lief_type).split('.')[1]
def show_name(binary):
print(tc.colored("[::] Name", "blue"))
print(binary.name)
def enum_header(header):
def get_ident_props():
identity = "\n{0:18... | mit | -4,353,584,598,591,956,500 | 41.33125 | 128 | 0.557065 | false |
angstwad/ansible | lib/ansible/galaxy/token.py | 68 | 2167 | #!/usr/bin/env python
########################################################################
#
# (C) 2015, Chris Houseknecht <chouse@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | gpl-3.0 | -5,328,485,136,523,889,000 | 31.358209 | 72 | 0.601292 | false |
robbiet480/home-assistant | tests/components/folder_watcher/test_init.py | 3 | 1834 | """The tests for the folder_watcher component."""
import os
from homeassistant.components import folder_watcher
from homeassistant.setup import async_setup_component
from tests.async_mock import Mock, patch
async def test_invalid_path_setup(hass):
"""Test that an invalid path is not set up."""
assert not aw... | apache-2.0 | -2,187,242,035,677,994,500 | 31.75 | 87 | 0.62759 | false |
bruinfish/cs118-proj2-pox | pox/messenger/__init__.py | 25 | 19645 | # Copyright 2011,2012 James McCauley
#
# This file is part of POX.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# POX is d... | gpl-3.0 | 3,102,707,311,107,334,700 | 27.889706 | 78 | 0.645304 | false |
richpsharp/forest_carbon_edge_effects | average_human_use_layers.py | 1 | 8405 | import os
import time
import numpy
import functools
import sys
import codecs
import types
import gdal
import osr
from invest_natcap import raster_utils
GLOBAL_UPPER_LEFT_ROW = 2602195.7925872812047601
GLOBAL_UPPER_LEFT_COL = -11429693.3490753173828125
def average_layers():
base_table_uri = "C:/Users/rich/Desk... | apache-2.0 | -309,081,735,570,461,700 | 48.152047 | 186 | 0.627722 | false |
1a1a11a/mimircache | PyMimircache/cache/slru.py | 1 | 3337 | # coding=utf-8
from PyMimircache.cache.lru import LRU
from PyMimircache.cache.abstractCache import Cache
class SLRU(Cache):
def __init__(self, cache_size=1000, ratio=1, **kwargs):
"""
:param cache_size: size of cache
:param args: raio: the ratio of protected/probationary
:return:
... | gpl-3.0 | 6,881,207,422,378,916,000 | 33.760417 | 104 | 0.576266 | false |
UltronAI/Deep-Learning | Pattern-Recognition/hw2-Feature-Selection/skfeature/function/wrapper/svm_backward.py | 1 | 1775 | import numpy as np
from sklearn.svm import SVC
from sklearn.model_selection import KFold
from sklearn.metrics import accuracy_score
def svm_backward(X, y, n_selected_features):
"""
This function implements the backward feature selection algorithm based on SVM
Input
-----
X: {numpy arr... | mit | 5,397,828,943,415,351,000 | 28.084746 | 82 | 0.530141 | false |
jalexanderqed/rocksdb | build_tools/precommit_checker.py | 2 | 5638 | #!/usr/local/fbcode/gcc-4.8.1-glibc-2.17-fb/bin/python2.7
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import commands
import subprocess
import sys
import re
import os
import time
#
# Simple logger... | bsd-3-clause | -1,794,707,275,809,447,200 | 26.105769 | 78 | 0.521462 | false |
kastriothaliti/techstitution | venv/lib/python3.5/site-packages/wheel/util.py | 345 | 4890 | """Utility functions."""
import sys
import os
import base64
import json
import hashlib
try:
from collections import OrderedDict
except ImportError:
OrderedDict = dict
__all__ = ['urlsafe_b64encode', 'urlsafe_b64decode', 'utf8',
'to_json', 'from_json', 'matches_requirement']
def urlsafe_b64encode(d... | gpl-3.0 | -2,763,025,289,578,280,400 | 28.281437 | 90 | 0.604499 | false |
kirienko/gourmet | src/gourmet/threadManager.py | 1 | 15304 | # This module is designed to handle all multi-threading processes in
# Gourmet. Separate threads are limited to doing the following things
# with respect to the GUI:
#
# 1. Start a notification dialog with a progress bar
# 2. Update the progress bar
# 3. Finish successfully
# 4. Stop with an error.
#
# If you n... | gpl-2.0 | -3,014,952,524,836,481,500 | 33.861048 | 101 | 0.59821 | false |
ilismal/luhnCompliance | luhn.py | 1 | 1535 | # Luhn algorithm check
# From https://en.wikipedia.org/wiki/Luhn_algorithm
def luhn_checksum(card_number):
def digits_of(n):
return [int(d) for d in str(n)]
digits = digits_of(card_number)
odd_digits = digits[-1::-2]
even_digits = digits[-2::-2]
checksum = 0
checksum += sum(odd_digits)
... | unlicense | -5,032,799,650,072,255,000 | 29.7 | 72 | 0.637785 | false |
abzaloid/maps | django-project/lib/python2.7/site-packages/django/contrib/sessions/middleware.py | 25 | 2648 | import time
from importlib import import_module
from django.conf import settings
from django.utils.cache import patch_vary_headers
from django.utils.http import cookie_date
class SessionMiddleware(object):
def __init__(self):
engine = import_module(settings.SESSION_ENGINE)
self.SessionStore = eng... | mit | 7,820,951,604,695,608,000 | 45.45614 | 87 | 0.575151 | false |
hjtabisola/final-project | appengine_config.py | 36 | 3078 | # Copyright 2013 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 applicable law or a... | apache-2.0 | 4,617,293,784,267,909,000 | 30.742268 | 102 | 0.749188 | false |
MaizerGomes/youtube-dl | test/test_InfoExtractor.py | 104 | 2243 | #!/usr/bin/env python
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL
from youtube_dl.extractor.common import InfoExtractor
from youtube_dl.extractor i... | unlicense | -9,194,507,983,609,257,000 | 35.177419 | 106 | 0.606777 | false |
sdklite/gyp | test/win/win-tool/gyptest-win-tool-handles-readonly-files.py | 164 | 1699 | #!/usr/bin/env python
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make sure overwriting read-only files works as expected (via win-tool).
"""
import TestGyp
import filecmp
import os
import stat
import... | bsd-3-clause | -5,699,337,702,925,966,000 | 29.890909 | 80 | 0.683932 | false |
jeandet/meson | mesonbuild/modules/gnome.py | 1 | 77105 | # Copyright 2015-2016 The Meson development team
# 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 applicable law or agree... | apache-2.0 | -8,472,845,615,804,737,000 | 45.87234 | 133 | 0.555528 | false |
ContinuumIO/topik | topik/vectorizers/tfidf.py | 1 | 1139 | from math import log
from ._registry import register
from vectorizer_output import VectorizerOutput
from .bag_of_words import _count_words_in_docs
def _count_document_occurences(doc_counts, total_words):
return {word_id: sum(1 for doc in doc_counts.values() if word_id in doc)
for word_id in range(tota... | bsd-3-clause | -7,258,414,536,797,177,000 | 38.275862 | 102 | 0.702371 | false |
tumbl3w33d/ansible | lib/ansible/modules/cloud/amazon/ec2_eni.py | 31 | 23840 | #!/usr/bin/python
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supporte... | gpl-3.0 | -9,060,336,838,755,929,000 | 36.661927 | 154 | 0.617534 | false |
NeCTAR-RC/nova | nova/virt/libvirt/storage/dmcrypt.py | 47 | 3448 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/l... | apache-2.0 | -6,808,341,011,872,560,000 | 34.183673 | 79 | 0.645882 | false |
keyurpatel076/MissionPlannerGit | Lib/unittest/case.py | 41 | 42078 | """Test case implementation"""
import collections
import sys
import functools
import difflib
import pprint
import re
import warnings
from . import result
from .util import (
strclass, safe_repr, unorderable_list_difference,
_count_diff_all_purpose, _count_diff_hashable
)
__unittest = True
DIFF_OMITTED = (... | gpl-3.0 | 4,718,258,924,345,535,000 | 38.621469 | 109 | 0.571201 | false |
tensorflow/lucid | tests/misc/io/test_saving.py | 1 | 6630 | import time
import pytest
import numpy as np
from lucid.misc.io.saving import save, CaptureSaveContext, batch_save
from lucid.misc.io.loading import load
from lucid.misc.io.scoping import io_scope, current_io_scopes
from concurrent.futures import ThreadPoolExecutor
import os.path
import io
import tensorflow as tf
dic... | apache-2.0 | 1,805,194,324,899,068,200 | 30.126761 | 121 | 0.66365 | false |
collinjackson/mojo | nacl_bindings_generator/interface_dsl.py | 5 | 4095 | # 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.
class Interface(object):
def __init__(self):
self.functions = []
def Func(self, name, return_type):
f = Function(self, len(self.functions), name... | bsd-3-clause | -2,292,047,989,961,554,200 | 25.590909 | 77 | 0.643712 | false |
idea4bsd/idea4bsd | plugins/hg4idea/testData/bin/mercurial/hgweb/hgweb_mod.py | 91 | 15218 | # hgweb/hgweb_mod.py - Web interface for a repository.
#
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import os
... | apache-2.0 | -5,328,603,449,746,074,000 | 37.429293 | 80 | 0.512945 | false |
oconnor663/peru | peru/display.py | 1 | 9334 | import asyncio
import io
import re
import sys
# The display classes deal with output from subprocesses. The FancyDisplay
# gives a multi-line, real-time view of each running process that looks nice in
# the terminal. The VerboseDisplay collects output from each job and prints it
# all when the job is finished, in a wa... | mit | 434,639,281,018,792,770 | 37.53719 | 79 | 0.619987 | false |
Cyberjusticelab/JusticeAI | src/ml_service/feature_extraction/post_processing/regex/regex_entity_extraction.py | 1 | 7500 | from feature_extraction.post_processing.regex.regex_lib import RegexLib
import re
import datetime
import time
import unicodedata
from util.log import Log
import math
class EntityExtraction:
regex_bin = None
one_month = 86400 * 30 # unix time for 1 month
month_dict = {
'janvier': 1,
'fevri... | mit | 8,145,534,708,138,904,000 | 35.945813 | 109 | 0.587067 | false |
mollstam/UnrealPy | UnrealPyEmbed/Source/Python/Lib/python27/lib2to3/main.py | 250 | 11605 | """
Main program for 2to3.
"""
from __future__ import with_statement
import sys
import os
import difflib
import logging
import shutil
import optparse
from . import refactor
def diff_texts(a, b, filename):
"""Return a unified diff of two strings."""
a = a.splitlines()
b = b.splitlines()
return diffl... | mit | -4,991,081,407,455,078,000 | 42.141264 | 80 | 0.576993 | false |
jocelynmass/nrf51 | toolchain/arm_cm0_deprecated/arm-none-eabi/share/gdb/python/gdb/frames.py | 68 | 8031 | # Frame-filter commands.
# Copyright (C) 2013-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any late... | gpl-2.0 | 6,565,255,743,960,707,000 | 34.223684 | 86 | 0.661686 | false |
magne4000/festival | app.py | 1 | 1221 | import os
import re
from flask import Flask
from datetime import timedelta
def interval_to_timedelta(interval):
if isinstance(interval, int):
interval = "%ds" % interval
ratios = {
's': 'seconds',
'm': 'minutes',
'h': 'hours',
'd': 'days',
'w': 'weeks'
}
... | mit | -1,065,424,582,196,639,200 | 34.911765 | 118 | 0.652744 | false |
anbasile/flask_sample | flask/lib/python2.7/site-packages/flask/testsuite/blueprints.py | 563 | 28089 | # -*- coding: utf-8 -*-
"""
flask.testsuite.blueprints
~~~~~~~~~~~~~~~~~~~~~~~~~~
Blueprints (and currently modules)
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
import warnings
from flask.testsuite import FlaskTestCase, emi... | mit | 3,767,052,625,817,690,600 | 34.555696 | 90 | 0.559792 | false |
amir-qayyum-khan/edx-platform | lms/djangoapps/courseware/tests/test_self_paced_overrides.py | 23 | 6451 | """Tests for self-paced course due date overrides."""
# pylint: disable=missing-docstring
import datetime
import pytz
from django.test.utils import override_settings
from mock import patch
from courseware.tests.factories import BetaTesterFactory
from courseware.access import has_access
from lms.djangoapps.ccx.tests.t... | agpl-3.0 | 5,706,769,903,066,313,000 | 42.295302 | 111 | 0.687335 | false |
jfpla/odoo | openerp/addons/base/ir/ir_model.py | 7 | 60967 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | 308,184,714,977,258,300 | 47.42494 | 207 | 0.557351 | false |
job/exscript | tests/Exscript/util/interactTest.py | 6 | 2739 | import sys, unittest, re, os.path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
from tempfile import NamedTemporaryFile
import Exscript.util.interact
from Exscript.util.interact import InputHistory
class InputHistoryTest(unittest.TestCase):
CORRELATE = InputHistory
def ... | gpl-2.0 | -6,607,437,794,478,139,000 | 36.520548 | 84 | 0.648412 | false |
ntt-sic/cinder | cinder/tests/backup/fake_swift_client.py | 5 | 4331 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | apache-2.0 | 3,122,307,699,989,526,000 | 37.327434 | 78 | 0.59432 | false |
sfstpala/Victory-Chat | markdown/extensions/html_tidy.py | 2 | 2089 | #!/usr/bin/env python
"""
HTML Tidy Extension for Python-Markdown
=======================================
Runs [HTML Tidy][] on the output of Python-Markdown using the [uTidylib][]
Python wrapper. Both libtidy and uTidylib must be installed on your system.
Note than any Tidy [options][] can be passed in as extensio... | isc | 4,063,441,977,045,462,500 | 32.693548 | 78 | 0.651987 | false |
lmprice/ansible | lib/ansible/plugins/lookup/aws_service_ip_ranges.py | 102 | 3425 | # (c) 2016 James Turner <turnerjsm@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: aws_service_ip_ranges
author:
- Jam... | gpl-3.0 | -2,853,441,205,041,305,600 | 42.35443 | 128 | 0.682044 | false |
liuyxpp/blohg | docs/conf.py | 2 | 7298 | # -*- coding: utf-8 -*-
#
# blohg documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 26 23:45:47 2011.
#
# 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 c... | gpl-2.0 | -9,159,897,205,813,033,000 | 31.14978 | 80 | 0.708961 | false |
codeforamerica/skillcamp | ENV/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py | 2931 | 1675 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit | -6,183,980,821,611,049,000 | 38.880952 | 69 | 0.717015 | false |
aallai/pyobfsproxy | obfsproxy/transports/obfs3_dh.py | 1 | 2685 | import binascii
import obfsproxy.common.rand as rand
def int_to_bytes(lvalue, width):
fmt = '%%.%dx' % (2*width)
return binascii.unhexlify(fmt % (lvalue & ((1L<<8*width)-1)))
class UniformDH:
"""
This is a class that implements a DH handshake that uses public
keys that are indistinguishable from ... | bsd-3-clause | 4,533,037,761,407,175,700 | 34.328947 | 122 | 0.653631 | false |
chrisfranzen/django | django/contrib/auth/tokens.py | 296 | 2631 | from datetime import date
from django.conf import settings
from django.utils.http import int_to_base36, base36_to_int
from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils import six
class PasswordResetTokenGenerator(object):
"""
Strategy object used to generate and check tokens... | bsd-3-clause | 2,530,676,891,755,478,500 | 35.041096 | 87 | 0.632839 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.