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
pombredanne/pdftables
test/test_comb.py
1
1990
#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-06-17 # -*- coding: utf-8 -*- """ comb tests """ import sys sys.path.append('code') from pdftables import (comb, comb_extend, comb_from_uppers_and_lowers, find_minima) from nose.tools import assert_equal...
bsd-2-clause
6,833,236,781,541,763,000
26.638889
72
0.622613
false
srcLurker/home-assistant
tests/test_core.py
1
23404
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access import asyncio import unittest from unittest.mock import patch, MagicMock from datetime import datetime, timedelta import pytz import homeassistant.core as ha from homeassistant.exceptions import InvalidEntityFormatError from home...
mit
-2,077,596,494,842,952,200
30.499327
79
0.587079
false
oshepherd/eforge
eforge/update/twitter/views.py
1
3164
# -*- coding: utf-8 -*- # EForge project management system, Copyright © 2010, Element43 # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWA...
isc
3,334,641,479,672,096,000
35.790698
79
0.702498
false
KhronosGroup/COLLADA-CTS
Core/Gui/Dialog/FBlessedViewerDialog.py
1
11440
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis...
mit
8,617,399,534,047,996,000
43.169884
466
0.603409
false
dimonaks/siman
siman/impurity.py
1
35842
from __future__ import division, unicode_literals, absolute_import import ctypes from tabulate import tabulate #from ctypes import * from ctypes import cdll from ctypes import c_float, byref import numpy as np import traceback, os, sys, datetime, glob, copy from siman import header from siman.header import print_...
gpl-2.0
590,717,953,333,718,100
35.314083
252
0.560488
false
psistrm12/rpiradio
buttonIO.py
1
2334
#!/usr/bin/env python # # Raspberry Pi input using buttons and rotary encoders # # Acknowledgement: This code is a variation oft the Rotary Switch Tutorial by Bob Rathbone. # See http://www.bobrathbone.com/raspberrypi_rotary.htm for further information! import RPi.GPIO as GPIO class PushButton: BUTTONDOWN = 1 BUT...
gpl-2.0
-9,129,966,791,251,890,000
21.442308
100
0.693231
false
jdugge/GridToTIN
test/test_quadedge.py
1
1157
import unittest import quadedge as qe class TestQuadedge(unittest.TestCase): def test_quadedge(self): q = qe.QuadEdge() e = q.base self.assertIs(e, q.edges[0]) self.assertIsNot(e, e.rot) self.assertIs(e._rot, e.rot) self.assertIs(e, e.rot.rot.rot.rot) self...
mit
4,214,614,945,183,003,000
21.686275
47
0.554019
false
spivachuk/sovrin-node
scripts/performance/perf_traffic.py
1
9901
""" Created on Feb 27, 2018 @author: nhan.nguyen This module contains class "TesterSimulateTraffic" that simulates the real time traffic. """ import threading import random import time import utils import os import asyncio import argparse import requests_sender import requests_builder import perf_add_requests from ...
apache-2.0
5,081,833,395,924,299,000
33.378472
79
0.54045
false
SasView/sasmodels
sasmodels/models/fcc_paracrystal.py
1
6252
#fcc paracrystal model #note model title and parameter table are automatically inserted #note - calculation requires double precision r""" .. warning:: This model and this model description are under review following concerns raised by SasView users. If you need to use this model, please email...
bsd-3-clause
-7,846,327,260,319,252,000
37.832298
104
0.671465
false
motherjones/mirrors
mirrors/tests/test_auth.py
1
1445
from django.core.urlresolvers import reverse from rest_framework import status from rest_framework.test import APITestCase class ComponentAuthenticationTest(APITestCase): fixtures = ['users.json', 'component_data.json'] def test_noauthed_rejects(self): url = reverse('component-detail', kwargs={ ...
mit
7,669,851,948,419,885,000
32.604651
71
0.640138
false
lamastex/scalable-data-science
dbcArchives/2021/000_6-sds-3-x-dl/055_DLbyABr_04-ConvolutionalNetworks.py
1
22551
# Databricks notebook source # MAGIC %md # MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) # MAGIC # MAGIC This is a 2019-2021 augmentation and update of [Adam Breindel](https://www.linkedin.com/in/adbreind)'s initial ...
unlicense
1,029,960,627,330,714,800
38.554386
455
0.712499
false
isaac-s/cloudify-system-tests
cosmo_tester/test_suites/test_blueprints/nodecellar_test_autoheal.py
1
5154
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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
-1,801,459,323,801,139,700
35.295775
79
0.556849
false
yasserglez/pytiger2c
packages/pytiger2c/ast/andoperatornode.py
1
2345
# -*- coding: utf-8 -*- """ Clase C{AndOperatorNode} del árbol de sintáxis abstracta. """ from pytiger2c.ast.binarylogicaloperatornode import BinaryLogicalOperatorNode from pytiger2c.types.integertype import IntegerType class AndOperatorNode(BinaryLogicalOperatorNode): """ Clase C{AndOperatorNode} del árbol...
mit
-9,185,024,468,901,850,000
41.181818
85
0.663362
false
rubik/pyg
pyg/log.py
1
8604
import os import sys import logging __all__ = ['logger'] try: from colorama import init, Fore, Style init(autoreset=False) colors = { 'good' : Fore.GREEN, 'bad' : Fore.RED, 'vgood' : Fore.GREEN + Style.BRIGHT, 'vbad' : Fore.RED + Style.BRIGHT, 'std' : '...
mit
6,918,560,899,047,315,000
30.866667
112
0.496165
false
3DGenomes/tadbit
_pytadbit/mapping/analyze.py
1
67679
""" 18 Nov 2014 """ from warnings import warn from collections import OrderedDict from pysam import AlignmentFile from scipy.stats import norm as sc_norm, skew, kurtosis from scipy.stats import pearsonr, spearmanr, linregres...
gpl-3.0
-8,409,796,578,718,925,000
39.094194
124
0.531199
false
opennode/nodeconductor
waldur_core/monitoring/serializers.py
1
1672
from collections import defaultdict from rest_framework import serializers from .models import ResourceItem, ResourceSla from .utils import get_period, to_list class ResourceSlaStateTransitionSerializer(serializers.Serializer): timestamp = serializers.IntegerField() state = serializers.SerializerMethodField...
mit
9,157,306,062,313,611,000
33.122449
81
0.641746
false
google/dl_bounds
dl_bounds/src/data.py
1
5898
# coding=utf-8 # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
7,444,681,494,655,159,000
29.879581
80
0.648694
false
Bdanilko/EdPy
src/lib/token_bits.py
1
2356
#!/usr/bin/env python2 # * **************************************************************** ** # File: token_bits.py # Requires: Python 2.7+ (but not Python 3.0+) # Note: For history, changes and dates for this file, consult git. # Author: Brian Danilko, Likeable Software (brian@likeablesoftware.com) # Copyright 2015-2...
gpl-2.0
-8,631,692,526,637,044,000
30.837838
71
0.688879
false
andy-sweet/fcdiff
doc/drawio.py
1
1945
#!/usr/bin/python import os import subprocess as sp import shutil as sh import argparse parser = argparse.ArgumentParser( description = 'Copies and converts drawio XML and PDF files from Dropbox' ) parser.add_argument('-s', '--src_dir', help = 'The src directory containing the drawio XML and PDF files', d...
mit
-1,236,257,339,607,147,800
28.469697
82
0.60874
false
sillvan/hyperspy
hyperspy/model.py
1
78500
# -*- coding: utf-8 -*- # Copyright 2007-2011 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
-5,660,573,258,302,874,000
37.328125
79
0.546257
false
torresj/practica-3
Código/tiposCafes.py
1
18836
/* Esta archivo pertenece a la aplicación "practica 3" bajo licencia GPLv2. Copyright (C) 2014 Jaime Torres Benavente. Este programa es software libre. Puede redistribuirlo y/o modificarlo bajo los términos de la Licencia Pública General de GNU según es publicada por la Free Software Foundation, bien de l...
gpl-2.0
-8,106,485,634,979,966,000
29.345161
155
0.523015
false
huiyiqun/check_mk
tests/pylint/test_pylint_inventory_plugins.py
1
1622
#!/usr/bin/python # encoding: utf-8 import os import sys from testlib import repo_path import testlib.pylint_cmk as pylint_cmk def test_pylint_inventory_plugins(pylint_test_dir): f = file(pylint_test_dir + "/cmk-inventory-plugins.py", "w") # Fake data structures where checks register (See cmk_base/checks.py)...
gpl-2.0
-9,162,550,503,937,921,000
27.45614
74
0.580148
false
sleepinghungry/wwif
basic_game/basic_game_engine.py
1
5705
from basic_game.descriptors import Descriptor from basic_game.directions import directions from basic_game.language import list_prefix, normalize_input, get_noun, prepositions from basic_game.objects import Container from basic_game.writer import DEBUG, ConsoleWriter from basic_game.verbs import BaseVerb class BasicGa...
mit
-2,709,970,980,162,616,300
27.242574
91
0.603856
false
desihub/desitarget
py/desitarget/train/data_collection/sweep_meta.py
1
2600
#!/usr/bin/env python import sys import subprocess import numpy as np import astropy.io.fits as fits def sweep_meta(release, outfits): if (release == 'dr3'): sweepdir = '/global/project/projectdirs/cosmo/data/legacysurvey/dr3/sweep/3.1' if (release == 'dr4'): sweepdir = '/global/p...
bsd-3-clause
-4,179,563,077,889,233,000
42.067797
105
0.609615
false
generia/plugin.video.zdf_de_2016
de/generia/kodi/plugin/frontend/zdf/AbstractPage.py
1
3319
from de.generia.kodi.plugin.frontend.base.Pagelet import Item from de.generia.kodi.plugin.frontend.base.Pagelet import Action from de.generia.kodi.plugin.frontend.base.Pagelet import Pagelet from de.generia.kodi.plugin.frontend.zdf.Constants import Constants class AbstractPage(Pagelet): ...
gpl-2.0
3,053,792,430,717,883,400
46.414286
190
0.597168
false
jinzekid/codehub
python/test_gui/TaskManager/TaskManager.py
1
2820
# Author: Jason Lu import _thread as thread, time import threading from MyWindow import Ui_MainWindow as MainWindow from PyQt5.QtCore import QThread, pyqtSignal, QObject, QDateTime import LYUtils as utils # 单例模式 # 使用__new__方法 class Singleton(object): def __new__(cls, *args, **kwargs): if not hasattr(cls, ...
gpl-3.0
-6,348,898,284,641,424,000
25.613861
79
0.519345
false
judaba13/GenrePredictor
hdf5_descriptors.py
1
3890
""" This file is used to define classes that hold data for reading from the HDF5 files for MSD This code was provided by the MSD distributors to read the data. Thierry Bertin-Mahieux (2010) Columbia University tb2332@columbia.edu This code contains descriptors used to create HDF5 files for the Million Song Database Pr...
apache-2.0
-8,598,590,883,223,135,000
34.697248
90
0.717995
false
tobegit3hub/cinder_docker
cinder/brick/local_dev/lvm.py
1
30594
# Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
6,120,542,646,678,303,000
38.223077
79
0.532915
false
halflings/receval
receval/metrics.py
1
6033
""" Metrics used to evaluate recommendations. Shamelessly copied from bwhite's gist: https://gist.github.com/bwhite/3726239 """ import numpy as np def reciprocal_rank(r): """Score is reciprocal of the rank of the first relevant item First element is 'rank 1'. Relevance is binary (nonzero is relev...
apache-2.0
4,105,317,374,910,143,000
27.323944
80
0.557931
false
weichen2046/algorithm-study
algorithms/python/test/unit/sorting/test_insertion_sort.py
1
1255
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest from utils.read_data_file import read_int_array from sorting.insertion_sort import sort BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class InsertionSortTester(unittest.TestCase): # Test sort in default order, i.e., in ascending ...
mit
8,115,982,328,361,374,000
28.186047
89
0.620717
false
zeroSteiner/AdvancedHTTPServer
examples/demo.py
1
3045
#!/usr/bin/env python # -*- coding: utf-8 -*- # # demo.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions ...
bsd-3-clause
-4,253,329,966,655,596,500
37.544304
115
0.741544
false
nickgzzjr/sublime-gulp
cross_platform_codecs.py
1
1500
import sublime import sys import re class CrossPlaformCodecs(): @classmethod def decode_line(self, line): line = line.rstrip() decoded_line = self.force_decode(line) if sys.version_info >= (3, 0) else line decoded_line = re.sub(r'\033\[(\d{1,2}m|\d\w)', '', str(decoded_line)) re...
mit
-6,632,287,634,719,512,000
33.906977
103
0.624
false
sylvan5/pygame
pyrpg/pyrpg24/pyrpg24.py
1
36082
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygame from pygame.locals import * import codecs import os import random import struct import sys SCR_RECT = Rect(0, 0, 640, 480) GS = 32 DOWN,LEFT,RIGHT,UP = 0,1,2,3 STOP, MOVE = 0, 1 # 移動タイプ PROB_MOVE = 0.005 # 移動確率 TRANS_COLOR = (190,179,145) # マップチップの透明色 sou...
mit
6,963,601,677,123,207,000
36.736906
124
0.533536
false
viz4biz/PyDataNYC2015
enaml/vtk_canvas.py
1
2430
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
apache-2.0
1,033,791,786,981,308,000
30.973684
79
0.6
false
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/bricksculpt_v1-2-0/classes/bricksculpt_choose_paintbrush_material.py
1
2230
# Copyright (C) 2019 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.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 3 of the License, or # (at your opt...
gpl-3.0
-3,855,508,242,255,955,000
29.135135
72
0.645291
false
SEL-Columbia/commcare-hq
custom/ilsgateway/tests/test_locations_sync.py
1
1228
import json import os from django.test import TestCase from corehq.apps.commtrack.tests.util import bootstrap_domain as initial_bootstrap from corehq.apps.locations.models import Location from custom.ilsgateway.api import Location as Loc from custom.ilsgateway.commtrack import sync_ilsgateway_location TEST_DOMAIN = 'i...
bsd-3-clause
7,645,181,924,802,932,000
42.892857
83
0.740228
false
magosil86/ruffus
ruffus/test/test_check_if_uptodate.py
1
3289
#!/usr/bin/env python from __future__ import print_function """ Test check_if_uptodate Bug: @parallel sets @check_if_uptodate to None. Submitted by Jafar Taghiyar (jafar<dot>taghiyar<at>gmail.com) https://github.com/bunbun/ruffus/issues/53 """ import os import os tempdir = os.path.abspath(os.path.abspat...
mit
4,336,634,337,943,082,000
26.638655
166
0.648221
false
ComputerArchitectureGroupPWr/Floorplan-Maker
src/FloorplanMakerUI_old.py
1
15396
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'main_window.ui' # # Created: Tue Aug 5 12:46:39 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from floorplanFrameBeh import FloorplanFrame from heate...
mit
7,286,286,362,284,666,000
66.227074
275
0.725235
false
Fiware/dataModels
tools/ldcontext_generator.py
1
9962
#!/usr/bin/python # -*- coding: utf-8 -*- """ This script provides two files: - context.jsonld, that serves https://schema.lab.fiware.org/ld/fiware-data-models-context.jsonld - mapping_list.yml, that serves https://uri.fiware.org/ns/data-models context.jsonld is combined by extracting the properties, types and enu...
mit
1,676,945,092,126,814,700
28.383481
103
0.598434
false
google/cauliflowervest
cauliflowervest/client/mac/main.py
1
3039
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-5,189,660,262,082,169,000
28.504854
77
0.715038
false
solvo/derb
report_builder/migrations/0001_initial.py
1
11231
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-12 19:47 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = T...
gpl-3.0
-3,516,968,302,829,790,000
51.24186
310
0.562639
false
wevote/WebAppPublic
voter/models.py
1
55344
# voter/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.db import models from django.contrib.auth.models import (BaseUserManager, AbstractBaseUser) # PermissionsMixin from django.core.validators import RegexValidator from exception.models import handle_exception, handle_record_foun...
bsd-3-clause
-5,296,734,359,636,039,000
42.612293
120
0.59179
false
siwater/Cloudworks
aws-cfn-bootstrap-1.3/cfnbootstrap/file_tool.py
1
9622
#============================================================================== # Copyright 2011 Amazon.com, Inc. or its affiliates. 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 ...
mit
8,430,033,312,722,759,000
38.760331
120
0.567242
false
matslindh/kimochi
alembic/versions/8f5b2066cbac_add_self_referential_image_reference.py
1
2160
"""Add self-referential image reference Revision ID: 8f5b2066cbac Revises: 698cc06661d6 Create Date: 2016-03-20 19:35:31.321144 """ # revision identifiers, used by Alembic. revision = '8f5b2066cbac' down_revision = '698cc06661d6' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa ...
mit
7,596,053,783,737,711,000
40.538462
129
0.678241
false
akalipetis/raven-python
raven/_compat.py
1
5038
"""Utilities for writing code that runs on Python 2 and 3""" # flake8: noqa # Copyright (c) 2010-2013 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction,...
bsd-3-clause
-442,859,743,706,172,900
26.380435
82
0.618499
false
moto-timo/robotframework
utest/output/test_filelogger.py
1
1867
import unittest import time from robot.output.filelogger import FileLogger from robot.utils import StringIO, robottime from robot.utils.asserts import * from robot.utils.robottime import TimestampCache class _FakeTimeCache(TimestampCache): def __init__(self): self.fake = time.mktime((2006, 6, 13, 8, 37,...
apache-2.0
1,760,009,257,251,679,000
31.189655
80
0.636315
false
loleg/realms-wiki
realms/lib/util.py
1
3701
import click import re import os import hashlib import json import string import random import sys from jinja2 import Template class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self def random_string(size=6, chars=string.as...
gpl-2.0
-2,907,286,904,536,917,000
17.979487
97
0.597406
false
zekroTJA/regiusBot
commands/cmd_mute.py
1
2707
import discord from os import path, makedirs, remove import STATICS ROLE_NAME = "Supporter" perm = 2 description = "Mute members on guild in chat" def get_mutes(server): if not path.isdir("SAVES/" + server.id): makedirs("SAVES/" + server.id) if path.isfile("SAVES/" + server.id + "/mutes"): ...
mit
6,176,478,198,408,302,000
39.402985
195
0.655707
false
Dinoshauer/linie
tests/test_handlers.py
1
2635
"""Linie handlers test specs.""" import logging from testfixtures import LogCapture from unittest import TestCase from linie import handlers, exceptions from linie.handlers import DEFAULT_FORMAT, _check_keys, _check_values, _get_fmts class TestStreamHandlerPrivates(TestCase): """Test private functions of the s...
mit
7,705,936,456,296,599,000
34.133333
80
0.599241
false
totalgood/nlpia
src/nlpia/scripts/lsa_tweets.py
1
3415
import os import gc import json import numpy as np import gzip from gensim.models import TfidfModel, LsiModel from gensim.corpora import Dictionary from nlpia.data.loaders import BIGDATA_PATH, read_csv KEEP_N = 300000 # max vocab size NO_BELOW = 5 # min DF (count) NO_ABOVE = .7 # max DF (fraction) def l...
mit
-2,815,172,349,528,805,000
42.782051
118
0.656223
false
ResolveWang/algrithm_qa
binarytree/q1.py
1
3054
""" 问题描述:分别用递归和非递归方式实现二叉树的先序、中序、和后续遍历 思路:使用非递归的方式需要使用辅助栈代替函数栈 """ from binarytree.toolcls import Node class RecursiveVisit: @classmethod def visit_in_first_order(cls, head): if head is None: return print(head.value, end=' ') cls.visit_in_first_order(head.left) cl...
mit
-6,681,515,285,919,521,000
24.153846
48
0.532631
false
Gjacquenot/AcousticBEM
Python/HelmholtzIntegralsRAD.py
1
15968
# --------------------------------------------------------------------------- # Copyright (C) 2017 Frank Jargstorff # # This file is part of the AcousticBEM library. # AcousticBEM 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 So...
gpl-3.0
-5,642,675,042,839,800,000
38.92
110
0.48353
false
bastibe/PySoundCard
pysoundcard.py
1
26373
import sys import os from cffi import FFI import atexit import numpy as np import warnings """PySoundCard is an audio library based on PortAudio, CFFI and NumPy PySoundCard can play and record audio data. Audio devices are supported through PortAudio[1], which is a free, cross-platform, open-source audio I/O library ...
bsd-3-clause
-7,574,350,281,367,325,000
33.701316
79
0.657339
false
plaufer/wikiwsd
wsd/database/mysqlbuildview.py
1
7099
import MySQLdb import logging import time MYSQL_DEAD_LOCK_ERROR = 1213 class MySQLBuildView: """The MySQLBuildView class allows database access optimized to build the disambiguation database """ def __init__(self, db_connection): """constructor @param db_connector the database ...
mit
-3,987,502,628,156,108,000
42.286585
197
0.579377
false
bancek/egradebook
src/lib/compressor/filters/yui.py
1
1339
from subprocess import Popen, PIPE from compressor.conf import settings from compressor.filters import FilterBase, FilterError from compressor.utils import cmd_split class YUICompressorFilter(FilterBase): def output(self, **kwargs): arguments = '' if self.type == 'js': arguments = se...
gpl-3.0
2,404,042,129,496,164,400
26.895833
81
0.592233
false
whereskenneth/Dwarfsquad
dwarfsquad/lib/build/from_export/build_compound_methods.py
1
6738
from dwarfsquad.lib.build.from_export.helpers import build_reference_map from dwarfsquad.lib.utils import to_stderr from dwarfsquad.model.Calibration import Calibration from dwarfsquad.model.ChromatogramMethod import ChromatogramMethod from dwarfsquad.model.CompoundMethod import CompoundMethod from dwarfsquad.model.Pea...
mit
-6,402,530,371,406,678,000
37.502857
103
0.706886
false
paypal/support
support/socket_pool.py
1
6787
''' Protocol-agnostic socket pooler. This code is both extremely tested and hard to test. Modify with caution :-) "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious de...
bsd-3-clause
3,623,353,880,487,837,700
41.685535
102
0.573155
false
JulyKikuAkita/PythonPrac
cs15211/RangeModule.py
1
7564
__source__ = 'https://leetcode.com/problems/range-module/' # Time: O(logK) to O(K) # Space: O(A+R), the space used by ranges. # # Description: Leetcode # 715. Range Module # # A Range Module is a module that tracks ranges of numbers. # Your task is to design and implement the following interfaces in an efficient manne...
apache-2.0
7,008,019,913,116,863,000
32.321586
105
0.569672
false
jthrun/sdl_android
baseAndroid/make_symbolic_links.py
1
2232
import os import pathlib from pathlib import Path import re def has_admin(): if os.name == 'nt': try: # only windows users with admin privileges can read the C:\windows\temp temp = os.listdir(os.sep.join([os.environ.get('SystemRoot', 'C:\\windows'), 'temp'])) except: ...
bsd-3-clause
-4,495,510,196,234,252,000
31.347826
112
0.584229
false
xiangke/pycopia
mibs/pycopia/mibs/DOCS_IETF_QOS_MIB_OID.py
1
11335
# python # This file is generated by a program (mib2py). import DOCS_IETF_QOS_MIB OIDMAP = { '1.3.6.1.2.1.127': DOCS_IETF_QOS_MIB.docsIetfQosMIB, '1.3.6.1.2.1.127.0': DOCS_IETF_QOS_MIB.docsIetfQosNotifications, '1.3.6.1.2.1.127.1': DOCS_IETF_QOS_MIB.docsIetfQosMIBObjects, '1.3.6.1.2.1.127.2': DOCS_IETF_QOS_MIB.docsI...
lgpl-2.1
-1,082,230,034,744,591,600
72.603896
88
0.739832
false
CIGIHub/django-ga-puller
setup.py
1
1369
from setuptools import setup # Always prefer setuptools over distutils import os README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-ga-puller', ...
mit
-3,372,976,600,499,143,700
34.102564
97
0.626004
false
ftalex/buffelgrass_mapper
BuffelWeb/Model.py
1
1562
""" Classes for use with genshi, these are the basic datastructres that are used to create populate the values of the templaes. """ __author__ = "Alex Warren" __copyright__ = "Copyright 2015, Autonomous Mapping Project" __credits__ = ["Alex Warren", "Rachel Powers", "Thomas Schuker", "Travis Kible...
bsd-2-clause
-7,928,987,849,017,785,000
28.471698
93
0.669014
false
hguemar/cinder
cinder/volume/drivers/windows/smbfs.py
1
10774
# Copyright (c) 2014 Cloudbase Solutions SRL # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
1,899,625,683,295,123,000
39.201493
79
0.591981
false
hellobond/python-smartypants
lib/smartypants.py
1
34216
#!/usr/bin/env python # -*- coding: utf-8 -*- r""" ============== smartypants.py ============== ---------------------------- SmartyPants ported to Python ---------------------------- Ported by `Chad Miller`_ Copyright (c) 2004, 2007 Chad Miller original `SmartyPants`_ by `John Gruber`_ Copyright (c) 2003 John Grube...
bsd-3-clause
1,224,853,548,445,480,000
34.093333
209
0.594868
false
F5Networks/f5-openstack-agent
f5_openstack_agent/lbaasv2/drivers/bigip/test/test_esd_filehandler.py
1
3416
# coding=utf-8 # Copyright (c) 2017,2018, F5 Networks, 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...
apache-2.0
-3,588,960,012,076,840,400
35.340426
79
0.668326
false
openstates/bobsled
bobsled/tests/test_environment.py
1
1546
import os import pytest from unittest import mock from ..environment import EnvironmentProvider from ..base import Environment @pytest.fixture def simpleenv(): filename = os.path.join(os.path.dirname(__file__), "environments.yml") return EnvironmentProvider(filename) @pytest.mark.asyncio async def test_get_...
mit
-3,136,788,783,062,574,600
31.893617
87
0.695343
false
ging/keystone
keystone/cli.py
1
11656
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-4,861,469,383,268,838,000
34.975309
79
0.590254
false
hueyyeng/AssetsBrowser
ui/window/ui_main.py
1
12124
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'K:\Library\Python\AssetsBrowser\ui\window\main.ui' # # Created by: PyQt5 UI code generator 5.14.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def se...
mit
-3,948,126,092,516,333,000
58.136585
398
0.73043
false
nathanielvarona/airflow
airflow/contrib/operators/gcp_video_intelligence_operator.py
1
1369
# # 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...
apache-2.0
2,743,764,292,504,711,700
37.027778
106
0.784514
false
vhaupert/mitmproxy
mitmproxy/stateobject.py
1
3417
import json import typing from mitmproxy.coretypes import serializable from mitmproxy.utils import typecheck class StateObject(serializable.Serializable): """ An object with serializable state. State attributes can either be serializable types(str, tuple, bool, ...) or StateObject instances themselv...
mit
1,843,769,143,436,569,600
33.515152
86
0.60755
false
rechner/Taxidi
webcam.py
1
18402
#!/usr/bin/env python #-*- coding:utf-8 -*- #TODO: Update for use with new API #TODO: Read config, optionally disable rectangle. #TODO: Create Destroy() method #TODO: Implement file system organization, handle converting & uploading image to server. #TODO: Use gstreamer for Linux instead of opencv - better performanc...
gpl-3.0
3,329,031,220,949,620,700
32.641682
112
0.586349
false
ODM2/ODMToolsPython
odmtools/gui/pnlPlot.py
1
7003
#Boa:FramePanel:Panel1 import wx from wx.lib.pubsub import pub as Publisher try: from agw import flatnotebook as fnb except ImportError: # if it's not there locally, try the wxPython lib. import wx.lib.agw.flatnotebook as fnb import matplotlib matplotlib.use('WXAgg') import plotTimeSeries import plotSummar...
bsd-3-clause
-7,721,344,204,155,205,000
33.328431
116
0.622305
false
hyperkitty/kittystore
kittystore/__init__.py
1
3228
# -*- coding: utf-8 -*- """ Module entry point: call get_store() to instanciate a KittyStore implementation. Copyright (C) 2012 Aurelien Bompard Author: Aurelien Bompard <abompard@fedoraproject.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
gpl-3.0
1,805,717,560,906,570,800
32.278351
89
0.682156
false
fgaudin/aemanager
accounts/models.py
1
20254
# coding=utf-8 from decimal import Decimal from django.utils.formats import localize import datetime from reportlab.platypus import Paragraph, Spacer from reportlab.lib.units import inch from reportlab.platypus import Table, TableStyle from django.db import models, connection from core.models import OwnedObject from dj...
agpl-3.0
442,697,370,310,873,200
56.214689
356
0.604325
false
updatengine/updatengine-server
configuration/migrations/0005_auto__add_subuser.py
1
11187
# -*- 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 model 'subuser' db.create_table(u'configuration_subuser', ( (u'id', self.gf('django.db....
gpl-2.0
1,402,998,412,544,026,400
77.788732
231
0.563332
false
asimshankar/tensorflow
tensorflow/python/kernel_tests/cond_v2_test.py
1
35442
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
3,045,569,778,192,330,000
31.249318
80
0.587834
false
levilucio/SyVOLT
ECore_Copier_MM/transformation-Large/HeattributeOUTeGenericTypeSolveRefEAttributeEGenericTypeEAttributeEGenericType.py
1
5089
from core.himesis import Himesis class HeattributeOUTeGenericTypeSolveRefEAttributeEGenericTypeEAttributeEGenericType(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HeattributeOUTeGenericTypeSolveRefEAttributeEGenericTypeEAttributeEGenericType. ""...
mit
4,146,659,116,746,106,400
48.407767
298
0.523875
false
Abi1ity/uniclust2.0
SQLAlchemy-0.9.9/test/sql/test_generative.py
1
58459
from sqlalchemy.sql import table, column, ClauseElement, operators from sqlalchemy.sql.expression import _clone, _from_objects from sqlalchemy import func, select, Integer, Table, \ Column, MetaData, extract, String, bindparam, tuple_, and_, union, text,\ case, ForeignKey, literal_column from sqlalchemy.testing...
bsd-3-clause
-9,185,482,400,953,730,000
36.069753
79
0.493731
false
QProjectOrg/QRepo
src/convertors/base/bqt/initreader.py
1
14171
# -*- encoding: utf-8 -*- import datetime import os import string from src.convertors.base.bqt.currentbooksettings import CurrentBookSettings from src.utils import commonscript from src.utils.logger import log from src.convertors.base.bqt.bqtdata import * from src.utils.common import getFileNameInProperCase class In...
mit
-3,103,329,302,460,644,400
39.603715
117
0.600885
false
mattmakesmaps/opencv-junk
opencv-utils/bin/delete_dupes.py
1
1635
import argparse import os import sys def get_abs_path(in_path): """ Given a relative or absolute path, return the absolute path. :param in_path: :return: """ if os.path.isabs(in_path): return in_path else: return os.path.abspath(in_path) if __name__ == '__main__': # Def...
mit
-7,510,965,942,031,719,000
37.023256
120
0.625076
false
ChrisTruncer/rdpy
setup.py
1
1335
#!/usr/bin/env python import setuptools from distutils.core import setup, Extension setup(name='rdpy', version='1.3.2', description='Remote Desktop Protocol in Python', long_description=""" RDPY is a pure Python implementation of the Microsoft RDP (Remote Desktop Protocol) protocol (Client and Server side). RDPY ...
gpl-3.0
5,683,158,288,272,969,000
27.404255
179
0.659176
false
motmot/flymovieformat
bootstrap.py
1
2578
############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
bsd-3-clause
-4,471,996,207,131,079,000
25.040404
86
0.559348
false
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pylint/pylint/checkers/refactoring/len_checker.py
1
4298
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/LICENSE from typing import List import astroid from pylint import checkers, interfaces from pylint.checkers import utils class LenChecker(checkers.BaseChecker): """Checks f...
mit
-7,659,394,172,842,702,000
34.520661
98
0.597953
false
fanchunke1991/flask_website
migrations/versions/d8d1b418f41c_.py
1
1046
"""empty message Revision ID: d8d1b418f41c Revises: 7f5c9e993be1 Create Date: 2017-02-15 21:03:05.958000 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd8d1b418f41c' down_revision = '7f5c9e993be1' branch_labels = None depends_on = None def upgrade(): # ...
mit
-7,483,645,544,517,779,000
27.27027
65
0.670172
false
taedori81/gentlecoffee
home/templatetags/gentlecoffee_tags.py
1
2563
from django import template from ..models import Area register = template.Library() @register.assignment_tag(takes_context=True) def get_site_root(context): return context['request'].site.root_page @register.inclusion_tag("home/navbar/navbar.html", takes_context=True) def display_navbar(context): parent = ...
bsd-3-clause
5,064,137,035,026,292,000
26.265957
96
0.630121
false
garethr/django-project-templates
setup.py
1
1174
from setuptools import setup, find_packages import os setup( name='django-project-templates', version = "0.11", description="Paster templates for creating Django projects", author='Gareth Rushgrove', author_email='gareth@morethanseven.net', url='http://github.com/garethr/django-project-template...
mit
-1,137,145,708,265,585,200
32.542857
105
0.66184
false
migasfree/migasfree-backend
migasfree/client/models/fault.py
1
4720
# -*- coding: utf-8 -*- # Copyright (c) 2015-2021 Jose Antonio Chavarría <jachavar@gmail.com> # Copyright (c) 2015-2021 Alberto Gacías <alberto@migasfree.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 Softw...
gpl-3.0
4,239,233,166,619,057,000
27.421687
80
0.597075
false
skurtapp/django-rest-framework-jwt
setup.py
1
3378
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import shutil import sys from setuptools import setup def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ with open(os.path.join(package, '__init__.py'), 'rb') as init_py: src = in...
mit
6,180,108,985,916,996,000
29.160714
77
0.617229
false
deets/clang-complete
tests/test_async_api.py
1
2891
import os import tempfile from unittest import TestCase from cStringIO import StringIO from clangcomplete.libclang import setup from clangcomplete.api import ( mainloop, AsyncSession, ) from clangcomplete.util import source_for_autocomplete TEST_SOURCE = """ struct Foo { int bar; int baz; }; int...
mit
5,010,866,645,818,686,000
23.709402
77
0.552058
false
mbohlool/client-python
kubernetes/test/test_policy_v1beta1_api.py
1
2822
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
apache-2.0
-6,518,013,391,887,288,000
20.378788
105
0.606308
false
ResolveWang/WeiboSpider
db/dao.py
1
7194
from sqlalchemy import text from sqlalchemy.exc import IntegrityError as SqlalchemyIntegrityError from pymysql.err import IntegrityError as PymysqlIntegrityError from sqlalchemy.exc import InvalidRequestError from .basic import db_session from .models import ( LoginInfo, KeywordsWbdata, KeyWords, SeedIds, UserRela...
mit
6,026,674,423,055,466,000
29.210084
108
0.624478
false
karstenw/nodebox-pyobjc
examples/Extended Application/sklearn/examples/ensemble/plot_random_forest_regression_multioutput.py
1
3492
""" ============================================================ Comparing random forests and the multi-output meta estimator ============================================================ An example to compare multi-output regression with random forest and the :ref:`multioutput.MultiOutputRegressor <multiclass>` meta-e...
mit
-3,734,786,197,194,947,600
30.459459
82
0.61827
false
korrosivesec/crits
crits/emails/handlers.py
1
65619
from __future__ import absolute_import import datetime import email as eml from email.parser import Parser from email.utils import parseaddr, getaddresses, mktime_tz, parsedate_tz import hashlib import json import magic import re import yaml import io import sys import olefile from dateutil.parser import parse as dat...
mit
7,987,814,643,264,909,000
37.396138
123
0.529283
false
cbertinato/pandas
pandas/tests/test_downstream.py
1
4179
""" Testing that we work in the downstream packages """ import importlib import subprocess import sys import numpy as np # noqa import pytest from pandas.compat import PY36 from pandas import DataFrame from pandas.util import testing as tm def import_module(name): # we *only* want to skip if the module is tru...
bsd-3-clause
-6,467,225,624,213,887,000
26.493421
73
0.680785
false
tomsilver/nupic
nupic/regions/AnomalyRegion.py
1
2946
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
gpl-3.0
5,956,932,422,393,378,000
30.677419
76
0.569246
false
rrice2004/LanSkorpian
LanSkorpian.py
1
3034
## LANSKORPIAN - Personal home network scanner ## Copyright (C) Robert Rice <mindseyes@gmail.com> ## This program is published under a MIT license print "\n" print ("-" * 60) print " LANSKORPIAN Personal Home Port Scanner" print ("-" * 60) print "\n" # Import modules import subprocess import ipad...
mit
7,584,437,968,339,130,000
24.155172
143
0.644693
false
shitolepriya/Saloon_erp
erpnext/buying/doctype/supplier/supplier.py
1
4173
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe import msgprint, _ from frappe.model.naming import make_autoname from erpnext.utilities.address_and_con...
agpl-3.0
-6,728,424,563,410,634,000
35.929204
194
0.705967
false
kublaj/the-maker
sandboxProjectConvert_spec.py
1
4768
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import os import shutil from makerUpdateSandboxedProjects import UpdateSandboxedProjects as theUpdater import makerUpdateSandboxedProjects import sys from makerUtilities import writeDataToFile, readDataFromFile import wx class MakerTest(unittest.TestCase): ...
gpl-3.0
-763,920,841,446,810,000
31.216216
116
0.575503
false
lneuhaus/pyrpl
pyrpl/memory.py
1
26126
############################################################################### # pyrpl - DSP servo controller for quantum optics with the RedPitaya # Copyright (C) 2014-2016 Leonhard Neuhaus (neuhaus@spectro.jussieu.fr) # # This program is free software: you can redistribute it and/or modify # it under t...
gpl-3.0
8,099,003,794,063,674,000
39.949843
122
0.601814
false
SigPloiter/SigPloit
gtp/attacks/dos/massive_dos.py
1
5715
#!/usr/bin/env python # encoding: utf-8 # massive_dos.py # # Copyright 2018 Rosalia d'Alessandro # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # #...
mit
-1,503,131,306,233,485,600
37.355705
124
0.607349
false