repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
Ecam-Eurobot-2017/main
code/raspberrypi/range_sensors.py
1
2358
from i2c import I2C from enum import IntEnum class Command(IntEnum): MeasureOne = 1 MeasureAll = 2 Count = 3 class RangeSensor(I2C): """ This class is an abstraction around the I2C communication with the range-sensor module. Details of the "protocol" used: The Raspberry Pi sends a ...
mit
-9,218,176,433,495,981,000
32.685714
79
0.651824
false
3.956376
false
false
false
PedroMDuarte/thesis-hubbard-lda_evap
lda.py
1
78053
import logging # create logger logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) import numpy as np import matplotlib.pyplot as plt import matplotlib from matplotlib import rc rc('font',**{'family':'serif'}) rc('text', usetex=True) from vec3 import vec3, cross import scipy.constants as...
mit
8,712,553,290,903,506,000
36.097433
83
0.517302
false
3.23241
false
false
false
cheery/language
parser/__init__.py
1
15728
from lookahead import CharacterLookAhead, LookAhead from structures import Constant, Struct specials = { ',': 'comma', '(': 'leftparen', ')': 'rightparen', '[': 'leftbracket', ']': 'rightbracket', } operators = set([ 'or', 'and', 'not', '!', ':', '=', '-', '+', '*', '/', '<>', '==', '!=', '->', '<...
gpl-3.0
-1,161,089,621,615,312,600
36.182033
136
0.557541
false
3.727898
false
false
false
TumblrCommunity/PowerPortfolio
test.py
1
4318
# To execute this test run python test.py on the Terminal from portfolio.application.base import application from portfolio.models import needs_db import os import json import unittest import tempfile class PortfolioTestCase(unittest.TestCase): def setUp(self): self.tester = application.test_client() ...
mit
1,062,895,766,827,420,400
44.93617
147
0.606994
false
3.957837
true
false
false
ThinkboxSoftware/Deadline
Custom/events/Zabbix/API/httpretty/core.py
1
34264
# #!/usr/bin/env python # -*- coding: utf-8 -*- # <HTTPretty - HTTP client mock for Python> # Copyright (C) <2011-2013> 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"...
apache-2.0
-2,241,472,824,125,834,000
31.072394
117
0.540116
false
4.322861
false
false
false
bobbyluig/Eclipse
src/agility/main.py
1
45601
from agility.maestro import Maestro from agility.pololu.enumeration import uscSerialMode, ChannelMode, HomeMode from agility.pololu.usc import Usc from threading import Event from shared.debug import Dummy import numpy as np import math from matplotlib.path import Path import matplotlib.pyplot as plt from mpl_toolkits....
mit
-7,332,994,944,111,070,000
27.934645
124
0.52898
false
3.824304
false
false
false
torgartor21/solar
solar/solar/interfaces/db/redis_graph_db.py
1
9405
import json import redis import fakeredis from .base import BaseGraphDB, Node, Relation from .redis_db import OrderedHash class RedisGraphDB(BaseGraphDB): DB = { 'host': 'localhost', 'port': 6379, } REDIS_CLIENT = redis.StrictRedis def __init__(self): self._r = self.REDIS_CLI...
apache-2.0
-3,255,286,357,683,565,600
30.560403
89
0.547581
false
4.434229
false
false
false
jainanisha90/WeVoteServer
search/query_test_script.py
1
8852
#!/usr/bin/env python # Test this by entering the search string "election" on a command line like this: # /home/wevote/WeVoteServer/search/query_test_script.py election from elasticsearch import Elasticsearch import sys es = Elasticsearch(["172.31.24.246:9200"], timeout = 120, max_retries = 5, retry_on_timeout = True...
mit
-3,072,688,002,611,289,600
72.766667
361
0.405219
false
4.861065
false
false
false
bourguet/operator_precedence_parsing
modified_operator_precedence.py
1
9379
#! /usr/bin/env python3 import sys import lexer from tree import Node, CompositeNode class SymbolDesc: def __init__(self, symbol, lprio, rprio, evaluator): self.symbol = symbol self.lprio = lprio self.rprio = rprio self.evaluator = evaluator def __repr__(self): return...
bsd-2-clause
3,458,328,838,560,375,000
34.661597
115
0.565625
false
3.560744
false
false
false
rwl/PyCIM
CIM14/ENTSOE/Dynamics/IEC61970/Meas/MeasMeasurement.py
1
2367
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
mit
2,298,372,686,646,743,600
39.810345
89
0.718209
false
4.47448
false
false
false
wbonnet/sbit
sbit/cli_command.py
1
2965
# # The contents of this file are subject to the Apache 2.0 license you may not # use this file except in compliance with the License. # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language gov...
apache-2.0
6,353,952,181,077,633,000
33.08046
98
0.597976
false
4.933444
false
false
false
sxjscience/tvm
tutorials/get_started/tvmc_command_line_driver.py
1
12118
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
2,922,419,167,132,378,000
35.065476
104
0.661825
false
3.684403
false
false
false
pleed/pyqemu
target-i386/pyqemu/processinfo.py
1
26210
#!/usr/bin/python import PyFlxInstrument from Structures import * # --- class Image ------------------------------------------------------ class Image( object): def get_entrypoint( self): try: return self.cached.entrypoint except: return self.ldr_data_table_entry.EntryPoin...
gpl-2.0
7,401,991,622,607,399,000
40.86901
218
0.544525
false
4.182224
false
false
false
tangle70/Python
ssh-listfiles.py
1
1039
#!/bin/env/python ################################################################################### # # A script to list files in a directory using via SSH using the paramiko module. # ################################################################################### import paramiko def listFiles(srv, uname, pass...
gpl-2.0
-1,191,662,196,745,778,700
30.484848
83
0.407122
false
4.971292
false
false
false
ftfarias/PySubsim
old/ship.py
1
1753
# -*- coding: utf-8 -*- # class Ship(MovableNewtonObject): # def __init__(self, drag_factor, max_turn_per_hour, max_acceleration): # super(Ship, self).__init__() # self._rudder = 0 # self.max_turn_per_hour = max_turn_per_hour # self.drag_factor = drag_factor # self.frontal_drag...
gpl-3.0
-4,022,949,757,789,183,500
30.232143
111
0.527158
false
3.041739
false
false
false
dziadu/gitbrowser
settings/base.py
1
2525
""" Django settings for gitbrowser 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/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
gpl-2.0
4,518,041,189,520,562,700
23.514563
71
0.752475
false
3.188131
false
false
false
python-recsys/mrec
mrec/base_recommender.py
1
3656
class BaseRecommender(object): """ Minimal interface to be implemented by recommenders. """ def get_similar_items(self,j,max_similar_items=30): """ Get the most similar items to a supplied item. Parameters ========== j : int Index of item for which t...
bsd-3-clause
2,509,509,946,566,095,400
33.168224
96
0.576313
false
4.657325
false
false
false
wisechengyi/pants
contrib/python/src/python/pants/contrib/python/checks/checker/variable_names.py
1
5328
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import ast import keyword import re from functools import wraps import six from pants.c...
apache-2.0
5,738,994,270,418,695,000
34.052632
103
0.598161
false
3.738947
false
false
false
hckrtst/learnpython
py3_essential_training/19 Projects/testimonials/bwCGI.py
1
3856
#!/usr/bin/python3 # bwCGI.py by Bill Weinman <http://bw.org/contact/> # Copyright (c) 1995-2010 The BearHeart Group, LLC # from cgi import FieldStorage import cgitb import os __version__ = '0.3.2' _cookie_var = 'HTTP_COOKIE' class bwCGI: ''' handy cgi stuff ''' _header_state = False # True after...
mit
-3,525,216,791,796,005,000
31.133333
94
0.547977
false
3.518248
false
false
false
MMaus/mutils
mmnotebooks/bslip.py
1
31581
from libshai import integro from pylab import (norm, pi, hstack, vstack, array, sign, sin, cos, arctan2, sqrt, zeros, figure, subplot, plot, legend, xlabel, ylabel) from numpy import float64 from copy import deepcopy import mutils.io as mio import fastode # local! class SimulationError(Exception): ...
gpl-2.0
-1,109,068,607,172,693,500
34.564189
103
0.528482
false
3.391066
false
false
false
hyphaltip/cndtools
util/runGeneid.py
1
4841
#!/usr/bin/env python # Copyright (c) 2006 # Colin Dewey (University of Wisconsin-Madison) # cdewey@biostat.wisc.edu # # 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 Li...
gpl-2.0
8,994,272,857,674,351,000
35.126866
81
0.546375
false
3.926196
false
false
false
burz/simcom
src/parser.py
1
35470
import symbol_table import syntax_tree import interpreter negated_relation = { '=' : '#', '#' : '=', '<' : '>=', '>' : '<=', '<=' : '>', '>=' : '<' } class Parser_error(Exception): def __init__(self, error): self.error = error def __str__(self): return "error: {}".format(self.error) class Parser(object):...
mit
1,540,278,318,245,075,000
43.785354
101
0.617931
false
4.133069
false
false
false
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Plugins/Extensions/MediaPortal/resources/update.py
1
7746
# -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2017 # # This plugin is open source but it is NOT free software. # # This plugin may only be distributed to and executed...
gpl-2.0
1,712,898,901,760,975,400
35.023256
414
0.695894
false
3.201323
false
false
false
census-instrumentation/opencensus-python
opencensus/common/http_handler/__init__.py
1
1391
# Copyright 2018, OpenCensus Authors # # 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 w...
apache-2.0
-4,971,914,294,319,869,000
31.348837
74
0.723221
false
4.202417
false
false
false
unicef/un-partner-portal
backend/unpp_api/apps/partner/migrations/0053_auto_20180115_0834.py
1
2538
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-01-15 08:34 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): ...
apache-2.0
7,876,868,366,261,741,000
50.795918
417
0.646178
false
4.080386
false
false
false
ClydeSpace-GroundStation/GroundStation
Utilities/Supporting_Libraries/gr-bruninga-master/python/ax25_fsk_mod.py
1
5030
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 <+YOU OR YOUR COMPANY+>. # # This 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, or (at your option) # any later version. #...
mit
7,835,768,773,258,997,000
31.662338
80
0.603777
false
3.618705
false
false
false
ollitapa/MMP-TracerApi
Tests/MeshTests/meshConeTest.py
1
1598
# # Copyright 2015 Olli Tapaninen, VTT Technical Research Center of Finland # # 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 requi...
apache-2.0
9,024,554,759,309,677,000
25.633333
79
0.702128
false
2.94291
false
false
false
bjoernricks/python-quilt
quilt/cli/series.py
1
1199
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 - 2017 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of python-quilt for details. from quilt.cli.meta import Command from quilt.cli.parser import Optio...
mit
6,167,082,070,145,650,000
31.378378
72
0.582638
false
3.803175
false
false
false
w0pke/oppgavegenerator
oppgavegen/generation_folder/generation.py
1
16870
""" Handles task generation from templates. """ from random import uniform, shuffle, choice import json from sympy import sympify from sympy.parsing.sympy_parser import (parse_expr, standard_transformations, implicit_multiplication_application, convert_xor) from oppgavegen....
bsd-3-clause
-6,944,604,632,999,622,000
46.210084
114
0.654563
false
3.80194
false
false
false
dinhkhanh/trac
sample-plugins/Timestamp.py
1
1219
"""Inserts the current time (in seconds) into the wiki page.""" revision = "$Rev: 10617 $" url = "$URL: https://svn.edgewall.org/repos/trac/tags/trac-1.0/sample-plugins/Timestamp.py $" # # The following shows the code for macro, old-style. # # The `execute` function serves no purpose other than to illustrate # the ex...
bsd-3-clause
-3,748,584,367,646,097,400
27.348837
93
0.673503
false
3.358127
false
false
false
botswana-harvard/bcpp-subject
bcpp_subject/admin/postitive_participant_admin.py
1
2114
from django.contrib import admin from django.utils.safestring import mark_safe from edc_base.modeladmin_mixins import audit_fieldset_tuple from ..admin_site import bcpp_subject_admin from ..forms import PositiveParticipantForm from ..models import PositiveParticipant from .modeladmin_mixins import CrfModelAdminMixin ...
gpl-3.0
-1,579,892,250,554,721,500
37.436364
73
0.644749
false
3.936685
false
false
false
walac/build-mozharness
mozharness/mozilla/proxxy.py
1
6748
"""Proxxy module. Defines a Proxxy element that fetches files using local proxxy instances (if available). The goal of Proxxy is to lower the traffic from the cloud to internal servers. """ import urlparse import socket from mozharness.base.log import INFO, ERROR, LogMixin from mozharness.base.script import Scrip...
mpl-2.0
-458,509,179,348,131,500
38.232558
97
0.566835
false
4.183509
true
false
false
laijingtao/landlab
landlab/plot/imshow.py
1
20927
#! /usr/bin/env python """ Methods to plot data defined on Landlab grids. Plotting functions ++++++++++++++++++ .. autosummary:: :toctree: generated/ ~landlab.plot.imshow.imshow_grid ~landlab.plot.imshow.imshow_grid_at_cell ~landlab.plot.imshow.imshow_grid_at_node """ import numpy as np import insp...
mit
-8,240,677,285,092,095,000
39.321773
79
0.60711
false
4.039961
false
false
false
OCA/l10n-spain
l10n_es_facturae/models/res_partner.py
1
1829
# © 2015 Omar Castiñeira (Comunitea) # © 2017 Creu Blanca # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api, exceptions, _ class ResPartner(models.Model): _inherit = "res.partner" facturae = fields.Boolean('Factura electrónica') facturae_version =...
agpl-3.0
8,327,318,882,392,049,000
36.204082
78
0.575425
false
3.553606
false
false
false
jriguera/photoplace
photoplace/lib/PhotoPlace/UserInterface/commandUI.py
1
5140
#!/usr/bin/env python # -*- coding: utf-8 -*- # # commandUI.py # # Copyright 2010-2015 Jose Riguera Lopez <jriguera@gmail.com> # # 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 # ...
apache-2.0
-2,436,587,359,322,661,400
26.486631
76
0.542412
false
4.168694
false
false
false
lightbase/WSCacicNeo
wscacicneo/views/orgaos.py
1
11498
#!/usr/env python # -*- coding: utf-8 -*- __author__ = 'eduardo' import requests import json import datetime from pyramid.response import Response from pyramid.httpexceptions import HTTPFound, HTTPNotFound from pyramid.view import view_config, forbidden_view_config from wscacicneo.model import orgao as model_orgao from...
gpl-2.0
-7,502,199,000,167,618,000
34.02454
158
0.547644
false
3.428829
false
false
false
noam09/kodi
xmlgen.py
1
4509
#!/usr/bin/env python # * # * Copyright (C) 2012-2013 Garrett Brown # * Copyright (C) 2010 j48antialias # * # * 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, or (...
gpl-3.0
-7,378,184,051,172,303,000
36.890756
120
0.554447
false
3.811496
false
false
false
ricardonhuang/blog
app/auth/views.py
1
6229
#coding=utf-8 ''' Created on 2016��10��20�� @author: huangning ''' from flask import render_template, redirect, request, url_for, flash from flask_login import login_user, logout_user, login_required, \ current_user from . import auth from .. import db from ..models import User from ..email import send...
gpl-3.0
5,823,037,768,428,690,000
34.145349
78
0.623774
false
3.907605
false
false
false
YuxingZhang/prescription
rnn_model/batch.py
1
10241
import numpy as np import random import cPickle as pkl from collections import OrderedDict class Batch(): def __init__(self, lhs, rel, rhs, batch_size=128): self.lhs = lhs self.rel = rel self.rhs = rhs self.batch_size = batch_size self.prepare() self.reset() d...
bsd-3-clause
157,359,887,290,219,680
36.375912
131
0.620252
false
3.087428
false
false
false
ustclug/lug-vpn-web
scripts/migrate.py
1
1829
#!/usr/bin/env python3 # encoding: utf-8 import MySQLdb import random import hashlib import string db = MySQLdb.connect(host=input('host:'), user=input('user:'), passwd=input('password:'), db=input('db:')) db.autocommit(True) cur = db.cursor() cur.exec...
agpl-3.0
-2,951,162,330,318,354,400
28.031746
124
0.651722
false
3.16436
false
false
false
goujonpa/chateaumagondeau
website/magondeau/settings.py
1
2870
""" Django settings for magondeau project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
mit
8,085,411,588,434,776,000
24.175439
71
0.672125
false
3.424821
false
false
false
amkusmec/snptools
src/filter.py
1
10883
# -*- coding: utf-8 -*- """ Created on Wed May 27 14:47:00 2015 @author: aaron """ import argparse import textwrap import timeit import os from snptools import * ######################################################### #### Need to add retention list filtering for DSF and PED #######################################...
mit
-6,806,972,596,291,616,000
32.798137
116
0.473307
false
3.639799
false
false
false
dsnopek/anki-sync-server
tests/test_rest_app.py
1
22180
# -*- coding: utf-8 -*- import os import shutil import tempfile import unittest import logging import time from pprint import pprint import mock from mock import MagicMock import AnkiServer from AnkiServer.collection import CollectionManager from AnkiServer.apps.rest_app import RestApp, RestHandlerRequest, Collectio...
agpl-3.0
4,325,671,205,340,881,400
33.546729
175
0.579061
false
3.711345
true
false
false
chrislit/abydos
abydos/distance/_damerau_levenshtein.py
1
7982
# Copyright 2014-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
-4,152,594,237,314,092,000
31.713115
170
0.534578
false
3.924287
false
false
false
yeming233/rally
rally/task/trigger.py
1
2283
# Copyright 2016: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
4,417,696,180,981,200,400
32.573529
78
0.624617
false
3.998249
false
false
false
Ghini/ghini.desktop
bauble/error.py
1
2187
# -*- coding: utf-8 -*- # # Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org> # Copyright (c) 2012-2015 Mario Frasca <mario@anche.no> # # This file is part of ghini.desktop. # # ghini.desktop is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-2.0
-2,004,390,259,977,985,500
22.516129
78
0.683128
false
3.850352
false
false
false
point97/hapifis
server/apps/survey/migrations/0058_auto__add_field_question_skip_condition.py
1
10477
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Question.skip_condition' db.add_column(u'survey_question', 'skip_condition', ...
gpl-3.0
-4,969,207,650,817,675,000
80.224806
207
0.549203
false
3.574548
false
false
false
MadeiraCloud/salt
sources/salt/modules/pkgutil.py
1
9536
# -*- coding: utf-8 -*- ''' Pkgutil support for Solaris ''' # Import python libs import copy # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError, MinionError def __virtual__(): ''' Set the virtual pkg module if the os is Solaris ''' if 'os' in __grains__ and __grai...
apache-2.0
7,205,687,913,548,600,000
25.197802
83
0.570889
false
3.97499
true
false
false
tensorflow/federated
tensorflow_federated/python/common_libs/golden_test.py
1
2657
# Copyright 2020, The TensorFlow Federated Authors. # # 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 o...
apache-2.0
-5,081,523,066,329,102,000
38.073529
78
0.697779
false
3.779516
true
false
false
cgpotts/pypragmods
embeddedscalars/fragment.py
1
7029
#!/usr/bin/env python """ The logical grammar (base lexicon) used throughout the paper. The code in grammar.py messes with the namespace that it establishes, in order to implement lexical uncertainty in an intuitive way. """ __author__ = "Christopher Potts" __version__ = "2.0" __license__ = "GNU general public licens...
gpl-3.0
-2,607,856,894,522,690,000
49.568345
115
0.565372
false
3.133749
false
false
false
ageneau/fishnet
test.py
1
3617
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the lichess.org fishnet client. # Copyright (C) 2016-2017 Niklas Fiekas <niklas.fiekas@backscattering.de> # See LICENSE.txt for licensing information. import fishnet import argparse import unittest import logging import sys import multiprocessing t...
gpl-3.0
584,502,897,233,279,600
26.610687
96
0.535803
false
3.380374
true
false
false
joaormatos/anaconda
Chowdren/chowdren/shaderheader.py
1
3599
import sys sys.path.append('..') from chowdren.shaders import SHADERS from mmfparser.gperf import get_hash_function from chowdren.common import get_method_name, get_base_path from chowdren.codewriter import CodeWriter import os def write_shader_param(): header = CodeWriter(os.path.join(get_base_path(), 'shaderpara...
gpl-3.0
-1,006,155,459,375,083,800
29.508475
76
0.572103
false
3.653807
false
false
false
dhocker/athomepowerlineserver
CommandHandler.py
1
6289
# # AtHomePowerlineServer - networked server for CM11/CM11A/XTB-232 X10 controllers # Copyright © 2014, 2021 Dave Hocker # # 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, version 3 of the...
gpl-3.0
-6,893,993,220,547,688,000
39.92
108
0.708651
false
4.263051
false
false
false
Nolski/airmozilla
airmozilla/roku/tests/test_views.py
1
8166
import datetime from django.conf import settings from django.utils import timezone from django.core.files import File from funfactory.urlresolvers import reverse from nose.tools import eq_, ok_ from airmozilla.main.models import ( Event, Channel, Template, Picture, EventHitStats, Approval, ) ...
bsd-3-clause
1,651,720,650,497,076,500
34.350649
78
0.605927
false
3.791086
true
false
false
RedhawkSDR/integration-gnuhawk
components/file_sink_c/tests/test_file_sink_c.py
1
4065
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by ...
gpl-3.0
-1,006,469,763,631,082,900
46.823529
133
0.591636
false
4.428105
true
false
false
sergey-dryabzhinsky/dedupsqlfs
dedupsqlfs/db/mysql/table/subvolume.py
1
7299
# -*- coding: utf8 -*- __author__ = 'sergey' import hashlib from time import time from dedupsqlfs.db.mysql.table import Table class TableSubvolume( Table ): _table_name = "subvolume" def create( self ): c = self.getCursor() # Create table c.execute( "CREATE TABLE IF NOT...
mit
8,267,020,845,199,836,000
28.550607
137
0.461981
false
3.835523
false
false
false
luwei0917/awsemmd_script
script/CalcRg.py
1
2726
#!/usr/bin/python # ---------------------------------------------------------------------- # Copyright (2010) Aram Davtyan and Garegin Papoian # Papoian's Group, University of Maryland at Collage Park # http://papoian.chem.umd.edu/ # Last Update: 03/04/2011 # ---------------------------------------------------------...
mit
-197,910,826,636,064,500
20.296875
100
0.495231
false
2.172112
false
false
false
Aloomaio/googleads-python-lib
examples/adwords/v201802/extensions/add_site_links.py
1
5277
#!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
1,125,957,785,789,636,000
35.143836
78
0.653781
false
3.823913
false
false
false
izolight/django-seoultransport
busgokr/models.py
1
2624
from django.db import models class RouteType(models.Model): id = models.IntegerField(primary_key=True) name = models.CharField(max_length=20) color = models.CharField(max_length=10) def __str__(self): return self.name class Location(models.Model): name = models.CharField(max_length=30) ...
bsd-2-clause
1,073,920,046,047,536,800
29.523256
92
0.6875
false
3.748571
false
false
false
serein7/openag_brain
src/openag_brain/software_modules/video_writer.py
1
6194
#!/usr/bin/env python """ Stitches together the images from a recipe run and stores them as a video on the recipe_start data point """ import os import time import rospy import tempfile import subprocess from openag.cli.config import config as cli_config from openag.couch import Server from openag.db_names import ENVIR...
gpl-3.0
2,755,527,196,217,202,700
37.7125
112
0.570552
false
3.957827
false
false
false
HybridF5/jacket
jacket/compute/conf/vnc.py
1
7868
# Copyright (c) 2010 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
3,083,081,730,921,231,400
22.486567
78
0.734875
false
3.528251
false
false
false
thpmacedo/granjaSucker
granjaUpdateStatistics.py
1
11815
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import logging import time import sqlite3 from os.path import basename ################################################################################ # STATIC DEF ################################################################################ PATH_GRA...
gpl-3.0
7,718,151,535,844,989,000
43.417293
161
0.653915
false
2.912968
true
false
false
pantuza/art-gallery
src/triangle.py
1
1522
# -*- coding:utf-8 -*- from point import Point from side import Side class Triangle(object): """ Class representing a Triangle that is composed by three Point objects """ def __init__(self, u, v, w): if not all(isinstance(point, Point) for point in (u, v, w)): raise TypeError...
gpl-2.0
-6,126,048,377,337,462,000
23.95082
81
0.507884
false
3.252137
false
false
false
kidscancode/gamedev
tutorials/tilemap/part 18/sprites.py
1
8372
import pygame as pg from random import uniform, choice, randint, random from settings import * from tilemap import collide_hit_rect import pytweening as tween vec = pg.math.Vector2 def collide_with_walls(sprite, group, dir): if dir == 'x': hits = pg.sprite.spritecollide(sprite, group, False, collide_hit_re...
mit
4,963,443,543,521,539,000
36.711712
84
0.556976
false
3.232432
false
false
false
asya-bergal/led-matrix-server
CPW.py
1
8468
import datetime import urllib import json import leds import time from PIL import ImageFont from PIL import Image from PIL import ImageDraw eventMessage = "" eventMessage2 = "" eventMessage3 = "" def CPW (day,hour,minute): intro = "Next Event In Random Hall:" intro2 ="" global eventMessage global eventMessage2 ...
gpl-2.0
-1,864,003,059,169,031,000
47.113636
193
0.658243
false
2.846387
false
false
false
sindhus/hasjob
hasjob/views/location.py
2
2094
# -*- coding: utf-8 -*- from collections import OrderedDict from datetime import datetime from flask import redirect, abort from baseframe.forms import render_form from ..models import db, agelimit, Location, JobLocation, JobPost, POSTSTATUS from ..forms import NewLocationForm, EditLocationForm from .. import app, las...
agpl-3.0
-9,207,969,869,731,752,000
38.509434
109
0.677173
false
3.537162
false
false
false
emeric254/gala-stri-website
Handlers/ListingHandler.py
1
1504
# -*- coding: utf-8 -*- import json import logging from tornado.web import authenticated from Handlers.BaseHandler import BaseHandler from Tools import PostgreSQL logger = logging.getLogger(__name__) class ListingHandler(BaseHandler): """Listing Handler which require a connected user""" @authenticated ...
mit
-2,530,221,862,486,792,000
31.695652
80
0.59109
false
4.143251
false
false
false
BlakeTeam/VHDLCodeGenerator
lib/System.py
1
7406
#------------------------------------------------------------------------------- # PROJECT: VHDL Code Generator # NAME: System # # LICENSE: GNU-GPL V3 #------------------------------------------------------------------------------- __author__ = "BlakeTeam" import lib.signature from lib import * from .B...
gpl-3.0
2,981,545,971,807,642,600
39.692308
160
0.559352
false
3.840768
false
false
false
zmughal/pygments-mirror
tests/test_latex_formatter.py
1
1504
# -*- coding: utf-8 -*- """ Pygments LaTeX formatter tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import os import unittest import tempfile from pygments.forma...
bsd-2-clause
-1,551,528,746,510,471,000
26.851852
71
0.584441
false
4.309456
true
false
false
jelly/calibre
src/calibre/ebooks/docx/to_html.py
1
32913
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import sys, os, re, math, errno, uuid from collections import OrderedDict, d...
gpl-3.0
-1,772,661,482,108,892,200
40.554293
134
0.520009
false
3.87827
false
false
false
ltilve/chromium
tools/telemetry/telemetry/core/browser_options.py
1
15478
# Copyright 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 logging import optparse import os import shlex import socket import sys from telemetry.core import browser_finder from telemetry.core imp...
bsd-3-clause
3,075,533,926,595,646,500
35.764846
80
0.645238
false
4.03283
true
false
false
redreamality/broca
broca/tokenize/keyword/pos.py
1
2250
""" A naive keyword extractor which just pulls out nouns and noun phrases. Was using the PerceptronTagger is _way_ faster than NLTK's default tagger, and more accurate to boot. See <http://stevenloria.com/tutorial-state-of-the-art-part-of-speech-tagging-in-textblob/>. However, it complicates the library's installatio...
mit
-5,785,700,199,775,519,000
26.439024
101
0.519556
false
3.343239
false
false
false
psiinon/addons-server
src/olympia/discovery/management/commands/extract_content_strings.py
1
3587
# -*- coding: utf-8 -*- import json from django.conf import settings from django.core.management.base import BaseCommand, CommandError import requests import olympia.core.logger log = olympia.core.logger.getLogger('z.discovery.extract_content_strings') class BaseAPIParser(): def get_results_content(self): ...
bsd-3-clause
-8,826,200,749,400,742,000
35.979381
77
0.609702
false
3.836364
false
false
false
plamut/ggrc-core
test/selenium/src/lib/constants/url.py
2
1194
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Constants for URLs construction.""" # pylint: disable=wildcard-import # pylint: disable=unused-wildcard-import from lib.constants.objects import * # noqa; the names are later exported # URL's parts for...
apache-2.0
-1,714,638,477,626,481,400
28.121951
78
0.706868
false
3.192513
false
false
false
pytest-dev/py
py/_path/common.py
4
14818
""" """ import warnings import os import sys import posixpath import fnmatch import py # Moved from local.py. iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt') try: # FileNotFoundError might happen in py34, and is not available with py27. import_errors = (ImportError, FileNotFoundErro...
mit
-7,689,056,048,696,364,000
31.283224
82
0.537522
false
4.407496
false
false
false
KeepSafe/zendesk-helpcenter-cms
src/test/fixtures/__init__.py
1
1176
import model def simple_category(): category = model.Category('category', 'category desc', 'category') category.meta = {'id': 'category id', 'webtranslateit_ids': {'content': 'category translate id'}} section = model.Section(category, 'section', 'section desc', 'section') section.meta = {'id': 'sectio...
apache-2.0
9,108,598,873,475,510,000
48
111
0.69983
false
4.2
false
false
false
Ray1235/CoDMayaTools
CoDMayaTools.py
1
161584
# Copyright 2016, Ray1235 # CoDMayaTools 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 distributed in the hope t...
gpl-3.0
279,508,431,598,202,340
48.054038
523
0.586234
false
3.794299
false
false
false
pbanaszkiewicz/amy
amy/workshops/migrations/0012_auto_20150612_0807.py
1
2658
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models TRANSLATE_NAMES = { 'Git': ['swc/git'], 'Make': ['swc/make'], 'Matlab': ['swc/matlab'], 'Mercurial': ['swc/hg'], 'Python': ['swc/python', 'dc/python'], 'R': ['swc/r', 'dc/r'], 'Regexp':...
mit
4,028,732,690,800,716,000
32.64557
78
0.624153
false
3.339196
false
false
false
google/shaka-player
build/checkversion.py
1
2659
#!/usr/bin/env python # # Copyright 2016 Google LLC # # 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...
apache-2.0
7,412,155,136,251,303,000
30.654762
78
0.67469
false
3.475817
false
false
false
Ambuj-UF/ConCat-1.0
src/Utils/Bio/SearchIO/_model/_base.py
1
2621
# Copyright 2012 by Wibowo Arindrarto. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Abstract base classes for the SearchIO object model.""" import sys # Add path to Bio sy...
gpl-2.0
8,958,869,091,809,492,000
33.038961
80
0.604349
false
3.923653
false
false
false
jck/uhdl
uhdl/helpers.py
1
1634
import functools import wrapt from myhdl import SignalType, ResetSignal, delay, always, instance, Simulation class Clock(SignalType): """Clock class for use in simulations""" def __init__(self, period=2): self.period = period if period % 2 != 0: raise ValueError("period must be di...
bsd-3-clause
-5,990,776,191,799,713,000
24.53125
80
0.588739
false
4.064677
false
false
false
omniti-labs/circus
src/circus/module/activate_metrics.py
1
2178
#!/usr/bin/env python __cmdname__ = 'activate_metrics' __cmdopts__ = '' import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account def command(self, opts, pattern, *metrics_to_enable): """Activate metrics for checks...
isc
-3,565,853,606,667,211,000
33.571429
73
0.495409
false
4.140684
false
false
false
calico/basenji
bin/basenji_sad_ref_multi.py
1
6256
#!/usr/bin/env python # Copyright 2017 Calico LLC # 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 agr...
apache-2.0
9,131,499,811,372,269,000
34.146067
84
0.598465
false
3.728248
false
false
false
ecell/ecell3
ecell/frontend/session-monitor/ecell/ui/osogo/Window.py
1
7162
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # This file is part of the E-Cell System # # Copyright (C) 1996-2016 Keio University # Copyright (C) 2008-2016 RIKEN # Copyright (C) 2005-2009 The Molecular Sciences Institute # #:::::::::::::::::::::::::::::::::::::::...
lgpl-3.0
2,354,077,049,409,439,000
32.46729
88
0.573164
false
4.092571
false
false
false
quadrismegistus/prosodic
prosodic/lib/MeterPosition.py
1
2254
import string from copy import copy from Parse import Parse class MeterPosition(Parse): def __init__(self, meter, meterVal): # meterVal represents whether the position is 's' or 'w' self.slots=[] self.children=self.slots self.meter = meter self.constraintScores = {} for constraint in meter.constraints: se...
gpl-3.0
392,770,631,571,258,000
22.479167
94
0.661934
false
2.793061
false
false
false
lundjordan/releasewarrior-2.0
releasewarrior/balrog.py
1
6332
import logging import re import requests from copy import deepcopy from mozilla_version.balrog import BalrogReleaseName BALROG_API_ROOT = 'https://aus5.mozilla.org/api/v1' log = logging.getLogger(name=__name__) class BalrogError(Exception): pass class TooManyBlobsFoundError(BalrogError): def __init__(sel...
mpl-2.0
-8,396,954,852,463,452,000
32.680851
99
0.643399
false
3.647465
false
false
false
ImTheLucKyOne/check_mk_emcunity
emcunity300/perfometer/emcunity_lun.py
1
2232
#!/usr/bin/env python # -*- encoding: utf-8; py-indent-offset: 4 -*- # # Written / Edited by Philipp Näther # philipp.naether@stadt-meissen.de # Perf-O-Meters for Check_MK's checks # # They are called with: # 1. row -> a dictionary of the data row with at least the # keys "service_perf_data", "service_state" and "s...
gpl-3.0
892,500,301,874,742,900
38.839286
84
0.628418
false
3.051984
false
false
false
kennethcc2005/yahoo_finance_stocks
candle_output.py
1
85023
''' Candlestick pattern functions in class type. Only need to run output function to build the dataframe for all patterns for one symbol. ''' import numpy as np import pandas as pd import json import pandas.io.data as web from datetime import date, datetime, timedelta from collections import defaultdict star...
mit
3,866,151,280,402,048,000
51.540932
247
0.576738
false
3.292147
false
false
false
amlight/ofp_sniffer
ofp_sniffer.py
1
7990
#!/usr/bin/env python3.6 """ This code is the AmLight OpenFlow Sniffer Author: AmLight Dev Team <dev@amlight.net> """ import sys import logging.config import time import threading import yaml from libs.core.printing import PrintingOptions from libs.core.sanitizer import Sanitizer from libs.core.topo_reader im...
apache-2.0
-7,528,601,546,497,908,000
31.479675
79
0.561702
false
4.380482
false
false
false
kitchenbudapest/vr
hud.py
1
4413
## INFO ######################################################################## ## ## ## plastey ## ## ======= ...
gpl-3.0
2,802,582,969,299,939,300
48.58427
80
0.363245
false
4.765659
false
false
false
SakuradaJun/django-rest-auth
rest_auth/registration/serializers.py
1
3313
from django.http import HttpRequest from rest_framework import serializers from requests.exceptions import HTTPError from allauth.socialaccount.helpers import complete_social_login class SocialLoginSerializer(serializers.Serializer): access_token = serializers.CharField(required=False) code = serializers.Cha...
mit
-789,387,178,647,441,900
32.464646
86
0.56233
false
4.829446
false
false
false
lord63/zhihudaily
zhihudaily/views/utils.py
1
1116
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from flask import send_file, g, Blueprint from zhihudaily.configs import Config from zhihudaily.crawler import Crawler from zhihudaily._compat import StringIO utils = Blueprint('utils', __name__) @utils.before_app_request def be...
mit
1,451,385,733,581,734,100
25.571429
71
0.653226
false
3.392097
false
false
false
geometalab/G4SE-Compass
compass-api/G4SE/api/migrations/0004_geoservicemetadata.py
1
3940
# -*- coding: utf-8 -*- # Generated by Django 1.10.3.dev20161004124613 on 2016-10-10 12:42 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('api', '0003_recordtag'), ] operations = [ mig...
mit
7,452,857,091,811,495,000
76.254902
202
0.624365
false
3.943944
false
false
false
teran/bootloader-web
bootloader/tools/api/__init__.py
1
1159
from django.contrib.contenttypes.models import ContentType from rest_framework import viewsets from rest_framework.permissions import IsAdminUser from tools.models import Agent, Credential from tools.serializers import AgentSerializer, CredentialSerializer class CredentialViewSet(viewsets.ModelViewSet): queryset ...
gpl-2.0
867,047,386,432,015,700
34.121212
73
0.704918
false
4.184116
false
false
false
euccas/CodingPuzzles-Python
leet/source/searchDFS/combinations.py
1
1336
class Solution: """ @param n: Given the range of numbers @param k: Given the numbers of combinations @return: All the combinations of k numbers out of 1..n """ def combine(self, n, k): # write your code here if n is None or k is None: return [] self.result = ...
mit
-4,516,779,564,583,097,300
25.72
68
0.505988
false
3.660274
false
false
false
gkoelln/youtube-dl
youtube_dl/extractor/svt.py
1
9890
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( determine_ext, dict_get, int_or_none, try_get, urljoin, compat_str, ) class SVTBaseIE(Info...
unlicense
-2,224,861,653,834,999,800
34.060284
133
0.516132
false
3.646994
false
false
false
Cosiroc/bleau-database
BleauDataBase/GeoFormat/GPX.py
2
6322
#################################################################################################### # # Bleau Database - A database of the bouldering area of Fontainebleau # Copyright (C) 2015 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
agpl-3.0
4,304,305,302,924,749,300
33.546448
116
0.465201
false
4.070831
false
false
false
hugosenari/simplui
simplui/container.py
1
5994
# ---------------------------------------------------------------------- # Copyright (c) 2009 Tristam MacDonald # 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-3-clause
-8,756,964,571,835,446,000
28.239024
72
0.685352
false
3.36175
false
false
false
dwavesystems/dimod
tests/test_variables.py
1
6327
# Copyright 2018 D-Wave Systems 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...
apache-2.0
2,359,141,378,282,986,000
31.446154
79
0.599178
false
3.954375
true
false
false
micolous/cfsprinter
src/pagerprinter/plugins/skypesms.py
1
2611
#!/usr/bin/env python """ Skype SMS plugin for pagerprinter. Copyright 2011-2013 Michael Farrell <http://micolous.id.au/> 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 Licen...
gpl-3.0
4,111,728,540,101,125,000
32.474359
71
0.733435
false
3.472074
false
false
false