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
truevision/django_banklink
django_banklink/views.py
1
2422
from django.template import RequestContext from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.http import HttpResponse from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.views.decorators.csrf import csrf_exemp...
bsd-3-clause
8,737,867,333,097,925,000
41.491228
80
0.650702
false
4.485185
false
false
false
cmazuc/scarfage
scarf/user.py
1
5046
import re import string from scarf import app from flask import redirect, url_for, render_template, session, request, flash from core import redirect_back, SiteUser, NoUser, new_user, AuthFail, check_email from main import PageData import logging import config app.secret_key = config.SECRETKEY BANNED = ['.*\.pl$', ...
gpl-2.0
-4,444,595,495,403,300,000
30.735849
124
0.525565
false
3.966981
false
false
false
rymurr/cpp-class
pygui/pyscp.py
1
2857
from sys import stdout from twisted.python.log import startLogging, err from twisted.internet import reactor from twisted.internet.defer import Deferred, succeed from twisted.conch.ssh.common import NS from twisted.conch.scripts.cftp import ClientOptions from twisted.conch.ssh import filetransfer from twisted.conch....
gpl-3.0
7,092,885,815,837,879,000
28.153061
109
0.669933
false
3.903005
false
false
false
emergebtc/muddery
muddery/typeclasses/players.py
1
3755
""" This is adapt from evennia/evennia/players/players.py. The licence of Evennia can be found in evennia/LICENSE.txt. Player The Player represents the game "account" and each login has only one Player object. A Player is what chats on default channels but has no other in-game-world existance. Rather the Player puppe...
bsd-3-clause
-812,016,742,235,505,500
34.424528
98
0.645806
false
4.306193
false
false
false
PwnArt1st/searx
searx/preferences.py
1
11106
from searx import settings, autocomplete from searx.languages import language_codes as languages COOKIE_MAX_AGE = 60 * 60 * 24 * 365 * 5 # 5 years LANGUAGE_CODES = [l[0] for l in languages] LANGUAGE_CODES.append('all') DISABLED = 0 ENABLED = 1 class MissingArgumentException(Exception): pass class ValidationE...
agpl-3.0
6,231,365,305,246,020,000
37.5625
114
0.56591
false
4.449519
false
false
false
googleapis/python-aiplatform
samples/snippets/predict_text_sentiment_analysis_sample_test.py
1
1113
# 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
-5,785,958,710,520,507,000
32.727273
82
0.758311
false
3.613636
false
false
false
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_placenta/en_placenta-1.7.8/to_be_fixed/needsfixing/movie25.py
1
6150
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want wi...
gpl-2.0
-2,381,739,724,943,146,500
41.123288
222
0.504228
false
4.040736
false
false
false
alejob/mdanalysis
testsuite/MDAnalysisTests/plugins/memleak.py
1
3529
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
gpl-2.0
-833,070,304,503,999,500
38.211111
90
0.688014
false
3.630658
true
false
false
nukeador/20up
20up.py
1
15586
#! /usr/bin/python # -*- coding: utf-8 -*- """ Copyright (C) 2013 Borja Menendez Moreno 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 any later version. This p...
gpl-3.0
-1,007,471,043,088,747,600
33.028384
93
0.548091
false
3.630328
false
false
false
angr/angr
angr/state_plugins/heap/heap_base.py
1
6439
from ..plugin import SimStatePlugin from ...errors import SimMemoryError from .. import sim_options as opts import logging l = logging.getLogger("angr.state_plugins.heap.heap_base") # TODO: derive heap location from SimOS and binary info for something more realistic (and safe?) DEFAULT_HEAP_LOCATION = 0xc0000000 DE...
bsd-2-clause
-494,883,889,625,038,900
50.512
120
0.649635
false
4.42239
false
false
false
OSU-CS419/viewmydb
viewmydb/DBcreatetable.py
1
9454
#!/usr/bin/python import urwid import mainview """ NOTES ----- This module builds the widget to allow the user to create a table in a database. """ class CreateTableInfo: def __init__(self): self.count = None self.table_name = "" self.table_fields = None self.query_string = "" self.atr_name = ...
mit
-7,058,413,767,941,658,000
34.541353
201
0.663317
false
3.304439
false
false
false
lrocheWB/navitia
source/jormungandr/jormungandr/realtime_schedule/tests/synthese_test.py
1
5246
# coding=utf-8 # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and ope...
agpl-3.0
7,979,581,180,124,000,000
32.414013
109
0.672512
false
3.343531
true
false
false
feigaochn/leetcode
p737_sentence_similarity_ii.py
2
3720
#!/usr/bin/env python # coding: utf-8 """ Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are similar. For example, words1 = ["great", "acting", "skills"] and words2 = ["fine", "drama", "talent"] are similar, if the simil...
mit
2,157,045,802,710,911,500
45.5
223
0.548387
false
3.339318
false
false
false
google/google-ctf
third_party/edk2/BaseTools/Source/Python/CommonDataClass/CommonClass.py
1
4241
## @file # This file is used to define common items of class object # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. ...
apache-2.0
-8,464,301,721,770,162,000
41.721649
143
0.620844
false
3.848457
false
false
false
VHAINNOVATIONS/DmD
scrubber/MIST_2_0_4/src/MAT/lib/mat/python/MAT/PropertyCache.py
1
6712
# Copyright (C) 2007 - 2009 The MITRE Corporation. See the toplevel # file LICENSE for license terms. # This is a file-based property cache which I was originally using in # the experiment engine, but now also in the workspaces. # # A property cache # # attrTriples is a sequence of triples <attr>, <readFunction>, <w...
apache-2.0
586,704,132,469,674,100
38.482353
111
0.476162
false
4.409987
false
false
false
RyanSkraba/beam
sdks/python/apache_beam/examples/wordcount.py
1
5161
# # 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 us...
apache-2.0
626,437,405,938,748,800
36.398551
79
0.679132
false
3.820133
false
false
false
Spacecraft-Code/SPELL
src/spell/spell/utils/getch.py
1
3563
################################################################################### ## MODULE : spell.utils.getch ## DATE : Mar 18, 2011 ## PROJECT : SPELL ## DESCRIPTION: Getchar implementation ## -------------------------------------------------------------------------------- ## ## Copyright (C) 2008, ...
lgpl-3.0
2,679,316,217,137,369,000
28.213115
84
0.442885
false
4.470514
false
false
false
gperciva/artifastring
research/mode-detect/short.py
1
2790
#!/usr/bin/env python import sys sys.path.append("../shared/") import os import harmonics_data import sys import mode_decays import published_constants import adjust_decays import tables # no clue why I need this. :( from harmonics_data import HarmonicsStats def process(dirname, basename, recalc=False, plot=Fa...
gpl-3.0
-686,684,109,385,111,900
26.352941
77
0.58638
false
2.891192
false
false
false
ylam/DataScienceCoursera
frequency_2.py
1
1211
import sys import json def hw(): print 'Hello, world!' def lines(fp): print str(len(fp.readlines())) def main(): tweet_file = open(sys.argv[1]) #hw() #lines(sent_file) #lines(tweet_file) #save tweet files myData = {} #save tweet counts Result = {} #save frequency Freq...
gpl-2.0
8,787,856,851,238,190,000
21.425926
69
0.609414
false
3.129199
false
false
false
edx/edxanalytics
src/edxanalytics/edxmodules/video_analytics/common.py
1
3765
""" Configuration for every video player / site. - Properties (prefix none): names of video properties (e.g., autoplay on?) - Events (prefix EVT): names of video events (e.g., video_play) To add a new target, simply copy an existing block, paste, and modify. - normal values: boolean or string or list with one item - d...
agpl-3.0
-8,471,714,969,963,333,000
30.638655
74
0.592563
false
3.589133
false
false
false
tjps/bitcoin
test/functional/rpc_users.py
1
4247
#!/usr/bin/env python3 # Copyright (c) 2015-2018 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 multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
mit
5,873,558,166,899,214,000
38.635514
133
0.624853
false
3.531224
true
false
false
ccauet/scikit-optimize
skopt/learning/gaussian_process/tests/test_gpr.py
1
3320
import numpy as np import pytest from scipy import optimize from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_almost_equal from...
bsd-3-clause
1,136,411,059,373,997,400
31.871287
78
0.697289
false
2.951111
true
false
false
sarimak/generator
markdown_extensions.py
1
2173
#!/usr/bin/python3 # coding: utf-8 """ Register two Markdown extensions which replace <a href=""> and <img src=""> with {{ url_for('') }} and {{ resource('') }} placeholders which can be rewritten to absolute URLs and path to static resources. """ import markdown import markdown.inlinepatterns class UrlForEx...
gpl-2.0
-1,098,341,667,282,342,700
35.216667
80
0.649793
false
3.965328
false
false
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/startup/nodeitems_builtins.py
1
19000
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
7,506,633,246,367,762,000
38.014374
98
0.667632
false
3.91995
false
false
false
chmarr/prequelprizes
prizes/migrations/0002_auto__add_field_winner_authentication_ip__add_field_winner_details_ip.py
1
2807
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Winner.authentication_ip' db.add_column('prizes_winner', 'authentication_ip', ...
gpl-2.0
-1,932,945,504,593,230,000
53
135
0.566441
false
3.598718
false
false
false
gpodder/gpodder
src/gpodder/minidb.py
1
7563
#!/usr/bin/python # -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder 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 versi...
gpl-3.0
1,007,703,415,363,267,500
32.317181
81
0.526907
false
3.928831
false
false
false
brechtm/rinohtype
src/rinoh/font/opentype/truetype.py
1
1902
# This file is part of rinohtype, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/. import struct from .parse import OpenTypeTable, MultiFo...
agpl-3.0
1,037,244,954,149,980,400
31.793103
80
0.593586
false
3.804
false
false
false
bjuvensjo/scripts
vang/maven/regroup.py
1
2765
#!/usr/bin/env python3 import argparse from os import walk, rename, makedirs, listdir, rmdir from os.path import join, sep from sys import argv from typing import Iterable, Callable from vang.pio.rsr import _replace_in_file, _in def file_content_replace_function(line: str, old: str, new: str) -> str: line = line...
apache-2.0
4,013,461,642,139,699,700
37.943662
118
0.600723
false
3.272189
false
false
false
FrodeSolheim/fs-uae-launcher
fswidgets/splitter.py
1
4453
import traceback import weakref from typing import List, Optional, cast from typing_extensions import Literal import fsui from fsbc.util import unused from fsui import Widget from fsui.common.layout import HorizontalLayout, Layout, VerticalLayout from fsui.qt.color import Color from fsui.qt.drawingcontext import Drawi...
gpl-2.0
-2,767,218,321,864,412,000
31.985185
77
0.608803
false
4.126969
false
false
false
cezarfx/zorba
swig/python/tests/test04.py
1
1089
# Copyright 2006-2011 The FLWOR Foundation. # # 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 t...
apache-2.0
-5,153,413,378,839,610,000
24.928571
74
0.741965
false
3.320122
false
false
false
varunarya10/ironic
ironic/objects/conductor.py
2
2328
# coding=utf-8 # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
apache-2.0
-5,147,548,087,885,553,000
33.235294
78
0.631014
false
4.120354
false
false
false
ragibkl/blackhole
website/named/models.py
1
1529
from django.db import models from django.template import loader import requests class AdSource(models.Model): name = models.CharField(max_length=10) get_url = models.URLField() def fetch_ad_domains(self): url = self.get_url response = requests.get(url) if response.status_code == 2...
gpl-3.0
-9,100,672,480,641,761,000
31.531915
122
0.53172
false
3.631829
false
false
false
vladfi1/phillip
launch_many.py
1
3579
#!/usr/bin/env python import os import sys from argparse import ArgumentParser import subprocess from phillip import util import json from launch_lib import add_options, launch parser = ArgumentParser() parser.add_argument('path', type=str, help="path to enemies file") add_options(parser) args = parser.parse_args()...
gpl-3.0
3,765,404,798,221,629,400
22.546053
74
0.628667
false
2.865492
false
false
false
angusmacdonald/gopro-organizer
organizerui/view.py
1
7376
import wx from os.path import expanduser import logging import threading from configobj import ConfigObj config = ConfigObj("default.conf", unrepr=True) lock = threading.Lock() class OrganizerView(wx.Frame): def __init__(self, parent, title): super(OrganizerView, self).__init__(parent, title=title, size=(4...
mit
2,095,757,634,949,805,800
28.626506
110
0.720445
false
2.944511
false
false
false
luozhaoyu/leetcode
calcu.py
1
1777
class Symbol(object): def __init__(self, value, pre=None, succ=None): self.value = value self.pre = pre self.succ = succ class Solution: # @param {string} s # @return {integer} def calculate(self, s): s = s.replace(" ", "") head = Symbol(None) current = h...
mit
751,166,453,840,263,700
22.693333
56
0.396173
false
3.604462
false
false
false
the-it/WS_THEbotIT
service/ws_re/register/register_types/volume.py
1
4464
import json from typing import Union, Optional, List from service.ws_re.register._base import Register, _REGISTER_PATH from service.ws_re.register._typing import LemmaDict from service.ws_re.register.authors import Authors from service.ws_re.register.lemma import Lemma from service.ws_re.volumes import Volume, Volumes...
mit
3,885,164,164,905,527,300
34.149606
113
0.58983
false
3.299335
false
false
false
openstack/python-openstackclient
openstackclient/tests/unit/identity/v3/test_trust.py
1
8837
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
apache-2.0
-7,579,739,614,967,105,000
32.097378
79
0.595904
false
3.925811
true
false
false
bluemellophone/ibeis_cnn
broken/old_batch.py
1
5867
#def create_sliced_iter_funcs_train2(model, X_unshared, y_unshared): # """ # WIP: NEW IMPLEMENTATION WITH PRELOADING GPU DATA # build the Theano functions (symbolic expressions) that will be used in the # optimization refer to this link for info on tensor types: # References: # http://deeplearni...
apache-2.0
2,204,840,963,682,259,000
37.097403
115
0.623317
false
3.074948
false
false
false
LowResourceLanguages/hltdi-l3
l3xdg/node.py
1
24288
# Implementation of Extensible Dependency Grammar, as described in # Debusmann, R. (2007). Extensible Dependency Grammar: A modular # grammar formalism based on multigraph description. PhD Dissertation: # Universität des Saarlandes. # ######################################################################## # # ...
gpl-3.0
3,774,457,073,550,813,000
44.059369
117
0.537077
false
4.303916
false
false
false
nearlyfreeapps/python-googleadwords
tests/adspygoogle/adwords/geo_location_service_unittest.py
1
2974
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2010 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...
apache-2.0
4,193,252,725,452,182,000
29.979167
94
0.640215
false
3.783715
true
false
false
jreback/pandas
pandas/tests/frame/methods/test_describe.py
1
12434
import numpy as np import pandas as pd from pandas import Categorical, DataFrame, Series, Timestamp, date_range import pandas._testing as tm class TestDataFrameDescribe: def test_describe_bool_in_mixed_frame(self): df = DataFrame( { "string_data": ["a", "b", "c", "d", "e"], ...
bsd-3-clause
5,314,292,373,838,665,000
33.348066
88
0.430835
false
3.730573
true
false
false
odedlaz/python-password-chameleon
run.py
1
2465
#!/bin/python from __future__ import print_function from binascii import hexlify import hashlib import base64 from getpass import getpass import sys import argparse charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" chameleon_charset = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz123456...
mit
-7,371,451,792,089,840,000
29.444444
117
0.658418
false
3.815789
false
false
false
opoplawski/pytest-cov
src/pytest_cov/embed.py
1
1885
"""Activate coverage at python startup if appropriate. The python site initialisation will ensure that anything we import will be removed and not visible at the end of python startup. However we minimise all work by putting these init actions in this separate module and only importing what is needed when needed. For...
mit
5,013,430,591,248,774,000
28.920635
99
0.668435
false
4.424883
false
false
false
ultrabug/uhashring
tests/benchmark.py
1
1073
# -*- coding: utf-8 -*- """This is not part of the test suite. """ try: import ketama except Exception: ketama = None from tempfile import NamedTemporaryFile from time import time from uhashring import HashRing num = 1000000 print("running {} key generation comparison".format(num)) # ketama C binding if ket...
bsd-3-clause
-8,145,472,118,921,416,000
24.547619
71
0.629077
false
3.005602
false
false
false
baldengineers/easytf2_mapper
prefabs/diag_wall_egypt.py
1
126557
import os import math def rotatePoint(centerPoint,point,angle): angle = math.radians(angle) temp_point = point[0]-centerPoint[0] , point[1]-centerPoint[1] temp_point = ( temp_point[0]*math.cos(angle)-temp_point[1]*math.sin(angle) , temp_point[0]*math.sin(angle)+temp_point[1]*math.cos(angle)) temp_point...
gpl-3.0
-5,276,287,045,558,843,000
66.641903
162
0.534795
false
2.529976
false
false
false
gregorynicholas/shortuuid
shortuuid/tests.py
1
2948
import os import sys import unittest from uuid import UUID, uuid4 sys.path.insert(0, os.path.abspath(__file__ + "/../..")) from shortuuid.main import * class LegacyShortUUIDTest(unittest.TestCase): def test_generation(self): self.assertTrue(20 < len(uuid()), 24) self.assertTrue(20 < len(uuid("ht...
bsd-3-clause
-3,858,694,331,504,901,600
30.361702
74
0.61635
false
3.415991
true
false
false
superdesk/superdesk-core
superdesk/places/places_autocomplete.py
1
2132
import superdesk from flask import current_app as app from superdesk.utils import ListCursor from superdesk.geonames import geonames_request, format_geoname_item class PlacesAutocompleteResource(superdesk.Resource): resource_methods = ["GET"] item_methods = [] schema = { "scheme": {"type": "stri...
agpl-3.0
-1,543,517,481,427,133,700
32.3125
84
0.532364
false
3.773451
false
false
false
whitehorse-io/encarnia
Encarnia/world/ingame_time_original.py
1
2199
# in a file ingame_time.py in mygame/world/ from evennia.utils import gametime from typeclasses.rooms import Room # Sunrise! def at_sunrise(): """When the sun rises, display a message in every room.""" # Browse all rooms for room in Room.objects.all(): room.msg_contents("The sun rises fr...
mit
2,210,577,861,242,035,700
32.390625
108
0.650296
false
3.296852
false
false
false
Maxime2/dpsearch-python
searchd-rest.py
1
1255
#!/usr/bin/python import json import urllib import urllib2 url = 'http://inet-sochi.ru:7003/' params = { # The category of the results, 09 - for australian sites 'c' : '09', # number of results per page, i.e. how many results will be returned 'ps': 10, # result page number, starting with 0 'np' : 0, # sy...
unlicense
5,561,589,539,934,972,000
25.702128
131
0.610359
false
2.925408
false
false
false
tonygalmiche/is_plastigray
is_deb.py
1
16050
# -*- coding: utf-8 -*- from openerp import models,fields,api,SUPERUSER_ID from openerp.tools.translate import _ from openerp.exceptions import Warning import datetime import xmlrpclib #TODO : #- DEB importation #- Ajouter un bouton pour accèder aux lignes de la synthese quand la fiche est terminé class is_deb(mod...
mit
1,110,925,696,740,326,300
40.382429
170
0.446831
false
4.020839
false
false
false
GunioRobot/feed2dent
f2dlibs/jfilters.py
1
1319
""" archbot library this package contains the following methods: tighturlify -- Method to turn a url into a bit.ly shortened url. mkdent -- Method to post data to identica. """ ### ### imports import sys import re import urllib import urllib2 import logging from jinja2 import Markup ### ### conditional import...
bsd-3-clause
2,463,794,963,521,435,000
23.886792
70
0.680061
false
3.623626
false
false
false
debian-live/live-magic
DebianLive/elements/key_var.py
1
4537
# -*- coding: utf-8 -*- # # live-magic - GUI frontend to create Debian LiveCDs, etc. # Copyright (C) 2007-2010 Chris Lamb <lamby@debian.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 Found...
gpl-3.0
-5,428,471,877,226,425,000
30.506944
94
0.486445
false
3.887746
false
false
false
quozl/help-activity
helpactivity.py
1
7190
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
-5,766,782,719,864,932,000
32.915094
77
0.614604
false
3.719607
false
false
false
Stibbons/guake
guake/menus.py
1
7649
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from locale import gettext as _ gi.require_version('Vte', '2.91') # vte-0.42 from gi.repository import Vte from guake.customcommands import CustomCommands import logging log = logging.getLogger(__name__) def mk_tab_context_menu(callback_object...
gpl-2.0
5,360,948,063,324,771,000
35.578947
93
0.649706
false
3.554161
false
false
false
jetskijoe/SickGear
lib/tornado/iostream.py
1
65232
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
8,333,440,828,056,137,000
41.058027
128
0.589649
false
4.396576
false
false
false
crowd-course/scholars
scholars/courses/models.py
1
19377
import os import pytz from datetime import tzinfo, timedelta, datetime from django.conf import settings from django.core.validators import MinValueValidator from django.db import models from django.db.models import F, Count, ExpressionWrapper, DateField, DateTimeField from django.db.models.signals import pre_delete, p...
mit
-8,950,352,779,626,918,000
35.838403
156
0.604944
false
3.632733
false
false
false
Transkribus/TranskribusDU
TranskribusDU/graph/FeatureDefinition_Generic.py
1
6856
# -*- coding: utf-8 -*- """ Standard PageXml features: - not using the page information - using a QuantileTransformer for numerical features instead of a StandardScaler No link with DOm or JSON => named GENERIC Copyright Xerox(C) 2016, 2019 JL. Meunier Developed for the EU projec...
bsd-3-clause
-1,083,404,007,872,868,900
54.274194
156
0.47724
false
5.095911
false
false
false
mikeberkelaar/controlleddos
Attack_Agent/attacks/syn2.py
1
4434
''' Syn flood program in python using raw sockets (Linux) Initial: Silver Moon (m00n.silv3r@gmail.com) ''' # some imports import socket, sys, random, time, Queue from struct import * class SYNFLOOD(): def __init__(self, Q, TARGET_IP, TARGET_PORT, RATE): #threading.Thread.__init__(self) # Re...
apache-2.0
-5,974,400,502,629,511,000
29.57931
118
0.62562
false
2.946179
false
false
false
sambayless/monosat
tests/python/rnd_pb_opt.py
1
2332
from monosat import * import functools import math from monosat import * import os from random import shuffle import random import random import sys import itertools filename=None if __name__ == "__main__": seed = random.randint(1,100000) if len(sys.argv)>1: filename=sys.argv[1] if len(sys.argv)>2:...
mit
323,489,700,240,237,440
18.433333
65
0.639365
false
3.01292
false
false
false
drtuxwang/system-config
bin/flink.py
1
4916
#!/usr/bin/env python3 """ Recursively link all files. """ import argparse import glob import os import signal import sys from typing import List import file_mod class Options: """ Options class """ def __init__(self) -> None: self._args: argparse.Namespace = None self.parse(sys.arg...
gpl-2.0
8,102,982,425,260,739,000
27.091429
77
0.450976
false
4.758955
false
false
false
kdart/pycopia
WWW/test.py
1
11133
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
-7,756,537,204,763,291,000
36.611486
172
0.590317
false
3.291839
true
false
false
belokop/indico_bare
indico/MaKaC/webinterface/rh/categoryMod.py
1
16874
# This file is part of Indico. # Copyright (C) 2002 - 2016 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; either version 3 of the # License, or (a...
gpl-3.0
-1,614,652,444,537,777,400
36.004386
167
0.627
false
4.091659
false
false
false
funkyfuture/docker-compose
compose/parallel.py
1
10546
from __future__ import absolute_import from __future__ import unicode_literals import logging import operator import sys from threading import Lock from threading import Semaphore from threading import Thread from docker.errors import APIError from docker.errors import ImageNotFound from six.moves import _thread as t...
apache-2.0
-6,830,198,598,084,363,000
30.201183
103
0.626399
false
4.084431
false
false
false
whoisever/vgg16_finetune_mutli_label
vgg19.py
1
4374
# -*- coding: utf-8 -*- from keras.models import Sequential from keras.optimizers import SGD from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation from sklearn.metrics import log_loss from load_cifar10 import load_cifar10_dat...
mit
-7,142,099,060,226,937,000
34.274194
145
0.665066
false
3.113167
false
false
false
dvida/UWO-PA-Python-Course
Lecture 6/Task 1/L6_T1_solution.py
1
1086
from __future__ import print_function import numpy as np import scipy.optimize import matplotlib.pyplot as plt from TextFileParser import parseTextFile def meteor_model(x, a, b, c, d): """ Time vs. meteor lag. """ return a*np.exp(b*x) + c*x + d if __name__ == "__main__": # File name of the data fil...
mit
550,034,698,031,318,200
18.763636
80
0.617864
false
3.102857
false
false
false
cprogrammer1994/ModernGL
moderngl/program.py
1
7352
from typing import Tuple, Union, Generator from .program_members import (Attribute, Subroutine, Uniform, UniformBlock, Varying) __all__ = ['Program', 'detect_format'] class Program: ''' A Program object represents fully processed executable code in the OpenGL Shadin...
mit
-7,031,265,398,693,830,000
31.104803
96
0.575218
false
4.363205
false
false
false
charanpald/sandbox
sandbox/kernel/PolyKernel.py
1
1730
import numpy from sandbox.kernel.AbstractKernel import AbstractKernel from sandbox.util.Parameter import Parameter class PolyKernel(AbstractKernel): """ A class to find polynomial kernel evaluations k(x, y) = (<x, y> + b)^degree """ def __init__(self, b=1.0, degree=2): """ Initialise ...
gpl-3.0
6,772,952,362,683,971,000
25.227273
97
0.574566
false
3.785558
false
false
false
alphagov/backdrop
features/steps/read_api.py
1
8202
import datetime import os import re from behave import given, when, then, step_matcher from dateutil import parser from flask import json from hamcrest import assert_that, is_, is_not, matches_regexp, has_length, equal_to, \ has_item, has_entries, has_entry import pytz from features.support.api_common import ensu...
mit
3,936,186,195,960,056,000
32.477551
92
0.656059
false
3.39206
false
false
false
antkillerfarm/antkillerfarm_crazy
python/ml/PIL/imageprocess.py
1
1619
import numpy as np import tensorflow as tf from PIL import Image def save_img(sess, tensor, name): tensor0 = tf.transpose(tensor, perm=[1, 2, 0]) res = sess.run(tensor0) tensor1 = tensor0.eval() im = Image.fromarray(tensor1.astype('uint8')) im.save(name) ''' im = Image.open("example_im...
gpl-3.0
-4,133,155,640,879,254,000
33.977778
82
0.617048
false
2.619741
false
false
false
Saint-Joe/weewx
bin/weewx/drivers/Adafruit_ADS1x15/Adafruit_ADS1x15.py
1
32166
#!/usr/bin/python import time import smbus #from Adafruit_I2C import Adafruit_I2C # =========================================================================== # ADS1x15 Class # # Originally written by K. Townsend, Adafruit (https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_ADS1x15) #...
gpl-3.0
1,737,550,240,136,467,500
43.305785
138
0.650407
false
2.961333
true
false
false
lugkhast/forever-alone-gae
core/privileges.py
1
3131
# forever-alone: A course and free time matching web app for college students # Copyright (C) 2011 Lawrence Patrick Calulo # # This file is part of forever-alone. # # forever-alone is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # t...
agpl-3.0
9,016,858,172,864,464,000
27.990741
81
0.75024
false
3.463496
false
false
false
Signiant/alexa_signiant_status
alexa_signiant_status.py
1
11159
""" Return Signiant Platform Status """ import time import urllib.request, urllib.error, urllib.parse import json import os # Default Signiant Status Page URL SIGNIANT_STATUS_URL = 'https://1dmtgkjnl3y3.statuspage.io/api/v2/summary.json' STATUS_PAGE_API_KEY = None # We need this to be set as an env var - fail if it'...
mit
2,951,908,603,387,607,000
33.441358
145
0.631419
false
3.822885
false
false
false
jflitton/serverless-image-resizing
asynchronous.py
1
2027
import boto3 import cStringIO import json from config import Config from PIL import Image from datetime import datetime from concurrent.futures import ThreadPoolExecutor sqs = boto3.resource('sqs') s3 = boto3.resource('s3') bucket = s3.Bucket(Config.s3Bucket) message_found = True images_resized = 0 start_time = datet...
mit
7,370,596,085,217,829,000
26.391892
109
0.706463
false
3.593972
false
false
false
byplacebo/head-first-python
6th/class_coach2.py
1
1120
def sanitize(time_string): if "-" in time_string: splitter = "-" elif ":" in time_string: splitter = ":" else: return time_string (mins, secs) = time_string.split(splitter) return mins + "." + secs class Athlete: def __init__(self, a_name, a_dob=None, a_times=[]): ...
apache-2.0
-7,468,122,315,685,793,000
25.046512
64
0.570536
false
3.137255
false
false
false
TheSchwa/dnd
char_sheet/fields/text.py
1
1184
from collections import OrderedDict from dnd.char_sheet.fields import Field ############################################################################### # Text class # - supports newlines via the 2 literal characters '\n' ############################################################################### class Text...
gpl-3.0
4,237,716,498,768,581,600
25.909091
79
0.511824
false
3.75873
false
false
false
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/core/series.py
1
150775
""" Data structure for 1-dimensional cross-sectional and time series data """ from collections import OrderedDict from io import StringIO from shutil import get_terminal_size from textwrap import dedent from typing import Any, Callable import warnings import numpy as np from pandas._config import get_option from pan...
apache-2.0
-3,893,275,183,218,865,000
29.795547
88
0.51797
false
4.434428
false
false
false
birgander2/PyRAT
pyrat/load/FSAR.py
1
29089
import pyrat import glob, os import logging import copy import numpy as np from PyQt5 import QtCore, QtWidgets # from pyrat.load import RatFile from pyrat.lib.ste import RatFile, Xml2Py from pyrat.viewer.Dialogs import FlexFilesel from pyrat.viewer.Widgets import HLine, CropBoxWidget, BoolWidget, FileselWidget, Produc...
mpl-2.0
8,396,901,994,008,392,000
39.570432
128
0.493176
false
3.507657
false
false
false
blowekamp/itkSuperPixel
doc/scripts/evaluation_ski.py
1
1526
#!/usr/bin/env python import SimpleITK as sitk import skimage as ski import skimage.segmentation import numpy as np import timeit def mask_label_contour(image, seg): """Combine an image and segmentation by masking the segmentation contour. For an input image (scalar or vector), and a multi-label segmentati...
apache-2.0
9,084,854,102,051,266,000
32.173913
123
0.773919
false
2.963107
false
false
false
escolmebartlebooth/fsnd_blogs
main.py
1
21055
# imports start import os import jinja2 import webapp2 import re import bb_blogdb as bdb import logging # end imports # create jinja2 environment TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates') JINJA_ENV = jinja2.Environment(loader=jinja2.FileSystemLoader(TEMPLATE_DIR), ...
mit
4,515,155,355,139,144,700
32.634185
78
0.528616
false
4.31986
false
false
false
lalitkumarj/NEXT-psych
ec2/next_ec2.py
1
52111
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file was forked from the Apache Spark project and modified. Many # thanks to those guys for a great time-saving file. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed wit...
apache-2.0
4,556,336,449,640,496,600
42.680637
206
0.581528
false
3.659737
false
false
false
tim-taylor/evobee
utils/plot-mp-distrib-violin.py
1
2936
#!/usr/bin/env python3 # # Script to generate a violin plot of the distribution of flower marker points # from a collection of runs of evobee # # Usage: plot-mp-distrib.py title mpcountmpfile [mpcountmpfile2 [mpcountmpfile3 ...]] # where each mpcountmpfile is a CSV format with layout: marker point, count # # Outputs:...
gpl-3.0
9,186,626,989,530,743,000
29.905263
109
0.623638
false
3.287794
false
false
false
clearlinux/autospec
autospec/config.py
1
50757
#!/bin/true # # config.py - part of autospec # Copyright (C) 2015 Intel Corporation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
8,387,312,896,066,715,000
49.406561
139
0.570372
false
3.780868
true
false
false
akehrer/Motome
Motome/Models/MotomeTextBrowser.py
1
13660
# Import the future from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import # Import standard library modules import cgi import datetime import logging import mimetypes import os import re import shutil # Import Qt modules from PySide import QtCore, QtGui ...
bsd-2-clause
8,148,224,664,488,367,000
36.53022
120
0.535359
false
4.073964
false
false
false
destijl/grr
grr/lib/flow_runner.py
1
47503
#!/usr/bin/env python """This file contains a helper class for the flows. This flow context class provides all the methods for handling flows (i.e., calling clients, changing state, ...). Each flow must have a flow runner before it can be executed. The flow runner is responsible for queuing messages and maintaining s...
apache-2.0
-6,703,846,200,527,131,000
37.063301
80
0.667221
false
4.141861
false
false
false
laz2/sc-core
bindings/python/sc_core/nsm.py
1
16628
 """ ----------------------------------------------------------------------------- This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) For the latest info, see http://www.ostis.net Copyright (c) 2010 OSTIS OSTIS is free software: you can redistribute it and/or modify it under the ter...
lgpl-3.0
4,471,898,048,388,171,000
51.608414
122
0.607998
false
2.786253
false
false
false
alexlib/Qt-Python-Binding-Examples
common_widgets/menu/popup_menu_by_right_click.py
1
1959
#!/usr/bin/env python #-*- coding:utf-8 -*- """ popup menu by right click Tested environment: Mac OS X 10.6.8 http://developer.qt.nokia.com/doc/qt-4.8/qmenu.html#details http://diotavelli.net/PyQtWiki/Handling%20context%20menus """ import sys try: from PySide import QtCore, QtGui except ImportError: from...
bsd-3-clause
1,564,691,287,392,536,600
24.454545
62
0.617662
false
3.401042
false
false
false
openstack/glance
glance/api/v2/tasks.py
1
16834
# 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 obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
6,334,792,962,047,081,000
35.595652
78
0.580908
false
4.03693
false
false
false
chfoo/wpull
wpull/application/tasks/conversion.py
1
2011
import asyncio from typing import Optional from wpull.database.base import NotFound from wpull.pipeline.item import URLRecord from wpull.pipeline.pipeline import ItemTask, ItemSource from wpull.pipeline.app import AppSession class LinkConversionSetupTask(ItemTask[AppSession]): @asyncio.coroutine def process(...
gpl-3.0
-686,150,176,005,659,400
28.144928
79
0.655395
false
4.242616
false
false
false
AdamBSteele/yournewhomepage
fbone/modules/frontend/forms.py
1
4310
# -*- coding: utf-8 -*- from flask import Markup, current_app from flask.ext.wtf import Form from flask.ext.wtf.html5 import URLField, EmailField, TelField from wtforms import (ValidationError, BooleanField, TextField, HiddenField, PasswordField, SubmitField, TextAreaField, IntegerField, RadioField,FileField, ...
bsd-3-clause
-8,060,816,719,266,212,000
38.181818
111
0.660325
false
4.005576
false
false
false
AutorestCI/azure-sdk-for-python
azure-batch/azure/batch/models/pool_remove_nodes_options.py
1
3080
# 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
-2,259,469,980,075,833,300
49.491803
191
0.692532
false
4.213406
false
false
false
nakagami/reportlab
src/reportlab/lib/normalDate.py
1
20963
#!/usr/bin/env python # normalDate.py - version 1.0 - 20000717 #hacked by Robin Becker 10/Apr/2001 #major changes include # using Types instead of type(0) etc # BusinessDate class # __radd__, __rsub__ methods # formatMS stuff # derived from an original version created # by Jeff Bauer of Rubicon Research and us...
bsd-3-clause
-4,366,325,312,494,363,000
32.81129
101
0.569146
false
3.673852
false
false
false
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx/main/tests/functional/commands/test_oauth2_token_revoke.py
2
2720
# Python import datetime import pytest import string import random from io import StringIO # Django from django.core.management import call_command from django.core.management.base import CommandError # AWX from awx.main.models import RefreshToken from awx.main.models.oauth import OAuth2AccessToken from awx.api.versi...
apache-2.0
7,834,790,525,911,286,000
33.43038
104
0.610294
false
4.023669
true
false
false
wangyum/beam
sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py
1
10147
# # 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 us...
apache-2.0
-1,636,396,044,485,334,300
43.504386
80
0.666995
false
3.969875
true
false
false
Azure/azure-sdk-for-python
sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_replication_usages_operations.py
1
5558
# 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
-4,773,754,817,970,686,000
46.504274
187
0.644476
false
4.620116
true
false
false
half0wl/simon
simon/simon.py
1
4207
from Foundation import NSTimer, NSRunLoop from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, \ NSEventTrackingRunLoopMode from .stats import cpu_usage, ram_usage, available_memory, disk_read, \ disk_written, network_recv, network_sent class Simon(NSApplication): def finishLaunching(self)...
mit
-2,908,278,978,923,838,500
33.203252
78
0.589018
false
3.928105
false
false
false
openstack/designate
designate/scheduler/filters/fallback_filter.py
1
1584
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # 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
272,423,216,452,741,820
32
79
0.684975
false
4.093023
false
false
false
crslade/HomeAPI
devices.py
1
8689
from utilities import ParameterException, get_table_ref import os import boto3 import json from datetime import datetime from uuid import uuid4 as uuid from boto3.dynamodb.conditions import Key #Actions #create def create_device(deviceData,roomID): print("Creating Device") #ValidateInput if not 'deviceNam...
mit
-7,731,628,886,154,534,000
30.146953
151
0.659454
false
3.994943
false
false
false
room77/py77
pylib/monitor/haproxy/conditions.py
1
1403
""" Conditions for sending alert emails for HAProxy Monitor A condition is a callable that takes a ProxyStats object and returns an error string or None for success """ from datetime import datetime __copyright__ = '2013, Room 77, Inc.' __author__ = 'Kyle Konrad <kyle@room77.com>' def more_than_n_down(n): """ A...
mit
-4,863,717,034,792,221,000
28.229167
72
0.655025
false
3.48139
false
false
false
PrognosisML/ConvNet-Prostate
Malignancy Diagnosis/Process.py
1
4723
import os import sys import tensorflow as tf import Input import os, re FLAGS = tf.app.flags.FLAGS TOWER_NAME = 'tower' tf.app.flags.DEFINE_integer('batch_size', 1, "hello") def _activation_summary(x): with tf.device('/cpu:0'): tensor_name = re.sub('%s_[0-9]*/' % TOWER_NAME, '', x.op.name) tf.s...
lgpl-3.0
7,402,761,261,317,179,000
40.069565
121
0.635613
false
3.127815
false
false
false
hbp-brain-charting/public_protocols
spatial_navigation/protocol/py/genRndSequences.py
1
2221
# _*_ coding: utf-8 _*_ import itertools import random from csv_io import write_to_csv as writeToFile import cPickle ''' Sequences will be generated as lists, containing all possible combinations of intersections (4), directions (4) and targets (2) The sequences are encoded as follows: (intersection, direction (st...
bsd-3-clause
7,523,443,422,153,598,000
21.642857
154
0.673727
false
3.165478
false
false
false