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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
piyushkant/Spam-Filter-Machine-Learning | spamfilter/fisher.py | 1 | 2184 | #####################################################
# Copyright (c) 2012 Piyush Kant #
# See the file license.txt for copying permission #
#####################################################
import classifier
import math
class fisherclassifier(classifier.classifier):
def __init__(self, ge... | mit | -6,822,964,227,045,991,000 | 28.931507 | 92 | 0.514652 | false | 4.324752 | false | false | false |
google-research/language | language/orqa/preprocessing/wiki_preprocessor.py | 1 | 3798 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -1,051,289,272,584,799,600 | 34.495327 | 79 | 0.688784 | false | 3.824773 | false | false | false |
JuBra/GEMEditor | GEMEditor/rw/test/test_units_rw.py | 1 | 1230 | from GEMEditor.rw.units import add_unit_definitions
from lxml.etree import Element
from GEMEditor.rw import *
class TestAddUnitsDefinition:
def test_node_addition(self):
root = Element("root")
add_unit_definitions(root)
list_of_unitdefinitions_node = root.find(sbml3_listOfUnitDefinitions... | gpl-3.0 | 2,451,616,240,589,040,000 | 37.46875 | 114 | 0.615447 | false | 3.617647 | false | false | false |
ceball/param | param/ipython.py | 1 | 12580 | """
Optional IPython extension for working with Parameters.
This extension offers extended but completely optional functionality
for IPython users. From within IPython, it may be loaded using:
%load_ext param.ipython
This will register the %params line magic to allow easy inspection of
all the parameters defined on... | bsd-3-clause | -6,385,748,612,119,651,000 | 36.891566 | 98 | 0.570032 | false | 4.084416 | false | false | false |
nimbis/cmsplugin-forms-builder | tests/settings.py | 1 | 5042 | DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'TEST_NAME': ':memory:',
},
}
# Hosts/domain names that are valid for this site; required if DEBUG is Fals... | bsd-3-clause | 4,226,599,500,157,421,000 | 30.710692 | 79 | 0.672154 | false | 3.710081 | false | false | false |
Ikusaba-san/Chiaki-Nanami | cogs/utils/formats.py | 1 | 1363 | import functools
import re
from more_itertools import one
def pluralize(**thing):
name, value = one(thing.items())
if name.endswith('y') and name[-2] not in 'aeiou':
name = f'{name[:-1]}ies' if value != 1 else name
return f'{value} {name}'
return f'{value} {name}{"s" * (value != 1)}'
de... | mit | -345,050,366,121,900,900 | 29.288889 | 87 | 0.641966 | false | 3.433249 | false | false | false |
keras-team/keras-autodoc | keras_autodoc/gathering_members.py | 1 | 4181 | import inspect
from inspect import isclass, isfunction, isroutine
from typing import List
from .utils import import_object
def get_classes(module,
exclude: List[str] = None,
return_strings: bool = True):
"""Get all the classes of a module.
# Arguments
module: The modu... | apache-2.0 | -592,158,582,117,040,500 | 36 | 85 | 0.610859 | false | 4.35975 | false | false | false |
ParsonsAMT/Myne | datamining/apps/profiles/migrations/0006_auto__add_courseimage.py | 1 | 20722 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CourseImage'
db.create_table('profiles_courseimage', (
('id', self.gf(... | agpl-3.0 | 2,768,419,188,654,010,400 | 80.905138 | 196 | 0.545025 | false | 3.593826 | false | false | false |
Paco1994/sportbot | sportbot/bot.py | 1 | 1953 | # -*- coding: utf-8 -*-
import telebot # Librería de la API del bot.
import random
from telebot import types # Tipos para la API del bot.
import time # Librería para hacer que el programa que controla el bot no se acabe.
import sys
from sportbot import bot
reload(sys)
sys.setdefaultencoding("utf-8")
local = True
gi... | gpl-3.0 | -2,492,374,418,671,157,000 | 39.458333 | 140 | 0.616375 | false | 2.992296 | false | false | false |
topfs2/heimdall | src/thegamesdb.py | 1 | 5883 | import heimdall
from heimdall import tasks
from heimdall import resources
from heimdall import supplies, demands
from heimdall.predicates import *
from game_item import comparePlatforms
import datetime
import difflib
import urllib
import xml.etree.ElementTree as ET
baseImageUrl = "http://thegamesdb.net/banners/"
de... | gpl-2.0 | 1,302,008,425,335,843,600 | 40.723404 | 123 | 0.617372 | false | 3.90897 | false | false | false |
jszakmeister/rst2ctags | rst2ctags.py | 1 | 11006 | #!/usr/bin/env python
# Copyright (C) 2013-2018 John Szakmeister <john@szakmeister.net>
# All rights reserved.
#
# This software is licensed as described in the file LICENSE.txt, which
# you should have received as part of this distribution.
from __future__ import absolute_import
from __future__ import print_function... | bsd-3-clause | 7,713,842,127,701,343,000 | 26.58396 | 81 | 0.535344 | false | 3.787337 | false | false | false |
Starofall/RTX | rtxlib/executionstrategy/__init__.py | 1 | 2569 | from rtxlib.executionstrategy.ForeverStrategy import start_forever_strategy
from rtxlib.executionstrategy.StepStrategy import start_step_strategy
from rtxlib.executionstrategy.SelfOptimizerStrategy import start_self_optimizer_strategy
from rtxlib.executionstrategy.SequencialStrategy import start_sequential_strategy
fr... | mit | 7,610,358,323,314,089,000 | 41.816667 | 113 | 0.669132 | false | 4.001558 | false | false | false |
niteeshsood/LoktraTest | webcrawler.py | 1 | 1769 | import urllib2
from bs4 import BeautifulSoup
import getopt
import sys
import pdb
def makeint(s):
s.strip()
ans=0
for i in xrange(len(s)):
if s[i].isdigit():
ans=10*ans+int(s[i])
return ans
def main(argv):
try:
opts, args = getopt.getopt(argv,'hp:k:', )
if len(opts) == 0:
print '... | gpl-3.0 | -1,612,103,384,303,443,200 | 24.637681 | 81 | 0.594686 | false | 3.153298 | false | false | false |
dkriegner/xrayutilities | lib/xrayutilities/io/helper.py | 1 | 3315 | # This file is part of xrayutilities.
#
# xrayutilities is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed... | gpl-2.0 | 4,533,434,051,202,780,700 | 28.336283 | 79 | 0.622624 | false | 4.0625 | false | false | false |
jrief/django-websocket-redis | ws4redis/publisher.py | 2 | 2898 | #-*- coding: utf-8 -*-
from redis import ConnectionPool, StrictRedis
from ws4redis import settings
from ws4redis.redis_store import RedisStore
from ws4redis._compat import is_authenticated
from redis.connection import UnixDomainSocketConnection
if 'unix_socket_path' in settings.WS4REDIS_CONNECTION:
# rename 'unix_... | mit | -6,769,983,965,469,551,000 | 48.965517 | 135 | 0.638026 | false | 4.364458 | false | false | false |
annapowellsmith/openpresc | openprescribing/frontend/tests/functional/selenium_base.py | 1 | 4639 | import os
import subprocess
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from django.contrib.st... | mit | -4,036,378,167,837,115,400 | 34.143939 | 94 | 0.613063 | false | 3.895046 | true | false | false |
tzewangdorje/SIPserv | sipServ/message.py | 1 | 6199 | # core
import traceback, random, re
from collections import OrderedDict
# sipServ
from header import HeaderField
from userAgent import UserAgentServer
class Message(object):
def __init__(self, data=None):
self.indentifier = None
self.request = None
self.final = None
... | gpl-3.0 | 7,854,859,847,364,854,000 | 28.52381 | 115 | 0.556541 | false | 4.163197 | false | false | false |
Pikecillo/genna | external/4Suite-XML-1.0.2/Ft/Xml/Xslt/SaxWriter.py | 1 | 7538 | ########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Xml/Xslt/SaxWriter.py,v 1.9 2005/03/18 23:47:19 jkloth Exp $
"""
SAX2 event writer for XSLT output
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYR... | gpl-2.0 | -4,203,331,712,846,488,600 | 36.316832 | 120 | 0.568188 | false | 4.415934 | false | false | false |
DCSR/Analysis | GraphsTab.py | 1 | 13519 | """
This file contains all the precedures called from the GraphsTab
There are several ways to graph stuff. Much of what is in this files draws to a ttk canvas,
in this case self.graphCanvas.
The other way is to use matplotlib.
Index: (alphabetical)
cocaineModel() OK
cumulativeRecord() OK
eventRecord... | gpl-3.0 | 3,189,540,916,714,370,600 | 44.063333 | 169 | 0.629558 | false | 2.907937 | false | false | false |
punchagan/zulip | zerver/views/realm.py | 2 | 12881 | from typing import Any, Dict, Optional, Union
from django.core.exceptions import ValidationError
from django.http import HttpRequest, HttpResponse
from django.shortcuts import render
from django.utils.translation import gettext as _
from django.views.decorators.http import require_safe
from confirmation.models import... | apache-2.0 | -8,273,240,410,386,260,000 | 46.18315 | 100 | 0.68799 | false | 3.795227 | false | false | false |
volpino/Yeps-EURAC | tools/solid_tools/maq_cs_wrapper.py | 1 | 12127 | #! /usr/bin/python
#Guruprasad Ananda
#MAQ mapper for SOLiD colourspace-reads
import sys, os, zipfile, tempfile, subprocess
def stop_err( msg ):
sys.stderr.write( "%s\n" % msg )
sys.exit()
def __main__():
out_fname = sys.argv[1].strip()
out_f2 = open(sys.argv[2].strip(),'r+')
ref_fname = sys.ar... | mit | 8,546,402,300,464,318,000 | 43.914815 | 259 | 0.504247 | false | 3.394067 | false | false | false |
SimonSapin/snippets | event_loop/event_loop.py | 1 | 11983 | """
If an application needs to wait for various events and polling is not
possible or desirable, one solution is to use a blocking threads for each
events. However, multi-threading comes with its pitfalls and problems.
This event loop is a framework that allows an application to wait for
vario... | bsd-3-clause | -3,009,963,854,136,994,300 | 33.632948 | 80 | 0.562881 | false | 4.717717 | false | false | false |
ElementsProject/elements | contrib/assets_tutorial/assets_tutorial.py | 1 | 17042 | #!/usr/bin/env python3
from test_framework.authproxy import AuthServiceProxy, JSONRPCException
import os
import random
import sys
import time
import subprocess
import shutil
from decimal import Decimal
ELEMENTSPATH=""
BITCOINPATH=""
if len(sys.argv) == 2:
ELEMENTSPATH=sys.argv[0]
BITCOINPATH=sys.argv[1]
else:... | mit | -7,510,705,342,911,157,000 | 32.547244 | 124 | 0.756132 | false | 3.207 | true | false | false |
ericblau/ipf-xsede | ipf/glue2/accelerator_environment.py | 1 | 26893 |
###############################################################################
# Copyright 2011-2014 The University of Texas at Austin #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #... | apache-2.0 | 4,658,216,852,875,104,000 | 44.581356 | 324 | 0.562451 | false | 4.516795 | false | false | false |
danirus/django-comments-xtd | django_comments_xtd/management/commands/populate_xtdcomments.py | 1 | 1794 | import sys
from django.db import connections
from django.db.utils import ConnectionDoesNotExist, IntegrityError
from django.core.management.base import BaseCommand
from django_comments.models import Comment
from django_comments_xtd.models import XtdComment
__all__ = ['Command']
class Command(BaseCommand):
he... | bsd-2-clause | 8,801,720,226,856,467,000 | 36.375 | 77 | 0.541806 | false | 4.181818 | false | false | false |
bradleygolden/userapi | tests/test_api.py | 1 | 5577 | from app import verify_password, validate_token, User
import json
from base64 import b64encode
def auth_headers(username, password):
username_password = "%s:%s" % (username, password)
headers = {
'Authorization': 'Basic %s' % b64encode(username_password.encode()).decode("ascii")
}
return heade... | mit | 2,100,060,883,032,430,600 | 36.18 | 91 | 0.57002 | false | 4.082723 | true | false | false |
OpenDrift/opendrift | examples/example_current_from_drifter.py | 1 | 3114 | #!/usr/bin/env python
"""
Current from drifter
====================
"""
from datetime import datetime, timedelta
from opendrift.readers import reader_current_from_drifter
from opendrift.models.oceandrift import OceanDrift
o = OceanDrift(loglevel=20)
o.set_config('environment:fallback:land_binary_mask', 0)
#%%
# We ... | gpl-2.0 | -4,592,492,746,717,793,300 | 55.618182 | 531 | 0.703597 | false | 2.402778 | false | false | false |
DrewsephA/Celeb_Username_Bot | config.py | 1 | 48634 | ''' ---------------------------------------------------------------------------------------------------------------- '''
''' These below are the membership groups and their membership customized replies. Edit this area to expand the bot. '''
''' --------------------------------------------------------------------------... | gpl-2.0 | 5,112,249,427,415,677,000 | 53.891648 | 276 | 0.689333 | false | 2.353334 | false | false | false |
mascot6699/Hackapi-Demo | src/core/utils.py | 1 | 3280 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pprint import pprint
import requests
from django.conf import settings
from PyDictionary import PyDictionary
import wikipedia
import sendgrid
sid = settings.EXOTEL_SID
token = settings.EXOTEL_TOKEN
api = settings.SENDGRID_API_TOKEN
def send_message(sid, token, sms_f... | mit | -5,266,229,043,800,101,000 | 30.854369 | 119 | 0.601524 | false | 3.340122 | false | false | false |
nke001/attention-lvcsr | libs/Theano/theano/sandbox/scan_module/scan_utils.py | 1 | 16116 | """
This module provides utility functions for the Scan Op
See scan.py for details on scan
"""
from __future__ import print_function
__docformat__ = 'restructedtext en'
__authors__ = ("Razvan Pascanu "
"Frederic Bastien "
"James Bergstra "
"Pascal Lamblin "
"... | mit | 8,171,401,141,584,045,000 | 36.2194 | 79 | 0.548089 | false | 4.206735 | false | false | false |
luminusnetworks/flask-restplus | flask_restplus/model.py | 1 | 3749 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import copy
import re
from collections import MutableMapping
from six import iteritems, itervalues
from werkzeug import cached_property
from flask.ext.restful import abort
from jsonschema import Draft4Validator
from jsonschema.exceptions import Validat... | mit | 9,132,711,310,193,059,000 | 28.289063 | 91 | 0.572153 | false | 4.538741 | false | false | false |
sthzg/django-chatterbox | chatterbox/tests/test_events.py | 1 | 3069 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.test.testcases import SimpleTestCase
from chatterbox.events import BaseChatterboxEvent
from .helpers import MailEventDummyClass, get_test_dict
class BaseChatterboxTests(SimpleTestCase):
def setUp(self):
pass
... | mit | -7,214,503,491,187,462,000 | 36.426829 | 93 | 0.633105 | false | 3.72904 | true | false | false |
dothiko/mypaint | gui/quickchoice.py | 1 | 11387 | # This file is part of MyPaint.
# Copyright (C) 2013 by Andrew Chadwick <a.t.chadwick@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 of the License, or
# (at your ... | gpl-2.0 | -8,399,897,937,898,774,000 | 32.889881 | 79 | 0.626855 | false | 3.91575 | false | false | false |
xguse/blacktie | src/blacktie/utils/errors.py | 1 | 2796 | #*****************************************************************************
# errors.py (part of the blacktie package)
#
# (c) 2013 - Augustine Dunn
# James Laboratory
# Department of Biochemistry and Molecular Biology
# University of California Irvine
# wadunn83@gmail.com
#
# Licenced under the GNU General P... | gpl-3.0 | 6,638,738,641,271,444,000 | 30.784091 | 135 | 0.554006 | false | 4.255708 | false | false | false |
andreasrosdal/freeciv-web | freeciv-proxy/debugging.py | 2 | 2198 | # -*- coding: utf-8 -*-
'''
Freeciv - Copyright (C) 2009-2017 - Andreas Røsdal andrearo@pvv.ntnu.no
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, or (at your option)
... | agpl-3.0 | -2,271,606,199,374,323,700 | 31.308824 | 85 | 0.600364 | false | 3.595745 | false | false | false |
rconjaerts/uniresto-scraper | main.py | 1 | 2281 | import io
import os
import json
import requests
import logging
from multiprocessing import Pool, cpu_count
from multiprocessing.dummy import Pool as ThreadPool
import config
from uniresto.util.mplog import MultiProcessingLog
import uniscrapers
mplog = MultiProcessingLog(config.LOG_FILENAME, 'a', 0, 0)
mplog.setForma... | gpl-2.0 | 3,455,024,879,674,022,000 | 27.873418 | 78 | 0.640509 | false | 3.814381 | true | false | false |
zhouyao1994/incubator-superset | tests/import_export_tests.py | 1 | 28880 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -5,938,705,838,612,700,000 | 40.494253 | 91 | 0.604778 | false | 3.549656 | true | false | false |
cloudtools/troposphere | troposphere/certificatemanager.py | 1 | 1246 | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 31.1.0
from troposphere import Tags
from . import AWSObject, AWSProperty
from .validators import integer
class ... | bsd-2-clause | -346,566,488,791,936,300 | 24.428571 | 71 | 0.658106 | false | 3.968153 | false | false | false |
QLGu/djangopackages | package/repos/github.py | 2 | 2521 | from time import sleep
from django.conf import settings
from django.utils import timezone
from github3 import GitHub, login
import requests
from base_handler import BaseHandler
from package.utils import uniquer
class GitHubHandler(BaseHandler):
title = "Github"
url_regex = '(http|https|git)://github.com/'
... | mit | 5,148,200,768,411,809,000 | 27.977011 | 84 | 0.589052 | false | 4.384348 | false | false | false |
gyang/nova | nova/db/sqlalchemy/migration.py | 1 | 4780 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | 6,008,023,316,838,071,000 | 34.93985 | 78 | 0.64477 | false | 4.27932 | false | false | false |
Mego/DataBot | SE-Chatbot/botbuiltins/utils.py | 1 | 4260 | from Module import Command
from datetime import datetime
from requests import HTTPError
import re
import os
from ChatExchange3.chatexchange3.messages import Message
def command_alive(cmd, bot, args, msg, event):
return "Yes, I'm alive."
def command_utc(cmd, bot, args, msg, event):
return datetime.utcnow().c... | mit | 6,625,686,474,243,252,000 | 42.469388 | 251 | 0.609624 | false | 3.532338 | false | false | false |
ONSdigital/ras-frontstage | tests/integration/views/surveys/test_download_survey.py | 1 | 4001 | import json
import unittest
from unittest.mock import patch
import requests_mock
from flask import request
from frontstage import app
from tests.integration.mocked_services import (
business_party,
case,
collection_instrument_seft,
encoded_jwt_token,
survey,
url_banner_api,
)
@requests_mock.... | mit | 3,429,505,770,575,708,700 | 44.988506 | 215 | 0.63859 | false | 3.51273 | true | false | false |
hansonrobotics/chatbot | src/chatbot/server/gsheet_chatter.py | 1 | 8513 | import os
import sys
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(CWD, '..'))
import aiml
import urllib
import csv
import logging
import glob
from csvUtils import generateAimlFromLongCSV, generateAimlFromSimpleCSV
import xml.etree.ElementTree as ET
logger = logging.getLogger('hr.c... | mit | 3,803,464,178,213,337,600 | 34.619247 | 142 | 0.573828 | false | 3.501851 | false | false | false |
BradleyMoore/Game_of_Life | app/life.py | 1 | 2134 | from collections import Counter
import pygame
from constants import BOX, HEIGHT, WIDTH, SCREEN
class Cell(object):
def __init__(self, pos):
self.color = (255,0,0)
self.neighbors = 0
self.neighbor_list = []
self.pos = pos
self.x = pos[0]
self.y = pos[1]
def... | mit | 5,229,378,662,050,004,000 | 21.946237 | 84 | 0.556232 | false | 3.647863 | false | false | false |
deapplegate/wtgpipeline | photo_illum.py | 1 | 18300 | #!/usr/bin/env python
# Python module for photometric calibration.
# It needs the Python modules ppgplot and
# mpfit to be installed.
# 03.03.2005 Fixed a serious bug in the rejection loop. Instead
# of using the remaining points we always used all points
# and rejected points until the original... | mit | 5,730,884,299,488,931,000 | 37.771186 | 279 | 0.556175 | false | 3.305039 | false | false | false |
google/ffn | ffn/utils/png_to_h5.py | 1 | 1099 | # Copyright 2017 Google 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 2,254,648,750,721,236,200 | 29.527778 | 80 | 0.682439 | false | 3.712838 | false | false | false |
mit-ll/python-keylime | keylime/requests_client.py | 1 | 1577 | import requests
class RequestsClient:
def __init__(self, base_url, tls_enabled, **kwargs):
if tls_enabled:
self.base_url = f'https://{base_url}'
else:
self.base_url = f'http://{base_url}'
self.session = requests.Session()
for arg in kwargs:
if is... | bsd-2-clause | -8,650,900,157,701,840,000 | 33.282609 | 74 | 0.577045 | false | 3.846341 | false | false | false |
evansde77/metson | src/cloudant/changes.py | 1 | 2389 | #!/usr/bin/env python
"""
_feeds_
Iterator support for consuming changes-like feeds
"""
import json
class Feed(object):
"""
_Feed_
Acts as an infinite iterator for consuming database feeds such as
_changes, suitable for feeding a daemon.
:params:
"""
def __init__(self, session, url, ... | apache-2.0 | -1,144,968,541,716,865,700 | 24.688172 | 77 | 0.529929 | false | 4.351548 | false | false | false |
F5Networks/f5-common-python | f5/bigip/tm/security/shared_objects.py | 1 | 3549 | # coding=utf-8
#
# Copyright 2015-2017 F5 Networks 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... | apache-2.0 | -1,649,058,166,927,586,600 | 37.445652 | 78 | 0.642352 | false | 3.836226 | false | false | false |
serendio-labs-stage/diskoveror-ml-server | TopicThrift/server.py | 1 | 1840 | '''
Copyright 2015 Serendio Inc.
Author - Satish Palaniappan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed ... | apache-2.0 | -1,131,072,699,975,567,200 | 31.280702 | 168 | 0.755978 | false | 3.687375 | false | false | false |
corredD/upy | cinema4d/r20/c4dUI.py | 1 | 40522 |
"""
Copyright (C) <2010> Autin L. TSRI
This file git_upy/cinema4d/r14/c4dUI.py is part of upy.
upy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
... | gpl-3.0 | 645,004,486,327,748,500 | 37.44592 | 142 | 0.540422 | false | 3.691201 | false | false | false |
tdfischer/organizer | crm/migrations/0001_initial.py | 1 | 1152 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-07-27 07:36
from __future__ import unicode_literals
import address.models
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
class Migration(migrations.Migration):
initial = True
dependencies = [
... | agpl-3.0 | 8,889,659,258,526,600,000 | 35 | 170 | 0.615451 | false | 3.972414 | false | false | false |
JohnyEngine/CNC | deprecated/heekspython/examples/dxfReader.py | 1 | 11845 | """This module provides a function for reading dxf files and parsing them into a useful tree of objects and data.
The convert function is called by the readDXF fuction to convert dxf strings into the correct data based
on their type code. readDXF expects a (full path) file name as input.
"""
# --------------------... | apache-2.0 | -6,728,610,616,327,599,000 | 30.089239 | 121 | 0.668383 | false | 3.310509 | false | false | false |
mtrdesign/pylogwatch | pylogwatch/raven/conf/defaults.py | 1 | 2071 | """
raven.conf.defaults
~~~~~~~~~~~~~~~~~~~
Represents the default values for all Sentry settings.
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import os.path
import socket
ROOT = os.path.normpath(os.path.join(os.path.dirname(... | gpl-3.0 | -8,137,903,970,246,429,000 | 28.585714 | 82 | 0.750845 | false | 3.8 | false | false | false |
LeonardoGentile/powerline-shell | powerline-shell.old.py | 1 | 15940 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os
import sys
def warn(msg):
print '[powerline-bash] ', msg
class Powerline:
symbols = {
'compatible': {
'lock': 'RO',
'network': 'SSH',
'separator': u'\u25B6',
'separator_thin': u'\u2... | mit | 5,095,947,534,413,453,000 | 27.876812 | 145 | 0.589649 | false | 3.42207 | false | false | false |
cerndb/wls-cli | wls_rest/src/wlscli/common/event.py | 1 | 2248 | #!/usr/bin/env python
#*******************************************************************************
# Copyright (C) 2015, CERN
# This software is distributed under the terms of the GNU General Public
# License version 3 (GPL Version 3), copied verbatim in the file "LICENSE".
# In applying this license, CERN doe... | gpl-3.0 | 7,370,498,741,496,446,000 | 30.608696 | 80 | 0.581851 | false | 4.487026 | false | false | false |
katharosada/bus-shaming | busshaming/models/route_ranking.py | 1 | 1414 | import uuid
from django.db import connection, models
from busshaming.enums import RouteMetric, MetricTimespan
UPSERT_ENTRY = '''
INSERT INTO busshaming_routeranking (id, route_id, date, timespan, metric, rank, display_rank, value)
VALUES (uuid_generate_v4(), %s, %s, %s, %s, %s, %s, %s)
ON CONFLICT (date, timespan, ... | mit | -8,858,094,445,648,581,000 | 36.210526 | 103 | 0.706506 | false | 3.570707 | false | false | false |
Overdrivr/pytelemetry | pytelemetry/test/test_typing.py | 1 | 1747 | from pytelemetry import Pytelemetry
import queue
import pytest
import unittest.mock as mock
class transportMock:
def __init__(self):
self.queue = queue.Queue()
def read(self, maxbytes=1):
data = []
amount = 0
while amount < maxbytes and not self.queue.empty():
c = s... | mit | -6,212,126,936,606,328,000 | 25.876923 | 105 | 0.588437 | false | 3.565306 | true | false | false |
MikeHoffert/caladbolg-engine | caladbolg/agents/battle.py | 1 | 1210 | import pyglet
from caladbolg.graphics import graphics_context
class ScriptedBattle:
def __init__(self, background_image, monsters, party):
self.background_image = background_image
self.monsters = monsters
self.party = party
def start_battle(self):
image = pyglet.image... | mit | -1,500,129,962,873,362,000 | 42.814815 | 93 | 0.671901 | false | 4.29078 | false | false | false |
LeoGe/whattelcopybot | telegram_bot.py | 1 | 6255 | from multiprocessing import Process, Pipe
from os import getpid, urandom, path
from time import sleep
from enum import Enum
import binascii, json, signal, sys
from random import randint
from telegram.ext import Updater
from telegram.ext.dispatcher import run_async
from telegram.update import Update
class Command(Enum... | mit | 7,155,374,051,801,064,000 | 42.4375 | 247 | 0.63757 | false | 3.707765 | false | false | false |
quasars100/Resonance_testing_scripts | python_examples/outersolarsystem/problem.py | 1 | 1831 | # Import the rebound module
import rebound
# Set variables (defaults are G=1, t=0, dt=0.01)
k = 0.01720209895 # Gaussian constant
rebound.G = k*k # Gravitational constant
# Setup particles (data taken from NASA Horizons)
# This could also be easily read in from a file.
rebound.add( m=1.00000597682, x=-... | gpl-3.0 | 544,620,907,989,148,000 | 58.064516 | 188 | 0.687602 | false | 2.154118 | false | false | false |
hzlf/openbroadcast | website/apps/spf/migrations/0020_auto__add_field_match_isrc_list.py | 1 | 5230 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Match.isrc_list'
db.add_column('spf_match', 'isrc_list',
self.gf('djan... | gpl-3.0 | -3,241,384,390,019,928,600 | 74.811594 | 169 | 0.546654 | false | 3.524259 | false | false | false |
vinoth3v/In | In/nabar/admin/form/nabar_role.py | 1 | 1255 |
class FormNabarRoleAdmin(Form):
def __init__(self, data = None, items = None, post = None, **args):
if data is None: data = {}
if post is None: post = {}
if 'id' not in data:
data['id'] = 'FormNabarRoleAdmin'
super().__init__(data, items, **args)
set = self.add('FieldSet', {
'id' : 'set',
'... | apache-2.0 | 6,403,613,754,088,764,000 | 18.307692 | 68 | 0.578486 | false | 2.752193 | false | false | false |
expfactory/expfactory | expfactory/cli/users.py | 1 | 3386 | """
Copyright (c) 2017-2021, Vanessa Sochat
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the fo... | bsd-3-clause | 55,951,420,547,235,040 | 33.20202 | 82 | 0.69049 | false | 4.227216 | false | false | false |
mhogg/BMDanalyse | BMDanalyse/MainWindow.py | 1 | 30163 | # -*- coding: utf-8 -*-
# Copyright (C) 2016 Michael Hogg
# This file is part of BMDanalyse - See LICENSE.txt for information on usage and redistribution
import os, matplotlib, matplotlib.pyplot, types
import numpy as np
from pyqtgraph.Qt import QtCore, QtGui
from pyqtgraph import ImageItem
from pyqtgraph.widgets.Gr... | mit | 8,683,989,055,049,540,000 | 48.940397 | 143 | 0.621192 | false | 3.744166 | false | false | false |
fredzannarbor/pagekicker-community | scripts_python_3/bitcoin/fileclient/fileclient.py | 1 | 2020 | #!/usr/bin/env python3
import json
from two1.wallet import Wallet
from two1.bitrequests import BitTransferRequests
# set up bitrequest client for BitTransfer requests
wallet = Wallet()
requests = BitTransferRequests(wallet)
# server address
server_url = 'http://localhost:5000/'
def buy_file():
# get the file l... | apache-2.0 | -9,155,594,795,914,871,000 | 35.727273 | 106 | 0.619307 | false | 4.04 | false | false | false |
jfillmore/hoops | hoops/base.py | 1 | 9650 | import copy
import json
import re
import logging
from flask import g, request
from flask.ext.restful import abort
from formencode import Invalid, Schema
from formencode.validators import Validator
from hoops.restful import Resource
from hoops.exc import APIValidationException
from hoops.status import library as status... | mit | 7,188,259,168,814,752,000 | 33.09894 | 123 | 0.607254 | false | 4.168467 | false | false | false |
tsdmgz/ansible | lib/ansible/modules/network/cnos/cnos_conditional_command.py | 1 | 7325 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | gpl-3.0 | -3,509,905,239,353,352,700 | 36.953368 | 150 | 0.694608 | false | 4.241459 | true | false | false |
globocom/database-as-a-service | dbaas/notification/management/arguments/factory.py | 1 | 4756 | class ArgumentsTo(object):
KEY = ''
def __init__(self, args):
self.args = args
def build(self):
raise NotImplementedError
@property
def database_name(self):
return self.args['database'].name
def get_database_arg(self):
return "Database: {}".format(self.databas... | bsd-3-clause | 1,724,527,907,496,791,300 | 24.031579 | 82 | 0.597351 | false | 4.05802 | false | false | false |
hippke/TTV-TDV-exomoons | create_figures/system_20.py | 1 | 7712 | """n-body simulator to derive TDV+TTV diagrams of planet-moon configurations.
Credit for part of the source is given to
https://github.com/akuchling/50-examples/blob/master/gravity.rst
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
"""
import numpy
import math
import matplotlib.pylab as plt... | mit | -120,625,737,298,135,980 | 34.539171 | 185 | 0.638485 | false | 2.944635 | false | false | false |
alemela/alessiobot | script/add_immagine_orfana.py | 1 | 2591 | # -*- coding: utf-8 -*-
import pywikibot, re, subprocess
from pywikibot import pagegenerators
import time, sys
start = time.clock()
args = pywikibot.handleArgs()
site = pywikibot.Site('it', 'wikipedia')
today = time.strftime("%Y%m%d")
if sys.argv[1] == "immagini_orfane_libere":
path = '/data/project/alessiobot... | mit | 921,331,364,314,386,600 | 34.013514 | 100 | 0.657661 | false | 2.988466 | false | false | false |
Azure/azure-sdk-for-python | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py | 1 | 11430 | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import datetime
from typing import Optional
from azure.core.exceptions import HttpResponseError
from azure.core.polling import AsyncLROPoller
from azure.c... | mit | -4,780,159,262,981,646,000 | 31.844828 | 118 | 0.636308 | false | 4.404624 | false | false | false |
dbservice/dbservice | dbservice/apps/utils/fields.py | 1 | 5914 | import re
from dateutil.relativedelta import relativedelta
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import ugettext_lazy as _
import psycopg2.extensions
def _parse_opt_num(s):
if not s:
# For the ISO 8601 duration specifications, fields... | mit | 987,401,872,882,005,600 | 32.412429 | 79 | 0.609063 | false | 3.687032 | false | false | false |
rnicoll/cryptocurrency-market-data | old/load_data_vtc.py | 1 | 3580 | #!/usr/bin/python3.2
import pymongo
from datetime import datetime
import json
from os import listdir, remove
from os.path import isdir, isfile, join
from pymongo import MongoClient
import pprint
class ExchangeError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
re... | mit | -6,724,503,697,391,267,000 | 33.095238 | 95 | 0.575419 | false | 3.764458 | false | false | false |
hknyldz/pisitools | pisilinux/pisilinux/db/sourcedb.py | 1 | 4805 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005 - 2011, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#... | gpl-3.0 | -6,640,202,832,901,699,000 | 35.12782 | 98 | 0.589802 | false | 3.696154 | false | false | false |
bcheung92/Paperproject | gem5/pyscript/cachecmp.py | 1 | 2915 | #!/usr/bin/env python
import sys
import re
import os
inFilename = sys.argv[1]
if os.path.isfile(inFilename):
namelength = inFilename.rfind(".")
name = inFilename[0:namelength]
exten = inFilename[namelength:]
outFilename = name+"-cachecmp"+exten
print "inFilename:", inFilename
print "outFilename:", outFilename
fpR... | mit | 374,115,436,903,597,250 | 37.866667 | 90 | 0.651115 | false | 3.091198 | false | false | false |
ScottBuchanan/eden | controllers/hrm.py | 1 | 25684 | # -*- coding: utf-8 -*-
"""
Human Resource Management
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
s3db.hrm_vars()
# =============================================================================
def ... | mit | -650,041,428,619,606,000 | 32.312581 | 111 | 0.455108 | false | 4.657117 | true | false | false |
cloudnull/genastack_roles | genastack_roles/heat_engine/__init__.py | 1 | 1045 | # =============================================================================
# Copyright [2013] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines and its accuracy
# using the code provided. Consult the ... | gpl-3.0 | -6,973,453,614,583,198,000 | 33.833333 | 79 | 0.449761 | false | 4.644444 | false | false | false |
anuragxel/ultimate-tic-tac-toe | xxx.py | 1 | 9042 | #!/usr/bin/python
#
# Negamax variant of minmax
#
# This program is for demonstration purposes, and contains ample
# opportunities for speed and efficiency improvements.
#
# Also, a minmax tree is not the best way to program a tic-tac-toe
# player.
#
# This software is hereby granted to the Public Domain
#
import sys,... | mit | 3,349,314,645,422,047,000 | 27.613924 | 98 | 0.496572 | false | 3.662211 | false | false | false |
pyfidelity/rest-seed | backend/backrest/models/content.py | 1 | 1796 | from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import Unicode
from sqlalchemy import UnicodeText
from sqlalchemy.util import classproperty
from ..utils import utcnow
from .base import Base
def get_content(id):
""" Return ... | bsd-2-clause | -3,919,537,068,281,949,700 | 32.886792 | 87 | 0.655902 | false | 4.348668 | false | false | false |
tdyas/pants | src/python/pants/backend/python/lint/docformatter/rules.py | 1 | 5663 | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from dataclasses import dataclass
from typing import Tuple
from pants.backend.python.lint.docformatter.subsystem import Docformatter
from pants.backend.python.lint.python_fmt import Pytho... | apache-2.0 | -8,875,962,643,641,155,000 | 33.530488 | 96 | 0.719054 | false | 3.927184 | false | false | false |
tayebzaidi/snova_analysis | Miscellaneous/supernova_readin_plot.py | 1 | 2998 | import matplotlib.pyplot as plt
import numpy as np
import peakfinding
import smoothing
import plotter
import readin
import sys
import os
if __name__== '__main__':
#lcurve = readin.readin_aavso('aavsodata_sscyg.txt')
#mjd = lcurve.jd - 240000.5
#mag = lcurve.magnitude
#maxtab, mintab = peakfinding.peakd... | gpl-3.0 | -1,806,584,690,072,135,200 | 32.685393 | 97 | 0.53936 | false | 3.062308 | false | false | false |
badele/home-assistant | homeassistant/components/wink.py | 1 | 3001 | """
homeassistant.components.wink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connects to a Wink hub and loads relevant components to control its devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/wink/
"""
import logging
from homeassistant import bootstrap
fro... | mit | -1,104,886,890,720,861,200 | 28.712871 | 76 | 0.629124 | false | 3.737235 | true | false | false |
lemoogle/iod-freebase-indexer | utils.py | 1 | 8062 | import json
import urllib
import requests
import itertools
import time
class FreebaseUtil(object):
freebase_topic_url="https://www.googleapis.com/freebase/v1/topic{}?filter=/common/topic/description&key={}"
service_url = 'https://www.googleapis.com/freebase/v1/mqlread'
aliases=[]
def __init__(self,f... | mit | 4,380,003,460,438,810,000 | 31.508065 | 111 | 0.499504 | false | 4.357838 | false | false | false |
johnmarkschofield/heartbleed-weaponized | takeshixx.py | 1 | 4770 | #!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
import re
from optparse import OptionParser
options = OptionParser(usage='%prog se... | mit | -2,765,998,675,257,244,700 | 30.176471 | 122 | 0.57652 | false | 3.356791 | false | false | false |
nakayamaqs/PythonModule | Learning/func_return.py | 1 | 1354 | # from :http://docs.python.org/3.3/faq/programming.html#what-is-the-difference-between-arguments-and-parameters
# By returning a tuple of the results:
def func2(a, b):
a = 'new-value' # a and b are local names
b = b + 1 # assigned to new objects
return a, b # return new value... | mit | 7,679,583,819,250,892,000 | 28.434783 | 111 | 0.595273 | false | 2.930736 | false | false | false |
nardorb/OneStop | models/taxi_driver.py | 1 | 1177 | from google.appengine.ext import db
class TaxiDriver(db.Model):
EXCEPTION_NO_PARENT = "`parent` property must be an `Account` object."
name = db.StringProperty(default=None)
email = db.EmailProperty(default=None)
sex = db.StringProperty(default=None)
address = db.StringProperty(default=None)
parish = db.... | gpl-2.0 | 1,523,704,451,616,366,000 | 33.647059 | 72 | 0.724724 | false | 3.566667 | false | false | false |
mattbrowley/PSim | Covariances.py | 1 | 7985 | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import PSim
import pickle
import csv
import simplex
fit_type = 'global'
scale = 0.003
with open("pickled_data.p", "r") as file:
pickled_data = pickle.load(file)
powers = pickled_data['powers']
xdata = pickled_data['allxdata']
ydata = pick... | mit | 8,866,360,628,721,313,000 | 35.295455 | 127 | 0.520726 | false | 2.985047 | false | false | false |
mozilla/socorro | webapp-django/crashstats/exploitability/tests/test_views.py | 1 | 5320 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pyquery
from django.conf import settings
from django.urls import reverse
from crashstats.crashstats import mode... | mpl-2.0 | -6,342,788,906,215,783,000 | 37.550725 | 87 | 0.509023 | false | 4.493243 | true | false | false |
mapycz/mapnik | utils/mapnik-index/build.py | 1 | 2028 | #
# This file is part of Mapnik (c++ mapping toolkit)
#
# Copyright (C) 2015 Artem Pavlenko
#
# Mapnik is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your op... | lgpl-2.1 | 6,641,049,399,856,726,000 | 31.190476 | 93 | 0.711045 | false | 3.335526 | false | false | false |
ashishb/benchmarking | serialization/exec_thrift.py | 1 | 1364 | import os
import random
import sys
sys.path.append(os.path.join(os.getcwd(), 'gen-py'))
from thrift.protocol import TBinaryProtocol
from thrift.transport import TTransport
# Generated using
# thrift -o . --gen py:new_style student.thrift
from student.ttypes import Course
from student.ttypes import Student
# Based ... | apache-2.0 | -2,492,919,796,256,315,400 | 29.311111 | 73 | 0.756598 | false | 3.239905 | false | false | false |
tedlaz/pyted | pylogistiki/book.py | 1 | 17624 | '''Basic module for accounting'''
import utils as ul
import parse_singularo_afm as pafm
FORMAT_LINE = '%-15s %12s %12s'
SPLIT_CHAR = '.'
LM1 = ul.read_txt_to_dict('log_sxedio.txt')
def parse_afm_5398(file='afm-5398.txt'):
afmdic = {}
pfpadic = {}
with open(file) as fle:
for line in fle:
... | gpl-3.0 | -1,884,717,183,715,299,000 | 31.927451 | 84 | 0.450009 | false | 2.680019 | false | false | false |
leobrowning92/generative-art | colormap.py | 1 | 3108 | import os
import cairo as cairo
import numpy as np
from render import Animate, Image_Creator
import matplotlib.cm as cm
def random_rgb_color(alpha=1):
return [np.random.uniform(0,1),np.random.uniform(0,1), np.random.uniform(0,1),alpha]
def linear_gradient(start,finish,n=10,alpha=1):
gradient=[0]*n
gradi... | gpl-3.0 | 146,574,262,081,108,060 | 34.318182 | 132 | 0.67278 | false | 3.363636 | false | false | false |
buxx/synergine | synergine/core/config/ConfigurationManager.py | 1 | 2347 | from synergine.core.exception.NotFoundError import NotFoundError
class ConfigurationManager():
"""
Management of dict based configuration data
"""
def __init__(self, config: dict={}):
self._configs = config
def get(self, config_name: "the.config.name", default=None):
inceptions =... | apache-2.0 | -4,210,175,498,560,973,300 | 34.044776 | 95 | 0.536003 | false | 4.267273 | true | false | false |
jpercent/pygrametl | pygrametl/tables.py | 1 | 122529 | """This module contains classes for looking up rows, inserting rows
and updating rows in dimensions and fact tables. Rows are represented
as dictionaries mapping between attribute names and attribute values.
Many of the class methods take an optional 'namemapping' argument which is
explained here, but not ... | bsd-2-clause | -3,030,556,517,807,855,600 | 44.030871 | 104 | 0.586979 | false | 4.564654 | false | false | false |
amarchen/log4qt-demo-sailfish | rename-to-my-project.py | 1 | 3857 | '''
Created on 23.2.2014
@author: tace (samuli.silvius@gmail.com)
'''
import sys
import os
import argparse
from os import rename
SCRIPT_NAME = os.path.basename(__file__)
def convert_file_names(files, originalName, newName):
print "\n>>>> Convert file names\n"
for fname in files:
if fname.find(origin... | unlicense | 760,484,320,337,282,400 | 37.188119 | 156 | 0.56028 | false | 4.183297 | false | false | false |
mark-me/Pi-Jukebox | venv/Lib/site-packages/pygame/examples/mask.py | 1 | 5555 | #!/usr/bin/env python
"""A pgyame.mask collition detection example
exports main()
This module can also be run as a stand-alone program, excepting
one or more image file names as command line arguments.
"""
import sys, random
import pygame, pygame.image, pygame.surface, pygame.time, pygame.display
def maskFromSurfa... | agpl-3.0 | 1,926,169,614,142,610,700 | 30.5625 | 78 | 0.540954 | false | 3.340349 | false | false | false |
CHIMEFRB/ch_frb_io | ch_frb_io/stream.py | 1 | 13853 | """
IO for intensity data.
"""
import os
from os import path
import warnings
import logging
import glob
import numpy as np
import h5py
import bitshuffle.h5 as bshufh5
logger = logging.getLogger(__name__)
# Default chunk and file size.
CHUNKS = (64, 2, 256)
NTIME_PER_FILE = CHUNKS[2] * 64
# Dataset definitions.... | mit | 5,522,448,106,118,149,000 | 32.953431 | 79 | 0.532664 | false | 3.8577 | false | false | false |
martinohanlon/initio | pygametest.py | 1 | 1057 | import pygame
from pygame.locals import *
import os, sys
# set SDL to use the dummy NULL video driver,
# so it doesn't need a windowing system.
os.environ["SDL_VIDEODRIVER"] = "dummy"
# init pygame
pygame.init()
# create a 1x1 pixel screen, its not used
screen = pygame.display.set_mode((1, 1))
# i... | mit | -8,737,356,488,751,904,000 | 20.978261 | 46 | 0.613056 | false | 3.535117 | false | false | false |
mark-burnett/code-scientist | code_scientist/database/__init__.py | 1 | 1655 | # Copyright (C) 2012 Mark Burnett, David Morton
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... | gpl-3.0 | -3,192,524,026,105,203,000 | 34.212766 | 78 | 0.753474 | false | 4.036585 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.