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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bigswitch/nova | nova/notifications.py | 1 | 15437 | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
# Copyright 2013 Red Hat, 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/lice... | apache-2.0 | -7,944,843,228,296,015,000 | 33.689888 | 79 | 0.615081 | false | 4.10777 | false | false | false |
Azure/azure-sdk-for-python | sdk/graphrbac/azure-graphrbac/tests/test_graphrbac.py | 1 | 8439 | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#---------------------------------------------------------------------... | mit | -7,201,706,950,653,175,000 | 37.701835 | 115 | 0.601162 | false | 4.011888 | true | false | false |
jjlee/git-meld-index | setup.py | 1 | 1882 | #!/usr/bin/env python
import ast
import codecs
from setuptools import setup
def read_text(path):
with codecs.open(path, "r", "utf-8") as fh:
return fh.read()
def read_version(path):
with open(path) as fh:
for line in fh:
stripped = line.strip()
if stripped == "" or ... | gpl-2.0 | 6,906,737,977,692,128,000 | 25.507042 | 77 | 0.571201 | false | 3.764 | false | false | false |
google/hypebot | hypebot/plugins/league/summoner_lib.py | 1 | 12403 | # Copyright 2018 The Hypebot 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 applicabl... | apache-2.0 | -3,853,912,355,005,328,000 | 36.584848 | 80 | 0.622188 | false | 3.243462 | false | false | false |
gsmke/django-leaf | leaf/tests/test_page.py | 1 | 2974 | import os
import pytest
from model_mommy import mommy
@pytest.mark.parametrize('value', (
'',
'/',
'/test/test2',
'/test/test2/',
))
def test_strip_trailing_slash(value):
from leaf.page import strip_trailing_slash
assert not strip_trailing_slash(value).endswith('/')
@pytest.mark.parametrize... | bsd-3-clause | 1,072,196,295,359,407,600 | 22.417323 | 81 | 0.624748 | false | 3.379545 | true | false | false |
felgari/k2 | aptrend.py | 1 | 2851 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Felipe Gallego. All rights reserved.
#
# This 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 ... | gpl-3.0 | 607,653,928,808,055,200 | 32.952381 | 102 | 0.558401 | false | 3.346244 | false | false | false |
protwis/protwis | angles/migrations/0011_auto_20200402_1344.py | 1 | 1225 | # Generated by Django 2.0.8 on 2020-04-02 11:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('angles', '0010_residueangle_tau_angle'),
]
operations = [
migrations.AddField(
model_name='residueangle',
name='chi1... | apache-2.0 | -1,172,428,415,425,360,100 | 27.488372 | 60 | 0.54449 | false | 4.253472 | false | false | false |
protwis/protwis | build/management/commands/parse_excel_annotations.py | 1 | 23312 | from django.core.management.base import BaseCommand, CommandError
from django.core.management import call_command
from django.conf import settings
from django.db import connection
from common.alignment import Alignment, ClosestReceptorHomolog
from protein.models import Protein, ProteinSegment
from structure.models imp... | apache-2.0 | 7,577,168,397,185,332,000 | 42.090573 | 132 | 0.506992 | false | 3.752133 | false | false | false |
bwhite/picarus | server/holding/faces.py | 1 | 2228 | elif action == 'i/faces':
# TODO: Temporary, remove when done
names = set(['George_W_Bush', 'Colin_Powell', 'Tony_Blair', 'Donald_Rumsfeld', 'Gerhard_Schroeder',
'Ariel_Sharon', 'Hugo_Chavez', 'Junichiro_Koizumi', 'Serena_Williams', 'John_Ashcroft... | apache-2.0 | -8,709,221,514,537,708,000 | 52.047619 | 136 | 0.374327 | false | 4.565574 | false | false | false |
trondkr/OceanLight | IOwrite.py | 1 | 2407 | from datetime import datetime, timedelta
from netCDF4 import Dataset
from netCDF4 import num2date
import numpy as np
import time
import os
__author__ = 'Trond Kristiansen'
__email__ = 'trond.kristiansen@imr.no'
__created__ = datetime(2014, 1, 23)
__modified__ = datetime(2014, 1, 23)
__version__ = "0.1"
__status... | mit | -4,307,165,508,289,405,400 | 31.093333 | 111 | 0.607811 | false | 3.09383 | false | false | false |
tkolhar/robottelo | robottelo/ui/role.py | 1 | 2544 | # -*- encoding: utf-8 -*-
"""Implements Roles UI."""
from robottelo.constants import FILTER
from robottelo.ui.base import Base, UIError
from robottelo.ui.locators import common_locators, locators, tab_locators
from robottelo.ui.navigator import Navigator
from selenium.webdriver.support.select import Select
class Role... | gpl-3.0 | -7,250,490,926,521,367,000 | 36.411765 | 76 | 0.584513 | false | 4.282828 | false | false | false |
lehins/django-wepay | djwepay/models.py | 1 | 14141 | """All models are direct mappings to the WePay objects. By default only the
fields that correspond to the values returned from WePay lookup calls
(ex. `/account <https://www.wepay.com/developer/reference/account#lookup>`_) are
included in the models. All fields follow the rules outlined in `Storing Data
<https://www.we... | mit | -1,835,955,764,543,517,700 | 39.173295 | 87 | 0.702779 | false | 3.668223 | false | false | false |
tobykurien/MakerDroid | assetsrc/public.mp3/skeinforge/skeinforge_tools/craft_plugins/comb.py | 1 | 18588 | """
This page is in the table of contents.
Comb is a script to comb the extrusion hair of a gcode file.
The comb manual page is at:
http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Comb
Comb bends the extruder travel paths around holes in the slices, to avoid stringers. It moves the extruder to the insid... | gpl-3.0 | 2,445,846,317,411,144,000 | 43.257143 | 642 | 0.755918 | false | 3.327009 | false | false | false |
wildfish/django-nodetest | nodetest/utils.py | 1 | 1140 | from os.path import join
from uuid import uuid4
from shutil import copyfile
_js_repl = """;(function () {
var repl = require('repl');
var os = require('os');
var empty = '(' + os.EOL + ')';
repl.start({
prompt: "NODE> ",
eval: function (cmd, context, filename, callback) {
i... | bsd-3-clause | -7,775,578,083,173,779,000 | 22.75 | 65 | 0.536842 | false | 3.275862 | false | false | false |
programa-stic/barf-project | barf/core/reil/emulator/memory.py | 1 | 7471 | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | bsd-2-clause | 517,048,683,388,702 | 30.259414 | 95 | 0.549458 | false | 4.575015 | false | false | false |
PySimulator/PySimulator | PySimulator/Plugins/SimulationResult/__init__.py | 1 | 1172 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
def get_immediate_subdirectories(directory):
return [name for name in os.listdir(directory) if os.path.isdir(os.path.join(directory, name)) and name[0] != '.']
PlugInNames = get_immediate_subdirectories(os.path.abspath(os.path.dirname(__file__)))
plugin =... | lgpl-3.0 | -7,544,794,805,492,171,000 | 38 | 125 | 0.625641 | false | 3.362069 | false | false | false |
tsw-apropos/mapbiographer | mapBiographer/polygon_tool.py | 1 | 7016 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
lmbMapToolPolygon
A QGIS plugin
Effectively onduct direct to digital map biographies and traditional land
use studies
-------------------
begi... | gpl-2.0 | 3,999,823,729,145,701,000 | 34.434343 | 106 | 0.428877 | false | 4.968839 | false | false | false |
rahul-x-verma/Polaris | polaris/static/algorithm/map.py | 1 | 1660 | from pprint import pprint
class Map():
"""
Stores a map of the transit system in a graph data structure. Each vertex
represents one bus stopping at a given geographical location. Each edge
represents the time between one stop and the next (including waiting time if
applicable).
"""
def __i... | apache-2.0 | -4,744,783,799,445,522,000 | 26.213115 | 80 | 0.506627 | false | 4.450402 | false | false | false |
sarthak2108/AI-Projects | Minesweeper/convert2CNF.py | 1 | 4718 | import sys
def parse_file(filepath):
############################################
# Read the layout file to the board array.
# Note how the order in which the rows are
# read is reversed in the final array. This
# accomodates the requirement that positions
# arenumbered from the bottom left.
... | mit | 3,087,753,827,598,349,000 | 35.015267 | 79 | 0.481984 | false | 4.102609 | false | false | false |
ctn-waterloo/nengo_pushbot | examples/robot_control_keyboard.py | 1 | 1082 | # control the motors of the robot
# also contains code for connecting to SpiNNaker
import nengo
spinnaker = False
import nengo_pushbot
import numpy as np
model = nengo.Network(label='pushbot')
with model:
input = nengo.Node([0,0], label='keyboard')
#a = nengo.Ensemble(500, dimensions=2, label='a')
if... | mit | -546,890,297,734,732,860 | 21.081633 | 87 | 0.631238 | false | 2.854881 | false | false | false |
Arkapravo/morse-0.6 | src/morse/geolandloader/geoShapefileLoader.py | 1 | 13736 | import shapelib, dbflib
import Blender
from Blender import *
import math
from math import sqrt
#
# The the shapefile module
#
# SHAPELIB Object Types
#----------------------------------------------
#define SHPT_NULL 0
#----------------------------------------------
#2D Shape Types (pre ArcView 3.x):... | bsd-3-clause | -1,722,526,847,447,420,700 | 41.395062 | 150 | 0.564939 | false | 3.491612 | false | false | false |
moonboy13/brew-journal | brew_journal/recipies/migrations/0002_auto_20160224_0318.py | 1 | 1120 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('recipies', '0001_initial'),
]
op... | apache-2.0 | -6,611,607,104,091,185,000 | 30.111111 | 100 | 0.590179 | false | 4.242424 | false | false | false |
josh314/sf-crime | universal-probs.py | 1 | 1553 | ######################################################################
# A benchmark script which assigns same probabilities to each test set member.
# Probabilities are determined by the relative fraction of a category of
# crime to the total number of crimes in the training set.
######################################... | cc0-1.0 | -1,150,541,506,081,730,200 | 34.295455 | 78 | 0.678042 | false | 3.787805 | true | false | false |
CharKwayTeow/uci-webreg-crawler | python/download_all_courses_in_a_department.py | 1 | 1253 | #!/usr/bin/python
# This is a script to download course lists of a department in all quarters.
# Usage: python download_all_courses_in_a_department.py department_name
# Example: python download_all_courses_in_a_department.py COMPSCI
import urllib2, sys, os, string
def find_between( s, first, last ):
try:
... | gpl-2.0 | -5,043,633,817,063,758,000 | 28.139535 | 121 | 0.663208 | false | 3.148241 | false | false | false |
hellohaptik/chatbot_ner | ner_v1/detectors/pattern/pnr/pnr_detection.py | 1 | 12091 | from __future__ import absolute_import
import re
from ner_v1.detectors.base_detector import BaseDetector
from language_utilities.constant import ENGLISH_LANG
class PNRDetector(BaseDetector):
"""Detects PNR (serial) codes (Passenger Record Number, usually present with train or flight bookings) in given text
a... | gpl-3.0 | 1,228,918,726,222,171,000 | 40.12585 | 120 | 0.619055 | false | 3.979921 | false | false | false |
fos/fos-legacy | fos/core/actor.py | 1 | 8156 | import numpy as np
from fos.actor.primitives import AABBPrimitive
from pyglet.gl import GLfloat
from pyglet.gl import *
class Actor(object):
""" Define a visualization object in Fos """
def __init__(self,
affine = None,
aabb = None,
force_center_data = F... | bsd-3-clause | 8,687,800,132,622,186,000 | 31.624 | 100 | 0.538009 | false | 4.119192 | false | false | false |
zesty/sgraph | test_sgraph.py | 1 | 1807 | #! env python3
import unittest
import sgraph
class TestSgraph(unittest.TestCase):
def setUp(self):
graph = []
with open('graph') as f: # one per line FIXME fixture?
for edge in f.readlines():
src, dest, *cost = list(edge.strip())
cost = int(''.joi... | mit | 7,265,645,486,266,781,000 | 30.155172 | 113 | 0.570006 | false | 3.226786 | true | false | false |
tanayseven/Voix | flask/lib/python2.7/site-packages/whoosh/matching/wrappers.py | 1 | 14976 | # Copyright 2010 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the... | gpl-3.0 | -2,723,485,462,847,553,500 | 28.892216 | 78 | 0.584001 | false | 4.060738 | false | false | false |
chimkentec/KodiMODo_rep | plugin.video.tree.tv.dev/core/auth.py | 1 | 1953 | # -*- coding: utf-8 -*-
import pickle, re
import xbmcup.app, xbmcup.system, xbmcup.net
from defines import *
class Auth:
def __init__(self):
self.success = '"ok"'
self.cookie_file = xbmcup.system.fs('sandbox://'+COOKIE_FILE)
self.login = xbmcup.app.setting['username']
self.password... | gpl-3.0 | 2,525,044,675,271,386,600 | 31.566667 | 120 | 0.576549 | false | 3.643657 | false | false | false |
PrestigeDox/Watashi-SelfBot | cogs/converter.py | 1 | 2237 | import discord
from discord.ext import commands
from bs4 import BeautifulSoup
from urllib.parse import quote_plus
class Converter:
def __init__(self, bot):
self.bot = bot
self.aiohttp_session = bot.aiohttp_session
self.url = 'https://google.com/search'
self.headers = {
... | mit | 4,840,375,041,808,833,000 | 37.568966 | 115 | 0.596334 | false | 3.495313 | false | false | false |
FirmlyReality/docklet | tools/upgrade_file2db.py | 2 | 3353 | import sys
sys.path.append("../src/")
import os,json
from datetime import datetime
from model import db, VCluster, Container, PortMapping, Image, BillingHistory
timeFormat = "%Y-%m-%d %H:%M:%S"
dockletPath = "/opt/docklet/global"
usersdir = dockletPath + "/users/"
try:
VCluster.query.all()
except Exception as err... | bsd-3-clause | -6,557,784,391,905,363,000 | 40.9125 | 169 | 0.593498 | false | 3.742188 | false | false | false |
taigaio/taiga-back | taiga/projects/notifications/signals.py | 1 | 5168 | # -*- 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 | -2,407,889,315,559,505,000 | 35.394366 | 80 | 0.625967 | false | 4.056515 | false | false | false |
kislerdm/alibava_analysis-tool | ilcinstall_eutel-git/ilcsoft/fastjet.py | 2 | 2846 | ##################################################
#
# FastJet module
#
# Author: Andre Sailer, CERN
# based on GSL module by J. Engels, Desy
# Date: Jul, 2010
#
##################################################
... | gpl-2.0 | -3,859,160,402,606,320,000 | 32.880952 | 156 | 0.543921 | false | 3.667526 | false | false | false |
cosminbasca/rdftools | rdftools/datagen/lubm_horizontal.py | 1 | 3072 | #
# author: Cosmin Basca
#
# Copyright 2010 University of Zurich
#
# 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 a... | apache-2.0 | 1,727,386,674,842,596,900 | 32.769231 | 112 | 0.654297 | false | 3.665871 | false | false | false |
jergosh/slr_pipeline | bin/process_slr_sub.py | 1 | 3289 | from glob import glob
import os
from os import path
import itertools
import re
from Bio import AlignIO
import pandas
import sys
import copy
import argparse
from slr import *
species_RE = re.compile("([A-Z]+)")
yeast_RE = re.compile("Y[A-P][LR][0-9]{3}[WC]")
def grouper(iterable, n, fillvalue=None):
args = [iter... | gpl-2.0 | -5,675,201,279,259,004,000 | 36.375 | 116 | 0.626634 | false | 3.111637 | false | false | false |
glidernet/python-ogn-client | ogn/parser/utils.py | 1 | 3369 | from datetime import datetime, timedelta, timezone
import math
FEETS_TO_METER = 0.3048 # ratio feets to meter
FPM_TO_MS = FEETS_TO_METER / 60 # ratio fpm to m/s
KNOTS_TO_MS = 0.5144 # ratio knots to m/s
KPH_TO_MS = 0.27778 # ratio kph to m/s
HPM_TO_DEGS = 180 / 60 ... | agpl-3.0 | 4,766,096,451,540,963,000 | 34.463158 | 98 | 0.551202 | false | 3.430754 | false | false | false |
modelblocks/modelblocks-release | resource-dundee/scripts/process_dundee.py | 1 | 12539 | import sys
import os
from numpy import nan
import pandas as pd
import argparse
#sys.stdin.reconfigure(encoding='latin-1',errors='replace') #'utf-8',errors='replace') #'ignore')
if __name__ == '__main__':
argparser = argparse.ArgumentParser('''
Extract eye-tracking time series from Dundee eye-trackin... | gpl-3.0 | -8,582,374,189,916,280,000 | 36.820433 | 137 | 0.412473 | false | 4.23186 | false | false | false |
jeremiedecock/snippets | python/hashlib_md5_sha/md5sum_file.py | 1 | 2678 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | mit | 7,653,002,989,695,408,000 | 37.782609 | 84 | 0.591181 | false | 4.46 | false | false | false |
RulersOfAsgard/ALAMO-worker | alamo_worker/plugins/__init__.py | 1 | 6930 | # -*- coding: utf-8 -*-
import asyncio
import logging
from datetime import datetime
from typing import Dict, List, Optional
import pkg_resources
from alamo_common import aiostats
from pytz import utc
from stevedore import NamedExtensionManager
from zmq.asyncio import ZMQEventLoop
from alamo_worker.conf import setting... | apache-2.0 | 5,531,675,341,325,306,000 | 32.478261 | 88 | 0.546898 | false | 4.547244 | false | false | false |
miltonsarria/dsp-python | qt/ejemploQt2.py | 1 | 3671 | from __future__ import unicode_literals
import os
import random
import sys
from numpy import arange, sin, pi
import matplotlib
#matplotlib.use("Qt4Agg")
from matplotlib.backends.backend_qt4agg import (
FigureCanvasQTAgg as FigureCanvas)
from matplotlib.backends.qt_compat import QtCore, QtGui
from matplotlib.figur... | mit | 8,202,107,306,772,943,000 | 28.604839 | 77 | 0.629256 | false | 3.641865 | false | false | false |
enigmampc/catalyst | catalyst/gens/utils.py | 1 | 1990 | #
# Copyright 2013 Quantopian, 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 wr... | apache-2.0 | 8,942,561,567,197,044,000 | 31.096774 | 79 | 0.711558 | false | 3.964143 | false | false | false |
bambooforest/segments | src/segments/tree.py | 1 | 2093 | from segments.errors import replace
class TreeNode(object):
"""
Private class that creates the tree data structure from the orthography profile for
parsing.
"""
def __init__(self, char, sentinel=False):
self.char = char
self.children = {}
self.sentinel = sentinel
class T... | apache-2.0 | -2,984,269,760,610,760,700 | 29.779412 | 87 | 0.530817 | false | 4.169323 | false | false | false |
gam17/QAD | qad_mbuffer_fun.py | 1 | 1950 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
ok
QAD Quantum Aided Design plugin
funzioni per stirare oggetti grafici
-------------------
begin : 2013-11-11
copyright : iiiii... | gpl-3.0 | -2,696,228,024,097,002,000 | 36.27451 | 98 | 0.410769 | false | 5.227882 | false | false | false |
qedsoftware/commcare-hq | corehq/tests/noseplugins/timing.py | 1 | 3440 | """A test timing plugin for nose
Usage: ./manage.py test --with-timing --timing-file=/path/to/timing.csv
"""
import csv
import sys
import time
from nose.plugins import Plugin
from corehq.tests.noseplugins.uniformresult import uniform_description
class TimingPlugin(Plugin):
"""A plugin to measure times of testin... | bsd-3-clause | -7,585,139,054,977,179,000 | 32.076923 | 78 | 0.580233 | false | 4.305382 | true | false | false |
cudevmaxwell/SwiftBulkUploader | swiftbulkuploader/prepareupload.py | 1 | 3048 | import sys
import olrcdb
import os
import datetime
from bulkupload import env_vars_set
# Globals
COUNT = 0
FAILED = 0
REQUIRED_VARIABLES = [
"MYSQL_HOST",
"MYSQL_USER",
"MYSQL_PASSWD",
"MYSQL_DB",
]
def prepare_upload(connect, directory, table_name):
'''Given a database connection, directory a... | bsd-3-clause | 6,526,452,972,449,950,000 | 28.038095 | 77 | 0.574475 | false | 3.814768 | false | false | false |
dcelisgarza/applied_math | solar_system/animatep2.py | 1 | 1987 | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3
import matplotlib.animation as anm
#plt.rcParams['animation.ffmpeg_path'] = '/usr/bin/ffmpeg'
plt.close('all')
data = np.loadtxt('solar_system.dat')
data2 = data[:,0:15]
fig = plt.figure()
ax = p3.Axes3D(fi... | mit | -6,319,089,473,703,924,000 | 26.985915 | 106 | 0.574233 | false | 2.614474 | false | false | false |
City-of-Helsinki/smbackend | observations/models.py | 1 | 6698 | import binascii
import os
import rest_framework.authentication
import rest_framework.authtoken.models
from django.apps import apps
from django.conf import settings
from django.db import models
from django.utils.translation import gettext_lazy as _
from polymorphic.models import PolymorphicModel
from rest_framework imp... | agpl-3.0 | -9,209,405,566,981,158,000 | 29.724771 | 87 | 0.674231 | false | 4.099143 | false | false | false |
analyst-collective/dbt | test/unit/test_linker.py | 1 | 5807 | import os
import tempfile
import unittest
from unittest import mock
from dbt import compilation
try:
from queue import Empty
except ImportError:
from Queue import Empty
from dbt.graph.selector import NodeSelector
from dbt.graph.cli import parse_difference
def _mock_manifest(nodes):
config = mock.MagicMo... | apache-2.0 | 4,797,753,715,547,958,000 | 30.906593 | 83 | 0.585845 | false | 3.633917 | true | false | false |
dgdell/enigma2 | lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py | 1 | 9326 | # -*- coding: iso-8859-1 -*-
from enigma import eConsoleAppContainer
from Components.Console import Console
from Components.About import about
from Components.PackageInfo import PackageInfoHandler
from Components.Language import language
from Components.Sources.List import List
from Components.Ipkg import IpkgComponent... | gpl-2.0 | 2,123,058,099,230,987,800 | 32.426523 | 112 | 0.710165 | false | 3.40738 | false | false | false |
questrail/pycan | tests/test_kvaser.py | 1 | 3371 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 The pycan developers. All rights reserved.
# Project site: https://github.com/questrail/pycan
# Use of this source code is governed by a MIT-style license that
# can be found in the LICENSE.txt file for the project.
import os
import time
import threading
import unittest
impo... | mit | -3,411,936,796,912,395,300 | 33.050505 | 77 | 0.621181 | false | 3.951934 | true | false | false |
awni/tensorflow | tensorflow/python/training/training_ops.py | 1 | 7523 | # 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 applicable law or a... | apache-2.0 | 2,950,394,919,528,449,000 | 38.387435 | 80 | 0.705968 | false | 3.205369 | false | false | false |
giorgiop/scikit-learn | sklearn/utils/fixes.py | 2 | 13212 | """Compatibility fixes for older version of python, numpy and scipy
If you add content to this file, please give the version of the package
at which the fixe is no longer needed.
"""
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# ... | bsd-3-clause | 6,369,921,192,213,193,000 | 31.784119 | 84 | 0.577505 | false | 3.596081 | false | false | false |
kakaroto/amsn2 | amsn2/ui/front_ends/qt4/contact_list.py | 1 | 15634 | # -*- coding: utf-8 -*-
#
# amsn - a python client for the WLM Network
#
# Copyright (C) 2008 Dario Freddi <drf54321@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 2... | gpl-2.0 | -3,533,732,585,038,985,700 | 38.984655 | 132 | 0.592491 | false | 3.741086 | false | false | false |
hfp/libxsmm | samples/deeplearning/sparse_training/fairseq/fairseq/tasks/fairseq_task.py | 1 | 16132 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import warnings
import os
import torch
from fairseq import metrics, search, tokenizer, utils
from fairseq.data import data_utils, FairseqDat... | bsd-3-clause | 1,230,206,139,522,722,600 | 36.691589 | 100 | 0.593603 | false | 4.420937 | false | false | false |
bhrutledge/debugged-django | debugged/stream/signals.py | 1 | 2560 | from datetime import datetime, timedelta
from django.contrib.contenttypes.models import ContentType
from debugged.stream.models import StreamEntry, StreamItem
def _get_stream_item(instance):
instance_type = ContentType.objects.get_for_model(instance)
try:
s = StreamItem.objects.get(content_type=instan... | mit | -8,103,646,417,448,047,000 | 32.246753 | 91 | 0.607031 | false | 4.050633 | false | false | false |
0xf2/stackalytics | stackalytics/dashboard/web.py | 1 | 24373 | # Copyright (c) 2013 Mirantis 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 writi... | apache-2.0 | -1,381,392,780,574,979,000 | 33.088112 | 79 | 0.621261 | false | 3.736471 | false | false | false |
olga-perederieieva/pyDEA | pyDEA/core/gui_modules/table_gui.py | 1 | 57836 | ''' This module contains classes responsible for displaying input data
in a table (TableFrame and TableFrameWithInputOutputBox).
It also contains many classes necessary for TableFrameWithInputOutputBox.
Attributes:
CELL_WIDTH (int): constant that defined width of a cell in a table
'''
from tkinter ... | mit | -219,998,321,544,119,700 | 42.22571 | 101 | 0.564147 | false | 4.477857 | false | false | false |
sbesson/zeroc-ice | py/test/Ice/admin/Client.py | 1 | 1029 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | gpl-2.0 | 4,657,194,139,776,982,000 | 22.386364 | 72 | 0.578231 | false | 3.741818 | true | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/distutils/cygwinccompiler.py | 1 | 9736 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: cygwinccompiler.py
"""distutils.cygwinccompiler
Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the ... | unlicense | 2,730,727,172,121,840,000 | 38.104418 | 243 | 0.578677 | false | 3.582046 | true | false | false |
USCLiquidPropulsionLaboratory/Engine-sizing-snake | Blue_Steel.py | 1 | 38183 | ## GOX-kerosene sim
#@ Author Juha Nieminen
#import sys
#sys.path.insert(0, '/Users/juhanieminen/Documents/adamrocket')
import RocketComponents as rc
from physical_constants import poise, inches, Runiv, gallons, lbm, \
gearth, atm, psi, lbf
from numpy import pi, linspace, cos, radians, sqrt, exp, log, array, full... | mit | 7,787,178,057,936,864,000 | 45.792892 | 340 | 0.601917 | false | 2.736544 | false | false | false |
uclmr/inferbeddings | scripts/synth/create_table_iterative.py | 1 | 6170 | import numpy as np
from collections import defaultdict
results = '/Users/tdmeeste/workspace/inferbeddings/logs/synth/synth_paper_iterative_aggregated.txt'
models_lst = ['DistMult', 'ComplEx']
clauses_lst = ['symm', 'impl', 'impl_inv', 'trans_single', 'trans_diff']
confs_lst = ['0.0']
versions_lst = ['v0', 'v1', 'v2'... | mit | 2,269,847,217,643,453,000 | 30.968912 | 289 | 0.583468 | false | 2.672152 | false | false | false |
hlange/LogSoCR | .waf/waflib/Runner.py | 1 | 9332 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2016 (ita)
"""
Runner.py: Task scheduling and execution
"""
import random
try:
from queue import Queue
except ImportError:
from Queue import Queue
from waflib import Utils, Task, Errors, Logs
GAP = 20
"""
Wait for at least ``GAP * njobs`` before trying to... | agpl-3.0 | -2,180,526,306,143,412,700 | 25.662857 | 104 | 0.673168 | false | 3.084959 | false | false | false |
pacoqueen/bbinn | gajim-0.9.1/src/common/logger.py | 1 | 16495 | # -*- coding: utf-8 -*-
## logger.py
##
## Contributors for this file:
## - Yann Le Boulanger <asterix@lagaule.org>
## - Nikos Kouremenos <kourem@gmail.com>
##
## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org>
## Vincent Hanquez <tab@snarc.org>
## Copyright (C) 2005 Yann Le Boul... | gpl-2.0 | 279,528,875,289,906,300 | 38.266667 | 120 | 0.563182 | false | 3.714414 | false | false | false |
joshwatson/binaryninja-api | python/mediumlevelil.py | 1 | 51471 | # Copyright (c) 2018-2021 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, ... | mit | -3,140,209,989,579,271,000 | 38.9 | 176 | 0.71345 | false | 3.141541 | false | false | false |
aimalz/chippr | chippr/log_z_dens.py | 1 | 22517 | import numpy as np
import scipy as sp
import os
import scipy.optimize as op
import cPickle as cpkl
import emcee
import matplotlib as mpl
mpl.use('PS')
import matplotlib.pyplot as plt
import chippr
from chippr import defaults as d
from chippr import plot_utils as pu
from chippr import utils as u
from chippr import sta... | mit | 7,646,769,710,592,497,000 | 38.782686 | 169 | 0.569481 | false | 3.749084 | false | false | false |
Wikidata/StrepHit | strephit/side_projects/wlm.py | 1 | 3270 | # -*- encoding: utf-8 -*-
import click
import csv
import logging
from strephit.commons import wikidata, cache
from collections import defaultdict
logger = logging.getLogger(__name__)
COLUMN_TO_PROPERTY = {
'località': 'P131',
'Prov': 'P131',
'indirizzo': 'P969',
'proprieta': 'P127',
'WLMID... | gpl-3.0 | 5,434,997,803,650,359,000 | 29.849057 | 94 | 0.57156 | false | 3.637375 | false | false | false |
paristote/zipf | app/zipf.py | 1 | 3862 | import subprocess
import os
import re
import collections
import sys
import shutil
import urllib
import urlparse
from flask import Flask, redirect, render_template, url_for, request
app=Flask(__name__)
class WordCounter(dict):
def __missing__(self, key):
return 0
# Debug mode True or False
DEBUG=(len(sys.... | gpl-2.0 | -1,967,538,582,482,414,600 | 26.784173 | 83 | 0.711289 | false | 3.137287 | false | false | false |
pughlab/cbioportal | core/src/main/scripts/migrate_db.py | 1 | 14251 | #!/usr/bin/env python3
import os
import sys
import contextlib
import argparse
from collections import OrderedDict
import MySQLdb
# globals
ERROR_FILE = sys.stderr
OUTPUT_FILE = sys.stdout
DATABASE_HOST = 'db.host'
DATABASE_NAME = 'db.portal_db_name'
DATABASE_USER = 'db.user'
DATABASE_PW = 'db.password'
VERSION_TABLE ... | agpl-3.0 | -2,279,951,055,318,271,200 | 42.184848 | 197 | 0.617711 | false | 4.00309 | false | false | false |
tensorflow/deepmath | deepmath/deephol/deephol_loop/checkpoint_monitor.py | 1 | 4882 | """Monitor the latest model checkpoint and compute embedding stores.
This library is a helper method for the loop to monitor checkpoints
when they get available. Once a new checkpoint appears, it gets copied over
to a temporary directory, then the embeddings are computed for the theorem
database. Finally, the checkpoi... | apache-2.0 | -8,842,323,261,161,711,000 | 33.871429 | 80 | 0.673085 | false | 3.654192 | true | false | false |
brocade-apj/anzsdnhackathon2016 | www/www/__init__.py | 1 | 1269 | #! ../env/bin/python
# -*- coding: utf-8 -*-
__author__ = 'Darin Sikanic'
__email__ = 'dsikanic@brocade.com'
__version__ = '1.0'
from flask import Flask
from webassets.loaders import PythonLoader as PythonAssetsLoader
from www.controllers.main import main
from www import assets
from www.extensions import (
cach... | apache-2.0 | -7,661,005,437,306,028,000 | 21.660714 | 66 | 0.667455 | false | 3.594901 | false | false | false |
osamak/wikiproject-med | accounts/forms.py | 1 | 1406 | # -*- coding: utf-8 -*-
from django import forms
from userena.forms import SignupForm
from accounts.models import Profile
class WikithonSignupForm(SignupForm):
name = forms.CharField(label=Profile._meta.get_field('name').verbose_name,
max_length=100)
email = forms.EmailField(label=... | agpl-3.0 | -1,130,210,196,212,903,600 | 40.352941 | 99 | 0.59744 | false | 4.087209 | false | false | false |
miketheman/opencomparison | settings/base.py | 1 | 9605 | # -*- coding: utf-8 -*-
# Django settings
import os.path
from os import environ
from django.template.defaultfilters import slugify
PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# serve media through the staticfiles app.
SERVE_MEDIA = DEBUG
INTERNAL_... | mit | 2,146,213,555,930,917,400 | 26.289773 | 172 | 0.664029 | false | 3.485123 | false | false | false |
lucyparsons/OpenOversight | OpenOversight/migrations/versions/8ce7926aa132_.py | 1 | 1166 | """empty message
Revision ID: 8ce7926aa132
Revises: cfc5f3fd5efe
Create Date: 2018-06-07 18:53:47.656557
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = '8ce7926aa132'
down_revision = 'cfc5f3fd5efe'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto genera... | gpl-3.0 | 1,934,391,166,582,591,200 | 34.333333 | 96 | 0.66295 | false | 3.068421 | false | false | false |
pabloli/MinimalModelAlg | running.py | 1 | 8071 | #%%
import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import textwrap
import pydot
import random, string
def drawGraph(data2Draw,current,trues,pos):
if drawActive == False:
return ""
text = str("Now we delete:"+textwrap.fill(str(cur... | mit | 3,964,466,049,553,769,000 | 32.629167 | 119 | 0.590633 | false | 3.358718 | false | false | false |
datawire/quark | quarkc/test/ffi/expected/py/signatures/generics/ccc/__init__.py | 1 | 2758 | from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from builtins import str as unicode
from quark_runtime import *
_lazyImport.plug("generics.ccc")
import quark.reflect
class TLSContextInitializer(_QObject):
def _in... | apache-2.0 | -3,211,641,821,664,854,500 | 23.40708 | 84 | 0.614213 | false | 3.73207 | false | false | false |
rodo/django-perf | foo/offset/management/commands/keypage_run.py | 1 | 1911 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013,2014 Rodolphe Quiédeville <rodolphe@quiedeville.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 ver... | gpl-3.0 | 2,428,596,492,873,267,700 | 30.833333 | 76 | 0.618848 | false | 4.04661 | false | false | false |
paulscottrobson/wallpaper-one | software/minol - arithmetic/generate.py | 1 | 1446 | #
# Generate math tests
#
import random
random.seed(412)
monitor = [ord(x) for x in open("..\monitor_rom\monitor.bin","rb").read(-1)]
mvars = { "C":10,"D":20,"Z":33 }
def rnd(maxval):
n = maxval+1
term = ""
while n >= maxval:
n = random.randrange(0,255)
term = str(n)
if random.randrange(0,3) == 0:
k = m... | mit | -4,739,302,166,664,086,000 | 22.322581 | 76 | 0.539419 | false | 2.30622 | false | false | false |
gem/sidd | sidd/ms/node.py | 1 | 29915 | # Copyright (c) 2011-2013, ImageCat 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 License, or
# (at your option) any later version.
#
# This pro... | agpl-3.0 | -2,564,562,895,248,160,300 | 36.802853 | 123 | 0.516396 | false | 4.628655 | false | false | false |
shendo/websnort | tests/test_config.py | 1 | 1499 | # Websnort - Web service for analysing pcap files with snort
# Copyright (C) 2013-2015 Steve Henderson
#
# 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... | gpl-3.0 | -6,451,567,111,327,162,000 | 41.828571 | 79 | 0.728486 | false | 3.728856 | false | false | false |
openmotics/gateway-frontend | tools/json-sorter.py | 1 | 1571 | #!/usr/bin/env python
# Copyright (C) 2016 OpenMotics BV
#
# 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 version.
#
# Th... | agpl-3.0 | -7,325,323,666,220,852,000 | 38.275 | 93 | 0.63972 | false | 3.841076 | false | false | false |
jacob-ogre/excel2text | excel2text.py | 1 | 2724 | #! /usr/bin/python
# excel2text.py
# A simple program to convert Excel files to text with user-defined delimiters.
#
# Copyright (C) 2013 copyright Jacob Malcom, jacob.malcom@utexas.edu
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | gpl-2.0 | 776,733,743,265,624,700 | 33.923077 | 80 | 0.626652 | false | 3.696065 | false | false | false |
bzshang/yelp-photo-classification | scripts/get_image_features.py | 1 | 2060 | """
Extract image features from next to last layer (global_pool)
"""
__author__ = 'bshang'
import numpy as np
import h5py
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
import sys
sys.path.append('/home/ubuntu/yelp/mxnet/python')
import mxnet as mx
MODEL = 'inception-v3'
MODEL_PATH = '... | apache-2.0 | -2,569,413,815,894,601,700 | 26.837838 | 103 | 0.647573 | false | 2.77628 | false | false | false |
LukeCarrier/py3k-pexpect | tools/websync.py | 1 | 1347 | #!/usr/bin/env python
# I use this to keep the sourceforge pages up to date with the
# latest documentation and I like to keep a copy of the distribution
# on the web site so that it will be compatible with
# The Vaults of Parnasus which requires a direct URL link to a
# tar ball distribution. I don't advertise the pa... | mit | 4,307,543,370,111,144,000 | 30.325581 | 123 | 0.729027 | false | 2.853814 | false | false | false |
akrzos/cfme_tests | cfme/tests/cloud/test_providers.py | 1 | 10044 | # -*- coding: utf-8 -*-
# pylint: disable=E1101
# pylint: disable=W0621
import fauxfactory
import uuid
import pytest
import utils.error as error
from cfme import Credential
from cfme.exceptions import FlashMessageException
from cfme.cloud.provider import (discover, EC2Provider, wait_for_a_provider,
Provider, Open... | gpl-2.0 | 2,334,746,530,047,233,000 | 32.704698 | 90 | 0.692055 | false | 3.704906 | true | false | false |
ldamewood/figures | scripts/interpolate.py | 1 | 5456 | import numpy
__all__ = [
"interpolate",
]
class interpolate:
# Convert two vectors into a normalzied coordinate system via GS orthogonalization
@staticmethod
def plane_to_cs(cs):
# Normalize vectors
cs[0] = cs[0]/numpy.linalg.norm(cs[0])
cs[1] = cs[1]/numpy.linalg.norm(cs[1])
... | mit | -1,390,636,003,431,998,700 | 37.978571 | 86 | 0.548021 | false | 3.92518 | false | false | false |
sileht/deb-openstack-keystone | keystone/identity/core.py | 1 | 21922 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack 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 requ... | apache-2.0 | 3,092,222,762,643,436,000 | 34.937705 | 79 | 0.603686 | false | 4.052875 | false | false | false |
truedays/sandbox | python/auto.py | 1 | 3096 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# CTA API CLI YAH
import sys
import requests
#from bs4 import BeautifulSoup
from xmltodict import parse
import datetime
from time import gmtime, strftime
# enable debugging
import cgitb
cgitb.enable()
# get API key from file
f = open('./.cta-api.key', 'r')
APIKEY = "?key=" + ... | gpl-3.0 | -1,918,603,070,295,321,000 | 31.25 | 93 | 0.630814 | false | 2.766756 | false | false | false |
bslatkin/8-bits | appengine-ndb/ndb/blobstore_test.py | 1 | 10271 | """Tests for blobstore.py."""
import cgi
import cStringIO
import datetime
import pickle
import unittest
from .google_imports import namespace_manager
from .google_imports import datastore_types
from . import blobstore
from . import model
from . import tasklets
from . import test_utils
class BlobstoreTests(test_uti... | apache-2.0 | 4,325,438,816,037,139,000 | 33.236667 | 78 | 0.644825 | false | 3.323948 | true | false | false |
Mbrownshoes/ckanext-bcgov | ckanext/bcgov/logic/ofi/__init__.py | 1 | 4636 | # Copyright 2016, Province of British Columbia
# License: https://github.com/bcgov/ckanext-bcgov/blob/master/license
#
# HighwayThree Solutions Inc.
# Author: Jared Smith <jrods@github>
import logging
from functools import wraps
from pprint import pprint, pformat
import requests as reqs
from ckan.common import reque... | agpl-3.0 | -3,168,087,227,463,341,000 | 30.537415 | 108 | 0.608067 | false | 3.661927 | false | false | false |
hasgeek/funnel | migrations/versions/c47007758ee6_add_email_address_active_at.py | 1 | 1589 | """Add email_address.active_at.
Revision ID: c47007758ee6
Revises: b7fa6df99855
Create Date: 2020-08-20 21:47:43.356619
"""
from alembic import op
from sqlalchemy import column, table
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c47007758ee6'
down_revision = 'b7fa6df99855'
branch_lab... | agpl-3.0 | 8,731,557,630,074,718,000 | 23.446154 | 76 | 0.623033 | false | 3.303534 | false | false | false |
adrianomargarin/wttd-eventex | eventex/core/migrations/0007_course.py | 1 | 1116 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-10-09 01:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20171008_2259'),
]
operations = [
migrations.CreateModel(... | gpl-3.0 | 6,264,919,628,078,854,000 | 34.870968 | 114 | 0.556655 | false | 4.103321 | false | false | false |
aswarren/GOGranny | tests/SteinerTreeTest.py | 1 | 2069 | from GOGranny import *
from networkx import *
import unittest
class TestSteinerTree(unittest.TestCase):
def stree(self, edges, voi):
g = Graph()
for edge in edges:
g.add_edge(edge[0],edge[1],weight=edge[2])
return make_steiner_tree(g, voi)
def testSteinerTrees(self):
edges = [("a", "b", 1), ("... | gpl-2.0 | -5,228,691,003,820,098,000 | 52.051282 | 209 | 0.429193 | false | 2.217578 | false | false | false |
padmashrimallapur/report | report.py | 1 | 3153 | #!/usr/local/bin/python
"""
Creating the report of top 50 domains for 30 days
It is assumed that mailing table is repopulated every day.
The report will display the top 50 domain sorting with their growth percentage.
"""
import MySQLdb
import datetime
mysqlconfig = {'host': 'localhost',
'username': 'r... | gpl-2.0 | -6,065,980,197,356,007,000 | 29.028571 | 119 | 0.579448 | false | 3.683411 | false | false | false |
rjdp/cement | cement/utils/misc.py | 1 | 6108 | """Misc utilities."""
import os
import sys
import logging
import hashlib
from textwrap import TextWrapper
from random import random
def rando(salt=None):
"""
Generate a random MD5 hash for whatever purpose. Useful for testing
or any other time that something random is required.
:param salt: Optiona... | bsd-3-clause | -3,778,632,260,896,210,000 | 28.941176 | 78 | 0.609037 | false | 4.007874 | false | false | false |
bjuvensjo/scripts | vang/git/patchish_refs.py | 1 | 3165 | #!/usr/bin/env python3
from argparse import ArgumentParser
from pprint import pprint
from re import match
from vang.pio.shell import run_command
from vang.pio.synchronize_dirs import synchronize_dirs
def apply_patch(patch_repo, apply_repo, ref):
print('Apply patch', ref, patch_repo, apply_repo, ref)
rc, out... | apache-2.0 | 6,775,928,350,807,584,000 | 30.336634 | 86 | 0.617378 | false | 3.283195 | false | false | false |
amirgeva/coide | system.py | 1 | 2487 | import utils
import re
from multiprocessing import Process, Queue
import callbacks
def libraryDirs():
out,err=utils.call('.','ld','--verbose')
return re.findall('SEARCH_DIR\("=([^"]+)"\);',out)
def listAllPackages():
res=set()
try:
all,err=utils.call('.','pkg-config','--list-all')
lin... | gpl-2.0 | 7,818,529,345,900,477,000 | 22.471698 | 80 | 0.622437 | false | 3.966507 | false | false | false |
Workday/OpenFrame | tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper_unittest.py | 1 | 7180 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import pickle
import re
import shutil
import tempfile
import time
import unittest
from telemetry.core import util
from telemetry import decorators... | bsd-3-clause | 6,226,470,640,319,619,000 | 33.190476 | 80 | 0.683426 | false | 3.64467 | true | false | false |
jaeilepp/mne-python | mne/tests/test_dipole.py | 1 | 15664 | import os
import os.path as op
import sys
import warnings
import numpy as np
from nose.tools import assert_true, assert_equal, assert_raises
from numpy.testing import assert_allclose
from mne import (read_dipole, read_forward_solution,
convert_forward_solution, read_evokeds, read_cov,
... | bsd-3-clause | 2,016,151,737,440,554,000 | 40.112861 | 79 | 0.617658 | false | 2.947131 | true | false | false |
mikeboers/aque | aque/commands/submit.py | 1 | 2219 | """aque submit - Schedule a shell command.
Schedules to given command to run on the queue. The environment will have an
extra $AQUE_TID variable containing the ID of the running task.
E.g.:
$ aque submit --shell 'echo $AQUE_TID says: "$@"' one two three
"""
import argparse
import os
import sys
from aque.c... | bsd-3-clause | -4,217,119,700,614,682,000 | 32.621212 | 130 | 0.632267 | false | 3.686047 | false | false | false |
iofun/colony | colony/system/kmeans.py | 1 | 19928 | # -*- coding: utf-8 -*-
'''
Colony k-means clustering system logic.
'''
# This file is part of colony.
__author__ = 'Team Machine'
__doc__ = '''
#k-means algorithm
k-means clustering is a method of vector quantization,
popular for cluster analysis in data mining.
k-means clustering aims to par... | agpl-3.0 | -1,745,465,895,318,321,200 | 25.607477 | 103 | 0.518115 | false | 4.622593 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.