repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
svp-dev/slcore
slc/tools/slc/mt/mtsparc/regdefs.py
1
15832
from ..common.regmagic import RegMagic class RegDefs: iargregs = 8 ilocalregs = 23 # There is not FP support for now, but we define this to keep the # common implementation happy. fargregs = 8 flocalregs = 24 regprefix = '%' regprefix_fmt = '%%' canon_is_numeric = False comp...
gpl-3.0
2,093,495,678,223,844,000
34.981818
95
0.417256
false
google/rekall
rekall-core/rekall/plugins/addrspaces/intel.py
1
25245
# Rekall Memory Forensics # # Copyright 2015 Google Inc. All Rights Reserved. # Authors: # Michael Cohen <scudette@google.com> # # 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...
gpl-2.0
3,458,658,243,991,293,000
36.905405
81
0.605942
false
MeGotsThis/BotGotsThis
pkg/channel/library.py
1
2842
import asyncio import bot from bot import utils from typing import List, Optional, Union # noqa: F401 from lib.data import Send from lib.data.message import Message from lib.database import DatabaseMain async def come(channel: str, send: Send) -> bool: bannedWithReason: Optional[str] priority...
gpl-3.0
-3,594,922,672,161,938,000
32.023256
76
0.611268
false
gnina/scripts
generate_counterexample_typeslines.py
1
11114
#!/usr/bin/env python3 ''' This script will generate the lines for a new types file with the iterative poses generated from counterexample_generation_jobs.py !!WARNING!! Part of this process is to determine which newly generated poses are NOT REDUNDANT with the previously generated ones. This requires an O(n^2) calcu...
bsd-3-clause
-4,488,924,076,670,344,700
43.103175
234
0.735739
false
eschendel/gnum
gnlib/scripts/generate_nt_ascii_to_ctable.py
1
2926
#!/usr/bin/env python ## Copyright (c) 2015, Eric R. Schendel. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ## - Redistributions of source code must retain the above copyright notice, th...
bsd-3-clause
-1,499,942,304,325,796,600
34.682927
82
0.685578
false
andgoldschmidt/iEBE
check_prerequisites.py
1
8145
#! /usr/bin/env python """ Print a list of tests to see whether all required tools for Ebe calculations are present. """ from os import getcwd, unlink, path from subprocess import call numberOfSpaces = 5 def printWarning(warningString): print("-"*(numberOfSpaces-2) + "> " + warningString) def printMsg(m...
gpl-3.0
6,418,206,754,668,124,000
36.362385
99
0.352363
false
madscatt/zazzie_1.5
trunk/sassie/simulate/complex_monte_carlo/nmer_dihedral.py
1
34612
''' SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D. 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 later version. ...
gpl-3.0
4,616,042,028,928,589,000
34.830228
534
0.669941
false
ian-r-rose/burnman
burnman/minerals/SLB_2005.py
1
2794
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU # GPL v2 or later. """ SLB_2005 ^^^^^^^^ Minerals from Stixrude & Lithgow-Bertelloni 2005 and references therein """ from __future__...
gpl-2.0
-8,929,445,697,747,135,000
22.880342
111
0.430208
false
RawEvan/sharephotos
sharephotos/tests.py
1
3027
# coding:utf-8 from django.test import TestCase from django.http import HttpResponse from django.core.mail import send_mail from models import Photo, Tag, Interest, Collect from users.models import User import dbControl import faceControl import time class DBTestCase(TestCase): """ Test for functions of database...
gpl-3.0
5,717,081,953,570,205,000
34.151163
146
0.647701
false
nvbn/django-discover-jenkins
discover_jenkins/results.py
1
8654
import os import traceback from datetime import datetime from itertools import groupby from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import AttributesImpl from django.utils.unittest import TextTestResult from discover_jenkins.utils import total_seconds try: from django.utils.encoding import smar...
bsd-3-clause
1,724,583,923,445,265,000
36.141631
79
0.544835
false
dshean/pygeotools
pygeotools/make_stack.py
1
3176
#! /usr/bin/env python #Generate stack from input rasters import os import sys import argparse import numpy as np from pygeotools.lib import malib #Hack to work around file open limit #import resource #resource.setrlimit(resource.RLIMIT_CORE,(resource.RLIM_INFINITY, resource.RLIM_INFINITY)) def getparser(): pa...
mit
-5,951,411,335,719,690,000
52.830508
166
0.687657
false
CitrineInformatics/python-citrination-client
citrination_client/models/tests/test_service_status.py
1
4405
from citrination_client.models import ServiceStatus from citrination_client.base.errors import CitrinationClientError import pytest example_status_response_dict = { "reason": "Please wait for machine learning features to become available", "ready": True, "context": "notice", "event": { "title": "Initializi...
apache-2.0
4,386,586,981,293,500,400
36.649573
116
0.720999
false
txomon/SpockBot
spock/plugins/core/net.py
1
9269
""" Provides an asynchronous, crypto and compression aware socket for connecting to servers and processing incoming packet data. Coordinates with the Timers plugin to honor clock-time timers """ import logging import select import socket import time from Crypto.Cipher import AES from spock import utils from spock.mc...
mit
-8,122,943,707,253,785,000
32.828467
79
0.575467
false
jameshensman/VFF
experiments/setting_a_b_M/gpr_special.py
1
4803
# Copyright 2016 James Hensman # # 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, so...
apache-2.0
-2,842,001,661,177,074,000
39.025
88
0.600042
false
angr/angr
angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py
1
7361
from typing import Dict, TYPE_CHECKING import logging import pyvex import archinfo from .... import options, BP_BEFORE from ....blade import Blade from ....annocfg import AnnotatedCFG from ....exploration_techniques import Slicecutor from .resolver import IndirectJumpResolver if TYPE_CHECKING: from angr.block ...
bsd-2-clause
5,518,427,772,508,819,000
42.556213
133
0.537835
false
csomerlot/WIPTools
addin/Install/SingleBMP.py
1
12719
# Import system modules import sys, os import Helper import regression import arcpy from arcpy import env from arcpy.sa import * hp = Helper.Helper(sys.argv) try: # Local variables Rural_1yrQ = Raster(os.path.join(hp.Workspace + "\\WIPoutput.mdb", "UndevQ")) BMPpts = os.path.join(hp.SWorkspace, "BMPp...
gpl-3.0
-7,616,929,208,638,953,000
46.636704
259
0.526378
false
baliga-lab/cmonkey2
cmonkey/network.py
1
13490
# vi: sw=4 ts=4 et: """network.py - cMonkey network module This file is part of cMonkey Python. Please see README and LICENSE for more information and licensing details. """ import numpy as np import logging import os.path import cmonkey.util as util import cmonkey.datamatrix as dm import cmonkey.scoring as scoring ...
lgpl-3.0
2,727,564,660,023,877,000
39.510511
105
0.592809
false
fvilca/cnn_tensorflow_cifar
cifar10_multi_gpu_train.py
1
10371
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mit
-3,657,095,802,407,810,000
36.576087
80
0.646514
false
food52/thumbor
thumbor/console.py
1
2470
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import optparse from thumbor.context import ServerParameters from t...
mit
8,738,400,710,362,373,000
53.888889
204
0.640891
false
Mariaanisimova/pythonintask
PINp/2014/Cheraneva A.S/task_10_24.py
1
3072
#Задача 10. Вариант 24. #Напишите программу "Генератор персонажей" для игры. #Пользователю должно быть предоставлено 30 пунктов, которые можно распределить между четырьмя характеристиками: Сила, Здоровье, Мудрость и Ловкость. #Надо сделать так, чтобы пользователь мог не только брать эти пункты из общего "пула", но...
apache-2.0
-906,661,393,097,690,600
31.967742
172
0.692162
false
talyian/elastalert
elastalert/create_index.py
1
3287
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import json import os import yaml from elasticsearch.client import Elasticsearch def main(): if os.path.isfile('../config.yaml'): filename = '../config.yaml' elif os.path.isfile('config.yaml'): filename = 'co...
apache-2.0
-5,382,246,338,983,577,000
39.580247
119
0.571037
false
gautam1858/tensorflow
tensorflow/tools/compatibility/tf_upgrade_v2.py
1
54358
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,698,780,922,763,350,000
36.933008
80
0.559642
false
deklungel/iRulez
old/modules/telegram/telegram.py
1
12009
#!/usr/bin/env python #Version 1.9 import sys sys.path.append('/var/www/html/modules/libraries') import time import pprint import telepot import mysql.connector import datetime import iRulez_logging as logger import paho.mqtt.client as mqtt from telepot.namedtuple import InlineKeyboardMarkup, InlineKeyboardButton from ...
mit
-7,143,340,784,685,586,000
35.840491
219
0.696394
false
efiop/dvc
dvc/repo/get.py
1
1920
import logging import os from dvc.exceptions import DvcException from dvc.path_info import PathInfo from dvc.utils import resolve_output from dvc.utils.fs import remove logger = logging.getLogger(__name__) class GetDVCFileError(DvcException): def __init__(self): super().__init__( "the given ...
apache-2.0
8,423,483,636,947,428,000
32.684211
74
0.663542
false
GoogleCloudPlatform/iot-core-micropython
third_party/rsa/cli.py
1
9382
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Un...
apache-2.0
-8,427,974,887,891,780,000
31.572917
87
0.612941
false
rachekalmir/pyJolt
pyjolt/util/tree_manager.py
1
6011
import itertools from collections import defaultdict from typing import Union, List, Dict from pyjolt.exceptions import JoltException def pairwise(iterable): """s -> (s0,s1), (s1,s2), (s2, s3), ...""" a, b = itertools.tee(iterable) next(b, None) return itertools.zip_longest(a, b) def type_generator...
apache-2.0
-7,570,709,542,070,465,000
31.491892
131
0.562635
false
BirkbeckCTP/janeway
src/review/views.py
1
87770
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from uuid import uuid4 from collections import Counter from datetime import timedelta from django.contrib import message...
agpl-3.0
7,063,019,516,852,951,000
33.460149
194
0.606278
false
mickstar/2048-ai-python
game/gameboard.py
1
3987
import random from game.cell import Cell from game.move import Move class GameBoard: '''GameBoard defines the 2048 grid that should be a 4x4 square. This class contains 16 cells, and provides methods for permuting the board state in conjunction with 2048 rules. The code is designed with an unconcrete size, though...
gpl-3.0
5,492,649,167,837,388,000
29.204545
105
0.641084
false
rlindner81/pyload
module/plugins/hoster/LinksnappyCom.py
1
1943
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.misc import json from module.plugins.internal.MultiHoster import MultiHoster class LinksnappyCom(MultiHoster): __name__ = "LinksnappyCom" __type__ = "hoster" __version__ = "0.16" __status__ = "testing" __pattern__ = ...
gpl-3.0
4,289,568,237,312,601,000
33.696429
89
0.513639
false
majkelx/astwro
astwro/coord/CoordMatch.py
1
2213
# coding=utf-8 from __future__ import absolute_import, division, print_function from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class CoordMatch(object): """Two catalogues crossmatch Object interface to `astropy.coordinates.match_to_catalog_sky`""" def __init__(self...
mit
-650,743,030,654,543,700
21.814433
87
0.597379
false
zhangzr1026/monitor2
src/collector/tasks/APP_RECORD/projectXfile.py
1
1566
''' Created on 2014-12-29 @author: Administrator ''' from lib import db_mysql from lib import common def conf_file_daily_num(resource=None): ''' Get daliy file num Just yesterday because today is not finished ''' yesterday = common.lastday() TARGET_TABLE='apprec_file_daily_num' ...
lgpl-3.0
-2,242,246,343,074,945,800
28
108
0.572158
false
UCSC-MedBook/MedBook_
tools/old-external-tools/shazam/htmlFG.py
1
17966
#!/usr/bin/python2.6 import sys, string, os, time, fnmatch, imgFG, markup, re from markup import oneliner as o from numpy import * rootDir = "" pngDir = "" pngBase = 'png/' pathwayNameDict = {} entityDict = {} entityFile = {} imgFG.printPDF = True class1 = [] class2 = [] class3 = [] def parseContrast(file_name, red...
bsd-3-clause
7,746,036,898,464,188,000
31.844607
166
0.560169
false
mcxiaoke/python-labs
archives/learning/security/otp.py
1
4777
# -*- coding: UTF-8 -*- # -*- coding: utf-8 -*- """ otpauth ~~~~~~~ Implements two-step verification of HOTP/TOTP. :copyright: (c) 2013 - 2014 by Hsiaoming Yang. :license: BSD, see LICENSE for more details. """ import base64 import hashlib import hmac import struct import sys import time import ...
apache-2.0
2,432,917,757,027,583,500
26.454023
75
0.601005
false
daweiwu/meta-iotqa-1
lib/oeqa/runtime/wifi/comm_wifi_mnode.py
1
5969
""" @file comm_wifi_mnode.py """ ## # @addtogroup wifi # @brief This is component # @{ # @addtogroup comm_wifi_mnode # @brief This is comm_wifi module # @{ ## import time import os import string import wifi import ConfigParser from oeqa.oetest import oeRuntimeTest from oeqa.utils.helper import shell_cmd_timeout from ...
mit
7,321,194,331,208,406,000
33.108571
132
0.59943
false
bmd/twittrscrapr
twittrscrapr/scrapers/profilescrapr.py
1
2613
from datetime import datetime as dt import logging from base_scraper import TwittrScrapr logger = logging.getLogger("TwittrScrapr.ProfileScrapr") class ProfileScrapr(TwittrScrapr): def __init__(self, api_keys, writer): """ Construct the ProfileScraper object :param api_keys: A dict con...
mit
-934,643,122,492,740,400
33.381579
113
0.570608
false
ParuninPavel/lenta4_hack
vkapp/bot/models/news.py
1
1052
from django.db import models from .users import Blogger, Admin class News(models.Model): id = models.AutoField(primary_key=True) link = models.CharField(max_length=300, blank=True, null=True) pic = models.CharField(max_length=300, blank=True, null=True) blogger = models.ForeignKey(Blogger, on_delete=m...
mit
6,350,823,177,180,132,000
36.571429
77
0.734791
false
vedujoshi/tempest
tempest/api/object_storage/test_object_services.py
1
46780
# 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/LICENSE-2.0 # # Unless requ...
apache-2.0
-4,028,736,555,689,061,000
43.132075
79
0.583903
false
caperren/Archives
OSU Robotics Club/Mars Rover 2017-2018/software/testing/ubiradio_testing.py
1
2372
import paramiko import json import time # ath0 21 channels in total; available frequencies : # Channel 01 : 2.412 GHz # Channel 31 : 2.414 GHz # Channel 02 : 2.417 GHz # Channel 32 : 2.419 GHz # Channel 03 : 2.422 GHz # Channel 33 : 2.424 GHz # ...
gpl-3.0
-8,870,408,355,310,936,000
34.402985
153
0.623524
false
leschzinerlab/FreeHand
lib/fspace_param_consolidate.py
1
1070
#!/usr/bin/env python import linecache import sys #Convert parameter file format with CTF info untilt = sys.argv[1] ctf2 = sys.argv[2] fout = '%s_format' %(ctf2[:-4]) o1 = open(fout,'a') o1.write("C Frealign format parameter file created from Search_fspace parameter file\n") o1.write("C\n") o1.write("C P...
mit
2,811,378,361,588,945,000
17.77193
130
0.592523
false
jordillinares/addons
stock_lot_enh_base/models/stock.py
1
10625
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (http://tiny.be). All Rights Reserved # # This module, # Copyright (C) 2015 Jordi Llinares López - bigandopen@bigandopen.c...
agpl-3.0
1,831,910,691,091,152,100
47.290909
107
0.483528
false
Antonio-Team/enigma2
lib/python/Screens/Ci.py
2
18127
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Tools.BoundFunction import boundFunction from Components.Sources.StaticText import StaticText from Components.ActionMap import ActionMap from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.co...
gpl-2.0
-5,231,612,498,419,194,000
30.857645
181
0.677332
false
donovanhide/BitMagic
bm/__init__.py
1
4167
## Copyright(c) 2009 William Waites <wwaites_at_gmail.com> ## ## 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, co...
mit
6,690,548,970,383,246,000
25.373418
84
0.62947
false
sjdv1982/seamless
docs/archive/0.2-cleanup/fireworks/tutorial/cell-display-numpy.py
1
2519
from PyQt5.QtWidgets import QMainWindow, QLabel, QWidget, QFrame, QSizePolicy from PyQt5.QtGui import QImage, QPixmap from PyQt5.QtCore import Qt, QSize import numpy as np w = QMainWindow(size=QSize(640, 640)) ww = QWidget() w.setCentralWidget(ww) asp = AspectLayout(1.0) ww.setLayout(asp) w.setWindowFlags(Qt.WindowSta...
mit
7,318,279,161,187,710,000
31.714286
79
0.598253
false
emilbjorklund/django-simplewebmentions
simplewebmentions/views.py
1
4196
""" TODO: send relevant signals when creating, deleting, unpublishing etc... TODO: How to best connect various bit that we can read from the URLs? """ from __future__ import unicode_literals from urlparse import urlparse from webmentiontools.urlinfo import UrlInfo from django.shortcuts import render, g...
mit
-3,596,693,950,043,964,400
32.677686
83
0.624881
false
wikimedia/ve-needcheck-reporter-bot
ircecho.py
1
1213
# Quick and ugly script to echo something to a given IRC channel # Alex Monk, 2014-07-22 from socket import socket, AF_INET, SOCK_STREAM def ircecho(nick, channel, message, host = "chat.freenode.net", port = 6667): s = socket(AF_INET, SOCK_STREAM) s.connect((host, port)) f = s.makefile() def readLineWithoutServe...
mit
-5,310,313,400,393,842,000
27.209302
93
0.608409
false
ShaolongHu/Nitrate
tcms/core/contrib/linkreference/views.py
1
3751
# -*- coding: utf-8 -*- __all__ = ('add', 'get', 'remove', ) from django.contrib.auth.decorators import user_passes_test from django.views.decorators.http import require_GET, require_POST from django.utils import simplejson as json from forms import AddLinkReferenceForm, BasicValidationForm from models import create...
gpl-2.0
-3,389,525,806,065,420,000
31.059829
77
0.649427
false
djurodrljaca/salamander-alm
server/trackermanagement/tracker_management.py
1
27334
""" Salamander ALM Copyright (c) 2016 Djuro Drljaca This Python module 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 Python module ...
gpl-2.0
-3,854,890,622,643,095,000
35.013175
100
0.498207
false
tinloaf/home-assistant
homeassistant/components/influxdb.py
1
11971
""" A component which allows you to send data to an Influx database. For more details about this component, please refer to the documentation at https://home-assistant.io/components/influxdb/ """ import logging import re import queue import threading import time import math import requests.exceptions import voluptuou...
apache-2.0
-1,788,784,909,250,787,800
33.900875
79
0.572383
false
TheWardoctor/Wardoctors-repo
script.stargate.guide/strings.py
1
2287
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # Modified for Stargate Guide (2016) # by wardoctor - wardoctor@tardisbuilds.com # # This Program is...
apache-2.0
-2,401,772,511,313,800,700
26.238095
72
0.738085
false
Belgabor/django
tests/regressiontests/test_client_regress/models.py
1
40827
# -*- coding: utf-8 -*- """ Regression tests for the Test Client, especially the customized assertions. """ import os from django.conf import settings from django.test import Client, TestCase from django.test.utils import ContextList from django.core.urlresolvers import reverse from django.core.exceptions import Suspi...
bsd-3-clause
-3,956,953,672,115,931,600
47.053004
183
0.64441
false
darvelo/chime
chime/error_functions.py
1
4103
from __future__ import absolute_import from logging import getLogger Logger = getLogger('chime.error_functions') from flask import current_app, request from urllib import quote from urlparse import urlparse from os.path import join, exists from .view_functions import get_repo, strip_index_file, path_display_type, get_...
bsd-3-clause
-526,122,277,231,651,140
40.867347
159
0.63612
false
ThierryM/bCNC
bCNC/lib/bmath.py
2
53783
# # Copyright European Organization for Nuclear Research (CERN) # All rights reserved # # Author: Vasilis.Vlachoudis@cern.ch # Date: 15-May-2004 from __future__ import generators from __future__ import absolute_import __author__ = "Vasilis Vlachoudis" __email__ = "Vasilis.Vlachoudis@cern.ch" import random from ma...
gpl-2.0
1,152,561,699,915,834,500
26.538658
100
0.457226
false
kdmurray91/khmer
sandbox/find-high-abund-kmers.py
1
2443
#! /usr/bin/env python2 # # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll.org # """ @@ """ import sys import screed import khmer from khmer.khme...
bsd-3-clause
1,175,521,753,674,455,300
29.160494
78
0.588621
false
ncbray/pystream
lib/PADS/Sudoku.py
1
67213
"""Sudoku.py PADS-based command-line application for generating and solving Sudoku puzzles. These puzzles are given as a 9x9 grid of cells, some of which are filled with digits in the range 1-9. The task is to fill the remaining cells in such a way that each row of the grid, each column of the grid, and each of nine ...
apache-2.0
2,277,679,837,284,832,000
41.245757
220
0.512326
false
CityGrid/twonicorn
twonicornweb/views/cp_user.py
1
8124
# Copyright 2015 CityGrid Media, 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 agreed t...
apache-2.0
223,268,084,307,298,000
40.661538
242
0.546406
false
mseclab/PyJFuzz
pyjfuzz/core/pjf_server.py
1
8559
""" The MIT License (MIT) Copyright (c) 2016 Daniele Linguaglossa <d.linguaglossa@mseclab.com> 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 th...
mit
-7,245,142,948,344,012,000
38.442396
112
0.592242
false
elebihan/yaprogen
data/templates/setuptools-python-app/skeleton/disthelpers.py
1
7324
# -*- coding: utf-8 -*- # # disthelpers.py - useful distutils helper commands # # Copyright (c) 2014 Eric Le Bihan <eric.le.bihan.dev@free.fr> # # 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 Softwar...
gpl-3.0
159,195,571,268,875,170
34.553398
79
0.578372
false
cctags/gumpad2
gumpad2.py
1
50733
#!/usr/bin/env python # coding: utf-8 import wx import wx.richtext import wx.lib import wx.lib.wordwrap import os import sys import uuid import tempfile import optparse import StringIO import time import locale import hashlib import zshelve import PyRTFParser import xtea from wx.lib.embeddedimage import PyEmbeddedI...
mit
-7,152,632,794,733,037,000
32.421268
176
0.58031
false
armenzg/build-mozharness
configs/unittests/win_unittest.py
1
7095
import os import sys # OS Specifics ABS_WORK_DIR = os.path.join(os.getcwd(), "build") BINARY_PATH = os.path.join(ABS_WORK_DIR, "firefox", "firefox.exe") INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.zip") XPCSHELL_NAME = 'xpcshell.exe' EXE_SUFFIX = '.exe' DISABLE_SCREEN_SAVER = False ADJUST_MOUSE_AND_SCREEN =...
mpl-2.0
-8,659,088,840,214,111,000
44.191083
115
0.562368
false
arunkgupta/gramps
gramps/gui/merge/mergefamily.py
1
9809
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Michiel D. Nauta # # 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...
gpl-2.0
-4,250,079,644,733,064,000
42.402655
79
0.574269
false
tensorflow/datasets
tensorflow_datasets/scripts/documentation/generate_visualization.py
1
2247
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
7,384,031,377,480,852,000
31.1
76
0.723632
false
endlessm/chromium-browser
third_party/catapult/dashboard/dashboard/graph_csv_test.py
1
6662
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import csv import StringIO import unittest imp...
bsd-3-clause
-4,719,458,784,556,416,000
32.31
80
0.613329
false
huntxu/neutron
neutron/common/constants.py
1
9868
# Copyright (c) 2012 OpenStack 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 to...
apache-2.0
3,229,446,407,521,964,500
38.15873
78
0.583502
false
davzhang/helix-python-binding
org/apache/helix/messaging/handling/GroupMessageHandler.py
1
3490
# package org.apache.helix.messaging.handling #from org.apache.helix.messaging.handling import * #from java.util import HashMap #from java.util import List #from java.util import Map #from java.util.concurrent import ConcurrentHashMap #from java.util.concurrent import ConcurrentLinkedQueue #from java.util.concurrent.at...
apache-2.0
-5,867,024,208,946,304,000
23.928571
83
0.619771
false
Azure/azure-sdk-for-python
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01/aio/_iot_hub_client.py
1
5911
# 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
8,649,690,516,236,446,000
51.776786
129
0.714092
false
qedsoftware/commcare-hq
corehq/apps/repeaters/tests/test_dbaccessors.py
1
3943
from datetime import datetime, timedelta from django.test import TestCase from corehq.apps.repeaters.dbaccessors import ( get_pending_repeat_record_count, get_success_repeat_record_count, get_failure_repeat_record_count, get_repeat_record_count, get_repeaters_by_domain, get_paged_repeat_records...
bsd-3-clause
-8,391,664,742,251,161,000
30.293651
90
0.628963
false
y4smeen/friendly-spork
camera/take-picture.py
1
3087
from __future__ import print_function import sys import cv2 def main(argv): #capture from camera at location 0 cap = cv2.VideoCapture(0) # Change the camera setting using the set() function # cap.set(cv2.cv.CV_CAP_PROP_EXPOSURE, -6.0) # cap.set(cv2.cv.CV_CAP_PROP_GAIN, 4.0) # cap.set(cv2.cv.CV...
mit
2,285,477,887,663,510,300
41.875
127
0.675089
false
SumiTomohiko/Yog
tools/update_prototype.py
1
8073
#! python # -*- coding: utf-8 -*- from glob import glob import re class DeclarationInserter(object): start = "/* PROTOTYPE_START */" end = "/* PROTOTYPE_END */" files = { "include/yog/dir.h": [ "src/dir.c", ], "include/yog/path.h": [ "src/path.c", ], "include/yog/proce...
mit
-4,793,780,574,572,863,000
34.563877
119
0.440852
false
jopcode/whoUR
whoUR.py
1
1600
import sys, os import argparse import urllib3, urllib import re # Modules from libs.colors import * from libs.selectChoice import select_choice Parser = argparse.ArgumentParser(prog='whoUR.py', description='Tool for information gathering') ''' this has been use in the future Parser.add_argument('-d', '--dic-path', he...
gpl-3.0
5,525,027,244,532,273,000
31
166
0.476875
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractWanderingmusetranslationWordpressCom.py
1
1211
def extractWanderingmusetranslationWordpressCom(item): ''' Parser for 'wanderingmusetranslation.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None chp_prefixes = [ ('SH Chapter ', 'Swain Hakush...
bsd-3-clause
9,097,084,817,052,766,000
35.666667
122
0.595533
false
portableant/open-context-py
opencontext_py/apps/edit/inputs/rules/models.py
1
1257
import collections from jsonfield import JSONField from datetime import datetime from django.utils import timezone from django.db import models # Stores information about fields for a data entry form class InputRule(models.Model): uuid = models.CharField(max_length=50, primary_key=True) # uuid for the rule itsel...
gpl-3.0
2,131,226,074,972,182,500
38.28125
95
0.674622
false
henriquegemignani/randovania
randovania/game_description/node_search.py
1
2783
from typing import Dict, Optional import networkx from randovania.game_description.area import Area from randovania.game_description.game_patches import GamePatches from randovania.game_description.node import Node, DockNode, TeleporterNode, PickupNode, ResourceNode from randovania.game_description.resources.pickup_i...
gpl-3.0
-1,139,548,063,911,922,300
42.484375
117
0.673015
false
srevenant/reactor
src/reactor/core/memstate.py
1
4742
#$#HEADER-START # vim:set expandtab ts=4 sw=4 ai ft=python: # # Reactor Configuration Event Engine # # Copyright (C) 2016 Brandon Gillespie # # 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 Fre...
agpl-3.0
4,588,729,354,238,118,000
33.867647
80
0.531843
false
m-ober/byceps
scripts/import_permissions_and_roles.py
1
1418
#!/usr/bin/env python """Import permissions, roles, and their relations from a JSON file. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import json import click from byceps.services.authorization import service as authz_service from byceps.util.system import get_co...
bsd-3-clause
-46,085,055,061,123,140
25.259259
78
0.687588
false
platformio/platformio
platformio/proc.py
1
5706
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-7,367,964,481,521,665,000
28.564767
82
0.58307
false
monaparty/counterparty-lib
counterpartylib/lib/messages/destroy.py
1
4261
#! /usr/bin/python3 """Destroy a quantity of an asset.""" import struct import json import logging logger = logging.getLogger(__name__) from counterpartylib.lib import util from counterpartylib.lib import config from counterpartylib.lib import script from counterpartylib.lib import message_type from counterpartylib....
mit
-1,950,463,795,646,828,500
29.007042
125
0.596574
false
DeltaEpsilon-HackFMI2/FMICalendar-REST
venv/lib/python2.7/site-packages/rest_framework/views.py
1
15361
""" Provides an APIView class that is the base of all views in REST framework. """ from __future__ import unicode_literals from django.core.exceptions import PermissionDenied from django.http import Http404 from django.utils.datastructures import SortedDict from django.views.decorators.csrf import csrf_exempt from res...
mit
-931,368,044,246,631,700
35.143529
84
0.627238
false
NNPDF/reportengine
src/reportengine/tests/test_executor.py
1
2275
# -*- coding: utf-8 -*- """ Created on Fri Nov 13 22:51:32 2015 @author: zah """ import unittest import time from reportengine.dag import DAG from reportengine.utils import ChainMap from reportengine import namespaces from reportengine.resourcebuilder import (ResourceExecutor, CallSpec) def f(param): print("Exe...
gpl-2.0
-3,430,533,522,206,889,000
23.212766
69
0.587253
false
RedHatInsights/insights-core
insights/parsers/tests/test_neutron_l3_agent_log.py
1
1372
import doctest from insights.parsers import neutron_l3_agent_log from insights.parsers.neutron_l3_agent_log import NeutronL3AgentLog from insights.tests import context_wrap from datetime import datetime AGENT_LOG = """ 2017-09-17 10:05:06.241 141544 INFO neutron.agent.l3.ha [-] Router 01d51830-0e3e-4100-a891-efd7dbc0...
apache-2.0
1,068,674,162,350,740,700
51.769231
246
0.742711
false
SmartInfrastructures/enos
tests/unit/utils/test_network_constraints.py
1
9499
import unittest from enos.utils.network_constraints import * from enos.provider.host import Host class TestExpandDescription(unittest.TestCase): def test_no_expansion(self): desc = { 'src': 'grp1', 'dst': 'grp2', 'delay': 0, 'rate': 0, 'symetric'...
gpl-3.0
-8,309,345,473,356,157,000
28.871069
98
0.504579
false
xunilrj/sandbox
courses/columbia-ia/sklearn/problem3_3.py
1
5477
import sys import pandas as pd #import numpy as np from sklearn import svm from sklearn.linear_model import LogisticRegression from sklearn.cross_validation import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.grid_search import GridSearchCV from sklearn import tree from sklearn.ense...
apache-2.0
-2,348,761,504,530,381,000
39.272059
94
0.631915
false
ifp-uiuc/do-neural-networks-learn-faus-iccvw-2015
tfd/cnn_a/train.py
1
3189
import argparse import os import sys sys.path.append('..') import numpy from anna import util from anna.datasets import supervised_dataset from anna.datasets.supervised_data_loader import SupervisedDataLoader import data_paths from model import SupervisedModel parser = argparse.ArgumentParser(prog='train_cnn_with_...
bsd-3-clause
-1,721,680,931,794,856,200
31.876289
87
0.679837
false
monikagrabowska/osf.io
osf/models/base.py
1
26122
import logging import random from datetime import datetime import bson import modularodm.exceptions import pytz from django.contrib.contenttypes.fields import (GenericForeignKey, GenericRelation) from django.contrib.contenttypes.models import ContentType from django.con...
apache-2.0
2,214,120,148,595,470,600
34.588556
129
0.607917
false
rohitwaghchaure/frappe
frappe/model/meta.py
1
15604
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata ''' Load metadata (DocType) class Example: meta = frappe.get_meta('User') if meta.has_field('first_name'): print "DocType" table has field "first_name" ''' from __future__ import unicode_literals im...
mit
-7,037,875,001,456,010,000
28.721905
101
0.680338
false
mkhutornenko/incubator-aurora
src/test/python/apache/aurora/client/cli/test_help.py
1
3763
# # 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 # distributed under ...
apache-2.0
-4,082,335,328,770,860,000
39.902174
85
0.68642
false
MindPass/Code
Interface_graphique/mindmap/svgwrite-1.1.6/tests/test_elementfactory.py
1
2340
#!/usr/bin/env python #coding:utf-8 # Author: mozman --<mozman@gmx.at> # Purpose: test elementfactory # Created: 15.10.2010 # Copyright (C) 2010, Manfred Moitzi # License: MIT License import sys import unittest from svgwrite.elementfactory import ElementFactory from svgwrite.params import Parameter class MockFactor...
gpl-3.0
-9,142,067,781,533,273,000
27.888889
57
0.632479
false
CloudNiner/fadds-parser
fadds/twr.py
1
2207
# -*- coding: utf-8 -*- """ Author: @sposs Date: 19.08.16 """ from fadds.base_file import BaseFile, BaseData import re value_re = re.compile(r"(?P<value>[0-9]+\.*[0-9]*)(?P<use>[A-Z ()0-9-/&]*)") class TWRParser(BaseFile): def __init__(self, twr_file): super(TWRParser, self).__init__(twr_file) se...
mit
4,184,547,079,323,127,000
28.426667
79
0.492524
false
apbard/scipy
scipy/spatial/tests/test_kdtree.py
1
41366
# Copyright Anne M. Archibald 2008 # Released under the scipy license from __future__ import division, print_function, absolute_import from numpy.testing import (assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_, assert_raises) import numpy as np from scipy.spatial imp...
bsd-3-clause
5,765,639,288,397,933,000
30.055556
102
0.572282
false
dtamayo/reboundx
reboundx/test/test_params.py
2
6991
import rebound import reboundx from reboundx import data import unittest import math import numpy as np from ctypes import c_uint, c_uint8, c_uint32, c_uint64 def mycomp(obj1, obj2): if type(obj1) != type(obj2): return False for attr in [attr for attr in dir(obj1) if not attr.startswith('_')]: ...
gpl-3.0
639,382,447,125,849,000
33.438424
112
0.579316
false
nke001/attention-lvcsr
libs/Theano/theano/configdefaults.py
1
25288
import os import sys import logging import theano from theano.configparser import (AddConfigVar, BoolParam, ConfigParam, EnumStr, IntParam, StrParam, TheanoConfigParser) from theano.misc.cpucount import cpuCount from theano.misc.windows import call_subprocess_Popen _logger = logging.g...
mit
-677,660,655,487,862,100
38.5125
79
0.604951
false
cfc603/django-twilio-sms-models
django_twilio_sms/models.py
1
12882
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from django.conf import settings from django.db import models from django.utils.encoding import python_2_unicode_compatible from django_twilio.client import twilio_client from django_twilio.models import Caller from twilio.rest.exceptions im...
bsd-3-clause
5,583,914,624,737,663,000
28.682028
79
0.613957
false
totalgood/twote
twote/models_calendar.py
1
1157
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.core.exceptions import ValidationError class Event(models.Model): ''' This model represents an one-time event ''' title = models.CharField(max_length=255) description = models.Tex...
mit
-7,334,137,260,139,386,000
34.060606
130
0.675886
false
compmem/ptsa
ptsa/data/hdf5wrapper.py
1
10253
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See the COPYING file distributed along with the PTSA package for the # copyright and license terms. # ### ### ### ### ### ### ### #...
gpl-3.0
8,240,189,674,893,211,000
34.477509
84
0.531649
false
shootstar/novatest
nova/tests/cells/test_cells_rpcapi.py
1
21250
# Copyright (c) 2012 Rackspace Hosting # 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 req...
apache-2.0
-8,717,394,188,039,251,000
41.842742
78
0.5344
false
gdraynz/nyuki
nyuki/bus/persistence/memory_backend.py
1
1899
import logging from nyuki.bus.persistence.events import EventStatus from nyuki.bus.persistence.backend import PersistenceBackend log = logging.getLogger(__name__) class FIFOSizedQueue(object): def __init__(self, size): self._list = list() self._size = size def __len__(self): retur...
apache-2.0
-7,991,617,701,439,254,000
24.662162
76
0.567667
false
aristanetworks/arista-ovs-quantum
quantum/plugins/ryu/db/models_v2.py
1
2004
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # 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 #...
apache-2.0
5,778,167,961,306,299,000
36.111111
79
0.63523
false
dNG-git/pas_gapi_core
setup.py
1
2785
# -*- coding: utf-8 -*- """ direct PAS Python Application Services ---------------------------------------------------------------------------- (C) direct Netware Group - All rights reserved https://www.direct-netware.de/redirect?pas;gapi;core The following license agreement remains valid unless any additions or chan...
gpl-2.0
-6,165,827,496,580,687,000
34.253165
130
0.631957
false
gford1000/awssl
examples/wait_state_example.py
1
1277
import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import awssl def wait_state_example(): # Construct states final_state = awssl.Task( Name="FinalState", EndState=True, ResourceArn="arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME") wait_using_sec...
mit
-2,577,020,994,533,087,700
25.061224
82
0.735317
false
KarnUllrich/HDToolsPython
classification.py
1
1403
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides a kNN classier. """ import numpy as np __author__ = ["Karen Ullrich"] __email__ = "karen.ullrich@ofai.at" __version__ = "Dec 2014" def kNN(data, k): ''' Performs kNN. Computes LOOCV accuracy. k ...neighborhood size D ...distance matr...
gpl-2.0
8,126,564,849,569,907,000
22.79661
75
0.577334
false
cullophid/Scienceman
spritesheettest.py
1
1419
import sys, os import pygame from pygame.locals import * from pygame.color import * from gamelib import data class Spritesheet: def __init__(self, filename): self.sheet = pygame.image.load(os.path.join('data',filename)).convert() def imgat(self,rect,colorkey=None): rect = Rect(rect) image = pygame.Surface(rect....
lgpl-2.1
-1,517,194,131,688,636,400
27.38
73
0.674419
false