repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
JioCloud/oslo-incubator
openstack/common/db/sqlalchemy/migration.py
1
10048
# coding: utf-8 # # Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
-3,339,525,715,949,184,000
35.140288
79
0.695431
false
4.232098
false
false
false
enikesha/pacioli
pacioli/views.py
1
31775
# Copyright (c) 2014, Satoshi Nakamoto Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditio...
bsd-3-clause
207,046,590,486,542,980
43.070735
757
0.628419
false
3.976348
false
false
false
rdmorganiser/rdmo
rdmo/projects/models/value.py
1
6697
import mimetypes from pathlib import Path import iso8601 from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django_cleanup import cleanup from rdmo.core.constants import (VALUE_TYPE_BOOLEAN, VALUE_TYPE_CHOICES, VALU...
apache-2.0
2,072,839,092,465,988,000
30.148837
100
0.558907
false
4.20138
false
false
false
sxjscience/tvm
tests/python/relay/test_ir_parser.py
1
22635
# 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,946,301,590,166,049,000
24.094235
99
0.522377
false
3.243301
true
false
false
xhchrn/gegan
train.py
1
3732
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import tensorflow as tf import argparse from model.gegan import GEGAN parser = argparse.ArgumentParser(description='Train') parser.add_argument('--experiment_dir', dest='experiment_dir', required=True, ...
apache-2.0
-6,427,230,271,344,068,000
61.2
119
0.681404
false
3.74323
false
false
false
Ictp/indico
bin/utils/changeStyle.py
1
1781
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
gpl-3.0
-5,476,135,551,570,129,000
37.717391
96
0.732734
false
3.605263
false
false
false
tkaitchuck/nupic
external/common/lib/python2.6/site-packages/logilab/astng/test/unittest_inference.py
1
41136
# copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation,...
gpl-3.0
3,295,323,266,890,843,000
34.926638
147
0.594953
false
3.587963
true
false
false
vietdh85/vh-utility
script/rcb/graspgold.py
1
1037
import sys import os.path from pyquery import PyQuery as pq import time import common def getValues(item): url = item[3] print("getValues(): ", url) format = "%b %d %Y %H:%M:%S" d = pq(url=url) list = d(".list td") index = 0 while index < len(list): try : obj = {} obj['date'] = common.removeNumber...
gpl-3.0
1,925,032,494,287,725,800
22.568182
139
0.580521
false
2.757979
false
false
false
juliakreutzer/bandit-neuralmonkey
neuralmonkey/decoders/word_alignment_decoder.py
1
3918
from typing import cast import numpy as np import tensorflow as tf from neuralmonkey.dataset import Dataset from neuralmonkey.encoders.recurrent import RecurrentEncoder from neuralmonkey.decoders.decoder import Decoder from neuralmonkey.logging import warn from neuralmonkey.model.model_part import ModelPart, FeedDict...
bsd-3-clause
5,833,592,751,520,678,000
34.944954
79
0.593415
false
4.367893
false
false
false
JamesSample/ecosystem_services_impacts
Code/01_es_lu_cc.py
1
21539
#------------------------------------------------------------------------------ # Name: 01_es_lu_cc.py # Purpose: Processing for the CREW project on ES, LUC and CC. # # Author: James Sample # # Created: 14/01/2015 # Copyright: (c) James Sample and JHI, 2015 # License: https://github.com/JamesS...
mit
7,467,887,343,285,515,000
32.92126
128
0.566229
false
3.327
false
false
false
silky/ProbablyOverthinkingIt
thinkstats2.py
1
69096
"""This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """This file contains class definitions for: H...
mit
1,973,675,057,824,859,000
23.589324
79
0.577964
false
3.902626
false
false
false
redhat-openstack/rdo-infra
ci-scripts/dlrnapi_promoter/test_dlrn_integration.py
1
6534
""" This test is launched as part of the existing tox command It tests if promoter and dlrn server are interacting correctly Uses standard pytest fixture as a setup/teardown method """ import logging import os import promoter_integration_checks import pytest import yaml from common import close_logging from config_...
apache-2.0
3,242,506,652,930,499,000
33.389474
79
0.662687
false
3.816589
true
false
false
diego-d5000/MisValesMd
env/lib/python2.7/site-packages/django/contrib/auth/tests/custom_user.py
1
3775
from django.contrib.auth.models import ( AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission, PermissionsMixin, UserManager, ) from django.db import models # The custom User uses email as the unique identifier, and requires # that every user provide a date of birth. This lets us test #...
mit
-8,085,511,089,587,579,000
31.40708
88
0.647947
false
3.965336
false
false
false
creasyw/IMTAphy
modules/phy/copper/PyConfig/copper/TimeDependentDistBER.py
1
5027
############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C) 2004-2009 # Chair of Communication Networks (ComNets) # Kopernikusstr. 5, D-5...
gpl-2.0
-1,640,753,965,825,216,300
36.514925
169
0.536901
false
3.927344
false
false
false
sniemi/SamPy
sandbox/src1/examples/multi_image.py
1
1769
#!/usr/bin/env python ''' Make a set of images with a single colormap, norm, and colorbar. It also illustrates colorbar tick labelling with a multiplier. ''' from matplotlib.pyplot import figure, show, sci from matplotlib import cm, colors from matplotlib.font_manager import FontProperties from numpy import amin, ama...
bsd-2-clause
9,214,454,940,438,378,000
23.232877
64
0.637648
false
3.114437
false
false
false
jhnphm/boar
front.py
1
29536
# -*- coding: utf-8 -*- # Copyright 2010 Mats Ekberg # # 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
9,191,154,933,669,040,000
41.134094
118
0.628961
false
3.933413
false
false
false
nirinA/scripts_python
mangorona.py
1
12832
'''game of mangorona. goal: keep more pawn on the board than your opponent. movement: move your pawn to an unoccupied place. pick: fill or create an empty place beetwen your pawn and your opponent's, and pick all opponent pawn in the same line of movement. ''' import sys import random import time...
unlicense
4,551,880,349,135,935,500
33.869565
93
0.488622
false
3.583357
false
false
false
rjschwei/azure-sdk-for-python
azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py
1
1111
# 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 ...
mit
1,389,177,205,370,494,500
27.487179
76
0.540954
false
4.240458
false
false
false
vjlux/luxlib
LuxSynth/LuxSynth/LuxPreprocessor.py
1
1130
#!/usr/bin/env python3 ## Copyright (c) MIT. All rights reserved. ## lux (vjlux@gmx.at) 2016 ############################################################ # Imports ############################################################ import logging import LuxImage import open3d as o3d import numpy as np ##################...
mit
3,467,147,251,003,499,000
24.704545
77
0.39646
false
4.574899
false
false
false
chaincoin/chaincoin
qa/rpc-tests/replace-by-fee.py
1
22023
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 replace by fee code # from test_framework.test_framework import BitcoinTestFramework from test_...
mit
5,439,684,677,800,086,000
36.327119
105
0.5823
false
3.367946
true
false
false
pytorch/fairseq
examples/multilingual/data_scripts/utils/fasttext_multi_filter.py
1
2340
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. #!/bin/python import fasttext from multiprocessing import Pool import contextlib import sys import argparse from functools import partial im...
mit
-9,120,572,381,256,521,000
36.142857
107
0.584188
false
4.048443
false
false
false
Southpaw-TACTIC/TACTIC
src/pyasm/web/webware_adapter.py
1
4985
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
7,359,882,747,816,298,000
23.800995
104
0.566901
false
4.231749
false
false
false
phenoxim/nova
nova/tests/unit/api/openstack/placement/test_handler.py
1
7223
# 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 agreed to in...
apache-2.0
-6,712,546,996,518,206,000
36.231959
78
0.618856
false
4.192107
true
false
false
stianstr/autodeploy
autodeploy/Api.py
1
3374
from DependencyContainer import DependencyContainer from Deployer import AlreadyDeployed import traceback dc = DependencyContainer() # Step 1 - Check if branch can be deployed def check(branch, server, user, internalCheck=False): checker = dc.getDeploymentChecker(server) result = checker.check(branch) if ...
mit
2,985,443,141,897,539,600
29.396396
78
0.546829
false
4.244025
false
false
false
windskyer/k_nova
nova_extension/compute/ibm/etree_wrapper.py
1
4367
# ================================================================= # ================================================================= """Wrapper around ElementTree, using either the native implementation or lxml. This module creates a wrapper around the ElementTree library, picking an appropriate implementation for...
apache-2.0
-7,815,707,756,236,600,000
27.542484
78
0.650561
false
4.163012
false
false
false
dhalleine/tensorflow
tensorflow/python/kernel_tests/control_flow_ops_py_test.py
1
59408
# 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
7,064,295,795,435,686,000
32.60181
80
0.57536
false
3.012118
true
false
false
gamesun/MyCdecl
main.py
1
5018
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2013, gamesun # 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 a...
bsd-3-clause
-6,601,908,336,828,603,000
38.144
100
0.535273
false
4.004789
false
false
false
SnowWalkerJ/quantlib
quant/data/wind/tables/asharestockrating.py
1
2127
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class AShareStockRating(BaseModel): """ 4.75 中国A股投资评级明细 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_windcode: VARCHAR2(40) Wind代码 ...
gpl-3.0
3,560,199,213,089,072,600
29.5
109
0.619249
false
2.424359
false
false
false
nikpap/inspire-next
inspirehep/modules/workflows/tasks/classifier.py
1
4238
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2015 CERN. # # INSPIRE 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
-5,475,445,670,009,735,000
36.504425
84
0.607834
false
4.187747
false
false
false
trosa/forca
reportlab/lib/testutils.py
1
11504
#Copyright ReportLab Europe Ltd. 2000-2008 #see license.txt for license details __version__='''$Id: testutils.py 3662 2010-02-09 11:23:58Z rgbecker $''' __doc__="""Provides support for the test suite. The test suite as a whole, and individual tests, need to share certain support functions. We have to put these ...
gpl-2.0
6,965,741,556,274,241,000
32.546547
119
0.59362
false
4.104174
true
false
false
zxqzx/scripts
emailmodule.py
1
1669
#!/usr/bin/env python3 # Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.mime.text import MIMEText import sys import argparse #User Options globalsender = "" loginrequired = "no" server = "localhost" port = "587" starttls = "no" username = "username" p...
mit
-3,210,705,563,425,402,000
20.960526
70
0.627322
false
3.131332
false
false
false
haddocking/disvis
disvis/IO/mmcif.py
1
1979
from __future__ import print_function import sys from collections import OrderedDict import numpy as np def parse_cif(infile): if isinstance(infile, file): pass elif isinstance(infile, str): infile = open(infile) else: raise TypeError("Input should either be a file or string.") ...
apache-2.0
8,828,443,199,216,002,000
33.12069
68
0.54472
false
3.27649
false
false
false
uclouvain/osis
attribution/tests/ddd/domain/test_teacher.py
1
2419
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-4,446,630,505,314,006,000
34.043478
87
0.612903
false
3.976974
true
false
false
halbbob/dff
api/gui/model/search_model.py
1
16526
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2011 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
-762,149,715,988,854,500
33.645702
125
0.63863
false
3.786893
false
false
false
bailabs/bench-v7
install.py
1
10678
# wget setup_frappe.py | python import os, sys, subprocess, getpass, json, multiprocessing, shutil, platform from distutils.spawn import find_executable tmp_bench_repo = '/tmp/bench-v7' def install_bench(args): check_distribution_compatibility() check_brew_installed() # pre-requisites for bench repo cloning insta...
gpl-3.0
-1,744,825,575,128,492,300
29.249292
127
0.699569
false
3.158237
false
false
false
diN0bot/ProcrasDonate
adwords/views/main.py
1
2790
import settings from lib.view_utils import render_response, render_string, HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.decorators import user_passes_test from adwords.models import * def adword_page(request, group): page = "landing" return render_response(reque...
agpl-3.0
758,947,347,224,055,200
40.641791
96
0.574194
false
4.318885
false
false
false
odahoda/noisicaa
noisicaa/ui/graph/base_node.py
1
34059
#!/usr/bin/python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de> # # 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 y...
gpl-2.0
6,715,687,354,517,147,000
33.472672
99
0.580023
false
3.723516
false
false
false
chromium/chromium
tools/android/modularization/convenience/build_gn_editor.py
6
10119
# Lint as: python3 # Copyright 2021 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. r'''Helper code to handle editing BUILD.gn files.''' from __future__ import annotations import difflib import pathlib import re import su...
bsd-3-clause
719,191,919,956,314,500
29.20597
80
0.612709
false
3.764509
false
false
false
qedsoftware/commcare-hq
corehq/apps/hqmedia/views.py
1
22884
from StringIO import StringIO from mimetypes import guess_all_extensions, guess_type import uuid import zipfile import logging import os from django.contrib.auth.decorators import login_required import json import itertools from django.conf import settings from django.core.urlresolvers import reverse from django.utils....
bsd-3-clause
1,299,744,272,025,321,000
34.589425
121
0.627775
false
4.098872
false
false
false
IntersectAustralia/asvo-tao
core/PerformanceCode/WallTimeResultsMerge.py
1
2770
import pickle, os, logging,string import pg import locale import time from datetime import date import logging import settingReader class DBInterface(object): def __init__(self,Options): self.Options=Options self.InitDBConnection(self.Options) self.IsOpen=Fal...
gpl-3.0
8,723,199,746,973,042,000
34.075949
135
0.555596
false
4.6633
false
false
false
simone-campagna/py-structparser
examples/versioning/model/model_r1.py
1
3830
# # Copyright 2013 Simone Campagna # # 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 wri...
apache-2.0
-2,636,145,637,851,915,000
32.596491
106
0.597389
false
4.260289
false
false
false
Mariaanisimova/pythonintask
IVTa/2014/EGOROV_V_I/task_8_8.py
1
2933
# Задача 8. Вариант 8 ''' Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4) так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на подсказку в том случае, если у него нет никаких предположений. Разработайте систему начисления очков, по которой бы игроки, отгадавшие слово...
apache-2.0
-1,640,939,314,107,939,300
27.333333
105
0.683333
false
1.558442
false
false
false
dasseclab/dasseclab
clones/routersploit/tests/payloads/x64/test_reverse_tcp.py
1
1678
from routersploit.modules.payloads.x64.reverse_tcp import Payload # reverse tcp with lhost=192.168.1.4 lport=4321 reverse_tcp = ( b"\x6a\x29\x58\x99\x6a\x02\x5f\x6a\x01\x5e\x0f\x05\x48\x97\x48" b"\xb9\x02\x00\x10\xe1\xc0\xa8\x01\x04\x51\x48\x89\xe6\x6a\x10" b"\x5a\x6a\x2a\x58\x0f\x05\x6a\x03\x5e\x48\xff\...
gpl-2.0
1,970,158,449,034,645,000
42.025641
67
0.679976
false
1.602674
false
false
false
flavoi/diventi
diventi/ebooks/migrations/0110_auto_20200830_1750.py
1
3345
# Generated by Django 2.2.13 on 2020-08-30 15:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ebooks', '0109_auto_20200821_1049'), ] operations = [ migrations.AlterField( model_name='book', name='color', ...
apache-2.0
6,576,685,759,129,036,000
62.113208
284
0.556652
false
3.862587
false
false
false
sindhus/hasjob
hasjob/models/__init__.py
1
2623
# -*- coding: utf-8 -*- # flake8: noqa from datetime import timedelta from coaster import LabeledEnum from coaster.db import db from coaster.sqlalchemy import (BaseMixin, BaseNameMixin, TimestampMixin, BaseScopedIdMixin, BaseScopedNameMixin, CoordinatesMixin, make_timestamp_columns) from .. import app agelimit = ...
agpl-3.0
6,810,176,725,132,138,000
32.628205
100
0.655738
false
3.085882
false
false
false
leogregianin/pychess
lib/pychess/Players/CECPEngine.py
1
39654
import asyncio import itertools import re from gi.repository import Gtk, GObject from pychess.compat import create_task from pychess.Utils import wait_signal from pychess.System import conf from pychess.System.Log import log from pychess.widgets import mainwindow from pychess.Utils.Move import Move from pychess.Uti...
gpl-3.0
7,185,567,614,037,482,000
39.054545
140
0.489459
false
4.349934
false
false
false
mate-desktop/pluma
tools/preprocessor.py
1
5353
# -*- coding: utf-8 -*- # preprocessor.py - simple preprocessor for plugin template files # This file is part of pluma # # Copyright (C) 2006 - Steve Frécinaux # Copyright (C) 2012-2021 MATE Developers # # pluma is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
gpl-2.0
851,380,180,004,629,900
32.037037
85
0.508969
false
4.390484
false
false
false
feedhq/feedhq
feedhq/feeds/tasks.py
1
8652
from collections import defaultdict from datetime import timedelta import requests import structlog from django.conf import settings from django.utils import timezone from django_push.subscriber.models import Subscription, SubscriptionError from rache import schedule_job from requests.exceptions import MissingSchema f...
bsd-3-clause
-1,002,127,284,446,079,100
35.200837
79
0.537217
false
4.237023
false
false
false
zmsch27/Python
PythonBase/Python_SQL.py
1
5850
#以下来自廖雪峰的Python学习之Python数据库 #SQLite//////////////////////////////////////////////////// #SQLite是一种嵌入式数据库,它的数据库就是一个文件。由于SQLite本身是C写的,而且体积很小 #所以,经常被集成到各种应用程序中,甚至在iOS和Android的App中都可以集成。 #Python就内置了SQLite3,所以,在Python中使用SQLite,不需要安装任何东西,直接使用。 # 导入SQLite驱动: import sqlite3 # 连接到SQLite数据库 # 数据库文件是test.db # 如果文件不存在,会自动在当前目录创建...
apache-2.0
-6,221,566,883,954,505,000
28.697183
90
0.6824
false
1.873778
true
false
false
jirutka/ngx-oauth
integration/support/nginx_server.py
1
1260
import os from os import path import shlex from subprocess import Popen from time import sleep from .util import write_file import requests from requests import ConnectionError from retry import retry __all__ = ['NginxServer'] class NginxServer: def __init__(self, nginx_conf, check_url, temp_dir='.'): ...
mit
-6,519,647,580,464,918,000
25.25
94
0.603175
false
3.662791
false
false
false
supertree-toolkit/stk
stk/stk_import_export.py
1
22750
#!/usr/bin/env python # # Supertree Toolkit. Software for managing and manipulating sources # trees ready for supretree construction. # Copyright (C) 2011, Jon Hill, Katie Davis # # 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
6,061,260,257,360,899,000
35.871961
120
0.617275
false
3.612832
false
false
false
divio/askbot-devel
askbot/views/writers.py
1
39556
# encoding:utf-8 """ :synopsis: views diplaying and processing main content post forms This module contains views that allow adding, editing, and deleting main textual content. """ import datetime import logging import os import os.path import random import sys import tempfile import time from django.shortcuts import ...
gpl-3.0
-7,389,069,209,881,651,000
38.794769
184
0.566008
false
4.436519
false
false
false
kmshi/miroguide
channelguide/channels/migrations/0003_switch_user_ids.py
1
13086
from south.db import db from django.db import models from channelguide.channels.models import * class Migration: no_dry_run = True def forwards(self, orm): "Write your forwards migration here" for channel in orm.Channel.objects.all(): for field in ('owner', 'featured_by', 'moderat...
agpl-3.0
668,921,977,871,084,900
76.431953
177
0.539814
false
3.710235
false
false
false
skdaccess/skdaccess
skdaccess/geo/srtm/cache/data_fetcher.py
2
10677
# The MIT License (MIT) # Copyright (c) 2016 Massachusetts Institute of Technology # # Authors: Cody Rude, Guillaume Rongier # This software has been created in projects supported by the US National # Science Foundation and NASA (PI: Pankratius) # # Permission is hereby granted, free of charge, to any person obtaining ...
mit
6,060,677,398,640,232,000
39.290566
133
0.583966
false
3.926811
false
false
false
labkode/rtlv
handlers.py
1
6340
from google.appengine.ext.db import BadValueError from google.appengine.api import channel from google.appengine.api import users from google.appengine.ext import ndb import webapp2 import jinja2 import os import json from datetime import datetime import time from models import Log from models import System JINJA_E...
agpl-3.0
5,098,910,542,018,449,000
29.926829
151
0.699211
false
3.192346
false
false
false
incuna/authentic
authentic2/auth2_auth/auth2_openid/views.py
1
17205
import urllib from django_authopenid.forms import OpenidDissociateForm, AssociateOpenID from django_authopenid.forms import OpenidSigninForm from django_authopenid import DjangoOpenIDStore from django_authopenid.models import UserAssociation from django_authopenid.utils import * from django_authopenid.views import ass...
agpl-3.0
-8,868,549,658,912,582,000
45.25
112
0.626271
false
3.950631
false
false
false
espressomd/espresso
maintainer/benchmarks/lb.py
1
6553
# # Copyright (C) 2013-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
-8,576,075,647,164,855,000
34.808743
78
0.581566
false
3.377835
false
false
false
frontg8/frontg8lib
doc/ext/breathe/breathe/renderer/filter.py
1
37770
""" Filters ------- Filters are an interesting and somewhat challenging part of the code base. They are used for two different purposes: - To figure out which nodes in the xml hierarchy to start rendering from. These are called 'finder filters' or 'content filters'. This is done before rendering starts. - To fig...
bsd-3-clause
-4,144,635,030,783,446,500
32.336275
100
0.610988
false
4.454535
false
false
false
jjgoings/McMurchie-Davidson
mmd/utils/spectrum.py
1
3029
from __future__ import division import numpy as np """Contains some routines to do the (Pade approximant) Fourier transform as well as some peak-finding routines, useful for post processing a real-time calculation """ def genSpectra(time,dipole,signal): fw, frequency = pade(time,dipole) fw_sig, frequen...
bsd-3-clause
-264,727,656,188,925,760
29.908163
89
0.584021
false
2.987179
false
false
false
danielfrg/remote-pip
rpip/tests/test_output.py
1
1204
from rpip.output import Output exit0 = {'exit_code': 0, 'stdout': 'yes', 'stderr': ''} exit1 = {'exit_code': 1, 'stdout': '', 'stderr': 'ERROR'} o0 = {'host1': exit0, 'host2': exit0, 'host3': exit0} o1 = {'host1': exit0, 'host2': exit1, 'host3': exit0} o2 = {'host1': exit0, 'host2': exit1, 'host3': exit1} def test_...
apache-2.0
3,832,086,671,021,986,300
22.607843
57
0.575581
false
3.087179
false
false
false
namlook/mongokit
mongokit/schema_document.py
1
42677
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2011, Nicolas Clairon # 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 abov...
bsd-3-clause
3,304,417,042,122,618,000
42.996907
117
0.506455
false
4.552699
false
false
false
JohnUrban/fast5tools
bin/samGenomicWindows.py
1
5426
#!/usr/bin/env python2.7 import argparse from collections import defaultdict from fast5tools.samclass import * from fast5tools.samops import * parser = argparse.ArgumentParser(description=""" DESCRIPTION Given a SAM file (with F5:Z: info attached) that is sorted by read name: - get the alignment or set o...
mit
6,325,595,526,689,239,000
51.679612
337
0.651861
false
4.170638
false
false
false
DigitalCampus/django-oppia
api/resources/course.py
1
9945
import json import os import re import shutil import xmltodict import zipfile from django.conf import settings from django.conf.urls import url from django.core.exceptions import MultipleObjectsReturned from django.db.models import Q from django.http import HttpResponse, Http404 from django.utils.translation import ug...
gpl-3.0
3,532,451,220,382,889,000
37.103448
79
0.539769
false
4.502037
false
false
false
yilei0620/3D_Conditional_Gan
GenSample_obj.py
1
4544
import sys sys.path.append('..') import os import json from time import time import numpy as np from sklearn.externals import joblib import scipy from scipy import io # from matplotlib import pyplot as plt # from sklearn.externals import joblib import theano import theano.tensor as T from lib import activations fro...
mit
4,118,196,402,505,532,400
27.942675
261
0.659991
false
2.552809
false
false
false
Keisuke69/libcloud
libcloud/loadbalancer/drivers/cloudstack.py
1
4800
# 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
400,207,334,912,929,400
38.02439
78
0.63875
false
4.270463
false
false
false
BBN-Q/Quince
quince/param.py
1
16560
# coding: utf-8 # Raytheon BBN Technologies 2016 # Contributiors: Graham Rowlands # # This file contains the parameter descriptions from qtpy.QtGui import * from qtpy.QtCore import * from qtpy.QtWidgets import * import os class Parameter(QGraphicsEllipseItem): """docstring for Parameter""" def __init__(self,...
apache-2.0
6,470,298,466,741,095,000
35.315789
121
0.61087
false
3.684913
false
false
false
charleso/git-cc
git_cc/gitcc.py
1
2009
#!/usr/bin/env python import inspect import sys from optparse import OptionParser from . import checkin from . import init from . import rebase from . import reset from . import sync from . import tag from . import update from . import version commands = [ init, rebase, checkin, sync, reset, tag, update, version...
gpl-2.0
6,877,740,957,302,435,000
25.090909
69
0.590841
false
3.769231
false
false
false
G8bao7/camelbell-server
check_oracle.py
1
10171
#!//bin/env python #coding:utf-8 import os import sys import string import time import datetime import MySQLdb import cx_Oracle import logging import logging.config logging.config.fileConfig("etc/logger.ini") logger = logging.getLogger("oracle") path='./include' sys.path.insert(0,path) import functions as func import c...
gpl-3.0
-3,721,397,332,160,236,000
51.386598
790
0.662698
false
3.315824
false
false
false
johnmgregoire/NanoCalorimetry
plot_pprvsTsubtract20110818.py
1
3566
import numpy, h5py, os from PnSC_main import * from PnSC_h5io import * from PnSC_math import * p='C:/Users/JohnnyG/Documents/PythonCode/Vlassak/NanoCalorimetry/20110816_Zr-Hf-B.h5' h5f=h5py.File(p, mode='r') ehl=[\ ('quadlinheating2_0817', 'cell9_25mAlinquad2_first_1_of_1', 'Zr-B, 1st'),\ ('quadlinheating2_0817', 'ce...
bsd-3-clause
3,636,669,032,018,904,600
39.988506
136
0.616938
false
2.461008
false
false
false
rmed/wat-bridge
wat_bridge/signals.py
1
3542
# -*- coding: utf-8 -*- # # wat-bridge # https://github.com/rmed/wat-bridge # # The MIT License (MIT) # # Copyright (c) 2016 Rafael Medina García <rafamedgar@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
mit
-2,279,454,052,211,999,200
29.791304
80
0.661395
false
3.996614
false
false
false
Caylo/easybuild-framework
easybuild/toolchains/linalg/libsci.py
1
3408
## # Copyright 2014-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
3,152,435,905,276,720,000
36.450549
104
0.681631
false
3.491803
false
false
false
dsparrow27/vortex
src/ds/vortex/nodes/comparison/equalTo.py
1
1290
from ds.vortex.core import baseNode from ds.vortex.core import plug as plugs class EqualToNode(baseNode.BaseNode): def __init__(self, name): """ :param name: str, the name of the node """ baseNode.BaseNode.__init__(self, name) def initialize(self): baseNode.BaseNode.in...
mit
-2,959,725,175,633,095,000
32.076923
85
0.651938
false
3.623596
false
false
false
dkulikovsky/graphite-ch-web
webapp/graphite/events/views.py
1
2767
import datetime import time from django.http import HttpResponse from django.shortcuts import render_to_response, get_object_or_404 from django.utils.timezone import localtime, now from graphite.util import json from graphite.events import models from graphite.render.attime import parseATTime from django.core.urlresol...
apache-2.0
3,258,372,787,531,299,000
29.406593
86
0.633177
false
3.774898
false
false
false
jat255/hyperspy
hyperspy/tests/misc/test_utils.py
1
2016
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
gpl-3.0
5,785,363,726,843,865,000
37.037736
78
0.659722
false
3.371237
false
false
false
blowmage/gcloud-python
gcloud/storage/demo/__init__.py
1
1054
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
5,348,173,973,588,529,000
34.133333
74
0.706831
false
4.101167
false
false
false
vaiski/checksum
src/checksum/checksum.py
1
4815
# -*- coding: utf-8 -*- ''' Checksum ======== Provides an extendable checksum calculation and validation library for different checksum algorithms. ''' class ChecksumStrategy(object): ''' An interface class for checksum algorithm classes. ''' def checksum(self, body): ''' Calculates a check...
mit
-6,618,260,355,587,514,000
27.660714
79
0.580685
false
5.073762
false
false
false
jovencoda/evoca-v2
evoca_v2/core/migrations/0022_auto_20170820_0036.py
1
1202
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-20 00:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('core', '0021_channel_image'), ] operatio...
gpl-3.0
819,544,230,349,932,200
32.388889
132
0.587354
false
4.173611
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/r-alsace/package.py
1
2082
############################################################################## # Copyright (c) 2013-2017, 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
-4,289,728,429,612,582,000
47.418605
124
0.694524
false
4.027079
false
false
false
lancms/lancms2
fabfile.py
1
5721
from fabric.api import * from fabric.colors import green, red from fabric.contrib import files import datetime import os def _environment (): env.release = datetime.datetime.now().strftime ("%Y-%m-%d-%H%M%S") env.project_name = 'lancms2' # FIXME: hardcoded path: env.path_home = '/opt/lancms2/' env.path_root = o...
gpl-2.0
-6,103,830,826,268,953,000
31.87931
127
0.68502
false
2.932342
false
false
false
garywu/pypedream
pypedream/plot/_filt.py
1
2685
import numpy has_matplotlib = True try: from matplotlib import pyplot, figure except ImportError: has_matplotlib = False from dagpype._core import filters def _make_relay_call(fn, name): def new_fn(*args, **kwargs): @filters def _dagpype_internal_fn_act(target): try: ...
bsd-3-clause
-3,559,330,889,597,093,000
16.211538
131
0.480447
false
3.262454
false
false
false
ericleasemorgan/EEBO-TCP-Workset-Browser
bin/make-index.py
1
2042
#!/usr/bin/env python # make-index.py - read EEBO TEI files and output word frequencies as well as a "book" # Eric Lease Morgan <emorgan@nd.edu> # June 8, 2015 - first investigations; bases on HathiTrust work # configure STOPWORDS = './etc/stopwords-en.txt' # require import operator import re import sys import lib...
gpl-2.0
-2,400,946,947,724,106,000
22.744186
92
0.629285
false
2.851955
false
false
false
inexactually/irisbot
utils.py
1
2817
import aiohttp import inspect import io import discord from discord.ext import commands import settings def setting(name, default): return getattr(settings, name, default) def pretty_list(names, bold=True, conjunction='and', empty=''): names = list(names) if not names: return empty if bold:...
mit
5,766,240,977,364,690,000
33.353659
102
0.599219
false
4.00142
false
false
false
censof/ansible-deployment
django_app_server_db_server/deployment/templates/common.py
1
3942
import os.path # Configuration modules. from ._installed_apps import * from ._middleware import * from ._context_processors import * from ._email import * from ._eclaim import * _ = lambda s: s # Debugging mode. DEBUG = False TEMPLATE_DEBUG = False if DEMO_MODE: SEND_NOTIF_EMAILS = False else: SEND_NOTIF_...
mit
-4,356,248,494,672,155,600
22.746988
88
0.627093
false
3.12114
false
true
false
quantumlib/Cirq
cirq-core/cirq/experiments/purity_estimation.py
1
2467
# Copyright 2020 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
758,926,273,269,246,500
38.532258
79
0.707874
false
3.909091
false
false
false
ActiveState/code
recipes/Python/578414_Takuzu_solver/recipe-578414.py
1
4263
# Copyright 2013 Eviatar Bach, eviatarbach@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
-8,761,855,008,896,713,000
31.792308
78
0.553366
false
3.249238
false
false
false
vbraun/oxford-strings
app/calendar_view.py
1
6003
# -*- coding: utf-8 -*- """ Calendaring Page Views """ import sys import os import uuid import logging from datetime import date, datetime, timedelta from webapp2 import uri_for from google.appengine.api import users import app.config as config from app.base_view import RequestHandler from app.decorators import cach...
gpl-2.0
2,358,411,222,917,641,000
28.717822
86
0.596702
false
3.691882
false
false
false
gajim/python-nbxmpp
nbxmpp/modules/rsm.py
1
1846
# Copyright (C) 2020 Philipp Hörist <philipp AT hoerist.com> # # This file is part of nbxmpp. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 3 # of the License, or (at your opt...
gpl-3.0
1,084,813,893,102,950,700
29.245902
70
0.635772
false
4.164786
false
false
false
Zouyiran/ryu
ryu/services/protocols/bgp/utils/internable.py
1
3260
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
151,006,402,060,610,500
30.650485
74
0.643865
false
4.163474
false
false
false
ParashRahman/Database-Project
Part1/record_violation.py
1
15513
from application import Application from error_checker import ErrorChecker from errors import InvalidDateException import add_person class RecordViolation(Application): def start_application(self, c): self.cursor = c self.list_of_inputs = [ None for i in range(8) ] self.get_violation_no(0...
apache-2.0
8,663,207,515,949,221,000
37.20936
116
0.460517
false
4.513529
false
false
false
fifengine/fifengine-demos
pychan_demo/colortester.py
1
7852
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
lgpl-2.1
3,314,907,281,187,378,700
41.673913
74
0.717142
false
3.220673
false
false
false
ceos-seo/data_cube_utilities
data_cube_utilities/trend.py
1
2098
from functools import partial from itertools import islice, product import numpy as np import xarray as xr def __where_not_nan(arr: np.ndarray): """Finds position of not nan values in an nd-array Args: arr (numpy.ndarray): nd-array with nan values Returns: data (xr.DataArray):...
apache-2.0
7,278,287,998,188,780,000
28.56338
118
0.621544
false
3.674256
false
false
false
pony-revolution/helpothers
helpothers/views.py
1
1239
from django.contrib.auth import get_user_model from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from django.views.generic.edit import UpdateView from .views_mixins import HelpOthersMetaDataMixin from listings.models import GatheringCenter, Resource class HomeView(...
apache-2.0
-828,806,971,788,788,700
34.4
85
0.727199
false
3.812308
false
false
false
scattering/ipeek
server/pull_push_expman.py
1
6015
import glob import os import sys sys.path.append('/var/www/') sys.path.append('/home/bbm/') import paramiko import urllib2, ftplib import time import StringIO import json DEBUG = False RETRIEVE_METHOD = "ssh" # or "ftp" or "urllib" MAX_FTP_RETRIES = 5 HOST_PORT = 22 DEFAULT_PATH = "/usr/local/nice/server_data/experime...
unlicense
4,076,488,242,616,512,000
33.371429
92
0.635411
false
3.317705
false
false
false
jrichte43/ProjectEuler
Problem-0121/solutions.py
1
1722
__problem_title__ = "Disc game prize fund" __problem_url___ = "https://projecteuler.net/problem=121" __problem_description__ = "A bag contains one red disc and one blue disc. In a game of chance a " \ "player takes a disc at random and its colour is noted. After each " \ ...
gpl-3.0
5,942,483,616,002,205,000
45.432432
100
0.5617
false
4.338384
false
false
false
gurneyalex/odoo
addons/mass_mailing/models/mailing_contact.py
5
5454
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression class MassMailingContactListRel(models.Model): """ Intermediate model between mass mailing list and mass mailing contact Indicates if a c...
agpl-3.0
5,388,405,574,171,539,000
44.831933
160
0.632013
false
3.915291
false
false
false
dannywxh/mypy
spider/avso.py
1
5739
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, re, time, sys from bs4 import BeautifulSoup import common import requests reload(sys) #print sys.getdefaultencoding() sys.setdefaultencoding('utf-8') print sys.getdefaultencoding() def download_html(url): headers = {'Accept': 'text/html,application/...
apache-2.0
8,082,208,100,537,435,000
24.361607
112
0.492871
false
3.528571
false
false
false
psychopy/psychopy
psychopy/experiment/py2js.py
1
7669
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Converting code parameters and components from python (PsychoPy) to JS (ES6/PsychoJS) "...
gpl-3.0
7,784,150,697,449,166,000
36.778325
129
0.61716
false
4.154388
false
false
false
exp-publishing/cloudbot-plugins
plugins/gaming.py
1
4430
""" gaming.py Dice, coins, and random generation for gaming. Modified By: - Luke Rogers <https://github.com/lukeroge> - Josh Elsasser <https://github.com/jaelsasser> License: GPL v3 """ import asyncio import random import re from cloudbot import hook whitespace_re = re.compile(r'\s+') valid_diceroll ...
gpl-3.0
6,135,678,696,273,625,000
28.932432
104
0.499774
false
3.485445
false
false
false
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_outline04.py
1
2728
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
gpl-3.0
-6,489,329,900,518,712,000
31.47619
101
0.522727
false
3.783634
true
false
false
prasunroypr/digit-recognizer
source/defs.py
1
6607
################################################################################ """ Functions for Digit Recognition Created on Wed Jun 01 00:00:00 2016 @author: Prasun Roy @e-mail: prasunroy.pr@gmail.com """ ################################################################################ # import modules import ma...
gpl-3.0
-7,425,339,864,518,901,000
29.16895
80
0.49493
false
4.050889
true
false
false