repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
datastore/datastore.pylru
datastore/pylru/__init__.py
1
1507
__version__ = '0.1.1' __author__ = 'Juan Batiz-Benet' __email__ = 'juan@benet.ai' __doc__ = ''' pylru datastore implementation. Tested with: * datastore 0.3.0 * pylru 1.0.5 ''' import pylru import datastore.core class LRUCacheDatastore(datastore.Datastore): '''Represents an LRU cache datastore, backed by py...
mit
7,439,266,530,720,450,000
20.225352
78
0.599867
false
3.512821
false
false
false
mindriot101/bokeh
bokeh/core/property/color.py
3
4350
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
2,634,407,079,164,814,300
31.462687
82
0.392874
false
4.728261
false
false
false
ContributeToScience/participant-booking-app
booking/userprofile/forms.py
1
3894
from django import forms from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from allauth.account.forms import SignupForm, LoginForm from allauth.account import app_settings from userprofile.models import UserProfile from core.utils import USER_TYPE_CHOICES from core.u...
gpl-2.0
-3,017,574,315,264,272,000
36.815534
108
0.627889
false
4.090336
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/task/sets.py
1
2587
# -*- coding: utf-8 -*- """ celery.task.sets ~~~~~~~~~~~~~~~~ Old ``group`` implementation, this module should not be used anymore use :func:`celery.group` instead. """ from __future__ import absolute_import from __future__ import with_statement from celery._state import get_current_worker_task from ...
bsd-3-clause
-6,573,385,006,515,336,000
32.597403
77
0.621956
false
3.722302
false
false
false
google-research/korvapuusti
listening_test_summer_2020/analysis/data_processing/preprocess_extra_data.py
1
5705
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing,...
apache-2.0
-7,068,827,731,667,365,000
35.33758
79
0.63085
false
3.685401
false
false
false
Voilier/obole
core/urls.py
1
2003
# -*- coding: utf-8 -*- """obole URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home...
mpl-2.0
-5,145,231,204,531,826,000
32.383333
82
0.71343
false
3.743925
false
false
false
ssekulic/tikka-postagger
py/get_scores_eng.py
2
2221
#! /usr/bin/python import os, sys, re BROWN_LCURVE=( "learningcurve0008", "learningcurve0016", "learningcurve0032",\ "learningcurve0064", "learningcurve0128", "learningcurve0256", "full" ) WSJ_LCURVE=( "learningcurve0008", "learningcurve0016", "learningcurve0032", \ "learningcurve0...
lgpl-3.0
-4,207,469,603,122,749,400
30.728571
158
0.573615
false
2.949535
false
false
false
ovresko/erpnext
erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py
3
3037
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): # if not filters: filters = {} columns = get_columns() summ_data = [] data = get_bom_stock(fi...
gpl-3.0
-5,099,853,073,463,069,000
32.373626
218
0.663484
false
2.859699
false
false
false
ViDA-NYU/genotet
uploadBatch.py
1
2222
# This is a python script for uploading batch data to Genotet server. # The user may write a *.tsv file, with each line as: # file_path data_name file_type description # The command line would be: # python uploadBatch.py username example.tsv # And then enter your password for Genotet. from requests_toolbel...
apache-2.0
8,550,396,749,831,677,000
31.202899
86
0.623312
false
3.715719
false
false
false
JasonDeving/python_game
game.py
1
2342
import sys from character import Character from monster import Dragon, Goblin, Troll class Game: def setup(self): self.player = Character() self.monster = [ Goblin(), Troll(), Dragon() ] self.monster = self.get_next_monster() def get_next_monster(self): try: return ...
mit
-2,062,134,807,052,411,600
24.193548
69
0.543126
false
3.586524
false
false
false
xiandiancloud/edx-platform
common/lib/calc/calc/calc.py
61
13558
""" Parser and evaluator for FormulaResponse and NumericalResponse Uses pyparsing to parse. Main function as of now is evaluator(). """ import math import operator import numbers import numpy import scipy.constants import functions from pyparsing import ( Word, Literal, CaselessLiteral, ZeroOrMore, MatchFirst, O...
agpl-3.0
5,806,268,756,468,296,000
31.435407
102
0.607464
false
3.76402
false
false
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_express_route_ports_locations_operations.py
1
7987
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-1,426,520,225,900,759,600
45.707602
147
0.651684
false
4.527778
true
false
false
mhozza/covest
tools/experiment_table.py
1
4557
#! /usr/bin/env python import argparse from collections import defaultdict from tools import templates from tools.experiment_parser import parse_all from tools.table_generator import format_table SEPARATE_EF = True def kmer_to_read_coverage(c, k, read_length=100): if c is not None: return c * read_lengt...
gpl-3.0
365,333,557,470,087,900
31.091549
94
0.549923
false
3.605222
false
false
false
6809/dragonlib
dragonlib/api.py
1
7826
#!/usr/bin/env python # encoding:utf8 """ DragonPy - Dragon 32 emulator in Python ======================================= :created: 2014 by Jens Diemer - www.jensdiemer.de :copyleft: 2014 by the DragonLib team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more detai...
gpl-3.0
7,832,205,112,748,475,000
30.055556
100
0.629951
false
3.522052
false
false
false
leotrubach/sourceforge-allura
Allura/setup.py
1
4521
# -*- coding: utf-8 -*- try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages exec open('allura/version.py').read() PROJECT_DESCRIPTION=''' Allura is an open source implementation of a softw...
apache-2.0
-6,682,024,921,666,146,000
34.046512
77
0.628622
false
3.727123
true
false
false
gwu-libraries/vivo2notld
vivo2notld_service.py
1
9071
from flask import Flask, render_template, request, session, Response import argparse from vivo2notld.definitions import definitions, list_definitions from vivo2notld.utility import execute, execute_list formats = { "xml": "text/xml", "json": "text/json", "yaml": "text/yaml" } app = Flask(__name__) default...
mit
-3,851,115,307,438,112,000
51.439306
120
0.625179
false
4.280793
false
false
false
timstaley/drive-ami
driveami/__init__.py
1
2912
from __future__ import absolute_import import logging import os import json from colorlog import ColoredFormatter import driveami.keys as keys import driveami.scripts as scripts from driveami.reduce import (Reduce, AmiVersion) from driveami.serialization import (Datatype, make_serializable, ...
bsd-3-clause
486,487,046,025,874,240
29.652632
81
0.616758
false
3.723785
false
false
false
poppogbr/genropy
tutorial/projects/musiccd/packages/libcd/webpages/album.py
1
1253
#!/usr/bin/env python # encoding: utf-8 """ Created by Softwell on 2008-07-10. Copyright (c) 2008 Softwell. All rights reserved. """ class GnrCustomWebPage(object): maintable = 'libcd.album' py_requires = 'public:Public,standard_tables:TableHandler,public:IncludedView' ######################## STANDARD TAB...
lgpl-2.1
2,486,052,560,708,539,000
25.680851
82
0.569034
false
3.940252
false
false
false
rahulunair/nova
nova/api/openstack/compute/views/servers.py
1
34816
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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-2.0
-3,837,467,761,640,274,400
46.562842
79
0.554056
false
4.637187
false
false
false
hmpf/nav
python/nav/web/report/urls.py
2
1432
# # Copyright (C) 2012-2018 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 as published by the Free # Software Foundation. # # This program is distributed in the...
gpl-3.0
-8,578,340,943,052,494,000
34.8
77
0.679469
false
3.607053
false
false
false
Mappy/luigi
test/util_test.py
4
1453
# Copyright (c) 2012 Spotify AB # # 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, s...
apache-2.0
-7,100,238,086,051,630,000
25.418182
79
0.686167
false
3.476077
true
false
false
legoktm/pywikipedia-scripts
start_date.py
1
2610
#!/usr/bin/env python """ Copyright (C) 2013 Legoktm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
mit
4,212,860,460,665,823,000
38.545455
118
0.647126
false
3.996937
false
false
false
willb/wallaroo
clients/python-wallaroo/wallaroo/client/group.py
1
2344
# Copyright (c) 2013 Red Hat, Inc. # Author: William Benton (willb@redhat.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 r...
apache-2.0
2,279,567,860,863,919,600
34.515152
108
0.665529
false
3.893688
false
false
false
escobar022/cens_django
ob_census_project/settings.py
1
2712
""" Django settings for ob_census project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
mit
-1,832,807,004,185,533,000
25.330097
71
0.692478
false
3.415617
false
false
false
prasanna08/oppia
core/storage/feedback/gae_models.py
1
28683
# 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
907,305,869,170,521,900
35.632184
80
0.627654
false
4.288085
false
false
false
nkgilley/home-assistant
homeassistant/components/airly/air_quality.py
5
3907
"""Support for the Airly air_quality service.""" from homeassistant.components.air_quality import ( ATTR_AQI, ATTR_PM_2_5, ATTR_PM_10, AirQualityEntity, ) from homeassistant.const import CONF_NAME from .const import ( ATTR_API_ADVICE, ATTR_API_CAQI, ATTR_API_CAQI_DESCRIPTION, ATTR_API_C...
apache-2.0
-7,348,221,353,660,290,000
27.518248
86
0.633222
false
3.485281
false
false
false
udapi/udapi-python
udapi/block/ud/pt/addmwt.py
1
6120
"""Block ud.pt.AddMwt for heuristic detection of Portuguese contractions. According to the UD guidelines, contractions such as "dele" = "de ele" should be annotated using multi-word tokens. Note that this block should be used only for converting legacy conllu files. Ideally a tokenizer should have already split the M...
gpl-3.0
-9,146,337,873,444,123,000
40.324324
97
0.454872
false
3.071823
false
false
false
mehulsbhatt/modoboa
modoboa/lib/migrations/0001_initial.py
4
1213
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
isc
3,374,385,217,575,492,600
30.921053
114
0.538335
false
4.594697
false
false
false
benzkji/djangocms-misc
djangocms_misc/global_untranslated_placeholder/models.py
2
1427
# coding: utf-8 from cms.models import Placeholder # noqa - needed, circular import otherwise from cms.plugin_rendering import ContentRenderer # , RenderedPlaceholder try: # cms 3.5 or 3.7+ from cms.plugin_rendering import StructureRenderer except ImportError: StructureRenderer = None # load conf at s...
mit
-3,587,462,458,460,309,500
32.186047
90
0.751927
false
4.197059
false
false
false
schleichdi2/OPENNFR-6.3-CORE
bitbake/lib/bb/fetch2/repo.py
1
3020
""" BitBake "Fetch" repo (git) implementation """ # Copyright (C) 2009 Tom Rini <trini@embeddedalley.com> # # Based on git.py which is: # Copyright (C) 2005 Richard Purdie # # SPDX-License-Identifier: GPL-2.0-only # import os import bb from bb.fetch2 import FetchMethod from bb.fetch2 import runfetchcmd from bb...
gpl-2.0
6,874,726,667,973,711,000
33.712644
168
0.578146
false
3.185654
false
false
false
ehashman/oh-mainline
vendor/packages/PyYaml/lib/yaml/serializer.py
560
4171
__all__ = ['Serializer', 'SerializerError'] from error import YAMLError from events import * from nodes import * class SerializerError(YAMLError): pass class Serializer(object): ANCHOR_TEMPLATE = u'id%03d' def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=No...
agpl-3.0
-1,717,988,015,721,316,000
36.576577
82
0.566771
false
4.291152
false
false
false
xjw1001001/IGCexpansion
IdenticalParalogTest/GeneratePamlResults.py
1
4127
import os import subprocess from Bio import Seq, SeqIO, AlignIO from Bio.Phylo.PAML import codeml, baseml import numpy as np if __name__ == '__main__': path = '/Users/xji3/Genconv/IdenticalParalogAlignment/' pairs = [] with open('./All_Pairs.txt', 'r') as f: for line in f.readlines(): p...
gpl-3.0
5,950,376,985,468,264,000
48.130952
181
0.561182
false
3.124148
false
false
false
munhyunsu/Hobby
Fitcraft/fitness_organize/data_organize_second.py
1
1765
#!/usr/bin/env python3 import sys import os import json def main(argv): """ read all of files in directory inputed recursively. rename and copy(instead move for safety) file to specific rules. """ os.makedirs('./outputs', exist_ok = True) dir_queue = argv[1:] file_queue = get_all_files(...
gpl-3.0
31,466,746,324,951,550
23.513889
70
0.49915
false
3.747346
false
false
false
turbokongen/home-assistant
homeassistant/components/synology_dsm/camera.py
1
4928
"""Support for Synology DSM cameras.""" import logging from typing import Dict from synology_dsm.api.surveillance_station import SynoSurveillanceStation from synology_dsm.exceptions import SynologyDSMAPIErrorException from homeassistant.components.camera import SUPPORT_STREAM, Camera from homeassistant.config_entries...
apache-2.0
2,447,922,313,075,051,500
29.8
83
0.601461
false
4.026144
false
false
false
Perkville/django-tastypie
docs/code/myproject/settings.py
6
2067
""" Django settings for myproject project. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
bsd-3-clause
-3,888,527,607,295,375,400
23.317647
71
0.721335
false
3.3125
false
false
false
PersonalGenomesOrg/vcf2clinvar
vcf2clinvar/clinvar.py
1
4488
from __future__ import unicode_literals from collections import OrderedDict import json from .common import Allele, VCFLine CLNSIG_INDEX = { '0': "unknown", '1': "untested", '2': "non-pathogenic", '3': "probably non-pathogenic", '4': "probably pathogenic", '5': "pathogenic", '6': "affect...
mit
-9,173,766,841,808,944,000
35.786885
79
0.568627
false
3.487179
false
false
false
CompassionCH/compassion-switzerland
report_compassion/models/res_partner.py
3
2342
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
-7,011,012,724,866,295,000
35.030769
78
0.496157
false
3.711569
false
false
false
MaStr/UBox
src/core/python_lib/messages.py
2
1170
# PirateBox Message lib (C)2012-2014 # Matthias Strubel import string import socket import base64 import sys class message: def __init__(self, name="generate"): if name == "generate": self.name = socket.gethostname() else: self.name = name self.type = "g...
gpl-3.0
5,100,245,739,514,293,000
22.4
78
0.568376
false
3.75
false
false
false
aequologica/acigolouqea
transitiveReduction.py
1
1191
# cf. Michael Clerx answer @ http://stackoverflow.com/questions/1690953/transitive-reduction-algorithm-pseudocode def prima(m, title=None): """ Prints a matrix to the terminal """ if title: print(title) for row in m: print(', '.join([str(x) for x in row])) print ('') def path(m): "...
mit
6,401,661,161,687,506,000
23.833333
113
0.453401
false
2.962687
false
false
false
atcsecure/blocknet
blocknet-routing-protocol/pyblockrouternode/pyblocknet.py
1
27248
#!/usr/bin/python # # Originally from node.py - Bitcoin P2P network half-a-node # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Forked by atcsecure # # Blocknet's Routing Protocol node import struct import socket import...
mit
1,407,246,570,491,105,300
26.551062
186
0.527011
false
3.30439
false
false
false
kizniche/Mycodo
mycodo/scripts/restart_daemon.py
1
2603
# -*- coding: utf-8 -*- import argparse import logging import time import sys import os sys.path.append(os.path.abspath(os.path.join(__file__, "../../.."))) from mycodo.config import DAEMON_PID_FILE from mycodo.config import KEEPUP_LOG_FILE def check_daemon(print_msg=True, start_daemon=True): if os.path.exist...
gpl-3.0
4,466,207,919,963,957,000
35.661972
101
0.551671
false
4.151515
false
false
false
marinho/PyNFe
pynfe/entidades/cliente.py
1
1189
# -*- coding: utf-8 -*- from base import Entidade from pynfe.utils.flags import TIPOS_DOCUMENTO, CODIGO_BRASIL class Cliente(Entidade): # Dados do Cliente # - Nome/Razão Social (obrigatorio) razao_social = str() # - Tipo de Documento (obrigatorio) - default CNPJ - TIPOS_DOCUMENTO tipo_documento = ...
lgpl-3.0
-1,672,870,928,814,430,500
20.6
72
0.62037
false
2.605263
false
false
false
samdroid-apps/ManageBacToTheFuture
lib/__init__.py
1
4085
# ManageBacToTheFuture: ManageBac for Humans # Copyright (C) 2015 Sam Parkinson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) an...
agpl-3.0
4,964,905,154,468,792,000
28.601449
74
0.602448
false
4.064677
false
false
false
miquelo/exectask
packages/exectask/__main__.py
1
4231
#!/.../python3 # # This file is part of EXECTASK. # # EXECTASK is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # EXECTASK is distribu...
gpl-3.0
5,693,101,122,583,059,000
25.778481
70
0.684708
false
3.272235
false
false
false
dougbenjamin/panda-harvester
pandaharvester/harvestercore/pilot_errors.py
2
17567
# Error codes : Taken from pilot1. To be removed once pilot2 API is ready class PilotErrors(object): """ Pilot error handling """ # error codes ERR_UNKNOWNERROR = 0 ERR_GENERALERROR = 1008 ERR_DIRECTIOFILE = 1009 # harmless, just means that copy-to-scratch was skipped in favor or direct i/o access...
apache-2.0
-2,309,670,009,693,079,600
43.473418
190
0.667729
false
3.475173
false
false
false
filannim/ManTIME
mantime.py
1
3325
#!/usr/bin/env python # # Copyright 2014 Michele Filannino # # gnTEAM, School of Computer Science, University of Manchester. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU General Public License. # # author: Michele Filannino # email: fila...
bsd-2-clause
6,540,255,438,117,947,000
38.583333
76
0.563609
false
4.268293
false
false
false
chrox/RealTimeElectrophy
Experimenter/Experiments/script/mangrating.py
1
2018
# Demo program using ManGrating. # # Copyright (C) 2010-2011 Huang Xin # # See LICENSE.TXT that came with this file. """ USAGE: Move the mouse cursor to change the position of the grating. Scroll the mouse wheel to change the orientation. Press right arrow to increase the spatial frequency. ...
bsd-2-clause
2,272,019,656,601,708,800
30.546875
75
0.744301
false
3.244373
false
true
false
feltus/BDSS
client/client/actions/transfer_action.py
1
6074
# Big Data Smart Socket # Copyright (C) 2016 Clemson University # # 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. # # Th...
gpl-2.0
3,516,957,681,346,837,000
33.511364
103
0.611129
false
4.143247
false
false
false
wangyum/tensorflow
tensorflow/contrib/session_bundle/gc.py
47
6397
# 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
-2,593,996,059,534,440,400
29.317536
80
0.663436
false
3.670109
false
false
false
ohadshacham/phoenix
bin/queryserver.py
2
7815
#!/usr/bin/env 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 A...
apache-2.0
-2,199,263,458,977,220,900
36.753623
125
0.64517
false
3.216049
true
false
false
Fat-Zer/FreeCAD_sf_master
src/Mod/TechDraw/TDTest/DVSectionTest.py
27
1841
#!/usr/bin/env python # -*- coding: utf-8 -*- # test script for TechDraw module # creates a page, 1 view and 1 section view from __future__ import print_function import FreeCAD import Part import Measure import TechDraw import os def DVSectionTest(): path = os.path.dirname(os.path.abspath(__file__)) print ('...
lgpl-2.1
-8,766,120,630,367,836,000
29.683333
85
0.682238
false
3.421933
false
false
false
andela-kndungu/ponycheckup
ponycheckup/check/models.py
3
2407
from django.db import models from django_extensions.db.models import TimeStampedModel class Check(TimeStampedModel): url = models.URLField() no_of_recommendations = models.IntegerField(default=0) runs_debug = models.BooleanField() supports_https = models....
bsd-3-clause
-3,438,242,315,357,026,000
45.288462
106
0.619028
false
3.985099
false
false
false
intangere/NewHope_X25519_XSalsa20_Poly1305
example.py
1
2711
from nhxpoly.nhxpoly import NewHopeXSPolyBox from newhope import newhope from hashlib import sha256 """This file shows a test run of the NewHope_X25519_XSalsa20_Poly1305 key exchange protocol""" user1 = NewHopeXSPolyBox() user1.name = 'Alice' user1.genPrekeyChunk() user1.log('Prekey chunk created: %s' % repr([x...
mit
6,902,199,356,694,869,000
30.16092
107
0.772409
false
2.806418
false
false
false
scipy/scipy-svn
scipy/linalg/interface_gen.py
11
6803
#!/usr/bin/env python import os import re from distutils.dir_util import mkpath def all_subroutines(interface_in): # remove comments comment_block_exp = re.compile(r'/\*(?:\s|.)*?\*/') subroutine_exp = re.compile(r'subroutine (?:\s|.)*?end subroutine.*') function_exp = re.compile(r'function (?:\s|.)*?...
bsd-3-clause
-5,580,993,742,058,274,000
40.993827
80
0.550933
false
3.885208
false
false
false
zhoupeiling/Colibri
usernameless/urls.py
1
4083
""" Mostly a copy of (django-registration/)registration/backends/default/urls.py and registration/auth_urls.py, but using our own backends: * UsernameLessAuthenticationBackend for authentication * UsernameLessRegistrationBackend for registration """ from django.conf.urls.defaults import * from django.views.g...
gpl-3.0
8,162,398,747,961,945,000
50.0375
99
0.478815
false
5.495289
false
false
false
zookeepr/zookeepr
zk/model/rego_note.py
5
1592
import sqlalchemy as sa from meta import Base from meta import Session from lib.model import CommaList from person import Person from registration import Registration from registration_product import RegistrationProduct class RegoNote(Base): """Misc notes from the organising team on a person """ __tabl...
gpl-2.0
-7,972,538,946,433,576,000
36.904762
153
0.697864
false
3.537778
false
false
false
xiaocong/github-timeline
ghdata/fetch.py
1
8836
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import os.path import re import json import requests import shutil import gzip from tempfile import NamedTemporaryFile import StringIO from datetime import date from collections import defaultdict from .db import redis, mongodb, pipe as _pipe, format_key as _for...
mit
2,357,462,357,480,505,300
35.6639
89
0.528407
false
3.868651
false
false
false
elitak/catalyst
catalyst/arch/arm.py
1
4516
from catalyst import builder class generic_arm(builder.generic): "Abstract base class for all arm (little endian) builders" def __init__(self,myspec): builder.generic.__init__(self,myspec) self.settings["CFLAGS"]="-O2 -pipe" class generic_armeb(builder.generic): "Abstract base class for all arm (big endian) ...
gpl-2.0
-2,506,184,892,682,311,000
33.473282
79
0.704163
false
2.447696
false
false
false
openlabs/trytond-stock-lot-serial
stock.py
1
2283
# -*- coding: utf-8 -*- """ stock_lot_serial.stock Shipment :copyright: (c) 2013-2014 by Openlabs Technologies & Consulting (P) Limited :license: 3-clause BSD, see LICENSE for more details. """ from trytond.model import ModelView from trytond.pool import PoolMeta, Pool from trytond.pyson import Eval ...
bsd-3-clause
-2,645,729,696,213,979,000
27.185185
80
0.572492
false
4.219963
false
false
false
wphicks/Writing3D
pyw3d/timeline.py
1
5322
# Copyright (C) 2016 William Hicks # # This file is part of Writing3D. # # Writing3D is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
-3,449,748,591,373,062,000
37.28777
79
0.625705
false
4.22046
false
false
false
kappapolls/kappapolls
polls/views.py
1
1237
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from polls.models import Poll import re # Create your views here. def index(request): return render(request, 'polls/index.html') def top_commenters(request): """just returns contents of top_commenters.json""" with...
gpl-2.0
6,726,558,599,940,188,000
28.452381
71
0.668553
false
3.325269
false
false
false
BBN-Q/PySimulator
tests/SimSpeedTest.py
1
5046
# -*- coding: utf-8 -*- """ Created on Wed Dec 5 21:44:22 2012 @author: cryan """ import numpy as np from numpy import sin, cos from scipy.constants import pi from scipy.linalg import expm, eigh from PySim.SystemParams import SystemParams from PySim.PulseSequence import PulseSequence from PySim.Simulation import s...
apache-2.0
7,210,422,255,238,354,000
33.8
164
0.666072
false
3.211967
false
false
false
barnone/EigenD
pi/database_test.py
3
9436
#!/usr/bin/env python # # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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
387,983,136,235,194,700
38.814346
79
0.61117
false
3.261666
true
false
false
rajul/ginga
ginga/misc/plugins/Compose.py
3
11292
# # Compose.py -- Compose plugin for Ginga reference viewer # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import os from ginga.gw import Widgets from ginga.misc import Bunch from ginga import RGBImage, LayerImage from ginga import GingaPlugin import nu...
bsd-3-clause
-1,674,413,334,150,704,600
30.988669
114
0.586344
false
3.591603
false
false
false
CraigglesO/Ciphers
vigenere_plaintext_encrypt.py
1
3166
######################################################################################### #################### HOW TO USE ########################## ######################################################################################### # This takes input from the terminal so run (in th...
apache-2.0
6,300,122,498,283,316,000
41.226667
108
0.482312
false
3.778043
false
false
false
hdemeyer/king-phisher
king_phisher/server/database/models.py
1
17588
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/server/database/models.py # # 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 # n...
bsd-3-clause
8,127,772,163,786,096,000
42.107843
143
0.76194
false
3.667987
false
false
false
talbrecht/pism_pik
examples/searise-antarctica/showhydro.py
2
2221
#!/usr/bin/env python from numpy import * from matplotlib.pyplot import * from sys import exit try: from netCDF4 import Dataset as NC except: print "netCDF4 is not installed!" sys.exit(1) nameroot = "routing" for dx in ("100", "50", "25", "15", "10", "5"): basename = nameroot + dx + "km" filenam...
gpl-3.0
3,000,062,345,818,872,300
27.844156
88
0.488969
false
3.432767
false
false
false
shibinp/google_python
copyspecial/copyspecial.py
2
1679
#!/usr/bin/pythonfiles # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands def get_special_path(dirr_...
apache-2.0
3,702,862,706,209,384,400
20.805195
67
0.661703
false
2.961199
false
false
false
jonasluz/mia-cg
pyCohenSutherland/cs.py
1
6358
# -*- coding: utf-8 -*- """ UNIVERSIDADE DE FORTALEZA - UNIFOR DEPARTAMENTO DE PÓS-GRADUAÇÃO EM INFORMÁTICA APLICADA - PPGIA Disciplina: Probabilidade e Estatística Resolução de Exercícios ---- Aluno: Jonas de Araújo Luz Jr. <jonasluzjr@edu.unifor.br> """ ## BIBLIOTECAS # import numpy as np import matplotlib as mpl im...
unlicense
-2,511,778,365,239,691,300
34.223464
113
0.528712
false
2.944418
false
false
false
nordam/PyPPT
python_scripts/alpha_v/communication.py
1
17103
# script with functions to use in main-file # this script handle the "communication of particles between ranks"-part import sys # Simen Mikkelsen, 2016-11-21 # communication.py ''' def exchange(X): # Handle all the communication stuff here # return the updated particle arrays # (which may be ...
mit
3,886,690,969,642,233,300
44.986264
147
0.632813
false
3.756424
false
false
false
bpkeene/pythonPlayground
GUI_Template.py
1
16981
#******************************************************************************** # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gpl-3.0
2,376,403,117,219,915,300
42.541026
116
0.624227
false
4.275176
false
false
false
valtech-mooc/edx-platform
cms/djangoapps/contentstore/views/course.py
7
75285
""" Views related to operations on course objects """ from django.shortcuts import redirect import json import random import string # pylint: disable=deprecated-module import logging from django.utils.translation import ugettext as _ import django.utils from django.contrib.auth.decorators import login_required from dj...
agpl-3.0
-2,271,639,474,986,374,400
40.732262
142
0.633274
false
4.346207
true
false
false
sahiljain/catapult
experimental/buildbot/download.py
14
1194
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import multiprocessing import sys import time import traceback import buildbot POLL_INTERVAL = 600 BUILD_HISTORY_COUN...
bsd-3-clause
7,621,562,518,442,912,000
23.875
80
0.728643
false
3.953642
false
false
false
kapilrastogi/Impala
tests/query_test/test_aggregation.py
2
8508
# Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Validates all aggregate functions across all datatypes # import logging import pytest from tests.common.test_vector import * from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.test_dimensions import create_exec_option_dimension from te...
apache-2.0
-5,310,935,505,476,193,000
44.015873
90
0.658204
false
3.411387
true
false
false
haymeister/pico-python
examples/freqmeasure.py
3
2279
# -*- coding: utf-8 # Example by Colin O'Flynn # import math import time import inspect import numpy as np from picoscope import ps5000a from matplotlib.mlab import find class freqMeasure(): def __init__(self): self.ps = ps5000a.PS5000a(connect=False) def openScope(self): self.ps.open...
bsd-2-clause
-4,605,082,882,781,879,300
30.652778
103
0.578324
false
3.699675
false
false
false
mjoblin/netdumplings
netdumplings/dumplingeater.py
1
9914
import asyncio import json import logging import signal from typing import Callable, List, Optional import websockets from .dumpling import Dumpling from .exceptions import InvalidDumpling from ._shared import ND_CLOSE_MSGS, HUB_HOST, HUB_OUT_PORT class DumplingEater: """ Base helper class for Python-based ...
mit
-3,905,771,031,394,722,000
35.718519
79
0.565463
false
4.278809
false
false
false
maas/maas
src/maasserver/tests/test_commands_configauth.py
1
17093
# Copyright 2018 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test the configauth command.""" from contextlib import contextmanager from datetime import datetime, timedelta import json import tempfile import unittest from django.contrib....
agpl-3.0
6,869,180,678,300,343,000
36.239651
79
0.560463
false
3.924914
true
false
false
hackatbrown/2015.hackatbrown.org
hack-at-brown-2015/mentor.py
1
8875
import webapp2 from template import template from google.appengine.ext import ndb from google.appengine.api import datastore_errors import models from registration import Hacker import logging import json from google.appengine.api import users import datetime maxRating = 5 minRating = 0 def ratingValidator(prop, valu...
mit
6,380,494,734,375,262,000
32.745247
127
0.716394
false
3.128305
false
false
false
laurybueno/MoniBus
mapa/settings.py
1
3940
""" Django settings for mapa project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os #...
agpl-3.0
8,972,003,198,826,264,000
25.802721
91
0.678426
false
3.527305
false
false
false
erjac77/ansible-module-f5bigip
library/f5bigip_ltm_profile_mssql.py
2
4968
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016-2018, Eric Jacob <erjac77@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/LICENS...
apache-2.0
2,509,418,083,242,508,000
33.5
120
0.65942
false
3.746606
false
false
false
prisis/sublime-text-packages
Packages/Anaconda/anaconda_lib/decorators.py
5
3180
# -*- coding: utf8 -*- # Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details """ Anaconda decorators """ import os import sys import time import pstats import logging import functools try: import cProfile CPROFILE_AVAILABLE = True exce...
mit
-6,221,040,314,991,987,000
25.722689
78
0.568868
false
4.31479
false
false
false
vladsaveliev/TargQC
targqc/qualimap/report_parser.py
1
6065
from targqc.utilz.logger import warn metric_names = [ 'Reference size', 'Regions size/percentage of reference (on target)', 'Regions size/percentage of reference (on target) %', 'Coverage Mean', 'Coverage Mean (on target)', 'Coverage Standard Deviation', 'Coverage Standard Deviation (on tar...
gpl-3.0
-6,310,326,805,800,163,000
35.981707
157
0.484419
false
4.241259
false
false
false
NSLS-II-XPD/ipython_ophyd
profile_collection/simulators/10-motors-dets-sim.py
1
3925
# the ttwotheta motor and detector # test xpd sim of motor movement import numpy as np from ophyd.sim import SynSignal, motor1, motor2 from lmfit import Model, Parameter, Parameters from lmfit.models import VoigtModel, LinearModel from lmfit.lineshapes import voigt class SynGaussPeaks(SynSignal): """ Evaluat...
bsd-2-clause
3,955,795,154,368,246,300
32.836207
91
0.604331
false
3.526505
false
false
false
Lorquas/subscription-manager
src/rhsmlib/facts/cleanup.py
2
2920
from __future__ import print_function, division, absolute_import # Copyright (c) 2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNES...
gpl-2.0
-7,391,271,463,684,545,000
38.459459
90
0.664384
false
3.587224
false
false
false
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_recognize_identity_documents.py
1
3765
# 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. # --------------------------------------------------------------------...
mit
8,544,715,683,666,290,000
44.914634
121
0.609296
false
4.230337
false
false
false
ministryofjustice/cla_backend
cla_backend/apps/checker/tests/api/test_case_api.py
1
10480
import datetime import uuid import mock from django.utils import timezone from django.core import mail from rest_framework import status from rest_framework.test import APITestCase from cla_common.constants import CASE_SOURCE from cla_eventlog.models import Log from checker.serializers import CaseSerializer from core...
mit
-4,556,641,038,829,528,600
36.971014
115
0.600286
false
3.990861
true
false
false
bm424/diffraction-toybox
tests/test_tools.py
1
1298
from unittest import TestCase import numpy as np from toybox.tools import * class TestCheckPoint(TestCase): def test_valid_point(self): point = (2, 3) check_point(point) def test_valid_point_with_intensity(self): point = (2, 3, 1.) check_point(point) def test_check_3d_...
mit
-2,531,851,163,309,349,000
21.789474
62
0.534669
false
3.698006
true
false
false
ilostthegiraffe/munin
FreeNAS/HDD-Temp/get_sata_smart.py
1
6396
#!/usr/bin/env python # # Script to get SMART DATA from a FreeBSD based system (ie FreeNAS). Write to csv. Can be called from munin plugin SSH__FreeNAS_HDDTemp # '''Import SATA SMART DATA''' #import handy commands import os import sys import re import time import datetime import csv smart_device_table=[] smart_d...
gpl-3.0
-3,456,092,692,468,660,000
35.135593
278
0.610381
false
3.881068
false
false
false
robertmuth/PyZwaver
example_tool.py
1
7588
#!/usr/bin/python3 # Copyright 2016 Robert Muth <robert@muth.org> # # 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 # of the License. # # This program is distributed in the hope that i...
gpl-3.0
-4,392,959,240,617,052,700
32.427313
108
0.675409
false
3.899281
false
false
false
OliverCole/ZeroNet
plugins/Sidebar/ZipStream.py
1
1619
import cStringIO as StringIO import os import zipfile class ZipStream(file): def __init__(self, dir_path): self.dir_path = dir_path self.pos = 0 self.buff_pos = 0 self.zf = zipfile.ZipFile(self, 'w', zipfile.ZIP_DEFLATED, allowZip64=True) self.buff = StringIO.StringIO() ...
gpl-2.0
3,281,613,208,173,759,000
26.440678
88
0.537369
false
3.558242
false
false
false
dopplershift/siphon
examples/ncss/NCSS_Timeseries_Examples.py
1
3156
# Copyright (c) 2013-2015 University Corporation for Atmospheric Research/Unidata. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT """ ================ NCSS Time Series ================ Use Siphon to query the NetCDF Subset Service for a timeseries. """ from datetime import datetime, t...
mit
-1,750,322,844,628,799,500
42.232877
92
0.660963
false
3.816203
false
false
false
marioluan/abstract-data-types
python/src/trees/tree.py
1
1116
class Tree(): """ implementation of a tree """ def __init__(self, cargo, left=None, right=None): """ create a tree """ # can be any type self.cargo = cargo # should be also tree nodes self.left = left self.right = right def __str__(self): """ representation of a tree: tree.cargo """ ...
mit
-6,952,235,343,456,820,000
23.282609
55
0.594982
false
3.683168
false
false
false
davidzyx/PythonNotes
Part I/ch03_notes.py
1
1042
# ch03_notes.py # Chapter 3 notes taken from Automate the Boring Stuff with Python (2015).pdf # Created by Davidzz on 7/20/2016 # Functions: # no parameters: # define: def hello(): print('Howdy!') print('Howdy!!!') print('Hello there.') # call: hello() # with parameters: # define: def hello(name): prin...
gpl-3.0
-4,757,172,229,270,486,000
16.965517
77
0.642994
false
3.037901
false
false
false
projecthamster/experiments
hamster_sun.py
1
5446
#!/usr/bin/env python # - coding: utf-8 - # Copyright (C) 2010 Toms Bauģis <toms.baugis at gmail.com> """Base template""" from gi.repository import Gtk as gtk from lib import graphics import math import hamster.client import datetime as dt from collections import defaultdict import itertools class Chart(graphics.S...
mit
-4,718,483,545,852,678,000
28.592391
135
0.537925
false
3.563482
false
false
false
robisen1/AndroidWifiCracker
services/autocrack/aircrack.py
1
19705
#!/usr/bin/python import os, signal, sys import commands import subprocess import random import threading import socket from ConfigParser import ConfigParser import time #LOG_PATH = "/media/card/caps" #WIRELESS_DEVICE = "wlan0" #MONITOR_DEVICE = "mon0" MONITOR_MODE_CMD = "airmon-ng start wlan0" def get_ip_address(if...
mit
6,800,069,612,372,409,000
34.892532
152
0.547323
false
3.774904
true
false
false
kingdz2008/test
test/downloadAckunMusic.py
1
6077
#!/bin/env python # coding=utf8 from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 import base64 import requests import json import urllib import time import random import datetime import hashlib # 获得响应头信息中的Content-Type域 def urlOpenGetHeaders(url): req = urllib.request.Reque...
mit
-3,432,212,792,785,237,500
31.049451
278
0.588548
false
2.929684
true
false
false
tpudlik/sbf
performance/profile.py
1
2000
import argparse, cProfile, importlib, itertools, pstats, sys from os import path import numpy as np # Path hack sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) def profile(f, args): """Profile the sbf function f.""" z = 10**np.linspace(-3, 4, 1000) n = np.arange(200) zz, nn...
mit
6,744,523,673,732,388,000
31.786885
79
0.566
false
3.189793
false
false
false
shollen/evennia
evennia/contrib/slow_exit.py
8
4375
""" Slow Exit typeclass Contribution - Griatch 2014 This is an example of an Exit-type that delays its traversal.This simulates slow movement, common in many different types of games. The contrib also contains two commands, CmdSetSpeed and CmdStop for changing the movement speed and abort an ongoing traversal, respe...
bsd-3-clause
-6,332,526,666,602,655,000
29.594406
86
0.637943
false
3.937894
false
false
false
yaukwankiu/armor
start3.py
1
3163
################# # codes for testing armor.patternMatching.pipeline and armor.patternMatching.algorithms import time import shutil import os time0 = time.time() startTime =time.asctime() from armor import defaultParameters as dp from armor import misc from armor import pattern, pattern2 from armor.patternMatc...
cc0-1.0
7,521,243,379,194,565,000
44.84058
179
0.625356
false
3.350636
false
false
false
Tefx/Brick
Brick/service/qing.py
1
1976
import gevent from qingcloud.iaas import connect_to_zone from Brick.sockserver import SockClient from base import ServiceBase class QingService(ServiceBase): port = 42424 def __init__(self, s_id, conf, api_keypath, zone, image, keypair, vxnets): super(QingService, self).__init__(s_...
gpl-3.0
-8,515,703,323,268,287,000
34.285714
74
0.564271
false
3.721281
false
false
false