repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
endlos99/xdt99
test/dg-checkimg.py
1
3903
#!/usr/bin/env python import os import random from config import Dirs, Files from utils import xdg, xga, error, check_files_eq, count_bytes, check_bytes # Main test def runtest(): """check cross-generated output against native reference files""" # run disassembler for srcfile, dopts, aopts in [ ...
gpl-2.0
8,020,362,520,169,591,000
41.423913
113
0.500641
false
adfinis-sygroup/timed-backend
timed/projects/views.py
1
2618
"""Viewsets for the projects app.""" from rest_framework.viewsets import ModelViewSet, ReadOnlyModelViewSet from rest_framework_json_api.views import PreloadIncludesMixin from timed.permissions import IsAuthenticated, IsReadOnly, IsReviewer, IsSuperUser from timed.projects import filters, models, serializers class ...
agpl-3.0
3,538,262,605,159,621,600
29.8
82
0.694041
false
GeoCat/QGIS
python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
1
16947
# -*- coding: utf-8 -*- """ *************************************************************************** FieldsMappingWidget.py --------------------- Date : October 2014 Copyright : (C) 2014 by Arnaud Morvan Email : arnaud dot morvan at camptocamp dot com **...
gpl-2.0
8,780,736,930,080,279,000
32.164384
93
0.586593
false
tribut/vdirsyncer
vdirsyncer/storage/memory.py
1
2008
# -*- coding: utf-8 -*- import random import vdirsyncer.exceptions as exceptions from vdirsyncer.storage.base import Storage def _random_string(): return '{:.9f}'.format(random.random()) class MemoryStorage(Storage): ''' Saves data in RAM, only useful for testing. ''' def __init__(self, file...
mit
-8,198,893,486,883,892,000
26.888889
72
0.583167
false
alandmoore/qtscrot
qtscrot.py
1
5340
""" QTScrot is a gui for the scrot screenshot utility. Written by Alan D Moore, c 2014. Written by Alan D Moore, c 2014. Released under the GPL v. 3.0 Requires scrot and QT5. """ from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from collections import namedtuple from functools impor...
gpl-3.0
7,572,024,369,834,528,000
36.342657
141
0.62191
false
citrix-openstack-build/cinder
cinder/volume/drivers/solidfire.py
1
18015
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 with the License. You may obtain # a copy of the License at # # http://www.apach...
apache-2.0
5,604,339,479,747,918,000
35.840491
78
0.56181
false
tonnrueter/pymca_devel
PyMca/Object3D/Object3DRedBookFont.py
1
9580
import Object3DQt as qt import SceneGLWidget import OpenGL.GL as GL import numpy rasters = numpy.array([ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,...
gpl-2.0
4,970,306,696,342,846,000
57.060606
101
0.639248
false
HewlettPackard/oneview-ansible
library/module_utils/oneview.py
1
60678
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2021) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
-624,029,130,914,641,500
41.670886
139
0.632783
false
amueller/advanced_training
plots/plot_interactive_tree.py
1
2695
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_blobs from sklearn.tree import DecisionTreeClassifier from sklearn.externals.six import StringIO # doctest: +SKIP from sklearn.tree import export_graphviz from scipy.misc import imread from scipy import ndimage import os import re ...
bsd-2-clause
2,661,079,370,298,128,400
32.271605
84
0.586642
false
pavanky/arrayfire-python
arrayfire/tests/simple/array_test.py
1
2068
#!/usr/bin/python ####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ####################################...
bsd-3-clause
-1,466,352,537,016,812,500
30.815385
82
0.571567
false
andrewiggins/Textbook-Price-Aggregator
src/server/search.py
1
2644
#!/usr/bin/env python #------------------------------------------------------------------------------- # Name: search.py # Purpose: Contains all Request Handlers relating to generic search # functions # # Author: Andre Wiggins # # Created: 04/07/2011 # Copyright: (c) Jacob Marsh, And...
apache-2.0
-3,334,603,341,803,677,000
36.785714
98
0.58472
false
waveform80/compoundfiles
compoundfiles/mmap.py
1
7498
#!/usr/bin/env python # vim: set et sw=4 sts=4 fileencoding=utf-8: # # A library for reading Microsoft's OLE Compound Document format # Copyright (c) 2014 Dave Jones <dave@waveform.org.uk> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
mit
2,056,833,574,935,714,600
33.081818
79
0.537743
false
fmichea/bracoujl
bracoujl/processor/gb_z80.py
1
9775
# gb_z80.py - GameBoy z80 Disassembler + configuration. import struct import re from functools import partial as P class GBZ80Disassembler: def __init__(self): def _disassemble_cb(op): return self._cb_ops[op // 8] + self._cb_regs[op % 8] def r(reg): return '%{reg}'.format(reg=reg) ...
bsd-3-clause
271,786,114,187,145,340
36.596154
91
0.467519
false
indautgrp/erpnext
erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
1
3777
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ from frappe.utils import flt def execute(filters=None): if not filters: filters = {} columns = get_colu...
gpl-3.0
-7,740,807,535,441,435,000
33.972222
139
0.664813
false
dekked/dynamodb-mock
ddbmock/database/item.py
1
9060
# -*- coding: utf-8 -*- from ddbmock.errors import ConditionalCheckFailedException, ValidationException from ddbmock import config from decimal import Decimal from math import ceil from . import comparison def _decode_field(field): return field.items()[0] class ItemSize(int): def __add__(self, value): ...
lgpl-3.0
-7,427,540,030,551,715,000
37.88412
176
0.579249
false
perfectsearch/sandman
code/sadm/repoinfo.py
1
4090
#!/usr/bin/env python # -*- coding: utf-8 -* from __future__ import print_function import os import sys try: from standardoptions import set_up_logging, add_standard_arguments except: sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'buildscripts')) from standardoptions im...
mit
-8,831,123,763,097,423,000
30.204724
103
0.62934
false
yashdsaraf/scancode-toolkit
src/cluecode/finder.py
1
15886
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
apache-2.0
-7,716,903,587,129,529,000
29.201521
85
0.600403
false
rsheftel/pandas_market_calendars
tests/test_bse_calendar.py
1
1192
import datetime import pandas as pd import pytz from pandas_market_calendars.exchange_calendar_bse import BSEExchangeCalendar, BSEClosedDay def test_time_zone(): assert BSEExchangeCalendar().tz == pytz.timezone('Asia/Calcutta') assert BSEExchangeCalendar().name == 'BSE' def test_holidays(): bse_calend...
mit
-823,092,407,218,533,600
29.564103
98
0.703859
false
dipanjanS/text-analytics-with-python
Old-First-Edition/Ch04_Text_Classification/classifier_evaluation_demo.py
1
3277
# -*- coding: utf-8 -*- """ Created on Fri Sep 02 12:36:55 2016 @author: DIP """ from sklearn import metrics import numpy as np import pandas as pd from collections import Counter actual_labels = ['spam', 'ham', 'spam', 'spam', 'spam', 'ham', 'ham', 'spam', 'ham', 'spam', 'spam', 'ham',...
apache-2.0
-7,227,046,085,735,694,000
36.25
91
0.46567
false
awesto/django-shop
shop/forms/auth.py
1
7249
from django.conf import settings from django.contrib.auth import get_user_model, authenticate, login, password_validation from django.contrib.auth.forms import PasswordResetForm from django.contrib.sites.shortcuts import get_current_site from django.core.mail import EmailMultiAlternatives from django.core.exceptions im...
bsd-3-clause
-4,549,912,536,911,705,000
42.668675
113
0.653883
false
webbers/dongle.net
bld/libs/builder/src/steps/copyfilesstep.py
1
1151
import os import shutil from steps.abstractstep import * def copyfile(filename1, filename2): if not os.path.exists(os.path.dirname(filename2)): os.makedirs(os.path.dirname(filename2)) shutil.copy( filename1, os.path.dirname(filename2) ) if os.path.isfile (filename2): return True return False ...
mit
7,843,665,492,706,745,000
30.135135
87
0.596003
false
lmazuel/azure-sdk-for-python
azure-mgmt-web/azure/mgmt/web/models/auto_heal_triggers.py
1
1747
# 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
-7,658,815,519,248,362,000
42.675
103
0.63194
false
Lapeth/timeline
Timeline/data/migrations/0002_auto_20150823_0913.py
1
1872
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def lang(apps, schema_editor): Language = apps.get_model("Timeline_data", "Language") en = Language() en.id = 1 en.code = 'en' en.indexing = 1 en.name = "English" en.save() da = Lan...
apache-2.0
-8,127,956,987,461,323,000
27.8
114
0.532585
false
vlegoff/tsunami
src/secondaires/navigation/cherchables/__init__.py
1
1694
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
1,609,541,058,728,453,000
43.578947
79
0.775679
false
amaurywalbert/twitter
net_structure/ks_test/ks_test_models.py
1
5706
# -*- coding: latin1 -*- ################################################################################################ # # import snap, datetime, sys, time, json, os, os.path, shutil, time, struct, random reload(sys) sys.setdefaultencoding('utf-8') #################################################################...
gpl-3.0
-8,505,254,690,200,277,000
45.532787
172
0.350423
false
endlisnis/weather-records
winterAverages.py
1
4494
#!/usr/bin/python3 import time, posix, daily, gnuplot, linear, sys, datetime from dailyFilters import * from monthName import monthName START_MONTH=7 START_DAY=1 END_MONTH=7 END_DAY=1 def START_DATE(year): return datetime.date(year,START_MONTH,START_DAY) def END_DATE(year): return datetime.date(year+1,END_MO...
gpl-3.0
8,903,026,221,375,308,000
29.780822
87
0.568981
false
krislig/rumblepad2py
pad.py
1
1240
import usb.core import usb.util from time import sleep dev = usb.core.find(idVendor=0x046d, idProduct=0xc218) if dev is None: raise ValueError('Device not found') interface = 0 endpoint = dev[0][(0,0)][0] if dev.is_kernel_driver_active(interface) is True: dev.detach_kernel_driver(interface) usb.util.claim_inter...
mit
2,519,202,103,770,096,600
23.313725
71
0.698387
false
Sixshaman/networkx
networkx/algorithms/shortest_paths/tests/test_weighted.py
1
16774
from __future__ import division from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_raises from nose.tools import raises import networkx as nx def _setUp(self): cnlti = nx.convert_node_labels_to_integers self.grid = cnlti(nx.grid_2d_graph(4, 4), first_label=...
bsd-3-clause
-4,696,423,949,973,894,000
42.455959
86
0.474842
false
RonnyPfannschmidt/setuptools_scm
testing/test_integration.py
1
2328
import sys import pytest from setuptools_scm.utils import do from setuptools_scm import PRETEND_KEY, PRETEND_KEY_NAMED @pytest.fixture def wd(wd): wd("git init") wd("git config user.email test@example.com") wd('git config user.name "a test"') wd.add_command = "git add ." wd.commit_command = "git...
mit
-78,044,208,471,752,530
32.257143
80
0.659364
false
pferreir/indico-backup
indico/core/logger.py
1
10500
# -*- 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
-3,335,148,615,844,740,600
34.958904
110
0.57381
false
jolyonb/edx-platform
lms/djangoapps/badges/backends/badgr.py
1
6775
""" Badge Awarding backend for Badgr-Server. """ from __future__ import absolute_import import hashlib import logging import mimetypes import requests import six from django.conf import settings from django.core.exceptions import ImproperlyConfigured from eventtracking import tracker from lazy import lazy from reques...
agpl-3.0
3,786,731,688,811,023,400
35.820652
115
0.600886
false
wacax/AvazuCTR
csv_to_vw.py
1
3065
#!/usr/bin/python # -*- coding: UTF-8 -*- ######################################################## # __Author__: Xueer Chen <snowwing922@gmail.com> # # Kaggle competition "Display Advertising Challenge": # # https://www.kaggle.com/c/avazu-ctr-prediction # # Credit: Triskelion <info@mlwave.com> ...
gpl-2.0
-1,451,433,367,091,311,400
42.785714
107
0.630995
false
JMSkelton/Transformer
Transformer/IO/_VASP.py
1
5760
# Transformer/IO/_VASP.py # ------- # Imports # ------- import warnings; from Transformer import Constants; from Transformer import Structure; from Transformer.Utilities import StructureTools; # --------- # Functions # --------- def ReadPOSCARFile(inputReader, atomicSymbolLookupTable = None): # Variables to ...
gpl-3.0
-6,654,405,562,310,765,000
30.304348
169
0.660764
false
Jeff1995/oj
judge/ojroot.py
1
1215
#!/usr/bin/env python import ConfigParser import socket import os import json def main(): cf = ConfigParser.ConfigParser() cf.read("conf/oj.conf") judge_host = cf.get('sandbox', 'judgeHost') userid = int(cf.get('sandbox', 'userid')) server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ...
apache-2.0
2,691,872,429,397,832,000
32.75
138
0.622222
false
FiratGundogdu/dagitik
odeve05/message_server.py
1
8494
__author__ = 'firatlepirate' import socket import threading import Queue import time import errno class WriteThread (threading.Thread): def __init__(self, name, cSocket, address,fihrist,threadQueue, logQueue ): threading.Thread.__init__(self) self.name = name self.cSocket = cSocket ...
gpl-2.0
-7,592,662,664,281,051,000
32.050584
122
0.494467
false
nlhepler/freetype-py3
examples/glyph-vector-2.py
1
3414
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------------------...
bsd-3-clause
3,459,714,015,790,568,400
32.80198
90
0.52812
false
victorvde/dota2_nohats
binary.py
1
9922
# Copyright (c) Victor van den Elzen # Released under the Expat license, see LICENSE file for details from struct import pack, unpack, calcsize from collections import OrderedDict def getbytes(s, n): b = s.read(n) assert len(b) == n, "Unexpected EOF" return b def getbyte(s): return getbytes(s, 1) cl...
mit
739,687,719,123,784,300
23.559406
72
0.551199
false
siliconsmiley/QGIS
python/plugins/GdalTools/tools/doPctRgb.py
1
6670
# -*- coding: utf-8 -*- """ *************************************************************************** doPctRgb.py --------------------- Date : June 2010 Copyright : (C) 2010 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com *******************...
gpl-2.0
2,120,766,154,415,502,600
39.920245
172
0.647526
false
widowild/messcripts
exercice/python3/solutions_exercices/exercice_10_33.py
1
1110
#! /usr/bin/env python # -*- coding:Utf8 -*- ## Cette variante utilise une liste de listes ## ## (que l'on pourrait aisément remplacer par deux listes distinctes) # La liste ci-dessous contient deux éléments qui sont eux-mêmes des listes. # l'élément 0 contient les nombres de jours de chaque mois, tandis que # l'élém...
gpl-3.0
3,744,835,426,236,196,400
40.807692
77
0.586937
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/internet/tcp.py
1
31318
# -*- test-case-name: twisted.test.test_tcp -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Various asynchronous TCP/IP classes. End users shouldn't use this module directly - use the reactor APIs instead. Maintainer: U{Itamar Shtull-Trauring<mailto:twisted@itamarst.org>} "...
bsd-3-clause
375,367,185,941,382,200
34.268018
175
0.598729
false
jonmaur/draggin-framework
tools/scons_zip.py
1
1497
import os import os.path import glob import shutil import datetime from fnmatch import fnmatch PROJECT_NAME = "draggin" if 'PROJECT_NAME' in ARGUMENTS: PROJECT_NAME = ARGUMENTS["PROJECT_NAME"] env = Environment(tools = []) #the full path to this SConscript file this_sconscript_file = (lambda x:x).func_code.co_filen...
mit
7,152,029,935,408,573,000
24.372881
102
0.654643
false
MorellatoAriel/PyGobstones
interpreter/vgbs/__init__.py
1
2114
from ..interpreterWorker import * from common.tools import tools from lang.gbs_board import Board import common.utils import common.i18n as i18n import lang import logging class GUIGobstonesApi(lang.GobstonesApi): def __init__(self, communicator): self.comm = communicator def read(self): self.c...
gpl-3.0
6,555,255,423,196,050,000
40.470588
109
0.614475
false
ST-Data-Mining/crater
wei/tdivwhere2.py
1
11047
from __future__ import division import sys from table import * from where2 import * from dtree import * def csv2py(f): sym2num = {} # hold all the characters with assinged numbers that never seen def str2num(t, p=0): for r,row in enumerate(t._rows): for c, cell in enumerate(row.cells): if isinsta...
mit
-916,340,450,791,656,300
31.30117
133
0.611659
false
jberci/resolwe
resolwe/flow/managers/workload_connectors/slurm.py
1
2517
""".. Ignore pydocstyle D400. =============== Slurm Connector =============== """ import logging import os import shlex import subprocess from django.conf import settings from resolwe.utils import BraceMessage as __ from .base import BaseConnector logger = logging.getLogger(__name__) # pylint: disable=invalid-na...
apache-2.0
1,765,178,422,453,275,600
33.479452
103
0.581645
false
nephila/djangocms-page-meta
tests/test_toolbar.py
1
6609
from cms.toolbar.items import Menu, ModalItem, SubMenu from cms.utils.i18n import get_language_object from django.contrib.auth.models import Permission, User from django.test.utils import override_settings from django.urls import reverse from django.utils.encoding import force_text from djangocms_page_meta.cms_toolbar...
bsd-3-clause
-7,438,808,034,730,485,000
40.566038
119
0.590256
false
dpgaspar/Flask-AppBuilder
flask_appbuilder/filemanager.py
1
8533
import logging import os import os.path as op import re import uuid from flask.globals import _request_ctx_stack from werkzeug.datastructures import FileStorage from werkzeug.utils import secure_filename from wtforms import ValidationError try: from flask import _app_ctx_stack except ImportError: _app_ctx_sta...
bsd-3-clause
-2,775,965,913,715,415,000
30.029091
84
0.597445
false
stmobo/Machine-Learning
OpenAI-Gym/agents/dqn.py
1
2613
import tensorflow as tf import numpy as np from agents import mixed_network, spaces tensorType = tf.float32 class DeepQNetwork: def __init__(self, graph, session, state_in, netGen, \ target_mix_factor=0.001, gradient_clipping=None,\ discount_factor=0.99, learning_rate=0.001, prefix...
mit
-1,506,260,545,065,428,500
37.426471
134
0.603521
false
rsalmaso/django-cms
cms/admin/forms.py
1
49721
from django import forms from django.apps import apps from django.contrib.auth import get_user_model, get_permission_codename from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.exceptions import Valid...
bsd-3-clause
-7,345,646,420,611,951,000
35.397511
126
0.582373
false
mzdaniel/django-selenium-test-runner
dstest/test_runner.py
1
13197
"""Django Selenium test runner. Incorporate functional testing into Django's manage.py test subcommand using Selenium web testing tools.""" __author__ = 'Daniel Mizyrycki' __copyright__ = 'Copyright 2009, Daniel Mizyrycki' __license__ = 'BSD' __version__ = '0.1.0' __maintainer__ = __author__ __email__...
bsd-3-clause
8,599,218,500,867,330,000
38.75
80
0.626582
false
idegtiarov/ceilometer
ceilometer/network/floatingip.py
1
2715
# Copyright 2016 Sungard Availability Services # Copyright 2016 Red Hat # Copyright 2012 eNovance <licensing@enovance.com> # Copyright 2013 IBM Corp # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtai...
apache-2.0
4,804,211,110,120,645,000
32.9375
75
0.622468
false
miyucy/oppia
core/domain/stats_domain.py
1
4522
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-6,014,838,141,142,006,000
35.467742
79
0.654135
false
avanzosc/avanzosc6.1
avanzosc_tire_management/wizard/wizard_scratch.py
1
11421
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011-2012 Daniel (Avanzosc) <http://www.avanzosc.com> # 28/03/2012 # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
-8,667,324,019,660,210,000
41.136531
156
0.463917
false
qsnake/py2js
py2js/decorator.py
1
2070
from py2js import convert_py2js import inspect class JavaScript(object): """ Decorator that you can use to convert methods to JavaScript. For example this code:: @JavaScript class TestClass(object): def __init__(self): alert('TestClass created') ...
mit
-6,334,131,527,294,003,000
24.243902
74
0.513043
false
pizzapanther/Church-Source
churchsource/configuration/migrations/0003_face_search.py
1
1152
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from churchsource.configuration.models import Setting class Migration(DataMigration): def forwards(self, orm): s = Setting(skey='FACE_SEARCH_ENABLE', name='When True, enables check-in...
gpl-3.0
844,289,280,137,038,200
37.4
130
0.591146
false
ECP-CANDLE/Benchmarks
Pilot2/P2B1/pilot2_datasets.py
1
1104
data_sets = { '3k_Disordered' : ('3k_run10_10us.35fs-DPPC.10-DOPC.70-CHOL.20.dir', 'ece75b704ec63ac9c39afd74b63497dc'), '3k_Ordered' : ('3k_run32_10us.35fs-DPPC.50-DOPC.10-CHOL.40.dir', '211e1bcf46a3f19a978e4af63f067ce0'), '3k_Ordered_and_gel' : ('3k_run43_10us.35fs-DPPC.70-DOPC.10-CHOL.20.dir', '87032ff78e4d0173...
mit
3,668,649,857,986,627,600
45
112
0.653986
false
polyaxon/polyaxon
core/polyaxon/deploy/schemas/auth.py
1
1238
#!/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
7,205,230,924,192,353,000
30.74359
74
0.727787
false
iarna/joe-editor
tests/joefx/rcfile.py
1
13393
import os from .exceptions import * GLOBAL_OPTS = set([ 'help_is_utf8', 'mid', 'marking', 'asis', 'force', 'nolocks', 'nomodcheck', 'nocurdir', 'nobackups', 'nodeadjoe', 'break_hardlinks', 'break_links', 'lightoff', 'exask', 'beep', 'nosta', 'keepup', 'pg', 'undo_keep', 'csmode', 'backpath', 'floatmouse',...
gpl-2.0
3,460,974,747,108,257,300
31.987685
103
0.519749
false
mihaip/streamspigot
app/tweetdigest/data.py
1
8085
import calendar import datetime import itertools import os import re import time import zlib from base.constants import CONSTANTS from datasources import thumbnails, twitter, twitterappengine, twitterdisplay from datasources.oauth_keys import SERVICE_PROVIDERS TWITTER_SERVICE_PROVIDER = SERVICE_PROVIDERS['tweetdigest...
apache-2.0
-2,630,944,226,292,411,400
31.34
80
0.624861
false
bdang2012/taiga-back-casting
taiga/hooks/bitbucket/services.py
1
1732
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
4,315,237,863,237,007,000
37.444444
77
0.723121
false
alexryndin/ambari
ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py
1
5572
#!/usr/bin/python """ 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...
apache-2.0
-8,514,305,504,603,228,000
37.427586
133
0.727925
false
MasterX1582/bitcoin-becoin
qa/rpc-tests/nodehandling.py
1
3623
#!/usr/bin/env python2 # Copyright (c) 2014 The BeCoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test node handling # from test_framework.test_framework import BeCoinTestFramework from test_framework.uti...
mit
3,107,207,026,408,182,300
40.643678
136
0.602263
false
Sasanita/nmt-keras
utils/config_pkl2py.py
1
2305
import argparse import ast import sys from keras_wrapper.extra.read_write import pkl2dict def parse_args(): parser = argparse.ArgumentParser("Rebuilds a python file (like config.py) from a given config instance.") parser.add_argument("-c", "--config", required=False, help="Config pkl for loading the model con...
mit
-1,662,601,785,041,786,400
37.416667
116
0.547505
false
kernt/linuxtools
gnome3-shell/nautilus-scripts/applications/multimedia/audio/Play-In-XMMS.py
1
1810
#!/usr/bin/python # # simple script to recurse a subtree, find all the mp3 and queue them to # XMMS. # # Please modify this script! My python is rusty at best. # # Travis Hume -- travis@usermail.com # Thu Oct 24 11:06:54 2002 # # Barak Korren - ifireball@yahoo.com # Sat Apr 03 2004 # Some bugfixes, now preserves alp...
gpl-3.0
-3,455,724,984,299,591,000
26.014925
73
0.576796
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4/Lib/warnings.py
1
8772
"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import sys, types import linecache __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", "resetwarnings"] # filters conta...
mit
-8,630,744,983,485,260,000
33.4
79
0.604423
false
jepler/linuxcnc-mirror
configs/by_machine/plasmac/plasmac_stats.py
2
14411
#!/usr/bin/env python ''' plasmac_stats.py Copyright (C) 2019 Phillip A Carter Inspired by and some parts copied from the work of John (islander261 on the LinuxCNC forum) 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 F...
lgpl-2.1
-3,141,769,740,846,787,000
44.749206
131
0.598779
false
whiskeysierra/paper-cut
papercut/core.py
1
2458
from __future__ import unicode_literals import os from clint.textui import colored, indent, puts from glob import glob from wand.image import Image sizes = { 'A0': (841.0, 1189.0), 'A1': (594.0, 841.0), 'A2': (420.0, 594.0), 'A3': (297.0, 420.0), 'A4': (210.0, 297.0), 'A5': (148.0, 210.0), ...
mit
-1,643,918,188,222,615,000
31.786667
90
0.454841
false
luisgg/germinate
germinate/tests/test_archive.py
1
3426
#! /usr/bin/env python """Unit tests for germinate.archive.""" # Copyright (C) 2012 Canonical Ltd. # # Germinate 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, or (at your option) any # lat...
gpl-2.0
2,343,314,905,086,168,600
38.37931
78
0.624051
false
youngjun0528/moheeto
BaekjoonOnlineJudge/acmicpc_2615.py
1
6033
#!/usr/bin/env python # -*- coding: utf-8 -*- # 오목 # https://www.acmicpc.net/problem/2615 import sys import copy if __name__ == '__main__': matrix = [] for cnt in range(19): row_data = [int(x) for x in sys.stdin.readline().strip().replace(' ','')] matrix.append(row_data) # 1이 이기는 경우 ...
apache-2.0
1,503,235,518,156,774,100
35.496933
96
0.353673
false
btgoodwin/apgRasPi
server/UIs/Tornado/pi_server.py
1
9178
#!/usr/bin/env python import os import sys import time import pdb import json import socket import argparse import tornado.web import tornado.websocket import tornado.httpserver import tornado.ioloop from threading import Timer from heapq import merge from ossie.utils import redhawk from ossie.utils.redhawk.channels...
lgpl-3.0
3,179,455,331,251,596,300
38.390558
119
0.569296
false
fugitifduck/exabgp
lib/exabgp/bgp/message/update/attribute/community/community.py
1
2080
# encoding: utf-8 """ community.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from struct import pack from struct import unpack # ==================================================================== Community # class Community (object): NO_EXPORT ...
bsd-3-clause
-291,284,668,875,226,200
24.679012
90
0.659615
false
UNICT-DMI/Telegram-DMI-Bot
module/commands/lezioni.py
1
10829
# -*- coding: utf-8 -*- """/lezioni command""" import logging import re from typing import Tuple from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update from telegram.ext import CallbackContext from module.data import Lesson from module.shared import check_log, send_message logging.basicConfig(format='...
gpl-3.0
4,424,277,043,675,171,300
45.021277
154
0.678225
false
tensorflow/probability
tensorflow_probability/python/experimental/mcmc/sample_fold_test.py
1
18337
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
5,906,248,424,636,624,000
37.202083
82
0.670557
false
JesseBuesking/clocked
clocked/decorators.py
1
3351
""" Decorator support for clocked. """ import inspect import new from clocked.profiler_provider import ProfilerProvider def _create_function_wrapper(obj, name): def wrapper(*args, **kwargs): profiler = ProfilerProvider.get_current_profiler() if profiler is None: return obj(*args, **k...
mit
8,303,731,516,610,316,000
32.51
80
0.509997
false
Molecular-Image-Recognition/Molecular-Image-Recognition
code/rmgpy/thermo/thermodataTest.py
2
11660
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2017 Prof. William H. Green (whgreen@mit.edu), # Prof. Richard H. West (r.west@neu.edu) and the RMG Team (rmg_dev@mit.edu) # # ...
mit
-7,168,585,736,887,390,000
45.454183
150
0.64434
false
Titulacion-Sistemas/PythonTitulacion-EV
Lib/site-packages/pylint/test/functional/abstract_class_instantiated_py3.py
1
1178
"""Check that instantiating a class with `abc.ABCMeta` as metaclass fails if it defines abstract methods. """ # pylint: disable=too-few-public-methods, missing-docstring # pylint: disable=abstract-class-not-used, abstract-class-little-used # pylint: disable=abstract-method __revision__ = 0 import abc class GoodClas...
mit
8,542,265,376,761,066,000
23.541667
69
0.689304
false
sequarius/DockerCenter
client/dockerc.py
1
6400
import sys from idl.ttypes import CommandDTO from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from idl import CenterSynRPCService from Command import Command from prettytable import PrettyTable sys.path.append("./idl") d...
mit
9,125,652,749,247,856,000
33.978142
115
0.60375
false
nOkuda/activetm
activetm/labeled.py
1
3406
"""LabeledDataset for labeled datasets""" import numpy as np import ankura.pipeline def get_labels(filename): """Since labels are assumed to be normalized from 0 to 1 in computing the augmented Q matrix, this function will scale all labels to fit this range """ smallest = float('inf') largest = fl...
gpl-3.0
-1,385,774,416,320,325,000
41.575
95
0.630945
false
Fost/django-boot
config/settings.py
1
5558
""" Django settings for {{ project_name }} project. Common settings for all environments. Don't directly use this settings file, use environments/development.py or environments/production.py and import this file from there. """ import sys from path import path from django.conf import global_settings PROJECT_NAME = "B...
mit
3,567,302,115,650,525,000
30.76
88
0.685498
false
maistrovas/Internet-Store
Internet_store/home/views.py
1
1180
from django.shortcuts import render from django.conf import settings from django.core.mail import send_mail from django.shortcuts import render from Internet_store.products.models import ProductFeatured, Product def home(request): title = 'Sign up now!' featured_image = ProductFeatured.objects.filter(active=...
mit
1,821,171,190,496,549,000
30.052632
72
0.607627
false
syci/domsense-agilebg-addons
account_vat_on_payment/account.py
1
13339
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # # This progra...
gpl-2.0
-3,210,202,336,083,480,600
55.521186
290
0.54022
false
willre/homework
day02/shopping.py
1
6490
#!/usr/bin/env python # encoding: utf-8 """ @version: @author: Will @license: @contact: @site: http://www.timesnotes.com @file: shopping.py @time: 15-11-3 上午8:48 """ from collections import OrderedDict ######################################## # 预算金额 while True: tmp_yusuan = raw_input("预算金额(最小单位:元):") if...
gpl-2.0
-1,441,964,848,486,135,300
33.934524
147
0.57805
false
LEX2016WoKaGru/pyClamster
gui/region.py
1
5174
# -*- coding: utf-8 -*- """ Created on 09.06.16 Created for pyclamster-gui Copyright (C) {2016} 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
-3,441,065,994,838,054,400
37.61194
113
0.591998
false
gogetdata/ggd-cli
ggd/search.py
1
22038
# ------------------------------------------------------------------------------------------------------------- ## Import Statements # ------------------------------------------------------------------------------------------------------------- from __future__ import print_function import sys from .utils import get_b...
mit
-37,952,016,967,056,370
36.038655
181
0.493602
false
django-oscar/django-oscar-mws
oscar_mws/test/factories.py
1
4670
import factory from time import time from decimal import Decimal as D from django.utils.timezone import now from django.db.models import get_model from oscar.core.loading import get_class from oscar_mws import MWS_MARKETPLACE_US Selector = get_class('partner.strategy', 'Selector') class UserFactory(factory.Djang...
bsd-3-clause
-2,751,810,532,007,086,000
29.324675
76
0.701285
false
chop-dbhi/serrano
serrano/resources/field/dims.py
1
7254
from decimal import Decimal from django.db.models import Q, Count from django.utils.encoding import smart_unicode from restlib2.http import codes from restlib2.params import Parametizer, StrParam, BoolParam, IntParam from modeltree.tree import MODELTREE_DEFAULT_ALIAS, trees from avocado.events import usage from avocado...
bsd-2-clause
3,394,574,782,945,426,000
33.056338
78
0.546319
false
vecnet/vecnet.azure
VM_Mock.py
1
5058
from settings_local import SUBSCRIPTION_ID, STORAGE_ACCOUNT_NAME, STORAGE_ACCOUNT_KEY, EMAIL_USERNAME, EMAIL_PASSWORD __author__ = 'Natalie Sanders' __author__ = 'Natalie Sanders' from azure.servicemanagement import * from azure.storage import * from subprocess import call from os import chdir import os import socke...
mpl-2.0
-3,948,261,241,863,998,000
33.408163
128
0.574931
false
mprunell/utils
url_diff.py
1
5578
import sys import getopt import traceback import urllib2 from urlparse import urljoin, urlparse, ParseResult from BeautifulSoup import BeautifulSoup def connect(conn, url): assert conn is not None, 'Input connection must be valid' assert url, 'Input old URL cannot be empty' response = None try: ...
mit
-2,697,641,972,369,733,000
33.220859
137
0.512191
false
clawpack/clawpack-4.x
doc/sphinx/example-acoustics-1d/setplot_2.py
2
2095
""" Single figure and axes with two items ======================================= Only the pressure q[0] is plotted. In this example the line and points are plotted in different colors by specifying a second item on the same axes. """ #-------------------------- def setplot(plotdata): #--------------------------...
bsd-3-clause
131,839,920,120,688,060
32.790323
74
0.609547
false
yuanyelele/solfege
solfege/tracebackwindow.py
1
4872
# GNU Solfege - free ear training software # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2011 Tom Cato Amundsen # # 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...
gpl-3.0
-2,274,994,143,251,863,300
42.891892
185
0.609401
false
alexkorovkov/TeXPreview
LaTexPreview.py
1
4013
import sublime, sublime_plugin try: # python 3 from .functions import * from .openfunctions import * except ValueError: # python 2 from functions import * from openfunctions import * def plugin_loaded(): ENVIRON['PATH'] += str( sublime.load_settings("TeXPreview.sublime...
gpl-3.0
4,334,221,548,284,516,000
27.260563
98
0.59083
false
arxiv-vanity/arxiv-vanity
arxiv_vanity/papers/tests/test_processor.py
1
1921
from io import StringIO import unittest from ..processor import process_render class ProcessorTest(unittest.TestCase): maxDiff = None def test_basics(self): html = """ <head> <link href="style.css"> <style>body { }</style> <script>blah</script> </head> <body> <img src="fig.gif"> <img src="data:foo"> ...
apache-2.0
4,360,503,527,853,255,000
32.12069
96
0.609058
false
RedHatInsights/insights-core
insights/tests/test_context.py
1
2547
from insights.core.context import (ExecutionContextMeta, HostArchiveContext, SerializedArchiveContext, SosArchiveContext) def test_host_archive_context(): files = ["/foo/junk", "/insights_commands"] actual = HostArchiveContext.handles(files) assert actual == ("/", HostAr...
apache-2.0
-3,199,718,697,504,564,700
34.375
79
0.675697
false
kd5bjo/icing
icing.py
1
5109
#!/usr/bin/env python # icing.py # # Created by Eric Sumner on 2010-10-29. # Copyright 2010 Haleret Productions. All rights reserved. # # See the file named "COPYING" in this directory for licensing information. import sys # Syntactic sugar for common object types: # # NSNumber: @42 # NSMutableArray: ...
bsd-2-clause
-6,088,098,910,970,394,000
29.592814
76
0.574868
false
isfon/DjangoSales
DjangoSales/apps/users/migrations/0001_initial.py
1
2405
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-10 19:56 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0007_alter_validators_...
mit
-8,246,163,853,700,214,000
58.125
266
0.619958
false
yeming233/rally
rally/common/objects/__init__.py
1
1072
# Copyright 2013: Mirantis 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 b...
apache-2.0
6,664,427,053,616,751,000
45.608696
78
0.75653
false
iric-soft/km
km/tools/find_report.py
1
12904
import sys import re from .. utils import common as uc def print_line(sample, region, location, type_var, removed, added, abnormal, normal, ratio, min_cov, min_exclu, variant, target, info, var_seq, ref_seq): line = "\t".join([sample, region, location, type_var, removed, ...
mit
5,941,889,215,289,551,000
37.404762
106
0.483571
false
brendanlong/compression
compression/huffman.py
1
4277
import bitstring import collections import heapq class Node(object): def __init__(self, left, right): if left.weight is None: self.weight = None else: self.weight = left.weight + right.weight self.left = left self.right = right self.symbol = left.sym...
unlicense
-2,542,109,405,791,390,700
26.242038
77
0.582418
false
suvit/speedydeploy
speedydeploy/project/django.py
1
5549
# -*- coding: utf-8 -*- from __future__ import with_statement import os from fabric import api as fab from fabric.contrib.files import uncomment, comment from ..base import _ from ..utils import render_template, upload_template from ..deployment import command class DjangoProject(object): namespace = 'django' ...
mit
-7,802,574,031,891,586,000
28.052356
85
0.565507
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/lib/arraysetops.py
1
9143
""" Set operations for 1D numeric arrays based on sorting. Contains: ediff1d, unique1d, intersect1d, intersect1d_nu, setxor1d, setmember1d, union1d, setdiff1d All functions work best with integer numerical arrays on input (e.g. indices). For floating point arrays, innacurate results may appear due to ...
bsd-3-clause
7,430,667,529,558,364,000
26.960245
80
0.603959
false
mganeva/mantid
scripts/Interface/reduction_gui/reduction/diffraction/diffraction_reduction_script.py
1
15359
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
gpl-3.0
-2,344,812,219,454,872,600
41.545706
140
0.578488
false