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
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/win32.py
1
15830
# win32.py - utility functions that use win32 API # # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import ctypes, errno, os, struct, subprocess, random _kernel32 = ...
gpl-3.0
-3,631,045,314,598,587,400
34.099778
80
0.6482
false
3.546942
false
false
false
zstackio/zstack-woodpecker
zstackwoodpecker/zstackwoodpecker/operations/datamigrate_operations.py
1
3332
''' All data migrate operations for test. @author: Legion ''' import apibinding.api_actions as api_actions import zstackwoodpecker.test_util as test_util import account_operations import apibinding.inventory as inventory def ps_migrage_vm(dst_ps_uuid, vm_uuid, session_uuid=None, withDataVolumes=False, withSnapshots...
apache-2.0
3,511,064,920,320,922,000
47.289855
141
0.752401
false
3.389624
true
false
false
jeKnowledge/horarios-inforestudante
DataParser.py
1
3411
import csv import datetime import re from Structs import AulaDataRaw from Structs import AulaDataSripped def openFile(filePath): return open(filePath) def csvIntoRawArray(csvFile): # Array of arrays(lines) with data filereader = csv.reader(csvFile) # We will be returning an array of AulaDataRaw ...
mit
-2,165,584,668,745,276,400
25.238462
116
0.613603
false
2.943054
false
false
false
ermo/privateer_wcu
modules/wrong_escort.py
1
2543
import escort_mission import faction_ships class wrong_escort (escort_mission.escort_mission): def __init__ (self,factionname,missiondifficulty,distance_from_base,creds,numsysaway,jumps=(),var_to_set='',dynfg='',dyntype='',alternatesystems=(),alternatefactions=(),alternateflightgroups=(),alternatetypes=(),alternate...
gpl-2.0
8,869,745,354,992,858,000
49.86
267
0.585529
false
4.266779
false
false
false
faneshion/MatchZoo
matchzoo/auto/tuner/callbacks/load_embedding_matrix.py
1
1541
from matchzoo.engine.base_model import BaseModel from matchzoo.auto.tuner.callbacks.callback import Callback class LoadEmbeddingMatrix(Callback): """ Load a pre-trained embedding after the model is built. Used with tuner to load a pre-trained embedding matrix for each newly built model instance. ...
apache-2.0
-8,370,876,919,457,573,000
33.244444
79
0.595717
false
3.776961
false
false
false
credativUK/vdirsyncer
vdirsyncer/sync.py
1
11250
# -*- coding: utf-8 -*- ''' The function in `vdirsyncer.sync` can be called on two instances of `Storage` to synchronize them. Due to the abstract API storage classes are implementing, the two given instances don't have to be of the same exact type. This allows us not only to synchronize a local vdir with a CalDAV serv...
mit
-7,033,694,881,106,067,000
33.829721
79
0.573778
false
3.867308
false
false
false
cgqyh/pyalgotrade-mod
pyalgotrade/optimizer/server.py
1
8087
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
apache-2.0
-4,952,820,957,967,452,000
32.556017
182
0.634599
false
4.404684
false
false
false
rdmorganiser/rdmo
rdmo/questions/admin.py
1
3411
from django import forms from django.contrib import admin from django.db import models from rdmo.core.utils import get_language_fields from .models import Catalog, Question, QuestionSet, Section from .validators import (CatalogLockedValidator, CatalogUniqueURIValidator, QuestionLockedValidato...
apache-2.0
-897,750,510,695,204,200
30.293578
121
0.6781
false
4.12954
false
false
false
Neetuj/softlayer-python
SoftLayer/CLI/block/snapshot_list.py
1
1781
"""List block storage snapshots.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import columns as column_helper from SoftLayer.CLI import environment from SoftLayer.CLI import formatting COLUMNS = [ column_helper.Column( 'id', ('snapshots', 'id'...
mit
8,083,339,656,087,134,000
29.706897
75
0.613139
false
4.200472
false
false
false
AndriesSHP/Gellish
CommunicatorSource/GellishDict.py
1
5979
class GellishDict(dict): ''' A dictionary for names in a context that refer to the denoted concepts. The roles of the names are indicated by alias relation_type_UIDs, such as for <is a code for>: key = name_in_context(tuple) = (languageUID, communityUID, name). value = value_triple = (UID...
gpl-3.0
2,889,238,609,246,712,000
46.07874
129
0.597592
false
3.656881
false
false
false
jslootbeek/roundware-server
roundware/urls.py
1
1451
# Roundware Server is released under the GNU Affero General Public License v3. # See COPYRIGHT.txt, AUTHORS.txt, and LICENSE.txt in the project root directory. from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, url # Loading static files for debug mode from...
agpl-3.0
6,197,231,107,093,475,000
28.02
80
0.694693
false
3.471292
false
false
false
ingenieroariel/geonode
geonode/base/models.py
1
49348
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-7,080,191,159,422,798,000
32.661664
101
0.582212
false
4.125397
false
false
false
anish/buildbot
master/buildbot/steps/source/gitlab.py
1
2149
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-870,936,740,008,805,600
43.770833
79
0.670079
false
4.367886
false
false
false
parasgithub/PrairieLearn
elements/pl-symbolic-input/pl-symbolic-input.py
1
17204
import prairielearn as pl import lxml.html from html import escape import chevron import sympy import random import math import python_helper_sympy as phs def get_variables_list(variables_string): if variables_string is not None: variables_list = [variable.strip() for variable in variables_string.split(',...
agpl-3.0
4,258,647,680,519,534,600
44.036649
163
0.575273
false
3.687889
false
false
false
kawamuray/ganeti
lib/utils/text.py
1
18178
# # # Copyright (C) 2006, 2007, 2010, 2011 Google Inc. # # 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 progr...
gpl-2.0
-4,384,509,988,743,595,500
25.306802
80
0.655298
false
3.601744
true
false
false
whtsky/Waterspout
waterspout/auth.py
1
1374
import functools from tornado.web import urlparse, urlencode, HTTPError def permission_required(f): """ Returns a decoration that check the current user with given function. If the user is not logged in, they will be redirected to the configured `login url <RequestHandler.get_login_url>`. If th...
mit
-6,591,939,943,022,267,000
33.35
78
0.542213
false
4.787456
false
false
false
elainekmao/hiphoptextanalysis
lyricwiki-scraper/lyricwiki/spiders/chance_spider.py
1
1152
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from lyricwiki.items import LyricWikiItem class LyricWikiSpider(CrawlSpider): name = "chance" #CHANGE NAME ...
gpl-2.0
-5,528,600,276,207,493,000
44.16
131
0.578993
false
3.566563
false
false
false
sailfish-sdk/sailfish-qtcreator
tests/system/suite_general/tst_cmake_speedcrunch/test.py
1
3171
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
gpl-3.0
-7,002,482,751,329,805,000
34.233333
113
0.653106
false
4.024112
true
false
false
dustinrohde/python-conway
test/test_cell_set.py
1
2096
import pytest from conway.grid import Cell from conway.grid import Point as P from conway.grid.cell_set import Grid from . import GameRulesTestMixin T = Cell.ALIVE F = Cell.DEAD class TestGrid(GameRulesTestMixin): GRID_CLS = Grid def test_init_with_width_and_height(self): grid = Grid(width=3, heig...
mit
1,718,295,299,079,489,500
29.823529
58
0.57395
false
3.601375
true
false
false
deepmind/sonnet
sonnet/src/build.py
1
2561
# Copyright 2019 The Sonnet 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 applicable l...
apache-2.0
7,186,900,872,818,753,000
35.070423
78
0.655994
false
3.617232
false
false
false
bnewbold/diffoscope
tests/comparators/test_rpm.py
1
3005
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
gpl-3.0
-2,231,490,363,198,703,600
39.567568
109
0.738175
false
3.395928
true
false
false
syscoin/syscoin2
test/functional/p2p_disconnect_ban.py
1
5575
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 node disconnect and ban behavior""" import time from test_framework.test_framework import Syscoin...
mit
-4,048,927,991,779,465,700
47.903509
155
0.650762
false
3.328358
true
false
false
Zatsugami/python-egghead-crawler
egghead/spiders/lessons.py
1
1244
# -*- coding: utf-8 -*- import scrapy from egghead.items import LessonVideo from egghead.spiders import LoginSpider from urlparse import urlparse, urljoin def lesson_filename(url): file_name = urlparse(url).path.split('/')[-1] return '{}.mp4'.format(file_name) def lesson_urls(response): return response....
gpl-2.0
-1,784,667,792,561,143,300
32.621622
107
0.659164
false
3.455556
false
false
false
apiaryio/black-belt
blackbelt/deployment.py
1
1417
from subprocess import check_call, check_output from blackbelt.handle_github import get_current_branch, run_grunt_in_parallel from blackbelt.messages import post_message def deploy_staging(): branch_name = get_current_branch() post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue") ...
mit
1,149,457,579,899,781,200
37.297297
99
0.66055
false
3.516129
false
false
false
richard-willowit/odoo
odoo/tools/xml_utils.py
2
1848
# -*- coding: utf-8 -*- from lxml import etree from odoo.tools.misc import file_open def check_with_xsd(tree_or_str, xsd_path): if not isinstance(tree_or_str, etree._Element): tree_or_str = etree.fromstring(tree_or_str) xml_schema_doc = etree.parse(file_open(xsd_path)) xsd_schema = etree.XMLSchema...
gpl-3.0
-1,629,396,402,940,386,600
43
119
0.697511
false
3.659406
false
false
false
sanjeevtripurari/hue
desktop/core/src/desktop/middleware.py
1
25658
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
6,306,637,644,091,341,000
34.735376
167
0.671292
false
3.91785
false
false
false
Toofifty/Oracle2
oracle/modules/lottery.py
1
5609
from threading import Thread import time, traceback, random from format import BOLD, RESET, CYAN, GREEN lotto = None def _init(b): print '\t%s loaded' % __name__ def lottery(l, b, i): """!parent-command !c new !d Create a new lottery (cost: 10 points) !a [duration] [min-bet] [max-bet] ...
mit
8,233,873,189,446,941,000
28.062176
89
0.463541
false
3.516614
false
false
false
fedora-conary/conary-policy
policy/normalize.py
1
38175
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-4,332,780,223,955,068,400
35.184834
129
0.540982
false
4.155781
false
false
false
hungpham2511/toppra
toppra/solverwrapper/cvxpy_solverwrapper.py
1
5009
from .solverwrapper import SolverWrapper import logging import numpy as np from ..constraint import ConstraintType from ..constants import CVXPY_MAXX, CVXPY_MAXU logger = logging.getLogger(__name__) try: import cvxpy FOUND_CVXPY = True except ImportError: logger.info("CVXPY installation not found.") ...
mit
2,394,813,359,082,985,000
35.562044
88
0.539429
false
3.640262
false
false
false
sealevelresearch/tide-wrangler
tide_wrangler/parsers/task_2000.py
1
1695
#!/usr/bin/env python import pytz import datetime from .row import Row __all__ = ['get_parser'] class Parser(): def __init__(self, f): self._fobj = f def get(self): return generate_rows(self._fobj) def get_parser(fobj, options): return Parser(fobj) def generate_rows(f): for lin...
mit
8,514,717,235,296,300,000
21.905405
74
0.589381
false
3.27853
false
false
false
ati-ozgur/KDD99ReviewArticle
HelperCodes/create_table_JournalAndArticleCounts.py
1
1930
import ReviewHelper import pandas as pd df = ReviewHelper.get_pandas_data_frame_created_from_bibtex_file() #df_journal = df.groupby('journal')["ID"] dfJournalList = df.groupby(['journal'])['ID'].count().order(ascending=False) isOdd = (dfJournalList.size % 2 == 1) if (isOdd): table_row_length = dfJournalList.si...
mit
6,558,627,946,973,043,000
25.081081
130
0.688601
false
3.216667
false
false
false
PokeHunterProject/pogom-linux
pogom/pgoapi/__init__.py
1
2430
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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...
mit
-520,971,139,557,488,900
35.268657
101
0.767078
false
3.814757
false
false
false
shreyasp/erpnext
erpnext/hr/doctype/salary_slip/salary_slip.py
1
14795
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff, money_in_words from frappe.model.naming import ...
gpl-3.0
-4,528,810,867,627,106,000
36.173367
176
0.693748
false
3.012625
false
false
false
Konovalov-Nik/storyboard
storyboard/projects/models.py
1
1893
# Copyright 2011 Thierry Carrez <thierry@openstack.org> # 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 ...
apache-2.0
9,213,235,775,598,121,000
28.578125
78
0.673006
false
3.879098
false
false
false
OpenBfS/dokpool-plone
Plone/src/docpool.localbehavior/docpool/localbehavior/localbehavior.py
1
1955
from Acquisition import aq_inner from docpool.localbehavior import MessageFactory as _ from plone.autoform import directives from plone.autoform.interfaces import IFormFieldProvider from plone.supermodel import model from z3c.form.browser.checkbox import CheckBoxFieldWidget from zope import schema from zope.component i...
gpl-3.0
-6,956,147,756,234,758,000
32.135593
84
0.707417
false
3.997955
false
false
false
scopatz/regolith
regolith/broker.py
1
2663
"""API for accessing the metadata and file storage""" from regolith.database import dump_database, open_dbs from regolith.runcontrol import DEFAULT_RC, load_rcfile, filter_databases from regolith.storage import store_client, push def load_db(rc_file="regolithrc.json"): """Create a Broker instance from an rc file"...
cc0-1.0
-2,406,156,181,989,504,000
28.921348
77
0.575667
false
4.047112
false
false
false
christodoulos/pycompgeom
pycompgeom/algorithms.py
1
1904
from primitives import * from predicates import * import random def jarvis(points): r0 = min(points) hull = [r0] r = r0 while True: u = random.choice(points) for t in points: if cw(r, u, t) or collinear(r, u, t) and between(r, t, u): u = t if u == r0: break else: r = u points.remove(r) hull...
gpl-3.0
9,201,103,693,256,576,000
24.052632
62
0.596113
false
2.291215
false
false
false
Instanssi/Instanssi.org
Instanssi/admin_profile/forms.py
1
3306
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from django.contrib.auth.models import User class InformationChangeForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Informati...
mit
8,177,352,354,657,648,000
31.86
90
0.550822
false
3.829837
false
false
false
the-it/WS_THEbotIT
archive/online/2016/160711_replace_citations.py
1
1373
# -*- coding: utf-8 -*- __author__ = 'eso' import sys sys.path.append('../../') import re import pywikibot def add_zeros(number, digits): number_str = str(number) if number < 10: for members in range(digits-1): number_str = "0" + number_str elif number < 100: for members in rang...
mit
4,581,316,253,179,235,300
39.323529
256
0.636032
false
2.764113
false
false
false
mdauphin/pycvnode
pycvnode/connector.py
1
3391
import cv2 import numpy as np class Connector(object): class Direction: OUTPUT = 1 INPUT = 2 def __init__(self,node,name,direction,type): self.node = node self.name = name self.direction = direction self.value = None self.type = type self.parse...
gpl-2.0
670,151,130,487,789,400
27.737288
82
0.576821
false
3.961449
false
false
false
openatv/enigma2
lib/python/Components/VfdSymbols.py
2
12566
# -*- coding: utf-8 -*- from twisted.internet import threads from config import config from enigma import eDBoxLCD, eTimer, iPlayableService, pNavigation, iServiceInformation import NavigationInstance from Tools.Directories import fileExists from Components.ParentalControl import parentalControl from Components.Service...
gpl-2.0
-1,859,345,489,814,616,800
32.87062
393
0.668073
false
2.799287
true
false
false
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.0/services/PIG/package/scripts/pig_client.py
1
1908
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
-5,231,814,969,549,273,000
29.285714
100
0.745283
false
3.648184
false
false
false
ARM-software/armnn
python/pyarmnn/test/test_supported_backends.py
1
1398
# Copyright © 2020 Arm Ltd. All rights reserved. # SPDX-License-Identifier: MIT import os import platform import pytest import pyarmnn as ann @pytest.fixture() def get_supported_backends_setup(shared_data_folder): options = ann.CreationOptions() runtime = ann.IRuntime(options) get_device_spec = runtime.G...
mit
1,352,998,812,462,088,700
26.94
101
0.69864
false
3.676316
true
false
false
mpatacchiola/pyERA
examples/ex_nao_head_imitation/head_pose_estimation.py
1
8515
#!/usr/bin/env python import numpy as np import tensorflow as tf import cv2 import os.path DEBUG = False class CnnHeadPoseEstimator: def __init__(self, tf_session): """ Init the class @param tf_session An external tensorflow session """ self._sess = tf_session def print_al...
mit
2,551,760,302,004,005,000
45.785714
158
0.582032
false
3.24876
false
false
false
jrichte43/ProjectEuler
Problem-0345/solutions.py
1
2222
__problem_title__ = "Matrix Sum" __problem_url___ = "https://projecteuler.net/problem=345" __problem_description__ = "We define the Matrix Sum of a matrix as the maximum sum of matrix " \ "elements with each element being the only one in his row and column. " \ "For ...
gpl-3.0
-5,434,478,510,974,057,000
51.904762
100
0.536004
false
3.248538
false
false
false
skdaccess/skdaccess
skdaccess/engineering/la/generic/stream.py
2
3472
# The MIT License (MIT) # Copyright (c) 2018 Massachusetts Institute of Technology # # Author: Cody Rude # This software has been created in projects supported by the US National # Science Foundation and NASA (PI: Pankratius) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this sof...
mit
-1,057,145,586,396,667,600
38.908046
102
0.702477
false
4.345432
false
false
false
saullocastro/pyNastran
pyNastran/converters/dev/ansys/ansys.py
1
5748
from numpy import zeros, array class Ansys(object): def __init__(self, log=None, debug=False): pass def read_ansys(self, ansys_filename): with open(ansys_filename, 'r') as ansys_file: lines = ansys_file.readlines() nodes = [] elements = {} i = 0 nl...
lgpl-3.0
-8,193,591,645,404,051,000
28.634021
200
0.428323
false
3.456404
false
false
false
hyperspy/hyperspyUI
hyperspyui/modelwrapper.py
1
8552
# -*- coding: utf-8 -*- # Copyright 2014-2016 The HyperSpyUI developers # # This file is part of HyperSpyUI. # # HyperSpyUI 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
8,070,357,070,856,363,000
36.840708
77
0.605005
false
3.99813
false
false
false
douglas/toxiproxy-python
toxiproxy/server.py
1
3386
# coding: utf-8 from future.utils import raise_with_traceback, viewitems, listvalues from .api import APIConsumer from .proxy import Proxy from .exceptions import ProxyExists from .utils import can_connect_to class Toxiproxy(object): """ Represents a Toxiproxy server """ def proxies(self): """ Retur...
mit
-5,460,193,500,709,897,000
27.453782
119
0.582989
false
4.478836
false
false
false
robket/BioScripts
alignment.py
1
9138
import numpy as np from matplotlib import pyplot as plt from scipy.misc import toimage from collections import defaultdict, Counter from types import SimpleNamespace from PIL import ImageDraw # This color table is sourced from https://github.com/trident01/BioExt-1/blob/master/AlignmentImage.java LIGHT_GRAY = 196 FIXE...
mit
-6,908,880,567,246,453,000
37.075
131
0.680893
false
3.10394
false
false
false
sunrenjie/py-windows-tools
py_windows_tools/windows/events.py
1
3139
# -*- coding: utf-8 -*- import re from oslo_log import log as logging from py_windows_tools.utilities import misc LOG = logging.getLogger(__name__) class WindowsEvents(object): @staticmethod def get_command_get_events(category, n): return ['powershell', 'Get-EventLog %s -newest %d' % (category, n)] ...
apache-2.0
-7,706,443,120,105,495,000
34
102
0.547673
false
3.762077
false
false
false
bram85/topydo
topydo/commands/ListCommand.py
1
10992
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.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, either version 3 of the License,...
gpl-3.0
-670,478,974,875,376,300
37.704225
86
0.593705
false
4.317361
true
false
false
andrewschaaf/pj-closure
js/goog/math.py
1
3556
#<pre>Copyright 2006 The Closure Library 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 ...
apache-2.0
244,956,752,805,644,600
20.950617
77
0.603487
false
3.197842
false
false
false
schalkneethling/snippets-service
snippets/base/cache.py
1
1854
# FROM https://raw.githubusercontent.com/mozilla/bedrock/master/bedrock/base/cache.py from django.core.cache.backends.base import DEFAULT_TIMEOUT from django.core.cache.backends.locmem import LocMemCache class SimpleDictCache(LocMemCache): """A local memory cache that doesn't pickle values. Only for use wit...
mpl-2.0
-7,616,568,562,176,174,000
33.333333
85
0.591154
false
4.012987
false
false
false
juniortada/signxml
setup.py
1
1193
#!/usr/bin/env python import os, glob from setuptools import setup, find_packages install_requires = [line.rstrip() for line in open(os.path.join(os.path.dirname(__file__), "requirements.txt"))] setup( name='signxml', version='0.4.2', url='https://github.com/kislyuk/signxml', license='Apache Software...
apache-2.0
3,744,242,557,129,585,700
34.088235
112
0.636211
false
3.937294
false
false
false
FRBs/FRB
frb/surveys/panstarrs.py
1
11891
""" Slurp data from Pan-STARRS catalog using the MAST API. A lot of this code has been directly taken from http://ps1images.stsci.edu/ps1_dr2_api.html """ import numpy as np from astropy import units as u,utils as astroutils from astropy.io import fits from astropy.coordinates import SkyCoord, match_coordinates_sky ...
bsd-3-clause
-4,824,569,952,313,100,000
38.769231
137
0.600454
false
3.530582
false
false
false
jledbetter/openhatch
mysite/customs/bugimporters/bugzilla.py
1
14860
# This file is part of OpenHatch. # Copyright (C) 2010, 2011 Jack Grigg # Copyright (C) 2010 OpenHatch, Inc. # # 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 Lice...
agpl-3.0
-8,360,372,221,718,884,000
41.824207
98
0.584859
false
3.794688
false
false
false
quattor/aquilon
lib/aquilon/worker/formats/network_device.py
1
6711
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
apache-2.0
1,171,513,508,783,954,400
42.577922
87
0.606318
false
4.178705
false
false
false
jdodds/pyrana
pyrana/plugins/pidginstatus.py
1
1213
import dbus from feather import Plugin class PidginStatus(Plugin): listeners = set(['songstart', 'songpause', 'songresume']) messengers = set() def songstart(self, payload): #hacky. parts = payload.split('/') artist = parts[-3] album = parts[-2] song = parts[-1] ...
bsd-3-clause
7,194,651,118,975,871,000
31.783784
71
0.591096
false
3.790625
false
false
false
leesdolphin/rentme
api/trademe/enums.py
1
1262
import enum def named_enum(name, item): if isinstance(item, str): item = item.split(' ') item = list(map(str.strip, item)) return enum.Enum(name, dict(zip(item, item)), module=__name__) @enum.unique class AreaOfBusiness(enum.Enum): All = 0 Marketplace = 1 Property = 2 Motors = 3 ...
agpl-3.0
-7,150,790,870,608,253,000
37.242424
83
0.606181
false
3.981073
false
false
false
pareidolic/bharati-braille
bottle.py
1
128654
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
agpl-3.0
24,366,193,587,758,924
38.671292
103
0.582197
false
4.143313
false
false
false
moccu/django-markymark
tests/test_fields.py
1
1065
from markymark.fields import MarkdownField, MarkdownFormField from markymark.widgets import MarkdownTextarea class CustomMarkdownTextarea(MarkdownTextarea): pass def test_markdownfield_formfield(): field = MarkdownField() form_field = field.formfield() assert isinstance(form_field, MarkdownFormField...
mit
-8,218,850,503,655,239,000
34.5
77
0.767136
false
4.064885
false
false
false
zseder/hunmisc
hunmisc/liblinear/filter_problem.py
1
2772
import sys def filter_fs(problem_f_handler, needed_features_list, orig_num_fname, needed_labels_list, orig_num_labelname, filtered_name): a = open('{0}.problem'.format(filtered_name), 'w') orig_new_nums = {} new_num_fname = {} orig_new_labelnums = {} new_num_labelname ...
gpl-3.0
-7,254,434,017,910,495,000
36.459459
103
0.527778
false
3.384615
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/ad_group_asset_service/client.py
1
23429
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
3,013,399,569,031,883,300
44.142582
193
0.622733
false
4.43647
false
false
false
etkirsch/legends-of-erukar
config/world/regions/BarlenRegion.py
1
3367
import erukar from erukar.system.engine import EnvironmentProfile, OverlandSector, Sector, Region, Location, Chunk, EconomicProfile def create(): barlen = Region() barlen.name = "Greater Barlen Region" barlen.description = "A fertile area, known best for its vast barley and wheat fields. The seat of this...
agpl-3.0
-5,317,180,016,940,680,000
31.68932
233
0.674785
false
2.992889
false
false
false
luk156/brick
documenti_acquisto/models.py
1
3097
from django.db import models from mptt.models import MPTTModel, TreeForeignKey # Create your models here. from django import forms from suit.widgets import SuitDateWidget from django.contrib.admin import widgets from ore.models import * # Create your models here. class Fornitore(models.Model): rag = models.TextFi...
agpl-3.0
-7,517,543,585,246,214,000
33.422222
92
0.671295
false
3.312299
false
false
false
xmendez/wfuzz
src/wfuzz/plugins/payloads/hexrange.py
1
1661
from wfuzz.externals.moduleman.plugin import moduleman_plugin from wfuzz.plugin_api.base import BasePayload from wfuzz.exception import FuzzExceptBadOptions from wfuzz.fuzzobjects import FuzzWordType @moduleman_plugin class hexrange(BasePayload): name = "hexrange" author = ( "Carlos del Ojo", ...
gpl-2.0
7,504,221,438,334,975,000
27.152542
86
0.571945
false
3.691111
false
false
false
jdmonaco/vmo-feedback-model
src/remapping/simulate.py
1
5749
# encoding: utf-8 """ simulate.py -- Simulate double rotation experiments using VMOModel Exported namespace: VMOExperiment Created by Joe Monaco on 2010-02-03. Copyright (c) 2009-2011 Johns Hopkins University. All rights reserved. This software is provided AS IS under the terms of the Open Source MIT License. See ...
mit
-745,938,006,877,985,200
32.823529
80
0.589494
false
4.245938
false
false
false
jlyonsmith/pytools
Test/test_buckle.py
1
2894
import os import subprocess def writeFile(fileName, contents): with open(fileName, "w") as f: f.write(contents) os.makedirs('Scratch', exist_ok=True) os.chdir('Scratch') writeFile('test_buckle.resx', '''<?xml version="1.0" encoding="utf-8"?> <root> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3....
mit
-112,656,978,342,174,060
33.047059
139
0.707326
false
2.801549
false
false
false
cczhu/baseband
baseband/mark4/base.py
1
21350
# Licensed under the GPLv3 - see LICENSE import numpy as np from astropy.utils import lazyproperty import astropy.units as u from ..vlbi_base.base import (make_opener, VLBIFileBase, VLBIFileReaderBase, VLBIStreamBase, VLBIStreamReaderBase, VLBIStreamWriterBas...
gpl-3.0
7,541,743,570,628,958,000
39.131579
79
0.603419
false
4.145631
false
false
false
openai/cleverhans
cleverhans/model_zoo/madry_lab_challenges/cifar10_model.py
2
10334
"""cleverhans.model.Model implementation of cifar10_challenge.model.Model This re-implementation factors variable creation apart from forward propagation so it is possible to run forward propagation more than once in the same model. based on https://github.com/tensorflow/models/tree/master/resnet """ from __future__...
mit
6,172,888,378,718,482,000
29.394118
76
0.613993
false
3.290035
false
false
false
taigaio/taiga-back
taiga/hooks/api.py
1
2892
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # 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) any later ver...
agpl-3.0
7,278,701,815,280,412,000
34.703704
80
0.677732
false
4.284444
false
false
false
saeki-masaki/cinder
cinder/tests/unit/test_ibm_flashsystem.py
1
47040
# Copyright 2014 IBM Corp. # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LIC...
apache-2.0
-6,044,078,275,345,714,000
37.243902
79
0.531803
false
3.864925
true
false
false
RDXT/django-userena
userena/views.py
1
38355
from django.urls import reverse from django.shortcuts import redirect, get_object_or_404,render from django.contrib.auth import authenticate, login, logout, REDIRECT_FIELD_NAME from django.contrib.auth import get_user_model from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.views import l...
bsd-3-clause
-7,902,587,174,113,698,000
39.673383
157
0.63087
false
4.441292
false
false
false
django-extensions/django-extensions
django_extensions/management/commands/validate_templates.py
1
3627
# -*- coding: utf-8 -*- import os import fnmatch from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.management.color import color_style from django.template.loader import get_template from django_extensions.compat import get...
mit
256,871,737,937,782,240
36.78125
119
0.576234
false
4.450307
false
false
false
firmadyne/scraper
firmware/spiders/openwrt.py
1
2425
from scrapy import Spider from scrapy.http import Request from firmware.items import FirmwareImage from firmware.loader import FirmwareLoader import urllib.request, urllib.parse, urllib.error class OpenWRTSpider(Spider): name = "openwrt" allowed_domains = ["downloads.openwrt.org"] start_urls = ["http://...
mit
7,624,054,713,847,366,000
39.416667
126
0.51299
false
4.299645
false
false
false
kozistr/Awesome-GANs
awesome_gans/discogan/discogan_train.py
1
4150
import sys import time import tensorflow as tf import awesome_gans.discogan.discogan_model as discogan import awesome_gans.image_utils as iu from awesome_gans.datasets import Pix2PixDataSet as DataSets # import numpy as np sys.path.insert(0, '../') results = {'sample_output': './gen_img/', 'model': './model/Disco...
mit
-2,482,674,350,346,778,000
37.425926
120
0.536145
false
3.649956
false
false
false
speksofdust/BeyondDreams
beyonddreams/char/attribs.py
1
3234
# ---------------------------------------------------------------------------- # # # # 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 ...
gpl-3.0
6,986,478,758,046,898,000
33.774194
80
0.497217
false
4.67341
false
false
false
machinecoin-project/machinecoin
contrib/devtools/security-check.py
2
8226
#!/usr/bin/env python # Copyright (c) 2015-2017 The Machinecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, ...
mit
3,368,837,701,868,259,300
37.083333
163
0.617554
false
3.604733
false
false
false
romeric/Fastor
benchmark/external/benchmark_inverse/benchmark_plot.py
1
1615
import numpy as np import matplotlib.pyplot as plt from matplotlib import rc rc('font',**{'family':'serif','serif':['Palatino'],'size':14}) rc('text', usetex=True) def read_results(): ms, ns, times_eigen, times_fastor = [], [], [], [] with open("benchmark_results.txt", "r") as f: lines = f.readlines()...
mit
-533,837,418,136,971,400
26.389831
84
0.573994
false
3.05293
false
false
false
Bitcoin-ABC/bitcoin-abc
test/functional/abc-replay-protection.py
1
11337
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ This test checks activation of UAHF and the different cons...
mit
787,828,342,569,320,100
34.428125
129
0.61242
false
3.770203
true
false
false
scality/ScalitySproxydSwift
test/scenario/multi-backend/fabfile/saio.py
1
3713
import os import os.path import fabric.contrib.files from fabric.api import sudo from utils import build_object_ring, render def disk_setup(swift_user): # Setup a loopdevice to act as disk for swift sudo('mkdir -p /srv') sudo('truncate -s 1GB /srv/swift-disk') sudo('mkfs.xfs /srv/swift-disk') f...
apache-2.0
453,750,375,810,706,200
27.128788
79
0.578508
false
2.900781
false
false
false
gwu-libraries/sfm-ui
sfm/sfm/settings/test_settings.py
1
1817
from sfm.settings.common import * import tempfile import os DATABASES = { # for unit tests 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'testdb' } } SFM_DB_DATA_DIR = os.path.join(tempfile.gettempdir(), "test-data") SFM_MQ_DATA_DIR = os.path.join(tempfile.gettempdir(), "tes...
mit
-1,005,177,759,540,445,600
23.226667
82
0.519538
false
3.555773
true
false
false
mikexine/tweetset
tweetset/collect/views.py
1
6251
from django.shortcuts import render, get_object_or_404, redirect from django.http import Http404, HttpResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.conf import settings from django.contrib import auth from django.contrib.auth import a...
mit
-1,877,005,152,931,094,800
32.25
148
0.666773
false
3.705394
false
false
false
HardLight/denyhosts
DenyHosts/sync.py
1
7559
import logging import os import time import sys import socket import requests if sys.version_info < (3, 0): from xmlrpclib import ServerProxy else: from xmlrpc.client import ServerProxy, Transport, ProtocolError from .constants import SYNC_TIMESTAMP, SYNC_HOSTS, SYNC_HOSTS_TMP, SYNC_RECEIVED_HOSTS, SOCKET_TI...
gpl-2.0
7,353,463,990,728,281,000
31.165957
102
0.513957
false
4.436033
false
false
false
susi/angya
widgets/nav.py
1
1162
"""This module defines the left navigation and its buttons.""" import flask from google.appengine.api import users class Navigation(object): """The Navigation returns information to render the nav menu buttons.""" def __init__(self, app): self.app = app def render(self): """Returns a json map of the...
apache-2.0
3,088,551,322,639,043,600
28.794872
74
0.583477
false
3.785016
false
false
false
CodeReclaimers/neat-python
examples/xor/visualize.py
1
5915
from __future__ import print_function import copy import warnings import graphviz import matplotlib.pyplot as plt import numpy as np def plot_stats(statistics, ylog=False, view=False, filename='avg_fitness.svg'): """ Plots the population's average and best fitness. """ if plt is None: warnings.warn(...
bsd-3-clause
8,867,354,121,167,928,000
29.025381
112
0.597464
false
3.432966
false
false
false
jdgwartney/boundary-einstein-python
bootstrap.py
1
2028
#!/usr/bin/env python import os import shutil import sys import subprocess import tarfile import urllib class Bootstrap: def __init__(self, version="12.0.4", base='http://pypi.python.org/packages/source/v/virtualenv', python="python2", env="py", ...
apache-2.0
-8,298,653,270,635,625,000
24.670886
88
0.622288
false
3.66065
false
false
false
Praxyk/Praxyk-DevOps
server/unittest/unit_test.py
1
2481
#!/bin/env python import _fix_path_ import sys import datetime class UnitTest : def maintest(self,name, desc, f) : return self.logger.log_event(self.logclient, 'UNIT TEST', ("s" if f else "f"), ['Test Name', 'Description'], (str(name)...
gpl-2.0
1,886,044,161,479,319,300
43.303571
107
0.554212
false
3.504237
true
false
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py
1
114261
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
306,901,749,235,503,800
58.635177
180
0.645382
false
3.887354
true
false
false
sekikn/ambari
ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py
2
2534
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
833,573,844,282,085,100
27.47191
103
0.693765
false
3.604552
true
false
false
theDrake/python-experiments
YouFace/page.py
1
5613
from html import * TITLE = 'YouFace' SUBTITLE = "A billion dollars and it's yours!" STYLESHEET = '/youface.css' LINKLIST = [('http://cit.cs.dixie.edu/cs/1410/', 'CS 1410'), \ ('http://new.dixie.edu/reg/syllabus/', 'College calendar'),] class Form(BlockContainer): def __init__(self, action): BlockContain...
mit
-4,225,685,870,735,543,000
31.445087
74
0.582576
false
3.319338
false
false
false
ProfHoekstra/bluesky
bluesky/traffic/windfield.py
1
9404
""" Wind implementation for BlueSky.""" from numpy import array, sin, cos, arange, radians, ones, append, ndarray, \ amin, minimum, repeat, delete, zeros, around, maximum, floor, \ interp, pi from bluesky.tools.aero import ft class Windfield(): """ Windfield class: ...
gpl-3.0
-166,896,459,923,706,270
39.245614
130
0.542003
false
3.82899
false
false
false
mdworks2016/work_development
Python/20_Third_Certification/venv/lib/python3.7/site-packages/celery/contrib/sphinx.py
1
3587
# -*- coding: utf-8 -*- """Sphinx documentation plugin used to document tasks. Introduction ============ Usage ----- Add the extension to your :file:`docs/conf.py` configuration module: .. code-block:: python extensions = (..., 'celery.contrib.sphinx') If you'd like to change the prefix for ...
apache-2.0
4,783,719,491,929,786,000
31.609091
79
0.666574
false
4.057692
false
false
false
guildai/guild
guild/serving_util.py
1
3478
# Copyright 2017-2021 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
3,184,719,521,864,172,500
26.603175
86
0.642036
false
3.907865
false
false
false
omelkonian/cds
cds/modules/webhooks/views.py
1
3801
# -*- coding: utf-8 -*- # # This file is part of CERN Document Server. # Copyright (C) 2016, 2017 CERN. # # CERN Document Server 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 # Licens...
gpl-2.0
-581,411,640,366,413,000
33.87156
78
0.665614
false
3.963504
false
false
false
mrakitin/sirepo
sirepo/template/elegant_command_parser.py
1
4455
# -*- coding: utf-8 -*- u"""elegant command parser. :copyright: Copyright (c) 2016 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern.pkcollections import PKDict from pykern.pkdebug import pkdc,...
apache-2.0
-7,543,986,354,780,968,000
31.757353
105
0.54119
false
3.843831
false
false
false
rohithkodali/numword
numword/numword_en_gb.py
1
1036
#This file is part of numword. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. ''' numword for EN_GB ''' from .numword_en import NumWordEN class NumWordENGB(NumWordEN): ''' NumWord EN_GB ''' def currency(self, val, longval=True): ...
lgpl-2.1
786,346,942,397,314,000
17.175439
71
0.617761
false
3.453333
false
false
false
JensRantil/http-trigger-trigger
release.py
1
1521
"""Script for creating releases.""" import os import sys import shutil if len(sys.argv) != 2: print "Usage: ./" + sys.argv[0] + " <tag/version>" sys.exit(1) version = sys.argv[1] if 'GOPATH' not in os.environ: print "GOPATH not set." sys.exit(1) VARIANTS = [('linux', ['386', 'amd64', 'arm']), ...
mit
-53,057,553,182,827,090
32.8
77
0.5595
false
3.682809
false
false
false
NeilBryant/check_mk
web/htdocs/metrics.py
1
47008
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
7,823,285,372,340,483,000
35.666927
147
0.495054
false
3.662122
false
false
false