repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jphacks/KB_02 | source/execute_background.py | 1 | 1932 | #! /usr/bin/python
# -*- coding: UTF-8 -*-
from __future__ import print_function
import subprocess
import threading
import locale
import sys
import os
locale.setlocale (locale.LC_ALL, '')
class ExecuteBackground (threading.Thread): # threading.Threadを継承
"""
プロセスをバックグラウンドで実行する
Threadクラスの子クラスとして定義(__init__()とr... | mit | -4,282,219,628,612,054,000 | 28.627119 | 119 | 0.538902 | false | 2.908486 | false | false | false |
harisibrahimkv/django | django/conf/locale/sr_Latn/formats.py | 130 | 1944 | # This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_FORMAT = 'F Y.'
MONTH_DAY_FO... | bsd-3-clause | -7,221,901,341,107,972,000 | 44.209302 | 77 | 0.459362 | false | 2.314286 | false | true | false |
juve/corral | tools/package_mapper/PackageMapper.py | 1 | 1641 | import string,cgi
from datetime import datetime
from os import curdir, sep
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from SocketServer import ThreadingMixIn
CONDOR_URL='http://www.cs.wisc.edu/condor/glidein/binaries/'
CORRAL_URL='http://www-rcf.usc.edu/~juve/glidein/'
class PackageMapper(HTTPServe... | apache-2.0 | -7,160,277,234,369,766,000 | 23.132353 | 63 | 0.706886 | false | 3.149712 | false | false | false |
lukauskas/mMass-fork | gui/dlg_error.py | 2 | 4327 | # -------------------------------------------------------------------------
# Copyright (C) 2005-2013 Martin Strohalm <www.mmass.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 Foundat... | gpl-3.0 | -6,518,802,465,695,283,000 | 38.336364 | 310 | 0.583776 | false | 3.792287 | false | false | false |
twoolie/ProjectNarwhal | fabfile.py | 1 | 3536 | from fabric.api import *
from fabric.contrib import files
import platform
from os.path import join
from argparse import ArgumentError
env.hosts = ['your_username@yourhost:yourport']
env.web_path = '/var/www/django'
env.log_root ='/var/log/apache'
env.project = 'example_project'
@task
def dev_serve():
with prefix(... | gpl-3.0 | -6,157,937,750,131,683,000 | 41.095238 | 118 | 0.623303 | false | 3.582573 | false | false | false |
flavour/eden | modules/templates/locations/MM/config.py | 9 | 1031 | # -*- coding: utf-8 -*-
from gluon import current
def config(settings):
"""
Template settings for Myanmar
- designed to be used in a Cascade with an application template
"""
#T = current.T
# Pre-Populate
settings.base.prepopulate.append("locations/MM")
# Uncomment to restric... | mit | 7,511,900,009,144,343,000 | 30.242424 | 79 | 0.639185 | false | 3.950192 | false | false | false |
roscopecoltran/scraper | .staging/meta-engines/xlinkBook/update/update_videolectures.py | 1 | 9204 | #!/usr/bin/env python
from spider import *
import re
sys.path.append("..")
from record import Record
class VideolecturesSpider(Spider):
def __init__(self):
Spider.__init__(self)
self.school = 'videolectures'
self.type_map = {'Lecture ' : 'vl',\
'Tutorial' : 'vtt',... | mit | -8,895,108,662,119,555,000 | 42.415094 | 188 | 0.464146 | false | 3.782984 | false | false | false |
orbnauticus/Pique | pique/common.py | 1 | 3022 | #!/usr/bin/env python
#
# Copyright (c) 2010, Ryan Marquardt
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright notice,
# th... | bsd-3-clause | 1,251,871,808,911,474,200 | 30.154639 | 90 | 0.709795 | false | 3.465596 | false | false | false |
tsifrer/python-twitch-client | tests/api/test_clips.py | 1 | 1364 | import json
import responses
from twitch.client import TwitchClient
from twitch.constants import BASE_URL
from twitch.resources import Clip
example_clip = {
"broadcast_id": "25782478272",
"title": "cold ace",
"tracking_id": "102382269",
"url": "https://clips.twitch.tv/OpenUglySnoodVoteNay?tt_medium=c... | mit | -1,391,993,542,125,280,800 | 23.8 | 93 | 0.647361 | false | 3.194379 | false | false | false |
CERT-W/certitude | utils/ioc-selector.py | 2 | 3439 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import re
import xml.etree.ElementTree as ET
selectors = {'ServiceItem': ['descriptiveName', 'mode', 'path', 'pathmd5sum', 'status', 'name'],
'RegistryItem': ['KeyPath', 'ValueName'],
'FileItem': ['FilePath', 'FullPath', 'Fi... | gpl-2.0 | -8,050,126,690,803,244,000 | 35.2 | 140 | 0.587089 | false | 3.783278 | false | false | false |
xiaojieluo/amazingtool | amazingtool/api/handler/CodeHandler.py | 1 | 5667 | from api.handler.APIHandler import APIHandler
import asyncio
import tornado
import hashlib
import tasks
import api.web
import base64
class index(APIHandler):
def get(self):
pass
encrypt_key = 'api.encrypt.{text}'
decrypt_key = 'api.decrypt.{text}'
class encrypt(APIHandler):
'''
加密 api,请求示例
u... | gpl-2.0 | 4,518,796,194,304,270,000 | 28.625 | 92 | 0.521398 | false | 3.018193 | false | false | false |
eyp-developers/statistics | statistics/views/api/session.py | 1 | 2879 | import json
from decimal import Decimal
from django.http import HttpResponse
from statistics.models import Session, Committee, Point, ContentPoint
def session_api(request, session_id):
# Since the graphs on the session page need to be able to livereload, we need to create
# a custom "API" that outputs the nec... | gpl-3.0 | -2,847,598,486,814,620,000 | 36.38961 | 93 | 0.609239 | false | 3.72445 | false | false | false |
quantumlib/Cirq | cirq-google/cirq_google/devices/xmon_device.py | 1 | 8259 | # Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | -370,696,558,131,876,600 | 37.957547 | 100 | 0.615934 | false | 3.713579 | false | false | false |
kangwonlee/ECA | lab_07_linear_algebra/linear_algebra.py | 1 | 2220 | # -*- coding: utf8 -*-
# 위 주석은 이 .py 파일 안에 한글이 사용되었다는 점을 표시하는 것임
def dot(a, b):
"""
크기가 같은 두 벡터 a, b의 내적 dot product
"""
# 벡터 a 의 크기.
# 벡터 b 의 크기는 같을 것이라고 가정한다
# (어떤 경우 오류가 발생할 수 있겠는가?)
n = len(a)
result = 0.0
for i in xrange(n):
result += a[i] * b[i]
return result
... | apache-2.0 | 2,096,145,424,285,517,800 | 19.222222 | 61 | 0.484016 | false | 2.100735 | false | false | false |
bitsydarel/DebiaTranslator | setup.py | 1 | 1255 | import sys
import os
from cx_Freeze import setup, Executable
os.environ['TCL_LIBRARY'] = r"C:\Users\Sasha\AppData\Local\Programs\Python\Python36-32\tcl\tcl8.6"
os.environ['TK_LIBRARY'] = r"C:\Users\Sasha\AppData\Local\Programs\Python\Python36-32\tcl\tk8.6"
includes = ["tkinter"]
include_files = [r"C:\Use... | gpl-3.0 | 1,380,373,096,521,520,400 | 46.269231 | 98 | 0.6749 | false | 3.098765 | false | false | false |
matokeotz/matokeo-api | app/api/models/school_models.py | 1 | 1204 | from __future__ import unicode_literals
from django.db import models
from datetime import datetime
from django.utils import timezone
from django.db.models import Model, CharField, ForeignKey, IntegerField, DecimalField, BooleanField, DateTimeField
class School(Model):
'''
Stores information on a single sch... | mit | -2,495,854,814,962,971,600 | 30.710526 | 114 | 0.675249 | false | 3.774295 | false | false | false |
hovo1990/deviser | generator/java_utils/insideJSBML_parser.py | 1 | 9517 | #!/usr/bin/env python
#
# @file insideJSBML_parser.py
# @brief JSBML classes parser using javap for GSoC 2016
# @author Hovakim Grabski
#
# <!--------------------------------------------------------------------------
#
# Copyright (c) 2013-2015 by the California Institute of Technology
# (California, USA), the Eu... | lgpl-2.1 | 6,224,505,022,625,598,000 | 33.988971 | 99 | 0.572449 | false | 3.732157 | false | false | false |
calancha/DIRAC | Interfaces/scripts/dirac-wms-get-queue-normalization.py | 15 | 1254 | #!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-wms-get-queue-normalization.py
# Author : Ricardo Graciani
########################################################################
"""
Report Normalization Factor applied by Site to the given... | gpl-3.0 | 5,508,469,330,396,502,000 | 30.35 | 125 | 0.532695 | false | 3.955836 | false | false | false |
sedwards2009/extraterm | extraterm/src/commands/exshow.py | 1 | 4635 | #!/usr/bin/env python3
#
# Copyright 2014-2017 Simon Edwards <simon@simonzone.com>
#
# This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
#
import argparse
import atexit
import base64
import hashlib
import os
import os.path
import sys
import termios
##@inline
from extratermc... | mit | -2,375,877,742,022,258,000 | 38.956897 | 182 | 0.66904 | false | 3.901515 | false | false | false |
Ecpy/i3py | i3py/core/job.py | 1 | 3540 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2018 by I3py Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ---------------------... | bsd-3-clause | 6,820,111,772,755,745,000 | 33.038462 | 79 | 0.546893 | false | 5.275708 | false | false | false |
RuiShu/Neural-Net-Bayesian-Optimization | sequential/seq_optimizer.py | 1 | 2795 | """
@Author: Rui Shu
@Date: 4/21/15
Performs sequential optimization.
"""
import time
from learning_objective.hidden_function import evaluate, true_evaluate, get_settings
import matplotlib.pyplot as plt
import utilities.optimizer as op
import numpy as np
# Open file to write times for comparison
file_record = open("... | mit | 5,814,549,672,598,117,000 | 31.5 | 100 | 0.671556 | false | 3.537975 | false | false | false |
prk327/CoAca | Algo - DataStru/linkedlist.py | 1 | 4314 |
#linked lists can have several nodes (these nodes contain the data)
class Node(object):
def __init__(self, data):
#this is where we store the data
self.data = data;
#this is a reference to the next node in the linked list
self.next_node = None;
#implementation of the linked list data structure
... | gpl-3.0 | -5,367,774,084,519,510,000 | 28.828571 | 90 | 0.66713 | false | 3.158126 | false | false | false |
g0v/animal.coa | 基隆市/crawler.py | 1 | 8216 | # -*- coding: utf-8 -*-
import os
import csv
import shutil
import re
import sqlite3
import collections
from urlparse import urlparse, urljoin, parse_qs
from datetime import date
from bs4 import BeautifulSoup
import requests
html_path = "htmls"
image_url = "http://www.klaphio.gov.tw/uploadfiles/cd/"
base_url = "http:/... | cc0-1.0 | -2,973,393,827,288,971,000 | 33.118143 | 180 | 0.533886 | false | 3.327572 | false | false | false |
dscorbett/pygments | tests/test_python.py | 1 | 32596 | # -*- coding: utf-8 -*-
"""
Python Tests
~~~~~~~~~~~~
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import pytest
from pygments.lexers import PythonLexer, Python3Lexer
from pygments.token import Token
import re
@pytest.fixture(scope=... | bsd-2-clause | 6,313,952,533,965,913,000 | 37.712589 | 114 | 0.421708 | false | 4.008362 | true | false | false |
bayazee/flask-mosession | flask_mosession/__init__.py | 1 | 9217 | # -*- coding: utf-8 -*-
"""
flask_mosession
~~~~~~~~~~~~~~~~~~
Alternative for Flask session module that uses MongoDB as main storage
:copyright: (c) 2013 by Bayazee & Rokooie.
:license: BSD, see LICENSE for more details.
"""
from bson import Binary
from uuid import uuid4
from flask import curre... | bsd-3-clause | 4,458,105,034,843,652,600 | 31.114983 | 130 | 0.626777 | false | 4.452657 | true | false | false |
fquinto/NoConName2015_IoT | source_code/mosquitto_iot.py | 1 | 4956 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author Version Date Comments
# FQuinto 1.0.0 2015-Nov First version fron NoConName 2015 event
# Do test
# Copyright (C) 2015 Fran Quinto
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | -8,526,168,807,758,195,000 | 30.775641 | 79 | 0.694108 | false | 2.748752 | false | false | false |
teracyhq/flask-classy | test_classful_py3/test_type_hints.py | 2 | 1623 | from uuid import UUID
from flask import Flask
from flask_classful import FlaskView, route
from nose.tools import eq_
# python3 only
class TypingView(FlaskView):
def index(self):
return "Index"
@route('/<id>', methods=['POST'])
def post(self, id: str) -> str:
return "Post"
def patch... | bsd-3-clause | 1,053,648,999,224,750,200 | 22.867647 | 71 | 0.588417 | false | 3.182353 | false | false | false |
b1-systems/kiwi | test/unit/test_helper.py | 2 | 1543 | from functools import wraps
import kiwi.logger
import sys
import logging
from io import BytesIO
from mock import MagicMock, patch
# default log level, overwrite when needed
kiwi.logger.log.setLevel(logging.WARN)
# default commandline used for any test, overwrite when needed
sys.argv = [
sys.argv[0], 'system', 'p... | gpl-3.0 | -6,462,874,671,621,616,000 | 23.109375 | 70 | 0.593001 | false | 3.976804 | false | false | false |
mcheo/ansible_f5 | library/iworkflow_local_connector.py | 4 | 7897 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# 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
# ... | apache-2.0 | -4,420,233,054,871,470,600 | 27.003546 | 82 | 0.593263 | false | 4.196068 | false | false | false |
grow/grow-ext-build-server | grow_build_server/emailer.py | 1 | 1438 | from google.appengine.ext import vendor
vendor.add('extensions')
from google.appengine.api import mail
import jinja2
import os
import premailer
_appid = os.getenv('APPLICATION_ID').replace('s~', '')
EMAIL_SENDER = 'noreply@{}.appspotmail.com'.format(_appid)
class Emailer(object):
def __init__(self, sender=Non... | mit | -8,182,801,995,076,380,000 | 28.346939 | 72 | 0.614743 | false | 3.814324 | false | false | false |
abe-winter/pg13-py | pg13/table.py | 1 | 6026 | "table -- Table class"
import collections
from . import pg, threevl, sqparse2, sqex
# errors
class PgExecError(sqparse2.PgMockError):
"base class for errors during table execution"
class BadFieldName(PgExecError):
pass
class IntegrityError(PgExecError):
pass # careful: pgmock_dbapi also defines this
class Miss... | mit | -8,536,767,672,996,889,000 | 42.352518 | 147 | 0.688848 | false | 3.42581 | false | false | false |
Jozhogg/iris | lib/iris/tests/unit/merge/test__CubeSignature.py | 1 | 4270 | # (C) British Crown Copyright 2014, Met Office
#
# This file is part of Iris.
#
# Iris 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 version 3 of the License, or
# (at your option) any later ve... | lgpl-3.0 | -3,409,901,609,769,241,000 | 42.131313 | 74 | 0.660422 | false | 3.440774 | true | false | false |
mostateresnet/exdbproject | exdb/urls.py | 1 | 2285 | """exdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | mit | -2,978,080,121,025,919,000 | 60.756757 | 132 | 0.691028 | false | 3.297258 | false | false | false |
JhoanLT/Mascotas | refugio/refugio/urls.py | 1 | 2138 | """refugio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | gpl-3.0 | -4,769,158,905,202,402,000 | 56.783784 | 149 | 0.703929 | false | 3.465154 | false | false | false |
benbenbenbenbenbenbenbenben/mitsingen | mitsingen/settings.py | 1 | 3574 | """
Django settings for mitsingen project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | agpl-3.0 | 8,544,258,707,033,894,000 | 25.671642 | 91 | 0.688025 | false | 3.490234 | false | false | false |
liqd/a4-meinberlin | meinberlin/apps/dashboard/__init__.py | 1 | 2358 | from adhocracy4.dashboard import ProjectDashboard
from adhocracy4.dashboard import components
default_app_config = 'meinberlin.apps.dashboard.apps.Config'
class TypedProjectDashboard(ProjectDashboard):
def __init__(self, project):
if project.project_type == 'meinberlin_bplan.Bplan':
project =... | agpl-3.0 | -3,359,733,828,596,905,000 | 43.490566 | 78 | 0.611535 | false | 4.632613 | false | false | false |
thejeshgn/dondeestas | main/settings.py | 1 | 5012 | """
Django settings for dondeestas project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Parse database configuration from $DATABASE_URL
import dj_database_url... | gpl-3.0 | 2,988,904,299,523,692,500 | 26.091892 | 175 | 0.651636 | false | 2.924154 | false | false | false |
johnnovak/twyg | doc/figures/nodes-rect-roundingStyle.py | 1 | 1345 | import os, sys
from fig import *
config1 = r"""
[layout]
style layout
[node]
style rect
fontName $FONTNAME
fontSize $FONTSIZE
textBaselineCorrection $BASELINE_CORR
strokeWidth 3
roundingStyle screen
... | mit | 1,346,015,149,236,001,500 | 19.074627 | 44 | 0.463197 | false | 4.22956 | false | true | false |
Dangetsu/vnr | Frameworks/Sakura/py/apps/reader/qml/qmlrc.py | 1 | 7710 | # coding: utf8
# rc.py
# 10/8/2012 jichi
# Runtime resource locations
#
# All paths are using ascii encoding.
# Assume there are no unicode characters in the relative path.
from PySide.QtCore import Qt, QUrl
from PySide.QtGui import QImage, QPixmap, QIcon
from Qt5.QtQuick1 import QDeclarativeImageProvider
from sakurak... | gpl-3.0 | 9,057,902,787,735,632,000 | 33.115044 | 131 | 0.657847 | false | 3.265565 | false | false | false |
museumsvictoria/nodel-recipes | Advantech ADAM 6050 6060 relay module/legacy/pymodbus/server/async.py | 2 | 8820 | '''
Implementation of a Twisted Modbus Server
------------------------------------------
'''
from binascii import b2a_hex
from twisted.internet import protocol
from twisted.internet.protocol import ServerFactory
from pymodbus.constants import Defaults
from pymodbus.factory import ServerDecoder
from pymodbus.datastore... | mit | -5,174,017,304,118,086,000 | 36.854077 | 82 | 0.618141 | false | 4.579439 | false | false | false |
agry/NGECore2 | scripts/mobiles/tatooine/tusken_warmaster.py | 2 | 1337 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate()
mobi... | lgpl-3.0 | -598,558,016,224,606,700 | 32.45 | 129 | 0.831713 | false | 3.472727 | false | false | false |
kuntzer/binfind | utils.py | 1 | 2440 | import cPickle as pickle
import csv
import gzip
import numpy as np
import os
def writepickle(obj, filepath, protocol = -1):
"""
I write your python object obj into a pickle file at filepath.
If filepath ends with .gz, I'll use gzip to compress the pickle.
Leave protocol = -1 : I'll use the latest binary protocol o... | mit | -6,222,757,359,018,498,000 | 25.521739 | 69 | 0.672951 | false | 2.901308 | false | false | false |
UPDDI/mps-database-server | clustergrammer/categories.py | 2 | 11698 | def check_categories(lines):
'''
find out how many row and col categories are available
'''
# count the number of row categories
rcat_line = lines[0].split('\t')
# calc the number of row names and categories
num_rc = 0
found_end = False
# skip first tab
for inst_string in rcat_line[1:]:
if ins... | mit | 8,570,142,060,290,531,000 | 26.078704 | 101 | 0.572577 | false | 3.268511 | false | false | false |
autowitch/pypov | scenes/geomorphs/lib/geomorphs/full_5x5_010.py | 1 | 1734 | from pypov.pov import Texture, Pigment, Object, Cylinder, Merge
from pypov.pov import Finish, Box, Cone, Sphere
from pypov.pov import Union, Difference
from pypov.colors import Colors
from lib.base import five_by_five_corner
from lib.textures import cross_hatch_2, wall_texture_1
from lib.metadata import Metadata
from ... | mit | 8,870,489,732,939,898,000 | 26.09375 | 71 | 0.516724 | false | 3.302857 | false | false | false |
johaness/bifl | bifl/features.py | 2 | 1987 | """
Extract feature batteries from gauss pyramids
"""
import cv
from utils import saveIm
from mods import *
from cpy import *
def stage(lum, sat, rg, by):
lumc = contrast(lum)
lumt = contrast(lumc, 251)
sats = smooth(sat)
satc = contrast(sat)
satt = contrast(satc, 251)
rgc = contrast(rg)
... | bsd-2-clause | -1,845,461,637,042,928,000 | 24.805195 | 78 | 0.606442 | false | 2.892285 | false | false | false |
linefeedse/korjournal | www/korjournal/viewset/odometerimage.py | 1 | 5931 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound
from rest_framework import viewsets, permissions, filters
from rest_framework.decorators import api_view, permission_classes
from korjournal.models import OdometerSnap, OdometerImage
f... | gpl-2.0 | -7,199,879,768,204,986,000 | 37.764706 | 175 | 0.567021 | false | 3.540896 | false | false | false |
idlesign/django-sitemessage | sitemessage/toolbox.py | 1 | 11609 | from collections import defaultdict
from datetime import timedelta
from itertools import chain
from operator import itemgetter
from typing import Optional, List, Tuple, Union, Iterable, Any, Callable, Dict, Mapping
from django.conf import settings
from django.conf.urls import re_path
from django.contrib.auth.base_user... | bsd-3-clause | 8,768,792,772,091,165,000 | 32.359195 | 111 | 0.663968 | false | 4.073333 | false | false | false |
Xifax/suzu-web | src/api/jp/jisho.py | 1 | 3940 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Jisho.org semi-api
"""
import re
from collections import OrderedDict
from itertools import islice
import requests
from requests import RequestException
from bs4 import BeautifulSoup
class Jisho:
def __init__(self):
# Starting with
self.url ... | bsd-2-clause | 1,944,833,856,903,504,100 | 31.783333 | 79 | 0.523894 | false | 4.047325 | false | false | false |
alexisrolland/data-quality | api/init/security/oauth/google.py | 1 | 2553 | import json
import os
from flask import redirect, request, session
from flask_restplus import Namespace, Resource
from requests_oauthlib import OAuth2Session
from security.token import get_jwt_token, TokenType, get_token_redirect_response
# pylint: disable=unused-variable
# OAuth endpoints given in the Google API doc... | apache-2.0 | 7,800,487,101,587,096,000 | 39.52381 | 124 | 0.705445 | false | 3.927692 | false | false | false |
jasset75/yapytex | yapytex/document.py | 1 | 3379 | from yapytex.dictutils import DictWrapper
from yapytex import latex_directives as xdir
from yapytex import styles
from yapytex import miscelanea as misc
from yapytex.abstract import YaPyTexBase
from yapytex.pieces import YaPyTexPiece, YaPyTexAppendix
#book layout
#https://en.wikipedia.org/wiki/Book_design
_d_misc_opt... | mit | 6,713,230,459,883,180,000 | 25.40625 | 76 | 0.681267 | false | 3.175752 | false | false | false |
maur1th/naxos-project | app/forum/user/migrations/0001_initial.py | 2 | 6509 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-21 23:30
from __future__ import unicode_literals
import datetime
from django.conf import settings
import django.contrib.auth.models
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils... | gpl-3.0 | 4,141,799,545,695,767,000 | 59.82243 | 421 | 0.615857 | false | 4.330007 | false | false | false |
hwstar/chargectrlr-python-buspirate | chargerctrl/Dialog.py | 1 | 2812 | __author__ = 'srodgers'
"""
This file is part of chargectrl-python-buspirate.
chargectrl-python-buspirate 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
... | gpl-3.0 | -3,948,247,585,451,378,700 | 23.241379 | 88 | 0.608464 | false | 4.017143 | false | false | false |
gabstopper/smc-python | smc/examples/virtual_engines.py | 1 | 4198 | '''
Example of automating the creation of a L3 Master Engine or Master Engine Cluster,
configuring interfaces and creating the virtual engines.
'''
from smc import session
from smc.core.engine import Engine
from smc.core.engines import Layer3VirtualEngine, MasterEngineCluster, MasterEngine
def create_single_master_en... | apache-2.0 | 1,223,394,019,031,582,700 | 40.156863 | 98 | 0.577418 | false | 4.160555 | false | false | false |
pashinin-com/pashinin.com | src/core/files/views.py | 1 | 9340 | import json
import os
from core.views import BaseView
from .sendfile import send_file
from .models import BaseFile as File, UploadedFile
from core import now
from .tasks import ensure_fs_ready
from .forms import UploadedFileForm
from django.http import HttpResponse, HttpResponseNotFound, JsonResponse
# from django.db.m... | gpl-3.0 | 2,884,424,129,055,935,000 | 31.657343 | 79 | 0.512848 | false | 4.167782 | false | false | false |
Unknowncmbk/Thumly | thumly/user.py | 1 | 2868 | import MySQLdb
import credentials
class User(object):
def __init__(self, email, password):
self.email = email
self.password = password
def __str__(self):
return "email: " + str(self.email) + "password: " + str(self.password)
def save(self):
"""
Saves this User to t... | mit | -7,791,856,545,844,101,000 | 20.410448 | 79 | 0.521967 | false | 4.180758 | false | false | false |
gecos-team/gecosws-config-assistant | gecosws_config_assistant/view/NTPServerElemView.py | 1 | 4317 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# This file is part of Guadalinex
#
# This software 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, ... | gpl-2.0 | -1,983,980,445,662,167,300 | 28.360544 | 74 | 0.617006 | false | 3.948765 | true | false | false |
greysAcademicCode/i-v-vs-time-taker | ivSweeperUI.py | 1 | 23945 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ivSweeper.ui'
#
# Created: Thu Nov 27 00:52:45 2014
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... | mit | 729,008,163,980,921,100 | 63.479784 | 490 | 0.697475 | false | 3.627843 | true | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/6f9266e7a5fb_initial_metrics.py | 1 | 2068 | """Initial metrics
Revision ID: 6f9266e7a5fb
Revises: 51415576d3e9
Create Date: 2017-12-12 10:38:27.166562
"""
import model.utils
import sqlalchemy as sa
from alembic import op
from rdr_service.participant_enums import MetricSetType, MetricsKey
# revision identifiers, used by Alembic.
revision = "6f9266e7a5fb"
down... | bsd-3-clause | 7,656,659,641,091,067,000 | 29.411765 | 109 | 0.657157 | false | 3.571675 | false | false | false |
grevutiu-gabriel/sympy | sympy/ntheory/multinomial.py | 91 | 6870 | from __future__ import print_function, division
from collections import defaultdict
from sympy.core.compatibility import range
def binomial_coefficients(n):
"""Return a dictionary containing pairs :math:`{(k1,k2) : C_kn}` where
:math:`C_kn` are binomial coefficients and :math:`n=k1+k2`.
Examples
====... | bsd-3-clause | 5,633,455,681,898,301,000 | 27.74477 | 88 | 0.487482 | false | 3.079337 | false | false | false |
wakalixes/sqldataplot | gaussian_error_propagation.py | 1 | 1477 | #--------------------------------------------------
# Revision = $Rev: 13 $
# Date = $Date: 2011-07-31 00:39:24 +0200 (Sun, 31 Jul 2011) $
# Author = $Author: stefan $
#--------------------------------------------------
from uncertainties import ufloat, nominal_value, std_dev
from sympy import *
#class vefloat():
... | gpl-2.0 | 4,947,383,098,462,776,000 | 25.392857 | 67 | 0.540961 | false | 2.90748 | false | false | false |
ibmjstart/bluemix-python-sample-twitter-influence-app | app/cloudant-python/cloudant/account.py | 1 | 3959 | from .resource import Resource
from .database import Database
try:
import urllib.parse as urlparse
except ImportError:
import urlparse
class Account(Resource):
"""
An account to a Cloudant or CouchDB account.
# connects to http://localhost:5984
# if a string is passed, connects to %... | apache-2.0 | -3,222,664,319,702,423,600 | 33.12931 | 80 | 0.602172 | false | 4.345774 | false | false | false |
daltonsena/eyed3 | examples/tag_example.py | 2 | 6993 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2012 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | gpl-2.0 | 2,091,011,244,069,950,200 | 33.618812 | 80 | 0.713428 | false | 2.623031 | false | false | false |
kaspermarstal/SimpleElastix | Testing/Unit/Python/sitkGetArrayViewFromImageTest.py | 2 | 6220 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | apache-2.0 | 3,521,244,001,422,895,000 | 38.871795 | 118 | 0.659164 | false | 3.229491 | true | false | false |
rupran/librarytrader | scripts/parse_collected_uprobes.py | 1 | 5273 | #!/usr/bin/env python3
#
# Copyright 2018, Andreas Ziegler <andreas.ziegler@fau.de>
#
# This file is part of librarytrader.
#
# librarytrader 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... | gpl-3.0 | 1,207,111,483,490,482,700 | 40.849206 | 133 | 0.61483 | false | 3.589517 | false | false | false |
vly/py_ga_lite | setup.py | 1 | 1077 | from distutils.core import setup
setup(
name='GA_lite',
version='0.1.0',
author='Val Lyashov',
author_email='val@plstr.com',
packages=['ga_lite', 'ga_lite.test'],
url='http://pypi.python.org/pypi/ga_lite/',
license='LICENSE.txt',
description='A lite Google Analytics Data Expor... | mit | -1,190,108,348,662,882,800 | 32.806452 | 67 | 0.562674 | false | 4.064151 | false | true | false |
garybake/blog | fabfile.py | 1 | 4852 | from fabric.api import *
import fabric.contrib.project as project
import os
import shutil
import sys
import SocketServer
from datetime import datetime
import livereload
from pelican.server import ComplexHTTPRequestHandler
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
D... | mit | 2,321,050,343,797,999,600 | 27.547059 | 76 | 0.58141 | false | 3.642643 | false | false | false |
Balannen/LSMASOMM | atom3/Kernel/TypeModels/TypesMetaModel_MM.py | 1 | 12254 | from ASG_TypesMetaModel import *
from graph_ASG_ERmetaMetaModel import *
from Tkinter import *
from ATOM3TypeInfo import *
from ATOM3String import *
from StatusBar import *
from ATOM3TypeDialog import *
from TypeName import *
from LeafType import *
from ModelType import ... | gpl-3.0 | -6,969,317,930,008,179,000 | 35.246201 | 121 | 0.644524 | false | 3.345345 | false | false | false |
josephdunn/stackpy | stackpy/url.py | 1 | 6161 | from json import loads
from urllib import quote, urlencode
from urllib2 import urlopen, HTTPError
from zlib import decompress, MAX_WBITS
import api
from database import Database
from filter import Filter
## Represents an error that occurred while accessing the API.
class APIError(Exception):
## C... | mit | 377,028,218,894,038,200 | 39.348993 | 124 | 0.59828 | false | 4.366407 | false | false | false |
nerdoc/bp_mgmt | bp_mgmt/urls.py | 1 | 1317 | """bp_mgmt URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | agpl-3.0 | -8,803,623,451,032,898,000 | 36.628571 | 77 | 0.680334 | false | 3.403101 | false | false | false |
woutdenolf/spectrocrunch | spectrocrunch/pipelines/run.py | 1 | 1620 | # -*- coding: utf-8 -*-
import logging
import multiprocessing
import time
from ..utils import timing
logger = logging.getLogger(__name__)
def run_sequential(tasks, name=None):
"""
Args:
tasks(list(NXtask))
Returns:
bool
"""
with timing.timeit_logger(logger, name=name):
fo... | mit | 5,956,943,999,785,022,000 | 23.545455 | 78 | 0.455556 | false | 4.682081 | false | false | false |
jayceyxc/hue | desktop/core/ext-py/Django-1.6.10/tests/custom_managers/models.py | 49 | 2068 | """
23. Giving models a custom manager
You can use a custom ``Manager`` in a particular model by extending the base
``Manager`` class and instantiating your custom ``Manager`` in your model.
There are two reasons you might want to customize a ``Manager``: to add extra
``Manager`` methods, and/or to modify the initial... | apache-2.0 | 6,083,510,562,268,266,000 | 30.815385 | 89 | 0.715667 | false | 3.739602 | false | false | false |
openstack/heat | heat/common/crypt.py | 1 | 6949 | #
# 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 writing, software
# ... | apache-2.0 | 6,933,252,646,719,187,000 | 36.160428 | 78 | 0.691466 | false | 3.964062 | false | false | false |
rothadamg/UPSITE | Utils/InteractionXML/DeleteElements.py | 2 | 4537 | import sys, os, copy
thisPath = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(thisPath,"..")))
sys.path.append(os.path.abspath(os.path.join(thisPath,"../..")))
import Utils.ElementTreeUtils as ETUtils
from collections import defaultdict
import types
def getEmptyCorpus(xml, del... | mit | 8,528,157,482,372,606,000 | 42.209524 | 143 | 0.622658 | false | 4.124545 | false | false | false |
Pirata-Repository/Pirata | plugin.video.movie25/resources/libs/plugins/tvrelease.py | 1 | 14008 | import urllib, urllib2,re,string,sys,os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin
from resources.libs import main
from t0mm0.common.addon import Addon
addon_id = 'plugin.video.movie25'
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon(addon_id, sys.argv)
art = main.art
error_logo = art+'/bigx.png'
BASEURL... | gpl-2.0 | -329,808,216,355,989,440 | 47.137457 | 324 | 0.549543 | false | 3.224678 | false | false | false |
joedougherty/sentential | sentential/KnowledgeBase.py | 1 | 2970 | # -*- coding: utf-8 -*-
from collections import OrderedDict
from .Expression import expressify
from .Proof import Proof
from .ProofGraph import ProofGraph
from .Proposition import Proposition
from .rewrite_rules import cnf, group_cnf, negate
class KnowledgeBase:
def __init__(self):
self._axioms = Ordere... | mit | -3,057,124,202,246,682,000 | 35.219512 | 129 | 0.582155 | false | 3.613139 | false | false | false |
adinlead/MongoDB2MySQL | src/DBUtils.py | 1 | 6814 | # coding=utf8
from pandas import json
import MySQLdb
from pymongo import MongoClient
class MongoHolder():
mongodb = None
collection = None
def initMongoDB(self, uri, port, dbname):
client = MongoClient(uri, port, maxPoolSize=200, connectTimeoutMS=60 * 1000, socketTimeoutMS=60 * 1000)... | gpl-3.0 | -2,931,272,471,846,969,000 | 39.163636 | 122 | 0.541814 | false | 3.974254 | false | false | false |
eesatfan/vuplus-enigma2 | lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py | 1 | 69207 | from Components.Label import Label
from Components.ActionMap import ActionMap
from Components.config import config, ConfigSelection, getConfigListEntry, ConfigSubsection, ConfigEnableDisable, ConfigYesNo, ConfigInteger
from Components.ConfigList import ConfigListScreen
from Components.Console import Console
from Compon... | gpl-2.0 | -7,477,652,780,564,643,000 | 36.388979 | 262 | 0.690985 | false | 3.177111 | true | false | false |
rvykydal/blivet | blivet/devicelibs/disk.py | 1 | 3521 | from collections import namedtuple
from . import raid
from .. import errors
from .. import util
from ..size import Size
lsm = None
_HBA_PLUGIN_URIS = ("hpsa://", "megaraid://")
LSMInfo = namedtuple('HBAVolumeInfo', ['system', 'nodes', 'raid_type', 'raid_stripe_size', 'raid_disk_count'])
""" .. class:: LSMInfo
... | lgpl-2.1 | -8,452,506,432,082,823,000 | 30.4375 | 110 | 0.613178 | false | 3.503483 | false | false | false |
zigapk/adventofcode | 2020/day_22/two.py | 1 | 1428 | from copy import deepcopy
d1 = []
d2 = []
player_2 = False
with open('in', 'r') as f:
f.readline()
for line in f.readlines():
try:
i = int(line.strip())
if player_2:
d2.append(i)
else:
d1.append(i)
except Exception:
... | mit | -2,103,628,178,939,617,000 | 20.969231 | 113 | 0.523109 | false | 2.811024 | false | false | false |
artemp/MapQuest-Render-Stack | storage/node/storage_node_pylons/storage_node_pylons/lib/mqExpiry.py | 1 | 5688 | import os
import socket
import struct
import logging
import sys
from threading import Lock
# maximum z that's possible within a 64-bit unsigned
# number, which is what we transmit across the network
MAX_Z = 35
# size of a metatile
METATILE = 8
log = logging.getLogger(__name__)
class ZLevels():
"""Stores sizes,... | lgpl-2.1 | 112,859,821,221,572,530 | 35.461538 | 108 | 0.568038 | false | 3.636829 | false | false | false |
funkybob/rattle | rattle/template.py | 1 | 4791 | import ast
import os
from .lexer import lexers
from .parser import parsers
from .utils.astpp import dump as ast_dump
from .utils.parser import ParserState, build_call, build_str_join
AST_DEBUG = os.environ.get('RATTLE_AST_DEBUG', False)
SHOW_CODE = os.environ.get('RATTLE_SHOW_CODE', False)
class TemplateSyntaxErro... | mit | 6,986,172,143,143,783,000 | 26.377143 | 77 | 0.507201 | false | 4.210018 | false | false | false |
chugle/myapp | applications/welcome/controllers/teacher.py | 1 | 6090 | # coding: utf8
# 尝试
import datetime
now=datetime.date.today()
year=now.year
month=now.month
if int(month) in range(2,8):
xueqi=2
xuenian=str(int(year)-1-2000)
else:
xueqi=1
xuenian=str(int(year)-2000)
@auth.requires(request.client=='127.0.0.1' or auth.has_membership(role='teacher') , requires_login=Fa... | gpl-2.0 | -5,439,303,608,122,076,000 | 35.447853 | 142 | 0.613131 | false | 2.741117 | false | false | false |
aholkner/MonthlyVisitor | MonthlyVisitor.py | 1 | 72282 | import logging
logging.basicConfig()
from math import floor, sqrt
import os
import sys
import collections
import itertools
import random
# For profiling: import sys; sys.path.insert(0, '../bacon')
import bacon
import tiled
import spriter
import moon
from common import Rect, tween, update_tweens
GAME_WIDTH = 800
GAME... | mit | 1,221,519,002,521,031,700 | 30.716981 | 189 | 0.551396 | false | 3.416135 | false | false | false |
python/pythondotorg | events/views.py | 3 | 4793 | import datetime
from django.contrib import messages
from django.core.mail import BadHeaderError
from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse_lazy
from django.utils import timezone
from django.views.generic import DetailView, ListView, FormView
from pydotorg.mixins import Lo... | apache-2.0 | -130,566,504,485,138,610 | 31.385135 | 146 | 0.664511 | false | 3.849799 | false | false | false |
opesci/devito | devito/passes/iet/engine.py | 1 | 5796 | from collections import OrderedDict
from functools import partial, wraps
from sympy.tensor.indexed import IndexException
from devito.ir.iet import Call, FindNodes, MetaCall, Transformer
from devito.tools import DAG, as_tuple, filter_ordered, timed_pass
__all__ = ['Graph', 'iet_pass']
class Graph(object):
"""
... | mit | 2,058,282,354,897,736,700 | 34.341463 | 86 | 0.525017 | false | 4.264901 | false | false | false |
wavesoft/robob | robob/logger.py | 1 | 2082 |
import logging
(BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE) = list(range(8))
#These are the sequences need to get colored ouput
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[1;%dm"
BOLD_SEQ = "\033[1m"
#: Color lookup table for formatter
COLORS = {
'WARNING': YELLOW,
'INFO': GREEN,
'DEBUG': BLUE,
'CRITICAL... | apache-2.0 | -5,280,982,248,865,080,000 | 22.133333 | 90 | 0.675312 | false | 3.079882 | false | false | false |
bzzzz/cython | Cython/Utils.py | 1 | 6894 | #
# Cython -- Things that don't belong
# anywhere else in particular
#
import os, sys, re, codecs
def replace_suffix(path, newsuf):
base, _ = os.path.splitext(path)
return base + newsuf
def open_new_file(path):
if os.path.exists(path):
# Make sure to create a new file here so we can
... | apache-2.0 | 4,077,520,384,334,594,000 | 29.914798 | 94 | 0.588628 | false | 3.959793 | false | false | false |
GNOME/chronojump-server | chronojumpserver-django/config/settings/local.py | 1 | 2220 | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = env.bool('DJANGO_DEBUG', default=True)
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET... | agpl-3.0 | -4,395,200,191,714,006,500 | 37.275862 | 113 | 0.584685 | false | 3.639344 | false | false | false |
emillynge/python-remoteexecution | remoteexecution/Environments.py | 1 | 33256 | from __future__ import (absolute_import, print_function, unicode_literals, division)
__author__ = 'emil'
import abc
import pxssh
import Pyro4
import os
from copy import deepcopy
import json
from subprocess import (Popen, PIPE)
from jsoncodecs import (build_codec, HANDLERS)
import re
from time import sleep
from collect... | gpl-3.0 | 4,472,739,699,373,511,700 | 37.759907 | 149 | 0.623226 | false | 4.129128 | false | false | false |
NirBenTalLab/proorigami-cde-package | cde-root/usr/local/apps/inkscape/share/inkscape/extensions/pathmodifier.py | 1 | 13934 | #!/usr/bin/env python
'''
Copyright (C) 2006 Jean-Francois Barraud, barraud@math.univ-lille1.fr
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) an... | mit | 5,068,792,643,310,192,000 | 36.058511 | 104 | 0.566743 | false | 3.235199 | false | false | false |
xsunfeng/cir | cir/workbench_views.py | 1 | 21105 | import json
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.utils import timezone
from cir.models import *
import claim_views
from cir.phase_control import PHASE_CONTROL
import utils
def api_load_all_documents(request):
response = {}
context = {}
cont... | mit | -1,774,856,148,919,498,000 | 44.192719 | 136 | 0.640843 | false | 3.654545 | false | false | false |
italomaia/turtle-linux | games/DigbyMarshmallow/lib/menu.py | 1 | 21015 | import pyglet
from pyglet import app
from pyglet.event import EVENT_HANDLED
from pyglet.event import EVENT_UNHANDLED
from pyglet.window import key
from pyglet.gl import *
import mode
import caterpie
import config
from common import *
from constants import *
from content import levels, swags
import data
import os
imp... | gpl-3.0 | -1,687,625,542,057,058,800 | 37.844732 | 231 | 0.531668 | false | 3.675236 | true | false | false |
ltilve/ChromiumGStreamerBackend | build/android/incremental_install/create_install_script.py | 3 | 3754 | #!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Creates a script to run an "_incremental" .apk."""
import argparse
import os
import pprint
import sys
sys.path.append(os.path.joi... | bsd-3-clause | -3,433,314,086,942,398,000 | 28.793651 | 78 | 0.61561 | false | 3.765296 | false | false | false |
jimr/noterator | tests/test_twilio_plugin.py | 1 | 1042 | # -*- coding: utf-8 -*-
import mock
import unittest
from noterator import Noterator, TWILIO
from noterator.plugins.twilio import BASE_URL
class TestEmailPlugin(unittest.TestCase):
@mock.patch('noterator.plugins.twilio.requests')
def test_twilio_settings(self, requests):
cfg = {
'account_... | mit | -3,016,599,767,701,781,000 | 27.162162 | 70 | 0.52975 | false | 3.580756 | false | false | false |
huntxu/neutron | neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py | 4 | 2153 | # Copyright 2017 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 ... | apache-2.0 | 6,610,654,773,696,697,000 | 34.883333 | 78 | 0.626568 | false | 3.851521 | false | false | false |
hkff/AccLab | pyAAL/AALtoAccmon.py | 1 | 13330 | """
AALtoDJfodtlmon
Copyright (C) 2016 Walid Benghabrit
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.
This program is distri... | gpl-3.0 | 1,310,629,162,326,871,600 | 33.984252 | 119 | 0.550379 | false | 3.720067 | false | false | false |
bnaul/scikit-learn | sklearn/preprocessing/_discretization.py | 3 | 13192 | # -*- coding: utf-8 -*-
# Author: Henry Lin <hlin117@gmail.com>
# Tom Dupré la Tour
# License: BSD
import numbers
import numpy as np
import warnings
from . import OneHotEncoder
from ..base import BaseEstimator, TransformerMixin
from ..utils.validation import check_array
from ..utils.validation import chec... | bsd-3-clause | 1,213,273,688,610,247,700 | 36.157746 | 79 | 0.54052 | false | 3.964833 | false | false | false |
lsblakk/koc_khan_offline | code/iafeedmanager.py | 1 | 1033 | #! /usr/bin/env python
import urllib
from xml.dom import minidom, Node
import json
#1)get daa from internet archive in json format 2)clean the json to get identifier, format, title, date, and description
ka_archive_json = 'http://www.archive.org/advancedsearch.php?q=collection%3A%22khanacademy%22&fl%5B%5D=collection&... | bsd-3-clause | -2,656,630,267,411,001,300 | 29.382353 | 285 | 0.7212 | false | 2.959885 | false | false | false |
cihatix/FuzzManager | server/ec2spotmanager/management/commands/start_stats_daemon.py | 3 | 4429 | from django.core.management.base import NoArgsCommand
from ec2spotmanager.models import PoolUptimeDetailedEntry, PoolUptimeAccumulatedEntry, InstancePool, Instance, INSTANCE_STATE
from django.conf import settings
from ec2spotmanager.management.common import pid_lock_file
import time
import logging
from django.utils im... | mpl-2.0 | -5,870,328,385,499,014,000 | 45.631579 | 167 | 0.573267 | false | 4.686772 | false | false | false |
AlexOugh/horizon | openstack_dashboard/api/nikola/nikola_api.py | 1 | 3084 |
#import logging
import httplib, urllib
import simplejson as json
class NikolaAPI():
def _get_headers(self):
#if self.cookie is None: raise Exception, "no cookie available"
headers = {'content-type':'text/plain'}
#headers['cookie'] = self.cookie
return headers
... | apache-2.0 | -8,247,911,462,868,706,000 | 31.16129 | 97 | 0.475357 | false | 4.515373 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.