repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 18
values | size stringlengths 4 7 | content stringlengths 736 1.04M | license stringclasses 15
values | hash int64 -9,222,983,980,000,580,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
GeoNode/geonode | geonode/base/populate_test_data.py | 1 | 17654 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 3,008,828,144,845,505,000 | 41.539759 | 134 | 0.552396 | false |
litedesk/litedesk-webserver-provision | src/provisioning/models.py | 1 | 20144 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs)
#
# 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... | apache-2.0 | 4,245,768,454,504,376,300 | 32.186161 | 90 | 0.610653 | false |
harsham05/image_space | imagespace_georgetown/server/__init__.py | 1 | 1353 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | -2,677,355,904,935,077,000 | 36.583333 | 79 | 0.623799 | false |
cbertinato/pandas | asv_bench/benchmarks/frame_methods.py | 1 | 16547 | import string
import numpy as np
from pandas import (
DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range)
import pandas.util.testing as tm
class GetNumericData:
def setup(self):
self.df = DataFrame(np.random.randn(10000, 25))
self.df['foo'] = 'bar'
self.df['bar'] =... | bsd-3-clause | 6,597,646,539,772,058,000 | 27.189097 | 79 | 0.581435 | false |
google/nerfies | nerfies/models.py | 1 | 15699 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -6,959,720,088,576,652,000 | 36.92029 | 79 | 0.671763 | false |
Cal-CS-61A-Staff/ok | tests/test_auth.py | 1 | 4104 | import flask
import urllib.request
from tests import OkTestCase
from server.models import db
class TestAuth(OkTestCase):
email = 'martymcfly@aol.com'
staff_email = 'okstaff@okpy.org'
def test_ssl(self):
response = urllib.request.urlopen('https://accounts.google.com')
assert response.code ... | apache-2.0 | 1,166,336,458,106,371,600 | 33.2 | 88 | 0.592105 | false |
Connor-R/nba_shot_charts | processing/table_exporter.py | 1 | 5599 | import argparse
from time import time
import csv
import os
from py_db import db
db = db("nba_shots")
def initiate():
start_time = time()
print "\nexporting to .csv"
for statType in ('Player', 'Team', 'PlayerCareer'):
for rangeType in ('Reg', 'Pre', 'Post'):
print '\t', statType, rang... | mit | 7,872,525,690,449,116,000 | 36.831081 | 273 | 0.58957 | false |
mlcommons/inference | language/bert/pytorch_SUT.py | 1 | 3800 | # coding=utf-8
# Copyright 2021 Arm Limited and affiliates.
# Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
# 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... | apache-2.0 | 6,249,434,711,940,474,000 | 41.696629 | 128 | 0.663158 | false |
totem/yoda-discover | tests/unit/test_util.py | 1 | 3775 | import discover.util
from mock import patch
from nose.tools import eq_
from discover.util import convert_to_milliseconds, DEFAULT_TIMEOUT_MS
def test_convert_to_milliseconds_for_timeout_in_hours():
# When: I convert timeout to 'ms'
timeout_ms = convert_to_milliseconds('1h')
# Then: Expected timeout (int... | mit | 5,562,059,840,405,288,000 | 28.038462 | 76 | 0.685033 | false |
tboyce1/home-assistant | homeassistant/components/device_tracker/owntracks.py | 2 | 16441 | """
Device tracker platform that adds support for OwnTracks over MQTT.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.owntracks/
"""
import asyncio
import base64
import json
import logging
from collections import defaultdict
import volupt... | apache-2.0 | -5,057,499,817,063,968,000 | 31.750996 | 79 | 0.637127 | false |
corpnewt/CorpBot.py | Cogs/BotAdmin.py | 1 | 12950 | import asyncio, discord, re, random
from operator import itemgetter
from discord.ext import commands
from Cogs import Utils, DisplayName, Message, PickList
def setup(bot):
# Add the bot and deps
settings = bot.get_cog("Settings")
bot.add_cog(BotAdmin(bot, settings))
class BotAdmin(commands.Cog):
... | mit | 2,491,016,822,418,353,700 | 43.759717 | 200 | 0.669035 | false |
rodrigopolo/cheatsheets | upload_video.py | 1 | 7001 | #!/usr/bin/env python
# Modified to always use the installation path to store and read the client_secrets.json and pyu-oauth2.json file
import httplib
import httplib2
import os
import random
import sys
import time
from apiclient.discovery import build
from apiclient.errors import HttpError
from apiclient.http import ... | mit | -5,672,397,897,091,849,000 | 37.048913 | 113 | 0.713755 | false |
pizzapanther/metapile | metapile/settings.py | 1 | 3368 | """
Django settings for metapile project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import o... | mit | 7,017,270,099,466,307,000 | 24.709924 | 99 | 0.696556 | false |
explosion/thinc | thinc/tests/test_indexing.py | 1 | 1426 | import pytest
import numpy
from numpy.testing import assert_allclose
from thinc.types import Ragged, Pairs
@pytest.fixture
def ragged():
data = numpy.zeros((20, 4), dtype="f")
lengths = numpy.array([4, 2, 8, 1, 4], dtype="i")
data[0] = 0
data[1] = 1
data[2] = 2
data[3] = 3
data[4] = 4
... | mit | -3,007,156,460,683,630,600 | 25.90566 | 57 | 0.609397 | false |
tempbottle/Nuitka | tests/programs/run_all.py | 1 | 4779 | #!/usr/bin/env python
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except i... | apache-2.0 | -6,503,902,647,717,657,000 | 29.832258 | 80 | 0.592802 | false |
hipnusleo/laserjet | resource/pypi/cryptography-1.7.1/docs/development/custom-vectors/arc4/generate_arc4.py | 1 | 2676 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import binascii
from cryptography.hazmat.backends import default... | apache-2.0 | -4,067,945,267,181,852,000 | 25.306122 | 79 | 0.546338 | false |
mlandry1/CarND | Labs/Term3/Lesson 4 - 16/python3/CarND - Behavior Planner/cost_functions.py | 1 | 4808 | from __future__ import division
from collections import namedtuple
from math import sqrt,exp
import pdb
TrajectoryData = namedtuple("TrajectoryData", [
'proposed_lane',
'avg_speed',
'max_acceleration',
'rms_acceleration',
'closest_approach',
'end_distance_to_goal',
'end_lanes_from_goal',
'collides... | mit | -780,695,010,356,536,300 | 23.183246 | 90 | 0.661398 | false |
winklerand/pandas | asv_bench/benchmarks/replace.py | 1 | 2171 | from .pandas_vb_common import *
class replace_fillna(object):
goal_time = 0.2
def setup(self):
self.N = 1000000
try:
self.rng = date_range('1/1/2000', periods=self.N, freq='min')
except NameError:
self.rng = DatetimeIndex('1/1/2000', periods=self.N, offset=date... | bsd-3-clause | 1,624,599,673,181,421,300 | 30.014286 | 91 | 0.587748 | false |
mozilla/peekaboo | bin/update/deploy.py | 1 | 3513 | """
Deploy this project in dev/stage/production.
Requires commander_ which is installed on the systems that need it.
.. _commander: https://github.com/oremj/commander
This script is supposed to work in Python 2.6.
The only outside dependency is `virtualenv-2.7`.
"""
import os
import sys
sys.path.append(os.path.dir... | mpl-2.0 | -528,291,136,653,370,750 | 25.216418 | 79 | 0.604042 | false |
lief-project/LIEF | tests/vdex/vdex_test.py | 1 | 3828 | #!/usr/bin/env python
import json
import logging
import os
import pprint
import unittest
from unittest import TestCase
import lief
from utils import get_sample
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
lief.logging.set_level(lief.logging.LOGGING_LEVEL.DEBUG)
class TestVDEX(TestCase):
def setUp(s... | apache-2.0 | 1,116,827,325,749,575,000 | 31.440678 | 92 | 0.651515 | false |
copotron/car-control | datacollection/prius/log.py | 1 | 1840 | # Copyright (C) 2017 Swift Navigation Inc.
# Contact: Swift Navigation <dev@swiftnav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY K... | gpl-3.0 | -1,142,508,516,065,610,600 | 35.8 | 113 | 0.643478 | false |
a-lost-shadow/shadowcon | contact/forms.py | 1 | 1092 | from django.forms import Form, CharField, EmailField, ModelChoiceField, Textarea
from django.utils.html import strip_tags
from .models import ContactReason
from .utils import mail_list
class ContactForm(Form):
name = CharField(label="Name", max_length=128,)
email = EmailField(label="E-mail", max_length=128)
... | gpl-3.0 | 1,344,768,222,388,563,700 | 44.5 | 100 | 0.671245 | false |
johnlb/strange_wp | strange_bak/tests/test_text.py | 1 | 25260 | # coding: utf-8
"""
weasyprint.tests.test_text
--------------------------
Test the text layout.
:copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import division, unicode_literals
from ..css impor... | gpl-3.0 | -650,783,121,996,463,400 | 31.103811 | 78 | 0.540211 | false |
vladiibine/whispy_lispy | src/whispy_lispy/cst.py | 1 | 4255 | # -*- coding utf-8 -*-
"""
Concrete syntax tree stuff
Lexer should return tokens that are instances of classes found here
"""
from __future__ import unicode_literals
import six
from whispy_lispy import keywords
class CSTError(Exception):
pass
class Token(object):
"""Concrete syntax tree node.
Can re... | mit | -7,624,388,774,132,405,000 | 25.761006 | 77 | 0.564512 | false |
kylef/pyppp | pyppp/django/forms.py | 1 | 3810 | from django import forms
from django.conf import settings
from django.http import HttpResponseRedirect
from django.views.decorators.cache import never_cache
from django.contrib.auth import authenticate, REDIRECT_FIELD_NAME
from django.contrib.formtools.wizard import FormWizard
from pyppp.django import login
from pyppp... | bsd-2-clause | 4,494,156,654,408,472,000 | 38.6875 | 134 | 0.623622 | false |
auag92/n2dm | Asap-3.8.4/Projects/NanoparticleMC/resume_amc_gas.py | 1 | 2557 | #PBS -l nodes=20:ppn=4:opteron4
#PBS -q verylong
#PBS -N amc_n100_conv1
#PBS -m ae
import os
from montecarlo import SurfaceMonteCarloData
from ase.cluster.cubic import FaceCenteredCubic
from ase.cluster import data
from asap3.MonteCarlo.Metropolis import Metropolis
from asap3.MonteCarlo.Moves import SurfaceMove
from as... | mit | 3,836,986,307,182,625,000 | 31.782051 | 108 | 0.707861 | false |
jelly/calibre | src/calibre/utils/run_tests.py | 2 | 5027 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (unicode_literals, division, absolute_import,
print_function)
import unittest, functools, os, importlib, zipfile
from calibre.utils.monotonic import mon... | gpl-3.0 | -3,584,374,407,453,739,000 | 32.738255 | 140 | 0.597573 | false |
lixun910/pysal | pysal/viz/splot/_viz_esda_mpl.py | 1 | 44623 | import matplotlib.pyplot as plt
import matplotlib as mpl
import geopandas as gpd
import numpy as np
from pysal.lib.weights.contiguity import Queen
from pysal.lib.weights.spatial_lag import lag_spatial
import seaborn as sbn
from pysal.explore.esda.moran import (Moran_Local, Moran_Local_BV,
Moran,... | bsd-3-clause | 2,072,672,532,014,773,200 | 33.943618 | 85 | 0.595164 | false |
ryscet/pyseries | pyseries/Pipelines/AnalyzeRest.py | 1 | 1650 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 7 12:32:36 2016
@author: user
"""
import sys
sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/')
import pyseries.LoadingData as loading
import pyseries.Preprocessing as prep
import pyseries.Analysis as analysis
def plot_rest():
# paths = [ '/Use... | mit | 2,526,476,532,144,800,000 | 40.25 | 180 | 0.616364 | false |
supermitch/mech-ai | server/game.py | 1 | 2542 | import datetime
import json
import logging
import maps
import queue
import state
import utils
import world
class GAME_STATUS(object):
""" Game status constants. """
lobby = 'lobby' # In matchmaking lobby, waiting for all players
playing = 'playing' # In game mode, waiting for turns
complete = 'comp... | mit | -3,785,946,842,478,620,700 | 30.382716 | 93 | 0.606609 | false |
andburn/python-unitypack | unitypack/environment.py | 1 | 2335 | import os
from urllib.parse import urlparse
from .asset import Asset
from .assetbundle import AssetBundle
class UnityEnvironment:
def __init__(self, base_path=""):
self.bundles = {}
self.assets = {}
self.base_path = base_path
self.files = []
def __del__(self):
for f in self.files:
f.close()
def __re... | mit | -976,772,978,860,595,700 | 26.470588 | 79 | 0.659529 | false |
fabrickit/fabkit | core/agent/rpc.py | 1 | 2154 | # coding: utf-8
import oslo_messaging as messaging
from oslo_config import cfg
from oslo_serialization import jsonutils
import fabcontext
CONF = cfg.CONF
_NAMESPACE = 'fabkit'
_TOPIC = 'fabkit'
class BaseRPCAPI(object):
"""Server side of the base RPC API."""
def __init__(self, service_name, target):
... | mit | 2,126,414,121,440,731,000 | 29.771429 | 92 | 0.640204 | false |
kajic/django-javascript-features | setup.py | 1 | 1024 | from setuptools import setup, find_packages
setup(
name="django-javascript-features",
version="0.1",
description="Helps initalizing javascript modules on the pages that need them",
long_description=open('README.rst').read(),
author='Robert Kajic',
author_email='robert@kajic.com',
url='https... | mit | -4,747,344,510,530,771,000 | 38.384615 | 108 | 0.666016 | false |
sgzwiz/brython | tests/console.py | 1 | 2190 | import sys
import time
import random
#this sucks.. cannot find dis since "root" path is blah/test
#we might need to create a variable we pass via the brython function
# to state what the root path is.
# For now, we'll hardcode a relative path. :(
sys.path.append("../Lib")
import dis
_rand=random.random()
editor=... | bsd-3-clause | -4,744,852,278,866,266,000 | 19.660377 | 68 | 0.630594 | false |
joehandzik/libstoragemgmt-1 | python_binding/lsm/_data.py | 1 | 36835 | # Copyright (C) 2011-2016 Red Hat, Inc.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# This library 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,... | lgpl-2.1 | 2,991,822,636,371,551,000 | 33.012004 | 79 | 0.588272 | false |
DaveBuckingham/robosoft | record_mode.py | 1 | 8314 | """
Provides functions for
1) recording outputs to file
2) replaying outputs from files
"""
import global_data
import mctransmitter
import datetime
import os
import errno
import time
import threading
import ui_display
playback_file_tag = None
save_filename_prefix = 'botwurst_command_record_'
default_save_dir... | mit | 2,830,740,662,388,459,500 | 28.799283 | 116 | 0.636998 | false |
openelections/openelections-core | openelex/us/vt/validate/validates.py | 1 | 8951 | import re
from openelex.models import Contest, Candidate, Office, Result
import logging
import time
import os
# if not os.path.isdir("logs"):
# os.makedirs("logs")
# logging.basicConfig(filename=time.strftime("logs/%Y%m%d-%H%M%S-validate.log"),level=logging.DEBUG)
# Generic validation helpers
def _validate_can... | mit | -705,504,772,250,037,200 | 45.378238 | 117 | 0.669199 | false |
iandees/all-the-places | locations/spiders/hihostels.py | 1 | 1934 | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
class HiHostelsSpider(scrapy.Spider):
name = "hihostels"
allowed_domains = ['hihostels.com']
start_urls = (
'https://www.hihostels.com/sitemap.xml',
)
def parse(self, response):
response.... | mit | 2,543,737,011,314,564,600 | 45.047619 | 146 | 0.542399 | false |
adampresley/bottlepy-bootstrap | model/DateHelper.py | 1 | 2135 | from model.Service import Service
from datetime import tzinfo, timedelta, datetime
from dateutil import tz
class DateHelper(Service):
utc = tz.gettz("UTC")
pyToJsFormatMapping = {
"%m/%d/%Y": "MM/dd/yyyy",
"%d/%m/%Y": "dd/MM/yyyy",
"%Y-%m-%d": "yyyy-MM-dd"
}
def __init__(self, db, timezone = "UTC", dateFo... | mit | 6,094,790,128,665,935,000 | 24.129412 | 103 | 0.685714 | false |
pvizeli/hassio | hassio/__main__.py | 1 | 1158 | """Main file for HassIO."""
import asyncio
from concurrent.futures import ThreadPoolExecutor
import logging
import sys
import hassio.bootstrap as bootstrap
import hassio.core as core
_LOGGER = logging.getLogger(__name__)
# pylint: disable=invalid-name
if __name__ == "__main__":
bootstrap.initialize_logging()
... | bsd-3-clause | 461,431,713,023,787,140 | 24.733333 | 66 | 0.702073 | false |
joshuamckenty/yolo-octo-wookie | nova/fakerabbit.py | 1 | 4630 | # 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 | -5,151,208,215,358,748,000 | 33.552239 | 78 | 0.587905 | false |
evidation-health/ContinuousTimeMarkovModel | examples/small_sample_example_main.py | 1 | 6795 | import numpy as np
from theano.tensor import as_tensor_variable
from ContinuousTimeMarkovModel.distributions import *
from pymc3 import Model, sample, Metropolis, Dirichlet, Potential, Binomial, Beta, Slice, NUTS
import theano.tensor as TT
from ContinuousTimeMarkovModel.samplers.forwardS import *
from ContinuousTimeMar... | mit | -8,107,003,969,611,124,000 | 38.051724 | 186 | 0.652686 | false |
tdjordan/tortoisegit | gitgtk/addremove.py | 1 | 1219 | #
# Add/Remove dialog for TortoiseHg
#
# Copyright (C) 2007 TK Soh <teekaysoh@gmail.com>
#
try:
import pygtk
pygtk.require("2.0")
except:
pass
import gtk
import gobject
from mercurial import ui, util, hg
from mercurial.i18n import _
from status import GStatus
def run(hgcmd='add', root='', cwd='', files=[... | gpl-2.0 | 2,293,648,415,399,881,700 | 23.38 | 80 | 0.579984 | false |
SuLab/scheduled-bots | scheduled_bots/query_tester/validators.py | 1 | 1080 |
class Validator:
description = '' # Plain text description of what is being checked
expected_result = [] # optional
def __init__(self):
self.success = None # True or False
self.result_message = '' # optional extra information about test result
def validate(self, result):
r... | mit | 5,172,143,440,517,708,000 | 28.216216 | 80 | 0.669444 | false |
bdcht/amoco | amoco/arch/x86/utils.py | 1 | 4777 | # -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2014 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
# spec_xxx files are providers for instruction objects.
from amoco.arch.x86 import env
from amoco.arch.core import *
# for ia32 arch we want some specialized 'modrm' format
# ... | gpl-2.0 | 6,701,555,174,954,964,000 | 26.454023 | 78 | 0.494871 | false |
lingfliu/smart_tuwa | twrt/testbed/massive_scene_test.py | 1 | 3298 | import socket
import time
import sys
import random
import math
import threading
msg_header = 'AADD'
msg_stamp = '\x00\x00\x00\x00'
msg_id_gw = '2016A008'
msg_id_dev = '00000000'
msg_devtype = '\x01\x00'
msg_auth_key = '88888888'
msg_auth_datatype = '\x1c\x00'
msg_auth = msg_header+msg_stamp+msg_id_gw+msg_id_dev+ms... | apache-2.0 | -1,788,681,679,811,182,000 | 28.711712 | 229 | 0.583081 | false |
edbrannin/Robotframework-SQLAlchemy-Library | src/SQLAlchemyLibrary/__init__.py | 1 | 2769 | # Copyright (c) 2010 Franz Allan Valencia See
#
# 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... | apache-2.0 | -1,904,054,005,682,905,600 | 39.130435 | 162 | 0.701697 | false |
kou/zulip | tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py | 1 | 9193 | import json
import os
import re
from typing import Callable, Iterator, List, Optional, Union
import scrapy
from scrapy.http import Request, Response
from scrapy.linkextractors import IGNORED_EXTENSIONS
from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor
from scrapy.spidermiddlewares.httperror import HttpError... | apache-2.0 | 154,628,227,898,041,820 | 44.994975 | 159 | 0.611821 | false |
xiaohutushen30/seentao-xblock-sdk | workbench/test/test_problems.py | 1 | 3519 | """Test that problems and problem submission works well."""
import time
from selenium.common.exceptions import StaleElementReferenceException
from workbench import scenarios
from workbench.test.selenium_test import SeleniumTest
from bok_choy.query import BrowserQuery
class ProblemInteractionTest(SeleniumTest):
... | agpl-3.0 | 2,430,540,823,265,295,400 | 39.918605 | 129 | 0.56948 | false |
peterhenderson/python-enunciate-samples | familytree.py | 1 | 5994 | try:
import json
except ImportError:
import simplejson as json
def parse(input):
"""Parse specified file or string and return a FamilyTree object created from it."""
if hasattr(input, "read"):
data = json.load(input)
else:
data = json.loads(input)
return FamilyTree(data)
clas... | apache-2.0 | -720,568,518,906,619,600 | 25.522124 | 88 | 0.489823 | false |
codebikeclimb/NASARobotComp | Robot2017_Master/Robot2016/motorTest.py | 1 | 2963 | #!/usr/bin/python
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
import serial
import time
import atexit
#initialize i2c communication with motor shield
roboMotor = Adafruit_MotorHAT(addr=0x60)
#initialize serial communications with XBee RF reciever
xBee = serial.Serial('/dev/ttyACM1',57600)
compas... | gpl-3.0 | -6,703,005,234,935,376,000 | 21.792308 | 75 | 0.76949 | false |
fieldOfView/pyQNodesEditor | qneport.py | 1 | 4898 | # Copyright (c) 2014, ALDO HOEBEN
# Copyright (c) 2012, STANISLAW ADASZEWSKI
#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
# ... | bsd-3-clause | 2,503,830,618,461,107,700 | 28.154762 | 94 | 0.652511 | false |
mjwestcott/PyPokertools | tests/test_translation.py | 1 | 1307 | from examples.translation import to_cards, translate
from pokertools import holecards
def test_translation():
assert set(translate("66")) == {
"6c 6d", "6c 6h", "6c 6s", "6d 6h", "6d 6s", "6h 6s"
}
assert set(translate("AKs")) == {
"Ac Kc", "Ad Kd", "Ah Kh", "As Ks"
}
assert set(tr... | mit | -6,830,716,536,412,365,000 | 30.878049 | 69 | 0.472073 | false |
jarvisqi/nlp_learn | gensim/text.py | 1 | 2054 | import jieba
import pandas as pd
from gensim import corpora, models, similarities
# 训练样本
raw_documents = [
'0无偿居间介绍买卖毒品的行为应如何定性',
'1吸毒男动态持有大量毒品的行为该如何认定',
'2如何区分是非法种植毒品原植物罪还是非法制造毒品罪',
'3为毒贩贩卖毒品提供帮助构成贩卖毒品罪',
'4将自己吸食的毒品原价转让给朋友吸食的行为该如何认定',
'5为获报酬帮人购买毒品的行为该如何认定',
'6毒贩出狱后再次够买毒品途中被抓的行为认定',
'7虚... | mit | -1,880,925,002,496,043,800 | 27.755556 | 86 | 0.704791 | false |
WisniewskiP/meson | install_meson.py | 1 | 3639 | #!/usr/bin/env python3
# Copyright 2013-2014 The Meson development team
# 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 | -5,287,735,341,432,281,000 | 35.029703 | 89 | 0.710085 | false |
wcmckee/wcmckee-notebook | hackbrobeur.py | 1 | 2509 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# Hack BroBeur
# <markdowncell>
# python script to make account at centre for logins.
# <codecell>
from github import Github
import os
import getpass
import git
import time
from clint.textui import colored
import dominate
from dominate.tags impo... | gpl-2.0 | 2,657,833,803,489,301,000 | 11.420792 | 85 | 0.656038 | false |
njncalub/hiddencloudserver | supersyncer/migrations/0002_auto__del_booktextquestionchoice__add_field_booktextquestion_choice_1_.py | 1 | 10046 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'BookTextQuestionChoice'
db.delete_table('supersyncer_bo... | gpl-3.0 | -552,893,781,564,322,200 | 63.819355 | 176 | 0.5652 | false |
osantana/correios | documentation/process_correios_status.py | 1 | 1409 | #!/usr/bin/env python3.5
import csv
import re
import sys
result = []
with open(sys.argv[1]) as csvfile:
reader = csv.reader(csvfile)
for raw_row in reader:
tipo, status, descr, detalhe, cliente = raw_row
tipo = tipo.strip().replace("\n", " ")
status = status.strip().replace("\n", " ")... | apache-2.0 | 676,500,828,654,824,400 | 28.978723 | 76 | 0.471966 | false |
32bitmicro/EDA | python/eda/eda/dump.py | 1 | 2948 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014, Paweł Wodnicki
# 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, t... | bsd-3-clause | 4,909,801,486,996,867,000 | 34.071429 | 111 | 0.598099 | false |
apdjustino/DRCOG_Urbansim | src/opus_gui/results_manager/run/indicator_framework/visualizer/visualizers/matplotlib_lorenzcurve.py | 1 | 10890 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import os, re, sys, time, traceback
from copy import copy
from opus_gui.results_manager.run.indicator_framework.visualizer.visualizers.abstract_visualizat... | agpl-3.0 | -796,952,061,882,075,500 | 40.724138 | 120 | 0.562075 | false |
mpdehaan/interfacer | lib/interfacer/base_module.py | 1 | 4701 | #
# Copyright (c) rPath, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute... | mit | -5,573,441,767,861,178,000 | 29.72549 | 79 | 0.610508 | false |
homhei/glance | bin/glance.py | 1 | 3416 | #!/usr/bin/env python
#encode=utf-8
#vim: tabstop=4 shiftwidth=4 softtabstop=4
#Created on 2013-6-7
#Copyright 2013 nuoqingyun xuqifeng
import sys
import time
import os
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir, os.pardir))
if os.path... | apache-2.0 | -254,126,492,494,727,170 | 28.448276 | 87 | 0.543911 | false |
jamesonwilliams/zephyr-kernel | doc/scripts/genrest/kconfiglib.py | 1 | 143880 | # This is Kconfiglib, a Python library for scripting, debugging, and extracting
# information from Kconfig-based configuration systems. To view the
# documentation, run
#
# $ pydoc kconfiglib
#
# or, if you prefer HTML,
#
# $ pydoc -w kconfiglib
#
# The examples/ subdirectory contains examples, to be run with e.g.
#
... | apache-2.0 | 3,702,397,827,326,251,500 | 38.39759 | 89 | 0.541083 | false |
KaiserAndres/kaiserBot | bot_executables.py | 1 | 4751 | import roller
import random
DEFAULT_CARD_AMOUNT = 1
MAX_CARDS = 15
CARD_SEPARATOR = "||"
def ping_exec(irc, message):
pong = 'PONG ' + message.text.split(" ")[1] + '\r\n'
irc.send(pong.encode("utf-8"))
def roll_exec(irc, message):
'''
A !roll comand has the following structure:
!rol... | mit | -1,279,902,818,268,667,600 | 29.455128 | 80 | 0.53273 | false |
BenLangmead/qtip-experiments | experiments/real_data/perf_tabulate.py | 1 | 3305 | """
Creates a table with efficiency metrics (running time, peak memory
footprint) from SLURM output generated from sbatch_align.sh.
"""
from __future__ import print_function
import glob
import sys
from collections import defaultdict
nslurm, nsam = 0, 0
sam_names = defaultdict(int)
tab_wrapped = defaultdict(lambda: d... | mit | -3,366,417,787,991,441,000 | 39.304878 | 119 | 0.552496 | false |
t3dev/odoo | addons/mrp/__manifest__.py | 5 | 1731 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Manufacturing',
'version': '2.0',
'website': 'https://www.odoo.com/page/manufacturing',
'category': 'Manufacturing/Manufacturing',
'sequence': 16,
'summary': 'Manufacturing Orders & BO... | gpl-3.0 | 6,180,193,645,343,356,000 | 33.62 | 74 | 0.59792 | false |
napjon/moocs_solution | introcs-udacity/Search Engine(jonappsearch)/main.py | 1 | 1817 | #!/usr/bin/env python
#
# Copyright 2007 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit | -7,123,328,385,974,137,000 | 23.890411 | 79 | 0.628509 | false |
rjschwei/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/operations/disks_operations.py | 1 | 30126 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -5,214,372,820,157,999,000 | 43.04386 | 144 | 0.627631 | false |
jkoelker/quark | quark/tests/plugin_modules/test_subnets.py | 1 | 36379 | # Copyright 2013 Openstack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 5,589,751,111,151,484,000 | 43.042373 | 79 | 0.546469 | false |
icoderaven/slytherin_dagger | src/utils.py | 1 | 1217 | #!/usr/bin/env python
import math
import numpy as np
#----------------------------------------------------------------------
#converts angles in degrees to radians
#----------------------------------------------------------------------
def deg_to_rad(angle):
return angle*math.pi/180.0
#---------------------------... | bsd-3-clause | 7,963,987,814,229,428,000 | 32.805556 | 72 | 0.380444 | false |
jirenz/CS229_Project | hearthbreaker/cards/minions/druid.py | 1 | 11367 | from hearthbreaker.cards.base import MinionCard, ChoiceCard
from hearthbreaker.game_objects import Minion
from hearthbreaker.tags.action import Give, Damage, Silence, Transform, Draw, Heal, \
Summon, AddCard, GiveManaCrystal, Remove, Kill
from hearthbreaker.tags.base import Choice, Buff, Effect, Battlecry, Deathrat... | mit | 5,221,729,277,601,726,000 | 34.521875 | 118 | 0.622064 | false |
opencivicdata/scrapers-ca | ca_ab_wood_buffalo/people.py | 1 | 2201 | from utils import CanadianScraper, CanadianPerson as Person
from collections import defaultdict
COUNCIL_PAGE = 'http://www.woodbuffalo.ab.ca/Municipal-Government/Mayor-and-Council/Councillor-Profiles.htm'
class WoodBuffaloPersonScraper(CanadianScraper):
def scrape(self):
seat_numbers = defaultdict(int)
... | mit | -7,673,551,670,735,821,000 | 36.948276 | 108 | 0.562472 | false |
tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Feature_Comparison/multiple_features/results/test10_cross_validate_objects_1200ms_scaled_method_v_area_motion.py | 1 | 4600 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | mit | 718,970,347,211,313,800 | 33.074074 | 666 | 0.646087 | false |
dc3-plaso/dfvfs | dfvfs/encoding/manager.py | 1 | 2019 | # -*- coding: utf-8 -*-
"""The encoding manager."""
class EncodingManager(object):
"""Class that implements the encoding manager."""
_decoders = {}
@classmethod
def DeregisterDecoder(cls, decoder):
"""Deregisters a decoder for a specific encoding method.
Args:
decoder (type): decoder class.
... | apache-2.0 | 10,433,650,613,161,438 | 25.220779 | 74 | 0.662209 | false |
wiki-ai/revscoring | revscoring/features/wikitext/datasources/tokenized.py | 1 | 13882 | import re
from deltas import wikitext_split
from deltas import wikitext_split_w_cjk
from deltas.segmenters import ParagraphsSentencesAndWhitespace
from revscoring.datasources import Datasource
from revscoring.datasources.meta import filters, frequencies, mappers
from . import base
class Revision(base.BaseRevision... | mit | -5,460,136,003,285,908 | 28.411017 | 132 | 0.548624 | false |
c-rack/czmq | bindings/python_cffi/czmq_cffi.py | 1 | 115567 | ################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
#############################################################################... | mpl-2.0 | -4,268,107,658,003,528,700 | 36.159807 | 113 | 0.627411 | false |
hperala/kontuwikibot | scripts/spamremove.py | 1 | 3739 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to remove links that are being or have been spammed.
Usage:
spamremove.py www.spammedsite.com
It will use Special:Linksearch to find the pages on the wiki that link to
that site, then for each page make a proposed change consisting of removing
all the lines where ... | mit | -3,847,130,002,318,686,000 | 28.912 | 79 | 0.554426 | false |
1200wd/1200wd_addons | account_bank_match/models/account_bank_match.py | 1 | 10826 | # -*- coding: utf-8 -*-
##############################################################################
#
# Account Bank Match
# Copyright (C) 2016 May
# 1200 Web Development
# http://1200wd.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | agpl-3.0 | -1,092,523,175,278,956,900 | 46.69163 | 220 | 0.626362 | false |
tbenthompson/okada_wrapper | setup.py | 1 | 1093 | from numpy.distutils.core import setup, Extension
version = open('VERSION').read().strip('\n')
# -g compiles with debugging information.
# -O0 means compile with no optimization, try -O3 for blazing speed
compile_args = ['-O3']
ext = []
ext.append(Extension('DC3D',
sources = ['okada_wrapper/DC3D.f',... | mit | 2,274,454,879,333,812,200 | 28.540541 | 84 | 0.637694 | false |
Yelp/paasta | paasta_tools/cassandracluster_tools.py | 1 | 7272 | # Copyright 2015-2019 Yelp Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | -2,582,898,150,545,894,000 | 33.628571 | 104 | 0.662404 | false |
arenaoftitans/arena-of-titans-api | aot/api/views/play_actions.py | 1 | 3704 | #
# Copyright (C) 2015-2020 by Last Run Contributors.
#
from dunder_mifflin import papers # WARNING: Malicious operation ahead
# This file is part of Arena of Titans.
#
# Arena of Titans is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publishe... | agpl-3.0 | 3,284,655,310,582,589,000 | 34.27619 | 85 | 0.650648 | false |
GPflow/GPflowOpt | gpflowopt/acquisition/pof.py | 1 | 3594 | # Copyright 2017 Joachim van der Herten
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -1,453,852,975,451,257,900 | 41.282353 | 145 | 0.687257 | false |
vbisserie/sudoku_sover | routes/index.py | 1 | 1159 | # -*- coding: utf-8 -*-
from flask import Blueprint, jsonify, request
blueprint = Blueprint('index', __name__, url_prefix='/api/v1/')
@blueprint.route("ping")
def health_check():
return jsonify({'ping': 'pong'})
@blueprint.route("solve", methods=['POST'])
def solve():
solve_request = request.get_json()
... | gpl-3.0 | -7,583,931,265,893,311,000 | 32.114286 | 82 | 0.570319 | false |
nuagenetworks/tempest | tempest/tests/lib/common/utils/test_data_utils.py | 1 | 6367 | # Copyright 2014 NEC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -8,855,882,504,040,678,000 | 38.302469 | 78 | 0.614732 | false |
codilime/cloudify-manager | tests/workflow_tests/test_rest_service_sort.py | 1 | 3609 | ########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 2,703,651,746,208,794,000 | 38.228261 | 79 | 0.621779 | false |
ldjebran/robottelo | tests/foreman/cli/test_hammer.py | 2 | 7839 | """Tests related to hammer command and its options and subcommands.
:Requirement: Hammer
:CaseAutomation: Automated
:CaseLevel: Component
:CaseComponent: Hammer
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import json
import re
from fauxfactory import gen_string
from robottelo import ssh
from r... | gpl-3.0 | 7,244,868,775,362,183,000 | 35.802817 | 89 | 0.580304 | false |
mmccollow/TSV-Convert | tsv-convert.py | 1 | 3059 | #!bin/python
# TSV to Dublin Core/McMaster Repository conversion tool
# Matt McCollow <mccollo@mcmaster.ca>, 2011
# Nick Ruest <ruestn@mcmaster.ca>, 2011
from DublinCore import DublinCore
import csv
from sys import argv
from xml.dom.minidom import Document
from os.path import basename
DC_NS = 'http://purl.org/dc/ele... | gpl-2.0 | -2,450,947,185,222,058,500 | 30.536082 | 73 | 0.686172 | false |
mholgatem/GPIOnext | config/menus.py | 1 | 4183 | import time
from config.constants import *
from config import SQL
from cursesmenu import *
from cursesmenu.items import *
import curses
'''
---------------------------------------------------------
This script handles menu navigation
RETURNS: dictionary containing device name,
number of buttons, number of axis
-... | mit | -1,539,677,668,419,638,800 | 27.346939 | 109 | 0.63067 | false |
leosartaj/PyChat | PyChat/server/startserver.py | 1 | 1346 | #!/usr/bin/env python2
##
# PyChat
# https://github.com/leosartaj/PyChat.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##
"""
Helper functions for starting a server
"""
# Twisted Imports
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
# factory/p... | mit | -1,021,957,207,768,436,000 | 25.92 | 67 | 0.729569 | false |
gfetterman/bark | bark/tools/barkutils.py | 1 | 12062 | import os.path
from glob import glob
import bark
import argparse
from bark import stream
import arrow
from dateutil import tz
import numpy
import sys
import subprocess
def meta_attr():
p = argparse.ArgumentParser(
description="Create/Modify a metadata attribute")
p.add_argument("name", help="name of b... | gpl-2.0 | -8,583,137,634,202,377,000 | 36.113846 | 82 | 0.570718 | false |
dims/neutron | neutron/common/config.py | 1 | 13000 | # Copyright 2011 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -2,916,700,827,220,835,000 | 46.619048 | 79 | 0.585846 | false |
WoLpH/EventGhost | eg/Core.py | 1 | 12315 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 versio... | gpl-2.0 | 5,448,933,114,497,041,000 | 29.939698 | 78 | 0.687835 | false |
xncbf/authome | log/views.py | 1 | 3426 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import User
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.urls import reverse
from django.db import connection
from django.shortcuts import render, HttpResponse
from django.utils import timezon... | mit | 8,670,323,591,795,827,000 | 43.763158 | 118 | 0.496179 | false |
sonicxml/PennApps-2016f | server.py | 1 | 2384 | import flask
import config
import yelp_handler
import json
import requests
slack_posturl = "https://slack.com/api/chat.postMessage"
slack_reacturl = "https://slack.com/api/reactions.add"
app = flask.Flask(__name__)
class InvalidTokenException(Exception):
pass
@app.errorhandler(InvalidTokenException)
def handle_... | gpl-3.0 | 603,276,408,014,567,700 | 29.974026 | 78 | 0.626258 | false |
ChrisFadden/PartyTowers | webrouter.py | 1 | 4597 | # This file runs the websockets.
import string, cgi, time
import sys
sys.path.insert(0, 'PyWebPlug')
from wsserver import *
from time import sleep
def setupMessages():
return
class Client:
def __init__(self, socket):
self.socket = socket
self.needsConfirmation = True
def handle(se... | mit | 5,511,224,919,330,852,000 | 24.971751 | 96 | 0.510115 | false |
texnokrates/electroballz | electroballz/single_coeff.py | 1 | 1461 | from scipy import *
from scipy.special import sph_jn, sph_yn
# The following is an entirely computationally inefficient draft, intended for basic orientation.
def jl(l,z):
"""Wrapper for sph_jn (discards the unnecessary data)"""
return sph_jn(n, z)[0][l]
def yl(l,z):
"""Wrapper for sph_yn (discards the u... | gpl-3.0 | -3,926,437,970,418,607,000 | 30.76087 | 97 | 0.577002 | false |
sofmonk/aima-python | agents.py | 1 | 33633 | """Implement Agents and Environments (Chapters 1-2).
The class hierarchies are as follows:
Thing ## A physical object that can exist in an environment
Agent
Wumpus
Dirt
Wall
...
Environment ## An environment holds objects, runs simulations
XYEnvironment
VacuumEnvironment
W... | mit | 3,272,948,040,308,305,000 | 33.81677 | 100 | 0.570719 | false |
Dwolla/arbalest | examples/s3_json_object_to_redshift.py | 1 | 2379 | #!/usr/bin/env python
import psycopg2
from arbalest.configuration import env
from arbalest.redshift import S3CopyPipeline
from arbalest.redshift.schema import JsonObject, Property
"""
**Example: Bulk copy JSON objects from S3 bucket to Redshift table**
Arbalest orchestrates data loading using pipelines. Each `Pipelin... | mit | 2,963,051,004,563,553,000 | 38.65 | 82 | 0.599412 | false |
orbnauticus/Pique | pique/network.py | 1 | 4328 | #!/usr/bin/env python
#
# Copyright (c) 2010, Ryan Marquardt
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright notice,
# th... | bsd-3-clause | 4,551,058,690,451,919,400 | 29.478873 | 75 | 0.703558 | false |
Ladsgroup/MP3-cleaner | mp3.py | 1 | 1167 | import fnmatch
import os
import eyed3
import shutil
path_to_clean = u'/media/amir/Files/Download/'
path_to_move = u'/media/amir/Files/Music/'
matches = []
for root, dirnames, filenames in os.walk(path_to_clean):
for filename in fnmatch.filter(filenames, u'*.mp3'):
matches.append(os.path.join(root, filename)... | apache-2.0 | -5,187,029,414,978,394,000 | 29.710526 | 70 | 0.520137 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.