repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
Erotemic/ibeis
ibeis/algo/graph/tests/test_graph_iden.py
1
5170
import utool as ut from ibeis.algo.graph import demo from ibeis.algo.graph.state import (POSTV, NEGTV, INCMP, UNREV) def test_incomp_inference(): infr = demo.demodata_infr(num_pccs=0) # Make 2 consistent and 2 inconsistent CCs infr.add_feedback(( 1, 2), POSTV) infr.add_feedback(( 2, 3), POSTV) i...
apache-2.0
7,434,031,815,099,311,000
34.170068
91
0.604836
false
ZhaoYonggang198/xpdiff
default_visitor.py
1
1875
try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET def element_to_string(element): return ET.tostring(element).replace("\r", "").replace("\n", "").replace("\t", "") class StdVisitor: def out(self, path, op, content): print("\t\t\t".join(["".join([e.tag for e in...
gpl-2.0
-1,052,354,106,352,850,300
35.057692
144
0.695467
false
tyb0807/angr
angr/analyses/datagraph_meta.py
1
3365
import logging from ..sim_procedure import SimProcedure l = logging.getLogger("angr.analyses.datagraph_meta") class DataGraphMeta(object): def __init__(self): self._p = None def _irsb(self, in_state): """ We expect a VSA state here. """ return self._p.factory.success...
bsd-2-clause
4,330,097,198,174,246,000
32.316832
109
0.539079
false
timgraham/django-cms
cms/utils/__init__.py
1
3222
# -*- coding: utf-8 -*- # TODO: this is just stuff from utils.py - should be splitted / moved from django.conf import settings from django.core.files.storage import get_storage_class from django.utils.functional import LazyObject from cms import constants from cms.utils.conf import get_cms_setting from cms.utils.conf ...
bsd-3-clause
-981,943,898,858,118,300
37.357143
102
0.678461
false
Avanish14/SmartModem
AMrx.py
1
3114
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Amrx # Generated: Tue Aug 8 20:51:18 2017 ################################################## from gnuradio import analog from gnuradio import blocks from gnuradio import eng_notatio...
mit
3,089,442,554,736,402,000
32.847826
159
0.513487
false
flgiordano/netcash
+/google-cloud-sdk/lib/surface/bigtable/clusters/create.py
1
2807
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
bsd-3-clause
-3,217,356,276,089,724,400
34.0875
79
0.688279
false
borysf/SublimeGerrit
core/change_view.py
1
35778
""" SublimeGerrit - full-featured Gerrit Code Review for Sublime Text Copyright (C) 2015 Borys Forytarz <borys.forytarz@gmail.com> 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...
gpl-2.0
-7,675,779,269,582,515,000
34.284024
167
0.530829
false
lewisodriscoll/sasview
src/examples/test_copy_print.py
3
3324
""" Test application that uses plottools An application required by the REFL group and mainly test copy and print. The following is a checklist of functionality to look for while testing: 1- Start the application: the graph should have theory curve, experimental data, chisq with a white background. 2- Hove...
bsd-3-clause
2,389,734,250,786,010,000
27.410256
73
0.599579
false
lduarte1991/edx-platform
openedx/core/djangoapps/content/block_structure/block_structure.py
1
30213
""" Module with family of classes for block structures. BlockStructure - responsible for block existence and relations. BlockStructureBlockData - responsible for block & transformer data. BlockStructureModulestoreData - responsible for xBlock data. The following internal data structures are implemented: ...
agpl-3.0
4,509,966,314,693,648,000
34.797393
112
0.61884
false
udoprog/ontv
ontv/__init__.py
1
9501
import os import argparse import logging import blessings import random import contextlib import shutil import datetime import sys from .api import TheTVDBApi from .action.sync import setup as sync_setup, action as sync_action from .action.search import setup as search_setup from .action.add import setup as add_setup ...
gpl-3.0
-147,090,558,213,285,020
24.268617
79
0.599411
false
markope/AutobahnPython
autobahn/wamp/protocol.py
1
57431
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
-1,728,182,212,145,266,200
42.14876
184
0.517195
false
Statistica/676-candidates
candidates_by_party_greater_100k.py
1
1686
# -*- coding: utf-8 -*- # Written by Jonathan Saewitz, released May 24th, 2016 for Statisti.ca # Released under the MIT License (https://opensource.org/licenses/MIT) import csv, plotly.plotly as plotly, plotly.graph_objs as go, requests from collections import Counter from bs4 import BeautifulSoup #the following cand...
mit
5,861,080,122,107,225,000
26.16129
144
0.69715
false
bat-serjo/vivisect
vivisect/qt/main.py
1
19470
import os import sys import vstruct.qt as vs_qt import envi.expression as e_expr import envi.qt.config as e_q_config import vqt.main as vq_main import vqt.colors as vq_colors import vqt.qpython as vq_python import vqt.application as vq_app import vivisect.cli as viv_cli import vivisect.base as viv_base import vivise...
apache-2.0
4,351,268,125,491,112,400
37.251473
99
0.632922
false
antechrestos/cf-python-client
integration/test_navigation.py
1
3323
import logging import unittest from config_test import build_client_from_configuration _logger = logging.getLogger(__name__) class TestNavigation(unittest.TestCase): def test_all(self): client = build_client_from_configuration() for organization in client.v2.organizations: if organiz...
apache-2.0
-7,243,593,538,386,210,000
57.298246
117
0.443575
false
rusucosmin/courses
ubb/algebra/sort_partial.py
1
2185
import urllib2 import operator import os from bs4 import BeautifulSoup class Student: def __init__(self, name, grade): self._name = name self._grade = grade def __repr__(self): return self._name + " " + str(self._grade) if not os.path.exists('partial.html'): response = urllib2.urlopen('https://docs.google....
mit
-1,714,788,340,226,504,700
24.705882
123
0.652632
false
atiberghien/makerscience-server
makerscience_profile/migrations/0002_auto__add_field_makerscienceprofile_activity__add_field_makersciencepr.py
1
6258
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'MakerScienceProfile.activity' db.add_column(u'makerscienc...
agpl-3.0
-5,486,581,171,599,004,000
66.301075
195
0.57047
false
inspirehep/invenio-beard
tests/test_matching.py
1
5408
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
-7,019,358,896,359,585,000
33.44586
79
0.550666
false
sharad/calibre
src/calibre/gui2/metadata/diff.py
1
22039
#!/usr/bin/env python # 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 os from collections import OrderedDict, namedtuple from functools impo...
gpl-3.0
-7,149,461,798,197,517,000
33.816746
142
0.568084
false
sljrobin/listodo
listodo.py
1
2521
#!/usr/bin/python # -*- coding: utf-8 -*- import collections import os import re import sys from colorama import init from colorama import Fore, Back, Style init() ########################################################################################## PATTERN_01 = r'# TODO' #####################################...
gpl-2.0
-883,525,310,071,355,800
28.647059
125
0.441667
false
wichmann/PythonExamples
network/bot.py
1
1620
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Name: bot - simple example for a telegram bot # Usage: ./bot.py # Author: Christian Wichmann # Created: 13.06.2019 # Copyright: (c) Christian Wichmann 2019 # Licence: GNU GPL #--...
gpl-2.0
-6,965,951,586,369,869,000
34.704545
103
0.639628
false
ddimensia/RaceCapture_App
autosportlabs/racecapture/views/configuration/rcp/scriptview.py
1
6939
import kivy kivy.require('1.9.1') from kivy.clock import Clock from kivy.uix.boxlayout import BoxLayout from kivy.uix.stacklayout import StackLayout from pygments.formatters.bbcode import BBCodeFormatter #explicit import to make pyinstaller work. do not remove from kivy.uix.codeinput import CodeInput from kivy.uix.text...
gpl-3.0
1,397,044,310,594,265,900
34.403061
112
0.637556
false
RogueProeliator/IndigoPlugin-TiVo-Network-Remote
TiVo Network Remote.indigoPlugin/Contents/Server Plugin/plugin.py
1
10778
#! /usr/bin/env python # -*- coding: utf-8 -*- #///////////////////////////////////////////////////////////////////////////////////////// #///////////////////////////////////////////////////////////////////////////////////////// # TiVo Network Remote Control by RogueProeliator <rp@rogueproeliator.com> # Indigo plugin ...
mit
-6,557,693,221,188,826,000
41.105469
172
0.518556
false
askinteractive/mezzanine-advanced-admin
test_mezzanine_advanced_admin/test_mezzanine_advanced_admin/settings.py
1
2566
""" Django settings for test_mezzanine_advanced_admin 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....
apache-2.0
4,078,314,573,051,210,000
24.919192
91
0.727981
false
Kivvix/stage-LPC
trackSrc/density.py
1
4448
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @package density # @author J. Massot # @date 2014-04-30 # # @brief Calculate density of pictures into strip 82 # # @details Search all coordinates of each `fits` file and count density from numpy import * import math # to manipulate fits files import pyfits impor...
mit
-7,318,810,387,316,323,000
24.819767
121
0.621031
false
bdfoster/blumate
blumate/components/binary_sensor/rest.py
1
2622
""" Support for RESTful binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.rest/ """ import logging from blumate.components.binary_sensor import (BinarySensorDevice, SENSOR_CLASSES)...
mit
2,941,729,966,283,463,000
29.488372
74
0.640351
false
Berling/project-zombye-exporter
io_exporter_zombye/export_zmdl.py
1
8360
# The MIT License (MIT) # # Copyright (c) 2015 Georg Schäfer # # 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, mod...
mit
1,366,710,334,387,287,800
30.662879
105
0.694581
false
Som-Energia/intercoop
python/setup.py
1
1213
#!/usr/bin/env python from setuptools import setup, find_packages readme = open("README.rst").read() setup( name = "intercoop", version = "0.2.1", description = "Intercooperation library", author = "Som Energia SCCL", author_email = "info@somenergia.coop", url = 'https://github.com/Som-Energia/intercoop', lo...
agpl-3.0
6,369,653,243,109,251,000
24.270833
87
0.661995
false
jeremyjbowers/cfbreference_com
rankings/models.py
1
2698
from django.db import models from college.models import College, Player, Week, CollegeYear RANKINGTYPE_CHOICES = ( ('T', 'Team'), ('P', 'Player'), ) CURRENT_SEASON = 2011 class RankingType(models.Model): name = models.CharField(max_length=75) slug = models.SlugField(max_length=75) typename = mode...
apache-2.0
-4,138,870,600,021,120,500
33.151899
99
0.674574
false
thomasrotter/sublimetext-cfml
cfml_plugin.py
1
3757
import sublime import sublime_plugin from HTML.html_completions import HtmlTagCompletions from .src import command_list, completions, events, utils, _plugin_loaded for command in command_list: globals()[command.__name__] = command def plugin_loaded(): _plugin_loaded() class CfmlEventListener(sublime_plugin...
mit
3,923,026,118,441,820,000
36.949495
157
0.607932
false
fake-name/IntraArchiveDeduplicator
Tests/Test_BKTree_Issue_2.py
1
3225
# from cbktree import BkHammingTree, explicitSignCast import pyximport print("Have Cython") pyximport.install() import deduplicator.cyHamDb as hamDb int_bits = lambda b: hamDb.explicitSignCast(int(b, 2)) TEST_DATA = { # Format: id -> bitstring 1: int_bits('1011010010010110110111111000001000001000100011110001010...
bsd-3-clause
-131,132,192,098,859,400
25.434426
91
0.710388
false
ubc/compair
compair/api/comparison_example.py
1
7395
import dateutil.parser from bouncer.constants import READ, EDIT, CREATE, DELETE, MANAGE from flask import Blueprint from flask_login import login_required, current_user from flask_restful import Resource, marshal from flask_restful.reqparse import RequestParser from sqlalchemy import desc, or_, func, and_ from sqlalche...
gpl-3.0
9,070,846,310,897,019,000
41.751445
104
0.677485
false
Bitcoin-ABC/bitcoin-abc
test/functional/test_framework/key.py
1
13283
#!/usr/bin/env python3 # Copyright (c) 2019 Pieter Wuille # Copyright (c) 2019-2020 The Bitcoin developers """Test-only secp256k1 elliptic curve implementation WARNING: This code is slow, uses bad randomness, does not properly protect keys, and is trivially vulnerable to side channel attacks. Do not use for anything ...
mit
-4,431,894,373,029,228,500
29.326484
94
0.490251
false
fbradyirl/home-assistant
homeassistant/components/smappee/sensor.py
1
8496
"""Support for monitoring a Smappee energy sensor.""" from datetime import timedelta import logging from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT from homeassistant.helpers.entity import Entity from . import DATA_SMAPPEE _LOGGER = logging.getLogger(__name__) SENSOR_PREFIX = "Smappee" SENSOR_TYPE...
apache-2.0
-1,216,471,522,099,342,000
33.392713
86
0.486168
false
mganeva/mantid
Framework/PythonInterface/mantid/plots/modest_image/modest_image.py
1
10141
# v0.2 obtained on March 12, 2019 """ Modification of Chris Beaumont's mpl-modest-image package to allow the use of set_extent. """ from __future__ import print_function, division import matplotlib rcParams = matplotlib.rcParams import matplotlib.image as mi import matplotlib.colors as mcolors import matplotlib.cbook...
gpl-3.0
5,723,269,420,831,283,000
32.803333
98
0.601617
false
robiame/AndroidGeodata
pil/GimpGradientFile.py
1
3292
# # Python Imaging Library # $Id$ # # stuff to read (and render) GIMP gradient files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # from math import pi, log, si...
mit
-3,854,099,970,673,436,000
24.548387
77
0.492406
false
nguyeho7/CZ_NER
src/webservice/server.py
1
1188
from flask import Flask from flask import request, render_template, jsonify from src.common.NER_utils import transform_dataset_web from src.CRF_NER.CRF_NER import parse_commands import pycrfsuite model = "1_nbr" def init(filename = "model.txt"): with open(filename) as f: line = f.read() tokens = ...
mit
9,149,369,679,002,608,000
26.627907
87
0.636364
false
gurneyalex/odoo
addons/sale/wizard/payment_acquirer_onboarding_wizard.py
6
1520
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class PaymentWizard(models.TransientModel): """ Override for the sale quotation onboarding panel. """ _inherit = 'payment.acquirer.onboarding.wizard' _name = 'sale.paym...
agpl-3.0
8,211,488,196,456,862,000
40.081081
100
0.671053
false
sharkeyck/Lidar
lidar_edited.py
1
4303
#Display Data from Neato LIDAR #based on code from Nicolas "Xevel" Saugnier #requires vpython and pyserial import thread, time, sys, traceback, math, struct COM_PORT = "COM4" # example: 5 == "COM6" == "/dev/tty5" BAUD_RATE = 115200 FPS = 60 OFFSET = 140 from visual import * point = points(pos=[(0,0,0) for i in range...
apache-2.0
-2,723,072,787,634,289,000
32.625
125
0.589589
false
naokits/adminkun_viewer_old
Server/gaeo/gaeo/view/helper/form.py
1
6971
# -*- coding: utf-8 -*- # # Copyright 2008 GAEO Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
8,629,536,738,327,995,000
54.744
182
0.603042
false
walac/build-mozharness
configs/luciddream/linux_config.py
1
1816
# This is a template config file for luciddream production. import os import platform HG_SHARE_BASE_DIR = "/builds/hg-shared" if platform.system().lower() == 'darwin': xre_url = "http://tooltool.pvt.build.mozilla.org/build/sha512/4d8d7a37d90c34a2a2fda3066a8fe85c189b183d05389cb957fc6fed31f10a6924e50c1b84488ff61c01...
mpl-2.0
-3,027,394,259,013,003,300
40.272727
195
0.699339
false
s3rvac/git-branch-viewer
docs/conf.py
1
8307
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # git-branch-viewer documentation build configuration file, created by # sphinx-quickstart on Wed May 7 15:45:21 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
bsd-3-clause
-4,878,848,400,283,012,000
30.706107
79
0.707355
false
malept/pyoath-toolkit
oath_toolkit/django_otp/hotp/tests.py
1
2720
# -*- coding: utf-8 -*- # # Originally from django-otp 0.2.2: # * django_otp/plugins/otp_hotp/tests.py # # Copyright (c) 2012, Peter Sagerson # Copyright (c) 2014, 2015, Mark Lee # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
apache-2.0
-6,234,123,647,860,257,000
39
79
0.717279
false
theo-l/django
tests/signing/tests.py
6
6968
import datetime from django.core import signing from django.test import SimpleTestCase from django.test.utils import freeze_time from django.utils.crypto import InvalidAlgorithm class TestSigner(SimpleTestCase): def test_signature(self): "signature() method should generate a signature" signer = ...
bsd-3-clause
2,035,370,789,681,449,500
35.867725
94
0.573048
false
PrincessTeruko/TsunArt
tags/parser.py
1
4394
from tags.models import Tag import collections, copy, json, re, urllib.parse sample = 'young nia-teppelin with short multicolored hair and cat ears; yoko-littner with flame bikini, pink stockings, and long red hair without gun' DEFAULT_TAG_DICT = {'nouns': collections.OrderedDict({}), 'filters': {}} def format_quer...
mit
-186,066,429,960,326,880
24.252874
150
0.599681
false
our-city-app/oca-backend
src/rogerthat_service_api_calls.py
1
1191
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
apache-2.0
-4,394,340,451,726,929,000
36.21875
98
0.753149
false
mattbasta/amo-validator
tests/compat/test_gecko10.py
1
2585
from helper import CompatTestCase from validator.compat import FX10_DEFINITION class TestFX10Compat(CompatTestCase): """Test that compatibility tests for Firefox 10 are properly executed.""" VERSION = FX10_DEFINITION def test_isSameNode(self): """Test that `isSameNode` is flagged in Gecko 10."""...
bsd-3-clause
-3,450,941,809,082,788,000
38.769231
78
0.620503
false
wtodom/spotipi
spotipi/sandbox/sandbox.py
1
1256
from __future__ import print_function, unicode_literals import getpass import sys import threading import spotify if sys.argv[1:]: track_uri = sys.argv[1] else: track_uri = 'spotify:track:6xZtSE6xaBxmRozKA0F6TA' # Assuming a spotify_appkey.key in the current dir session = spotify.Session() # Process event...
mit
-156,695,434,146,077,950
21.052632
79
0.740446
false
kalamaico/FootballManager
resources/random_generator.py
1
1176
#!python import random, time class RandomGenerator: def __init__(self): random.seed(time.clock()) def generate_uniform(self, min_v, max_v): return random.uniform(min_v, max_v) def generate_int(self, min_v, max_v): return random.randint(min_v, max_v) d...
lgpl-3.0
2,506,940,250,891,998,700
26.348837
118
0.548469
false
chaomodus/pymetasurf
examples/shape.py
1
6757
# An example of using pymetasurf to create objects in Panda3d # Written by Cas Rusnov <rusnovn@gmail.com> import pymetasurf import pymetasurf.shapes as shapes from pandac.PandaModules import loadPrcFile configfiles = ["./Config.prc",] for prc in configfiles: loadPrcFile(prc) import sys from direct.showbase.ShowB...
lgpl-2.1
-2,868,508,953,676,868,600
33.299492
119
0.605594
false
oleiade/Hurdles
hurdles/referee/importer.py
1
3834
# -*- coding: utf-8 -*- # Copyright (c) 2012 theo crevon # # See the file LICENSE for copying permission. # # Content of this module was extracted from python nose # project importer.py module. # # See : https://github.com/nose-devs/nose/blob/master/nose/importer.py # import os import sys import imp class Importe...
mit
-3,160,964,215,010,545,700
33.854545
78
0.526604
false
spolanski/WirnikApp
wirnikApp/calculix.py
1
6259
# -*- coding: utf-8 -*- """ W tym pliku następuje konwersja pliku wsadowego z programu GMSH na plik do programu Calculix. """ import numpy as np import os def zmianaElem(mesh, stMesh): """ Funkcja zmienia formę zapisu elementów na odpowiednia dla Calculix'a. """ np.set_printoptions(threshold='nan') ...
gpl-3.0
9,200,666,231,387,315,000
29.970149
184
0.597686
false
andaviaco/tronido
src/syntax/statements/ifstat.py
1
1530
from lexer import lang from ..tree import Node class IfStat(Node): """docstring for IfStat.""" def __init__(self, exp, stats, else_stat, token): super().__init__(None, token) self.exp = exp or Node(None, token) self.stats = stats self.else_stat = else_stat def process_sema...
mit
-769,946,028,036,600,800
34.581395
146
0.617647
false
dimaspivak/docker-py
tests/integration/api_container_test.py
1
49036
import os import signal import tempfile import docker from docker.constants import IS_WINDOWS_PLATFORM from docker.utils.socket import next_frame_size from docker.utils.socket import read_exactly import pytest import six from .base import BUSYBOX, BaseAPIIntegrationTest from .. import helpers from ..helpers import ...
apache-2.0
6,206,647,306,667,187,000
36.460657
79
0.592728
false
tensorflow/model-analysis
tensorflow_model_analysis/eval_saved_model/exporter_test.py
1
6887
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
7,243,164,064,854,071,000
38.130682
98
0.703354
false
puttarajubr/commcare-hq
corehq/apps/es/tests.py
1
9490
import json from unittest import TestCase from corehq.elastic import ESError, SIZE_LIMIT from .es_query import HQESQuery, ESQuerySet from . import facets from . import filters from . import forms, users class ElasticTestMixin(object): def checkQuery(self, query, json_output): msg = "Expected Query:\n{}\n...
bsd-3-clause
2,013,373,200,023,993,000
32.892857
102
0.400738
false
hbldh/pymetawear
pymetawear/client.py
1
5352
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Main module for PyMetaWear .. moduleauthor:: hbldh <henrik.blidh@nedomkull.com> Created on 2016-03-30 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from mbientlab.metawear import Met...
mit
2,742,300,826,915,095,000
29.758621
79
0.625187
false
HAZARDU5/sgdialer
src/nz/co/hazardmedia/sgdialer/config/Config.py
1
4698
__author__ = 'Michael Andrew michael@hazardmedia.co.nz' class Config(object): """ Config class """ sound_path = 'assets/sounds' #path from src folder to sound assets point_of_origin_code = 0 #index of the point of origin address_data_file_path = "data/addresses.xml" #path from src folder to data file...
mit
-284,871,444,635,444,480
32.564286
119
0.331843
false
atiti/crashcollector
crashcollector.py
1
11865
#!/usr/bin/env python from wsgiref.simple_server import make_server import os, os.path, sys import cgi, urlparse import random, string import subprocess import time site_name = 'http://crashes.sirikata.com' id_file = 'data/__id' def str_to_bool(v): return not (len(v) == 0 or v.lower() in ['no', 'false', '0']) d...
gpl-2.0
6,210,942,538,337,298,000
32.803419
138
0.582469
false
McNetic/CouchPotatoServer-de
couchpotato/core/media/movie/providers/info/omdbapi.py
1
5734
import json import re import traceback from couchpotato import Env from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import tryInt, tryFloat, splitString from couchpotato.core.logger import CPLog from couchpotato.cor...
gpl-3.0
-3,953,657,223,573,458,400
32.337209
133
0.487443
false
mariusbaumann/pyload
module/plugins/hoster/FilesMailRu.py
1
3878
# -*- coding: utf-8 -*- import re from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster from module.plugins.Plugin import chunks def getInfo(urls): result = [] for chunk in chunks(urls, 10): for url in chunk: html = getURL(url) if r'<div cl...
gpl-3.0
-4,968,958,604,909,396,000
35.584906
119
0.571171
false
aldanor/pytest-benchmark
src/pytest_benchmark/histogram.py
1
3331
from pytest_benchmark.utils import time_unit try: from pygal.graph.box import Box from pygal.graph.box import is_list_like from pygal.style import DefaultStyle except ImportError as exc: raise ImportError(exc.args, "Please install pygal and pygaljs or pytest-benchmark[histogram]") class Plot(Box): ...
bsd-2-clause
9,102,567,736,748,344,000
30.72381
113
0.518163
false
DaveA50/lbry
lbrynet/dht/protocol.py
1
14824
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
mit
9,017,129,422,018,438,000
45.470219
174
0.587156
false
microcom/microcom-runbot
runbot/res_config.py
1
2935
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
74,139,335,604,883,420
47.916667
90
0.634072
false
DistrictDataLabs/django-data-product
irisfinder/views.py
1
1948
from django.shortcuts import render import datetime from models import Iris, SVMModels from forms import UserIrisData import sklearn from sklearn import svm from sklearn.cross_validation import train_test_split import numpy as np from django.conf import settings import cPickle import scipy from pytz import timezone imp...
apache-2.0
-5,062,828,488,555,508,000
37.215686
94
0.606263
false
tarsqi/ttk
docmodel/docstructure_parser.py
1
3957
"""Document Structure Parser. This module contains a minimal document structure parser. It is meant as a temporary default and will be replaced by more sophisticated parsers and these parsers will act more like the other tarsqi components. The main goal of the parser is to add docelement tags to the tag repository on...
apache-2.0
4,239,169,418,567,864,000
34.648649
82
0.64468
false
amitdeutsch/oppia
core/domain/user_jobs_one_off_test.py
1
24075
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-7,254,420,924,280,089,000
42.456679
90
0.633063
false
mafagafogigante/scripts
docdist.py
1
1991
#!/usr/bin/env python3 import argparse import collections import string def make_punctuation_translation_table(): # It is safer to replace punctuation by spaces as it prevents merging incorrectly separated words together. return str.maketrans(string.punctuation, ' ' * len(string.punctuation)) def count_wor...
bsd-2-clause
4,144,811,424,627,787,000
35.851852
111
0.611055
false
pfmoore/invoke
invoke/platform.py
1
5500
""" Platform-specific code lives here. This is its own module to abstract away what would otherwise be distracting logic-flow interruptions. """ from contextlib import contextmanager import select import sys # TODO: move in here? They're currently platform-agnostic... from .util import has_fileno, isatty WINDOWS =...
bsd-2-clause
5,736,880,818,842,410,000
32.13253
79
0.657091
false
ivanprjcts/equinox-spring16-API
makesdks/swagger_reader.py
1
1557
import os import json from sdklib.util.urlvalidator import urlsplit class SwaggerReader(object): def __init__(self, folder): files = os.listdir(folder) self.apis = [] for file_elem in files: print '%s/%s' % (folder, file_elem) f = open('%s/%s' % (folder, file_el...
lgpl-3.0
-4,964,758,851,449,045,000
26.803571
74
0.514451
false
braingram/pysump
sump/interface.py
1
10286
#!/usr/bin/env python # import sys import logging import struct import serial from . import errors from . import fio from . import ops # import settings this as settings_module to avoid name conflicts from . import settings as settings_module logger = logging.getLogger(__name__) logger.addHandler(logging.StreamHan...
gpl-3.0
8,525,984,057,080,370,000
34.839721
78
0.525277
false
vmalloc/dessert
tests/test_dessert.py
1
3611
from _pytest.assertion.rewrite import AssertionRewritingHook as PytestRewriteHook import os import shutil import sys from contextlib import contextmanager from tempfile import mkdtemp import emport import dessert import pytest def test_dessert(module): with pytest.raises(AssertionError) as error: module...
mit
-7,717,314,021,297,973,000
24.076389
81
0.656328
false
oculusstorystudio/kraken
Python/kraken/plugins/canvas_plugin/graph_manager.py
1
20242
"""Kraken Canvas - Canvas Graph Manager module. Classes: GraphManager -- Node management. """ import json from kraken.core.kraken_system import ks # import FabricEngine.Core as core class GraphManager(object): """Manager object for taking care of all low level Canvas tasks""" __dfgHost = None __dfgBi...
bsd-3-clause
3,717,452,607,569,508,400
33.192568
110
0.564025
false
timsnyder/bokeh
bokeh/util/tests/test_compiler.py
1
7783
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
1,242,705,551,875,900,000
32.692641
116
0.484903
false
Volvagia356/pixiv-downloader
pixivdl-gui.py
1
8165
#!/usr/bin/env python import os,sys import pickle import threading from Queue import Queue from pixiv_api import Pixiv import pixivdl import Tkinter import ttk import tkFileDialog import tkMessageBox class Application(Tkinter.Frame): def __init__(self,master=None): Tkinter.Frame.__init__(self,master) ...
bsd-3-clause
-6,654,435,745,410,648,000
37.885714
92
0.595224
false
savi-dev/quantum
quantum/plugins/cisco/nova/quantum_port_aware_scheduler.py
1
4417
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, 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...
apache-2.0
-547,319,518,738,498,100
37.408696
78
0.620331
false
zsdonghao/tensorlayer
tensorlayer/models/mobilenetv1.py
1
7772
#! /usr/bin/python # -*- coding: utf-8 -*- """MobileNet for ImageNet.""" import os import tensorflow as tf from tensorlayer import logging from tensorlayer.layers import Layer from tensorlayer.layers import BatchNormLayer from tensorlayer.layers import Conv2d from tensorlayer.layers import DepthwiseConv2d from tens...
apache-2.0
8,372,317,474,735,186,000
40.550802
165
0.600257
false
pombredanne/parakeet
parakeet/syntax/wrappers.py
2
1799
from .. import names, prims from ..ndtypes import ScalarT, Type, type_conv from .. syntax import FormalArgs, Var, UntypedFn, Return, PrimCall, Expr, Cast _untyped_fn_cache = {} def simple_untyped_fn(name, expr, n_inputs = 1, fixed_args =...
bsd-3-clause
4,797,160,838,807,259,000
34.294118
89
0.613118
false
Timtam/cards-against-humanity
editor/card_panel.py
1
5429
from const import * from shared.card import CARD_BLACK, CARD_WHITE, Card class CardPanel(wx.Panel): def __init__(self, parent, card_id=-1, size=(ELEMENT_SIZE, ELEMENT_SIZE), text="", card_type=CARD_WHITE): wx.Panel.__init__(self, parent=parent, size=size, na...
mit
587,073,677,821,811,600
30.563953
86
0.664948
false
neopenx/Dragon
Dragon/python/dragon/vm/tensorflow/ops/array_ops.py
1
1712
# -------------------------------------------------------- # TensorFlow @ Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- __all__ = [ 'expand_dims', 'shape', 'zeros', 'ones', 'placeholder', 'concat', 'transpose', 'til...
bsd-2-clause
-7,993,156,920,585,479,000
20.948718
72
0.619743
false
trustly/trustly-client-python
trustly/data/jsonrpcnotificationrequest.py
1
3241
""" The MIT License (MIT) Copyright (c) 2014 Trustly Group AB 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, me...
mit
-3,903,244,386,552,004,600
29.009259
131
0.639309
false
ActiveState/code
recipes/Python/543261_grade_keeper/recipe-543261.py
1
2222
#! /usr/bin/python # keep record of grades. Made by Caleb Herbert. 0.1-PUBLIC # NOTE! All letter answers are to be written in quotes (including dates)! print """############################################ # Welcome to Gradebook! v 0.1 # # YOUR LIGHT WEIGHT SCHOOL RECORD MANAGER! # #######################...
mit
1,034,287,084,774,473,300
44.346939
101
0.644914
false
bdyetton/prettychart
website/project/views/node.py
1
40848
# -*- coding: utf-8 -*- import logging import httplib as http import math from itertools import islice from flask import request from modularodm import Q from modularodm.exceptions import ModularOdmException, ValidationValueError from framework import status from framework.utils import iso8601format from framework.mo...
apache-2.0
5,665,274,761,575,757,000
29.190687
123
0.599001
false
qedsoftware/commcare-hq
corehq/apps/sms/migrations/0016_add_phonenumber.py
1
1393
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import dimagi.utils.couch.migration class Migration(migrations.Migration): dependencies = [ ('sms', '0015_rename_phonenumber_to_phoneblacklist'), ] operations = [ migrations.CreateMo...
bsd-3-clause
-8,969,480,971,465,646,000
41.212121
114
0.591529
false
CCI-Tools/ect-core
cate/ds/local.py
1
37425
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # 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 wi...
mit
7,336,491,333,073,004,000
44.034898
119
0.55737
false
Julius2342/pyvlx
pyvlx/api/get_state.py
1
1220
"""Module for retrieving gateway state from API.""" from pyvlx.dataobjects import DtoState from .api_event import ApiEvent from .frames import FrameGetStateConfirmation, FrameGetStateRequest class GetState(ApiEvent): """Class for retrieving gateway state from API.""" def __init__(self, pyvlx): """In...
lgpl-3.0
1,881,356,536,945,648,400
31.972973
84
0.665574
false
Slepice1/simple-web-generator
setup.py
1
9036
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import imp import subprocess ## Python 2.6 subprocess.check_output compatibility. Thanks Greg Hewgill! if 'check_output' not in dir(subprocess): def check_output(cmd_args, *args, **kwargs): proc = subprocess.Popen( ...
mit
-6,522,298,702,672,906,000
30.816901
113
0.65571
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
1
44961
## @file GenInfFile.py # # This file contained the logical of transfer package object to INF files. # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompa...
gpl-2.0
-570,540,731,257,356,700
38.965333
120
0.594916
false
btenaglia/hpc-historias-clinicas
hpc-historias-clinicas/inter_consultas/views.py
1
3625
# -*- coding: utf-8 -*- from django.shortcuts import render from django.views.generic import ListView, CreateView, UpdateView, DeleteView from django.contrib import messages from braces.views import LoginRequiredMixin from .models import InterConsultas from ..historias.models import Historias class InterConsultasMix...
bsd-3-clause
-1,438,764,979,979,284,000
34.480392
142
0.654324
false
mihneadb/suse_bug_reporter
bugreporter/gathering_modules/cmdline.py
1
1128
''' Copyright (C) 2011 Mihnea Dobrescu-Balaur This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in ...
gpl-2.0
3,967,432,557,353,816,000
31.228571
79
0.734043
false
alajara/servo
python/servo/command_base.py
1
24514
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
5,956,987,811,525,631,000
39.6534
104
0.587338
false
harisbal/pandas
pandas/tests/series/test_missing.py
1
51950
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta from distutils.version import LooseVersion import numpy as np from numpy import nan import pytest import pytz from pandas._libs.tslib import iNaT from pandas.compat import range from pandas.errors import PerformanceWarning impo...
bsd-3-clause
-3,133,288,874,449,598,000
38.148455
79
0.537478
false
SiLab-Bonn/basil
basil/utils/sim/BasilBusDriver.py
1
4344
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # # Initial version by Chris Higgs <chris.higgs@potentialventures.com> # # pylint: disable=pointless-stat...
bsd-3-clause
3,399,993,472,548,033,000
32.160305
88
0.548343
false
Alzon/senlin
senlin/db/sqlalchemy/models.py
1
14127
# 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 # distributed unde...
apache-2.0
487,316,643,626,262,300
38.794366
75
0.673533
false
ktok07b6/polyphony
tests/module/nesting03.py
1
1185
from polyphony import module from polyphony import testbench from polyphony import is_worker_running from polyphony.io import Port from polyphony.typing import int8 from polyphony.timing import clksleep, wait_value @module class Submodule: def __init__(self, param): self.i = Port(int8, 'in') self....
mit
4,188,471,329,536,636,400
23.183673
69
0.608439
false
moreati/gatspy
gatspy/periodic/modeler.py
1
9034
from __future__ import division, print_function import numpy as np from .optimizer import LinearScanOptimizer class PeriodicModeler(object): """Base class for periodic modeling""" def __init__(self, optimizer=None, fit_period=False, optimizer_kwds=None, *args, **kwargs): if optimize...
bsd-2-clause
-2,890,677,519,734,160,000
33.480916
79
0.584127
false
bionomicron/Redirector
util/FlatFileParser.py
1
14961
#!/usr/bin/env python ''' @author: Graham Rockwell @organization: Church Lab Harvard Genetics @version: 03/04/2013 --Rename to metabolic-model parser ''' import string, sets, re from util.Report import Report class TagedElement(dict): def __init__(self): self.annotation = {} def __str__...
mit
-9,134,324,332,474,609,000
29.532653
184
0.517078
false
hcmlab/nova
bin/cml/models/templates/continuous/video/tensorflow/interface.py
1
9317
import sys import importlib if not hasattr(sys, 'argv'): sys.argv = [''] #import tensorflow as tf import numpy as np import random #import time from xml.dom import minidom import os import shutil import site import pprint import h5py import imageio from skimage.transform import resize import site as s s.getusersite...
gpl-3.0
-711,394,796,639,481,900
32.039007
212
0.572073
false
Bolton-and-Menk-GIS/restapi
restapi/admin/utils.py
1
14423
from __future__ import print_function from .. import admin, has_arcpy, munch from ..rest_utils import JsonGetter, NameEncoder import os import json from six.moves import range __all__ = ['ServerAdministrator'] if has_arcpy: import arcpy mapping = getattr(arcpy, 'mapping' if hasattr(arcpy, 'mappi...
gpl-2.0
5,767,584,386,730,800,000
40.931548
193
0.511544
false
dropbox/changes
tests/changes/api/test_plan_options.py
1
1754
from changes.config import db from changes.models.option import ItemOption from changes.testutils import APITestCase class PlanOptionsListTest(APITestCase): def test_simple(self): project = self.create_project() plan = self.create_plan(project) path = '/api/0/plans/{0}/options/'.format(pl...
apache-2.0
697,624,649,123,126,100
26.84127
62
0.575827
false
sassoftware/mirrorball
updatebot/lib/util.py
1
7770
# # Copyright (c) SAS Institute, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
883,881,073,296,082,200
24.064516
80
0.587902
false