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
batxes/4Cin
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models10386.py
4
13923
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
4,421,540,583,597,155,300
45.721477
75
0.700065
false
jorik041/phantomjs
src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py
261
25883
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
6,084,566,627,163,804,000
35.2507
80
0.661554
false
lreis2415/SEIMS
seims/__init__.py
1
1350
#! /usr/bin/env python # -*- coding: utf-8 -*- """@package pySEIMS Python APIs for SEIMS Preprocess, postprocess, parameters sensitivity, calibration, and scenario_analysis ------------------- author : Liangjun Zhu, Junzhi Liu copyright : (C) 2018-...
gpl-3.0
-3,965,058,475,572,145,000
47.214286
83
0.440741
false
matthiasdiener/spack
var/spack/repos/builtin/packages/plumed/package.py
4
7313
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
8,957,502,296,492,429,000
38.52973
79
0.626419
false
sovietspy2/uzletiProject
python/Lib/encodings/iso2022_jp_2004.py
61
1112
# # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.de...
gpl-3.0
-5,114,200,930,544,731,000
26.512821
74
0.680755
false
forYali/yali
setup.py
1
4733
#!/usr/bin/env python # # Copyright (C) 2005-2010 TUBITAK/UEKAE # # 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. # # Pl...
gpl-2.0
8,504,267,277,749,420,000
32.330986
98
0.575322
false
qspin/qtaste
doc/src/docbkx/scripts/lib/PyGithub/github/PullRequest.py
72
23575
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Michael Stead <michael.stead@gmail.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
lgpl-3.0
-4,179,708,856,147,670,500
37.147249
121
0.591516
false
petteyg/intellij-community
python/lib/Lib/site-packages/django/utils/unittest/__init__.py
571
3069
""" 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...
apache-2.0
3,558,514,873,243,780,000
37.3625
83
0.689475
false
infoclock/OlympicTracker
allauthdemo/demo/views.py
1
3564
import math from django.shortcuts import render from django.views import generic from allauthdemo.auth.models import DemoUser from allauthdemo.demo.models import Problem from fileupload.models import Submission from allauthdemo.demo.models import ContestParticipation class ProblemView(generic.ListView): model = Pr...
mit
5,575,661,220,848,428,000
34.287129
112
0.583053
false
Joev-/HoNCore
honcore/requester.py
1
3523
""" HoNCore. Python library providing connectivity and functionality with HoN's chat server. """ import hashlib, urllib2 from exceptions import * from httplib import BadStatusLine """ Sends requests to the HoN master servers. These are just basic HTTP get requests which return serialised php. A version of ...
unlicense
-4,369,834,708,484,231,700
29.903509
147
0.59069
false
gazpachoking/Flexget
flexget/components/notify/notifiers/email.py
4
7177
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.utils import text_to_native_str import logging import smtplib import socket import getpass from email.mime.multipart import MIMEMultipart from email.mime.text i...
mit
6,920,338,559,608,736,000
34.009756
96
0.530305
false
mancoast/CPythonPyc_test
fail/323_test_socket.py
1
76285
#!/usr/bin/env python3 import unittest from test import support import errno import io import socket import select import time import traceback import queue import sys import os import array import platform import contextlib from weakref import proxy import signal import math try: import fcntl except ImportError:...
gpl-3.0
-3,650,486,759,743,471,000
34.514206
117
0.605687
false
melbit-kevinwessel/ansible-modules-extras
packaging/language/npm.py
73
8566
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chris Hoffman <christopher.hoffman@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
gpl-3.0
-738,998,647,237,337,000
31.44697
101
0.618959
false
jschnurr/scrapyscript
tests/test_scrapyscript.py
1
2302
import unittest from scrapy.settings import Settings from scrapy.spiders import Spider import scrapy from scrapyscript import Job, Processor, ScrapyScriptException class MySpider(Spider): name = 'myspider' def start_requests(self): yield scrapy.Request(self.url) def parse(self, response): ...
mit
-7,374,068,400,626,902,000
26.746988
73
0.621199
false
bkrukowski/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/ports_mock.py
121
2482
# Copyright (C) 2011 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 f...
bsd-3-clause
-8,408,172,740,621,734,000
39.032258
72
0.734488
false
cbmoore/statsmodels
statsmodels/sandbox/tools/tools_pca.py
39
4142
# -*- coding: utf-8 -*- """Principal Component Analysis Created on Tue Sep 29 20:11:23 2009 Author: josef-pktd TODO : add class for better reuse of results """ import numpy as np def pca(data, keepdim=0, normalize=0, demean=True): '''principal components with eigenvector decomposition similar to princomp ...
bsd-3-clause
3,578,457,939,730,979,300
26.986486
77
0.61492
false
Metaswitch/calico-neutron
neutron/plugins/cisco/l3/rpc/devices_cfgagent_rpc_cb.py
16
2020
# Copyright 2014 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.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-7,569,412,238,119,054,000
42.913043
78
0.668317
false
solarpermit/solarpermit
website/migrations/0083_auto__add_field_view_view_type__add_field_view_user__add_field_view_ju.py
1
57706
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'View.view_type' db.add_column('website_view', 'view_type', self.gf('dj...
bsd-3-clause
-1,574,703,932,698,186,000
91.036683
200
0.547135
false
chunywang/crosswalk-test-suite
embeddingapi/embedding-build-android-tests/gradle/crosswalk_online_gradle_build_app.py
18
2264
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
7,296,370,928,714,408,000
39.428571
80
0.735866
false
skycucumber/restful
python/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py
551
2512
# urllib3/filepost.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import codecs import mimetypes from uuid import uuid4 from io import BytesIO from .packages ...
gpl-2.0
-3,499,123,851,465,455,000
24.12
85
0.644904
false
kieferbonk/xbmc-finnish-tv
plugin.video.yleareena/osx/Crypto/SelfTest/Protocol/test_rfc1751.py
132
2208
# # Test script for Crypto.Util.RFC1751. # # Part of the Python Cryptography Toolkit # # Written by Andrew Kuchling and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is ...
gpl-3.0
-7,090,879,316,531,314,000
34.612903
74
0.655797
false
marionleborgne/nupic.research
projects/sequence_prediction/discrete_sequences/plotMultiplePrediction.py
12
3551
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
6,265,334,897,826,910,000
37.193548
89
0.557026
false
aladdinwang/django-cms
cms/plugins/picture/migrations/0012_auto__chg_field_picture_height__chg_field_picture_width.py
1
7553
# -*- 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): # Changing field 'Picture.height' db.alter_column(u'cmsplugin_picture', 'height', self.gf('django.db.models...
bsd-3-clause
2,844,870,107,597,339,600
76.876289
184
0.566
false
bbangert/velruse
velruse/providers/renren.py
3
4133
"""Renren Authentication Views""" from pyramid.httpexceptions import HTTPFound from pyramid.security import NO_PERMISSION_REQUIRED import requests from ..api import ( AuthenticationComplete, AuthenticationDenied, register_provider, ) from ..exceptions import ThirdPartyFailure from ..settings import Provid...
mit
-3,731,091,311,776,910,000
34.025424
76
0.576579
false
klunwebale/odoo
addons/mail/wizard/mail_compose_message.py
218
20346
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-3,119,174,173,056,167,000
51.709845
169
0.592549
false
jiasir/playback
playback/cli/swift_storage.py
2
21875
import sys import logging import os from playback.cli.cliutil import priority from playback.api import SwiftStorage from cliff.command import Command def make_target(args): try: target = SwiftStorage(user=args.user, hosts=args.hosts.split(','), key_filename=args.key_filename, ...
mit
4,998,109,676,552,600,000
45.247357
179
0.543314
false
minorua/QGIS
python/testing/mocked.py
45
1873
# -*- coding: utf-8 -*- """ *************************************************************************** mocked --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch **************************************...
gpl-2.0
5,828,959,472,626,269,000
29.209677
99
0.510411
false
skuda/client-python
kubernetes/test/test_autoscaling_v2alpha1_api.py
1
2946
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
apache-2.0
-4,146,779,882,615,850,000
21.318182
105
0.622878
false
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/python/kernel_tests/one_hot_op_test.py
139
12639
# Copyright 2015 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...
mit
7,998,919,612,324,462,000
28.738824
80
0.570773
false
dhoffman34/django
django/core/files/uploadedfile.py
91
4334
""" Classes representing uploaded files. """ import errno import os from io import BytesIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import force_str __all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryU...
bsd-3-clause
-3,926,574,937,261,613,000
32.859375
114
0.607983
false
Glottotopia/aagd
moin/local/moin/MoinMoin/userprefs/suid.py
2
3485
# -*- coding: iso-8859-1 -*- """ MoinMoin - switch user form @copyright: 2001-2004 Juergen Hermann <jh@web.de>, 2003-2007 MoinMoin:ThomasWaldmann 2007 MoinMoin:JohannesBerg @license: GNU GPL, see COPYING for details. """ from MoinMoin import user, util, wikiu...
mit
6,231,923,246,687,088,000
33.927835
119
0.54089
false
MediaSapiens/wavesf
django/contrib/localflavor/se/forms.py
311
5623
# -*- coding: utf-8 -*- """ Swedish specific Form helpers """ import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.core.validators import EMPTY_VALUES from django.contrib.localflavor.se.utils import (id_number_checksum, validate_id_birthday, format_personal_id_numbe...
bsd-3-clause
-8,749,540,259,445,858,000
34.808917
150
0.661864
false
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/s2/create_s2_account.py
1
3527
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
-4,562,366,141,486,079,000
44.217949
118
0.522824
false
snnn/tensorflow
tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py
25
59018
# Copyright 2017 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
7,223,700,658,727,769,000
40.013204
80
0.639127
false
Dreizan/csci1200OnlineCourse
modules/course_explorer/course_explorer.py
19
2859
# Copyright 2013 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 ...
apache-2.0
2,717,269,061,334,570,500
32.244186
80
0.70829
false
Alwnikrotikz/open-hea
src/openhea/xlrd/compdoc.py
64
14974
# -*- coding: cp1252 -*- ## # Implements the minimal functionality required # to extract a "Workbook" or "Book" stream (as one big string) # from an OLE2 Compound Document file. # <p>Copyright © 2005-2008 Stephen John Machin, Lingfo Pty Ltd</p> # <p>This module is part of the xlrd package, which is released under a BS...
lgpl-2.1
4,689,948,959,397,879,000
40.826816
115
0.526245
false
mpSchrader/gym-sokoban
examples/Human_Playing_Commandline.py
1
3725
import gym import gym_sokoban import time from PIL import Image import numpy as np import argparse import os parser = argparse.ArgumentParser(description='Run environment with random selected actions.') parser.add_argument('--rounds', '-r', metavar='rounds', type=int, help='number of rounds to play...
mit
-7,535,149,805,336,532,000
32.863636
117
0.608591
false
popazerty/enigma2-4.3
lib/python/Components/Sources/EventInfo.py
85
1245
from Components.PerServiceDisplay import PerServiceBase from Components.Element import cached from enigma import iPlayableService, iServiceInformation, eServiceReference, eEPGCache from Source import Source class EventInfo(PerServiceBase, Source, object): NOW = 0 NEXT = 1 def __init__(self, navcore, now_or_next): ...
gpl-2.0
-2,418,238,140,670,209,500
28.642857
86
0.746185
false
xaviercobain88/framework-python
build/lib.linux-i686-2.7/openerp/addons/stock/stock.py
2
157623
# -*- 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,172,070,770,001,740,000
50.713583
343
0.567455
false
lepistone/odoo
addons/note_pad/note_pad.py
441
1301
# -*- 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
1,352,200,634,154,891,000
36.2
78
0.598002
false
Henrilin28/lightblue-0.4
src/linux/_obexcommon.py
49
18261
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
gpl-3.0
379,114,699,812,442,560
34.527237
131
0.641422
false
Jewel-Systems/server
udp.py
1
1268
import socket import threading from log import log web_server_port = 53455 listen_port = 53456 reply_port = 53457 debug_timeout = 10 # seconds d = None def daemon(): # find local IP s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8.8.8.8', 0)) local_ip_address = s.getsockname()[0] ...
mit
5,410,425,373,328,573,000
25.416667
104
0.549685
false
manipopopo/tensorflow
tensorflow/contrib/eager/python/examples/spinn/data_test.py
42
11219
# Copyright 2017 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
731,695,244,088,338,600
40.551852
80
0.606293
false
renner/spacewalk
client/tools/rhn-virtualization/virtualization/state.py
7
2331
# # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
5,432,580,781,262,604,000
32.782609
79
0.591592
false
jniediek/mne-python
mne/channels/tests/test_interpolation.py
3
5400
import os.path as op import warnings import numpy as np from numpy.testing import (assert_allclose, assert_array_equal) from nose.tools import assert_raises, assert_equal, assert_true from mne import io, pick_types, pick_channels, read_events, Epochs from mne.channels.interpolation import _make_interpolation_matrix f...
bsd-3-clause
-78,277,468,034,105,660
39
79
0.646852
false
sergiohgz/incubator-airflow
airflow/www/views.py
2
111267
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-463,769,298,034,517,000
34.742692
102
0.54513
false
alown/chromium
mothership/tools/tiledialog.py
4
4700
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. # # Authors: # Brian Paul """The TileDialog class is a dialog used to edit a list of tiles for a server/network node. If the server node is an N-instance node the dialog wi...
bsd-3-clause
6,924,548,560,899,630,000
30.543624
75
0.677021
false
bbuchalter/python_koans
python3/koans/about_lists.py
30
3202
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrays in the Ruby Koans # from runner.koan import * class AboutLists(Koan): def test_creating_lists(self): empty_list = list() self.assertEqual(list, type(empty_list)) self.assertEqual(__, len(empty_list)) def test_list...
mit
1,534,068,500,940,285,700
28.109091
79
0.562149
false
mananam/pelican-prajna
prajna/readers.py
1
2368
# -*- coding: utf-8 -*- """Readers for Sloka content.""" from __future__ import unicode_literals, print_function import json import logging from pelican.readers import BaseReader logger = logging.getLogger(__name__) class SlokaReader(BaseReader): """A commonmarkdown based reader for sanskrit verses. Uses...
mit
-2,345,749,443,758,305,300
24.73913
79
0.541385
false
fengshao0907/fbthrift
thrift/lib/py/server/TServer.py
14
13984
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-6,639,817,403,907,701,000
32.777778
79
0.601831
false
weizhenwei/wireshark
tools/wireshark_gen.py
11
100064
# -*- python -*- # # wireshark_gen.py (part of idl2wrs) # # Author : Frank Singleton (frank.singleton@ericsson.com) # # Copyright (C) 2001 Frank Singleton, Ericsson Inc. # # This file is a backend to "omniidl", used to generate "Wireshark" # dissectors from CORBA IDL descriptions. The output language generated # ...
gpl-2.0
2,614,307,190,939,943,400
32.299168
223
0.588723
false
Peddle/hue
desktop/core/ext-py/boto-2.38.0/boto/dynamodb2/fields.py
163
8292
from boto.dynamodb2.types import STRING class BaseSchemaField(object): """ An abstract class for defining schema fields. Contains most of the core functionality for the field. Subclasses must define an ``attr_type`` to pass to DynamoDB. """ attr_type = None def __init__(self, name, data_...
apache-2.0
-1,965,108,877,953,737,500
23.605341
76
0.514231
false
PaulKinlan/cli-caniuse
site/app/scripts/bower_components/jsrepl-build/extern/python/unclosured/lib/python2.7/functools.py
259
4478
"""functools.py - Tools for working with functions and callable objects """ # Python module wrapper for _functools C module # to allow utilities written in Python to be added # to the functools module. # Written by Nick Coghlan <ncoghlan at gmail.com> # Copyright (C) 2006 Python Software Foundation. # See C source co...
apache-2.0
8,191,675,848,016,848,000
43.78
88
0.590442
false
chuckgu/Alphabeta
tensorflow/json_txt.py
1
1272
# -*- coding: utf-8 -*- """ Created on Wed Mar 9 00:35:54 2016 @author: chuckgu """ import json,os from nltk.tokenize import sent_tokenize,word_tokenize from konlpy.tag import Twitter import numpy as np import sys reload(sys) sys.setdefaultencoding('utf8') twitter=Twitter() txt=[] checklist=['Exclamation','A...
gpl-3.0
666,296,772,551,265,800
22.145455
127
0.639937
false
trhd/meson
setup.py
4
4010
#!/usr/bin/env python3 # Copyright 2016 The Meson development 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 appl...
apache-2.0
3,012,592,331,477,482,000
39.918367
90
0.603491
false
JuliaSprenger/python-neo
neo/io/neuroshareapiio.py
5
19948
""" Class for "reading" data from Neuroshare compatible files (check neuroshare.org) It runs through the whole file and searches for: analog signals, spike cutouts, and trigger events (without duration) Depends on: Neuroshare API 0.9.1, numpy 1.6.1, quantities 0.10.1 Supported: Read Author: Andre Maia Chagas """ # n...
bsd-3-clause
4,663,152,048,872,259,000
44.752294
99
0.563315
false
syndicate-storage/syndicate-core
python/syndicate/observer/sync.py
2
12422
#!/usr/bin/env python """ Copyright 2014 The Trustees of Princeton University 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 Unl...
apache-2.0
-2,728,611,847,250,490,400
37.940439
183
0.654564
false
anirudhSK/chromium
tools/site_compare/operators/equals_with_mask.py
189
1589
# Copyright (c) 2011 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. """Compare two images for equality, subject to a mask.""" from PIL import Image from PIL import ImageChops import os.path def Compare(file1, file2, *...
bsd-3-clause
-4,998,307,011,143,265,000
26.877193
78
0.671492
false
jevinw/rec_utilities
babel_util/scripts/arxivmd_to_leveldb.py
1
1158
#!/usr/bin/env python3 import leveldb import msgpack import csv from util.misc import Benchmark, open_file REQUIRED_KEYS = {'title', 'paper_id', 'date'} if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description="Creates a LevelDB of TSV metadata in infile") parser.add_argumen...
agpl-3.0
1,375,054,932,115,476,500
34.090909
95
0.612263
false
hayd/contracts
src/contracts/library/__init__.py
3
1109
from .suggester import create_suggester from .dummy import Any, Never from .separate_context import SeparateContext from .types_misc import Type, CheckType, Number from .strings import * from .lists import List from .seq import Seq from .tuple import Tuple from .dicts import Dict from .map import Map from .sets import ...
lgpl-3.0
2,536,886,846,230,831,600
31.617647
76
0.722272
false
EDUlib/edx-platform
lms/djangoapps/program_enrollments/admin.py
5
4269
""" Admin tool for the Program Enrollments models """ from django.contrib import admin from django.urls import reverse from django.utils.html import format_html from lms.djangoapps.program_enrollments.models import ( CourseAccessRoleAssignment, ProgramCourseEnrollment, ProgramEnrollment ) class ProgramEn...
agpl-3.0
8,521,316,057,500,592,000
27.651007
93
0.666432
false
autowitch/pypov
scenes/geomorphs/lib/environment.py
1
1895
from pypov.pov import Vector, Texture, Pigment, POV, File, Camera, Cylinder from pypov.pov import LightSource, Sphere, Finish, Settings, Plane, Box, Cone from pypov.pov import Checker, SkySphere, Union, GlobalSettings, Radiosity from pypov.pov import Polygon_4, Difference, Object, parse_args dark_glass = Texture( ...
mit
-8,460,256,392,409,207,000
30.583333
111
0.558311
false
cancro7/gem5
configs/dram/sweep.py
4
8090
# Copyright (c) 2014-2015 ARM Limited # 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 implementation of the functiona...
bsd-3-clause
-7,971,481,720,819,969,000
37.894231
80
0.712608
false
sshah-solarflare/Libvirt-PCI-passthrough-
examples/domain-events/events-python/event-test.py
3
17964
#!/usr/bin/python -u # # # ################################################################################# # Start off by implementing a general purpose event loop for anyones use ################################################################################# import sys import getopt import os import libvirt impor...
lgpl-2.1
-5,002,054,521,174,777,000
35.072289
116
0.593298
false
ATIX-AG/ansible
lib/ansible/modules/system/hostname.py
34
24853
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Hiroaki Nakamura <hnakamur@gmail.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 ANSIBLE_METADATA = {'metadata_versi...
gpl-3.0
-5,558,078,388,601,224,000
30.027466
133
0.57816
false
cowenberg/snap
snap_website/users/views.py
1
1850
from django.shortcuts import render, redirect from django.http.response import HttpResponse from users.decorators import user_is_anonymous, user_is_authenticated from users.models import UserRegistrationForm, UserAuthenticationForm from django.contrib.auth import logout from django.contrib import messages REQUEST_METH...
gpl-2.0
1,189,361,525,411,843,300
32.636364
69
0.722703
false
rnicoll/bitcoin
test/functional/p2p_unrequested_blocks.py
35
13067
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of unrequested blocks. Setup: two nodes, node0 + node1, not connected to each other. N...
mit
-5,804,480,572,979,505,000
43.90378
113
0.657534
false
hsaputra/tensorflow
tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py
164
1319
# Copyright 2015 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
996,312,244,645,810,800
42.966667
80
0.680061
false
manojpandey/hackenvision16
tinybank/tinybank/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py
1005
92627
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
mit
-9,137,396,584,467,628,000
34.530111
103
0.539054
false
google/dnae
services/service-example/service_example_test.py
1
3295
# Copyright 2018 Google 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 writing,...
apache-2.0
-1,337,010,561,761,588,500
34.430108
79
0.70956
false
molobrakos/home-assistant
tests/helpers/test_config_validation.py
5
27755
"""Test config validators.""" from datetime import date, datetime, timedelta import enum import os from socket import _GLOBAL_DEFAULT_TIMEOUT from unittest.mock import Mock, patch import uuid import pytest import voluptuous as vol import homeassistant import homeassistant.helpers.config_validation as cv def test_bo...
apache-2.0
2,127,993,259,743,206,400
26.978831
79
0.592686
false
jamiefolsom/edx-platform
common/djangoapps/student/tests/test_login.py
23
25132
''' Tests for student activation and login ''' import json import unittest from django.test import TestCase from django.test.client import Client from django.test.utils import override_settings from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django....
agpl-3.0
5,787,749,365,507,259,000
45.800745
134
0.645193
false
dudymas/python-openstacksdk
openstack/compute/v2/server_interface.py
3
1503
# 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 under t...
apache-2.0
-8,529,513,127,983,561,000
33.953488
75
0.703925
false
alqfahad/odoo
addons/event/__openerp__.py
261
2296
# -*- 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,671,822,926,623,076,000
36.032258
119
0.606707
false
USGSDenverPychron/pychron
pychron/loading/tasks/actions.py
1
1926
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
apache-2.0
-588,921,055,911,181,200
26.913043
81
0.587227
false
eiginn/passpie
passpie/process.py
1
1326
import logging import os from subprocess import Popen, PIPE from ._compat import * DEVNULL = open(os.devnull, 'w') class Proc(Popen): def communicate(self, **kwargs): if kwargs.get('input') and isinstance(kwargs['input'], basestring): kwargs['input'] = kwargs['input'].encode('utf-8') ...
mit
-9,058,853,765,453,301,000
27.212766
75
0.593514
false
lucienfostier/gaffer
python/GafferSceneTest/ParentConstraintTest.py
2
6192
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
8,913,361,238,377,620,000
34.791908
173
0.676518
false
StackOps/fabuloso-catalog-360
automation/automation.py
1
4992
# Copyright 2012-2013 STACKOPS TECHNOLOGIES S.L. # # 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 applic...
apache-2.0
1,734,657,436,352,666,600
42.408696
79
0.64383
false
TansyArron/pants
src/python/pants/backend/python/tasks/python_eval.py
4
6324
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import pkg...
apache-2.0
5,447,739,353,758,918,000
42.020408
110
0.631246
false
gpotter2/scapy
scapy/contrib/automotive/obd/pid/pids_80_9F.py
5
7374
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Andreas Korb <andreas.d.korb@gmail.com> # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.status = skip from scapy.fields import StrFixedLenField, Fla...
gpl-2.0
-5,022,860,498,400,766,000
24.69338
77
0.567941
false
ravenland/ycmWinRepo
third_party/ycmd/third_party/jedi/test/completion/basic.py
8
4900
# ----------------- # cursor position # ----------------- #? 0 int int() #? 3 int int() #? 4 str int(str) # ----------------- # should not complete # ----------------- #? [] . #? [] str.. #? [] a(0):. # ----------------- # if/else/elif # ----------------- if 1: 1 elif(3): a = 3 else: a = '' #? int() str...
gpl-3.0
-2,625,201,827,388,112,400
11.986737
91
0.407067
false
janebeckman/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/duplicate_entries/test_duplicate_entries.py
7
2374
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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
-5,692,006,525,277,941,000
40.649123
138
0.732098
false
mavenlin/tensorflow
tensorflow/examples/speech_commands/label_wav_test.py
53
2298
# Copyright 2017 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
9,078,793,883,447,491,000
34.90625
80
0.669278
false
kkouer/PcGcs
Lib/site-packages/numpy/lib/benchmarks/bench_arraysetops.py
65
1615
import numpy as np import time from numpy.lib.arraysetops import * def bench_unique1d( plot_results = False ): exponents = np.linspace( 2, 7, 9 ) ratios = [] nItems = [] dt1s = [] dt2s = [] for ii in exponents: nItem = 10 ** ii print 'using %d items:' % nItem a = np.fix...
gpl-3.0
-1,161,688,538,665,426,000
23.846154
69
0.499071
false
staer/mosbius
mosbius/fabfile.py
1
1286
from __future__ import with_statement from fabric.api import * from fabric.contrib.console import confirm def deploy(revision=''): if revision!='': print "Deploying to server using revision: %s" % revision updateSource(revision) migrateDatabase() restartApache() def backupDatabas...
mit
-6,669,615,216,920,953,000
30.390244
72
0.633748
false
matthaywardwebdesign/rethinkdb
test/rql_test/connections/connection_star.py
10
1535
#!/usr/bin/env python '''Basic test that `from rethinkdb import *` works''' import os, sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir, "common")) import driver, utils dbName, tableName = utils.get_test_db_table() # -- import rethikndb driver via star method p...
agpl-3.0
1,572,375,122,368,391,200
26.410714
109
0.689251
false
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/win32/Demos/service/nativePipeTestService.py
15
2084
# This is an example of a service hosted by python.exe rather than # pythonservice.exe. # Note that it is very rare that using python.exe is a better option # than the default pythonservice.exe - the latter has better error handling # so that if Python itself can't be initialized or there are very early # import erro...
mit
2,737,693,378,475,623,400
36.214286
79
0.703455
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/contrib/localflavor/us/forms.py
101
4555
""" USA-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_text from django.u...
mit
-8,412,182,290,310,969,000
35.150794
112
0.609879
false
westinedu/similarinterest
dbindexer/api.py
74
1119
from .lookups import LookupDoesNotExist, ExtraFieldLookup from . import lookups as lookups_module from .resolver import resolver import inspect # TODO: add possibility to add lookup modules def create_lookup(lookup_def): for _, cls in inspect.getmembers(lookups_module): if inspect.isclass(cls) and issubcla...
bsd-3-clause
-8,975,469,563,652,126,000
40.481481
75
0.654155
false
brokenjacobs/ansible
lib/ansible/modules/cloud/openstack/os_server_volume.py
29
4905
#!/usr/bin/python #coding: utf-8 -*- # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # This module 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 yo...
gpl-3.0
134,690,437,407,514,050
29.277778
77
0.623038
false
chetan51/nupic
examples/opf/experiments/opfrunexperiment_test/checkpoints/b/description.py
17
2324
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progr...
gpl-3.0
3,407,355,834,787,136,000
50.644444
452
0.619191
false
boundarydevices/android_external_chromium_org
chrome/common/extensions/docs/server2/api_categorizer_test.py
10
2368
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from api_categorizer import APICategorizer from compiled_file_system import CompiledFileSystem from extensions_paths im...
bsd-3-clause
-1,108,544,845,505,845,400
29.766234
79
0.629645
false
nowopen/scrapy
tests/test_contracts.py
140
5471
from unittest import TextTestResult from twisted.trial import unittest from scrapy.spiders import Spider from scrapy.http import Request from scrapy.item import Item, Field from scrapy.contracts import ContractsManager from scrapy.contracts.default import ( UrlContract, ReturnsContract, ScrapesContract, )...
bsd-3-clause
6,767,295,854,887,965,000
28.256684
84
0.622555
false
google/rekall
rekall-core/rekall/plugins/windows/malware/apihooks_test.py
4
1482
from rekall import addrspace from rekall import testlib from rekall.plugins.windows.malware import apihooks class TestHookHeuristics(testlib.RekallBaseUnitTestCase): """Test the hook detection heuristic. The actual test cases are generated using the nasm assembler in: rekall/src/hooks/amd64.asm and reka...
gpl-2.0
-1,226,199,349,252,432,100
36.05
80
0.619433
false
mgaffney/avro
lang/py/src/avro/protocol.py
2
8167
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
3,179,841,368,350,748,700
35.459821
77
0.676993
false
Tiger66639/ansible-modules-core
packaging/os/rhn_register.py
122
12900
#!/usr/bin/python # (c) James Laska # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # A...
gpl-3.0
-7,595,400,171,078,913,000
36.068966
169
0.613876
false
doptio/you-owe-it
yoi/app.py
1
2787
from __future__ import unicode_literals, division from flask import Flask, request, redirect from flask.ext.sqlalchemy import SQLAlchemy import os from raven import Client from raven.middleware import Sentry from yoi.account.user import bp as account from yoi.config import (secret, database_ur...
mit
-6,354,748,853,859,075,000
28.03125
73
0.653032
false
shepdelacreme/ansible
lib/ansible/modules/network/interface/net_linkagg.py
96
2696
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-4,086,461,114,613,442,000
27.083333
93
0.670252
false
AaltoML/kalman-jax
kalmanjax/likelihoods.py
1
48869
import jax.numpy as np from jax.scipy.special import erf, gammaln from jax import jit, partial, jacrev, random, vmap, grad from jax.scipy.linalg import cholesky, cho_factor, cho_solve from utils import inv, softplus, sigmoid, logphi, gaussian_moment_match, softplus_inv, gauss_hermite, \ ensure_positive_precision pi...
apache-2.0
8,736,735,242,641,194,000
44.410281
130
0.561792
false
kobejean/tensorflow
tensorflow/python/eager/execution_callbacks.py
11
11832
# Copyright 2017 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
-6,682,841,529,496,702,000
34.109792
80
0.634888
false