commit stringlengths 40 40 | subject stringlengths 1 1.49k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | new_contents stringlengths 1 29.8k | old_contents stringlengths 0 9.9k | lang stringclasses 3
values | proba float64 0 1 |
|---|---|---|---|---|---|---|---|
1ba0a6f93683a0e8f020abe5f34624db33c3a470 | Update the package version | __init__.py | __init__.py | '''Utility classes and functions for creating Alfred workflows'''
__version__ = '20130913.0'
from .alfred import Workflow, WorkflowInfo, Item, JsonFile, LINE
from .keychain import Keychain
| '''Utility classes and functions for creating Alfred workflows'''
__version__ = '20130909.0'
from .alfred import Workflow, WorkflowInfo, Item, JsonFile, LINE
from .keychain import Keychain
| Python | 0 |
8df7fecb367d27d59402797ecfb9c13ba4f438b7 | Fix reference to DEFAULT_USER_INTERFACE | __main__.py | __main__.py | #!/usr/bin/env python
#This is free and unencumbered software released into the public domain.
#
#Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
#software, either in source code form or as a compiled binary, for any purpose,
#commercial or non-commercial, and by any means.
#
#In jurisd... | #!/usr/bin/env python
#This is free and unencumbered software released into the public domain.
#
#Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
#software, either in source code form or as a compiled binary, for any purpose,
#commercial or non-commercial, and by any means.
#
#In jurisd... | Python | 0 |
0b1b1ef6d3af248021125135b7534b3870517890 | Add tasks urls | task/urls.py | task/urls.py | from django.conf.urls import include, url
from views import *
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token
urlpatterns = [
] | Python | 0.000018 | |
42bd66cd7e272746f0bb2add6817cb935ea17898 | add blanks line - pep8 | nosdeputes/update_mps.py | nosdeputes/update_mps.py | import sys
import time
from json import load
from urllib2 import urlopen, HTTPError
from django.db import transaction
from memopol2.utils import get_or_create
from reps.models import Email, WebSite
from mps.models import MP
def update_personal_informations(_mp, mp):
_mp.full_name = mp["nom"]
_mp.last_name = ... | import sys
import time
from json import load
from urllib2 import urlopen, HTTPError
from django.db import transaction
from memopol2.utils import get_or_create
from reps.models import Email, WebSite
from mps.models import MP
def update_personal_informations(_mp, mp):
_mp.full_name = mp["nom"]
_mp.last_name = ... | Python | 0.000006 |
450fd3f082000eb2bb1774caf32a5c7cd5793ecc | manage http error for nosdeputes.fr | nosdeputes/update_mps.py | nosdeputes/update_mps.py | import sys
import time
from json import load
from urllib2 import urlopen, HTTPError
from memopol2.utils import get_or_create
from reps.models import Email, WebSite
from mps.models import MP
def update_personal_informations(_mp, mp):
_mp.full_name = mp["nom"]
_mp.last_name = mp["nom_de_famille"]
_mp.an_we... | import sys
from json import load
from urllib2 import urlopen
from memopol2.utils import get_or_create
from reps.models import Email, WebSite
from mps.models import MP
def update_personal_informations(_mp, mp):
_mp.full_name = mp["nom"]
_mp.last_name = mp["nom_de_famille"]
_mp.an_webpage = mp["url_an"]
... | Python | 0 |
85610d7e69abe8f75c9f64ede243dfaeb97b5601 | Update spider.py | script/spider.py | script/spider.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import thread, time, cv2
import numpy as np
from gpiozero import Motor, PWMLED
# Eyelib can be managed by following variables:
# blinking : If True start a blink animation (1 cycle)
# blinkspd : Speed of blinking
# eyeangle :Ddirection of view
# eyedistance : D... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import thread, time, cv2
import numpy as np
from gpiozero import Motor, PWMLED
# Eyelib can be managed by following variables:
# blinking : If True start a blink animation (1 cycle)
# blinkspd : Speed of blinking
# eye : Eye image
# lid : Lid base image
import ... | Python | 0.000001 |
95a486b1b6658201ff6a3d1a1cd9dae7eb0f30a9 | Test merge | genome_browser_utils/build_new_database.py | genome_browser_utils/build_new_database.py | #!/usr/bin/python
import MySQLdb
import re
import os
import csv
import sys
def generate_sql_dict_from_csv(naming_csv):
transactions = []
with open(naming_csv, 'rb') as f:
reader = csv.reader(f)
print "reading headers..."
header = reader.next()
for rownum, row in enumerate(reade... | #!/usr/bin/python
import MySQLdb
import re
import os
import csv
import sys
def generate_sql_dict_from_csv(naming_csv):
transactions = []
with open(naming_csv, 'rb') as f:
reader = csv.reader(f)
print "reading headers..."
header = reader.next()
for rownum, row in enumerate(reade... | Python | 0.000001 |
f37f556ed497cf9c69f780290465610216ed6f5c | refactor ProfileViewTestCase: add setUp inherited by super class | english_diary/profiles/tests/test_views.py | english_diary/profiles/tests/test_views.py | from django.test import Client
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
import datetime
from core.tests.base import BaseTestCase
from profiles.utils import set_expiration_date
class ProfileViewTestCase(BaseTestCase):
def setUp(self):
super(ProfileViewTe... | from django.test import Client
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
import datetime
from core.tests.base import BaseTestCase
from profiles.utils import set_expiration_date
class ProfileViewTestCase(BaseTestCase):
def test_verify_user_verification_key(self):... | Python | 0.000001 |
013b33c8e8e788a2567449846a050b45ebdd4011 | Improve sbl bot. Fix parser to properly parse netblocks as well as all ip addresses. | abusehelper/contrib/spamhaus/sbl.py | abusehelper/contrib/spamhaus/sbl.py | import idiokit
from abusehelper.core import cymruwhois, bot, events
class SpamhausSblBot(bot.PollingBot):
use_cymru_whois = bot.BoolParam(default=True)
sbl_filepath = bot.Param("Filename of Spamhaus SBL file")
def _event(self):
event = events.Event()
event.add("feed", "spamhaus block list... | import idiokit
from abusehelper.core import cymruwhois, bot, events
class SpamhausSblBot(bot.PollingBot):
use_cymru_whois = bot.BoolParam(default=True)
sbl_filepath = bot.Param("Filename of Spamhaus SBL file")
@idiokit.stream
def poll(self):
skip_chars = ["#", ":", "$"]
self.log.info(... | Python | 0 |
ce45df98d7fbd9b2679d20ac21a188a18295b667 | remove debug print | 3rdParty/V8/v5.7.0.0/gypfiles/gyp_v8.py | 3rdParty/V8/v5.7.0.0/gypfiles/gyp_v8.py | # Copyright 2013 the V8 project authors. 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 conditi... | # Copyright 2013 the V8 project authors. 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 conditi... | Python | 0.000008 |
0ec01e1c5770c87faa5300b80c3b9d6bcb0df41b | Make sure to return python values, not lxml objects | tcxparser.py | tcxparser.py | "Simple parser for Garmin TCX files."
from lxml import objectify
__version__ = '0.4.0'
class TcxParser:
def __init__(self, tcx_file):
tree = objectify.parse(tcx_file)
self.root = tree.getroot()
self.activity = self.root.Activities.Activity
@property
def latitude(self):
... | "Simple parser for Garmin TCX files."
from lxml import objectify
__version__ = '0.3.0'
class TcxParser:
def __init__(self, tcx_file):
tree = objectify.parse(tcx_file)
self.root = tree.getroot()
self.activity = self.root.Activities.Activity
@property
def latitude(self):
... | Python | 0 |
0e4b650f49cbfc44027d2b86c42c43abfc6dc494 | allow extending acknowledgments, closes #47 | django_datawatch/models.py | django_datawatch/models.py | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
from dateutil import relativedelta
from django.utils import timezone
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from d... | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
from dateutil import relativedelta
from django.utils import timezone
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from d... | Python | 0 |
c8d781d24f647264357c6919b1568fb5d37dbcf5 | use ADMIN_DATABASE instead of FRONTEND_DATABASE since the latter should not need write privileges to the database | dbmanage.py | dbmanage.py | #!/usr/bin/env python
"""
Imposter - Another weblog app
Copyright (c) 2010 by Jochem Kossen <jochem.kossen@gmail.com>
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 abov... | #!/usr/bin/env python
"""
Imposter - Another weblog app
Copyright (c) 2010 by Jochem Kossen <jochem.kossen@gmail.com>
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 abov... | Python | 0.000001 |
3ea8c93f34667effafb888f4ed350d80ba343c03 | Convert seconds to an int before waiting for it. | lettuce_webdriver/css_selector_steps.py | lettuce_webdriver/css_selector_steps.py | import time
from lettuce import step
from lettuce import world
from lettuce_webdriver.util import assert_true
from lettuce_webdriver.util import assert_false
from selenium.common.exceptions import WebDriverException
import logging
log = logging.getLogger(__name__)
def wait_for_elem(browser, sel, timeout=15):
s... | import time
from lettuce import step
from lettuce import world
from lettuce_webdriver.util import assert_true
from lettuce_webdriver.util import assert_false
from selenium.common.exceptions import WebDriverException
import logging
log = logging.getLogger(__name__)
def wait_for_elem(browser, sel, timeout=15):
s... | Python | 0.003539 |
3f18e4891b64c45fbda9ae88e9b508b5bc2cb03a | Add infinite loop; Add env vars | temp2dash.py | temp2dash.py | import json
import os
import requests
import sys
import time
import traceback
from temperusb import TemperHandler
URL = os.environ['DASHING_URL']
SCALE = float(os.environ['TEMP_SCALE'])
OFFSET = float(os.environ['TEMP_OFFSET'])
SENSOR = int(os.environ['TEMP_SENSOR'])
SLEEP = int(os.environ['SLEEP_TIME'])
th = TemperH... | import json
import requests
import sys
from temperusb import TemperHandler
URL="http://dashing:3030/widgets/inside"
SCALE=1.0
OFFSET=-3.0
th = TemperHandler()
devs = th.get_devices()
if len(devs) != 1:
print "Expected exactly one TEMPer device, found %d" % len(devs)
sys.exit(1)
dev = devs[0]
dev.set_calibr... | Python | 0.000001 |
a7266c383ab8fdb00c5e44c9890cc888f4b495f4 | Implement encoding | set1/vigenere_cipher/vigenere_cipher.py | set1/vigenere_cipher/vigenere_cipher.py | #!/usr/bin/env python3
import argparse
import itertools
################################################################################
# Vigenere cipher encoder/decoder
################################################################################
class TabulaRecta:
"""
The Vigenère cipher consists of s... | #!/usr/bin/env python3
################################################################################
# Vigenere cipher
################################################################################
class TabulaRecta:
"""
The Vigenère cipher consists of several Caesar ciphers in sequence with
differe... | Python | 0.999992 |
285ca0f2a469d0d11baad1120a5b0b1d0074aef3 | Update dbworker.py (#2) | dbworker.py | dbworker.py | # -*- coding: utf-8 -*-
from tinydb import TinyDB, Query
from tinydb.operations import increment, decrement
from texts import strings
from config import db_file
from utils import get_language
DEFAULT_WORD_COUNT = 3
DEFAULT_PREFIX_SUFFIX = True
DEFAULT_SEPARATOR = True
db = TinyDB(db_file)
def get_settings_text(us... | # -*- coding: utf-8 -*-
from tinydb import TinyDB, Query
from tinydb.operations import increment, decrement
from texts import strings
from config import db_file
from utils import get_language
DEFAULT_WORD_COUNT = 3
DEFAULT_PREFIX_SUFFIX = True
DEFAULT_SEPARATOR = True
db = TinyDB(db_file)
def get_settings_text(us... | Python | 0 |
991c6bc16388e4470193462c4ce63468b22ca79a | Remove __author__ | __init__.py | __init__.py | from ioc import *
__copyright__ = "Copyright 2013 Google Inc."
__license__ = "MIT, see LICENSE"
| from ioc import *
__author__ = "Wes Alvaro"
__copyright__ = "Copyright 2013 Google Inc."
__license__ = "MIT, see LICENSE"
| Python | 0.00012 |
19e12f1e492272bf4a69e0bc99106e78788b9c14 | Add PEP8 line terminator before EOF | __init__.py | __init__.py | from extract import *
| from extract import * | Python | 0.000004 |
5768d1ebcfec46e564c8b420773d911c243327ff | Fix non-threadsafe failure in serializer - now using thread local serializer instance. | dddp/msg.py | dddp/msg.py | """Django DDP utils for DDP messaging."""
from dddp import THREAD_LOCAL as this
from django.core.serializers import get_serializer
def serializer_factory():
"""Make a new DDP serializer."""
return get_serializer('ddp')()
def obj_change_as_msg(obj, msg):
"""Generate a DDP msg for obj with specified msg t... | """Django DDP utils for DDP messaging."""
import collections
from django.core.serializers import get_serializer
_SERIALIZER = None
def obj_change_as_msg(obj, msg):
"""Generate a DDP msg for obj with specified msg type."""
global _SERIALIZER
if _SERIALIZER is None:
_SERIALIZER = get_serializer('ddp... | Python | 0 |
3676809c9d44abf8b48810b58488ba519c21254d | use new API for thawing deps | repository/netrepos/instructionsets.py | repository/netrepos/instructionsets.py | #
# Copyright (c) 2004 Specifix, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/li... | #
# Copyright (c) 2004 Specifix, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/li... | Python | 0 |
0a42ec9eeccc5969bf1eb8a92cd7d66ade4daf76 | Make executable | ddgquery.py | ddgquery.py | #! /usr/bin/env python
import os, time
# use python3
while True:
os.system("espeak -v en-us 'What would you like to know about?'")
#time.sleep(4)
query = input("What would you like to know about?\n")
if query == "help":
print("Add -u to get a helpful URL\nAdd -l to launch the URL in your brows... | import os, time
# use python3
while True:
os.system("espeak -v en-us 'What would you like to know about?'")
#time.sleep(4)
query = input("What would you like to know about?\n")
if query == "help":
print("Add -u to get a helpful URL\nAdd -l to launch the URL in your browser\nAdd -s to get a Duck... | Python | 0.999996 |
40dca64ee4307669b80f8a2e4328176c50f179f2 | use trailing slash for non-URL crumbs so sequential non-URL crumbs get a separator...this means there's always an ending slash (may fix that later) | repository/templatetags/breadcrumbs.py | repository/templatetags/breadcrumbs.py | # Based on http://djangosnippets.org/snippets/1289/
# with modifications to use bootstrap breadcrumb styles
from django import template
from django.template import Node, Variable
from django.utils.encoding import smart_unicode
from django.template.defaulttags import url
from django.template import VariableDoesNotExist... | # Based on http://djangosnippets.org/snippets/1289/
# with modifications to use bootstrap breadcrumb styles
from django import template
from django.template import Node, Variable
from django.utils.encoding import smart_unicode
from django.template.defaulttags import url
from django.template import VariableDoesNotExist... | Python | 0 |
f6b91953a5595b1f5a29a5bb69b3c9bc61e1b885 | I am an idiot | api/result.py | api/result.py | """
ApiResult class
"""
from datetime import datetime
from typing import Dict
from discord import Embed
from api import datetime_input_format, datetime_output_format, trim_string
class ApiResult(object):
"""
API Result object
"""
#taken from https://rpcs3.net/compatibility
STATUS_NOTHING = 0x455... | """
ApiResult class
"""
from datetime import datetime
from typing import Dict
from discord import Embed
from api import datetime_input_format, datetime_output_format, trim_string
class ApiResult(object):
"""
API Result object
"""
#taken from https://rpcs3.net/compatibility
STATUS_NOTHING = 0x455... | Python | 0.998675 |
338e2ba155df0759113c65ced6be6714092b9aaf | Use Alex's awesome new version of the GtkQuartz theme engine | packages/gtk-quartz-engine.py | packages/gtk-quartz-engine.py | Package ('gtk-quartz-engine', 'master',
sources = [ 'git://github.com/nirvanai/gtk-quartz-engine.git' ],
override_properties = { 'configure':
'libtoolize --force --copy && '
'aclocal && '
'autoheader && '
'automake --add-missing && '
'autoconf && '
'./configure --prefix=%{prefix}'
}
)
| Package ('gtk-quartz-engine', 'master',
sources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ],
override_properties = { 'configure':
'libtoolize --force --copy && '
'aclocal && '
'autoheader && '
'automake --add-missing && '
'autoconf && '
'./configure --prefix=%{prefix}'
}
)
| Python | 0 |
12130cef6c9b08e0928ed856972ace3c2000e6f8 | Fix error accessing class variable | mooc_aggregator_restful_api/udacity.py | mooc_aggregator_restful_api/udacity.py | '''
This module retrieves the course catalog and overviews of the Udacity API
Link to Documentation:
https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf
'''
import json
import requests
class UdacityAPI(object):
'''
This class defines attributes and method... | '''
This module retrieves the course catalog and overviews of the Udacity API
Link to Documentation:
https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf
'''
import json
import requests
class UdacityAPI(object):
'''
This class defines attributes and method... | Python | 0.000004 |
8d8a2fb7f1ec5a14a329e8aaaa9dd1815981cf40 | fix rounding error | motmot/realtime_image_analysis/slow.py | motmot/realtime_image_analysis/slow.py | import numpy
def do_bg_maint( running_mean_im,
hw_roi_frame,
max_frame_size,
ALPHA,
running_mean8u_im,
fastframef32_tmp,
running_sumsqf,
mean2,
std2,
running_stdframe... | import numpy
def do_bg_maint( running_mean_im,
hw_roi_frame,
max_frame_size,
ALPHA,
running_mean8u_im,
fastframef32_tmp,
running_sumsqf,
mean2,
std2,
running_stdframe... | Python | 0.000765 |
ac63fca5b1e688fb465431fd1760db6b1c766fea | Bump to version 0.14 | openspending/_version.py | openspending/_version.py | __version__ = '0.14.0'
| __version__ = '0.13.1'
| Python | 0 |
b7b23f9840af377f37617f3bbb79556342d74133 | replace prints with calls to logger | __main__.py | __main__.py | #/usr/bin/env python2
import web
import log
import ConfigParser
_log = log.TrivialLogger()
_config_file_list = ['./jim.cfg', '/etc/jim.cfg']
_config_file_parser = ConfigParser.RawConfigParser()
_config_ok = True
try:
_config_file_list = _config_file_parser.read(_config_file_list)
except:
_log.error("cannot pa... | #/usr/bin/env python2
import web
import ConfigParser
_config_file_list = ['./jim.cfg', '/etc/jim.cfg']
_config_file_parser = ConfigParser.RawConfigParser()
_config_ok = True
try:
_config_file_list = _config_file_parser.read(_config_file_list)
except:
print("cannot parse configuration file(s)")
_config_ok ... | Python | 0 |
ba97f70c2d213f92ce73d1e13921ff7c6bf35991 | fix /compare/ link | __main__.py | __main__.py | import os
import subprocess
import sys
GIT_PATH = '/opt/'
def _open_pipe(cmd, cwd=None):
return subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, cwd=cwd)
def git_path(repo):
return os.path.join(GIT_PATH, repo... | import os
import subprocess
import sys
GIT_PATH = '/opt/'
def _open_pipe(cmd, cwd=None):
return subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, cwd=cwd)
def git_path(repo):
return os.path.join(GIT_PATH, repo... | Python | 0 |
6a5a7a1e1eafa91543d8e274e63d258332149a29 | Update __version__.py | orcidfind/__version__.py | orcidfind/__version__.py | # Single source of metadata about the project that's used by setup.py and
# docs/conf.py
# Some segments of public version identifer (PEP 440)
VERSION_RELEASE = "0.1"
VERSION_PRE_RELEASE = "a5" # e.g., "a4", "b1", "rc3" or "" (final release)
VERSION_POST_RELEASE = "" # e.g., ".post1"
VERSION = VERSION_RELEASE + ... | # Single source of metadata about the project that's used by setup.py and
# docs/conf.py
# Some segments of public version identifer (PEP 440)
VERSION_RELEASE = "0.1"
VERSION_PRE_RELEASE = "a4" # e.g., "a4", "b1", "rc3" or "" (final release)
VERSION_POST_RELEASE = "" # e.g., ".post1"
VERSION = VERSION_RELEASE + ... | Python | 0.000002 |
37899ad1e6120a14c053e09b3233a97fdfb9bb6d | add trash option | organize/actions/copy.py | organize/actions/copy.py | import logging
import os
import shutil
from organize.utils import Mapping, find_unused_filename, fullpath
from .action import Action
from .trash import Trash
logger = logging.getLogger(__name__)
CONFLICT_OPTIONS = ("rename_new", "rename_old", "skip", "trash", "overwrite")
class Copy(Action):
"""
Copy a ... | import logging
import os
import shutil
from organize.utils import Mapping, find_unused_filename, fullpath
from .action import Action
from .trash import Trash
logger = logging.getLogger(__name__)
CONFLICT_OPTIONS = ("rename_new", "rename_old", "skip", "overwrite")
class Copy(Action):
"""
Copy a file to a... | Python | 0.000001 |
9ffe02ac6f35b12952392585ab92cabf60234c50 | fix potential issue with mutation | treeano/sandbox/sensitivity_analysis.py | treeano/sandbox/sensitivity_analysis.py | """
from "Deep Inside Convolutional Networks: Visualising Image Classification
Models and Saliency Maps"
http://arxiv.org/abs/1312.6034
"""
import theano
import theano.tensor as T
import treeano
import canopy
class SensitivityAnalysisOutput(canopy.handlers.NetworkHandlerImpl):
"""
adds a new input and outpu... | """
from "Deep Inside Convolutional Networks: Visualising Image Classification
Models and Saliency Maps"
http://arxiv.org/abs/1312.6034
"""
import theano
import theano.tensor as T
import treeano
import canopy
class SensitivityAnalysisOutput(canopy.handlers.NetworkHandlerImpl):
"""
adds a new input and outpu... | Python | 0.000041 |
d032d2597525e02fd71a524c5a9619c09c640365 | Bump version number. | coffin/__init__.py | coffin/__init__.py | """
Coffin
~~~~~~
`Coffin <http://www.github.com/dcramer/coffin>` is a package that resolves the
impedance mismatch between `Django <http://www.djangoproject.com/>` and `Jinja2
<http://jinja.pocoo.org/2/>` through various adapters. The aim is to use Coffin
as a drop-in replacement for Django's template system to whate... | """
Coffin
~~~~~~
`Coffin <http://www.github.com/dcramer/coffin>` is a package that resolves the
impedance mismatch between `Django <http://www.djangoproject.com/>` and `Jinja2
<http://jinja.pocoo.org/2/>` through various adapters. The aim is to use Coffin
as a drop-in replacement for Django's template system to whate... | Python | 0 |
5261e7b75718b866f95285bd03171c861175dccc | Move question into random_questions function | collection/srvy.py | collection/srvy.py | #!/usr/bin/python
import sys
import time
from time import sleep
from datetime import datetime
import random
import sqlite3
import csv
from configparser import ConfigParser
try:
from gpiozero import Button
except ImportError:
print("gpiozero is not installed.")
pass
try:
import pygame
except ImportErro... | #!/usr/bin/python
import sys
import time
from time import sleep
from datetime import datetime
import random
import sqlite3
import csv
from configparser import ConfigParser
try:
from gpiozero import Button
except ImportError:
print("gpiozero is not installed.")
pass
try:
import pygame
except ImportErro... | Python | 0.999999 |
6a66172e7e1378937064d24365523ec05a13e034 | Add support to level sort in search | search/search.py | search/search.py | from django.db.models import Q
from account.models import Account
from link.models import Post
class Search:
def __init__(self, query, owner=None):
self.owner = owner
self.adv_separator = ':'
self.results = []
self.query_value = query
self.words = query.lower().split(' ')
... | from django.db.models import Q
from account.models import Account
from link.models import Post
class Search:
def __init__(self, query, owner=None):
self.owner = owner
self.adv_separator = ':'
self.results = []
self.query_value = query
self.words = query.lower().split(' ')
... | Python | 0 |
93e8e63c3cf8d360af018b6ce3abe224b8ad374c | Add further testinfra tests | molecule/default/tests/test_default.py | molecule/default/tests/test_default.py | def test_apt_preferences_docker_compose_file(host):
f = host.file("/etc/apt/preferences.d/docker-compose")
assert f.exists
assert f.is_file
def test_apt_preferences_docker_file(host):
f = host.file("/etc/apt/preferences.d/docker")
assert f.exists
assert f.is_file
def test_systemd_overlay_fil... | def test_apt_preferences_docker_compose_file(host):
f = host.file("/etc/apt/preferences.d/docker-compose")
assert f.exists
assert f.is_file
def test_apt_preferences_docker_file(host):
f = host.file("/etc/apt/preferences.d/docker")
assert f.exists
assert f.is_file
| Python | 0 |
e4442eb72a2a937c8f5bca9f6b2c479f9f15bb51 | Fix #3826, sort all file lists in moz.build (#3827) | bin/update_mozbuild.py | bin/update_mozbuild.py | #!.venv/bin/python
import argparse
import os
import io
import re
skipFiles = [
"manifest.json.template"
]
def getFullFileList(outputLoc, dirName):
result = {dirName: []}
for entry in os.listdir(outputLoc):
if os.path.isdir(os.path.join(outputLoc, entry)):
result.update(getFullFileLis... | #!.venv/bin/python
import argparse
import os
import io
import re
skipFiles = [
"manifest.json.template"
]
def getFullFileList(outputLoc, dirName):
result = {dirName: []}
for entry in os.listdir(outputLoc):
if os.path.isdir(os.path.join(outputLoc, entry)):
result.update(getFullFileLis... | Python | 0.000001 |
8dc853e90b587b9245b87c14f5cb2e93215d3283 | Change test_output data structure to dict of dict | tests/convergence_tests/sphere_lspr.py | tests/convergence_tests/sphere_lspr.py | from pygbe.util import an_solution
from convergence_lspr import (mesh_ratio, run_convergence, picklesave, pickleload,
report_results, mesh)
def main():
print('{:-^60}'.format('Running sphere_lspr test'))
try:
test_outputs = pickleload()
except FileNotFoundError:
... | from pygbe.util import an_solution
from convergence_lspr import (mesh_ratio, run_convergence, picklesave, pickleload,
report_results, mesh)
def main():
print('{:-^60}'.format('Running sphere_lspr test'))
try:
test_outputs = pickleload()
except FileNotFoundError:
... | Python | 0.000311 |
0ac869ce67017c9ffb8a8b32ff57346980144371 | use global es in reindexers | corehq/ex-submodules/pillowtop/reindexer/reindexer.py | corehq/ex-submodules/pillowtop/reindexer/reindexer.py | from corehq.elastic import get_es_new
from pillowtop.es_utils import set_index_reindex_settings, \
set_index_normal_settings, get_index_info_from_pillow, initialize_mapping_if_necessary
from pillowtop.pillow.interface import PillowRuntimeContext
class PillowReindexer(object):
def __init__(self, pillow, chang... | from pillowtop.es_utils import set_index_reindex_settings, \
set_index_normal_settings, get_index_info_from_pillow, initialize_mapping_if_necessary
from pillowtop.pillow.interface import PillowRuntimeContext
class PillowReindexer(object):
def __init__(self, pillow, change_provider):
self.pillow = pil... | Python | 0 |
f5600008defcd5fe4c9c397c0b7170f6f5e9a5e4 | Add header info and submodule imports to init | __init__.py | __init__.py | __author__ = "Justin Kitzes, Mark Wilber, Chloe Lewis"
__copyright__ = "Copyright 2012, Regents of University of California"
__credits__ = []
__license__ = "BSD 2-clause"
__version__ = "0.1"
__maintainer__ = "Justin Kitzes"
__email__ = "jkitzes@berkeley.edu"
__status__ = "Development"
import compare
import data
import... | Python | 0 | |
5281d535f67dfa2cebd8f70ee1f342c213d11b29 | change filename | __init__.py | __init__.py | from .PyGlow import *
| from .pyglow import *
| Python | 0.000109 |
67406893c1b9b727f313a374affe9868ec986fa6 | Bump to 2.6.2c1. | __init__.py | __init__.py | """distutils
The main package for the Python Module Distribution Utilities. Normally
used from a setup script as
from distutils.core import setup
setup (...)
"""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
# Distutils version
#
# Please coordinate with Marc-Andre Lemburg ... | """distutils
The main package for the Python Module Distribution Utilities. Normally
used from a setup script as
from distutils.core import setup
setup (...)
"""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
# Distutils version
#
# Please coordinate with Marc-Andre Lemburg ... | Python | 0.000001 |
b913e6d1b4323dbc52fbe2697dc9bf7fa2b80c24 | Add Python 2 deprecation warning, closes #1179 | __init__.py | __init__.py | from __future__ import absolute_import, division, print_function
import logging
import os
import sys
import warnings
if sys.version_info.major == 2:
warnings.warn(
"Python 2 is no longer fully supported. Please consider using the DIALS 2.2 release branch. "
"For more information on Python 2.7 supp... | from __future__ import absolute_import, division, print_function
import logging
import os
import sys
logging.getLogger("dials").addHandler(logging.NullHandler())
# Invert FPE trap defaults, https://github.com/cctbx/cctbx_project/pull/324
if "boost.python" in sys.modules:
import boost.python
boost.python.ext... | Python | 0 |
9d085f0478ca55b59390515c82ca3e367cef5522 | Replace Bootstrap's html5shiv with es5-shim. | app/assets.py | app/assets.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask.ext.assets import Environment, Bundle
css_application = Bundle(
'less/main.less',
filters='less',
debug=False,
output='gen/app.css'
)
css_all = Bundle(
# 'vendor/some/library.css',
css_application,
filters='cssmin',
output='gen... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask.ext.assets import Environment, Bundle
css_application = Bundle(
'less/main.less',
filters='less',
debug=False,
output='gen/app.css'
)
css_all = Bundle(
# 'vendor/some/library.css',
css_application,
filters='cssmin',
output='gen... | Python | 0.000002 |
12c57f6b785167c4f9e6427520360ce64d845e96 | Fix documentation links in Edward2 docstring. | tensorflow_probability/python/experimental/edward2/__init__.py | tensorflow_probability/python/experimental/edward2/__init__.py | # Copyright 2018 The TensorFlow Probability 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 applicable law o... | # Copyright 2018 The TensorFlow Probability 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 applicable law o... | Python | 0.000004 |
324f178926392293527b4aafa64a4c9a7a4d28c7 | Change an invalid constant name | spam_lists/validation.py | spam_lists/validation.py | # -*- coding: utf-8 -*-
'''
This module contains functions responsible for
validating arguments for other functions and
methods provided by the library
'''
from __future__ import unicode_literals
import functools
import re
from future.moves.urllib.parse import urlparse
import validators
from .exceptions import Inva... | # -*- coding: utf-8 -*-
'''
This module contains functions responsible for
validating arguments for other functions and
methods provided by the library
'''
from __future__ import unicode_literals
import functools
import re
from future.moves.urllib.parse import urlparse
import validators
from .exceptions import Inva... | Python | 0.000031 |
cc9d516605878e8cc3b003727908c3791a026ca6 | Raise exceptions with list of issues to show all of them immediately | runtime_typecheck/runtime_typecheck.py | runtime_typecheck/runtime_typecheck.py | #!/usr/bin/env python3
from functools import wraps
import inspect
from typing import (Union,
Tuple,
Any,
TypeVar,
Type,
List)
class DetailedTypeError(TypeError):
issues = []
def __init__(self, issues: List[Tup... | #!/usr/bin/env python3
from functools import wraps
import inspect
from typing import (Union,
Tuple,
Any,
TypeVar,
Type,
List)
def check_type(obj, candidate_type, reltype='invariant') -> bool:
if reltype not in ['in... | Python | 0 |
c47dc4004a12010e32c16fbabb64fb682eee16cb | Define parseArgs | gsm.py | gsm.py | import sys
from os import path
from subprocess import call
import json
from pprint import pprint
" Terminal Colors "
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'... | import sys
from os import path
from subprocess import call
import json
from pprint import pprint
" Terminal Colors "
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'... | Python | 0.998561 |
045256f13ed1bfc3e9cca6897548760145101ff0 | simplify test executor | iatidataquality/test_queue.py | iatidataquality/test_queue.py |
import sys, os, json, ckan, urllib2
from datetime import date, datetime
import models, dqprocessing, dqparsetests, \
dqfunctions, queue
import dqprocessing
from lxml import etree
from iatidataquality import db
# FIXME: this should be in config
download_queue='iati_tests_queue'
def aggregate_results(runtime, pac... |
import sys, os, json, ckan, urllib2
from datetime import date, datetime
import models, dqprocessing, dqparsetests, \
dqfunctions, queue
import dqprocessing
from lxml import etree
from iatidataquality import db
# FIXME: this should be in config
download_queue='iati_tests_queue'
def aggregate_results(runtime, pac... | Python | 0.00182 |
5b8725caecd01ccb4d0d3e0c40b910cbdf19258b | Fix country form input | spotify_country_top_n.py | spotify_country_top_n.py | import requests
import webbrowser
import json
import urllib.request
import urllib.parse
import re
token = "Bearer " + input("OAuth Token: ") #BQDWxOubOFzx8fjeDi9E3Npt_fd9GiGXVgdiC3tS9LWHgajM3dRe2w3DjVVtjv0ZgHZAKt6zw2cD9PEBcLf-TFxtpOnb89THvPNMH-gbAO9Ho_8eSchxzO7JdaQ1Rg6eLBmzGIPjUp-5NM9Umpk62uKuAwPw7kSB0fb_B1uYdR... | import requests
import webbrowser
import json
import urllib.request
import urllib.parse
import re
token = "Bearer " + input("OAuth Token: ") #BQDWxOubOFzx8fjeDi9E3Npt_fd9GiGXVgdiC3tS9LWHgajM3dRe2w3DjVVtjv0ZgHZAKt6zw2cD9PEBcLf-TFxtpOnb89THvPNMH-gbAO9Ho_8eSchxzO7JdaQ1Rg6eLBmzGIPjUp-5NM9Umpk62uKuAwPw7kSB0fb_B1uYdR... | Python | 0.999745 |
3168e8b43e77a10c54a57345d2c06f9f4e4800c7 | Allow Parameters to set defaults for TemplateResource | heat/engine/resources/template_resource.py | heat/engine/resources/template_resource.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | Python | 0.000037 |
195f0d5eec3d69ae6ffb1a52d151ad72fcb027a6 | Shorten the may_fail_with_warning GM comparison list | slave/skia_slave_scripts/compare_gms.py | slave/skia_slave_scripts/compare_gms.py | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Compare the generated GM images to the baselines """
# System-level imports
import os
import sys
from build_step import Build... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Compare the generated GM images to the baselines """
# System-level imports
import os
import sys
from build_step import Build... | Python | 0.999966 |
3bbd08d9c9c1397fc03c6ff05f0d8e400eccc960 | Use ColorMode enum in unifiled (#70548) | homeassistant/components/unifiled/light.py | homeassistant/components/unifiled/light.py | """Support for Unifi Led lights."""
from __future__ import annotations
import logging
from unifiled import unifiled
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
ColorMode,
LightEntity,
)
from homeassistant.const import CONF_HOST, CONF_PASSWOR... | """Support for Unifi Led lights."""
from __future__ import annotations
import logging
from unifiled import unifiled
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
PLATFORM_SCHEMA,
LightEntity,
)
from homeassistant.const import CONF_HOST, ... | Python | 0 |
74b41eb7c2953a5dbb8146730da18d562aad9d3e | fix hdx tests | hdx_exports/tests/test_hdx_export_set.py | hdx_exports/tests/test_hdx_export_set.py | # -*- coding: utf-8 -*-
import json
import unittest
from hdx_exports.hdx_export_set import HDXExportSet
from feature_selection.feature_selection import FeatureSelection
from django.contrib.gis.geos import GEOSGeometry
from hdx.data.hdxobject import HDXError
DAKAR_GEOJSON_POLYGON = json.dumps({
"type": "Polyg... | # -*- coding: utf-8 -*-
import json
import unittest
from hdx_exports.hdx_export_set import HDXExportSet
from feature_selection.feature_selection import FeatureSelection
from django.contrib.gis.geos import GEOSGeometry
from hdx.data.hdxobject import HDXError
DAKAR_GEOJSON_POLYGON = json.dumps({
"type": "Polyg... | Python | 0.000001 |
8b5828d88cca103a86eeb9cd243b1be311353f9f | Fix bug in constructing the base search url in sadmin | selvbetjening/sadmin2/views/generic.py | selvbetjening/sadmin2/views/generic.py | from django.contrib import messages
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.http.response import HttpResponseRedirect
from django.shortcuts import render
from django.conf import settings
from selvbetjening.sadmin2.decorators import sadmin_prerequisites
from selvbetjening.sa... | from django.contrib import messages
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.http.response import HttpResponseRedirect
from django.shortcuts import render
from django.conf import settings
from selvbetjening.sadmin2.decorators import sadmin_prerequisites
from selvbetjening.sa... | Python | 0.000001 |
18f9017b7eb627e1b56096f16bad02095cfbfa53 | Return appropriate JSON when CSRF token fails | alexandria/views/user.py | alexandria/views/user.py | import logging
log = logging.getLogger(__name__)
from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.exceptions import BadCSRFToken
from pyramid.httpexceptions import (
HTTPSeeOther,
HTTPNotFound,
HTTPUnprocessableEntity,
HTTPBadRequest,
... | import logging
log = logging.getLogger(__name__)
from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.exceptions import BadCSRFToken
from pyramid.httpexceptions import (
HTTPSeeOther,
HTTPNotFound,
HTTPUnprocessableEntity,
HTTPBadRequest,
... | Python | 0.000067 |
bfb4a1c3b2363d0c1288ae201567840583dbb8a1 | Add lat/lng to cafe and roaster models. | pdxroasters/roaster/models.py | pdxroasters/roaster/models.py | import re
from django.db import models
from django.template.defaultfilters import slugify
def format_phone_number(phone):
phone = re.sub('[^\w]', '', phone)
if (len(phone) == 10):
return '(%s) %s-%s' % (phone[:3], phone[3:6], phone[6:10])
else:
return ''
class Cafe(models.Model):
name... | import re
from django.db import models
from django.template.defaultfilters import slugify
def format_phone_number(phone):
phone = re.sub('[^\w]', '', phone)
if (len(phone) == 10):
return '(%s) %s-%s' % (phone[:3], phone[3:6], phone[6:10])
else:
return ''
class Cafe(models.Model):
name... | Python | 0 |
a1052c02a11539d34a7c12c7a86d103c2b445b52 | Fix and improve BRIEF example | doc/examples/plot_brief.py | doc/examples/plot_brief.py | """
=======================
BRIEF binary descriptor
=======================
This example demonstrates the BRIEF binary description algorithm.
The descriptor consists of relatively few bits and can be computed using
a set of intensity difference tests. The short binary descriptor results
in low memory footprint and ve... | """
=======================
BRIEF binary descriptor
=======================
This example demonstrates the BRIEF binary description algorithm.
The descriptor consists of relatively few bits and can be computed using
a set of intensity difference tests. The short binary descriptor results
in low memory footprint and ve... | Python | 0.000002 |
284befadcfd3e4785067d827c67958d01b80d4a2 | fix method name (underscore prefix) | perfrunner/tests/rebalance.py | perfrunner/tests/rebalance.py | import time
from perfrunner.tests import PerfTest
from multiprocessing import Event
def with_delay(method):
def wrapper(self, *args, **kwargs):
time.sleep(self.rebalance_settings.start_after)
method(self, *args, **kwargs)
time.sleep(self.rebalance_settings.stop_after)
self.shutdo... | import time
from perfrunner.tests import PerfTest
from multiprocessing import Event
def with_delay(method):
def wrapper(self, *args, **kwargs):
time.sleep(self.rebalance_settings.start_after)
method(self, *args, **kwargs)
time.sleep(self.rebalance_settings.stop_after)
self.shutdo... | Python | 0.000001 |
f12904db6c83f4914018e385edce0d1757e030fc | Add memory quota for r4.8xlarge instances | perfrunner/utils/templater.py | perfrunner/utils/templater.py | from argparse import ArgumentParser
import yaml
from jinja2 import Environment, FileSystemLoader, Template
from logger import logger
from perfrunner.utils.cloudrunner import CloudRunner
MEMORY_QUOTAS = {
'm4.2xlarge': 26624, # 32GB RAM
'm4.4xlarge': 56320, # 64GB RAM
'r4.2xlarge': 54272, # 61GB RAM... | from argparse import ArgumentParser
import yaml
from jinja2 import Environment, FileSystemLoader, Template
from logger import logger
from perfrunner.utils.cloudrunner import CloudRunner
MEMORY_QUOTAS = {
'm4.2xlarge': 26624, # 32GB RAM
'm4.4xlarge': 56320, # 64GB RAM
'r4.2xlarge': 54272, # 61GB RAM... | Python | 0 |
d42bc1bb41ef443104e6a5853e6d75fbbb0d7a4a | add debug mesg `instance in instance list` | clustercron/elb.py | clustercron/elb.py | # clustercron/elb.py
# vim: ts=4 et sw=4 sts=4 ft=python fenc=UTF-8 ai
# -*- coding: utf-8 -*-
'''
clustercron.elb
---------------
'''
from __future__ import unicode_literals
import logging
import socket
import boto.ec2.elb
from .compat import PY3
if PY3:
from urllib.request import Request
from urllib.requ... | # clustercron/elb.py
# vim: ts=4 et sw=4 sts=4 ft=python fenc=UTF-8 ai
# -*- coding: utf-8 -*-
'''
clustercron.elb
---------------
'''
from __future__ import unicode_literals
import logging
import socket
import boto.ec2.elb
from .compat import PY3
if PY3:
from urllib.request import Request
from urllib.requ... | Python | 0 |
624745fbb311877f5b2251cf3eefe0cc15b5cca2 | add some code for document | pagrant/commands/test.py | pagrant/commands/test.py | #!/usr/bin/python
#coding:utf8
__author__ = ['markshao']
import os
from optparse import Option
from nose import main
from pagrant.basecommand import Command
from pagrant.commands.init import PAGRANT_CONFIG_FILE_NAME
from pagrant.environment import Environment
from pagrant.exceptions import PagrantConfigError, TestE... | #!/usr/bin/python
#coding:utf8
__author__ = ['markshao']
import os
from optparse import Option
from nose import main
from pagrant.basecommand import Command
from pagrant.commands.init import PAGRANT_CONFIG_FILE_NAME
from pagrant.environment import Environment
from pagrant.exceptions import PagrantConfigError, TestE... | Python | 0.000002 |
3f147f229692329181da14217d095556fd5d2f92 | move post-mortem and profile back to the pairsamtools base | pairsamtools/__init__.py | pairsamtools/__init__.py | # -*- coding: utf-8 -*-
"""
pairsamtools
~~~~~~~~~~~~
CLI tools to process mapped Hi-C data
:copyright: (c) 2017 Massachusetts Institute of Technology
:author: Mirny Lab
:license: MIT
"""
__version__ = '0.0.1-dev'
import click
import functools
import sys
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--he... | # -*- coding: utf-8 -*-
"""
pairsamtools
~~~~~~~~~~~~
CLI tools to process mapped Hi-C data
:copyright: (c) 2017 Massachusetts Institute of Technology
:author: Mirny Lab
:license: MIT
"""
__version__ = '0.0.1-dev'
import click
import functools
import sys
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--he... | Python | 0 |
298163b0e765de364fe1f9eef2c1cc783f3c7404 | Add FloatArgument | pale/arguments/number.py | pale/arguments/number.py | from pale.errors.validation import ArgumentError
from .base import BaseArgument
class IntegerArgument(BaseArgument):
value_type = 'integer'
allowed_types = (int, long)
min_value = None
max_value = None
def validate(self, item, item_name):
if item is None:
item = self.default
... | from pale.errors.validation import ArgumentError
from .base import BaseArgument
class IntegerArgument(BaseArgument):
value_type = 'integer'
allowed_types = (int, long)
min_value = None
max_value = None
def validate(self, item, item_name):
if item is None:
item = self.default
... | Python | 0.000001 |
f3517847990f2007956c319a7784dbfc2d73b91a | Remove formatting | ellipsis.py | ellipsis.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
cwd = os.getcwd()
home = os.getenv('HOME')
devnull = open(os.devnull, 'w')
def find_svn_root(path):
try:
svn_cmd = ['/usr/bin/svn', 'info']
svn_info = subprocess.check_output(svn_cmd, stderr=devnull).decode()
... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
cwd = os.getcwd()
home = os.getenv('HOME')
devnull = open(os.devnull, 'w')
def find_svn_root(path):
try:
svn_cmd = ['/usr/bin/svn', 'info']
svn_info = subprocess.check_output(svn_cmd, stderr=devnull).decode()
... | Python | 0.000035 |
fa40dfcca214011b85c8bf081bc55b4f534acf24 | Fix cors 'l's | jal_stats/jal_stats/settings.py | jal_stats/jal_stats/settings.py | """
Django settings for jal_stats project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pa... | """
Django settings for jal_stats project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pa... | Python | 0.000128 |
c9ed81608ea6d017dbe23e012d0e137c1ce9ef10 | remove eddy from test | neurodocker/interfaces/tests/test_fsl.py | neurodocker/interfaces/tests/test_fsl.py | """Tests for neurodocker.interfaces.FSL"""
from neurodocker.interfaces.tests import utils
class TestFSL(object):
def test_docker(self):
specs = {
'pkg_manager': 'yum',
'instructions': [
('base', 'centos:7'),
('fsl', {'version': '5.0.11'}),
... | """Tests for neurodocker.interfaces.FSL"""
from neurodocker.interfaces.tests import utils
class TestFSL(object):
def test_docker(self):
specs = {
'pkg_manager': 'yum',
'instructions': [
('base', 'centos:7'),
('fsl', {'version': '5.0.10', 'eddy_5011... | Python | 0.000003 |
0a98e91d5b30e5282ad90cfedcf0162ce290a0e9 | fix many replace player_config | flowplayer/templatetags/flowplayer_tags.py | flowplayer/templatetags/flowplayer_tags.py | from django.conf import settings
from django.db.models.query import QuerySet
from django.template import Node, TemplateSyntaxError
from django.template import Library, Variable, loader, Context
# ID of current flowplayer being rendered (global to ensure unique)
FLOWPLAYER_ITERATOR = 0
register = Library()
class Flo... | from django.conf import settings
from django.db.models.query import QuerySet
from django.template import Node, TemplateSyntaxError
from django.template import Library, Variable, loader, Context
# ID of current flowplayer being rendered (global to ensure unique)
FLOWPLAYER_ITERATOR = 0
register = Library()
class Flo... | Python | 0.000001 |
3355ca79a507254e5b3e7149070ae263afc6f292 | Bump up number of active runs to 20k. | tracker/src/main/workflows/filter-variants-workflow/filter-variants-workflow.py | tracker/src/main/workflows/filter-variants-workflow/filter-variants-workflow.py | from airflow import DAG
from airflow.operators import BashOperator, PythonOperator
from datetime import datetime, timedelta
import os
import logging
from subprocess import call
import tracker.model
from tracker.model.analysis_run import *
from tracker.util.workflow_common import *
def filter_variants(**kwargs):
... | from airflow import DAG
from airflow.operators import BashOperator, PythonOperator
from datetime import datetime, timedelta
import os
import logging
from subprocess import call
import tracker.model
from tracker.model.analysis_run import *
from tracker.util.workflow_common import *
def filter_variants(**kwargs):
... | Python | 0 |
d6b361411b4414e5841652b513ef42b13f34169e | Test for high overlap | fmriprep/workflows/bold/tests/test_util.py | fmriprep/workflows/bold/tests/test_util.py | ''' Testing module for fmriprep.workflows.bold.util '''
import pytest
import os
import numpy as np
from nipype.utils.filemanip import fname_presuffix
from nilearn.image import load_img
from ..util import init_bold_reference_wf
def symmetric_overlap(img1, img2):
mask1 = load_img(img1).get_data() > 0
mask2 = l... | ''' Testing module for fmriprep.workflows.bold.util '''
import pytest
import os
import numpy as np
from nipype.utils.filemanip import fname_presuffix
from nilearn.image import load_img
from ..util import init_bold_reference_wf
def symmetric_overlap(img1, img2):
mask1 = load_img(img1).get_data() > 0
mask2 = l... | Python | 0 |
4824b929bfa7a18a9f7796a9b93ad17909feeb56 | Switch parameter has been added. | lib/opentuner/streamjit/sjparameters.py | lib/opentuner/streamjit/sjparameters.py | import deps #fix sys.path
import opentuner
from opentuner.search.manipulator import (IntegerParameter,
FloatParameter, SwitchParameter)
class sjIntegerParameter(IntegerParameter):
def __init__(self, name, min, max,value, javaClassPath = None, **kwargs):
self.value = value
... | import deps #fix sys.path
import opentuner
from opentuner.search.manipulator import (IntegerParameter,
FloatParameter)
class sjIntegerParameter(IntegerParameter):
def __init__(self, name, min, max,value, javaClassPath = None, **kwargs):
self.value = value
self.javaClassPa... | Python | 0 |
531dcc85b3579712ab5576a50e7dd10457444fb4 | remove old class definitions | ecmwf_models/__init__.py | ecmwf_models/__init__.py | import pkg_resources
try:
__version__ = pkg_resources.get_distribution(__name__).version
except:
__version__ = 'unknown'
| import pkg_resources
try:
__version__ = pkg_resources.get_distribution(__name__).version
except:
__version__ = 'unknown'
from ecmwf_models.interface import ERAInterimImg
from ecmwf_models.interface import ERAInterimDs
| Python | 0.999965 |
977cf58125a204010197c95827457843503e2c5b | Disable BSF Campus for RCA Alliance Française | ideascube/conf/kb_rca_alliancefrancaise.py | ideascube/conf/kb_rca_alliancefrancaise.py | # -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'fr'
IDEASCUBE_NAME = 'Alliance française de Bangui'
# Disable BSF Campus for now
HOME_CARDS = [card for card in HOME_CARDS if card['id'] != 'bsfcampus']
| # -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'fr'
IDEASCUBE_NAME = 'Alliance française de Bangui'
| Python | 0 |
5ba36cb51fc2d93dd05430c3f5a0d24262b32985 | Remove unnecessary type change | common/gradient.py | common/gradient.py | # coding: utf-8
import numpy as np
def _numerical_gradient_1d(f, x):
h = 1e-4 # 0.0001
grad = np.zeros_like(x)
for idx in range(x.size):
tmp_val = x[idx]
x[idx] = float(tmp_val) + h
fxh1 = f(x) # f(x+h)
x[idx] = tmp_val - h
fxh2 = f(x) # f(x-h)
... | # coding: utf-8
import numpy as np
def _numerical_gradient_1d(f, x):
h = 1e-4 # 0.0001
grad = np.zeros_like(x)
for idx in range(x.size):
tmp_val = x[idx]
x[idx] = float(tmp_val) + h
fxh1 = f(x) # f(x+h)
x[idx] = tmp_val - h
fxh2 = f(x) # f(x-h)
... | Python | 0.000003 |
ab42cc26e8a994974cb5beb1550715e6f838d7cb | fix file outputting | BUN/bunpack.py | BUN/bunpack.py | #!/usr/bin/env python
import struct, sys
from PIL import Image
u8 = struct.Struct('<B')
def convert_palette(pal):
result = []
s = struct.Struct('<BBB')
for i in range(len(pal) // 3):
result.append(s.unpack_from(pal, i * 3))
return result
def extract_image(data, offset, pal):
width = u8.unpack_from(data, of... | #!/usr/bin/env python
import struct, sys
from PIL import Image
u8 = struct.Struct('<B')
def convert_palette(pal):
result = []
s = struct.Struct('<BBB')
for i in range(len(pal) // 3):
result.append(s.unpack_from(pal, i * 3))
return result
def extract_image(data, offset, pal):
width = u8.unpack_from(data, of... | Python | 0.000003 |
d5cb8ea39236f52f3ee9d2f9f8485dc5f737a5bb | Send a message every few minutes to keep Travis happy | allTests.py | allTests.py | #!/usr/bin/env python
#Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com)
#
#Released under the MIT license, see LICENSE.txt
import unittest
import os
from threading import Thread
import time
from cactus.setup.cactus_setupTest import TestCase as setupTest
from cactus.blast.cactus_blastTest import TestCase... | #!/usr/bin/env python
#Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com)
#
#Released under the MIT license, see LICENSE.txt
import unittest
import os
from cactus.setup.cactus_setupTest import TestCase as setupTest
from cactus.blast.cactus_blastTest import TestCase as blastTest
from cactus.pipeline.cactus... | Python | 0 |
a94bbac73a40f85e0239bbab72c0ffce5258f707 | Update test_geocoding.py | _unittests/ut_data/test_geocoding.py | _unittests/ut_data/test_geocoding.py | # -*- coding: utf-8 -*-
"""
@brief test log(time=16s)
"""
import os
import unittest
import warnings
import pandas
from pyquickhelper.loghelper import fLOG, get_password
from pyquickhelper.pycode import (
add_missing_development_version, get_temp_folder, is_travis_or_appveyor,
ExtTestCase)
class TestGeoco... | # -*- coding: utf-8 -*-
"""
@brief test log(time=16s)
"""
import os
import unittest
import warnings
import pandas
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import add_missing_development_version, get_temp_folder, is_travis_or_appveyor, ExtTestCase
class TestGeocoding(ExtTestCase):
d... | Python | 0.000001 |
3a29127f6d11c06c4cdba7c9e41ff64b0204830e | Update to 0.8.4 version | spec_cleaner/__init__.py | spec_cleaner/__init__.py | # vim: set ts=4 sw=4 et: coding=UTF-8
# Copyright (c) 2015, SUSE LINUX Products GmbH, Nuernberg, Germany
# All rights reserved.
# See COPYING for details.
import os
import sys
import argparse
from .rpmexception import RpmWrongArgs, RpmException
from .rpmcleaner import RpmSpecCleaner
__version__ = '0.8.4'
def pro... | # vim: set ts=4 sw=4 et: coding=UTF-8
# Copyright (c) 2015, SUSE LINUX Products GmbH, Nuernberg, Germany
# All rights reserved.
# See COPYING for details.
import os
import sys
import argparse
from .rpmexception import RpmWrongArgs, RpmException
from .rpmcleaner import RpmSpecCleaner
__version__ = '0.8.3'
def pro... | Python | 0 |
3449961b6d2fbfaaa44c773ef3a60b3d6386d00a | Add strain energy | peripydic/problem/dic.py | peripydic/problem/dic.py | # -*- coding: utf-8 -*-
#@author: ilyass.tabiai@polymtl.ca
#@author: rolland.delorme@polymtl.ca
#@author: patrick.diehl@polymtl.ca
from ..util import neighbor
import numpy as np
## Copmutes extension and force states out of displacement/nodes data obtained
# from the VIC3D CSV (DIC data)
class DIC_problem():
## ... | # -*- coding: utf-8 -*-
#@author: ilyass.tabiai@polymtl.ca
#@author: rolland.delorme@polymtl.ca
#@author: patrick.diehl@polymtl.ca
from ..util import neighbor
import numpy as np
## Copmutes extension and force states out of displacement/nodes data obtained
# from the VIC3D CSV (DIC data)
class DIC_problem():
## ... | Python | 0.000007 |
9485b8d16bc41f20de0dbce0c4bc253d6dcca206 | Fix file size type in EditingRevisionFileSchema | indico/modules/events/editing/schemas.py | indico/modules/events/editing/schemas.py | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from markupsafe import escape
from marshmallow import fields, pos... | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from markupsafe import escape
from marshmallow import fields, pos... | Python | 0.000001 |
7955a13caae162730429d8792ea1d4d48398e548 | change permissions on __main__.py | pimat_server/__main__.py | pimat_server/__main__.py | #!/usr/bin/python
import datetime
import logging
import signal
import sys
import time
import Adafruit_DHT
import RPi.GPIO as GPIO
import configparser
from scheduler import add_schedule, remove_all
from relays import Relays
GPIO.setmode(GPIO.BCM)
# define the pin that goes to the circuit
pin_to_circuit = 27
dht_pin =... | #!/usr/bin/python
import datetime
import logging
import signal
import sys
import time
import Adafruit_DHT
import RPi.GPIO as GPIO
import configparser
from scheduler import add_schedule, remove_all
from relays import Relays
GPIO.setmode(GPIO.BCM)
# define the pin that goes to the circuit
pin_to_circuit = 27
dht_pin =... | Python | 0.000022 |
82acbc312b36bfdf4e1a0a1c26019d2c5879e036 | Fix context processor settings to support Django 1.7 | nodeconductor/server/admin/settings.py | nodeconductor/server/admin/settings.py | ADMIN_INSTALLED_APPS = (
'fluent_dashboard',
'admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.admin',
)
# FIXME: Move generic (not related to admin) context processors to base_settings
# Note: replace 'django.core.context_processors' with 'djang... | ADMIN_INSTALLED_APPS = (
'fluent_dashboard',
'admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.admin',
)
# FIXME: Move generic (not related to admin) context processors to base_settings
ADMIN_TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.au... | Python | 0.000004 |
73b8a715aceec43cb80724d1e076a05ff7aaf71d | Define commits_average property | app/models.py | app/models.py | from datetime import datetime
from app import slack, redis, app
from app.redis import RedisModel
class Channel(RedisModel):
__prefix__ = '#'
@staticmethod
def load_from_slack():
"""Update channel list from slack"""
slack_response = slack.channels.list()
if not slack_response.succ... | from datetime import datetime
from app import slack, redis, app
from app.redis import RedisModel
class Channel(RedisModel):
__prefix__ = '#'
@staticmethod
def load_from_slack():
"""Update channel list from slack"""
slack_response = slack.channels.list()
if not slack_response.succ... | Python | 0.00029 |
f8239afefa436b9da5e01416cdc5dcadd058a51f | Update models | app/models.py | app/models.py | import datetime
import jwt
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from flask import current_app
from app import db
class User(UserMixin, db.Model):
"""This class represents the user table."""
__tablename__ = 'users'
id = db.Column(db.... | from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from app import db
class User(UserMixin, db.Model):
"""This class represents the user table."""
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.Str... | Python | 0 |
a0e65ec74447984b97afa7a3405199eebd49269a | Add DB calls | api/mastercoin_verify.py | api/mastercoin_verify.py | import os
import glob
import re
from flask import Flask, request, jsonify, abort, json
import psycopg2, psycopg2.extras
import msc_apps
sqlconn = msc_apps.sql_connect()
data_dir_root = os.environ.get('DATADIR')
app = Flask(__name__)
app.debug = True
@app.route('/properties')
def properties():
prop_glob = glob.glob... | import os
import glob
import re
from flask import Flask, request, jsonify, abort, json
data_dir_root = os.environ.get('DATADIR')
app = Flask(__name__)
app.debug = True
@app.route('/properties')
def properties():
prop_glob = glob.glob(data_dir_root + '/properties/*.json')
response = []
for property_file in pro... | Python | 0.000001 |
23865e7155974dbc9a9be3d9e6c51ed7b96200ea | add next to profile form | poweredsites/forms/profile.py | poweredsites/forms/profile.py | # -*- coding: utf-8 -*-
#
# Copyright(c) 2010 poweredsites.org
#
# 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... | # -*- coding: utf-8 -*-
#
# Copyright(c) 2010 poweredsites.org
#
# 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... | Python | 0 |
2ac4385cffe2d999273f592778f7a4fd51e97672 | Specifiy what capacity to use if it is not a number. SPOT-2226 | spacescout_web/org_filters/uw_search.py | spacescout_web/org_filters/uw_search.py | from spacescout_web.org_filters import SearchFilter
class Filter(SearchFilter):
def url_args(self, args):
search_args = []
if self.request.path != u'/':
request_parts = self.request.path.split('/')
campus = request_parts[1]
if len(request_parts) > 2:
... | from spacescout_web.org_filters import SearchFilter
class Filter(SearchFilter):
def url_args(self, args):
search_args = []
if self.request.path != u'/':
request_parts = self.request.path.split('/')
campus = request_parts[1]
if len(request_parts) > 2:
... | Python | 0.999993 |
c22d4f5aa412b6aa624212bf5728c94fbef5d375 | Modify attributes for Bucketlist Model, Modify relationship between User model and Bucketlist Model | app/models.py | app/models.py | from datetime import datetime
from passlib.apps import custom_app_context as pwd_context
from app import db
class User(db.Model):
"""This class represents the users database table."""
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(255), unique=Tru... | from datetime import datetime
from passlib.apps import custom_app_context as pwd_context
from app import db
class User(db.Model):
"""This class represents the users database table."""
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(255), unique=Tru... | Python | 0 |
4ceb0b3cb2b952a491b4173313559c7b4bc06c2b | Update __init__.py | editorsnotes/__init__.py | editorsnotes/__init__.py | __version__ = '0.2.1'
VERSION = __version__
| __version__ = '2.0.1'
VERSION = __version__
| Python | 0.000072 |
10f5bd8a80bb949371611d271380ecd041a950b6 | Configure for github pages | doc/conf.py | doc/conf.py | # -*- coding: utf-8 -*-
# Copyright (c) 2010, 2011, 2012, Sebastian Wiesner <lunaryorn@googlemail.com>
# 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 reta... | # -*- coding: utf-8 -*-
# Copyright (c) 2010, 2011, Sebastian Wiesner <lunaryorn@googlemail.com>
# 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... | Python | 0.000001 |
053785b92dc925b27ba036a2b560ab509180fd1e | Add Lowdown to Sphinx extensions load list. | doc/conf.py | doc/conf.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
'''Lucidity documentation build configuration file'''
import os
import re
# -- General ------------------------------------------------------------------
# Extensions
extensions = [
'sphinx.ext.autodoc',
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
'''Lucidity documentation build configuration file'''
import os
import re
# -- General ------------------------------------------------------------------
# Extensions
extensions = [
'sphinx.ext.autodoc',
... | Python | 0 |
2d8644d5cc0085db4615de6bfabdd024a6a19469 | fix demo issue | comb/demo/redis.py | comb/demo/redis.py | # -*- coding: utf-8 -*-
import comb.slot
import comb.mq.redis as RedisHelper
import redis
class Slot(comb.slot.Slot):
def initialize(self):
"""
This block is execute before thread initial
Example::
class UserSlot(Slot):
def initialize(self,*args,**kwargs):
... | # -*- coding: utf-8 -*-
import comb.slot
import comb.mq.redis as RedisHelper
import redis
class Slot(comb.slot.Slot):
def initialize(self):
"""
This block is execute before thread initial
Example::
class UserSlot(Slot):
def initialize(self,*args,**kwargs):
... | Python | 0 |
379ae8c6dc026ff33d28b4df00e5d435fc4fc85a | FIX depends | account_invoice_control/__openerp__.py | account_invoice_control/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | Python | 0.000001 |
889159bf9f8d8a067ad0e7c740b68f73da83ef6c | test some floats too. | activitysim/abm/test/test_skims.py | activitysim/abm/test/test_skims.py | from collections import OrderedDict
from future.utils import iteritems
import numpy as np
import pytest
from activitysim.abm.tables import skims
@pytest.fixture(scope="session")
def matrix_dimension():
return 5922
@pytest.fixture(scope="session")
def num_of_matrices():
return 845
@pytest.fixture(scope="... | from collections import OrderedDict
from future.utils import iteritems
import numpy as np
import pytest
from activitysim.abm.tables import skims
@pytest.fixture(scope="session")
def matrix_dimension():
return 5922
@pytest.fixture(scope="session")
def num_of_matrices():
return 845
@pytest.fixture(scope="... | Python | 0 |
deed03ec5be584061e60c5e0dd9bd24aff6e26de | Allow multiple thresholds | py/desispec/quicklook/qas.py | py/desispec/quicklook/qas.py | from desispec.quicklook import qllogger
from desispec.quicklook import qlexceptions
from enum import Enum
class Severity(Enum):
class MonitoringAlg:
""" Simple base class for monitoring algorithms """
def __init__(self,name,inptype,config,logger=None):
if logger is None:
self.m_log=qllogger... | from desispec.quicklook import qllogger
from desispec.quicklook import qlexceptions
class MonitoringAlg:
""" Simple base class for monitoring algorithms """
def __init__(self,name,inptype,config,logger=None):
if logger is None:
self.m_log=qllogger.QLLogger().getlog(name)
else:
... | Python | 0.000424 |
a1cb660e709c7b7ffe7b0e94d08dc46e6a0b3f6a | Implement event engine | pygame_maker_event_engine.py | pygame_maker_event_engine.py | #!/usr/bin/python -W all
import re
import pygame_maker_event as pygm_event
class PyGameMakerEventEngine(object):
"""
PyGameMakerEventEngine class:
The source and target of game-generated events. Events are queued
before being routed on command to targets that have registered for
ac... | #!/usr/bin/python -W all
import re
import pygame_maker_event as pygm_event
class PyGameMakerEventEngine(object):
"""
PyGameMakerEventEngine class:
The source and target of game-generated events. Events are queued
before being routed on command to targets that have registered for
ac... | Python | 0.000001 |
387e0729ea7c92920f15abcc04eaa52a320447fd | return url for eval. | job.py | job.py | import lib.search.bing_search as bing
import lib.tweet.parseTwitter as twitter
from lib.querygen.tweets2query import QueryGenerator
import lib.summarization.tagdef as tagdef
from lib.summarization import extractor
import string
import logging
logging.basicConfig(level=logging.INFO)
logger = logging
def main():
i... | import lib.search.bing_search as bing
import lib.tweet.parseTwitter as twitter
from lib.querygen.tweets2query import QueryGenerator
import lib.summarization.tagdef as tagdef
from lib.summarization import extractor
import string
import logging
logging.basicConfig(level=logging.INFO)
logger = logging
def main():
i... | Python | 0.000001 |
e4649b40ee5ba1bb9c7d43acb4e599b210f9dd4a | Rename test and function to a more appropriate ones. | php4dvd/test_deletefilm.py | php4dvd/test_deletefilm.py | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import unittest
class DeleteFilm(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
self.base_url = "http://hub.wart.ru/"... | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import unittest
class AddFilm(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
self.base_url = "http://hub.wart.ru/"
... | Python | 0 |
4644a70f20901f221fe307adc94d7cfb9059649a | Bump version | pytablereader/__version__.py | pytablereader/__version__.py | # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.23.1"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.23.0"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.