repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
arokem/PyEMMA | pyemma/msm/tests/test_its.py | 1 | 9069 | # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# 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 ... | bsd-2-clause | 1,425,284,439,965,800,200 | 40.605505 | 114 | 0.595986 | false |
tflink/testCloud | testCloud.py | 1 | 9870 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014, Red Hat, Inc.
# License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+>
# See the LICENSE file for more details on Licensing
"""
This is a module for downloading fedora cloud images (and probably any other
qcow2) and then booting them locally with qemu.
"""... | gpl-2.0 | -165,019,787,094,557,220 | 29 | 79 | 0.539716 | false |
Jitrixis/2ARC-Network-stack | TVpy/api.py | 1 | 1265 | __author__ = 'jitrixis'
from Factory.machinery import *
class Api:
def __init__(self, device="wlan0"):
self.__engine = Engine(device)
pass
def getIP(self, mac):
r = self.__engine.getArpIP(mac)
return r
def getMAC(self, ip):
r = self.__engine.getArpMAC(ip)
... | mit | -7,564,539,796,375,667,000 | 24.32 | 92 | 0.564427 | false |
SpamExperts/trac-slack | application.py | 1 | 18428 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
""""""
import os
import pwd
import json
import logging
import calendar
import urlparse
import functools
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
from xmlrpc import client
except ImportError:
import xmlrpclib ... | gpl-2.0 | 6,069,118,977,178,579,000 | 33.092593 | 101 | 0.533351 | false |
RobinQuetin/CAIRIS-web | cairis/cairis/controllers/UserController.py | 1 | 2731 | import httplib
from flask.ext.restful_swagger import swagger
from flask import request, make_response, session
from flask.ext.restful import Resource
from jsonpickle import encode
from Borg import Borg
from CairisHTTPError import MissingParameterHTTPError, MalformedJSONHTTPError
from tools.ModelDefinitions import Use... | apache-2.0 | -2,372,690,068,079,911,400 | 31.915663 | 104 | 0.596851 | false |
cstorey/clap-rs | clap-tests/run_tests.py | 1 | 8808 | #!/usr/bin/env python
import sys
import subprocess
import re
import difflib
failed = False
_ansi = re.compile(r'\x1b[^m]*m')
_help = '''claptests v1.4.8
Kevin K. <kbknapp@gmail.com>
tests clap library
USAGE:
\tclaptests [FLAGS] [OPTIONS] [ARGS] [SUBCOMMAND]
FLAGS:
-f, --flag tests flags
-F ... | mit | -5,824,107,350,463,208,000 | 32.363636 | 131 | 0.63238 | false |
aiyappaganesh/OP | handlers/request_handler.py | 1 | 1093 | from util import http_util
import webapp2
import webapp2_extras
from webapp2_extras import sessions
webapp2_extras.sessions.default_config['secret_key'] = 'asdfasdf'
webapp2_extras.sessions.default_config['cookie_name'] = 'underdogs'
APP_JSON = "application/json"
class RequestHandlerMixin(object):
def write(self... | gpl-2.0 | 7,885,501,371,286,362,000 | 31.176471 | 69 | 0.705398 | false |
ConvergenceDev/apiai-selvycure-booking-webhook | action_processor.py | 1 | 5739 | # -*- coding: utf-8 -*-
import os
from datetime import datetime
import json
from apscheduler.schedulers.background import BackgroundScheduler
import requests
FACEBOOK_SEND_URL = "https://graph.facebook.com/v2.6/me/messages"
class ActionProcessor(object):
action = None
request = None
sender_id = None
... | apache-2.0 | -8,093,412,793,826,818,000 | 33.56129 | 148 | 0.48404 | false |
cosbynator/NPSGD | npsgd_queue.py | 1 | 18139 | #!/usr/bin/python
# Author: Thomas Dimson [tdimson@gmail.com]
# Date: January 2011
# For distribution details, see LICENSE
"""Queue server for npsgd modelling tasks.
The queue server is the data backend for NPSGD. It listens to both workers and
the web interface. The web interface populates it with requests while t... | bsd-3-clause | -3,869,175,241,003,585,000 | 36.554865 | 131 | 0.621423 | false |
Lincoln-Cybernetics/Explore- | player.py | 1 | 21476 | import pygame
import random
class Player(pygame.sprite.Sprite):
def __init__(self, level, *groups):
super(Player, self).__init__(*groups)
#the game level
self.level = level
#spritegrups
self.unpassable = pygame.sprite.Group()
#base image
sel... | unlicense | -5,346,653,016,161,406,000 | 37.145648 | 212 | 0.429037 | false |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/conda_env/env.py | 1 | 5704 | from __future__ import absolute_import, print_function
from collections import OrderedDict
from copy import copy
from itertools import chain
import os
from conda.base.context import context
from conda.cli import common # TODO: this should never have to import form conda.cli
from conda.common.serialize import yaml_lo... | apache-2.0 | -9,188,469,645,229,537,000 | 30.688889 | 94 | 0.606417 | false |
telefonicaid/perseo-fe | test/acceptance/integration/__init__.py | 1 | 1548 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of perseo-fe
#
# perseo-fe 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 ... | agpl-3.0 | 2,361,031,582,711,251,000 | 31.1875 | 77 | 0.72945 | false |
balle/chaosmap | chaosmap.py | 1 | 15829 | #!/usr/bin/python2
#
# Chaosmap
#
# Chaosmap is an information gathering tool and
# dns / whois / web server scanner.
# For wider description and example usages see the README
#
# Coded by Balle
# http://www.datenterrorist.de
# License GPLv3
version = "1.2"
###[ Import modules
import sys
import getopt
import re
imp... | gpl-3.0 | -7,577,405,450,876,749,000 | 32.82265 | 127 | 0.415187 | false |
okfn/rtei | rtei/settings/production.py | 1 | 2263 | import sys
import os
from .base import *
DEBUG = False
# Update database configuration with $DATABASE_URL.
import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)
SECRET_KEY = os.environ.get('SECRET_KEY')
# AWS S3 settings
DEFAULT_FILE_STORAGE = 'storages.backends.s3b... | agpl-3.0 | 669,437,752,501,034,400 | 25.940476 | 71 | 0.633672 | false |
akretion/odoo | addons/mrp/models/stock_warehouse.py | 4 | 14216 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError, UserError
class StockWarehouse(models.Model):
_inherit = 'stock.warehouse'
manufacture_to_resupply = fields.Boolean(
... | agpl-3.0 | 7,094,540,157,854,976,000 | 48.361111 | 190 | 0.557681 | false |
simgislab/universiade2013 | univer_parse.py | 1 | 7397 | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# police-uum.py
# Author: Maxim Dubinin (sim@gis-lab.info)
# About: Grab 112.ru data on участковые, creates two tables linked with unique id, policemen and locations they are responsible for.
# Created: 13:26 07.05.201... | bsd-2-clause | -682,727,570,312,697,100 | 39.152174 | 203 | 0.5155 | false |
machinegun/SALSA | correct.py | 1 | 3402 | import sys
#reads input assembly, breakpoints given by the method and outputs new contig file with lengths
#offsets bed file as well
def parse_fasta(fh):
fa = {}
current_short_name = None
# Part 1: compile list of lines per sequence
for ln in fh:
if ln[0] == '>':
# new name line; r... | mit | -8,328,874,914,861,466,000 | 29.927273 | 114 | 0.57231 | false |
PEAT-AI/Crampy | inverse_kinematics/torben_ik.py | 1 | 7206 | import serial
import math
import time
import csv
import thread
import numpy
from multiprocessing import Process
#globale variablen
#serial connection to mini Maestro
ser = serial.Serial('/dev/ttyACM1')
#leg length in cm
lega=3
legb=8
legc=10
def leg1(WinkelA,WinkelB,WinkelC,ser):
WinkelA=180-WinkelA
WinkelC=170... | gpl-3.0 | 4,077,228,614,053,299,700 | 21.949045 | 166 | 0.67305 | false |
ircwaves/gips | gips/data/landsat/landsat.py | 1 | 92875 | #!/usr/bin/env python
################################################################################
# GIPS: Geospatial Image Processing System
#
# AUTHOR: Matthew Hanson
# EMAIL: matt.a.hanson@gmail.com
#
# Copyright (C) 2014-2018 Applied Geosolutions
#
# This program is free software; you can redist... | gpl-2.0 | 6,233,482,248,751,617,000 | 42.850331 | 133 | 0.495031 | false |
gunan/tensorflow | tensorflow/python/keras/engine/data_adapter_test.py | 1 | 43158 | # Copyright 2019 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 | -2,744,430,613,566,517,000 | 38.740331 | 80 | 0.649567 | false |
Pfiver/penview | dev/Danny_example.py | 1 | 9958 | from Danny.OOo.OOoLib import *
def CalcExample():
# create a new Calc spreadsheet.
oDoc = StarDesktop.loadComponentFromURL( "private:factory/scalc", "_blank", 0, Array() )
#-----
# Use this instead to open an EXISTING calc document,
# and assign it to variable oDoc.
# cFile = "C:\Docum... | gpl-3.0 | -697,155,829,228,361,100 | 40.495833 | 105 | 0.642097 | false |
samstav/mongoexport | mongoexport.py | 1 | 7599 | """mongoexport implemented as a python module.
'username' and 'password' for accessing target mongodb
can be stored as environment variables or in python
keyring.
Stored as environment variables:
export MONGOEXPORT_USERNAME=*****
export MONGOEXPORT_PASSWORD=*****
or in python keyring:
$ keyring set mongoexport use... | apache-2.0 | 3,746,758,413,521,380,000 | 28.568093 | 86 | 0.600342 | false |
ronaldoussoren/macholib | macholib/mach_o.py | 1 | 46738 | """
Other than changing the load commands in such a way that they do not
contain the load command itself, this is largely a by-hand conversion
of the C headers. Hopefully everything in here should be at least as
obvious as the C headers, and you should be using the C headers as a real
reference because the documentati... | mit | -2,584,373,802,201,344,000 | 27.56846 | 87 | 0.60178 | false |
adam-p/danforth-east | tasks.py | 1 | 12184 | # -*- coding: utf-8 -*-
#
# Copyright Adam Pritchard 2020
# MIT License : https://adampritchard.mit-license.org/
#
"""
Flask routes used by tasks queues and cron jobs
"""
import logging
import flask
from google.cloud import ndb
import config
import gapps
import emailer
import main
tasks = flask.Blueprint('tasks',... | mit | 3,668,100,720,192,087,000 | 35.370149 | 131 | 0.636655 | false |
kasbah/slim_looper | src/gui/rdfdict/namespaces.py | 1 | 3494 | #!/usr/bin/env python
# Copyright 2014 Kaspar Emanuel <kaspar.emanuel@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THIS SOFTWARE IS... | gpl-3.0 | -4,170,733,738,288,910,000 | 57.233333 | 95 | 0.641099 | false |
vlegoff/tsunami | src/primaires/perso/commandes/raedit/__init__.py | 1 | 2488 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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
... | bsd-3-clause | 6,132,993,815,882,985,000 | 44.127273 | 79 | 0.721998 | false |
stackmachine/bearweb | bearweb/urls/site.py | 1 | 1692 | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from games.views import download, IdenticonDetail
from core.views import ContactV... | mit | 8,222,612,598,508,858,000 | 35.782609 | 78 | 0.636525 | false |
sjthespian/ZenPacks.community.FlexLM | ZenPacks/community/FlexLM/modeler/plugins/community/cmd/FlexLM.py | 1 | 4273 | # Module-level documentation will automatically be shown as additional
# information for the modeler plugin in the web interface.
"""
FlexLM
An flexLM plugin that collects licenses under FlexLM control
"""
# When configuring modeler plugins for a device or device class, this plugin's
# name would be community.cmd.Flex... | gpl-2.0 | -3,921,368,739,322,689,500 | 40.485437 | 173 | 0.659958 | false |
nstockton/mapperproxy-mume | tests/mapper/test_mudevents.py | 1 | 1842 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Future Modules:
from __future__ import annotations
# Built-in Modules:
import socket
from unittest import TestCase
f... | mpl-2.0 | 5,960,192,641,944,425,000 | 29.196721 | 95 | 0.741042 | false |
Svolcano/python_exercise | dianhua/worker/crawler/china_mobile/wap/zhejiang/main.py | 1 | 27693 | # -*- coding:utf-8 -*-
import sys
import re
import time
import random
import base64
from lxml import etree
from dateutil.relativedelta import relativedelta
reload(sys)
sys.setdefaultencoding('utf8')
import datetime
import traceback
if __name__ == '__main__':
sys.path.append('..')
sys.p... | mit | -4,666,179,527,746,855,000 | 37.556369 | 191 | 0.473035 | false |
ianyfan/alevel | build.py | 1 | 5117 | #!venv/bin/python
import os
import markdown
md = markdown.Markdown(output_format='html5',
extensions=['markdown.extensions.tables', 'markdown.extensions.nl2br'])
def make_nav(node):
if 'href' in node:
indent = ' '*(2*len(node['href']) + 6)
if 'children' in node:
children = '\n'.join(map(l... | mit | -7,544,063,696,612,175,000 | 33.574324 | 160 | 0.465507 | false |
saketkc/moca-scripts | encode_images.py | 1 | 10888 | from __future__ import division
import os
from pymongo import MongoClient
import numpy as np
from moca.helpers import read_memefile, get_total_sequences
from moca.helpers.db import create_binary_pickle, encode_image#, unpickle_numpy_array
from moca.helpers import get_max_occuring_bases, search_files
#from moca.helpers ... | isc | 1,487,184,823,585,802,200 | 57.854054 | 117 | 0.52342 | false |
tonygalmiche/is_plastigray | is_reach.py | 1 | 16005 | # -*- coding: utf-8 -*-
from openerp import models,fields,api,SUPERUSER_ID
from openerp.tools.translate import _
from openerp.exceptions import Warning
import datetime
import logging
_logger = logging.getLogger(__name__)
class is_reach(models.Model):
_name='is.reach'
_order='name desc'
name = fi... | mit | 7,814,359,526,069,614,000 | 42.947658 | 128 | 0.476964 | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subTLVs/subTLVs_/prefix_sid/__init__.py | 1 | 15078 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | -7,184,822,684,662,738,000 | 37.172152 | 517 | 0.552461 | false |
noplay/gns3-gui | setup.py | 1 | 2642 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 GNS3 Technologies 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 later version.
... | gpl-3.0 | 5,308,925,384,489,474,000 | 33.311688 | 75 | 0.636639 | false |
srio/Orange-XOPPY | orangecontrib/xoppy/util/xoppy_undulators.py | 1 | 20777 | # --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import numpy
import os
from collections import OrderedDict
from orangecontrib.xoppy.util import srundplug
from orangecontrib.xo... | bsd-2-clause | 8,465,278,814,384,543,000 | 44.966814 | 157 | 0.58892 | false |
anhaidgroup/py_stringsimjoin | py_stringsimjoin/join/overlap_coefficient_join_py.py | 1 | 17453 | # overlap coefficient join
from joblib import delayed, Parallel
from six import iteritems
import pandas as pd
import pyprind
from py_stringsimjoin.filter.overlap_filter import OverlapFilter
from py_stringsimjoin.index.inverted_index import InvertedIndex
from py_stringsimjoin.utils.generic_helper import convert_datafra... | bsd-3-clause | 102,006,608,460,075,310 | 51.569277 | 127 | 0.518134 | false |
hemberger/MechanicalSoup | tests/utils.py | 1 | 3376 | import mechanicalsoup
import requests_mock
from distutils.version import StrictVersion
import bs4
try:
from urllib.parse import parse_qsl
except ImportError:
from urlparse import parse_qsl
"""
Utilities for testing MechanicalSoup.
"""
choose_submit_form = '''
<html>
<body>
<!-- vaguely based on Trac edi... | mit | -6,715,178,474,680,914,000 | 32.098039 | 78 | 0.641884 | false |
yifeng-li/DECRES | cA.py | 1 | 13116 | """
A module of contractive autoencoder modified
from the Deep Learning Tutorials (www.deeplearning.net/tutorial/).
Copyright (c) 2008-2013, Theano Development Team All rights reserved.
Modified by Yifeng Li
CMMT, UBC, Vancouver
Sep 23, 2014
Contact: yifeng.li.cn@gmail.com
"""
from __future__ import division
import ... | bsd-3-clause | 3,418,660,605,187,341,300 | 42.72 | 155 | 0.618786 | false |
google/nsscache | nss_cache/caches/files_test.py | 1 | 10874 | # Copyright 2007 Google 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the ho... | gpl-2.0 | -6,607,135,317,482,214,000 | 38.256318 | 79 | 0.62369 | false |
ChileanVirtualObservatory/flask_endpoint | endpoint/app/__init__.py | 1 | 2299 | #This file is part of ChiVO, the Chilean Virtual Observatory
#A project sponsored by FONDEF (D11I1060)
#Copyright (C) 2015 Universidad Tecnica Federico Santa Maria Mauricio Solar
# Marcelo Mendoza
# Universidad de Chile Die... | gpl-3.0 | -656,813,622,121,283,500 | 34.921875 | 81 | 0.715094 | false |
PaddlePaddle/Paddle | python/paddle/jit/dy2static/convert_operators.py | 1 | 2230 | # Copyright (c) 2020 PaddlePaddle 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 app... | apache-2.0 | -7,350,643,029,132,838,000 | 66.575758 | 103 | 0.773991 | false |
Tomsod/gemrb | gemrb/GUIScripts/GUISAVE.py | 1 | 10200 | # -*-python-*-
# GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# 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 2
# of the License, or (at your option) ... | gpl-2.0 | 8,875,290,173,057,791,000 | 28.142857 | 120 | 0.72098 | false |
duyuan11/glumpy | glumpy/geometry/arc.py | 4 | 6332 | # ----------------------------------------------------------------------------
# Anti-Grain Geometry (AGG) - Version 2.5
# A high quality rendering engine for C++
# Copyright (C) 2002-2006 Maxim Shemanarev
# Contact: mcseem@antigrain.com
# mcseemagg@yahoo.com
# http://antigrain.com
#
# AGG is... | bsd-3-clause | 1,184,211,180,139,694,800 | 32.326316 | 79 | 0.554643 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py | 1 | 8943 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 4,455,762,540,214,366,000 | 49.241573 | 228 | 0.659958 | false |
numairmansur/RoBO | examples/example_bagged_nets.py | 1 | 1284 | import sys
import logging
import numpy as np
import matplotlib.pyplot as plt
import robo.models.neural_network as robo_net
import robo.models.bagged_networks as bn
from robo.initial_design.init_random_uniform import init_random_uniform
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
def f(x):
return... | bsd-3-clause | -7,428,407,319,746,540,000 | 27.533333 | 118 | 0.632399 | false |
ebukoz/thrive | erpnext/accounts/doctype/budget/budget.py | 1 | 13426 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, getdate, add_months, get_last_day, fmt_money, nowdate
from frappe.mode... | gpl-3.0 | 287,245,431,636,735,200 | 39.932927 | 119 | 0.710338 | false |
TheWeiTheTruthAndTheLight/senior-design | src/get_tweets.py | 1 | 5213 | """
get_tweets.py
usage: get_tweets.py [-h] [--sarcastic_path SARCASTIC_PATH]
[--non_sarcastic_path NON_SARCASTIC_PATH]
[--log_path LOG_PATH]
Query twitter API for tweets over last 7 days
optional arguments:
-h, --help show this help message and exit
--sarcast... | mit | 7,683,003,271,177,713,000 | 42.082645 | 148 | 0.61807 | false |
gfairchild/pyHarmonySearch | pyharmonysearch/harmony_search.py | 1 | 13648 | """
Copyright (c) 2013, Triad National Security, LLC
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 lis... | bsd-3-clause | -769,342,194,975,787,300 | 53.592 | 189 | 0.654015 | false |
vlegoff/tsunami | src/primaires/connex/contextes/connexion/confirmer_pass.py | 1 | 1972 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 DAVY Guillaume
# 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
#... | bsd-3-clause | -1,355,478,154,387,710,700 | 49.564103 | 79 | 0.763692 | false |
Labonneguigue/Machine-Learning | Machine Learning Data Repository /Facebook_metrics/hw1_regression.py | 1 | 1970 | import csv
import sys
import numpy
from numpy import genfromtxt
from numpy.linalg import inv
numpy.set_printoptions(threshold=numpy.nan)
Lambda = float(sys.argv[1])
Sigma2 = float(sys.argv[2])
print("Lambda = ")
print(Lambda)
print("Sigma2 = ")
print(Sigma2)
X_train = genfromtxt('X_train.csv', delimiter=',')
print(... | mit | 3,158,200,066,098,003,000 | 23.02439 | 95 | 0.718782 | false |
nickabattista/IB2d | pyIB2d/Examples/Rayleigh_Taylor_Instability/please_Compute_External_Forcing.py | 1 | 6723 | #-------------------------------------------------------------------------------------------------------------------#
#
# IB2d is an Immersed Boundary Code (IB) for solving fully coupled non-linear
# fluid-structure interaction models. This version of the code is based off of
# Peskin's Immersed Boundary Method Paper... | gpl-3.0 | 4,047,843,990,817,786,400 | 28.752212 | 120 | 0.501264 | false |
swprojects/Serial-Sequence-Creator | serialfunctions.py | 1 | 1796 |
import logging
import serial
import sys
import time
import serial.tools.list_ports
#------------------------------------------------#
# serial connection functions
#------------------------------------------------#
def OpenSerial(port, baudrate, bytesize, stopbits, parity, flowcontrol, timeout):
# configure th... | mit | 518,038,412,185,088,100 | 24.671429 | 99 | 0.550668 | false |
runt18/mojo | mojo/devtools/common/android_stack_parser/symbol.py | 1 | 17737 | # Copyright (C) 2013 The Android Open Source Project
#
# 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 ... | bsd-3-clause | 6,496,259,129,740,246,000 | 30.50444 | 82 | 0.66973 | false |
supermurat/hamsi-manager | SpecialTools/CharacterEncoding.py | 1 | 4773 | # This file is part of HamsiManager.
#
# Copyright (c) 2010 - 2015 Murat Demir <mopened@gmail.com>
#
# Hamsi Manager 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 2 of the License, or
# (at yo... | gpl-3.0 | -860,980,650,611,901,700 | 44.028302 | 115 | 0.649696 | false |
apaloczy/ap_tools | utils.py | 1 | 54151 | # Description: General-purpose functions for personal use.
# Author: André Palóczy
# E-mail: paloczy@gmail.com
__all__ = ['seasonal_avg',
'seasonal_std',
'deseason',
'blkavg',
'blkavgdir',
'blkavgt',
'blkapply',
'stripmsk',
... | mit | 7,885,736,604,063,761,000 | 30.255774 | 167 | 0.604821 | false |
ralstonJ/Angelhack-Rumble | scripts/TwitterStreamTutorial.py | 1 | 1032 | #!/usr/bin/env python
import tweepy
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
import time
ckey = 'CiQGfooRBKJRSrtaGl7GkQ'
csecret = 'G2o2pVeFaYlZdZAQL6NxkE3x7iW0U7kfoUKBTaOg'
atoken = '741285805-38CJ8saoV8UJx46L38bFiZMOSocC2XhtubOsot9x'
asecret = 'sNJUHNg4Gz... | apache-2.0 | -2,584,913,198,241,240,600 | 26.157895 | 66 | 0.676357 | false |
nevermoreluo/sakura | sakura/buffer_reader.py | 1 | 1837 | import struct
class BufferReader():
def __init__(self, buf, endian='<'):
self._buffer = buf
self._length = len(buf)
self._endian = endian
self._offset = 0
self._error = False
@property
def error(self):
return self._error
def set_endian(... | gpl-3.0 | 896,517,828,458,708,500 | 22.851351 | 81 | 0.507349 | false |
townbull/keystone-dtrust | keystone/tests/test_auth.py | 1 | 37040 | # Copyright 2012 OpenStack Foundation
#
# 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 in... | apache-2.0 | -2,652,902,829,037,487,600 | 40.385475 | 79 | 0.578024 | false |
machtfit/django-database-email-backend | database_email_backend/admin.py | 1 | 5607 | #-*- coding: utf-8 -*-
from django.http import HttpResponseRedirect
from django.contrib import admin
from django import forms
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.core.mail import message
from django.db.models import Count
from functools import update_wrapper
fro... | mit | 2,205,017,277,987,033,600 | 33.826087 | 111 | 0.601034 | false |
Azure/azure-sdk-for-python | sdk/identity/azure-identity/azure/identity/_credentials/cloud_shell.py | 1 | 2005 | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import functools
import os
from typing import TYPE_CHECKING
from azure.core.pipeline.transport import HttpRequest
from .. import CredentialUnavailableError
from .._con... | mit | 8,458,720,174,471,907,000 | 34.803571 | 93 | 0.625436 | false |
ceph/autotest | client/tests/kvm/tests/virtio_console.py | 1 | 49379 | """
virtio_console test
@copyright: 2010 Red Hat, Inc.
"""
import array, logging, os, random, re, select, shutil, socket, sys, tempfile
import threading, time, traceback
from collections import deque
from threading import Thread
from autotest_lib.client.common_lib import error
from autotest_lib.client.bin import util... | gpl-2.0 | 1,024,693,506,317,516,900 | 36.323507 | 92 | 0.494259 | false |
kespindler/puffin | tests/test_puffin.py | 1 | 2287 | from puf import cli
from tests import StreamCaptureTest
import re
from tempfile import NamedTemporaryFile
class TestMain(StreamCaptureTest):
def test_main(self):
cli.main(['range(3)'])
self.assertWasStreamed('0\n1\n2\n')
def test_main_initial(self):
self.assertRaises(NameError, cli.ma... | mit | 4,869,518,767,320,799,000 | 30.763889 | 78 | 0.555313 | false |
waltaskew/tweet-cereal | tweet_cereal/app.py | 1 | 1799 | """Define an app for processing requests to LaTeX up tweets."""
import base64
import os
import flask
import flask_socketio
import eventlet
import redis
import tweet_cereal.tasks as tasks
import tweet_cereal.tweets as tweets
JOB_RESULT_POLL_INTERVAL = 1
app = flask.Flask(__name__)
socketio = flask_socketio.SocketIO... | bsd-3-clause | -4,704,310,292,591,530,000 | 29.491525 | 77 | 0.676487 | false |
mrcrilly/vs-vlan-db | vsvlandb/forms/vlan.py | 1 | 1069 | from vsvlandb.models import Site, Subnet, Impact
from flask.ext.wtf import Form
from wtforms import TextField, SelectField, BooleanField, IntegerField
from wtforms.validators import DataRequired, NumberRange, Optional, Length
from wtforms.ext.sqlalchemy.fields import QuerySelectMultipleField, QuerySelectField
def a... | mit | 3,781,316,050,793,028,000 | 32.40625 | 90 | 0.76333 | false |
spurin/xmldataset | examples/example6.py | 1 | 2665 | import xmldataset
import pprint
# Setup Pretty Printing
ppsetup = pprint.PrettyPrinter(indent=4)
pp = ppsetup.pprint
xml = """<?xml version="1.0"?>
<catalog>
<shop number="1">
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<... | bsd-3-clause | 4,255,772,175,311,198,000 | 37.623188 | 164 | 0.612758 | false |
linuxyan/opsmanage | app/auth/views.py | 1 | 1754 | #coding=utf-8
from flask import render_template, redirect, request, url_for, flash,abort
from . import auth
from ..models import users
from .. import db
from .forms import LoginForm,UserEditForm
from flask.ext.login import login_user, logout_user,current_user
from flask.ext.login import login_required
@auth.r... | apache-2.0 | -5,257,831,739,415,127,000 | 36.755556 | 94 | 0.632606 | false |
pjdelport/HTTPretty | tests/functional/test_urllib2.py | 1 | 7926 | # #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal ... | mit | 1,222,219,063,076,765,400 | 32.867521 | 78 | 0.629527 | false |
ywang-bom/wismon | wismon/wismon.py | 1 | 20145 | """
WMO WIS monitoring tool for OpenWIS.
All datetime values must conform to ISO 8601.
date - YYYY-MM-DD
datetime - YYYY-MM-DDThh:mm:ssZ
"""
import os
import sys
import time
from datetime import datetime
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
import urllib2
import json
import log... | gpl-3.0 | 629,759,576,338,308,900 | 40.96875 | 109 | 0.605808 | false |
mozilla/ichnaea | ichnaea/models/tests/test_observation.py | 1 | 22477 | import json
from ichnaea.conftest import GB_LAT, GB_LON, GB_MCC
from ichnaea.models import (
BlueObservation,
BlueReport,
CellObservation,
CellReport,
constants,
Radio,
Report,
ReportSource,
WifiObservation,
WifiReport,
)
from ichnaea.tests.factories import (
BlueObservation... | apache-2.0 | -9,173,250,571,382,194,000 | 36.461667 | 88 | 0.588958 | false |
kif/freesas | e2etest/e2etest_bift.py | 1 | 10320 | """End to end tests for auto_gpa.py """
__authors__ = ["Martha Brennich"]
__license__ = "MIT"
__date__ = "27/12/2020"
import unittest
import pathlib
import logging
from platform import system
from subprocess import run, PIPE, STDOUT
from os import linesep
from os.path import normpath
import codecs
import parse
from n... | mit | 4,057,080,431,987,493,000 | 31.455696 | 198 | 0.530031 | false |
shakamunyi/sahara | sahara/tests/unit/plugins/spark/test_plugin.py | 1 | 8592 | # Copyright (c) 2013 Mirantis Inc.
#
# 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 in writ... | apache-2.0 | 3,557,837,620,523,994,000 | 36.356522 | 77 | 0.598231 | false |
quinox/weblate | weblate/trans/models/subproject.py | 1 | 51530 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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, eithe... | gpl-3.0 | -6,221,192,354,696,558,000 | 31.694797 | 79 | 0.555612 | false |
zseder/hunmisc | hunmisc/utils/plotting/matplotlib_simple_xy.py | 1 | 1535 | """
Copyright 2011-13 Attila Zseder
Email: zseder@gmail.com
This file is part of hunmisc project
url: https://github.com/zseder/hunmisc
hunmisc is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versi... | gpl-3.0 | 1,005,301,798,700,517,100 | 29.098039 | 78 | 0.673616 | false |
yugangw-msft/azure-cli | src/azure-cli/azure/cli/command_modules/backup/custom_common.py | 2 | 10039 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -6,428,039,126,008,457,000 | 46.804762 | 114 | 0.665604 | false |
revarbat/snappy-reprap | stl_normalize.py | 1 | 15920 | #!/usr/bin/env python
import os
import os.path
import sys
import math
import time
import struct
import argparse
import platform
import itertools
import subprocess
guiscad_template = """\
module showlines(clr, lines) {{
for (line = lines) {{
delta = line[1]-line[0];
dist = norm(delta);
the... | gpl-2.0 | 5,155,096,900,616,418,000 | 30.277014 | 79 | 0.501382 | false |
olivierdalang/stdm | ui/ui_survey.py | 1 | 4260 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_survey.ui'
#
# Created: Wed Apr 29 17:42:49 2015
# by: PyQt4 UI code generator 4.11.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8... | gpl-2.0 | -4,788,625,040,332,973,000 | 48.117647 | 121 | 0.676995 | false |
qedsoftware/commcare-hq | corehq/apps/users/tests/test_get_owner_ids.py | 1 | 1346 | from django.test import TestCase
from corehq.apps.domain.models import Domain
from corehq.apps.groups.models import Group
from corehq.apps.users.models import CommCareUser
class OwnerIDTestCase(TestCase):
@staticmethod
def _mock_user(id):
class FakeUser(CommCareUser):
@property
... | bsd-3-clause | 808,569,801,345,940,600 | 31.829268 | 86 | 0.618128 | false |
sffjunkie/home-assistant | homeassistant/components/media_player/__init__.py | 1 | 19925 | """
Component to interface with various media players.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/media_player/
"""
import logging
import os
import voluptuous as vol
from homeassistant.components import discovery
from homeassistant.config import l... | mit | 7,915,092,304,396,361,000 | 29.939441 | 79 | 0.647428 | false |
devurandom/portage | pym/_emerge/PollScheduler.py | 1 | 7723 | # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import gzip
import errno
try:
import threading
except ImportError:
import dummy_threading as threading
from portage import _encodings
from portage import _unicode_encode
from portage.util import writemsg_leve... | gpl-2.0 | -1,054,756,073,076,287,900 | 29.525692 | 71 | 0.704519 | false |
typesupply/defcon | documentation/source/conf.py | 1 | 6011 | # -*- coding: utf-8 -*-
#
# defcon documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 11 12:32:49 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | mit | -2,972,578,160,911,436,000 | 30.636842 | 82 | 0.720845 | false |
churchlab/millstone | genome_designer/pipeline/read_alignment_util.py | 1 | 5281 | """
Methods related to aligning reads.
This module was created because of a circular import issue with celery.
...
File "/home/glebk/Projects/churchlab/genome-designer-v2/genome_designer/pipeline/read_alignment.py", line 9, in <module>
from main.models import clean_filesystem_location
File "/home/glebk/Proje... | mit | 946,334,179,424,611,500 | 33.97351 | 122 | 0.642492 | false |
klahnakoski/MySQL-to-S3 | vendor/jx_python/__init__.py | 1 | 3013 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import unicode_literals
from c... | mpl-2.0 | -4,624,035,901,889,225,000 | 27.971154 | 125 | 0.626286 | false |
fivejjs/crosscat | crosscat/cython_code/test_pred_prob_and_density.py | 1 | 3579 | #
# Copyright (c) 2010-2014, MIT Probabilistic Computing Project
#
# Lead Developers: Dan Lovell and Jay Baxter
# Authors: Dan Lovell, Baxter Eaves, Jay Baxter, Vikash Mansinghka
# Research Leads: Vikash Mansinghka, Patrick Shafto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may... | apache-2.0 | -3,748,562,983,256,348,000 | 30.394737 | 103 | 0.714445 | false |
acercado/jd-ph-cms | jd-ph-cms/notifications/migrations/0001_initial.py | 1 | 2228 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-04 05:22
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | bsd-3-clause | 2,311,233,370,199,739,400 | 38.785714 | 169 | 0.581688 | false |
cylc/cylc | cylc/flow/task_pool.py | 1 | 59064 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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,... | gpl-3.0 | -4,525,893,904,254,624,000 | 39.733793 | 79 | 0.552993 | false |
sadmansk/servo | tests/wpt/web-platform-tests/tools/wpt/install.py | 1 | 3192 | import argparse
import browser
import sys
latest_channels = {
'firefox': 'nightly',
'chrome': 'dev',
'safari': 'preview',
'safari_webdriver': 'preview',
'servo': 'nightly'
}
channel_by_name = {
'stable': 'stable',
'release': 'stable',
'beta': 'beta',
'nightly': latest_channels,
... | mpl-2.0 | 281,753,135,392,213,300 | 35.689655 | 105 | 0.602757 | false |
its-dirg/saml-metadata-upload | src/metadata_upload/service.py | 1 | 1421 | import os
import random
import string
from flask_transfer.transfer import Transfer
from flask_transfer.validators import AllowedExts
from flask_wtf.file import FileField
from flask_wtf.file import FileRequired, FileAllowed
from flask_wtf.form import Form
from werkzeug.utils import secure_filename
from wtforms.fields.s... | apache-2.0 | -3,014,370,430,212,958,000 | 33.658537 | 95 | 0.681914 | false |
carltongibson/django-staticsite | staticsite/management/commands/buildstaticsite.py | 1 | 3354 | # -*- coding: utf-8 -*-
import os
import codecs
from itertools import chain
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.template import Template
from django.template.loader import get_template
from django.test import RequestFactory
from staticsite.vie... | bsd-2-clause | 7,664,765,751,399,810,000 | 38.904762 | 106 | 0.568616 | false |
oriel-hub/api | django/idsapi/openapi/permissions.py | 1 | 1176 | from rest_framework.throttling import UserRateThrottle
from rest_framework.exceptions import PermissionDenied
from django.conf import settings
from django.contrib.sites.models import Site
class PerUserThrottlingRatePerGroup(UserRateThrottle):
def allow_request(self, request, view):
"""
Implement ... | gpl-2.0 | -4,485,740,001,450,202,600 | 38.2 | 100 | 0.651361 | false |
Hwesta/advent-of-code | aoc2016/day5.py | 1 | 4067 | #!/usr/bin/env python
"""
--- Day 5: How About a Nice Game of Chess? ---
You are faced with a security door designed by Easter Bunny engineers that seem to have acquired most of their security knowledge by watching hacking movies.
The eight-character password for the door is generated one character at a time by findi... | mit | -2,213,071,398,755,253,800 | 45.215909 | 319 | 0.695107 | false |
dims/neutron | neutron/tests/unit/scheduler/test_l3_agent_scheduler.py | 1 | 76578 | # Copyright (c) 2013 OpenStack Foundation
# 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 ... | apache-2.0 | -2,183,191,022,081,990,100 | 42.118243 | 79 | 0.558202 | false |
pmeier82/django-spikeval | djspikeval/forms/datafile.py | 1 | 2926 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.apps import apps
from .util import form_with_captcha
__all__ = ["DatafileForm"]
__author__ = "pmeier82"
Asset = apps.get_registered_model("base", "asset")
Datafile = apps.get_registered_model("djspikeval", "datafile"... | bsd-3-clause | -8,451,139,807,943,812,000 | 32.25 | 73 | 0.546822 | false |
abourget/formalchemy-abourget | formalchemy/tests/test_multiple_keys.py | 1 | 3071 | # -*- coding: utf-8 -*-
from formalchemy.tests import *
def test_renderer_names():
"""
Check that the input name take care of multiple primary keys::
>>> fs = FieldSet(primary1)
>>> print fs.field.render()
<input id="PrimaryKeys-1_22-field" maxlength="10" name="PrimaryKeys-1_22-field" ... | mit | 7,984,146,956,180,403,000 | 29.405941 | 118 | 0.547704 | false |
smartstudy/project_cron | main.py | 1 | 2804 | import json
import os
from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, NSVariableStatusItemLength, NSImage
from PyObjCTools import AppHelper
from project_cron.models import Schedule
from threading import Timer
from project_cron.utils import logutil
class App(NSApplication):
def finishLaunching(... | mit | -2,770,964,706,049,844,700 | 34.05 | 109 | 0.622325 | false |
bsmr-misc-forks/letsencrypt | certbot/tests/display/ops_test.py | 1 | 12393 | # coding=utf-8
"""Test certbot.display.ops."""
import os
import sys
import tempfile
import unittest
import mock
import zope.component
from acme import jose
from acme import messages
from certbot import account
from certbot import errors
from certbot import interfaces
from certbot.display import util as display_util... | apache-2.0 | -3,321,504,893,694,046,700 | 36.18018 | 82 | 0.609725 | false |
nttks/edx-platform | biz/djangoapps/ga_achievement/tests/test_views.py | 1 | 201745 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from collections import OrderedDict
from datetime import datetime
from ddt import ddt
import json
from mock import patch
impor... | agpl-3.0 | -2,311,038,217,161,401,000 | 48.562657 | 119 | 0.591504 | false |
ESOedX/edx-platform | common/test/acceptance/tests/lms/test_teams.py | 1 | 84355 | """
Acceptance tests for the teams feature.
"""
from __future__ import absolute_import
import json
import random
import time
from uuid import uuid4
import ddt
from dateutil.parser import parse
from selenium.common.exceptions import TimeoutException
from six.moves import map, range
from common.test.acceptance.fixture... | agpl-3.0 | -7,881,095,357,731,732,000 | 41.560545 | 119 | 0.618576 | false |
purushothamc/myibitsolutions | arrays/fill_range_in_spiral.py | 1 | 1051 | def generateMatrix(A):
n = A
rows, cols = n, n
top, bottom = 0, n - 1
left, right = 0, n - 1
direction = 0
result = [[0 for j in xrange(n)] for i in xrange(n)]
count = 1
while top <= bottom and left <= right:
if direction is 0:
for i in xrange(left, right + 1):
... | gpl-3.0 | 9,140,552,636,594,468,000 | 29.057143 | 56 | 0.432921 | false |
zcbenz/cefode-chromium | native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py | 1 | 25472 | #!/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.
import copy
import datetime
import hashlib
import os
import posixpath
import subprocess
import sys
import tempfile
import unittest
... | bsd-3-clause | 7,287,103,956,500,293,000 | 35.181818 | 79 | 0.696569 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.