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
City-of-Helsinki/kuulemma
kuulemma/models/question.py
2
3390
# -*- coding: utf-8 -*- # Kuulemma # Copyright (C) 2014, Fast Monkeys Oy # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
agpl-3.0
-1,828,551,257,976,780,800
27.487395
78
0.613274
false
andyzsf/edx
lms/djangoapps/courseware/tests/test_model_data.py
4
15805
""" Test for lms courseware app, module data (runtime data storage for XBlocks) """ import json from mock import Mock, patch from functools import partial from courseware.model_data import DjangoKeyValueStore from courseware.model_data import InvalidScopeError, FieldDataCache from courseware.models import StudentModul...
agpl-3.0
-2,841,379,221,693,809,700
45.485294
149
0.691933
false
Azure/azure-sdk-for-python
sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_service_fabrics_operations.py
1
41637
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
1,448,853,584,944,195,600
47.302784
243
0.628191
false
Pikecillo/genna
external/4Suite-XML-1.0.2/Ft/Lib/DistExt/BDist.py
1
2361
import os import sys from distutils.command import bdist from Ft.Lib.DistExt import Util class BDist(bdist.bdist): """ Extended 'bdist' command that adds support for InnoSetup Windows installers and Python Egg files. """ command_name = 'bdist' default_format = bdist.bdist.default_format.copy...
gpl-2.0
-4,524,352,369,091,695,000
33.217391
79
0.626853
false
gooddata/openstack-nova
nova/tests/functional/db/test_connection_switch.py
6
8666
# 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 # d...
apache-2.0
-7,959,131,255,602,167,000
42.114428
78
0.602469
false
twood02/adv-net-samples
sdn/pox/pox/misc/pidfile.py
44
2096
# Copyright 2013 James McCauley # # 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 writi...
mit
839,814,898,453,746,300
22.550562
74
0.650286
false
espressomd/espresso
doc/tutorials/active_matter/solutions/rectification_simulation.py
2
6624
# # Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
gpl-3.0
-5,037,754,540,907,154,000
30.393365
91
0.565368
false
PersianWikipedia/pywikibot-core
tests/flow_edit_tests.py
2
11105
# -*- coding: utf-8 -*- """Edit tests for the flow module.""" # # (C) Pywikibot team, 2015-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals from pywikibot.exceptions import LockedPage from pywikibot.flow import Board, Topic, Post from pywikib...
mit
6,132,236,568,618,926,000
32.448795
79
0.620171
false
SimonSapin/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py
4
25973
import itertools import os import urlparse from collections import namedtuple, defaultdict from wptmanifest.node import (DataNode, ConditionalNode, BinaryExpressionNode, BinaryOperatorNode, VariableNode, StringNode, NumberNode, UnaryExpressionNode, UnaryOpera...
mpl-2.0
-1,674,319,530,333,104,000
37.027818
109
0.606707
false
TeamRoquette/PyRat
lib/shortestPaths.py
1
1218
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def orderPath (nodesDict, start, stop, path): """ Internal function used by shortestWay to put into order nodes from the routing table. Return the shortest path from start to stop """ if start == stop: return path + [start] return or...
mit
-3,572,513,400,971,579,000
25.478261
89
0.610837
false
jforge/openant
ant/base/driver.py
1
8107
# Ant # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # 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, m...
mit
2,882,284,457,482,533,400
30.917323
116
0.565684
false
uclaros/QGIS
tests/src/python/test_qgsserver_accesscontrol_wfs.py
4
25549
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer. .. note:: 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. """ __autho...
gpl-2.0
4,745,902,798,118,145,000
44.786738
128
0.574504
false
UCSC-nanopore-cgl/nanopore-RNN
nanotensor/signalAlign-utils.py
1
7219
#!/usr/bin/env python """ This is a place for small scripts and utility functions """ ######################################################################## # File: utils.py # executable: utils.py # Purpose: maintain some simple functions as needed # make sure all events are represented from output from signalalig...
mit
-4,013,240,917,253,713,400
38.021622
116
0.598836
false
leedtan/SparklesSunshinePuppies
kycd_y_m_d_mapreduce.py
1
5916
#!/usr/bin/env python ''' pyspark --packages com.databricks:spark-csv_2.11:1.5.0 --executor-memory 4g ''' from pyspark import SparkContext import os from datetime import datetime from datetime import date from pyspark.sql.functions import col, udf from pyspark.sql.types import DateType import re from pyspark.sql.funct...
mit
-4,609,561,843,033,304,600
36.681529
147
0.560176
false
faroit/mir_eval
tests/test_input_output.py
3
6414
""" Unit tests for input/output functions """ import numpy as np import json import mir_eval import warnings import nose.tools import tempfile def test_load_delimited(): # Test for ValueError when a non-string or file handle is passed nose.tools.assert_raises( IOError, mir_eval.io.load_delimited, Non...
mit
-406,221,146,304,703,940
36.075145
71
0.597287
false
Omegaphora/external_chromium_org
build/android/pylib/valgrind_tools.py
32
8645
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Classes in this file define additional actions that need to be taken to run a test under some kind of runtime error detection tool. The interface is...
bsd-3-clause
681,379,665,412,633,000
30.097122
80
0.666397
false
ebagdasa/tempest
tempest/services/baremetal/v1/base_v1.py
1
12325
# 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 # d...
apache-2.0
-4,169,565,956,503,638,500
31.519789
78
0.584503
false
weapp/miner
publishers/wu_client.py
1
2555
import urllib, urllib2 import json class WuClient: def __init__(self, client_id, client_secret, host="http://localhost:9292", token=None): self.client_id = client_id self.client_secret = client_secret self.host = host self._build_opener() self.set_token(token) self._...
mit
-4,071,814,758,759,969,000
29.058824
141
0.540117
false
zasdfgbnm/tensorflow
tensorflow/python/profiler/model_analyzer.py
5
15000
# Copyright 2016 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
239,228,117,130,773,600
34.714286
91
0.665733
false
jpmpentwater/cvxpy
setup.py
1
1350
from setuptools import setup setup( name='cvxpy', version='0.2.28', author='Steven Diamond, Eric Chu, Stephen Boyd', author_email='stevend2@stanford.edu, echu508@stanford.edu, boyd@stanford.edu', packages=['cvxpy', 'cvxpy.atoms', 'cvxpy.atoms.affine', 'cvxp...
gpl-3.0
845,811,221,487,602,400
34.526316
98
0.50963
false
lochiiconnectivity/boto
boto/dynamodb2/table.py
2
38302
from boto.dynamodb2 import exceptions from boto.dynamodb2.fields import (HashKey, RangeKey, AllIndex, KeysOnlyIndex, IncludeIndex) from boto.dynamodb2.items import Item from boto.dynamodb2.layer1 import DynamoDBConnection from boto.dynamodb2.results import ResultSet, BatchGetResultSet...
mit
326,735,140,050,743,940
32.925598
82
0.541564
false
crdoconnor/olympia
apps/api/tests/test_urls.py
14
2381
from django.contrib.auth.models import AnonymousUser from django.test.client import RequestFactory from mock import Mock from nose.tools import eq_ from amo.tests import TestCase from amo.urlresolvers import reverse from users.models import UserProfile from ..urls import SwitchToDRF class TestDRFSwitch(TestCase): ...
bsd-3-clause
6,295,353,910,578,245,000
35.630769
79
0.621588
false
translate/pootle
pootle/apps/pootle_store/migrations/0050_set_change_reviewed.py
6
1710
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-21 19:06 from __future__ import unicode_literals from django.db import migrations from pootle.core.batch import Batch from pootle.core.user import get_system_user_id from pootle_statistics.models import SubmissionTypes def _update_reviewed(qs, unit_cha...
gpl-3.0
-9,012,708,686,653,003,000
29.535714
74
0.638596
false
indico/indico-mobile
indicomobile/util/json.py
1
1259
import datetime from pytz import utc, timezone from flask import json, current_app from flask.ext.mongokit import Document from bson import ObjectId, DBRef PATCHED = False class _JSONEncoder(json.JSONEncoder): def default(self, obj): app_tz = timezone(current_app.config.get('TIMEZONE', 'UTC')) i...
gpl-3.0
-8,738,935,069,041,526,000
25.787234
82
0.603654
false
w1ll1am23/home-assistant
homeassistant/components/neato/vacuum.py
1
14227
"""Support for Neato Connected Vacuums.""" from datetime import timedelta import logging from pybotvac.exceptions import NeatoRobotException import voluptuous as vol from homeassistant.components.vacuum import ( ATTR_STATUS, STATE_CLEANING, STATE_DOCKED, STATE_ERROR, STATE_IDLE, STATE_PAUSED, ...
apache-2.0
-2,330,766,307,765,658,000
34.041872
88
0.560905
false
phihag/jippy
jippy/_jvm.py
1
8204
import ctypes import hashlib import io import platform import os import sys import tarfile import tempfile import threading from . import _util from ._jvm_intf import * _JVM_DOWNLOAD_URL = 'http://www.java.com/en/download/manual.jsp?locale=en' # Mapping from Python architecture (platform.machine() to Java's) _JAVA...
apache-2.0
4,436,772,552,041,946,000
32.622951
126
0.5902
false
Lekensteyn/buildbot
master/buildbot/wamp/connector.py
2
5738
# This file is part of . Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the im...
gpl-2.0
-304,806,555,623,238,000
36.25974
98
0.65894
false
Vertexwahn/appleseed
sandbox/samples/python/basic/basic.py
1
11092
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2012-2013 Esteban Tovagliari, Jupiter Jazz Limited # Copyright (c) 2014-2015 Esteban Tovagliari, The appleseedhq Organization # # P...
mit
8,368,787,666,049,666,000
38.756272
136
0.61621
false
panmari/tensorflow
tensorflow/python/summary/impl/gcs_file_loader.py
6
2414
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-8,562,513,424,797,277,000
34.5
80
0.692212
false
varlog00/Sigil
src/Resource_Files/python_pkg/osx_add_python_framework.py
1
6952
#!/usr/bin/env python3 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) import sys, os, inspect, shutil, platform, site, subprocess # the destination directory inside Sigil.app app_dir = os.path.dirname(os....
gpl-3.0
2,236,093,908,645,464,600
39.894118
126
0.57897
false
himanshu-setia/keystone
keystone/common/cache/_context_cache.py
2
4518
# 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
-6,136,240,338,083,445,000
34.574803
79
0.644754
false
evildmp/arkestra-clinical-studies
arkestra_clinical_studies/xmigrations/0003_auto.py
1
33907
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field trialtype on 'ClinicalTrial' db.delete_tab...
bsd-2-clause
-6,084,172,808,788,019,000
99.023599
262
0.564131
false
KaranToor/MA450
google-cloud-sdk/.install/.backup/lib/surface/topic/datetimes.py
6
3921
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
228,429,009,810,225,250
24.796053
78
0.694211
false
romanz/electrum
lib/bitcoin.py
1
33211
# -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 wit...
mit
-8,091,787,089,612,618,000
30.569392
133
0.616814
false
jim-cooley/abletonremotescripts
remote-scripts/branches/VCM600_XL/DeviceComponent.py
1
2728
#Embedded file name: /Users/versonator/Jenkins/live/Binary/Core_Release_64_static/midi-remote-scripts/Launch_Control_XL/DeviceComponent.py import Live from _Framework.Control import control_list, ButtonControl from _Framework.DeviceComponent import DeviceComponent as DeviceComponentBase from _Framework.ModesComponent i...
apache-2.0
-9,198,484,748,923,867,000
41.640625
143
0.715176
false
cscott/wikiserver
OLD/tools/get_images.py
1
9366
from __future__ import with_statement import re #import server import md5 import urllib import collections import os import subprocess BASEWORD = r"Image" BASE_URL="http://upload.wikimedia.org/wikipedia/commons" def get_source_url(filename): return "%s/%s" % (BASE_URL, get_endpath(filename)) def get_dirs(filena...
gpl-2.0
3,602,485,294,776,905,700
35.023077
306
0.494768
false
erikbodzsar/fraid
fraid.py
1
7062
#!/usr/bin/python """ fraid utility to create virtual disks that are distributed on multiple physical disks. """ from os import listdir, path, mkdir, access, F_OK, devnull, remove, getuid from subprocess import check_output, PIPE, Popen from re import match try: check_output(["mdadm" ,"--help"]) except OSError: ...
mit
-1,271,671,296,261,225,200
28.797468
79
0.52648
false
henriquegemignani/randovania
randovania/game_description/item/item_database.py
1
2137
from dataclasses import dataclass from typing import Dict, Tuple from randovania.game_description.item.ammo import Ammo from randovania.game_description.item.item_category import ItemCategory from randovania.game_description.item.major_item import MajorItem @dataclass(frozen=True) class ItemDatabase: major_items...
gpl-3.0
4,753,134,319,902,174,000
25.382716
89
0.620028
false
start-jsk/jsk_apc
demos/selective_dualarm_stowing/python/selective_dualarm_stowing/utils/copy_chainermodel.py
2
1611
#!/usr/bin/env python from ..models import BVLCAlex import chainer import fcn def copy_alex_chainermodel(chainermodel_path, model): bvlc_model = BVLCAlex() chainer.serializers.load_hdf5(chainermodel_path, bvlc_model) for link in bvlc_model.children(): link_name = link.name if link_name.st...
bsd-3-clause
6,453,309,216,593,481,000
36.465116
76
0.55059
false
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx/main/tests/functional/test_notifications.py
1
6814
from unittest import mock import pytest from requests.adapters import HTTPAdapter from requests.utils import select_proxy from requests.exceptions import ConnectionError from awx.api.versioning import reverse from awx.main.models.notifications import NotificationTemplate, Notification from awx.main.models.inventory i...
apache-2.0
-8,204,096,915,528,708,000
47.671429
149
0.621368
false
a-parhom/edx-platform
common/djangoapps/track/contexts.py
4
1449
"""Generates common contexts""" import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from six import text_type from openedx.core.lib.request_utils import COURSE_REGEX log = logging.getLogger(__name__) def course_context_from_url(url): """ Extracts the course_con...
agpl-3.0
3,403,443,364,130,557,400
24.421053
77
0.592823
false
googleinterns/out-of-distribution
src/resnet/resnet_3stage_softmax.py
1
3281
from typing import List import torch from torch import nn from torch.nn import functional as F from src.modules.normalize import Normalize from src.resnet.residual_block import create_residual_stage from src.resnet.shared import ResNet_Softmax, SoftmaxMode class ResNet_3Stage_Softmax(ResNet_Softmax): """ Im...
apache-2.0
4,755,826,015,938,023,000
30.548077
91
0.614752
false
jordanemedlock/psychtruths
temboo/core/Library/Amazon/SNS/Unsubscribe.py
5
3824
# -*- coding: utf-8 -*- ############################################################################### # # Unsubscribe # Deletes a specified subscription. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
apache-2.0
3,768,856,715,482,202,000
38.42268
230
0.675994
false
JohnLZeller/jenkinsapi
jenkinsapi_tests/unittests/test_fingerprint.py
7
2101
import mock # To run unittests on python 2.6 please use unittest2 library try: import unittest2 as unittest except ImportError: import unittest import hashlib import requests from jenkinsapi.jenkins import Jenkins from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.fingerprint import Fingerprint fro...
mit
-8,053,214,561,620,731,000
37.907407
77
0.687292
false
Manojkumar91/odoo_inresto
addons/l10n_gr/__init__.py
8
1036
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
6,357,249,882,700,849,000
42.166667
78
0.603282
false
douban/dpark
dpark/hostatus.py
1
6067
import time import random from six.moves import filter from dpark.utils.log import get_logger PURGE_ELAPSED = 60 * 5 FAILED_TIMES = 2 logger = get_logger(__name__) class HostStatus: def __init__(self, hostname, purge_elapsed=PURGE_ELAPSED): self.hostname = hostname self.failed_log = [] se...
bsd-3-clause
-5,840,643,752,251,686,000
36.91875
88
0.580188
false
jeorgen/ngcccbase
ngcccbase/txhistory.py
4
10604
import time from coloredcoinlib.store import PersistentDictStore from asset import AdditiveAssetValue, AssetTarget from txcons import RawTxSpec from ngcccbase.address import AddressRecord def asset_value_to_data(av): return (av.get_asset().get_id(), av.get_value()) class TxHistoryEntry(object): de...
mit
8,367,247,994,701,882,000
37.985294
84
0.578367
false
111pontes/ydk-py
cisco-ios-xe/ydk/models/cisco_ios_xe/_meta/_ENTITY_STATE_TC_MIB.py
1
1911
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
apache-2.0
5,016,428,239,592,756,000
42.431818
197
0.638409
false
TalShafir/ansible
lib/ansible/utils/module_docs_fragments/opennebula.py
33
1345
# -*- coding: utf-8 -*- # # Copyright 2018 www.privaz.io Valletech AB # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # OpenNebula common documentation DOCUMENTATION = ''' options: api_url: description: - The...
gpl-3.0
278,576,386,282,889,250
35.351351
104
0.630483
false
jjinux/hellacopy
lib/pgu/gui/input.py
7
4938
""" """ import pygame from pygame.locals import * from const import * import widget class Input(widget.Widget): """A single line text input. <pre>Input(value="",size=20)</pre> <dl> <dt>value<dd>initial text <dt>size<dd>size for the text box, in characters </dl> <strong>Examp...
gpl-3.0
-522,209,187,939,049,100
28.746988
89
0.473471
false
icomms/rapidsms
lib/rapidsms/parsers/__init__.py
15
1377
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import re from keyworder import * class Matcher: def __init__(self, msg, pattern_template="^%s$"): self.tmpl = pattern_template self.msg = msg def __getitem__(self, n): return self.groups[n] def __call__(self, *patterns): ...
lgpl-3.0
449,215,866,205,772,540
31.785714
60
0.54321
false
institution/mpskit
tdat.py
1
1204
""" Copyright 2015-2017 sta256+mpskit at gmail.com This file is part of mpskit. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (a...
agpl-3.0
1,848,825,729,401,576,700
21.296296
72
0.651163
false
yury-s/v8-inspector
Source/chrome/tools/perf/page_sets/page_cycler/dhtml.py
20
1829
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class DhtmlPage(page_module.Page): def __init__(sel...
bsd-3-clause
-250,426,505,711,858,140
39.644444
72
0.583379
false
azavea/nex2json-ingest
chunker/process_dataset.py
2
3546
#!/usr/bin/env python """ Code for extracting data about cities from NEX climate data. Performs the following pipeline: 1. Read the file netCDF file from S3 2. Run nex2json on the dataset 3. Upload result to the appropriate bucket """ import argparse import os import re import shutil import tempfile import logging f...
apache-2.0
6,896,905,364,341,792,000
30.380531
75
0.617597
false
CZAlmon/MangaMine
MangaMine.py
1
100653
#Ver. 0.6.1 #Authors: Dylan Wise & Zach Almon import urllib.request import re import os import platform import sys import string import html import time platformType = platform.system() #site_number: # Bato.to = 1 # Panda = 2 # Here = 3 def Search_Feature(site_number, file_directory): set_of_letters = ...
gpl-2.0
108,732,882,995,455,120
41.398062
189
0.431045
false
nkhuyu/mycli
tests/test_naive_completion.py
14
1657
from __future__ import unicode_literals import pytest from prompt_toolkit.completion import Completion from prompt_toolkit.document import Document @pytest.fixture def completer(): import mycli.sqlcompleter as sqlcompleter return sqlcompleter.SQLCompleter(smart_completion=False) @pytest.fixture def complete_e...
bsd-3-clause
3,624,417,064,897,019,000
33.520833
72
0.702474
false
saurabh6790/frappe
frappe/desk/doctype/notification_log/notification_log.py
1
4285
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document from frappe.desk.doctype.notification_settings.notification_settings...
mit
6,160,874,969,101,730,000
30.740741
159
0.715519
false
PetePriority/home-assistant
homeassistant/components/google_assistant/const.py
2
1493
"""Constants for Google Assistant.""" DOMAIN = 'google_assistant' GOOGLE_ASSISTANT_API_ENDPOINT = '/api/google_assistant' CONF_EXPOSE = 'expose' CONF_ENTITY_CONFIG = 'entity_config' CONF_EXPOSE_BY_DEFAULT = 'expose_by_default' CONF_EXPOSED_DOMAINS = 'exposed_domains' CONF_PROJECT_ID = 'project_id' CONF_ALIASES = 'ali...
apache-2.0
-7,944,093,607,279,498,000
32.931818
76
0.732083
false
GeoGateway/GeoServer
scripts/batch_register_sample.py
1
2792
"""batch register tiff with sytle """ import json import os import subprocess import urllib.request def main(): """generate copy list""" # geojson output from UAVSAR search API jsonfile = "uavsar_ca.geojson" with open(jsonfile, "r") as f: data = json.loads(f.read()) datafolder1 = "/mn...
apache-2.0
-7,177,346,655,251,294,000
36.226667
298
0.579871
false
mbedmicro/pyOCD
pyocd/flash/eraser.py
1
7129
# pyOCD debugger # Copyright (c) 2018-2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
apache-2.0
-8,523,969,503,809,062,000
39.276836
100
0.573573
false
linuxdeepin/deepin-media-player
src/plugins/plugin_youku.py
1
9055
#! /usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2013 XXX, Inc. # 2013 红铭曼,王芳 # # Author: 红铭曼,王芳 <hongmingman@sina.com> # Maintainer: 红铭曼,王芳 <hongmingman@sina.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
-5,753,949,909,109,979,000
35.443038
94
0.571842
false
devdelay/home-assistant
tests/components/alarm_control_panel/test_mqtt.py
8
7707
"""The tests the MQTT alarm control panel component.""" import unittest from homeassistant.bootstrap import _setup_component from homeassistant.const import ( STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY, STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, STATE_UNKNOWN) from homeassistant.comp...
mit
-7,653,025,829,172,212,000
38.321429
78
0.57052
false
saebrahimi/Emotion-Recognition-EmotiW2015
common/layers.py
2
13715
import theano from theano import tensor as T from theano.tensor.nnet import conv from theano.tensor.signal.downsample import max_pool_2d import numpy as np class Layer(object): def __init__(self, inputs, inputs_shape=None): """ Useful to get outputs shape """ if isi...
mit
-448,630,419,246,895,500
29.456422
104
0.520379
false
shakamunyi/neutron-vrrp
neutron/tests/unit/ofagent/ofa_test_base.py
2
2430
# Copyright (C) 2014 VA Linux Systems Japan K.K. # # 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
-1,743,874,124,726,565,000
36.384615
78
0.641564
false
Azulinho/ansible
lib/ansible/utils/module_docs_fragments/influxdb.py
1
1914
# Copyright: (c) 2017, Ansible Project # Copyright: (c) 2017, Abhijeet Kasurde (akasurde@redhat.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Parameters for influxdb modules DOCUMENTATION = ''' options: hostname: desc...
gpl-3.0
3,383,564,692,926,135,300
27.567164
103
0.684953
false
nthien/pulp
server/test/unit/server/event/test_email.py
9
6189
import dummy_threading import smtplib import unittest try: from email.parser import Parser except ImportError: # for python 2.4 from email.Parser import Parser # needed to create unserializable ID from bson.objectid import ObjectId as _test_objid import mock from pulp.server.compat import json from pulp.s...
gpl-2.0
8,384,764,055,739,574,000
42.27972
99
0.665697
false
siggame/PyVis
pyz/renderer.py
1
14635
''' The renderer is responsible for building the primitives, and complex objects to be drawn by pyglet. This module also contains various base classes for primitives which can be modified on the fly. ''' from copy import copy from pyglet import clock from pyglet import gl from pyglet import graphics import math clas...
bsd-3-clause
2,768,834,429,942,911,000
33.928401
254
0.553263
false
davidyezsetz/kuma
kuma/search/migrations/0008_auto__add_field_filtergroup_slug.py
5
4651
# -*- 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 'FilterGroup.slug' db.add_column('search_filtergroup', 'slug', self.gf(...
mpl-2.0
8,975,264,999,760,554,000
59.402597
174
0.546764
false
miing/mci_migo
webui/decorators.py
1
10822
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). import functools import logging from datetime import datetime, timedelta from functools import wraps from hashlib import sha1 from django.contrib import messages from django.cont...
agpl-3.0
2,584,166,348,463,007,000
33.464968
79
0.622343
false
ktnyt/chainer
chainer/links/connection/n_step_rnn.py
1
12945
import numpy import six import chainer from chainer.functions.array import permutate from chainer.functions.array import transpose_sequence from chainer.functions.connection import n_step_rnn as rnn from chainer.initializers import normal from chainer import link from chainer.utils import argument from chainer import ...
mit
7,793,916,110,784,992,000
32.710938
79
0.594515
false
jendap/tensorflow
tensorflow/contrib/feature_column/python/feature_column/sequence_feature_column_v2_test.py
2
61575
# 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
134,761,447,103,843,000
39.377049
101
0.56151
false
Workday/OpenFrame
tools/telemetry/telemetry/internal/platform/platform_backend.py
8
8451
# 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 weakref from telemetry.internal.forwarders import do_nothing_forwarder from telemetry.internal.platform import network_controller_backend from teleme...
bsd-3-clause
-1,934,696,983,969,230,300
27.744898
80
0.732221
false
simone-campagna/shells-kitchen
docs/source/conf.py
1
11364
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Shell's Kitchen documentation build configuration file, created by # sphinx-quickstart on Mon Feb 22 09:09:41 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in t...
apache-2.0
-2,112,141,964,533,189,000
30.21978
79
0.702834
false
ksylvan/python-vipaccess
vipaccess/patharg.py
1
2560
# https://mail.python.org/pipermail/stdlib-sig/2015-July/000990.html from argparse import ArgumentTypeError as err import os class PathType(object): def __init__(self, exists=True, type='file', dash_ok=True): '''exists: True: a path that does exist False: a path that does n...
apache-2.0
5,135,719,561,126,125,000
40.967213
87
0.501172
false
marty331/jakesclock
flask/lib/python2.7/site-packages/examples/forms/app.py
2
7444
import os import os.path as op from flask import Flask, url_for from flask_sqlalchemy import SQLAlchemy from sqlalchemy.event import listens_for from jinja2 import Markup from flask_admin import Admin, form from flask_admin.form import rules from flask_admin.contrib import sqla # Create application app = Flask(__n...
gpl-2.0
-308,090,450,717,494,340
28.422925
94
0.582214
false
arkem/pyflag
src/plugins/DiskForensics/FileHandlers/Extractor.py
2
2151
""" This is a scanner which utilises libextractor to collect metadata about some files. """ from pyflag.Scanner import * import pyflag.Reports as Reports from pyflag.ColumnTypes import StringType, TimestampType, InodeIDType active = False try: import extractor E = extractor.Extractor() class Extract...
gpl-2.0
-7,346,227,057,464,774,000
30.173913
70
0.527662
false
dvliman/jaikuengine
vendor/cleanliness/encoding.py
9
3595
import datetime import urllib import types def smart_unicode(s, encoding='utf-8', strings_only=False, errors='strict'): """ Returns a unicode object representing 's'. Treats bytestrings using the 'encoding' codec. If strings_only is True, don't convert (some) non-string-like objects. """ return force_unic...
apache-2.0
7,356,977,162,781,316,000
36.061856
77
0.636161
false
zorna/zorna
zorna/fileman/models.py
1
3426
import os from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_noop from django.core.urlresolvers import reverse from mptt.models import MPTTModel from tagging.fields import TagField from tagging.utils impor...
bsd-3-clause
-1,226,782,338,633,117,200
34.6875
117
0.607998
false
kmoocdev2/edx-platform
pavelib/paver_tests/test_utils.py
20
1574
""" Tests for pavelib/utils/test/utils """ import unittest from mock import patch from pavelib.utils.envs import Env from pavelib.utils.test.utils import MINIMUM_FIREFOX_VERSION, check_firefox_version @unittest.skipIf(Env.USING_DOCKER, 'Firefox version check works differently under Docker Devstack') class TestUtil...
agpl-3.0
7,533,373,007,488,369,000
32.489362
99
0.679797
false
brendanwhitfield/piHud
pihud/Widget.py
2
2727
import obd from widgets import widgets from PyQt4 import QtCore, QtGui class Widget(QtGui.QWidget): def __init__(self, parent, config): super(Widget, self).__init__(parent) self.config = config # temporary coloring until display widgets get implemented # self.setAutoFillBackgrou...
lgpl-2.1
5,463,960,265,789,432,000
26.826531
82
0.567657
false
numba/numba
numba/stencils/stencil.py
4
39074
# # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # import copy import numpy as np from llvmlite import ir as lir from numba.core import types, typing, utils, ir, config, ir_utils, registry from numba.core.typing.templates import (CallableTemplate, signature, ...
bsd-2-clause
-9,037,071,411,355,274,000
46.943558
141
0.532477
false
ajo2eq/DecaySim
vector.py
1
9251
from __future__ import division, print_function from math import sqrt as _sqrt, atan2 as _atan2, log as _log, pi as _pi #Force compatibility with python 2 and 3. try: xrange except NameError: xrange = range class VecThree(object): """Simple three-vector implementation. Every method for retrieving or s...
mit
-3,950,602,815,593,994,000
24.626039
80
0.467841
false
plumbum/Espruino
boards/ARMINARM.py
10
1909
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # Adapted for ARMinARM board by Rik Teerling <on@onandoffables.com> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of t...
mpl-2.0
6,897,063,170,603,100,000
32.491228
91
0.513882
false
ClimbsRocks/scikit-learn
sklearn/grid_search.py
2
38534
""" The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters of an estimator. """ from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # ...
bsd-3-clause
-4,600,771,839,748,933,000
37.342289
87
0.608943
false
alfredgamulo/cloud-custodian
tests/test_ecs.py
1
18797
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from .common import BaseTest import fnmatch import os import time from c7n.exceptions import PolicyExecutionError class TestEcsService(BaseTest): def test_ecs_cluster_tag_augment(self): session_factory = self.replay_flight_d...
apache-2.0
-6,050,890,175,432,686,000
36.669339
93
0.503644
false
justinpotts/mozillians
mozillians/users/migrations/0048_auto__add_unique_externalaccount_identifier_type_user.py
3
12132
# -*- 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 unique constraint on 'ExternalAccount', fields ['identifier', 'type', 'user'] db.create_unique('use...
bsd-3-clause
6,401,244,330,422,055,000
82.675862
226
0.552258
false
Suwmlee/XX-Net
Python3/lib/ctypes/test/test_funcptr.py
3
4038
import os, unittest from ctypes import * try: WINFUNCTYPE except NameError: # fake to enable this test on Linux WINFUNCTYPE = CFUNCTYPE import _ctypes_test lib = CDLL(_ctypes_test.__file__) class CFuncPtrTestCase(unittest.TestCase): def test_basic(self): X = WINFUNCTYPE(c_int, c...
bsd-2-clause
-297,175,993,570,968,400
29.795276
87
0.528479
false
frohoff/Empire
lib/modules/powershell/lateral_movement/invoke_wmi.py
2
5792
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-WMI', 'Author': ['@harmj0y'], 'Description': ('Executes a stager on remote hosts using WMI.'), 'Background' : False, 'OutputE...
bsd-3-clause
-6,575,000,725,111,541,000
37.872483
242
0.48826
false
MoroGasper/client
client/plugins/ui/cocoa/input.py
1
2315
# -*- coding: utf-8 -*- """Copyright (C) 2013 COLDWELL AG 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 option) any later version. This program is dist...
gpl-3.0
-8,466,254,854,889,940,000
29.064935
100
0.656587
false
balucio/smac
bin/sesps.py
1
1406
#!/usr/bin/python #-*- coding: utf8 -*- from __future__ import print_function import sys import argparse import socket import json BUFFER_SIZE = 4096 def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) # Controllo argomenti: # sensor-name, server-address, server-port parser = argparse.Argument...
gpl-3.0
7,828,573,064,611,561,000
25
105
0.678063
false
Fellfalla/Thermoberry
Klassen/SensorListe.py
2
7296
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Markus Weber' import Communicator import Sensor class SensorListe(list, object): def __init__(self, iterableInput=None): if not iterableInput: iterableInput = [] for element in iterableInput: self.append(element) ...
gpl-2.0
631,026,705,849,103,700
34.595122
131
0.559759
false
nickkonidaris/kpy
SEDM/SexSpectra.py
2
4288
import numpy as np import tempfile import os # catalog_name, output_name sex_params = \ ''' CATALOG_NAME {catalog_name} # name of the output catalog CATALOG_TYPE ASCII_HEAD # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT, # ASCII_VOTABLE, FITS_1.0 or FITS_LDAC PARAMETERS_NAME ...
gpl-2.0
-5,300,213,857,557,513,000
35.965517
83
0.518424
false
googleads/google-ads-python
google/ads/googleads/v6/services/types/customer_label_service.py
1
4711
# -*- coding: utf-8 -*- # Copyright 2020 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 o...
apache-2.0
-7,649,088,819,946,955,000
32.892086
124
0.680535
false
sserrot/champion_relationships
venv/Lib/site-packages/pythonwin/pywin/mfc/dialog.py
7
7931
""" \ Base class for Dialogs. Also contains a few useful utility functions """ # dialog.py # Python class for Dialog Boxes in PythonWin. import win32ui import win32con # sob - 2to3 doesn't see this as a relative import :( from pywin.mfc import window def dllFromDll(dllid): " given a 'dll' (maybe a dll, filename, et...
mit
-3,555,762,980,910,542,300
31.908714
82
0.673181
false
abhi11/tanglu-dak
dak/transitions.py
6
21936
#!/usr/bin/env python """ Display, edit and check the release manager's transition file. @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2008 Joerg Jaspert <joerg@debian.org> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute it and/or mod...
gpl-2.0
4,832,202,560,691,502,000
34.210273
143
0.52913
false
dmilith/SublimeText3-dmilith
Packages/backrefs/st3/backrefs/uniprops/unidata/alias.py
2
18637
"""Unicode Properties from Unicode version 6.1.0 (autogen).""" unicode_alias = { "_": { "age": "age", "bc": "bidiclass", "blk": "block", "ccc": "canonicalcombiningclass", "dt": "decompositiontype", "ea": "eastasianwidth", "gc": "generalcategory", "gcb...
mit
8,074,594,444,167,502,000
29.452614
74
0.497988
false
greenmoss/gocd-parser
gocd_parser/retriever/url.py
1
1803
import six from six.moves.urllib.parse import urlsplit import logging logger = logging.getLogger(__name__) import requests class URLException(Exception): pass class URL(object): '''Retrieve from a Go server.''' def __init__(self, go_server, path='', headers=None): self.go_server = go_server ...
mit
-7,048,192,591,833,760,000
29.05
79
0.574043
false
charles-difazio/asset-optimization
asset.py
1
4559
from pulp import * from lxml import etree import requests prob = LpProblem("Assets", LpMinimize) allocation = { 'stock_us' : 0.8 * 0.9 * 0.6, 'stock_intl' : 0.8 * 0.9 * 0.4, 'reit' : 0.8 * 0.1, 'bond_us' : 0.2 * 0.8, 'bond_intl' : 0.2 * 0.2 } ca...
apache-2.0
2,496,520,912,736,537,600
37.635593
101
0.528844
false
elkingtowa/nn
deepnet/neuralnet.py
9
24100
"""Implements a feed-forward neural net.""" import gzip import logging import sys import time from google.protobuf import text_format from datahandler import * from convolutions import * from edge import * from layer import * from util import * from logistic_layer import * from tanh_layer import * from relu_layer impo...
mit
9,203,731,572,917,769,000
33.626437
121
0.638216
false
dibaunaumh/pycache
storage/sqlite.py
1
2363
__author__ = 'Jake Wharton' __author_email__ = 'JakeWharton@GMail.com' __url__ = 'http://mine.jakewharton.com/projects/show/pycache' __revision__ = "$Rev$"[6:-2] __license__ = ''' Copyright 2009 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
apache-2.0
-1,961,284,187,903,795,500
40.473684
157
0.639018
false