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
majetideepak/arrow
python/benchmarks/microbenchmarks.py
13
1588
# 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
-4,802,399,870,697,181,000
34.288889
66
0.676322
false
sniemi/SamPy
focus/WFC3ImageExtensionerTinyTim.py
1
3567
''' Created on March 3, 2011 :author: Sami-Matias Niemi :contact: niemi@stsci.edu :version: 0.1 ''' import pyfits as PF import numpy as N import glob as g def parse_parameterfile(file='./complete_results/parameters.txt'): out = {} #read data pdata = open(file).readlines() #loop over data for line...
bsd-2-clause
6,947,535,516,556,092,000
29.758621
89
0.594057
false
surround-io/grpc
src/python/grpcio_test/grpc_test/_adapter/_intermediary_low_test.py
13
17271
# Copyright 2015, 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
107,481,459,297,424,960
38.794931
80
0.70986
false
corbamico/Garmin-Connect-Downloader
gdownload/main.py
1
6944
#!/usr/bin/python ### # Copyright (c) corbamico 01/2014 <corbamico@163.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later...
gpl-2.0
-7,127,054,790,775,405,000
33.039216
220
0.719614
false
ubuntu/ubuntu-make
umake/frameworks/scala.py
1
2515
# -*- coding: utf-8 -*- # Copyright (C) 2014 Canonical # # Authors: # Didier Roche # Igor Vuk # # 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; version 3. # # This program is distributed in th...
gpl-3.0
1,447,711,293,639,071,700
36.537313
103
0.650099
false
karlnapf/shogun
applications/ocr/Ai.py
12
2394
# File : $HeadURL$ # Version: $Id$ from shogun import RealFeatures, MulticlassLabels from shogun import GaussianKernel from shogun import GMNPSVM import numpy as np import gzip as gz import pickle as pkl import common as com class Ai: def __init__(self): self.x = None self.y = None se...
bsd-3-clause
178,005,301,146,680,060
25.021739
68
0.561404
false
googleinterns/deepspeech-reconstruction
src/deep_speaker/utils.py
1
3373
import logging import os import random import shutil from glob import glob import click import dill import numpy as np import pandas as pd from natsort import natsorted from constants import TRAIN_TEST_RATIO logger = logging.getLogger(__name__) def find_files(directory, ext='wav'): return sorted(glob(directory...
apache-2.0
-1,590,965,533,119,710,700
27.108333
115
0.663801
false
TRox1972/youtube-dl
youtube_dl/extractor/rottentomatoes.py
9
1280
from __future__ import unicode_literals from .common import InfoExtractor from .internetvideoarchive import InternetVideoArchiveIE class RottenTomatoesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rottentomatoes\.com/m/[^/]+/trailers/(?P<id>\d+)' _TEST = { 'url': 'http://www.rottentomatoes.co...
unlicense
-3,198,420,102,580,834,300
39
169
0.598438
false
mancoast/CPythonPyc_test
cpython/232_test_bufio.py
41
1987
from test.test_support import verify, TestFailed, TESTFN # Simple test to ensure that optimizations in fileobject.c deliver # the expected results. For best testing, run this under a debug-build # Python too (to exercise asserts in the C code). # Repeat string 'pattern' as often as needed to reach total length # 'le...
gpl-3.0
6,624,645,991,389,826,000
32.116667
74
0.640161
false
jykntr/wishapp
app/models.py
2
6544
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app, request from flask.ext.login import UserMixin, AnonymousUserMixin from . import db, login_manager ...
mit
-1,985,243,045,587,933,400
31.72
78
0.592757
false
chen0031/Dato-Core
cxxtest/cxxtest/cxxtestgen.py
28
19506
#------------------------------------------------------------------------- # CxxTest: A lightweight C++ unit testing library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the LGPL License v2.1 # For more information, see the COPYING file in the top CxxTest directory. # Under the terms o...
agpl-3.0
-5,187,205,807,677,835,000
39.6375
238
0.592074
false
urbaniak/rjsmin
_setup/py2/make/default_targets.py
6
3317
# -*- coding: ascii -*- # # Copyright 2007, 2008, 2009, 2010, 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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.or...
apache-2.0
-4,551,624,158,483,825,000
29.154545
74
0.539343
false
stianrh/askbot-nordic
askbot/management/commands/jinja2_makemessages.py
15
2362
""" Taken from Coffin http://github.com/miracle2k/coffin/raw/master/coffin/management/commands/makemessages.py added support for the pluralization Jinja2's i18n functionality is not exactly the same as Django's. In particular, the tags names and their syntax are different: 1. The Django ``trans`` tag is replaced by...
gpl-3.0
561,947,539,413,680,640
40.438596
118
0.686706
false
prabhamatta/Analyzing-Open-Data
notebooks/Day_05_B_Geographical_Hierarchies.py
1
13634
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> # our usual pylab import %pylab --no-import-all inline # <headingcell level=1> # Goal # <markdowncell> # For background, see [Mapping Census Data](http://www.udel.edu/johnmack/frec682/census/), including the # [scan of the 10-question form](http://w...
apache-2.0
3,533,805,183,281,788,400
26.82449
352
0.711383
false
lewismc/podaacpy
podaac/drive.py
3
5645
# 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
-5,893,766,555,220,921,000
48.955752
178
0.625155
false
FreeON/spammpack
src-charm/analyze_timing.py
1
4752
#!/usr/bin/env python import argparse import matplotlib.pyplot as plt import numpy import os import re import signal import sys def make_graph (): np = [] for i in timing[PPV]: np.append(i) np.sort() t = [] np_dead = [] global t_0 global number_samples if iteration < 0: additional_label = "...
bsd-3-clause
1,658,309,229,996,763,100
21.736842
76
0.552399
false
felix1m/pyspotify
setup.py
3
1584
from __future__ import unicode_literals import re from setuptools import find_packages, setup def read_file(filename): with open(filename) as fh: return fh.read() def get_version(filename): init_py = read_file(filename) metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py)) retu...
apache-2.0
-6,958,234,335,733,278,000
31.326531
70
0.619949
false
willprice/weboob
modules/boursorama/pages/accounts_list.py
1
5980
# -*- coding: utf-8 -*- # Copyright(C) 2011 Gabriel Kerneis # Copyright(C) 2010-2011 Jocelyn Jaubert # # This file is part of weboob. # # weboob 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, eit...
agpl-3.0
3,786,853,397,567,203,300
48.8
200
0.483936
false
open-homeautomation/home-assistant
tests/components/cover/test_mqtt.py
2
9028
"""The tests for the MQTT cover platform.""" import unittest from homeassistant.bootstrap import setup_component from homeassistant.const import STATE_OPEN, STATE_CLOSED, STATE_UNKNOWN import homeassistant.components.cover as cover from tests.common import mock_mqtt_component, fire_mqtt_message from tests.common impo...
apache-2.0
-8,960,463,534,008,067,000
35.699187
73
0.568675
false
stonestone/stonefreedomsponsors
djangoproject/core/migrations/0014_auto__add_field_userinfo_hide_from_userlist.py
3
15622
# -*- 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 'UserInfo.hide_from_userlist' db.add_column('core_userinfo', 'hide_from_userlist', ...
agpl-3.0
-8,078,862,925,209,118,000
70.665138
182
0.54148
false
econchick/heroku-buildpack-python
vendor/pip-1.2.1/contrib/get-pip.py
17
85929
#! /usr/bin/env python sources = """ eNrsvVt7HEmWGDaSba1VuqyllSX704NzwMFmJlmVbHIusjBTzeGQ4DQ17CZFkD2aBTA1iaoEkIuq ykJmFsDq2fbn3+AnP/hX+E/5we/+7DefS9wjMqtAcnalT5r9tonKjDwRceLEiXNOnMv/+ve/v/5B 8v6frMpVNq+meVtWy+b67737d3/2gx/s7e29ko+i28uiLqLbIppX1VV0XtXRtFqelxfNMCqXTZvP 51HTrs/Ph1HRTuHLwaBcrKq6jZpNI/+smsF5XS0i7Owsn17d5vV...
mit
-9,112,955,044,156,730,000
73.526453
79
0.949098
false
OCA/l10n-romania
l10n_ro_stock/tests/test_stock_warehouse_creation.py
1
1704
# Copyright (C) 2019 NextERP Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase class TestStockWarehouseCreation(TransactionCase): def setUp(self): super(TestStockWarehouseCreation, self).setUp() self.warehouse_obj = self.env...
agpl-3.0
-8,953,999,522,050,827,000
38.627907
78
0.670775
false
RyanMatlock/cocktail-reader
cocktail-reader.py
1
3444
""" cocktail-reader.py Reads cocktail information from completed-cocktails.tex source file and puts them into some file format for loading into a database. """ import re # these are the states of reading the file IGNORE = "ignore" COCKTAIL = "cocktail" BODY = "body" state = IGNORE STARRED = "*" ### re testing """...
mit
785,201,290,090,480,400
24.518519
170
0.559814
false
numerals/rollcall
rollcall/main.py
3
3198
""" Main module """ import os import func_json as fj import display import exce from datetime import date def pDir(): """ gives the present working directory """ return os.getcwd() def full_path_to(fName, dire=pDir()): """ joins the filename and the directory path """ path = os.path....
mit
-4,378,065,813,467,410,000
24.181102
77
0.611632
false
omise/omise-python
omise/test/test_receipt.py
1
7749
import mock import unittest from .helper import _ResourceMixin class ReceiptTest(_ResourceMixin, unittest.TestCase): def _getTargetClass(self): from .. import Receipt return Receipt def _getCollectionClass(self): from .. import Collection return Collection def _getLazyC...
mit
-5,833,385,752,817,734,000
37.17734
70
0.502387
false
waqasbhatti/astroph-coffee
pysqlite/benchmarks/insert.py
1
1496
import time def yesno(question): val = raw_input(question + " ") return val.startswith("y") or val.startswith("Y") use_pysqlite2 = yesno("Use pysqlite 2.0?") use_autocommit = yesno("Use autocommit?") use_executemany= yesno("Use executemany?") if use_pysqlite2: from pysqlite2 import dbapi2 as s...
mit
1,127,763,636,754,973,300
22.52459
93
0.550802
false
wroersma/volatility
volatility/plugins/mac/vfsevents.py
4
3049
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
1,202,187,429,838,534,400
39.118421
151
0.610692
false
cloudify-cosmo/cloudify-cli
cloudify_cli/tests/commands/test_users.py
1
5641
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-3,084,391,692,655,285,000
40.785185
79
0.636767
false
rangadi/incubator-beam
sdks/python/apache_beam/runners/portability/stager.py
2
25320
# 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
-2,992,134,150,777,267,000
43.343257
80
0.654305
false
telefonicaid/fiware-health
fiware-region-sanity-tests/commons/dbus_phonehome_service.py
2
11746
# -*- coding: utf-8 -*- # Copyright 2015-2016 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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: # # htt...
apache-2.0
-1,946,093,824,831,349,200
43.996169
119
0.66468
false
RaphaelPoncet/2016-macs2-projet-hpc
read_receiver.py
1
2438
#! /usr/bin/env python import numpy from matplotlib import pyplot as plt import matplotlib.colors as colors import optparse import os import sys #import seaborn def ParseVariableBinaryHeader(header): header_detect = '#' header = header.strip("\n").split() assert(header[0] == header_detect) name =...
apache-2.0
-6,778,286,463,717,795,000
21.574074
131
0.634537
false
azumimuo/family-xbmc-addon
script.cu.lrclyrics/resources/lib/culrcscrapers/lyricstime/lyricsScraper.py
4
2074
#-*- coding: UTF-8 -*- import sys import urllib import re from utilities import * __title__ = 'lyricstime' __priority__ = '220' __lrc__ = False def replace_char(string): invalid_char = [" ",",","'",] for char in invalid_char: string = string.replace(char,"-") return string class LyricsFetcher: ...
gpl-2.0
3,878,594,336,368,681,000
44.086957
246
0.526519
false
andysim/psi4
tests/python/mints9/input.py
3
8970
from __future__ import print_function import psi4 from psi4.driver import qcdb #! A test of the basis specification. Various basis sets are specified outright and in blocks, both #! orbital and auxiliary. Constructs libmints BasisSet objects through the constructor that calls #! qcdb.BasisSet infrastructure. Checks th...
gpl-2.0
7,538,565,838,771,796,000
40.527778
146
0.655072
false
rdbhost/Rdbhdb
examples/animal.py
1
2875
# animal.py - create animal table and # retrieve information from it import sys from rdbhdb import rdbhdb as db from rdbhdb import extensions DictCursor = extensions.DictCursor # connect to the RdbHost server authcode = 'KF7IUQPlwfSth4sBvjdqqanHkojAZzEjMshrkfEV0O53yz6w6v' try: conn = db.connect ('s000015', authc...
mit
3,213,750,046,008,830,000
28.346939
66
0.615304
false
AccelAI/accel.ai
flask-aws/lib/python2.7/site-packages/ebcli/operations/envvarops.py
4
1971
# Copyright 2014 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" file accompa...
mit
-5,468,110,718,848,300,000
34.836364
78
0.664637
false
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Zoho/Writer/ListAllDocuments.py
5
4923
# -*- coding: utf-8 -*- ############################################################################### # # ListAllDocuments # Lists all the documents associated with a user's Zoho Writer Account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the ...
gpl-2.0
6,051,263,625,903,569,000
41.076923
170
0.672557
false
tahir24434/hydra
src/main/python/hydra/selftest/agents.py
4
4173
__author__ = 'sushil' import zmq import random import time import threading import sys import os # REQ -> REP # PUB -> SUB class Test(object): def __init__(self, argv): p0 = os.environ.get('PORT0') print("REQ PORT0 = " + p0) self.port_rep = p0 self.port_pub = argv[1] self....
apache-2.0
-3,955,799,438,844,457,500
33.204918
105
0.510903
false
gochist/horizon
openstack_dashboard/dashboards/project/firewalls/tabs.py
8
5386
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/...
apache-2.0
771,887,736,549,303,300
31.642424
78
0.615485
false
apollo13/ansible
test/units/utils/test_version.py
4
7609
# -*- coding: utf-8 -*- # (c) 2020 Matt Martz <matt@sivel.net> # 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 from distutils.version import LooseVersion, StrictVersion import pytest fr...
gpl-3.0
-9,013,840,861,554,829,000
25.698246
103
0.568143
false
jmerkow/VTK
Examples/VisualizationAlgorithms/Python/smoothFran.py
42
1792
#!/usr/bin/env python # This example shows how to use decimation to reduce a polygonal # mesh. We also use mesh smoothing and generate surface normals to # give a pleasing result. import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # We start by reading some data that was originally ...
bsd-3-clause
3,316,487,524,060,862,500
31.581818
69
0.788504
false
dailijun/ffc
tests/pjsua/mod_call.py
8
5357
# $Id: mod_call.py 5065 2015-04-13 12:14:02Z nanang $ import time import imp import sys import inc_const as const from inc_cfg import * # Load configuration cfg_file = imp.load_source("cfg_file", ARGS[1]) # Check media flow between ua1 and ua2 def check_media(ua1, ua2): ua1.send("#") ua1.expect("#") ua1.send("1122...
gpl-2.0
949,922,448,059,902,800
22.70354
84
0.715699
false
fr0uty/oartm
oar/rest_api/views/__init__.py
1
5479
# -*- coding: utf-8 -*- from __future__ import with_statement, absolute_import import os import time from collections import OrderedDict from functools import wraps from flask import Blueprint as FlaskBlueprint, Response, g, abort from oar.lib.database import BaseModel from oar.lib.compat import json from oar.lib.ut...
bsd-3-clause
-7,579,997,127,180,881,000
33.459119
77
0.551013
false
gauravbose/digital-menu
digimenu2/tests/urlpatterns_reverse/urls.py
7
5018
import warnings from django.conf.urls import include, patterns, url from django.utils.deprecation import RemovedInDjango20Warning from .views import ( absolute_kwargs_view, defaults_view, empty_view, empty_view_partial, empty_view_wrapped, nested_view, ) other_patterns = [ url(r'non_path_include/$', empt...
bsd-3-clause
8,094,194,534,985,012,000
56.678161
117
0.57214
false
dmlc/xgboost
demo/kaggle-higgs/higgs-pred.py
1
1163
#!/usr/bin/python # make prediction import numpy as np import xgboost as xgb # path to where the data lies dpath = 'data' modelfile = 'higgs.model' outfile = 'higgs.pred.csv' # make top 15% as positive threshold_ratio = 0.15 # load in training data, directly use numpy dtest = np.loadtxt( dpath+'/test.csv', delimiter...
apache-2.0
-3,084,890,467,697,225,000
23.744681
66
0.627687
false
punchagan/zulip
zerver/management/commands/show_admins.py
6
1187
from argparse import ArgumentParser from typing import Any from django.core.management.base import CommandError from zerver.lib.management import ZulipBaseCommand class Command(ZulipBaseCommand): help = """Show the owners and administrators in an organization.""" def add_arguments(self, parser: ArgumentPar...
apache-2.0
3,480,435,765,788,275,700
34.969697
89
0.636057
false
Micronaet/micronaet-migration
report_store_value/store.py
1
13783
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This prog...
agpl-3.0
-4,325,560,370,230,387,000
42.755556
79
0.47399
false
v4Lo/OnlyRO
tools/validateinterfaces.py
39
8572
#! /usr/bin/env python # -*- coding: utf8 -*- # # Copyright (C) 2014 Andrei Karas (4144) import os import re import sys from sets import Set interfaceRe = re.compile("struct (?P<name1>[a-z_]+)_interface (?P<name2>[a-z_]+)_s;") class Tracker: pass def searchDefault(r, ifname): defaultStr = "void {0}_default...
gpl-3.0
-1,066,631,068,934,448,900
33.845528
118
0.494984
false
blueskycoco/rt-thread
tools/sconsui.py
16
15534
#! /usr/bin/env python #coding=utf-8 # # File : sconsui.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # 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 Sof...
gpl-2.0
-2,522,084,228,583,075,300
31.634454
111
0.540621
false
chenbaihu/grpc
src/python/src/grpc/early_adopter/_assembly_utilities.py
3
7378
# Copyright 2015, 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
-7,535,147,532,467,745,000
42.916667
102
0.757116
false
0x0all/nupic
py/regions/ImageSensorFilters/Brightness.py
2
1997
# ---------------------------------------------------------------------- # 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 progra...
gpl-3.0
-3,712,439,628,782,400,000
29.723077
76
0.651978
false
polyaxon/polyaxon
core/polyaxon/schemas/types/auth.py
1
2825
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
9,188,222,945,497,423,000
23.780702
93
0.611327
false
marcore/edx-platform
lms/djangoapps/courseware/tests/test_submitting_problems.py
7
51218
# -*- coding: utf-8 -*- """ Integration tests for submitting problem responses and getting grades. """ import json import os from textwrap import dedent from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from django...
agpl-3.0
2,510,981,406,953,927,000
36.908148
119
0.594537
false
CentechMTL/TableauDeBord
app/businessCanvas/tests/tests_views.py
2
10544
# coding: utf-8 from django.conf import settings from django.core import mail from django.core.urlresolvers import reverse from django.test import TestCase import time from app.founder.factories import FounderFactory from app.mentor.factories import MentorFactory from app.home.factories import UserFactory, StaffUserPr...
gpl-3.0
6,807,858,770,510,924,000
26.245478
72
0.53272
false
cyphar/synge
src/gtk/bakeui.py
1
1324
#!/usr/bin/env python3 # Synge-GTK: A graphical interface for Synge # Copyright (C) 2013, 2016 Aleksa Sarai # 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 ...
gpl-3.0
7,089,773,359,850,187,000
28.422222
73
0.680514
false
b3j0f/aop
b3j0f/aop/advice/test/core.py
1
22259
#!/usr/bin/env python # -*- coding: utf-8 -*- # -------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2014 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
-8,555,532,749,594,229,000
21.92173
79
0.560633
false
jmplonka/InventorLoader
dxfgrabber/dxfentities.py
1
41274
# encoding: utf-8 # Purpose: entity classes, new implementation without dxf12/dxf13 layer # Created: 17.04.2016 # Copyright (C) 2016, Manfred Moitzi # License: MIT License from __future__ import unicode_literals __author__ = "mozman <mozman@gmx.at>" import math from . import const from .color import TrueCo...
gpl-2.0
820,865,479,230,030,800
31.528026
114
0.484869
false
tedder/ansible
lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py
25
15326
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Karsten Kaj Jakobsen <kj@patientsky.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 = { 'metada...
gpl-3.0
-8,348,959,489,354,864,000
32.317391
117
0.571317
false
double12gzh/nova
nova/debugger.py
40
3009
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
7,376,880,445,210,520,000
35.253012
79
0.619807
false
jesseh/dothis
volunteering/migrations/0007_auto_20150809_2057.py
1
1047
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('volunteering', '0006_auto_20150809_2046'), ] operations = [ migrations.AlterField( model_name='triggerbyassignme...
agpl-3.0
4,613,068,971,073,253,000
31.71875
120
0.602674
false
joshmoore/zeroc-ice
py/test/Ice/objects/Server.py
1
1805
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
gpl-2.0
-5,684,738,105,812,537,000
28.112903
89
0.617175
false
mredar/harvester
scripts/queue_delete_solr_collection.py
3
3879
#! /bin/env python # -*- coding: utf-8 -*- import sys import logbook from harvester.config import config as config_harvest from redis import Redis from rq import Queue JOB_TIMEOUT = 86400 # 24 hrs def def_args(): import argparse parser = argparse.ArgumentParser(description='Harvest a collection') parser....
bsd-3-clause
-6,711,897,638,411,535,000
37.39604
77
0.664002
false
ambitioninc/django-dynamic-db-router
settings.py
2
1652
import os from django.conf import settings def configure_settings(): """ Configures settings for manage.py and for run_tests.py. """ if not settings.configured: # Determine the database settings depending on if a test_db var is set in CI mode or not test_db = os.environ.get('DB', 'pos...
mit
-4,334,931,302,368,102,000
32.714286
96
0.493947
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/MailChimp/ListSubscribe.py
5
5836
# -*- coding: utf-8 -*- ############################################################################### # # ListSubscribe # Adds a subscriber to a MailChimp list. # # 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...
apache-2.0
-245,207,782,184,932,200
46.836066
284
0.67889
false
tuxfux-hlp-notes/python-batches
archieves/batch-64/15-files/myenv/bin/runxlrd.py
1
16321
#!/home/khyaathi/Documents/git_repos/python-batches/batch-64/15-files/myenv/bin/python # Copyright (c) 2005-2012 Stephen John Machin, Lingfo Pty Ltd # This script is part of the xlrd package, which is released under a # BSD-style licence. from __future__ import print_function cmd_doc = """ Commands: 2rows ...
gpl-3.0
-8,034,611,722,542,785,000
38.422705
101
0.491269
false
testmana2/test
E5Network/E5RFC6266.py
1
12479
# -*- coding: utf-8 -*- # Copyright (c) 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a Content-Disposition parser iaw. RFC 6266. """ # # This code is adapted from the rfc6266.py module of qutebrowser. # Original copyright 2014-2015 Florian Bruhin (The Compiler) # <mail@qutebrowser.org> ...
gpl-3.0
-2,485,631,554,635,507,700
33.663889
79
0.574165
false
defaultnamehere/honours
timeseries/get_sentence.py
1
6289
import spikes as spike_finder import api import sys import datetime import collections import nltk import nltk.data from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer RUN_ON_TEST = False SENTENCES_DIR = "test/" if RUN_ON_TEST else "development/" OUTDIR = "results/" LOGDIR = "log/" #SENTENC...
gpl-2.0
3,478,592,766,570,398,000
38.30625
155
0.610272
false
Svolcano/python_exercise
dianhua/worker/crawler/china_mobile/tianjin/response_data.py
1
9802
# -*- coding: utf-8 -*- import traceback import json import lxml.html from lxml import etree import re,traceback,time # 登录前_XPath def before_login_data(html): before_login = {'error': False} try: root = etree.HTML(html) before_login['token'] = root.xpath('//*[@id="token"]/@value')[0] be...
mit
3,634,192,705,566,494,700
34.036765
84
0.524974
false
KEHANG/RMG-Py
rmgpy/data/statmechfit.py
4
21172
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of c...
mit
7,728,801,642,532,686,000
40.841897
168
0.626393
false
karlnapf/kernel_exp_family
kernel_exp_family/examples/demo_xvalidation_bayes_opt_manual.py
1
3167
from kernel_exp_family.estimators.finite.gaussian import KernelExpFiniteGaussian from kernel_exp_family.estimators.lite.gaussian import KernelExpLiteGaussian from kernel_exp_family.estimators.parameter_search_bo import BayesOptSearch,\ plot_bayesopt_model_1d from kernel_exp_family.examples.tools import visualise_fi...
bsd-3-clause
3,263,166,658,225,626,000
38.5875
95
0.604673
false
shhui/horizon
openstack_dashboard/dashboards/admin/auditlog/tests.py
1
4060
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
apache-2.0
-3,233,998,072,603,758,600
41.736842
78
0.577094
false
tapomayukh/projects_in_python
contact_modeling/find_model_params_online.py
1
11223
#!/usr/bin/env python # Online Estimation import numpy as np import scipy as scp import pylab as pyl import matplotlib.pyplot as pp import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy import tf import os import hrl_lib.util as ut import hrl_lib.transforms as tr import copy import pickle import...
mit
-765,287,255,659,265,200
34.181818
177
0.554219
false
adityaarun1/faster_rcnn_pytorch
faster_rcnn/datasets/nissan.py
2
10135
import os import PIL import numpy as np import scipy.sparse import subprocess import pickle import math import glob from .imdb import imdb from .imdb import ROOT_DIR # TODO: make fast_rcnn irrelevant # >>>> obsolete, because it depends on sth outside of this project from ..fast_rcnn.config import cfg # <<<< obsolete ...
mit
2,613,996,979,361,824,000
39.218254
127
0.524815
false
erdincay/pyload
module/plugins/hooks/SimplyPremiumComHook.py
12
1137
# -*- coding: utf-8 -*- from module.common.json_layer import json_loads from module.plugins.internal.MultiHook import MultiHook class SimplyPremiumComHook(MultiHook): __name__ = "SimplyPremiumComHook" __type__ = "hook" __version__ = "0.06" __status__ = "testing" __config__ = [("pluginmode...
gpl-3.0
-5,857,881,405,702,177,000
38.206897
113
0.531223
false
Pulgama/supriya
supriya/commands/NodeRunRequest.py
1
3773
import supriya.osc from supriya.commands.Request import Request from supriya.enums import RequestId class NodeRunRequest(Request): """ A /n_run request. :: >>> import supriya >>> server = supriya.Server.default().boot() >>> synth_a = supriya.Synth().allocate() >>> synth_b...
mit
3,331,147,071,377,809,000
27.583333
74
0.518685
false
ptitjes/quodlibet
quodlibet/packages/raven/transport/gevent.py
12
1658
""" raven.transport.gevent ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from raven.transport.base import AsyncTransport from raven.transport.http import HTTPTransport try: ...
gpl-2.0
1,029,439,619,663,752,100
30.283019
75
0.648975
false
knuevena/americorps-backend
views.py
1
10945
import volunteer from volunteer import Volunteer from admin import Admin import admin from organization import * import orgmember import organization import event from volunteerSkills import VolunteerSkills from volunteerNeighborhoods import VolunteerNeighborhoods from volunteerInterests import VolunteerInterests from ...
mit
-8,632,896,102,610,305,000
33.856688
94
0.586661
false
gonboy/sl4a
python/src/Mac/Tools/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py
29
3570
"""Suite Help Indexing Tool Suite: Special events that just the Help Indexing Tool supports. Level 0, version 0 Generated from /Developer/Applications/Apple Help Indexing Tool.app AETE/AEUT resource version 1/1, language 0, script 0 """ import aetools import MacOS _code = 'HIT ' class Help_Indexing_Tool_Suite_Event...
apache-2.0
-3,069,617,058,972,281,000
31.454545
148
0.62465
false
ezio-melotti/devguide
tools/rstlint.py
3
7608
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Check for stylistic and formal issues in .rst and .py # files included in the documentation. # # 01/2009, Georg Brandl # TODO: - wrong versions in versionadded/changed # - wrong markup after versionchanged directive from __future__ import with_statement import ...
cc0-1.0
5,274,824,342,021,721,000
32.078261
83
0.549422
false
GluuFederation/oxd-python
examples/flask_app/demosite.py
1
1649
import os import oxdpython from flask import Flask, render_template, redirect, request, make_response app = Flask(__name__) this_dir = os.path.dirname(os.path.realpath(__file__)) config = os.path.join(this_dir, 'demosite.cfg') oxc = oxdpython.Client(config) # If site is not registered, first register it if not oxc....
mit
5,455,942,204,776,373,000
23.61194
74
0.66222
false
jlaniau/conquests
xlwt/Row.py
8
11870
# -*- coding: windows-1252 -*- from . import BIFFRecords from . import Style from .Cell import StrCell, BlankCell, NumberCell, FormulaCell, MulBlankCell, BooleanCell, ErrorCell, \ _get_cells_biff_data_mul from . import ExcelFormula import datetime as dt from .Formatting import Font from .compat import basestring, ...
gpl-3.0
-2,857,220,994,210,055,000
38.698997
110
0.566639
false
tianyi33/simple_blog
django/utils/encoding.py
19
9186
from __future__ import unicode_literals import codecs import datetime from decimal import Decimal import locale try: from urllib.parse import quote except ImportError: # Python 2 from urllib import quote import warnings from django.utils.functional import Promise from django.utils import six class Django...
mit
-4,645,230,983,217,476,000
36.647541
80
0.61953
false
doctaphred/projecteuler
projecteuler/__main__.py
1
1036
# -*- coding: utf-8 -*- import sys from .problem import Problem def main(): problems = list(Problem.discover()) if not problems: print('Did not find any problems!') sys.exit(1) num_problems = len(problems) if num_problems == 1: print('1 problem attempted') else: ...
gpl-3.0
-5,461,986,150,749,626,000
23.093023
77
0.586873
false
h1ds/h1ds
h1ds/h1ds_summary/forms.py
1
1655
from django import forms from h1ds.models import Device from h1ds_summary.models import SummaryAttribute from h1ds_summary.validators import shotslug_validator, attributeslug_validator from h1ds_summary.parsers import parse_shot_slug, parse_attr_str class SummaryAttributeForm(forms.ModelForm): class Meta: m...
mit
-214,507,504,021,422,080
47.676471
100
0.672508
false
Learning-from-our-past/Kaira
qtgui/layouts/ui_mainwindow.py
2
11342
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.4.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWi...
gpl-2.0
-7,739,739,108,013,947,000
59.652406
139
0.731441
false
thomasmf/nomenine
src/core/runtime/parser/integer.py
1
1585
OBJECT( 'PARSE_TOKEN_INTEGER', methods = [ MTID_IS( 'TYPE' ), MS( ARG( CW( 'consume' ), CG( 'LIST', 'phrase' ) ), """ JUMP__consume_LIST( $CA(FRAME__PARSE_TOKEN_INTEGER_0_new( CONTEXT )), $CA(PLUS_new( $CA(RANGE_TYPE_new( $CA(CHARACTER_new( '0' )), $CA(CHARACTER_new( '9' )) )) )), PARAM_phrase ) ; ...
mit
-6,288,916,120,556,903,000
28.351852
186
0.546372
false
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_lookup_table_v2_bf16_op.py
1
4629
# Copyright (c) 2021 PaddlePaddle 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 app...
apache-2.0
5,117,035,170,479,563,000
35.738095
80
0.650897
false
adereis/avocado
avocado/core/virt.py
1
10262
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
-6,645,299,367,930,012,000
26.586022
75
0.528747
false
xleng/YCM_WIN_X86
third_party/ycmd/ycmd/identifier_utils.py
6
4186
#!/usr/bin/env python # # Copyright (C) 2014 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
gpl-3.0
8,896,798,435,556,643,000
32.488
79
0.641424
false
open-synergy/opensynid-fleet
fleet_work_order_passanger/wizards/passanger_boarding_disembark.py
1
4409
# -*- coding: utf-8 -*- # © 2016 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, models, fields class PassangerBoardingDisembark(models.TransientModel): _name = "fleet.passanger_boarding_disembark" _description = "Passanger Boarding/Disembar...
agpl-3.0
4,147,877,347,711,753,700
28.386667
73
0.504991
false
jdddog/nao_hri
src/nao_hri/joint.py
1
2417
# Copyright (c) 2014, James Diprose # 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,920,362,576,307,248,000
42.178571
93
0.73314
false
akrherz/iem
scripts/coop/compute_climate.py
1
5477
"""Computes the Climatology and fills out the table!""" import datetime import psycopg2.extras from tqdm import tqdm from pyiem.reference import state_names from pyiem.network import Table as NetworkTable from pyiem.util import get_dbconn, logger LOG = logger() COOP = get_dbconn("coop") THISYEAR = datetime.date.toda...
mit
-5,248,187,992,509,591,000
30.65896
79
0.535877
false
probablytom/msci-model
resp_base/Responsibilities.py
1
3605
from .Constraints import Deadline, ResourceDelta from random import random class UnbalancedImportancesError(Exception): pass class Obligation: def __init__(self, constraint_set: list, name="unnamed_responsibility"): self.constraint_set = constraint_set self....
mit
6,844,041,192,146,345,000
30.631579
109
0.603606
false
kbkailashbagaria/subliminal
subliminal/providers/thesubdb.py
7
2602
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from babelfish import Language from requests import Session from . import Provider, get_version from .. import __version__ from ..subtitle import Subtitle, fix_line_ending logger = logging.getLogger(__name__) class TheSubDBSubtitle(Sub...
mit
3,608,087,149,503,811,600
30.731707
113
0.620676
false
numerigraphe/purchase-workflow
purchase_requisition_delivery_address/__openerp__.py
4
1242
# -*- coding: utf-8 -*- # # # Author: Yannick Vaucher # Copyright 2014 Camptocamp SA # # 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,...
agpl-3.0
3,717,544,609,304,154,000
32.567568
77
0.675523
false
ZefQ/Flexget
flexget/plugins/filter/if_condition.py
23
4613
from __future__ import unicode_literals, division, absolute_import import __builtin__ import logging import re import datetime from copy import copy from flexget import plugin from flexget.event import event from flexget.task import Task from flexget.entry import Entry log = logging.getLogger('if') def safer_eval(s...
mit
-6,215,942,801,543,494,000
40.936364
115
0.558855
false
bjornaa/ladim
postladim/test/test_particlefile.py
1
4283
import os import pytest import datetime import numpy as np # import xarray as xr # from pathlib import Path from netCDF4 import Dataset from postladim import ParticleFile @pytest.fixture(scope="module") def particle_file(): # set up # Return a small particle file # # 0 - - # 1 11 - ...
mit
-3,902,281,130,254,245,400
31.694656
85
0.564324
false
groovecoder/kuma
kuma/users/tests/test_models.py
16
4070
from nose.tools import eq_, ok_ from nose.plugins.attrib import attr from kuma.wiki.tests import revision from ..helpers import gravatar_url from ..models import UserBan from . import UserTestCase class TestUser(UserTestCase): def test_websites(self): """A list of websites can be maintained on a user""...
mpl-2.0
9,195,369,261,417,133,000
35.339286
76
0.610811
false
egor-tensin/sorting_algorithms
algorithms/params.py
2
4480
# Copyright (c) 2016 Egor Tensin <Egor.Tensin@gmail.com> # This file is part of the "Sorting algorithms" project. # For details, see https://github.com/egor-tensin/sorting-algorithms. # Distributed under the MIT License. from enum import Enum from numbers import Integral from .input_kind import InputKind from .plotte...
mit
-3,324,626,552,379,483,600
30.111111
79
0.608705
false
grzes/djangae
djangae/db/unique_utils.py
9
3947
from hashlib import md5 from google.appengine.api import datastore def _unique_combinations(model, ignore_pk=False): unique_names = [ [ model._meta.get_field(y).name for y in x ] for x in model._meta.unique_together ] for field in model._meta.fields: if field.primary_key and ignore_pk: co...
bsd-3-clause
-4,482,610,168,908,953,600
34.558559
110
0.60679
false
deepakgupta1313/models
im2txt/im2txt/train.py
30
4250
# 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
-385,671,210,219,667,100
36.280702
80
0.666118
false