text stringlengths 0 1.05M | meta dict |
|---|---|
"""bug 812536 drop hang report
Revision ID: 389f5501023b
Revises: 2209ca57dcc6
Create Date: 2013-09-06 14:15:21.470498
"""
# revision identifiers, used by Alembic.
revision = '389f5501023b'
down_revision = '2209ca57dcc6'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgr... | {
"repo_name": "adngdb/socorro",
"path": "alembic/versions/389f5501023b_bug_812536_drop_hang.py",
"copies": "16",
"size": "3475",
"license": "mpl-2.0",
"hash": 3750170309244692500,
"line_mean": 34.824742268,
"line_max": 102,
"alpha_frac": 0.6808633094,
"autogenerated": false,
"ratio": 3.7007454739... |
"""bug 826564 - add exploitability to reports_clean
Revision ID: 9798b1cc04
Revises: 3805e9f77df4
Create Date: 2013-06-05 13:20:25.116074
"""
# revision identifiers, used by Alembic.
revision = '9798b1cc04'
down_revision = '3805e9f77df4'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy.diale... | {
"repo_name": "twobraids/socorro",
"path": "alembic/versions/9798b1cc04_bug_826564_add_explo.py",
"copies": "16",
"size": "2836",
"license": "mpl-2.0",
"hash": -8192316687692550000,
"line_mean": 30.8651685393,
"line_max": 102,
"alpha_frac": 0.667842031,
"autogenerated": false,
"ratio": 3.58080808... |
"""bug 853452 android devices
Revision ID: 49bf379b5a8
Revises: 35604f61bc24
Create Date: 2013-08-26 13:51:45.423498
"""
# revision identifiers, used by Alembic.
revision = '49bf379b5a8'
down_revision = '35604f61bc24'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresq... | {
"repo_name": "rhelmer/socorro-lib",
"path": "alembic/versions/49bf379b5a8_bug_853452_android_d.py",
"copies": "16",
"size": "2448",
"license": "mpl-2.0",
"hash": 6442329446595487000,
"line_mean": 28.4939759036,
"line_max": 102,
"alpha_frac": 0.6674836601,
"autogenerated": false,
"ratio": 3.42857... |
"""bug 855423 change RAISE EXCEPTION to RAISE NOTICE
Revision ID: 5e14d46c725
Revises: e5eb3c07f2a
Create Date: 2013-04-11 17:35:34.174009
"""
# revision identifiers, used by Alembic.
revision = '5e14d46c725'
down_revision = '321a815df1c7'
from alembic import op
import os
def upgrade():
# Load up all the new p... | {
"repo_name": "bsmedberg/socorro",
"path": "alembic/versions/5e14d46c725_bug_855423_change_ra.py",
"copies": "1",
"size": "1424",
"license": "mpl-2.0",
"hash": 2391054926368502300,
"line_mean": 25.3703703704,
"line_max": 102,
"alpha_frac": 0.6860955056,
"autogenerated": false,
"ratio": 2.68679245... |
"""bug 867387 Bixie draft schema
Revision ID: 22e4e60e03f
Revises: 37004fc6e41e
Create Date: 2013-05-10 13:20:35.750954
"""
# revision identifiers, used by Alembic.
revision = '22e4e60e03f'
down_revision = '37004fc6e41e'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from ... | {
"repo_name": "bsmedberg/socorro",
"path": "alembic/versions/22e4e60e03f_bug_867387_bixie_dra.py",
"copies": "16",
"size": "9842",
"license": "mpl-2.0",
"hash": -9053935136965399000,
"line_mean": 36.7088122605,
"line_max": 70,
"alpha_frac": 0.6519000203,
"autogenerated": false,
"ratio": 3.1066919... |
"""bug 890650 fix rapid beta in crashes by user build
Revision ID: 1f9054518c57
Revises: 2c03d8ea0a50
Create Date: 2013-08-28 12:22:03.217984
"""
# revision identifiers, used by Alembic.
revision = '1f9054518c57'
down_revision = '2c03d8ea0a50'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy... | {
"repo_name": "pcabido/socorro",
"path": "alembic/versions/1f9054518c57_bug_890650_fix_rapid.py",
"copies": "16",
"size": "1397",
"license": "mpl-2.0",
"hash": 4940035449879119000,
"line_mean": 21.1746031746,
"line_max": 102,
"alpha_frac": 0.6614173228,
"autogenerated": false,
"ratio": 3.42401960... |
"""bug 895928 Signature Summary tables
Revision ID: 11cd71153550
Revises: 54e898dc3251
Create Date: 2013-07-23 13:38:20.141205
"""
# revision identifiers, used by Alembic.
revision = '11cd71153550'
down_revision = '54e898dc3251'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects impor... | {
"repo_name": "twobraids/socorro",
"path": "alembic/versions/11cd71153550_bug_895928_signature.py",
"copies": "16",
"size": "7671",
"license": "mpl-2.0",
"hash": -3523036822354407400,
"line_mean": 43.3410404624,
"line_max": 105,
"alpha_frac": 0.6883066093,
"autogenerated": false,
"ratio": 3.40328... |
"""bug 899641 Support Windows NT 6.3
Revision ID: 2645cb324bf4
Revises: 11cd71153550
Create Date: 2013-07-30 13:09:47.577306
"""
# revision identifiers, used by Alembic.
revision = '2645cb324bf4'
down_revision = '11cd71153550'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql... | {
"repo_name": "cliqz/socorro",
"path": "alembic/versions/2645cb324bf4_bug_899641_support_w.py",
"copies": "16",
"size": "1399",
"license": "mpl-2.0",
"hash": 1424284241939808800,
"line_mean": 21.2063492063,
"line_max": 60,
"alpha_frac": 0.654038599,
"autogenerated": false,
"ratio": 3.730666666666... |
"""bug 902839 add version_string to signature_summary* tables
Revision ID: 35604f61bc24
Revises: 36abe253f8b3
Create Date: 2013-08-12 14:37:51.046982
"""
# revision identifiers, used by Alembic.
revision = '35604f61bc24'
down_revision = '36abe253f8b3'
import os
import sqlalchemy as sa
from alembic import op
from sq... | {
"repo_name": "KaiRo-at/socorro",
"path": "alembic/versions/35604f61bc24_bug_902839_add_versi.py",
"copies": "16",
"size": "4015",
"license": "mpl-2.0",
"hash": -7607415872980560000,
"line_mean": 35.8348623853,
"line_max": 102,
"alpha_frac": 0.6919053549,
"autogenerated": false,
"ratio": 3.623646... |
"""bug905346-fix-timezone-constraints
Revision ID: 4de11772649b
Revises: 35604f61bc24
Create Date: 2013-08-16 10:17:37.874415
"""
# revision identifiers, used by Alembic.
revision = '4de11772649b'
down_revision = '1f9054518c57'
import os
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import... | {
"repo_name": "luser/socorro",
"path": "alembic/versions/4de11772649b_bug905346_fix_timezo.py",
"copies": "16",
"size": "2024",
"license": "mpl-2.0",
"hash": 679560606048642300,
"line_mean": 25.2857142857,
"line_max": 114,
"alpha_frac": 0.6492094862,
"autogenerated": false,
"ratio": 3.54465849387... |
"""bug 905346 timezone fixes for existing tables
Revision ID: 2209ca57dcc6
Revises: 4de11772649b
Create Date: 2013-09-03 13:30:20.727845
"""
# revision identifiers, used by Alembic.
revision = '2209ca57dcc6'
down_revision = '4de11772649b'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects impor... | {
"repo_name": "yglazko/socorro",
"path": "alembic/versions/2209ca57dcc6_bug_905346_timezone_.py",
"copies": "16",
"size": "4535",
"license": "mpl-2.0",
"hash": -5427583541985549000,
"line_mean": 34.9920634921,
"line_max": 90,
"alpha_frac": 0.5080485116,
"autogenerated": false,
"ratio": 4.21077065... |
"""bug 915198 fix android devices
Revision ID: 608afb3824d
Revises: 389f5501023b
Create Date: 2013-09-11 08:32:01.500395
"""
# revision identifiers, used by Alembic.
revision = '608afb3824d'
down_revision = '389f5501023b'
import os
import datetime
import sqlalchemy as sa
from alembic import op
from sqlalchemy.diale... | {
"repo_name": "m8ttyB/socorro",
"path": "alembic/versions/608afb3824d_bug_915198_fix_andro.py",
"copies": "16",
"size": "3543",
"license": "mpl-2.0",
"hash": 9084010029319447000,
"line_mean": 35.90625,
"line_max": 103,
"alpha_frac": 0.5808636749,
"autogenerated": false,
"ratio": 4.139018691588785... |
"""bug 928051 - add b2g to reports_clean
Revision ID: 74d6fd90b59
Revises: 2580b5b6b7aa
Create Date: 2014-02-18 12:53:41.577292
"""
# revision identifiers, used by Alembic.
revision = '74d6fd90b59'
down_revision = '2580b5b6b7aa'
from alembic import op
from socorro.lib import citexttype, jsontype, buildtype
from soc... | {
"repo_name": "Tchanders/socorro",
"path": "alembic/versions/74d6fd90b59_bug_928051_add_b2g_to_reports_clean.py",
"copies": "14",
"size": "2319",
"license": "mpl-2.0",
"hash": -1072896573649252400,
"line_mean": 31.2083333333,
"line_max": 89,
"alpha_frac": 0.6162138853,
"autogenerated": false,
"ra... |
"""bug 948644 - record missing symbols from the processor
Revision ID: 556e11f2d00f
Revises: 17e83fdeb135
Create Date: 2014-11-18 12:50:20.496750
"""
# revision identifiers, used by Alembic.
revision = '556e11f2d00f'
down_revision = '17e83fdeb135'
from alembic import op
from socorro.lib import citexttype, jsontype,... | {
"repo_name": "cliqz/socorro",
"path": "alembic/versions/556e11f2d00f_bug_948644_record_missing_symbols_from_.py",
"copies": "13",
"size": "1369",
"license": "mpl-2.0",
"hash": -4364357208010890000,
"line_mean": 27.5208333333,
"line_max": 68,
"alpha_frac": 0.6596055515,
"autogenerated": false,
"r... |
"""bug 956436 new build_type, update_channel columns
Revision ID: 3c5882fb7e3e
Revises: 4a6b5fec10e9
Create Date: 2014-01-07 13:40:47.100807
"""
# revision identifiers, used by Alembic.
revision = '3c5882fb7e3e'
down_revision = '4a6b5fec10e9'
from alembic import op
from socorro.lib import citexttype, jsontype, buil... | {
"repo_name": "Tchanders/socorro",
"path": "alembic/versions/3c5882fb7e3e_bug_956436_new_build.py",
"copies": "14",
"size": "2625",
"license": "mpl-2.0",
"hash": -98088962447340060,
"line_mean": 41.3387096774,
"line_max": 107,
"alpha_frac": 0.7001904762,
"autogenerated": false,
"ratio": 3.0452436... |
"""Bug 958595 - Removed emails table.
Revision ID: 131b277f5ef7
Revises: 6ef54091228
Create Date: 2014-02-10 17:05:16.106061
"""
# revision identifiers, used by Alembic.
revision = '131b277f5ef7'
down_revision = '6ef54091228'
from alembic import op
from socorro.lib import citexttype, jsontype, buildtype
from socorr... | {
"repo_name": "Tchanders/socorro",
"path": "alembic/versions/131b277f5ef7_bug_958595_removed_emails_table.py",
"copies": "14",
"size": "1087",
"license": "mpl-2.0",
"hash": 2084643275431136300,
"line_mean": 21.6458333333,
"line_max": 72,
"alpha_frac": 0.7019319227,
"autogenerated": false,
"ratio"... |
"""bug 967593 - GC crash count
Revision ID: 6ef54091228
Revises: 22ec34ad88fc
Create Date: 2014-02-04 11:01:07.716720
"""
# revision identifiers, used by Alembic.
revision = '6ef54091228'
down_revision = '22ec34ad88fc'
from alembic import op
from socorro.lib import citexttype, jsontype, buildtype
from socorro.lib.m... | {
"repo_name": "linearregression/socorro",
"path": "alembic/versions/6ef54091228_bug_967593_gc_crash_count.py",
"copies": "14",
"size": "1312",
"license": "mpl-2.0",
"hash": 4590004529117859300,
"line_mean": 28.1555555556,
"line_max": 87,
"alpha_frac": 0.6943597561,
"autogenerated": false,
"ratio"... |
"""bug 974726 - move correlations to postgres
Revision ID: 4b2567293aee
Revises: 74d6fd90b59
Create Date: 2014-03-10 11:43:52.585210
"""
# revision identifiers, used by Alembic.
revision = '4b2567293aee'
down_revision = '74d6fd90b59'
from alembic import op
from socorro.lib import citexttype, jsontype, buildtype
fro... | {
"repo_name": "rhelmer/socorro-lib",
"path": "alembic/versions/4b2567293aee_bug_974726_move_correlations_to_postgres.py",
"copies": "14",
"size": "4463",
"license": "mpl-2.0",
"hash": -6722598826040705000,
"line_mean": 48.5888888889,
"line_max": 114,
"alpha_frac": 0.6885503025,
"autogenerated": fal... |
#BUGGY!!!!!!!!!!!!!!!!!!!!!!!!!
#http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
# CRIVO DE ERASTÓSTENES
##To find all the prime numbers less than or equal to a given integer n
##by Eratosthenes' method:
##Create a list of consecutive integers from 2 to n: (2, 3, 4, ..., n).
##Initially, let p equal 2, the first... | {
"repo_name": "feliposz/project-euler-solutions",
"path": "python/sieve2.py",
"copies": "1",
"size": "1577",
"license": "mit",
"hash": 2082867090548635000,
"line_mean": 28.7358490566,
"line_max": 72,
"alpha_frac": 0.6573604061,
"autogenerated": false,
"ratio": 3.054263565891473,
"config_test": ... |
# Bug Hunter Notifications - By Pointy#5565
# https://github.com/PointyDev/discord-bughunternotifs
import sys
try:
from discord.ext import commands
import discord
from win10toast import ToastNotifier
toaster = ToastNotifier()
except ImportError:
print("1 or more dependancies not installed, exiting... | {
"repo_name": "PointyDev/discord-bughunternotifs",
"path": "bhnotifs.py",
"copies": "1",
"size": "5982",
"license": "mit",
"hash": 4735647161155582000,
"line_mean": 46.1023622047,
"line_max": 141,
"alpha_frac": 0.5720494818,
"autogenerated": false,
"ratio": 3.927774130006566,
"config_test": fal... |
#BugMartiniAPI
#Adam Knuckey October 2015
import urllib,urllib2
import re
# Downloads a comic from the given link to a given destination
# Destination must be a name ending in .png
def download(link,destination):
urllib.urlretrieve(link,destination)
# Returns a permalink to today's comic
def getTodays():
html = ur... | {
"repo_name": "aknuck/Bug-Comic-API",
"path": "BugMartiniAPI.py",
"copies": "1",
"size": "1938",
"license": "mit",
"hash": 394281029328613800,
"line_mean": 34.8888888889,
"line_max": 106,
"alpha_frac": 0.6805985552,
"autogenerated": false,
"ratio": 2.949771689497717,
"config_test": false,
"ha... |
# Bug.py
from Tools import *
class Bug:
def __init__(self, number, xPos, yPos, worldXSize=80, worldYSize=80):
# the environment
self.number = number
self.worldXSize = worldXSize
self.worldYSize = worldYSize
# the bug
self.xPos = xPos
self.yPos = yPos
... | {
"repo_name": "terna/SLAPP3",
"path": "5 objectSwarmModelBugs/Bug.py",
"copies": "1",
"size": "1490",
"license": "cc0-1.0",
"hash": -5873607813998950000,
"line_mean": 26.0909090909,
"line_max": 73,
"alpha_frac": 0.5597315436,
"autogenerated": false,
"ratio": 3.5224586288416075,
"config_test": f... |
# Bug.py
import random
class Bug:
def __init__(self, number, xPos, yPos, worldXSize=80, worldYSize=80):
# the environment
self.number = number
self.worldXSize = worldXSize
self.worldYSize = worldYSize
# the bug
self.xPos = xPos
self.yPos = yPos
print... | {
"repo_name": "terna/SLAPP3",
"path": "4 basicObjectProgrammingManyBugs_bugExternal_+_shuffle/Bug.py",
"copies": "1",
"size": "1180",
"license": "cc0-1.0",
"hash": -1749333243291811800,
"line_mean": 24.652173913,
"line_max": 73,
"alpha_frac": 0.5923728814,
"autogenerated": false,
"ratio": 3.49112... |
# bugs not fixed
from catalytic_rates import rates
import pandas as pd
import matplotlib.pyplot as plt
from figure_correlation import generate_figure
from pFBA_implementation import perform_pFBA
import numpy as np
from scipy import stats, odr
R = rates()
def customize_ATPM(x):
R.rxns['ATPM'].lower_bound = 3.15*... | {
"repo_name": "dandanvidi/kvivo_max",
"path": "scripts/ATP_maintenance.py",
"copies": "3",
"size": "2090",
"license": "mit",
"hash": -9041057031725478000,
"line_mean": 33.262295082,
"line_max": 95,
"alpha_frac": 0.6138755981,
"autogenerated": false,
"ratio": 2.6125,
"config_test": false,
"has... |
# BUGS:
# .txt appended to filenames (even images)
# _http_request needs better error handling
import os
import sys
import hashlib
import urlparse
try:
import simplejson as json
except ImportError:
import json
from mql_queries import uberquery, add_file_query, null, true, false, update_property_query
from exte... | {
"repo_name": "ericmckean/acre",
"path": "utilities/acp/acreapp.py",
"copies": "5",
"size": "12203",
"license": "apache-2.0",
"hash": -3119983318180718000,
"line_mean": 37.6170886076,
"line_max": 102,
"alpha_frac": 0.4907809555,
"autogenerated": false,
"ratio": 3.998361730013106,
"config_test":... |
# Bugs to be fixed. See the 2nd testcase
def longestChain(words):
lendict, lenlist = {}, []
# build the dictory where
# the key is the length of a word,
# and the value is the set of words with the length
for word in words:
l = len(word)
if len(word) in lendict:
lendict[... | {
"repo_name": "cc13ny/algo",
"path": "comp/twosigma/LongestChain/LongestChain_002.py",
"copies": "5",
"size": "1860",
"license": "mit",
"hash": -7050555057724092000,
"line_mean": 29,
"line_max": 84,
"alpha_frac": 0.5161290323,
"autogenerated": false,
"ratio": 3.3155080213903743,
"config_test": ... |
"""Buienradar library to get parsed weather data from buienradar.nl."""
import json
import logging
from datetime import datetime # , timedelta
import pytz
import requests
from vincenty import vincenty
from buienradar.constants import (
__BRCONDITIONS,
ATTRIBUTION,
ATTRIBUTION_INFO,
AVERAGE,
BAROM... | {
"repo_name": "mjj4791/python-buienradar",
"path": "buienradar/buienradar_json.py",
"copies": "1",
"size": "22284",
"license": "mit",
"hash": -4902923284630585000,
"line_mean": 30.3417721519,
"line_max": 91,
"alpha_frac": 0.5716208939,
"autogenerated": false,
"ratio": 3.5580392783011336,
"confi... |
"""Buienradar library to get parsed weather data from buienradar.nl."""
import logging
from datetime import datetime, timedelta
import pytz
import requests
import xmltodict
from vincenty import vincenty
from buienradar.constants import (
ATTRIBUTION,
ATTRIBUTION_INFO,
AVERAGE,
CONDITION,
CONTENT,
... | {
"repo_name": "mjj4791/python-buienradar",
"path": "buienradar/buienradar_xml.py",
"copies": "1",
"size": "16287",
"license": "mit",
"hash": -2918828851536529000,
"line_mean": 31.3154761905,
"line_max": 79,
"alpha_frac": 0.587707988,
"autogenerated": false,
"ratio": 3.5154327649471186,
"config_... |
"""Buienradar library to get parsed weather data from buienradar.nl."""
import logging
from buienradar.buienradar_json import get_json_data, parse_json_data
from buienradar.buienradar_xml import get_xml_data, parse_xml_data
from buienradar.constants import (
__BRCONDITIONS,
CONDCODE,
CONDITION,
DETAILE... | {
"repo_name": "mjj4791/python-buienradar",
"path": "buienradar/buienradar.py",
"copies": "1",
"size": "1705",
"license": "mit",
"hash": -504796378927866100,
"line_mean": 31.7884615385,
"line_max": 78,
"alpha_frac": 0.6263929619,
"autogenerated": false,
"ratio": 3.7390350877192984,
"config_test"... |
"""build_2000_msa.py
Extract a usable crosswalk between 2000 Metropolitan areas and counties.
Reconstitute a shapefile for the 2000 MSAs from the counties.
We do not take Porto-Rican MSA into account.
Details are available at:
http://www.census.gov/population/metro/data/pastmetro.html
And in particular the two files... | {
"repo_name": "rlouf/patterns-of-segregation",
"path": "bin/data_prep/crosswalk_msa_county.py",
"copies": "1",
"size": "2549",
"license": "bsd-3-clause",
"hash": -8566909235365765000,
"line_mean": 27.010989011,
"line_max": 74,
"alpha_frac": 0.5982738329,
"autogenerated": false,
"ratio": 3.0490430... |
"""Build a binary min heap object."""
from math import floor
class BinaryHeap(object):
"""Create a Binary Heap object as a Min Heap."""
def __init__(self):
"""Initialize the heap list to be used by Binary Heap."""
self._heap_list = []
def push(self, val):
"""Add new value to heap... | {
"repo_name": "adriennekarnoski/data-structures",
"path": "python/data_structures/binheap.py",
"copies": "1",
"size": "1845",
"license": "mit",
"hash": 6028581207355661000,
"line_mean": 29.75,
"line_max": 67,
"alpha_frac": 0.4861788618,
"autogenerated": false,
"ratio": 3.9006342494714588,
"conf... |
"""Build a client module for this revision.
Clients are versioned by date, by default.
"""
from datetime import datetime
from operator import itemgetter
from urlparse import urljoin
from urlparse import urlparse
import json
import sys
import requests
class Client(object):
def __init__(self, base_url):
p... | {
"repo_name": "sbuss/tastypie-client-generator",
"path": "tastypieclient/client_builder.py",
"copies": "1",
"size": "6946",
"license": "mit",
"hash": 5749872742204863000,
"line_mean": 33.5572139303,
"line_max": 79,
"alpha_frac": 0.5912755543,
"autogenerated": false,
"ratio": 4.026666666666666,
... |
"""Build a Doubly Linked list object."""
class Node(object):
"""Create a new Node object."""
def __init__(self, data=None, next_node=None, previous_node=None):
"""Initialized values of new Node object."""
self.data = data
self.next_node = next_node
self.previous_node = previou... | {
"repo_name": "adriennekarnoski/data-structures",
"path": "python/data_structures/doubly_linked_list.py",
"copies": "1",
"size": "2111",
"license": "mit",
"hash": -2067431256899964400,
"line_mean": 27.9178082192,
"line_max": 70,
"alpha_frac": 0.5457129323,
"autogenerated": false,
"ratio": 4.04406... |
def parse_affymetrix_annotations(filename,species):
###Import an Affymetrix array annotation file (from http://www.affymetrix.com) and parse out annotations
temp_affy_db = {}; x=0; y=0
if process_go == 'yes':
eg_go_found = verifyFile('Databases/'+species+'/gene-go/EntrezGene-GeneOntology.txt')
... | {
"repo_name": "wuxue/altanalyze",
"path": "BuildAffymetrixAssociations.py",
"copies": "1",
"size": "74022",
"license": "apache-2.0",
"hash": 7748923177077028000,
"line_mean": 54.9924357035,
"line_max": 235,
"alpha_frac": 0.5753559753,
"autogenerated": false,
"ratio": 3.7509881422924902,
"config... |
#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, distribute, sublicense, and/or sell
... | {
"repo_name": "nsalomonis/AltAnalyze",
"path": "import_scripts/BuildAffymetrixAssociations.py",
"copies": "1",
"size": "76014",
"license": "apache-2.0",
"hash": -2968132246648476700,
"line_mean": 54.8541510845,
"line_max": 235,
"alpha_frac": 0.5656326466,
"autogenerated": false,
"ratio": 3.805266... |
"""Build a file ``contributors.md``, an index of contribs and what they've
helped on. This writes the file to whatever file from which it is run, thus,
to use, run from root of the project with ``python cltk/utils/build_contribs_index.py``.
"""
__author__ = 'Kyle P. Johnson <kyle@kyle-p-johnson.com>'
from collections... | {
"repo_name": "eamonnbell/cltk",
"path": "cltk/utils/build_contribs_index.py",
"copies": "2",
"size": "2631",
"license": "mit",
"hash": 2882449632625100300,
"line_mean": 35.5416666667,
"line_max": 88,
"alpha_frac": 0.5944507792,
"autogenerated": false,
"ratio": 3.8521229868228404,
"config_test"... |
# Build a graph for an individual video frame
from nltk.corpus import wordnet as wn
import utilities.paths as paths
from os import listdir
from os.path import isfile, join
import string
DRIVE = paths.get_drive()
def add_to_dic(dict, k, v):
if k not in dict:
dict[k] = v
return dict
def remDashNum(s):... | {
"repo_name": "HaydenFaulkner/phd",
"path": "scene_graphs/frame_build.py",
"copies": "1",
"size": "9766",
"license": "mit",
"hash": -6960639454420668000,
"line_mean": 46.1835748792,
"line_max": 160,
"alpha_frac": 0.3746672128,
"autogenerated": false,
"ratio": 3.8707887435592547,
"config_test": ... |
#build a hangman game
import random
import sys
import os
#hangman
hangman= ['\
\n ----\
\n | |\
\n | \
\n | \
\n | \
\n | \
\n | \
\n --+--','\
\n ----\
\n | |\
\n | O \
\n | \
\n | \
\n | ... | {
"repo_name": "nlesser/intro2coding",
"path": "examples/hangman-example.py",
"copies": "1",
"size": "3088",
"license": "mit",
"hash": 5880904277814840000,
"line_mean": 18.6687898089,
"line_max": 75,
"alpha_frac": 0.4656735751,
"autogenerated": false,
"ratio": 2.685217391304348,
"config_test": f... |
# build a json file with the studio config
pixel_spacing = 0.5
strip_gap = 5.0
initial_y_location = 0.0
initial_x_location = 0.0
initial_z_location = 0.0
current_y_location = initial_y_location
current_x_location = initial_x_location
current_z_location = initial_z_location
current_address = 0
build_list = []
# bu... | {
"repo_name": "edcolmar/udder",
"path": "udder/conf/build_led_array.py",
"copies": "1",
"size": "2581",
"license": "apache-2.0",
"hash": -7425795318838220000,
"line_mean": 19.171875,
"line_max": 59,
"alpha_frac": 0.5718713677,
"autogenerated": false,
"ratio": 3.5356164383561643,
"config_test": ... |
"""Build a language detector model
The goal of this exercise is to train a linear classifier on text features
that represent sequences of up to 3 consecutive characters so as to be
recognize natural languages by using the frequencies of short character
sequences as 'fingerprints'.
"""
# Author: Olivier Grisel <olivie... | {
"repo_name": "kashif/scikit-learn",
"path": "doc/tutorial/text_analytics/skeletons/exercise_01_language_train_model.py",
"copies": "25",
"size": "2004",
"license": "bsd-3-clause",
"hash": 2771544134840790000,
"line_mean": 31.3225806452,
"line_max": 78,
"alpha_frac": 0.751996008,
"autogenerated": f... |
"""Build a language detector model
The goal of this exercise is to train a linear classifier on text features
that represent sequences of up to 3 consecutive characters to recognize natural
languages with short character sequences as 'fingerprints'.
Pre-requisite:
```
python data/languages/fetch_data
```
Feed downl... | {
"repo_name": "jeremyosborne/python",
"path": "ml/text_analytics/language_detection.py",
"copies": "1",
"size": "3943",
"license": "mit",
"hash": 7236408518367795000,
"line_mean": 30.2936507937,
"line_max": 160,
"alpha_frac": 0.7382703525,
"autogenerated": false,
"ratio": 3.3330515638207947,
"c... |
"Build alignments and profiles in a directory tree of sequence sets."
import itertools
import logging
import os
import subprocess
from glob import glob
from os.path import basename, isdir, isfile, join
from Bio import SeqIO
from Bio import AlignIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from bioc... | {
"repo_name": "etal/fammer",
"path": "fammerlib/build.py",
"copies": "2",
"size": "18868",
"license": "bsd-2-clause",
"hash": -4288691479642112000,
"line_mean": 36.736,
"line_max": 82,
"alpha_frac": 0.5523107908,
"autogenerated": false,
"ratio": 3.556644674835061,
"config_test": false,
"has_n... |
# Build all content in the content/ directory and stage it into the game directory.
#########################################################################################
import os
import shutil
import zipfile
# 0) Script customization
PotentialContentDirs = [ "content", "../content" ]
PotentialBuildDirs = [ "build... | {
"repo_name": "smacdo/Dungeon-Crawler",
"path": "scripts/buildcontent.py",
"copies": "1",
"size": "3175",
"license": "apache-2.0",
"hash": -8774407364563614000,
"line_mean": 28.4074074074,
"line_max": 103,
"alpha_frac": 0.6784251969,
"autogenerated": false,
"ratio": 3.3491561181434597,
"config_... |
# Build all examples
# Pass -deploy to also install on connected device
import subprocess
import sys
EXAMPLES = [
"bloom",
"computecullandlod",
"computecloth",
"computenbody",
"computeparticles",
"computeshader",
"debugmarker",
"deferred",
"deferredmultisampling",
"deferredshado... | {
"repo_name": "SaschaWillems/vulkan_slim",
"path": "android/build-all.py",
"copies": "2",
"size": "1792",
"license": "mit",
"hash": -4187894941415739000,
"line_mean": 21.1234567901,
"line_max": 97,
"alpha_frac": 0.6149553571,
"autogenerated": false,
"ratio": 3.4133333333333336,
"config_test": f... |
# Build all examples
# Pass -deploy to also install on connected device
import subprocess
import sys
EXAMPLES = [
"bloom",
"computecullandlod",
"computenbody",
"computeparticles",
"computeshader",
"debugmarker",
"deferred",
"deferredmultisampling",
"deferredshadows",
"displaceme... | {
"repo_name": "ming4883/Vulkan",
"path": "android/build-all.py",
"copies": "1",
"size": "1751",
"license": "mit",
"hash": 3227532091069597700,
"line_mean": 21.164556962,
"line_max": 97,
"alpha_frac": 0.6150770988,
"autogenerated": false,
"ratio": 3.413255360623782,
"config_test": false,
"has_... |
"""Build all the desired documents from the Sonata wiki.
"""
# configuration:
import config
# imports:
import os
import glob
import re
import string
import shutil
import pickle
import subprocess
import pypandoc
from pprint import pprint as pp
from collections import defaultdict
import itertools
import argparse
impor... | {
"repo_name": "hkarl/mw2pdf",
"path": "build.py",
"copies": "1",
"size": "29725",
"license": "bsd-3-clause",
"hash": 8675066928987847000,
"line_mean": 31.4508733624,
"line_max": 168,
"alpha_frac": 0.5108158116,
"autogenerated": false,
"ratio": 4.366186839012926,
"config_test": false,
"has_no_... |
'''Build an admin interface for pages and page-related things
'''
import functools
import urlparse
from django import http
from django.conf import settings
try:
from django.conf.urls import defaults as urls
except:
from django.conf import urls
from django.contrib import admin
from django.core import exceptions... | {
"repo_name": "GrAndSE/django-pages",
"path": "pages/admin.py",
"copies": "1",
"size": "16940",
"license": "bsd-3-clause",
"hash": 3104766929964255000,
"line_mean": 38.765258216,
"line_max": 79,
"alpha_frac": 0.5611570248,
"autogenerated": false,
"ratio": 4.436877946568885,
"config_test": false... |
"""Build an Apache Beam pipeline for keras inference to BigQuery."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import tempfile
import apache_beam as beam
from apache_beam.io.gcp.bigquery import BigQueryDisposition
from apache_beam.io.... | {
"repo_name": "GoogleCloudPlatform/healthcare",
"path": "datathon/datathon_etl_pipelines/generic_imaging/inference_to_bigquery.py",
"copies": "1",
"size": "8351",
"license": "apache-2.0",
"hash": 1702093221833475600,
"line_mean": 37.1324200913,
"line_max": 80,
"alpha_frac": 0.6832714645,
"autogener... |
"""Build and check configuration for quattor documentation."""
import os
import ConfigParser
from vsc.utils import fancylogger
logger = fancylogger.getLogger()
cfgfile = ".docbuilder.cfg"
def check_repository_map(repository_map):
"""Check if a repository mapping is valid."""
logger.info("Checking repository... | {
"repo_name": "jouvin/release",
"path": "src/documentation_builder/lib/quattordocbuild/config.py",
"copies": "2",
"size": "2626",
"license": "apache-2.0",
"hash": -316392558886423500,
"line_mean": 33.5526315789,
"line_max": 106,
"alpha_frac": 0.6214775324,
"autogenerated": false,
"ratio": 4.19488... |
# Build and install an Apple Help Viewer compatible version of the Python
# documentation into the framework.
# Code by Bill Fancher, with some modifications by Jack Jansen.
#
# You must run this as a two-step process
# 1. python setupDocs.py build
# 2. Wait for Apple Help Indexing Tool to finish
# 3. python setupDocs.... | {
"repo_name": "valkjsaaa/sl4a",
"path": "python/src/Mac/Tools/Doc/setup.py",
"copies": "24",
"size": "8207",
"license": "apache-2.0",
"hash": -1034545991388249100,
"line_mean": 37.3504672897,
"line_max": 119,
"alpha_frac": 0.6188619471,
"autogenerated": false,
"ratio": 3.6968468468468467,
"conf... |
"""Build and install component metadata on a WMT server."""
import os
import shutil
from scripting.contexts import cd
from wmtmetadata.config import ConfigFromFile, ConfigFromHost
from wmtmetadata.metadata import (Files, Info, Uses, Provides,
Parameters)
from wmtmetadata.host import ... | {
"repo_name": "csdms/wmt-metadata",
"path": "wmtmetadata/build.py",
"copies": "1",
"size": "2842",
"license": "mit",
"hash": -2822867986941741600,
"line_mean": 34.525,
"line_max": 78,
"alpha_frac": 0.599929627,
"autogenerated": false,
"ratio": 4.312594840667678,
"config_test": true,
"has_no_k... |
"""Build and install gridfill."""
# Copyright (c) 2012-2016 Andrew Dawson
#
# 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 u... | {
"repo_name": "ajdawson/gridfill",
"path": "setup.py",
"copies": "1",
"size": "3169",
"license": "mit",
"hash": -5223298104644312000,
"line_mean": 32.0104166667,
"line_max": 79,
"alpha_frac": 0.6970653203,
"autogenerated": false,
"ratio": 4.006321112515803,
"config_test": false,
"has_no_keywo... |
"""Build and install the colormaps package."""
# Copyright (c) 2012 Andrew Dawson
#
# 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 right... | {
"repo_name": "ajdawson/colormaps",
"path": "setup.py",
"copies": "1",
"size": "2163",
"license": "mit",
"hash": -6720062165630176000,
"line_mean": 44.0625,
"line_max": 79,
"alpha_frac": 0.6763754045,
"autogenerated": false,
"ratio": 4.360887096774194,
"config_test": false,
"has_no_keywords":... |
"""Build and install the lscubes program."""
# Copyright (c) 2013 Andrew Dawson
#
# 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... | {
"repo_name": "ajdawson/lscubes",
"path": "setup.py",
"copies": "1",
"size": "1489",
"license": "mit",
"hash": 6790298036451408000,
"line_mean": 42.7941176471,
"line_max": 79,
"alpha_frac": 0.7374076561,
"autogenerated": false,
"ratio": 4.194366197183099,
"config_test": false,
"has_no_keyword... |
"""Build and install the windspharm package."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# 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... | {
"repo_name": "nicolasfauchereau/windspharm",
"path": "setup.py",
"copies": "1",
"size": "2131",
"license": "mit",
"hash": -1382275261304603000,
"line_mean": 42.4897959184,
"line_max": 79,
"alpha_frac": 0.7085875176,
"autogenerated": false,
"ratio": 4.14591439688716,
"config_test": false,
"ha... |
"""Build and install the windspharm package."""
# Copyright (c) 2012-2018 Andrew Dawson
#
# 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... | {
"repo_name": "ajdawson/windspharm",
"path": "setup.py",
"copies": "1",
"size": "2053",
"license": "mit",
"hash": -5138596804364861000,
"line_mean": 41.7708333333,
"line_max": 79,
"alpha_frac": 0.7243058938,
"autogenerated": false,
"ratio": 3.9709864603481626,
"config_test": false,
"has_no_ke... |
"""Build and install the wmtmetadata package."""
import os
from setuptools import setup, find_packages
def read_requirements():
path = os.path.dirname(os.path.abspath(__file__))
requirements_file = os.path.join(path, 'requirements.txt')
try:
with open(requirements_file, 'r') as req_fp:
... | {
"repo_name": "csdms/wmt-metadata",
"path": "setup.py",
"copies": "1",
"size": "1113",
"license": "mit",
"hash": 4015078027807810000,
"line_mean": 28.2894736842,
"line_max": 79,
"alpha_frac": 0.5965858041,
"autogenerated": false,
"ratio": 3.975,
"config_test": false,
"has_no_keywords": false,... |
"""Build and maintain a database of Kepler/K2 publications.
"""
from __future__ import print_function, division, unicode_literals
# Standard library
import os
import re
import sys
import json
import datetime
import argparse
import collections
import sqlite3 as sql
import numpy as np
try:
import ads
except Excepti... | {
"repo_name": "KeplerGO/kpub",
"path": "kpub/kpub.py",
"copies": "1",
"size": "37685",
"license": "mit",
"hash": -1090655915589537200,
"line_mean": 39.6526429342,
"line_max": 110,
"alpha_frac": 0.5170757596,
"autogenerated": false,
"ratio": 4.263491345174794,
"config_test": false,
"has_no_key... |
"""Build and Version class model Managers"""
from __future__ import absolute_import
from django.db import models
from .constants import (BRANCH, TAG, LATEST, LATEST_VERBOSE_NAME, STABLE,
STABLE_VERBOSE_NAME)
from .querysets import VersionQuerySet
from readthedocs.core.utils.extend import (Set... | {
"repo_name": "safwanrahman/readthedocs.org",
"path": "readthedocs/builds/managers.py",
"copies": "2",
"size": "1956",
"license": "mit",
"hash": -7181089853130677000,
"line_mean": 29.5625,
"line_max": 87,
"alpha_frac": 0.6083844581,
"autogenerated": false,
"ratio": 4.317880794701987,
"config_te... |
"""Build and Version QuerySet classes."""
import datetime
import logging
from django.db import models
from django.db.models import Q
from django.utils import timezone
from readthedocs.core.utils.extend import SettingsOverrideObject
from readthedocs.projects import constants
from readthedocs.projects.models import Pro... | {
"repo_name": "rtfd/readthedocs.org",
"path": "readthedocs/builds/querysets.py",
"copies": "1",
"size": "7002",
"license": "mit",
"hash": -4186834565147889000,
"line_mean": 32.9902912621,
"line_max": 89,
"alpha_frac": 0.6388174807,
"autogenerated": false,
"ratio": 4.378986866791744,
"config_tes... |
"""Build and Version QuerySet classes"""
from __future__ import absolute_import
from django.db import models
from guardian.shortcuts import get_objects_for_user
from readthedocs.core.utils.extend import SettingsOverrideObject
from readthedocs.projects import constants
__all__ = ['VersionQuerySet', 'BuildQuerySet',... | {
"repo_name": "safwanrahman/readthedocs.org",
"path": "readthedocs/builds/querysets.py",
"copies": "3",
"size": "4668",
"license": "mit",
"hash": 7460201856248094000,
"line_mean": 32.3428571429,
"line_max": 89,
"alpha_frac": 0.6486718081,
"autogenerated": false,
"ratio": 4.149333333333334,
"con... |
'''Build an executable.'''
from distutils.core import setup
import os
import py2exe
def add_pytz_files():
'''
Modified from
http://code.google.com/p/googletransitdatafeed/source/browse/trunk/
python/setup.py
by way of
http://stackoverflow.com/questions/9158846/unknowntimezoneerror-... | {
"repo_name": "futurulus/falcon",
"path": "setup.py",
"copies": "1",
"size": "1798",
"license": "bsd-2-clause",
"hash": 6647292540398634000,
"line_mean": 32.2962962963,
"line_max": 79,
"alpha_frac": 0.5956618465,
"autogenerated": false,
"ratio": 3.6619144602851326,
"config_test": false,
"has_... |
'''build an extension module
'''
module_head = '''#define PY_SSIZE_T_CLEAN
#include "Python.h"
%s
'''
module_exception ='''static PyObject *%sError;
'''
method_obj = '''static PyObject *
%s_%s(%s)
%s
'''
method_doc = '''PyDoc_STRVAR(%s_%s_doc,
%s);
'''
method_def = '''
{"%s", %s_%s, %s, %s_%s_doc},'''
PyMe... | {
"repo_name": "nirinA/scripts_python",
"path": "build_extension_module.py",
"copies": "1",
"size": "6448",
"license": "unlicense",
"hash": 8935453223373474000,
"line_mean": 28.1764705882,
"line_max": 109,
"alpha_frac": 0.4806141439,
"autogenerated": false,
"ratio": 3.586206896551724,
"config_te... |
"""Build an index (DB table) of known GitHub repositories of Vim plugins."""
import argparse
import collections
import logging
import re
from raven import Client
import rethinkdb as r
import db.util
from db.github_repos import PluginGithubRepos
try:
import secrets
_SENTRY_DSN = getattr(secrets, 'SENTRY_DSN'... | {
"repo_name": "jonafato/vim-awesome",
"path": "tools/scrape/build_github_index.py",
"copies": "3",
"size": "6336",
"license": "mit",
"hash": -6297786011482810000,
"line_mean": 32.7021276596,
"line_max": 79,
"alpha_frac": 0.6246843434,
"autogenerated": false,
"ratio": 3.7804295942720763,
"config... |
"""Build an index (DB table) of known GitHub repositories of Vim plugins."""
import argparse
import collections
import logging
import re
import rethinkdb as r
import db.util
from db.github_repos import PluginGithubRepos
r_conn = db.util.r_conn
# Matches eg. "github.com/scrooloose/syntastic", "github.com/kien/ctrl... | {
"repo_name": "shaialon/vim-awesome",
"path": "tools/scrape/build_github_index.py",
"copies": "2",
"size": "5797",
"license": "mit",
"hash": 8769756074908583000,
"line_mean": 32.7034883721,
"line_max": 79,
"alpha_frac": 0.6298085216,
"autogenerated": false,
"ratio": 3.7569669475048606,
"config_... |
"""Build an index of top-level symbols from Python modules and packages."""
import os
import sys
import ast
import json
import logging
import re
from contextlib import contextmanager
from distutils import sysconfig
from importmagic.util import parse_ast
LIB_LOCATIONS = sorted(set((
(sysconfig.get_python_lib(st... | {
"repo_name": "birkenfeld/importmagic",
"path": "importmagic/index.py",
"copies": "2",
"size": "14475",
"license": "bsd-2-clause",
"hash": -5248414824664421000,
"line_mean": 34.0484261501,
"line_max": 100,
"alpha_frac": 0.549015544,
"autogenerated": false,
"ratio": 4.0297884187082404,
"config_t... |
"""Build a project using PEP 517 hooks.
"""
import argparse
import logging
import os
from pip._vendor import toml
import shutil
from .envbuild import BuildEnvironment
from .wrappers import Pep517HookCaller
from .dirtools import tempdir, mkdir_p
from .compat import FileNotFoundError
log = logging.getLogger(__name__)
... | {
"repo_name": "pradyunsg/pip",
"path": "src/pip/_vendor/pep517/build.py",
"copies": "6",
"size": "3456",
"license": "mit",
"hash": 5359822352104363000,
"line_mean": 26.2125984252,
"line_max": 75,
"alpha_frac": 0.6438078704,
"autogenerated": false,
"ratio": 3.6962566844919786,
"config_test": fal... |
"""Build a project using PEP 517 hooks.
"""
import argparse
import logging
import os
import toml
import shutil
from .envbuild import BuildEnvironment
from .wrappers import Pep517HookCaller
from .dirtools import tempdir, mkdir_p
from .compat import FileNotFoundError
log = logging.getLogger(__name__)
def validate_sys... | {
"repo_name": "rouge8/pip",
"path": "src/pip/_vendor/pep517/build.py",
"copies": "10",
"size": "3318",
"license": "mit",
"hash": -4834703919914201000,
"line_mean": 25.7580645161,
"line_max": 75,
"alpha_frac": 0.643761302,
"autogenerated": false,
"ratio": 3.6784922394678494,
"config_test": false... |
"""Build a pyramid out of a string."""
def watch_pyramid_from_the_side(chars):
"""View the pyramid from the side."""
if chars:
result = []
odd = [x * 2 + 1 for x in range(len(chars))]
for i, x in enumerate(chars[::-1]):
layer = x * odd[i]
space = (odd[-1] - len(... | {
"repo_name": "clair3st/code-katas",
"path": "src/string_pyramid.py",
"copies": "1",
"size": "1326",
"license": "mit",
"hash": 3816858538434804700,
"line_mean": 28.4666666667,
"line_max": 70,
"alpha_frac": 0.5263951735,
"autogenerated": false,
"ratio": 3.4986807387862795,
"config_test": false,
... |
"""Build a pyramid out of characters in an input string."""
class pyramid(object):
"""Takes a string. Outputs based on a pyramid built out of the string's characters."""
def __init__(self, string):
"""Initialize the pyramid."""
self.build_string = string
def from_the_side(self):
... | {
"repo_name": "pasaunders/code-katas",
"path": "src/pyramid.py",
"copies": "1",
"size": "1573",
"license": "mit",
"hash": 8125132897620528000,
"line_mean": 35.5813953488,
"line_max": 102,
"alpha_frac": 0.5702479339,
"autogenerated": false,
"ratio": 3.9722222222222223,
"config_test": false,
"h... |
"""Build a Pyrex file from .pyx source to .so loadable module using
the installed distutils infrastructure. Call:
out_fname = pyx_to_dll("foo.pyx")
"""
import os
import sys
from distutils.dist import Distribution
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension i... | {
"repo_name": "larsmans/cython",
"path": "pyximport/pyxbuild.py",
"copies": "1",
"size": "5193",
"license": "apache-2.0",
"hash": 7754955013313735000,
"line_mean": 33.62,
"line_max": 85,
"alpha_frac": 0.5742345465,
"autogenerated": false,
"ratio": 3.8928035982008997,
"config_test": true,
"has... |
"""Build a Pyrex file from .pyx source to .so loadable module using
the installed distutils infrastructure. Call:
out_fname = pyx_to_dll("foo.pyx")
"""
import os
import sys
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util impo... | {
"repo_name": "nzavagli/UnrealPy",
"path": "UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Cython-0.22.1/pyximport/pyxbuild.py",
"copies": "10",
"size": "5631",
"license": "mit",
"hash": -5826503229711475000,
"line_mean": 34.8662420382,
"line_max": 85,
"alpha... |
"""Build a RNN model """
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import os
import sklearn as sk
import tensorflow as tf
from tensorflow.contrib import rnn
from tensorflow.contrib import seq2seq as s2s
import numpy as np
from decorators import *
... | {
"repo_name": "jeremy24/rnn-classifier",
"path": "model.py",
"copies": "1",
"size": "32171",
"license": "mit",
"hash": 376344518874073900,
"line_mean": 32.6869109948,
"line_max": 161,
"alpha_frac": 0.6699201144,
"autogenerated": false,
"ratio": 2.9345069780169664,
"config_test": false,
"has_n... |
"""Builda sample language model with LSTM and text captions."""
from __future__ import absolute_import
from __future__ import division
import os
from os.path import join, exists, isfile, isdir
import sys
import math
import shutil
import tensorflow as tf
import numpy as np
from pprint import pformat
import cPickle as p... | {
"repo_name": "chintak/image-captioning",
"path": "train.py",
"copies": "1",
"size": "11774",
"license": "mit",
"hash": -4481499003776346600,
"line_mean": 37.7302631579,
"line_max": 79,
"alpha_frac": 0.5573297095,
"autogenerated": false,
"ratio": 3.7389647507145125,
"config_test": true,
"has_... |
"""Builda sample language model with LSTM and text captions."""
from __future__ import absolute_import
from __future__ import division
import os
from os.path import join, exists
import tensorflow as tf
import numpy as np
from addict import Dict
from pprint import pformat
from utils import CONFIG
config = CONFIG.Train... | {
"repo_name": "chintak/image-captioning",
"path": "im_cap_model.py",
"copies": "1",
"size": "7518",
"license": "mit",
"hash": -2118172245993262800,
"line_mean": 37.5538461538,
"line_max": 79,
"alpha_frac": 0.6560255387,
"autogenerated": false,
"ratio": 3.4297445255474455,
"config_test": true,
... |
"""Builda sample language model with LSTM and text captions."""
from __future__ import absolute_import
import os
import sys
import math
import shutil
import tensorflow as tf
import numpy as np
from pprint import pformat
from reader import flickr8k_raw_data
from configuration import CapConfig
from external.inputs impo... | {
"repo_name": "chintak/image-captioning",
"path": "sample_language_model.py",
"copies": "1",
"size": "15909",
"license": "mit",
"hash": -6892422038218774000,
"line_mean": 33.286637931,
"line_max": 80,
"alpha_frac": 0.6504494311,
"autogenerated": false,
"ratio": 3.42792501616031,
"config_test": ... |
"""Build a sentiment analysis / polarity model
Sentiment analysis can be casted as a binary text classification problem,
that is fitting a linear classifier on features extracted from the text
of the user messages so as to guess wether the opinion of the author is
positive or negative.
In this examples we will use a ... | {
"repo_name": "gnublet/py_explorations",
"path": "sklearn/exercise_02_sentiment.py",
"copies": "1",
"size": "4170",
"license": "mit",
"hash": 6405522126904865000,
"line_mean": 40.2871287129,
"line_max": 230,
"alpha_frac": 0.6923261391,
"autogenerated": false,
"ratio": 3.71326803205699,
"config_... |
#Build a single file containing all of eupy!
import re
def main():
#Find all the files to concentrate
files = []
with open("euphoria/__init__.py", 'r') as f:
lines = f.read().split('\n')
for l in lines:
matches = re.search("from \. import (\S*)", l)
if matches:
... | {
"repo_name": "jedevc/EuPy",
"path": "min.py",
"copies": "2",
"size": "1211",
"license": "mit",
"hash": -3651394059811642400,
"line_mean": 31.7297297297,
"line_max": 58,
"alpha_frac": 0.4929810074,
"autogenerated": false,
"ratio": 3.808176100628931,
"config_test": false,
"has_no_keywords": fa... |
"""Build assemblies using the aTRAM algorithm.."""
import os
import re
from multiprocessing import Pool
from os.path import basename, join, split, splitext
from subprocess import TimeoutExpired
from Bio import SeqIO
from . import assembler as assembly, bio, blast, db, db_atram, util
from .log import Logger
def ass... | {
"repo_name": "juliema/aTRAM",
"path": "lib/core_atram.py",
"copies": "1",
"size": "10236",
"license": "bsd-3-clause",
"hash": -3928594528830584300,
"line_mean": 30.7888198758,
"line_max": 77,
"alpha_frac": 0.5805001954,
"autogenerated": false,
"ratio": 3.6820143884892085,
"config_test": false,... |
"""Build assemblies using the aTRAM algorithm.."""
import re
import os
from os.path import basename, split, splitext, join
from multiprocessing import Pool
from Bio import SeqIO
from . import db
from . import db_atram
from . import log
from . import bio
from . import util
from . import blast
from . import assembler as... | {
"repo_name": "AntonelliLab/seqcap_processor",
"path": "bin/aTRAM-master/lib/core_atram.py",
"copies": "1",
"size": "10071",
"license": "mit",
"hash": -8004889132210396000,
"line_mean": 30.2763975155,
"line_max": 78,
"alpha_frac": 0.5787905868,
"autogenerated": false,
"ratio": 3.70939226519337,
... |
"""Build ast from tokens
This is currently python only. Support for other languages is postponed."""
import pygments.token
import codeowl.code
from . import nodes
def parse(code):
module = nodes.BlockStatement(0, 0)
children = parse_token(codeowl.code.parse(code, False))
module.children = list(children)... | {
"repo_name": "FlorianLudwig/code-owl",
"path": "codeowl/ast/py2_parser.py",
"copies": "1",
"size": "1049",
"license": "apache-2.0",
"hash": 4640490320117427000,
"line_mean": 25.8974358974,
"line_max": 75,
"alpha_frac": 0.5662535748,
"autogenerated": false,
"ratio": 4.3347107438016526,
"config_... |
"""Build a table of contents using markdown headers.
This is a very simple script that produces a table of contents that can be
added to a IPython notebook. The table is produced by looking for all markdown
headers in a notebook (# signs). The table follows the proper nesting so
#Header1
##header2
will produce
#Tab... | {
"repo_name": "rawrgulmuffins/make_juypter_toc",
"path": "make_juypter_toc/make_juypter_toc.py",
"copies": "1",
"size": "2754",
"license": "apache-2.0",
"hash": 7705073855391692000,
"line_mean": 35.72,
"line_max": 86,
"alpha_frac": 0.6365286855,
"autogenerated": false,
"ratio": 4.153846153846154,... |
# Build auto-volume.lua from the template and a JSON file of data
import os
import re
import json
import argparse
import xml.etree.ElementTree as ET
from urllib.parse import unquote, urlparse
import pydub
# Expects a series of paths as arguments. Files will be checked;
# directories will be recursed into. Unreadable o... | {
"repo_name": "Rosuav/shed",
"path": "auto-volume.py",
"copies": "1",
"size": "5109",
"license": "mit",
"hash": 6055192369416006000,
"line_mean": 43.4260869565,
"line_max": 112,
"alpha_frac": 0.6743002545,
"autogenerated": false,
"ratio": 3.0629496402877696,
"config_test": false,
"has_no_keyw... |
"""Build base image and pod runtime.
The construction of a pod is divided into two phases:
* Base image construction: This sets up the basic environment of a pod.
Notably, /usr/sbin/pod-exit and /var/lib/pod/exit-status.
* Pod runtime: This includes systemd unit files and exit status.
"""
__all__ = [
# Expose... | {
"repo_name": "clchiou/garage",
"path": "py/g1/containers/g1/containers/builders.py",
"copies": "1",
"size": "15619",
"license": "mit",
"hash": 1226359986429553700,
"line_mean": 27.8173431734,
"line_max": 88,
"alpha_frac": 0.6162366349,
"autogenerated": false,
"ratio": 3.266889772014223,
"confi... |
"""Build blueprint for choreographer."""
from itertools import groupby
from .steprunner import book_runner
from .step import get_url_steps
from .step import get_comic_steps
def _get_aname_runners_exist(exist_comics, ctrl, request_pool):
skip_errors = ctrl.get('skip_errors')
comic_steps = get_comic_steps(ctr... | {
"repo_name": "civalin/cmdlr",
"path": "src/cmdlr/loopctrl/blueprint.py",
"copies": "1",
"size": "2083",
"license": "mit",
"hash": 7553245285416789000,
"line_mean": 23.2209302326,
"line_max": 71,
"alpha_frac": 0.5693710994,
"autogenerated": false,
"ratio": 3.437293729372937,
"config_test": fals... |
""" Buildbot inplace config
(C) Copyright 2015 HicknHack Software GmbH
The original code can be found at:
https://github.com/hicknhack-software/buildbot-inplace-config
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... | {
"repo_name": "hicknhack-software/buildbot-inplace-config",
"path": "buildbot_inplace/setup_build.py",
"copies": "1",
"size": "1880",
"license": "apache-2.0",
"hash": -8584408704809768000,
"line_mean": 41.7272727273,
"line_max": 89,
"alpha_frac": 0.7196808511,
"autogenerated": false,
"ratio": 4.0... |
# buildbotstatus Extension for Review Board.
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include
from django.template import Context, loader
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import (ReviewRequestFiel... | {
"repo_name": "andythigpen/buildbotstatus",
"path": "buildbotstatus/extension.py",
"copies": "1",
"size": "2955",
"license": "bsd-3-clause",
"hash": -1665526582717200600,
"line_mean": 30.7741935484,
"line_max": 76,
"alpha_frac": 0.6128595601,
"autogenerated": false,
"ratio": 4.345588235294118,
... |
"""Build capnpc-java (runtime library is installed through Maven)."""
from pathlib import Path
from foreman import get_relpath, rule
from garage import scripts
from templates import common
common.define_git_repo(
repo='https://github.com/capnproto/capnproto-java.git',
treeish='v0.1.2',
)
common.define_d... | {
"repo_name": "clchiou/garage",
"path": "shipyard/rules/host/capnproto-java/build.py",
"copies": "1",
"size": "1290",
"license": "mit",
"hash": 7560566532169610000,
"line_mean": 25.875,
"line_max": 69,
"alpha_frac": 0.6069767442,
"autogenerated": false,
"ratio": 3.505434782608696,
"config_test"... |
"""Build capnproto java host tools.
NOTE: Java (runtime) libraries are installed through Gradle.
"""
import logging
from pathlib import Path
import foreman
from g1 import scripts
from g1.bases.assertions import ASSERT
import shipyard2.rules.bases
LOG = logging.getLogger(__name__)
shipyard2.rules.bases.define_git... | {
"repo_name": "clchiou/garage",
"path": "shipyard2/rules/third-party/capnproto-java/build.py",
"copies": "1",
"size": "1563",
"license": "mit",
"hash": -363476833348220100,
"line_mean": 24.6229508197,
"line_max": 72,
"alpha_frac": 0.6180422265,
"autogenerated": false,
"ratio": 3.2630480167014615,... |
"""Build cli arguments"""
import argparse
# from control.functions import (build, build_prod, restart, stop, default,
# opencontainer)
from control.options import options
def build_parser():
"""Need a basic parser that is capable of reading in a Controlfile"""
parser = argpars... | {
"repo_name": "PetroDE/control",
"path": "control/cli_args.py",
"copies": "1",
"size": "6391",
"license": "mit",
"hash": 8296335686666339000,
"line_mean": 43.075862069,
"line_max": 88,
"alpha_frac": 0.6352683461,
"autogenerated": false,
"ratio": 4.022026431718062,
"config_test": false,
"has_n... |
"""Build_Cloudtrail_Table
Create the CloudTrail Logs table for Athena use.
See the AWS documentation for Athena here:
http://docs.aws.amazon.com/athena/latest/ug/getting-started.html
"""
import os
import sys
import json
import logging
import boto3
from datetime import datetime
from botocore.exceptions import Pr... | {
"repo_name": "1Strategy/security-fairy",
"path": "partition_cloudtrail_bucket.py",
"copies": "1",
"size": "2095",
"license": "apache-2.0",
"hash": -8372033641190648000,
"line_mean": 28.5211267606,
"line_max": 223,
"alpha_frac": 0.5642004773,
"autogenerated": false,
"ratio": 3.727758007117438,
... |
"""Build command for etest Docker images."""
import os
import sys
from pathlib import Path
from typing import List
import click
@click.command(name="etest-build")
@click.option("--hardened/--no-hardened", default=False, help="Use a hardened profile.")
@click.option("--multilib/--no-multilib", default=True, help="Use... | {
"repo_name": "alunduil/etest",
"path": "etest/build.py",
"copies": "1",
"size": "1408",
"license": "mit",
"hash": 2085522098987333400,
"line_mean": 43,
"line_max": 119,
"alpha_frac": 0.7009943182,
"autogenerated": false,
"ratio": 3.476543209876543,
"config_test": false,
"has_no_keywords": fa... |
build_config = {
"version": "0.1",
"projects": {
# Windows x86
"w32-writeconsole-shellcode-hash-list.asm": { # List of hashes
"files": {
"w32-writeconsole-shellcode-hash-list.asm": {
"sources": ["w32-writeconsole-shellcode-hash-list.txt"],
... | {
"repo_name": "SkyLined/testival",
"path": "writeconsole-shellcodes/build_config.py",
"copies": "2",
"size": "4614",
"license": "bsd-3-clause",
"hash": -7897840052752822000,
"line_mean": 39.5675675676,
"line_max": 114,
"alpha_frac": 0.5166883398,
"autogenerated": false,
"ratio": 3.781967213114754... |
# build configuration file, created by
# sphinx-quickstart on Sat May 24 09:24:34 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values t... | {
"repo_name": "mingchen/django-cas-ng",
"path": "docs/conf.py",
"copies": "1",
"size": "4445",
"license": "mit",
"hash": -7617808900610251000,
"line_mean": 30.3028169014,
"line_max": 78,
"alpha_frac": 0.6636670416,
"autogenerated": false,
"ratio": 3.747892074198988,
"config_test": true,
"has_... |
# Build corpus with fixed word lengths
import numpy as np
import pandas as pd
import os
from collections import defaultdict
from itertools import islice
from prepare_datasets import get_folders, get_files
from os import listdir
from os.path import isfile, join
import os
def build_words(seq, n=2):
# See http:/... | {
"repo_name": "serval-snt-uni-lu/dsco",
"path": "build_corpus.py",
"copies": "1",
"size": "2940",
"license": "mit",
"hash": 7310306791789302000,
"line_mean": 29.625,
"line_max": 86,
"alpha_frac": 0.5421768707,
"autogenerated": false,
"ratio": 3.2061068702290076,
"config_test": false,
"has_no_... |
# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.
# To generate automatically the version number
import time
# Full getext (please don't change)
_ = lambda x : x
# Add-on information variables
addon_info = {
# add-on Name
"addon-name" : "Eloquence",
# The add-on ... | {
"repo_name": "pzajda/eloquence",
"path": "buildVars.py",
"copies": "1",
"size": "1785",
"license": "mit",
"hash": 3902058471873526300,
"line_mean": 37.8043478261,
"line_max": 109,
"alpha_frac": 0.7266106443,
"autogenerated": false,
"ratio": 3.3178438661710037,
"config_test": false,
"has_no_k... |
""" Build ``cytoolz`` with or without Cython.
Deployed versions of CyToolz do not rely on Cython by default even if the
user has Cython installed. A C compiler is used to compile the distributed
*.c files instead.
Pass "--cython" or "--with-cython" as a command line argument to setup.py
to build the project using Cy... | {
"repo_name": "ljwolf/cytoolz",
"path": "setup.py",
"copies": "2",
"size": "4044",
"license": "bsd-3-clause",
"hash": 5348653398150174000,
"line_mean": 35.7636363636,
"line_max": 79,
"alpha_frac": 0.6070722057,
"autogenerated": false,
"ratio": 4.084848484848485,
"config_test": false,
"has_no_... |
"""Build dialog."""
from Config import Config as Con
# Import JIRA
from jira import JIRA
# Import Jenkins
from jenkinsapi.jenkins import Jenkins
# Import Git Explorer
from GitExplorer import GitExplorer
# Import interface libraries
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
clas... | {
"repo_name": "Mafioziks/CI-Tool-Widgets",
"path": "BuildDialog.py",
"copies": "1",
"size": "4855",
"license": "mit",
"hash": 2513123645887846400,
"line_mean": 32.2534246575,
"line_max": 75,
"alpha_frac": 0.5579814624,
"autogenerated": false,
"ratio": 3.6558734939759034,
"config_test": false,
... |
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL... | {
"repo_name": "yindaz/pbrs",
"path": "mitsuba-af602c6fd98a/build/config-win32-msvc2010.py",
"copies": "2",
"size": "2357",
"license": "mit",
"hash": -6009541506682726000,
"line_mean": 57.925,
"line_max": 300,
"alpha_frac": 0.6194314807,
"autogenerated": false,
"ratio": 2.8227544910179643,
"conf... |
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-f... | {
"repo_name": "yindaz/pbrs",
"path": "mitsuba-af602c6fd98a/build/config-macos10.6-gcc-x86_64.py",
"copies": "2",
"size": "2253",
"license": "mit",
"hash": -2138632375778583600,
"line_mean": 69.40625,
"line_max": 554,
"alpha_frac": 0.6635596982,
"autogenerated": false,
"ratio": 2.925974025974026,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.