repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
bx5974/desktop-mirror
ubuntu-edge-indicator.py
2
1976
#!/usr/bin/python from gi.repository import Gtk, GObject from gi.repository import AppIndicator3 as appindicator import urllib, re, os, time, datetime def openit(*args): os.system("xdg-open http://www.indiegogo.com/projects/ubuntu-edge") # both UTC STARTTIME = datetime.datetime(2013, 7, 22, 15, 0, 0) ENDTIME = da...
apache-2.0
5,578,420,800,267,353,000
32.491525
90
0.616903
false
3.00761
false
false
false
DedMemez/ODS-August-2017
building/DistributedToonHouseInterior.py
1
1531
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.building.DistributedToonHouseInterior from direct.distributed.DistributedObject import DistributedObject from toontown.building.HouseInterior import HouseInterior from toontown.toon.DistributedNPCToonBase import DistributedNPCToonBase from ZoneBuil...
apache-2.0
5,008,071,412,437,827,000
33.651163
105
0.664272
false
3.966321
false
false
false
nemanjan00/dnsteal
dnsteal.py
1
2754
#!/usr/bin/env python ##################### import socket import sys import binascii import time import random import hashlib import zlib import os class DNSQuery: def __init__(self, data): self.data = data self.data_text = '' tipo = (ord(data[2]) >> 3) & 15 # Opcode bits if tipo == 0: ...
gpl-2.0
-8,039,776,869,524,454,000
24.036364
125
0.503268
false
3.158257
false
false
false
ubergrape/django-abo
abo/urls.py
1
1114
from django.conf.urls import patterns, url, include from abo.utils import import_backend_modules backend_specific_urls = [] for backend_name, urls in import_backend_modules('urls').items(): simple_name = backend_name.split('.')[-1] backend_specific_urls.append(url(r'^%s/' % simple_name, include(urls))) fro...
bsd-3-clause
8,146,168,260,789,196,000
34.935484
103
0.680431
false
3.448916
false
false
false
google/google-ctf
2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gdbproc.py
1
10484
#!/usr/bin/env python3 # # Copyright 2018 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 ...
apache-2.0
7,243,329,813,426,914,000
27.961326
206
0.596433
false
3.297892
false
false
false
pymir3/pymir3
scripts/plot/plot-feature-track.py
1
1955
import argparse import matplotlib.pyplot as plt import numpy import mir3.data.feature_track as feature_track def plot(input_filename, output_filename, scale=None, dim=0, size=(3.45,2.0)): """Plots the a spectrogram to an output file """ s = feature_track.FeatureTrack().load(input_filename) if s.data...
mit
-158,284,182,649,695,260
29.546875
80
0.611765
false
3.347603
false
false
false
stpettersens/ccsv2sql
ccsv2sql.jy.py
1
4115
#!/usr/bin/env jython """ ccsv2sql Utility to convert a CSV file to a SQL dump. Copyright 2015 Sam Saint-Pettersen. Licensed under the MIT/X11 License. Tweaked for Jython. """ import sys import csv import os import re import datetime import getopt signature = 'ccsv2sql 1.0.6 [Jython] (https://github.com/stpettersens...
mit
1,921,077,044,573,538,000
20.102564
80
0.588092
false
2.712591
false
false
false
TomJKono/Misc_Utils
VCF_from_FASTA_2.py
1
11371
#!/usr/bin/env python """Updated version of VCF_from_FASTA.py that hopefully will simplify the process of generating a VCF from Sanger reads aligned to a reference sequence. Requires Biopython. Assumes the reference sequence is the first one in the alignment. Takes one argument: 1) FASTA multiple sequence alignment...
unlicense
4,340,344,280,166,844,000
39.180212
87
0.619207
false
3.588198
false
false
false
MrYsLab/xideco
xideco/xideco_router/xirt.py
1
5222
#!/usr/bin/env python3 """ Created on January 9 11:39:15 2016 @author: Alan Yorinks Copyright (c) 2016 Alan Yorinks All right reserved. 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...
gpl-3.0
2,343,351,559,959,859,700
32.909091
129
0.634048
false
4.054348
false
false
false
project-asap/IReS-Platform
asap-tools/experiments/depricated/handler/metrics.py
1
1434
__author__ = 'cmantas' from tools import * from json import loads ms = take_single("select metrics from mahout_kmeans_text where k=15 and documents=90300 and dimensions=53235;")[0] mj = loads(ms) cols = iter(["#727272", '#f1595f', '#79c36a', '#599ad3', '#f9a65a','#9e66ab','#cd7058', '#d77fb3']) def timeline2vaslue...
apache-2.0
-2,237,060,242,500,615,200
25.090909
115
0.616457
false
2.822835
false
false
false
astrofrog/ginga
ginga/gtkw/plugins/Thumbs.py
1
16891
# # Thumbs.py -- Thumbnail plugin for fits viewer # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.gtkw import FitsImageGtk as FitsImageGtk from ginga import...
bsd-3-clause
6,413,837,330,964,040,000
34.116424
98
0.558759
false
3.881204
false
false
false
mbudde/mail-indicator
MailIndicator/Debug.py
1
1851
# # Copyright (C) 2009 Michael Budde <mbudde@gmail.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 3 of the License, or # (at your option) any later version. # # This prog...
gpl-3.0
-896,696,041,231,857,900
30.913793
79
0.612642
false
3.687251
false
false
false
madirish/hector
app/scripts/named/named-malware.py
1
10691
import gzip from datetime import datetime import struct, socket import logging import os,sys import MySQLdb import glob import yaml from sys import exc_info appPath = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/../../") sys.path.append(appPath + "/lib/pylib") from pull_config import Configurator c...
gpl-3.0
-2,595,943,497,486,646,300
32.514107
122
0.652418
false
3.681474
true
false
false
mosbasik/buzhug
javasrc/lib/Jython/Lib/test/test_float_jy.py
9
4186
"""Float tests Made for Jython. """ import math import sys import unittest from test import test_support jython = test_support.is_jython class FloatTestCase(unittest.TestCase): def test_float_repr(self): self.assertEqual(repr(12345678.000000005), '12345678.000000006') self.assertEqual(repr(12345...
bsd-3-clause
-1,937,611,315,161,537,500
36.375
89
0.580984
false
3.389474
true
false
false
googlefonts/nototools
nototools/generate_sample_from_exemplar.py
3
21941
#!/usr/bin/env python # Copyright 2015 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.0 # # Unless required by...
apache-2.0
-1,551,522,691,316,249,600
33.771791
88
0.557996
false
3.630212
false
false
false
vijos/jd4
jd4/api.py
1
5806
import json from aiohttp import ClientSession, CookieJar from asyncio import CancelledError, Queue, get_event_loop from appdirs import user_config_dir from os import path from urllib.parse import urljoin from jd4.log import logger _CHUNK_SIZE = 32768 _CONFIG_DIR = user_config_dir('jd4') _COOKIES_FILE = path.join(_CON...
agpl-3.0
3,391,138,550,875,149,300
39.887324
88
0.539786
false
4.391831
false
false
false
NVDARemote/NVDARemote
addon/globalPlugins/remoteClient/local_machine.py
1
3437
import os import wx from . import input import api import nvwave import tones import speech import ctypes import braille import inputCore try: from systemUtils import hasUiAccess except ModuleNotFoundError: from config import hasUiAccess import ui import versionInfo import logging logger = log...
gpl-2.0
3,369,433,582,321,457,000
28.963964
133
0.719814
false
3.314368
false
false
false
dwang159/iris-api
src/iris/sender/quota.py
2
14107
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. from time import time from gevent import spawn, sleep from gevent.lock import Semaphore from collections import deque from datetime import datetime import iris....
bsd-2-clause
8,125,703,374,740,582,000
49.024823
155
0.567945
false
4.372908
false
false
false
ghostx2013/FabricEngine_Backup
Native/ThirdParty/Private/Python/js_beautifier.py
4
22785
import sys import os import exceptions import glob fileTypes = ['.js','.kl','.html'] controls = ['case', 'default', 'do', 'else','for', 'if','while','throw', 'switch', 'catch'] keywords = ['break', 'continue', 'finally', 'return', 'try', 'var', 'with', 'delete', 'new', 'typeof', 'instanceof', '#include'] f...
agpl-3.0
8,105,533,336,471,990,000
30.691238
236
0.560588
false
3.587624
false
false
false
IRI-Research/django-cas-ng
django_cas_ng/utils.py
2
1949
from .cas import CASClient from django.conf import settings as django_settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.utils.six.moves import urllib_parse def get_protocol(request): """Returns 'http' or 'https' for the request protocol""" if request.is_secure(): return 'https' ...
mit
-8,768,147,920,393,516,000
29.936508
86
0.638789
false
3.821569
false
false
false
WillisXChen/django-oscar
src/oscar/apps/customer/utils.py
18
4652
import logging from django.conf import settings from django.contrib.auth.tokens import default_token_generator from django.core.mail import EmailMessage, EmailMultiAlternatives from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes from django.utils.http import urlsafe_base64_encode...
bsd-3-clause
-8,306,801,830,486,856,000
34.242424
79
0.577386
false
4.642715
false
false
false
s20121035/rk3288_android5.1_repo
external/mesa3d/common.py
12
3337
####################################################################### # Common SCons code import os import os.path import re import subprocess import sys import platform as _platform import SCons.Script.SConscript ####################################################################### # Defaults host_platform = ...
gpl-3.0
-422,272,697,593,503,300
31.398058
107
0.635301
false
3.363911
false
false
false
lablup/backend.ai-manager
src/ai/backend/manager/models/scaling_group.py
1
18805
from __future__ import annotations from typing import ( Any, Dict, Sequence, Set, TYPE_CHECKING, Union, ) import uuid import sqlalchemy as sa from sqlalchemy.dialects import postgresql as pgsql from sqlalchemy.engine.row import Row from sqlalchemy.ext.asyncio import AsyncConnection as SAConnec...
lgpl-3.0
5,024,193,378,153,518,000
28.849206
78
0.591811
false
3.916077
false
false
false
geertj/rhevsh
lib/rhevsh/command/disconnect.py
2
1221
# # This file is part of python-rhev. python-rhev is free software that is # made available under the MIT license. Consult the file "LICENSE" that # is distributed together with this file for the exact licensing terms. # # python-rhev is copyright (c) 2010-2011 by the python-rhev authors. See # the file "AUTHORS" for a...
mit
-6,982,907,321,741,989,000
29.525
76
0.659296
false
4.329787
false
false
false
nitely/Spirit
spirit/user/utils/email.py
1
1304
# -*- coding: utf-8 -*- from django.utils.translation import gettext as _ from django.template.loader import render_to_string from djconfig import config from spirit.core.utils import site_url from spirit.core import tasks from .tokens import ( UserActivationTokenGenerator, UserEmailChangeTokenGenerator) #...
mit
9,153,052,069,552,357,000
33.315789
69
0.716258
false
3.725714
false
false
false
l33tdaima/l33tdaima
pr1249m/min_remove_to_make_valid.py
1
1249
class Solution: def minRemoveToMakeValidV1(self, s: str) -> str: matched, stack = set(), list() for i, c in enumerate(s): if c == "(": stack.append(i) elif c == ")" and len(stack) > 0: matched.add(stack.pop()) matched.add(i) ...
mit
1,408,042,470,552,632,300
31.025641
85
0.470777
false
3.375676
false
false
false
mheap/ansible
lib/ansible/plugins/cache/yaml.py
15
1924
# (c) 2017, Brian Coca # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: yaml short_descriptio...
gpl-3.0
4,063,753,266,278,565,000
28.151515
92
0.634615
false
4.016701
false
false
false
b3ngmann/python-pastime
ps5/ps5_recursion.py
1
2868
# 6.00x Problem Set 5 # # Part 2 - RECURSION # # Problem 3: Recursive String Reversal # def reverseString(aStr): """ Given a string, recursively returns a reversed copy of the string. For example, if the string is 'abc', the function returns 'cba'. The only string operations you are allowed to use are ...
mit
-5,427,299,215,341,551,000
31.602273
198
0.636681
false
3.57606
false
false
false
gijs/inasafe
safe_qgis/plugin.py
1
19440
""" InaSAFE Disaster risk assessment tool developed by AusAid - **QGIS plugin implementation.** Contact : ole.moller.nielsen@gmail.com .. note:: 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
2,372,328,170,521,274,000
36.894737
79
0.567438
false
4.771723
false
false
false
percival-detector/cppprocessing
tools/profile_processing.py
1
13073
import re import subprocess import socket import calibration_data_generator as cdg import output_processing as op import datetime def run_the_function(print_result, height, width, repeat, text_file_name, grain_size): path_name= "./data/KnifeQuadBPos1_2_21_int16.h5" top_level_data_set_name= "KnifeQuadBPos1...
apache-2.0
-993,045,515,792,880,100
45.358156
244
0.615849
false
3.15392
false
false
false
vwflow/raws-python
raws_json/rams/service.py
1
2364
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2012 rambla.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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
2,433,817,785,288,375,300
32.295775
111
0.614636
false
4.00678
false
false
false
aemal/westcat
api/rest/resources/codebook.py
2
4226
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
-7,087,378,154,601,933,000
36.070175
92
0.602461
false
4.329918
false
false
false
adbrum/InternetofThings
iot/baseDados/views.py
1
14468
# -*- coding: utf-8 -*- """ :Autor: Adriano Leal :Aluno: 11951 :email: l911911951@alunos.ipbeja.pt """ from django import template from django.http.response import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from iot.models import Equipment, Physic...
gpl-2.0
4,508,458,142,560,889,300
44.974026
112
0.528477
false
3.185381
false
false
false
mleinart/carbon
lib/carbon/tests/test_service.py
10
2820
import exceptions from mock import Mock, patch from unittest import TestCase from carbon import events, state from carbon.pipeline import Processor, run_pipeline from carbon.service import CarbonRootService, setupPipeline from carbon.tests.util import TestSettings class TestSetupPipeline(TestCase): def setUp(self)...
apache-2.0
-5,603,275,408,449,106,000
41.727273
93
0.753546
false
3.624679
true
false
false
Barmaley13/BA-Software
gate/main.py
1
3867
""" Some Main Functions """ ### INCLUDES ### import os import bottle import logging from tornado import ioloop from .common import CWD, TPL_FOLDER, OPTIONS_PARSER from .system import SystemSettings from .web import WebServer from .web.socket import WebsocketManager from .sleepy_mesh import SleepyMeshManager ### CO...
gpl-3.0
6,033,919,358,536,055,000
28.295455
91
0.683993
false
4.171521
false
false
false
nicolas-petit/clouder
clouder_template_mautic/template.py
1
3846
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License with Attribution # ...
gpl-3.0
-5,302,512,788,083,574,000
38.649485
124
0.541082
false
4.087141
true
false
false
bioothod/zbuilder
zbuilder.py
1
7249
#!/usr/bin/python import argparse import docker import json import logging import os import shutil import sys logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', level=logging.INFO) class zbuilder(): def __init__(self, config): js = json.load(config) self.docker_files = [] ...
apache-2.0
5,666,204,978,273,247,000
37.973118
110
0.497448
false
4.241662
false
false
false
libretees/libreshop
libreshop/addresses/views.py
1
1420
import logging from django.contrib.gis.geoip2 import GeoIP2 from django.views.generic import FormView from ipware.ip import get_real_ip from .forms import AddressForm # Initialize logger. logger = logging.getLogger(__name__) # Create your views here. class AddressFormView(FormView): template_name = 'addresses/ad...
gpl-3.0
-5,674,709,576,269,259,000
29.869565
80
0.680986
false
3.955432
false
false
false
what-studio/profiling
profiling/sampling/samplers.py
1
3407
# -*- coding: utf-8 -*- """ profiling.sampling.samplers ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2014-2017, What! Studio :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import functools import signal import sys import threading import weakref import six.moves._...
bsd-3-clause
-1,046,786,313,325,832,400
29.693694
78
0.6199
false
3.858437
false
false
false
tmrts/Solomon
config/schema.py
1
2279
#!/usr/bin/python # -*- coding: utf-8 -*- import psycopg2 import sys con = None try: con = psycopg2.connect(host="localhost", dbname="solomon_db", user="solomon_user", password="solomon") cur = con.cursor() cur.execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"') cur.execute('DRO...
gpl-2.0
8,207,408,570,716,270,000
38.696429
106
0.442299
false
5.324766
false
true
false
WebAssembly/binaryen
check.py
2
16499
#!/usr/bin/env python3 # # Copyright 2015 WebAssembly Community Group participants # # 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 # # Unles...
apache-2.0
290,767,472,295,077,600
40.982188
183
0.601491
false
3.472743
true
false
false
eliasrg/SURF2017
code/separate/coding/source/__init__.py
1
5800
# Copyright (c) 2017 Elias Riedel Gårding # Licensed under the MIT License import numpy as np from scipy.interpolate import interp1d from scipy.signal import convolve import matplotlib.pyplot as plt from . import lloyd_max class Encoder: def __init__(self, sim, tracker): self.sim = sim self.track...
mit
-8,962,764,819,531,782,000
31.216667
91
0.565442
false
3.111052
false
false
false
khundman/facetview
agu/agu_scrape.py
1
1881
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_conditions as EC import time output = "/users/hundman/documents/data_science/hyspiri_search/facetview-hyspiri-public...
apache-2.0
5,617,017,469,024,694,000
29.852459
146
0.624668
false
2.952904
false
false
false
kervi/kervi
kervi-hal-win/kervi/platforms/windows/gpio.py
2
1575
from kervi.hal.gpio import IGPIODeviceDriver class GPIODriver(IGPIODeviceDriver): def __init__(self, gpio_id="generic_gpio"): IGPIODeviceDriver.__init__(self, gpio_id) pass def _get_channel_type(self, channel): from kervi.hal.gpio import CHANNEL_TYPE_GPIO, CHANNEL_TYPE_ANALOG_IN, CHA...
mit
-6,191,158,839,289,138,000
27.636364
101
0.604444
false
3.32981
false
false
false
pombredanne/pyelftools
elftools/elf/constants.py
1
3168
#------------------------------------------------------------------------------- # elftools: elf/constants.py # # Constants and flags, placed into classes for namespacing # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #---------------------------------------------------------------------------...
unlicense
5,769,264,028,461,571,000
24.344
80
0.651515
false
2.452012
false
false
false
bmi-forum/bmi-pyre
Snac/pyre/SnacCoupler.py
5
1655
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # <LicenseText> # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # def coupler(name="coupler", facility="coupler"): return Coupler(name, facility) from pyre.components.Com...
gpl-2.0
263,631,159,940,753,440
17.595506
80
0.567976
false
3.857809
false
false
false
kugan49/xbmc-betaseries
service.subtitles.betaseries/service.py
2
19136
# -*- coding: utf-8 -*- import xbmc, xbmcaddon, xbmcgui, xbmcplugin, xbmcvfs import os, sys, re, string, urllib, urllib2, socket, unicodedata, shutil, time, platform import simplejson as json __addon__ = xbmcaddon.Addon() __addonid__ = __addon__.getAddonInfo('id') __addonname__ = __addon__.getAddonInfo...
gpl-2.0
4,025,818,231,595,275,000
40.690632
187
0.536685
false
3.764706
false
false
false
jetz/sqlmapcli
sqlmapcli/task.py
1
8132
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ----------------------------------------------------- @post('/scan/<taskid>/start') @get('/scan/<taskid>/stop') @get('/scan/<taskid>/kill') @get('/scan/<taskid>/status') @get('/scan/<taskid>/data') ----------------------------------------------------- """ import time...
mit
1,762,396,039,140,903,200
26.659864
88
0.522258
false
4.222222
false
false
false
jaqx0r/fengshui
rack2tex.py
1
3011
#!/usr/bin/python import rack import string class RackView: def __init__(self, name): self.options = [] self.name = name # output variable self.o = [] self.notes = [] self.images = [] self.checklist = [] def render(self, thing): """ @param thing: the rack or rackarray to be drawn """ self....
gpl-2.0
1,538,439,439,429,373,400
24.091667
98
0.608768
false
2.674067
false
false
false
vipersnh/regbank_reader
client/widgets/status_bar.py
1
1872
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './client/widgets/status_bar.ui' # # Created: Thu Sep 17 23:50:20 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fro...
gpl-2.0
-3,422,909,493,384,256,500
40.6
127
0.711004
false
3.875776
false
false
false
jonhadfield/ansible
lib/ansible/module_utils/issh.py
5
5367
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # This file is part of Ansible # # Ansible 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 late...
gpl-3.0
3,679,719,289,842,315,300
26.664948
82
0.611515
false
4.154025
false
false
false
kgullikson88/IGRINS_Scripts
CheckSystematics.py
1
2096
from __future__ import print_function from collections import defaultdict from astropy.io import fits import numpy as np import pandas as pd import matplotlib.pyplot as plt def telluric_systematics(file_list, header_kw='HUMIDITY', plot=True, ref_num=10): """ Find the average change in the requested header ke...
mit
-4,900,011,001,830,106,000
37.814815
100
0.668893
false
3.729537
false
false
false
jmp1985/metrix-database
database.py
1
1371
from __future__ import division class MetrixDB(object): ''' A high level class to perform operations on the metrix database ''' def __init__(self, overwrite=False): ''' Initialise the database ''' from metrix_db.initialiser import Initialiser initialiser = Initialiser(overwrite=overwrite...
bsd-2-clause
1,228,949,856,530,809,000
23.482143
67
0.645514
false
3.646277
false
false
false
markvl/acrylamid
acrylamid/views/tag.py
2
3986
# -*- encoding: utf-8 -*- # # Copyright 2012 Martin Zimmermann <info@posativ.org>. All rights reserved. # License: BSD Style, 2 clauses -- see LICENSE. import math import random from collections import defaultdict from acrylamid.compat import iteritems from acrylamid.helpers import expand, safeslug, hash from acryla...
bsd-2-clause
2,275,150,804,303,033,000
31.942149
94
0.580281
false
3.84378
false
false
false
tudorian/eden
modules/s3db/vol.py
2
28816
# -*- coding: utf-8 -*- """ Sahana Eden Volunteers Management (Extends modules/eden/hrm.py) @copyright: 2012-15 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
mit
3,607,100,593,541,855,700
41.005831
117
0.420391
false
5.100177
false
false
false
dandanvidi/in-vivo-enzyme-kinetics
scripts/handle_fluxomics.py
3
7038
# -*- coding: utf-8 -*- """ Created on Thu Apr 14 17:15:01 2016 @author: dan """ import re, pulp import pandas as pd import matplotlib.pyplot as plt from cobra.io.sbml import create_cobra_model_from_sbml_file from cobra.manipulation.modify import convert_to_irreversible #from ..scripts.despine_axes import despine de...
mit
-7,854,915,232,658,990,000
39.217143
100
0.603581
false
2.68626
false
false
false
PLyczkowski/Sticky-Keymap
2.74/scripts/addons/io_convert_image_to_mesh_img/import_img.py
8
23824
# ##### 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-2.0
3,059,977,963,649,307,000
32.413745
103
0.569384
false
3.755951
false
false
false
ubc/compair
alembic/versions/3f3dd5a97fc7_added_practice_column_to_answers.py
1
1598
"""Added practice column to answers Revision ID: 3f3dd5a97fc7 Revises: 17b7bd2e218c Create Date: 2016-08-19 12:55:40.174238 """ # revision identifiers, used by Alembic. revision = '3f3dd5a97fc7' down_revision = '17b7bd2e218c' from alembic import op import sqlalchemy as sa from compair.models import convention def...
gpl-3.0
-2,098,296,261,962,190,800
29.169811
115
0.654568
false
3.315353
false
false
false
pitrou/numba
numba/objmode.py
3
20724
""" Lowering implementation for object mode. """ from __future__ import print_function, division, absolute_import from llvmlite.llvmpy.core import Type, Constant import llvmlite.llvmpy.core as lc from . import cgutils, generators, ir, types, utils from .errors import ForbiddenConstruct from .lowering import BaseLowe...
bsd-2-clause
-6,673,226,271,149,968,000
35.357895
82
0.553465
false
3.913142
false
false
false
lociii/symcon-index
symcon/models.py
1
7636
# -*- coding: UTF-8 -*- import markdown from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils.choices import Choices from symcon import querysets from symcon.common.util.markdown import MarkDownToHtml class Repository(models.Model): user = models.CharField(max_leng...
mit
-7,060,074,287,676,643,000
40.053763
99
0.660424
false
4.012612
false
false
false
unioslo/cerebrum
servers/cis/SoapPostmasterServer.py
1
7241
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011, 2012 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 ...
gpl-2.0
7,271,564,093,782,399,000
32.836449
79
0.65502
false
3.92892
false
false
false
jriehl/numba
numba/tests/test_inlining.py
1
8956
from __future__ import print_function, absolute_import import re import numpy as np from .support import TestCase, override_config, captured_stdout import numba from numba import unittest_support as unittest from numba import jit, njit, types, ir, compiler from numba.ir_utils import guard, find_callname, find_const, ...
bsd-2-clause
2,180,229,305,516,285,200
38.280702
107
0.579276
false
3.870354
true
false
false
polltooh/CNN_LSTM
autoencoder_clstm.py
1
5975
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange import tensorflow as tf import utility_function as uf # import my_seq2seq as mseq import os import data_queue import nt import time import con_lstm as clstm R...
mit
5,912,634,475,341,728,000
34.778443
97
0.669623
false
2.63448
false
false
false
glwu/python-for-android
python-modules/twisted/twisted/protocols/mice/mouseman.py
81
2882
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """Logictech MouseMan serial protocol. http://www.softnco.demon.co.uk/SerialMouse.txt """ from twisted.internet import protocol class MouseMan(protocol.Protocol): """ Parser for Logitech MouseMan serial mouse protocol (comp...
apache-2.0
1,402,906,385,291,070,500
21.692913
66
0.535392
false
3.792105
false
false
false
fxdgear/beersocial
socialbeer/core/migrations/0002_auto__add_field_challenge_description.py
1
4396
# encoding: 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 'Challenge.description' db.add_column('core_challenge', 'description', self.gf('django.db.m...
mit
-2,602,980,566,242,846,700
61.8
182
0.557097
false
3.776632
false
false
false
iamgroot42/braindump
tests/test_selenium.py
1
2598
import re import threading import time import unittest from selenium import webdriver from app import create_app, db from app.models import User class SeleniumTestCase(unittest.TestCase): client = None @classmethod def setUpClass(cls): # start Firefox try: cls.client = webdriv...
mit
-2,157,156,705,062,835,200
27.866667
68
0.565435
false
4.456261
true
false
false
yeming233/rally
rally/plugins/openstack/scenario.py
1
5147
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-7,827,861,981,665,258,000
37.125926
78
0.584224
false
4.433247
false
false
false
ccgeom/ccg-notes
src/ccgeom/manifold.py
1
3377
import numpy as np # following the idea of halfedge data structure on David Gu's lecture # https://www3.cs.stonybrook.edu/~gu/lectures/lecture_8_halfedge_data_structure.pdf # and adapt it to a numpy friendly representatives # * vertexes: all position of each vertex # * faces: all position of each centroid of faces # ...
cc0-1.0
9,013,381,987,743,515,000
32.117647
111
0.588688
false
3.584926
false
false
false
bmi-forum/bmi-pyre
pythia-0.8/packages/pyre/pyre/idd/RecordLocator.py
2
2248
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
gpl-2.0
4,583,188,842,701,710,300
21.039216
94
0.501335
false
4.331407
false
false
false
andimiller/twistedbot
modules/ponycountdown.py
5
1786
from datetime import datetime def nextponies(): times = [ (datetime(2011, 11, 12, 15),2,6,"The Cutie Pox"), (datetime(2011, 11, 19, 15),2,7,"May the Best Pet Win!"), (datetime(2011, 11, 26, 15),2,8,"The Mysterious mare do Well"), (datetime(2011, 12, 3, 15),2,9,"Swee...
mit
3,177,056,112,800,926,000
50.028571
102
0.537514
false
2.862179
false
false
false
MTgeophysics/mtpy
examples/cmdline/visualize_modem_models.py
1
4816
# -*- coding: utf-8 -*- """ Plot PTMap|RMSMap|Response|DepthSlice from Inversion Model Results Created on Tue Oct 04 13:13:29 2016 @author: Alison.Kirkby@ga.gov.au @author: Fei.zhang@ga.gov.au Test Run: python examples/scripts/visualize_modem_models.py ./examples/data/ModEM_files/VicSynthetic07 """ import os i...
gpl-3.0
-8,616,802,495,226,071,000
32.915493
121
0.633929
false
3.081254
false
false
false
beni55/sympy
examples/advanced/autowrap_integrators.py
20
9070
#!/usr/bin/env python """ Numerical integration with autowrap ----------------------------------- This example demonstrates how you can use the autowrap module in SymPy to create fast, numerical integration routines callable from python. See in the code for detailed explanations of the various steps. An autowrapped sy...
bsd-3-clause
-3,957,990,686,785,907,000
39.311111
83
0.642889
false
3.899398
false
false
false
2014c2g2/2014c2
wsgi/static/Brython2.1.0-20140419-113919/Lib/inspect.py
91
78882
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module:...
gpl-2.0
-3,654,882,928,471,189,500
37.033751
84
0.588411
false
4.555703
false
false
false
gtagency/roscorobot
Corobot/corobot_arm/nodes/parallel_gripper_controller.py
1
3967
#!/usr/bin/env python """ parallel_gripper_controller.py - controls a gripper built of two servos Copyright (c) 2011 Vanadium Labs LLC. All right reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Re...
gpl-2.0
5,491,262,526,570,646,000
42.593407
83
0.670028
false
4.106625
false
false
false
JaDogg/__py_playground
reference/sketchbook/misc/primesieve.py
1
1135
# Let's try rendering the outline from # http://en.literateprograms.org/Sieve_of_Eratosthenes_(Haskell)#Putting_it_together # But I had to peek at their code for merge_all(). # (Could we make diff/merge shorter using Kragen's post on merging?) # (Or how about defining diff in terms of merge and complement?) def diff(x...
mit
2,611,252,358,811,437,000
28.868421
92
0.623789
false
3.059299
false
false
false
eleonrk/SickRage
lib/feedparser/encodings.py
19
12215
# Character encoding routines # Copyright 2010-2015 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following condi...
gpl-3.0
-1,332,576,937,644,737,500
42.781362
114
0.665411
false
3.839987
false
false
false
abalakh/robottelo
tests/foreman/cli/test_errata.py
1
15389
# pylint: disable=too-many-public-methods """CLI Tests for the errata management feature""" # For ease of use hc refers to host-collection throughout this document from robottelo.decorators import stubbed from robottelo.test import CLITestCase class ErrataTestCase(CLITestCase): """CLI Tests for the errata manag...
gpl-3.0
3,391,724,014,069,024,000
21.465693
79
0.584248
false
3.796004
true
false
false
zverevalexei/trex-http-proxy
trex_client/stf/trex_stf_lib/text_opts.py
4
5153
import json import re TEXT_CODES = {'bold': {'start': '\x1b[1m', 'end': '\x1b[22m'}, 'cyan': {'start': '\x1b[36m', 'end': '\x1b[39m'}, 'blue': {'start': '\x1b[34m', 'end': '\x1b[39m'}, 'red': {'start': '\x1b[...
mit
-12,226,227,152,173,916
25.838542
111
0.465554
false
3.396836
false
false
false
wesleywerner/conspire
src/view.py
1
31498
import os import textwrap import random import pygame from pygame.locals import * from const import * FRAMERATE = 30 CANVAS_SIZE = (600, 600) TEXT = (124, 164, 128) BORDER = (64, 80, 116) TRANSPARENT = (255, 0, 255) BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 220, 0) BLUE = (0, 0, 220) PURP...
gpl-3.0
-8,907,586,306,427,302,000
33.199783
111
0.518509
false
3.798143
false
false
false
davidsanchez/CTAtools
Script/SimulSelectedFrom3FHL.py
1
5367
#Created to read salvatore table, read 3FHL data and etrapolated (Using Biteau prescription) and simulate with CTOOLS # Made for Rio 2017. # author David Sanchez david.sanchez@lapp.in2p3.fr # Gate Florian # Piel Quentin # ------ Imports --------------- # import numpy,math,pyfits,os,sys from Plot.PlotLibrary import * ...
gpl-3.0
5,488,889,861,555,646,000
32.335404
167
0.6376
false
3.072124
true
false
false
nagakawa/x801
tools/autostitch.py
1
2633
# Texture Stitcher for x801 # Usage: python3 tools/autostitch.py assets/textures/terrain/blocks asset-src/textures/terrain/gimpfiles/blocknames.tti assets/textures/terrain/blocks.tti asset-temp/textures/terrain/gimpfiles import argparse import fparser import pathlib import re import readtable from PIL import Image p...
agpl-3.0
3,161,928,597,332,988,400
27.945055
193
0.664261
false
3.058072
false
false
false
lisette-espin/mrqap
libs/mrqap.py
1
11208
__author__ = 'espin' ####################################################################### # Dependencies ####################################################################### import sys import collections import numpy as np import pandas import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from...
cc0-1.0
-841,634,498,972,020,200
36.864865
223
0.49536
false
3.876859
true
false
false
MattWellie/FastqSimulator
excel_out_comparison.py
1
15258
import cPickle import os import re from openpyxl import load_workbook import xlsxwriter __author__ = 'mwelland' class VCFComparison: def __init__(self, run_number, variant_dict, vcf_dir): self.vcf_file = os.path.join(vcf_dir, '{}_anno.vcf.hg19_multianno.vcf'.format(run_number)) self.run_number =...
gpl-2.0
-1,666,488,385,200,868,000
45.66055
118
0.5116
false
4.169992
false
false
false
telwertowski/QGIS
python/plugins/processing/algs/qgis/Aggregate.py
15
11386
# -*- coding: utf-8 -*- """ *************************************************************************** Aggregate.py --------------------- Date : February 2017 Copyright : (C) 2017 by Arnaud Morvan Email : arnaud dot morvan at camptocamp dot com ***********...
gpl-2.0
-4,547,797,799,809,260,000
39.810036
119
0.51739
false
5.298278
false
false
false
BIO-DIKU/SeqScan
ReferenceSRC/sfm_python.py
1
6471
#!/usr/bin/python ##################################### class SequenceUnit: """ A pattern unit with a prespecified sequence and, possibly, an allowed number of mismatches, insertions, and deletions. """ def __init__(self, seq, M, I, D): self.sequence = seq self.M = M self....
gpl-2.0
-5,171,004,589,815,847,000
28.958333
131
0.603462
false
3.309974
false
false
false
SSGL-SEP/t-sne_cruncher
test/subprocesses/test_subprocess_output.py
1
2385
from unittest import TestCase, mock import os import numpy from subprocesses.dimensionality_reduction import _get_colors, plot_results class TestColorMapping(TestCase): def setUp(self): self.manhattan = [6, 11, -1, 21, 14] self.arr = numpy.asarray([[1, 2, 3], [2, 5, 4], [3, 4, -8], [4, 11, 6], [...
mit
3,842,694,288,443,195,000
39.423729
88
0.495597
false
3.581081
true
false
false
xavfernandez/pip
src/pip/_internal/commands/download.py
7
5007
# The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False from __future__ import absolute_import import logging import os from pip._internal.cli import cmdoptions from pip._internal.cli.cmdoptions import make_target_python from pip._internal.cli.req_command import Req...
mit
-5,579,505,478,624,617,000
33.061224
79
0.611544
false
4.225316
false
false
false
rdio/sentry
src/sentry/manager.py
1
34892
""" sentry.manager ~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import datetime import hashlib import logging import time import warnings import uuid from celery.signals import task_p...
bsd-3-clause
8,448,772,539,851,207,000
32.712077
125
0.547088
false
4.165712
false
false
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/io/stata.py
7
82769
""" Module contains tools for processing Stata files into DataFrames The StataReader below was originally written by Joe Presbrey as part of PyDTA. It has been extended and improved by Skipper Seabold from the Statsmodels project who also developed the StataWriter and was finally added to pandas in a once again improv...
gpl-3.0
-911,198,936,538,238,300
35.574901
90
0.544443
false
3.938943
false
false
false
ComputerNetworks-UFRGS/OpERA
python/app/simpleSS.py
1
15314
#!/usr/bin/env python """ Copyright 2013 OpERA 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...
apache-2.0
-8,469,623,994,222,200,000
27.150735
118
0.547146
false
4.106731
false
false
false
tension/shadowsocks
server.py
2
1689
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 breakwall # # 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
-303,056,126,023,824,800
24.984615
85
0.718769
false
3.324803
false
false
false
Heufneutje/PyHeufyBot
heufybot/modules/commands/event.py
1
13414
from twisted.internet.task import LoopingCall from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from heufybot.utils import isNumber, networkName from heufybot.utils.timeutils import now, strftimeWithTimezone, timeDeltaString from ...
mit
7,352,617,542,097,835,000
55.125523
120
0.537424
false
4.43145
false
false
false
nexdatas/writer
test/NXSDataWriterH5Cpp_test.py
1
207726
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gpl-3.0
-2,483,284,254,181,963,300
40.044458
79
0.535316
false
3.876787
false
false
false
hemmerling/codingdojo
src/game_of_life/python_coderetreat_berlin_2014-09/python_legacycrberlin02/gol02.py
1
1049
2#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Administrator # # Created: 08/10/2011 # Copyright: (c) Administrator 2011 # Licence: <your licence> #-------------------------------------------------------------------...
apache-2.0
3,356,558,385,341,113,300
24.275
81
0.467112
false
4.444915
false
false
false
ojii/gitstats.ep.io
src/stats/migrations/0001_initial.py
1
1658
# encoding: 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 model 'Repository' db.create_table('stats_repository', ( ('id', self.gf('django.db.mo...
bsd-3-clause
-6,306,751,295,875,368,000
41.512821
122
0.583836
false
3.725843
false
false
false
search5/nanumlectures
lib/requests_toolbelt/_compat.py
17
9464
"""Private module full of compatibility hacks. Primarily this is for downstream redistributions of requests that unvendor urllib3 without providing a shim. .. warning:: This module is private. If you use it, and something breaks, you were warned """ from collections import Mapping, MutableMapping import sys ...
apache-2.0
-1,728,486,609,376,456,400
29.529032
79
0.588123
false
4.325411
false
false
false
Karkus476/flexlay
flexlay/gui/editor_map_component.py
1
7602
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.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 3 of the License, or # (at your option)...
gpl-3.0
6,706,988,355,870,626,000
31.211864
80
0.62181
false
3.357774
false
false
false
jameshensman/pyvb
src/pyvb/nodes/nodes_todo.py
1
7789
# -*- coding: utf-8 -*- # Copyright 2009 James Hensman and Michael Dewar # Licensed under the Gnu General Public license, see COPYING import numpy as np import node from scipy import special #needed for calculating lower bound in Gamma, Wishart class ConjugacyError(ValueError): def __init__(self,message): ValueErro...
gpl-3.0
-6,679,971,533,538,718,000
31.323651
212
0.673899
false
2.771886
false
false
false
varunarya10/rally
tests/unit/cmd/test_manage.py
2
1958
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-3,202,771,024,890,421,000
32.186441
78
0.670072
false
3.824219
true
false
false
markEarvin/password-tracker
plugins/settings/controllers/settings.py
1
1102
import ferris from ..models.setting import Setting import datetime from google.appengine.api import memcache class Settings(ferris.Controller): class Meta: prefixes = ('admin',) components = (ferris.scaffold.Scaffolding,) Model = Setting def startup(self): self.context['settin...
mit
8,638,258,176,234,224,000
32.393939
198
0.680581
false
4.190114
false
false
false