repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
ianclegg/requests-ntlm2
requests_ntlm2/__init__.py
1
1172
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # ntlmlib is 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 la...
apache-2.0
4,448,434,275,216,971,300
39.413793
81
0.759386
false
Williams224/davinci-scripts
ksteta3pi/Consideredbkg/MC_12_11102202_MagUp.py
3
17903
#-- GAUDI jobOptions generated on Fri Jul 17 16:30:35 2015 #-- Contains event types : #-- 11102202 - 178 files - 3032774 events - 655.11 GBytes #-- Extra information about the data processing phases: #-- Processing Pass Step-124834 #-- StepId : 124834 #-- StepName : Reco14a for MC #-- ApplicationName : ...
mit
-5,889,822,724,552,636,000
69.762846
247
0.788415
false
gymnasium/edx-platform
common/test/acceptance/pages/lms/discussion.py
11
29079
from contextlib import contextmanager from bok_choy.javascript import wait_for_js from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise from common.test.acceptance.pages.common.utils import hover from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.accep...
agpl-3.0
8,772,388,915,769,356,000
38.563265
128
0.623646
false
utds3lab/pemu
scripts/tracetool/backend/dtrace.py
94
2484
#!/usr/bin/env python # -*- coding: utf-8 -*- """ DTrace/SystemTAP backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __e...
gpl-2.0
-6,506,933,299,458,567,000
21.770642
86
0.514102
false
cbertinato/pandas
pandas/tests/io/test_packers.py
1
33090
import datetime from distutils.version import LooseVersion import glob from io import BytesIO import os from warnings import catch_warnings import numpy as np import pytest from pandas._libs.tslib import iNaT from pandas.errors import PerformanceWarning import pandas from pandas import ( Categorical, DataFrame, ...
bsd-3-clause
211,160,120,418,721,380
33.794953
79
0.552705
false
maleficarium/youtube-dl
youtube_dl/extractor/cbsnews.py
3
3855
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .cbs import CBSBaseIE from ..utils import ( parse_duration, ) class CBSNewsIE(CBSBaseIE): IE_DESC = 'CBS News' _VALID_URL = r'https?://(?:www\.)?cbsnews\.com/(?:news|videos)/(?P<id>[\da-z_-]+)' _TESTS = ...
unlicense
1,002,380,293,783,139,500
36.067308
160
0.524514
false
wengyian/project-manager-system
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
1283
65086
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
mit
4,676,288,699,215,644,000
38.954573
191
0.6628
false
yiheng/BigDL
spark/dl/src/test/resources/tf/models/rnn.py
9
1652
# # Copyright 2016 The BigDL 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 ...
apache-2.0
4,298,372,140,444,098,000
35.711111
98
0.679782
false
poo12138/gem5-stable
src/arch/x86/isa/insts/general_purpose/control_transfer/__init__.py
91
2404
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
8,952,808,968,545,798,000
49.083333
72
0.764143
false
xzturn/tensorflow
tensorflow/lite/micro/examples/magic_wand/train/data_prepare.py
19
5911
# Lint as: python3 # coding=utf-8 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
apache-2.0
7,116,094,634,051,204,000
34.945122
102
0.571841
false
edx/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/test_client_regress/views.py
50
4115
from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.core.exceptions import SuspiciousOperation from django.shortcuts import render_to_response from django.utils import simplejson from django.utils.encoding impo...
gpl-3.0
7,834,027,810,325,758,000
39.343137
99
0.705954
false
jjhelmus/scipy
scipy/stats/tests/test_discrete_basic.py
38
8770
from __future__ import division, print_function, absolute_import import numpy.testing as npt import numpy as np from scipy._lib.six import xrange from scipy import stats from common_tests import (check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, ...
bsd-3-clause
3,297,111,217,996,479,000
35.390041
89
0.589966
false
4shadoww/hakkuframework
core/lib/whois/__init__.py
3
2563
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from __future__ import division from future import standard_library standard_library.install_aliases() from builtins import * import re import sys import os import subprocess import socket from .parser i...
mit
-1,801,736,246,761,140,700
28.802326
112
0.577058
false
Funky7Monkey/WargamingAPI.py
WargamingAPI/enums.py
1
1356
""" The MIT License (MIT) Copyright (c) 2017 Funky7Monkey 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,...
mit
2,903,654,695,266,961,400
30.534884
75
0.735988
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/APPLE/ycbcr_422.py
9
3045
'''OpenGL extension APPLE.ycbcr_422 This module customises the behaviour of the OpenGL.raw.GL.APPLE.ycbcr_422 to provide a more Python-friendly API Overview (from the spec) This extension provides a method for GL to read, store and optionally process textures that are defined in Y'CbCr 422 video formats. This ...
gpl-3.0
6,442,371,417,993,140,000
48.129032
77
0.781281
false
abhattad4/Digi-Menu
digimenu2/tests/migrations/models.py
386
1780
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible class CustomModelBase(models.base.ModelBase): pass class ModelWithCustomBase(six.with_met...
bsd-3-clause
2,094,950,055,346,228,500
22.513514
77
0.689655
false
jmagnusson/flask-admin
examples/geo_alchemy/app.py
39
2044
from flask import Flask from flask_sqlalchemy import SQLAlchemy import flask_admin as admin from geoalchemy2.types import Geometry from flask_admin.contrib.geoa import ModelView # Create application app = Flask(__name__) app.config.from_pyfile('config.py') db = SQLAlchemy(app) class Point(db.Model): id = db.Co...
bsd-3-clause
-169,720,292,398,492,030
27.388889
80
0.704501
false
offlinehacker/pyfilesystem
fs/osfs/watch_win32.py
10
16983
""" fs.osfs.watch_win32 =================== Change watcher support for OSFS, using ReadDirectoryChangesW on win32. """ import os import sys import errno import threading import Queue import stat import struct import ctypes import ctypes.wintypes import traceback import weakref try: LPVOID = ctypes.wintypes.LPVO...
bsd-3-clause
-8,146,639,791,469,691,000
33.944444
82
0.590885
false
40223209/test
static/Brython3.1.3-20150514-095342/Lib/unittest/case.py
743
48873
"""Test case implementation""" import sys import functools import difflib import pprint import re import warnings import collections from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable) __unittest = True DIFF_OMITTED = ('\nDiff is %s charact...
agpl-3.0
5,558,783,259,164,020,000
39.257825
109
0.575164
false
franky88/emperioanimesta
env/Lib/site-packages/django/contrib/admin/options.py
27
83212
from __future__ import unicode_literals import copy import json import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from...
gpl-3.0
4,290,083,572,786,878,000
40.564436
119
0.587475
false
kamyu104/LeetCode
Python/design-phone-directory.py
2
1688
# init: Time: O(n), Space: O(n) # get: Time: O(1), Space: O(1) # check: Time: O(1), Space: O(1) # release: Time: O(1), Space: O(1) class PhoneDirectory(object): def __init__(self, maxNumbers): """ Initialize your data structure here @param maxNumbers - The maximum numbers that...
mit
-3,735,760,812,938,851,300
26.672131
90
0.540877
false
qrealka/skia-hc
third_party/externals/shaderc2/utils/remove-file-by-suffix.py
16
1028
#!/usr/bin/env python # Copyright 2015 The Shaderc 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...
apache-2.0
-8,016,136,986,149,278,000
28.371429
74
0.701362
false
trevor/calendarserver
txdav/carddav/datastore/query/test/test_filter.py
1
3060
## # Copyright (c) 2011-2014 Apple 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 l...
apache-2.0
5,518,206,831,358,400,000
30.875
224
0.642157
false
Alexoner/web-crawlers
scripts/12306/12306.py
1
63121
#!/usr/bin/env python2 # -*- encoding: utf-8 -*- # standard library import argparse import ConfigParser import datetime import sys import random import re import time import urllib # third party library import requests # customized libarary from utils import hasKeys,dumpObj # set default encoding to UTF-8 reload(sy...
gpl-2.0
7,141,282,508,724,116,000
36.999359
273
0.492877
false
msleal/amspy
amspy/examples/create_streaming_endpoint.py
2
2523
""" Copyright (c) 2016, Marcelo Leal Description: Simple Azure Media Services Python library License: MIT (see LICENSE.txt file for details) """ import os import json import amspy import time import logging import datetime ########################################################################################### ####...
mit
5,360,250,413,264,371,000
42.5
146
0.557273
false
oudalab/phyllo
phyllo/extractors/hydatiusDB.py
1
5254
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup from phyllo.phyllo_logger import logger def getBooks(soup): siteURL = 'http://www.thelatinlibrary.com' textsURL = [] # get links to books in the collection for a in soup.find_all('a', href=True): ...
apache-2.0
-9,127,012,218,428,254,000
39.10687
115
0.467644
false
nmercier/linux-cross-gcc
linux/lib/python2.7/compiler/transformer.py
176
53108
"""Parse tree transformation module. Transforms Python source code into an abstract syntax tree (AST) defined in the ast module. The simplest ways to invoke this module are via parse and parseFile. parse(buf) -> AST parseFile(path) -> AST """ # Original version written by Greg Stein (gstein@lyra.org) # ...
bsd-3-clause
-6,453,651,066,989,307,000
33.598046
99
0.522087
false
buuck/root
interpreter/cling/tools/Jupyter/kernel/clingkernel.py
9
11312
#!/usr/bin/env python #------------------------------------------------------------------------------ # CLING - the C++ LLVM-based InterpreterG :) # author: Min RK # Copyright (c) Min RK # # This file is dual-licensed: you can choose to license it under the University # of Illinois Open Source License or the GNU Lesse...
lgpl-2.1
4,679,301,531,515,320,000
34.239875
113
0.541284
false
cjmayo/xbmc
tools/EventClients/Clients/Kodi Send/kodi-send.py
10
2592
#!/usr/bin/python # # XBMC Media Center # XBMC Send # Copyright (c) 2009 team-xbmc # # 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 la...
gpl-2.0
9,141,084,477,955,502,000
31.4
118
0.623457
false
SanPen/GridCal
src/GridCal/Gui/TowerBuilder/LineBuilderDialogue.py
1
9842
# This file is part of GridCal. # # GridCal 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. # # GridCal is distributed in the hope that...
gpl-3.0
7,292,113,586,083,879,000
35.051282
104
0.602723
false
rbalda/neural_ocr
env/lib/python2.7/site-packages/django/contrib/admin/sites.py
120
21146
from functools import update_wrapper from django.apps import apps from django.conf import settings from django.contrib.admin import ModelAdmin, actions from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.core.urlresolvers import NoRe...
mit
-193,874,056,442,659,900
38.525234
109
0.594864
false
yawd/django-sphinxdoc
sphinxdoc/management/commands/updatedoc.py
1
4830
# encoding: utf-8 """ Management command for updading the documentation of one or more projects. """ import json import optparse import os import os.path import subprocess from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError from sphinxdoc.models import Pr...
bsd-3-clause
-8,060,614,587,684,997,000
32.068493
79
0.558616
false
rasata/ansible
lib/ansible/plugins/connections/jail.py
131
7291
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2013, Michael Scherer <misc@zarb.org> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it...
gpl-3.0
-925,818,814,883,096,300
38.625
152
0.602112
false
Phuehvk/gyp
test/mac/gyptest-depend-on-bundle.py
34
1270
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that a dependency on a bundle causes the whole bundle to be built. """ import TestGyp import sys if sys.platform == 'darwin'...
bsd-3-clause
-4,666,447,960,846,709,000
28.534884
77
0.691339
false
krintoxi/NoobSec-Toolkit
NoobSecToolkit - MAC OSX/tools/inject/thirdparty/colorama/initialise.py
49
1222
import atexit import sys from .ansitowin32 import AnsiToWin32 orig_stdout = sys.stdout orig_stderr = sys.stderr wrapped_stdout = sys.stdout wrapped_stderr = sys.stderr atexit_done = False def reset_all(): AnsiToWin32(orig_stdout).reset_all() def init(autoreset=False, convert=None, strip=None, wrap=True): ...
gpl-2.0
5,269,144,528,427,634,000
21.218182
72
0.675941
false
vipmunot/Data-Analysis-using-Python
Exploratory Data Visualization/Multiple plots-216.py
1
2691
## 1. Recap ## import pandas as pd import matplotlib.pyplot as plt unrate = pd.read_csv('unrate.csv') unrate['DATE'] = pd.to_datetime(unrate['DATE']) plt.plot(unrate['DATE'].head(12),unrate['VALUE'].head(12)) plt.xticks(rotation=90) plt.xlabel('Month') plt.ylabel('Unemployment Rate') plt.title('Monthly Unemployment T...
mit
-3,005,192,965,135,424,000
26.191919
80
0.635823
false
openstack/glance
glance/tests/unit/test_notifier.py
1
34473
# Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/LIC...
apache-2.0
-3,377,431,714,844,462,600
40.039286
79
0.623096
false
ramadhane/odoo
addons/decimal_precision/__openerp__.py
261
1628
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
8,182,150,570,526,899,000
36
97
0.574324
false
serverdensity/sd-agent-core-plugins
gunicorn/check.py
1
4768
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) """ Collects metrics from the gunicorn web server. http://gunicorn.org/ """ # stdlib import time # 3rd party import psutil # project from checks import AgentCheck class GUnicornCheck(AgentCheck): # Confi...
bsd-3-clause
-7,727,209,935,171,708,000
36.25
106
0.599832
false
stahnma/rpmdistro-gitoverlay
rdgo/utils.py
2
2141
#!/usr/bin/env python # # Copyright (C) 2015 Colin Walters <walters@verbum.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) an...
lgpl-2.1
-4,058,728,493,583,607,300
25.7625
70
0.660906
false
theochem/horton
horton/meanfield/test/test_scf_cdiis.py
4
2038
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
gpl-3.0
-6,417,097,978,299,825,000
27.305556
78
0.723258
false
MQQiang/kbengine
kbe/res/scripts/common/Lib/xml/sax/xmlreader.py
824
12612
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ from . import handler from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReade...
lgpl-3.0
-7,126,149,537,136,257,000
32.365079
78
0.662147
false
techdragon/django
tests/project_template/test_settings.py
23
1644
import os import shutil import unittest from django import conf from django.test import TestCase from django.utils import six from django.utils._os import upath @unittest.skipIf( six.PY2, 'Python 2 cannot import the project template because ' 'django/conf/project_template doesn\'t have an __init__.py fil...
bsd-3-clause
-8,128,524,887,018,648,000
33.978723
81
0.627737
false
t-tran/libcloud
libcloud/test/loadbalancer/test_dimensiondata_v2_3.py
11
26689
# 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 use ...
apache-2.0
1,228,496,386,367,163,100
42.046774
159
0.63232
false
NLeSC/cptm
cptm/utils/topics.py
1
1882
import pandas as pd def get_top_topic_words(topics, opinions, t, top=10): """Return dataframe containing top topics and opinions. Parameters t : str - index of topic number top : int - the number of words to store in the dataframe Returns Pandas DataFrame The DataFrame contains t...
apache-2.0
7,845,588,280,792,093,000
32.017544
79
0.567481
false
Oxygem/canaryd
canaryd_packages/requests/packages/chardet/latin1prober.py
1778
5232
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
-8,520,321,343,722,364,000
36.640288
80
0.559251
false
tund/kaggle-galaxy-zoo
avg_result.py
1
2774
# Copyright (c) 2014, Tu Dinh Nguyen (nguyendinhtu@gmail.com) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this ...
bsd-3-clause
-6,406,368,317,995,723,000
34.113924
94
0.679524
false
chirilo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/urls.py
117
3095
# Copyright (c) 2010, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
3,027,697,509,184,938,000
40.266667
133
0.717286
false
arxcruz/tempest-tool
tempestmail/tests/test_bugs.py
1
2571
import mock import unittest import tempestmail.bugs as bugs class TestBugs(unittest.TestCase): def setUp(self): self.bz_url = 'https://bugzilla.redhat.com/show_bug.cgi?id=1386421' self.lp_url = 'https://bugs.launchpad.net/tripleo/+bug/1634824' self.error_url = 'https://www.google.com' ...
gpl-3.0
2,011,308,115,772,769,500
36.808824
78
0.627771
false
victorbriz/sumatrapdf
scripts/trans_langs.py
16
5002
# List of languages we support, their iso codes and id as understood # by Windows SDK (LANG_* and SUBLANG_*_*). # See http://msdn.microsoft.com/en-us/library/dd318693.aspx for the full list. g_langs = [ ('af', 'Afrikaans', '_LANGID(LANG_AFRIKAANS)'), ('am', 'Armenian (Հայերեն)', '_LANGID(LANG_ARMENIAN)'),...
gpl-3.0
-2,316,670,806,617,547,000
61.226667
119
0.584353
false
greenlion/mysql-server
storage/ndb/mcc/tst/unittest2/__init__.py
155
2406
""" unittest2 unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. To use unittest2 instead of unittest simply replace ``import unittest`` with ``import unittest2``. Copyright (c) 1999-2003 Steve Purcell Copyright (c) 2003-2010 P...
gpl-2.0
5,880,972,309,938,316,000
34.397059
76
0.752286
false
AlperSaltabas/OR_Tools_Google_API
examples/python/volsay.py
34
1857
# Copyright 2011 Hakan Kjellerstrand hakank@bonetmail.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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-7,302,601,027,543,097,000
25.913043
86
0.689284
false
tibotic/simple-pokemongo-bot
pokemongo_bot/health_record/bot_event.py
17
2639
# -*- coding: utf-8 -*- from time import sleep import logging from raven import Client import raven import os import uuid import requests import time class BotEvent(object): def __init__(self, config): self.config = config self.logger = logging.getLogger(__name__) # UniversalAnalytics can ...
mit
3,042,109,113,533,339,000
31.182927
120
0.562713
false
andreasots/qrpth.eu
prism.py
1
2192
from server import app import datetime import psycopg2 import flask import pytz import re TIMEZONE = pytz.timezone("America/Vancouver") CONN = "postgres:///lrrbot" def convert_timezone(row): return (row[0], row[1], TIMEZONE.normalize(row[2].astimezone(TIMEZONE))) @app.route("/prism/") def prism(): with psyc...
gpl-2.0
-586,031,914,001,621,900
41.153846
154
0.625456
false
Franky333/crazyflie-clients-python
src/cfclient/headless.py
1
6707
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2013 Bitcraze AB # # Cr...
gpl-2.0
3,634,465,478,972,241,400
37.768786
77
0.580438
false
NaturalGIS/naturalgis_qgis
python/plugins/processing/modeler/ModelerScene.py
33
1934
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerScene.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
gpl-2.0
-6,975,243,522,019,736,000
37.68
95
0.532058
false
rahul67/hue
desktop/core/ext-py/boto-2.38.0/boto/sdb/queryresultset.py
153
3674
from boto.compat import six # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation t...
apache-2.0
8,177,225,511,681,540,000
38.505376
85
0.615406
false
imtapps/django-imt-fork
tests/regressiontests/expressions_regress/tests.py
46
15966
""" Spanning tests for all the operations that F() expressions can perform. """ from __future__ import absolute_import import datetime from django.db import connection from django.db.models import F from django.test import TestCase, Approximate, skipUnlessDBFeature from .models import Number, Experiment class Expr...
bsd-3-clause
8,147,960,345,964,412,000
40.47013
109
0.595703
false
factorlibre/OCB
addons/note/__openerp__.py
260
2182
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-6,735,806,817,518,069,000
33.634921
78
0.591659
false
emilroz/openmicroscopy
components/tools/OmeroPy/src/path.py
1
34018
#!/usr/bin/env python # -*- coding: utf-8 -*- """ path.py - An object representing a path to a file or directory. Example: from path import path d = path('/home/guido/bin') for f in d.files('*.py'): f.chmod(0755) This module requires Python 2.2 or later. URL: http://www.jorendorff.com/articles/python/path ...
gpl-2.0
1,163,964,049,289,666,300
32.515271
117
0.558146
false
cloud9UG/odoo
doc/conf.py
184
8222
# -*- coding: utf-8 -*- import sys, os import sphinx # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. DIR = os.path.dirname(__file...
agpl-3.0
8,444,170,709,892,893,000
32.287449
95
0.693262
false
dwfreed/mitmproxy
test/mitmproxy/console/test_pathedit.py
4
2245
import os from os.path import normpath from mitmproxy.tools.console import pathedit from mitmproxy.test import tutils from unittest.mock import patch class TestPathCompleter: def test_lookup_construction(self): c = pathedit._PathCompleter() cd = os.path.normpath(tutils.test_data.path("mitmproxy...
mit
-6,447,890,245,607,143,000
30.180556
80
0.577283
false
veltzer/demos-python
src/examples/short/parsing/math_expression.py
1
1056
#!/usr/bin/env python import pprint import sys import simpleparse.dispatchprocessor declaration = r'''# note use of raw string when embedding in python code... full := ws,expr,ws number := [0-9eE+.-]+ expr := number,'+',number/number,'-',number ws := [ \t\v]* ''' class MyProcessorClass(...
gpl-3.0
-2,012,229,150,798,002,200
24.756098
75
0.617424
false
sfepy/sfepy
examples/linear_elasticity/dispersion_analysis.py
2
35004
#!/usr/bin/env python """ Dispersion analysis of a heterogeneous finite scale periodic cell. The periodic cell mesh has to contain two subdomains Y1 (with the cell ids 1), Y2 (with the cell ids 2), so that different material properties can be defined in each of the subdomains (see ``--pars`` option). The command line ...
bsd-3-clause
9,215,424,213,724,976,000
39.702326
344
0.557222
false
rajanandakumar/DIRAC
FrameworkSystem/private/monitoring/Activity.py
19
3551
# $HeadURL$ __RCSID__ = "$Id$" import types from string import Template class Activity: dbFields = [ 'activities.unit', 'activities.type', 'activities.description', 'activities.filename', 'activities.bucketLength', 'sources.site', ...
gpl-3.0
-8,634,838,668,705,523,000
25.909091
91
0.608279
false
ging/horizon
openstack_dashboard/dashboards/admin/defaults/tables.py
9
2665
# Copyright 2013 Kylin, 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...
apache-2.0
6,507,200,925,656,266,000
34.065789
78
0.62439
false
pplatek/odoo
addons/portal/mail_thread.py
390
2004
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-4,965,695,226,466,483,000
45.604651
94
0.619261
false
jfmartinez64/test
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/vine.py
25
3373
from __future__ import unicode_literals import re import json import itertools from .common import InfoExtractor from ..utils import unified_strdate class VineIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vine\.co/v/(?P<id>\w+)' _TEST = { 'url': 'https://vine.co/v/b9KOOWX7HUx', 'md5':...
gpl-3.0
-8,124,081,033,084,654,000
32.068627
85
0.50252
false
etetoolkit/ete
ete3/tools/ete_build_lib/task/uhire.py
4
4331
from __future__ import absolute_import # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU Gener...
gpl-3.0
8,621,354,002,911,737,000
36.991228
84
0.600554
false
CEG-FYP-OpenStack/scheduler
nova/api/openstack/compute/legacy_v2/contrib/rescue.py
5
3852
# Copyright 2011 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 a...
apache-2.0
5,531,573,291,606,104,000
38.306122
79
0.632918
false
HazenBabcock/opensdraw
opensdraw/scripts/list_parts_in_mpd.py
1
3902
#!/usr/bin/env python """ Lists all the unique parts and their colors in a .mpd file. This is sometimes useful for determining the name of a part and/or a color. Hazen 04/15 """ import os import re import sys import opensdraw.lcad_lib.datFileParser as datFileParser if (len(sys.argv) != 2): print("usage: <ldraw ...
mit
3,650,317,381,765,155,000
29.248062
79
0.641722
false
tectronics/timeside
tests/test_yaafe.py
2
2645
#! /usr/bin/env python from unit_timeside import * from timeside.decoder import * from timeside.analyzer import Yaafe from yaafelib import DataFlow,FeaturePlan class TestYaafe(unittest.TestCase): def setUp(self): self.sample_rate = 16000 def testOnSweepWithFeaturePlan(self): "runs on sweep a...
gpl-2.0
-480,269,139,921,902,000
33.802632
95
0.636295
false
harmy/kbengine
kbe/res/scripts/common/Lib/cgi.py
3
35512
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin...
lgpl-3.0
2,785,291,935,713,919,000
32.544747
79
0.552292
false
adrgerez/ardublockly
package/wxcef_build/pack_ardublockly_wxcef.py
4
9610
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # # Creates a zip file of the self executable Ardublockly application. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
apache-2.0
-5,441,320,208,492,101,000
39.041667
80
0.634547
false
tosolveit/scikit-learn
sklearn/datasets/lfw.py
141
19372
"""Loader for the Labeled Faces in the Wild (LFW) dataset This dataset is a collection of JPEG pictures of famous people collected over the internet, all details are available on the official website: http://vis-www.cs.umass.edu/lfw/ Each picture is centered on a single face. The typical task is called Face Veri...
bsd-3-clause
-7,925,854,865,507,911,000
36.90998
87
0.653108
false
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/tests/modeltests/validation/tests.py
50
5106
from django import forms from django.test import TestCase from django.core.exceptions import NON_FIELD_ERRORS from modeltests.validation import ValidationTestCase from modeltests.validation.models import Author, Article, ModelToValidate # Import other tests for this package. from modeltests.validation.validators impor...
apache-2.0
-1,848,085,657,245,873,700
43.789474
117
0.680572
false
b3j0f/schema
b3j0f/schema/test/registry.py
1
6783
#!/usr/bin/env python # -*- coding: utf-8 -*- # -------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2016 Jonathan Labéjof <jonathan.labejof@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and assoc...
mit
-3,113,530,968,089,494,000
25.912698
79
0.625774
false
memakura/s2a_fm
Snap!Files/Snap!Mobile/arduino/serial/urlhandler/protocol_loop.py
141
9516
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a loop back connection receiving itself what it sent. # # The purpose of this module is.. well... You can run the unit tests with it. # and it was so easy to implement ;-) # # (C) 2001-2011 Chris Liecht...
gpl-3.0
-4,304,743,622,947,002,000
34.909434
106
0.589533
false
pleaseproject/python-for-android
python3-alpha/python3-src/Lib/wsgiref/simple_server.py
51
4859
"""BaseHTTPServer that implements the Python WSGI protocol (PEP 3333) This is both an example of how WSGI can be implemented, and a basis for running simple web applications on a local machine, such as might be done when testing or debugging an application. It has not been reviewed for security issues, however, and w...
apache-2.0
1,274,100,884,623,313,700
30.147436
83
0.611648
false
ASCrookes/django
django/contrib/gis/db/backends/mysql/operations.py
328
2746
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.db.backends.base.operations import \ BaseSpatialOperations from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import aggregates from django.db.backends.mysql.operations import D...
bsd-3-clause
-16,405,264,092,433,432
37.138889
91
0.647123
false
vmp32k/litecoin
contrib/devtools/update-translations.py
23
8426
#!/usr/bin/env python3 # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the foll...
mit
363,860,189,383,693,100
38.190698
140
0.624377
false
icsi-berkeley/framework_code
src/main/nluas/app/core_solver.py
2
7749
""" Simple solver "core". Contains capabilities for unpacking a JSON n-tuple, as well as routing this n-tuple based on the predicate_type (command, query, assertion, etc.). Other general capabilities can be added. The design is general enough that the same "unpacking" and "routing" method can be used, as long as a new ...
apache-2.0
-3,054,324,586,030,613,000
38.335025
133
0.630017
false
kirisetsz/kisstudou
kisstudou.py
1
7276
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import re import httplib import urllib from pyquery import PyQuery as pq parser = argparse.ArgumentParser( description='Download video resource from tudou.com', epilog="Parse the url to video address using flvcd.com") parser.add_argument('-...
apache-2.0
4,526,727,220,789,610,000
27.421875
98
0.572018
false
jef-n/QGIS
tests/src/python/test_qgspallabeling_tests.py
30
14051
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsPalLabeling: base suite of render check tests Class is meant to be inherited by classes that test different labeling outputs See <qgis-src-dir>/tests/testdata/labeling/README.rst for description. .. note:: This program is free software; you can redistribute it and/or...
gpl-2.0
-6,683,096,155,341,673,000
36.569519
129
0.664437
false
gw0/myhdl
myhdl/_resize.py
1
4719
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2013 Christopher L. Felton # # The myhdl library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License as # published ...
lgpl-2.1
-943,949,032,652,043,500
26.277457
82
0.573427
false
TribeMedia/sky_engine
tools/sort_sources.py
68
5062
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Given a GYP/GN filename, sort C-ish source files in that file. Shows a diff and prompts for confirmation before doing the deed. Wor...
bsd-3-clause
14,583,438,924,033,156
26.069519
77
0.66851
false
XiaJieCom/change
Demo/days07/day07.py
1
4725
''' class Aniaml: count = 10 def __init__(self,name): self.name = name self.num = None hobbie = 'meat' @classmethod #类方法,不能访问实例变量 def talk(self): print('%s is talking ...'%self.hobbie ) @staticmethod #静态方法,不能访问类变量及实例变量 def walk(): print('is walking ...')...
lgpl-2.1
-7,414,383,576,604,905,000
20.870813
47
0.560053
false
sabi0/intellij-community
python/lib/Lib/site-packages/django/contrib/messages/tests/user_messages.py
241
2619
from django import http from django.contrib.auth.models import User from django.contrib.messages.storage.user_messages import UserMessagesStorage,\ LegacyFallbackStorage from django.contrib.messages.tests.base import skipUnlessAuthIsInstalled from django.contrib.messages.tests.cookie import set_cookie_data from dja...
apache-2.0
5,477,343,693,049,914,000
36.414286
79
0.704849
false
mikhaelfelian/PROJECT-RESTO-TIGERA
assets/tinymce/filemanager/connectors/py/connector.py
9
22350
#!/usr/bin/env python """ FCKeditor - The text editor for internet Copyright (C) 2003-2005 Frederico Caldeira Knabben Licensed under the terms of the GNU Lesser General Public License: http://www.opensource.org/licenses/lgpl-license.php For further information visit: http://www.fckeditor.net/ "Suppo...
gpl-2.0
8,343,888,651,736,149,000
26.617157
133
0.654407
false
gregbdunn/aws-ec2rescue-linux
tools/moduletests/unit/test_arpcache.py
2
12661
# Copyright 2016-2020 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # # or in the "license" f...
apache-2.0
-1,023,453,071,174,588,700
52.876596
117
0.629492
false
sagarghuge/recurringtask
GTG/gtk/editor/notify_dialog.py
1
2066
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
gpl-3.0
5,517,736,922,483,735,000
37.259259
79
0.625363
false
saltastro/polsalt
polsalt/specpolwollaston.py
1
2770
""" specpolsplit Split O and E beams """ import numpy as np from scipy.interpolate import interp1d from scipy.ndimage.interpolation import shift from specpolutils import rssmodelwave def read_wollaston(hdu, wollaston_file): """ Correct the O or E beam for distortion due to the beam splitter Parameters...
bsd-3-clause
-7,685,851,724,710,988,000
24.181818
80
0.626354
false
Fritz449/SRLF
algos/a3c_discrete.py
1
15229
import tensorflow as tf import numpy as np import os import sys import random import subprocess from redis import Redis import time sys.path.append(os.path.realpath("..")) import helpers.utils as hlp from models.feed_forward import FFDiscrete class A3CDiscreteTrainer(FFDiscrete): def __init__(self, sess, args):...
apache-2.0
-6,978,503,716,314,443,000
41.539106
118
0.537987
false
varunarya10/nova_test_latest
nova/virt/libvirt/guest.py
4
13570
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # Copyright (c) 2013 Hewlett-Pa...
apache-2.0
6,569,003,820,764,894,000
34.430809
78
0.60818
false
munkiat/libcloud
docs/examples/compute/vmware_vcloud_1.5.py
60
2076
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver import libcloud.security # Skip this step if you are launching nodes on an official vCloud # provider. It is intended only for self signed SSL certs in # vanilla vCloud Director v1.5 test deployments. # Note: Code like this ...
apache-2.0
6,054,260,024,234,999,000
38.169811
75
0.691715
false
aarticianpc/greenpointtrees
src/paypal/pro/migrations/0001_initial.py
12
2843
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
mit
2,255,531,316,139,580,400
52.641509
114
0.577559
false
kmspriyatham/symath
scipy/scipy/sparse/construct.py
2
19642
"""Functions to construct sparse matrices """ from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['spdiags', 'eye', 'identity', 'kron', 'kronsum', 'hstack', 'vstack', 'bmat', 'rand', 'diags', 'block_diag'] from warnings import warn import nu...
apache-2.0
-5,423,150,516,931,027
27.800587
95
0.545006
false
superdesk/superdesk-core
superdesk/io/feeding_services/file_service.py
2
8059
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
agpl-3.0
-6,315,356,105,772,752,000
42.096257
124
0.613103
false
ATIX-AG/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
8
79001
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
gpl-3.0
5,300,736,337,898,016,000
45.71851
217
0.537651
false
Qalthos/ansible
test/units/module_utils/test_hetzner.py
31
7252
# Copyright: (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import copy import json import pytest from mock import MagicMock from ansible.module_utils import hetzner class ModuleFailException(Exception): def __init__(self, msg, **kwargs): ...
gpl-3.0
-2,605,984,255,953,017,000
26.366038
99
0.511859
false