commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
d9a9cb9004ddc20d92441df50d3a0f73432803bb | Remove import only used for debugging | scripts/mvf_read_benchmark.py | scripts/mvf_read_benchmark.py | #!/usr/bin/env python
from __future__ import print_function, division, absolute_import
from builtins import range
import argparse
import logging
import time
import dask
import katdal
from katdal.lazy_indexer import DaskLazyIndexer
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('filename')... | Python | 0 | @@ -154,20 +154,8 @@
time
-%0Aimport dask
%0A%0Aim
|
cd4078dd7c23e4c2b8bdd985cf0d65b642d5ab75 | Remove unnessecary prints | blox/compile.py | blox/compile.py | '''blox/compile.py
Creates an optimized programattically generated template from an html file
Copyright (C) 2015 Timothy Edmund Crosley
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 r... | Python | 0.000002 | @@ -2132,32 +2132,8 @@
'):%0A
- print(node.tag)%0A
@@ -3089,61 +3089,8 @@
de:%0A
- print(node.tag + %22 %3E %22 + child_node.tag)%0A
|
3a3332074c6e753ee6a52d1952a5a45f73e85b20 | Fix instant test on Mac: use cgi.parse_qs() instead of urlparse.urlparse() | chrome/test/functional/instant.py | chrome/test/functional/instant.py | #!/usr/bin/python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import pyauto_functional # Must be imported before pyauto
import pyauto
import urlparse
class InstantTest(pyauto.PyUITes... | Python | 0.999627 | @@ -179,16 +179,27 @@
file.%0A%0A
+import cgi%0A
import o
@@ -278,24 +278,8 @@
uto%0A
-import urlparse%0A
%0A%0Acl
@@ -1025,16 +1025,11 @@
q =
-urlparse
+cgi
.par
|
8f148a6c41480792ea517eb7ba650e111a31bb34 | use already condtructed tender | src/openprocurement/api/traversal.py | src/openprocurement/api/traversal.py | # -*- coding: utf-8 -*-
from openprocurement.api.models import Tender
from pyramid.security import (
ALL_PERMISSIONS,
Allow,
Deny,
Everyone,
)
from openprocurement.api.utils import error_handler
class Root(object):
__name__ = None
__parent__ = None
__acl__ = [
# (Allow, Everyone, ... | Python | 0 | @@ -2108,60 +2108,23 @@
r =
-Tender.load(root.db, request.matchdict%5B'tender_id'%5D)
+request._tender
%0A
@@ -2275,24 +2275,112 @@
est.errors)%0A
+%0A # temporary check%0A if request.validated%5B'tender_id'%5D != tender.id:%0A 1/0%0A%0A
tender._
|
96539193d7fd88bcee371aec2e52926f0cd033fc | rename test_64bit_PE to test_PE | contrib/devtools/test-security-check.py | contrib/devtools/test-security-check.py | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Test script for security-check.py
'''
import subprocess
import unittest
def write_testcode(filename):... | Python | 0.000014 | @@ -2106,14 +2106,8 @@
est_
-64bit_
PE(s
@@ -2104,32 +2104,32 @@
test_PE(self):%0A
+
source =
@@ -2376,32 +2376,44 @@
h-entropy-va'%5D),
+%0A
(1, executable+
@@ -2588,32 +2588,44 @@
h-entropy-va'%5D),
+%0A
(1, executable+
@@ -2802,16 +2802,28 @@
y-va'%5D),
+%0A
(1,... |
f44ca7d6a8199465035f90be45177d09da64c973 | Update python functions for transforming ASTs to functions/Mongo filters | app/resonant-laboratory/server/querylang.py | app/resonant-laboratory/server/querylang.py | """Utilities for handling query language expressions on the serverside."""
_opfunc = {
'<=': lambda x, y: x <= y,
'<': lambda x, y: x < y,
'>=': lambda x, y: x >= y,
'>': lambda x, y: x > y,
'=': lambda x, y: x == y,
'!=': lambda x, y: x != y
}
def astToFunction(ast):
"""Convert a query ... | Python | 0 | @@ -889,33 +889,47 @@
ld = operands%5B0%5D
+%5B'identifier'%5D
%0A
-
candidat
@@ -1065,32 +1065,46 @@
ld = operands%5B0%5D
+%5B'identifier'%5D
%0A candida
@@ -1243,32 +1243,32 @@
%3E', '=', '!='%5D:%0A
-
field =
@@ -1270,32 +1270,46 @@
ld = operands%5B0%5D
+%5B'identifier'%5D
%0A ... |
873c5e8bf85a8be5a08852134967d29353ed3009 | Swap ndcms for generic T3 string. | examples/simple.py | examples/simple.py | from lobster import cmssw
from lobster.core import *
storage = StorageConfiguration(
output=[
"hdfs:///store/user/matze/test_shuffle_take29",
"file:///hadoop/store/user/matze/test_shuffle_take29",
"root://ndcms.crc.nd.edu//store/user/matze/test_shuffle_take29",
"... | Python | 0.000001 | @@ -247,25 +247,23 @@
t://
-ndcms.crc.nd.edu/
+T3_US_NotreDame
/sto
|
1b3ebcdca591cd0c7ce9aa6966aa2a583bf41090 | raise chunk size if it will cause us to run out of parts, part 2 | lib/python/dxpy/bindings/dxfile_functions.py | lib/python/dxpy/bindings/dxfile_functions.py | '''
Helper Functions
****************
These two functions provide functionality for opening an existing
remote file (read-only) and creating a new remote file (write-only).
Both return a remote file handler that can be treated as a file
descriptor. These two functions are essentially useful aliases for
executing simp... | Python | 0 | @@ -4746,13 +4746,12 @@
ize/
-10000
+9999
)%0A
|
6beff62ef9741cfe5ed0443250f5a93d04d74bca | Create UserCandidate model | packages/grid/backend/grid/api/users/models.py | packages/grid/backend/grid/api/users/models.py | # stdlib
from typing import Optional
from typing import Union
# third party
from nacl.encoding import HexEncoder
from nacl.signing import SigningKey
from pydantic import BaseModel
from pydantic import EmailStr
class BaseUser(BaseModel):
email: Optional[EmailStr]
name: Optional[str]
role: Union[Optional[i... | Python | 0.000002 | @@ -641,32 +641,127 @@
tional%5Bfloat%5D%0A%0A%0A
+class UserCandidate(BaseUser):%0A email: EmailStr%0A status: str = %22pending%22%0A name: str%0A%0A%0A
class User(BaseU
|
58f7f964a5f830c21f5fcb6c2c1ab854df7644eb | Disable translation processes we currently don't use | contrib/devtools/update-translations.py | contrib/devtools/update-translations.py | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | Python | 0 | @@ -6088,32 +6088,112 @@
%0A
+ # disable this for dogecoin because we do manual translations%0A #
if translation_
@@ -6234,32 +6234,33 @@
+#
context.remo
@@ -6797,16 +6797,111 @@
ot()%0A
+ # disable the transifex process as long as we sync with bitcoin, but ke... |
569448e616aff2d5bc2b0d262b24e4122b32bf11 | add sip | robustus/detail/install_ros.py | robustus/detail/install_ros.py |
# =============================================================================
# COPYRIGHT 2013 Brain Corporation.
# License under MIT license (see LICENSE file)
# =============================================================================
import logging
import os
from requirement import RequirementException
impor... | Python | 0.000038 | @@ -1079,16 +1079,45 @@
0.10.24'
+,%0A 'sip'
%5D)%0A%0A
|
40cbe842a7c3d596bbe07d84666d2146e9d0698b | Update or delete max 100 of 300 random domain names. | domains/views.py | domains/views.py | import random
from datetime import datetime
from google.appengine.ext import db
from google.appengine.ext.db import stats
from django.http import HttpResponseRedirect
from ragendja.template import render_to_response
from ragendja.dbutils import get_object_or_404
from domains.models import MAX_NAME_LENGTH, DOMAIN_CH... | Python | 0 | @@ -944,12 +944,14 @@
404(
-Name
+Domain
, ke
@@ -1230,9 +1230,9 @@
tch(
-2
+3
00)%0A
@@ -1337,16 +1337,101 @@
omains:%0A
+ if max(len(updated_domains), len(deleted_domains)) %3E= 100:%0A break%0A
|
1658466215a18504992748f430fe0747a901bd40 | Move ALLOWED_METRIC_SCRAPE_IPS above secret.py import | web3/settings/__init__.py | web3/settings/__init__.py | """
Django settings for web3 project.
Generated by 'django-admin startproject' using Django 1.10.1.
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 os
... | Python | 0 | @@ -1639,16 +1639,48 @@
tbot/%22%0A%0A
+ALLOWED_METRIC_SCRAPE_IPS = %5B%5D%0A%0A
try:%0A
@@ -6264,36 +6264,4 @@
du%22%0A
-%0AALLOWED_METRIC_SCRAPE_IPS = %5B%5D%0A
|
60886a34f0a35088fb4e90caddbff7f905c0a53c | set TEST_TMPDIR inside test directory | build-support/run_dist_test.py | build-support/run_dist_test.py | #!/usr/bin/env python2
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# ... | Python | 0.002721 | @@ -4806,16 +4806,276 @@
+ '/'%0A%0A
+ # Don't pollute /tmp in dist-test setting. If a test crashes, the dist-test slave%0A # will clear up our working directory but won't be able to find and clean up things%0A # left in /tmp.%0A env%5B'TEST_TMPDIR'%5D = os.path.abspath(os.path.join(ROOT, %22test-tmp%22))%0A%0A
... |
7db2f2f9124fd82bbcaf8eabea9ff57306796f58 | Fix relative path to .gitignore and other minor changes. | build/extra_gitignore.py | build/extra_gitignore.py | #!/usr/bin/env python
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All c... | Python | 0.00011 | @@ -797,16 +797,17 @@
%25s%5Cn'%0A%0A
+%0A
def main
@@ -896,17 +896,16 @@
tring =
-(
MODIFY_S
@@ -919,17 +919,16 @@
argv%5B0%5D
-)
%0A gitig
@@ -972,16 +972,19 @@
+ '/../.
+./.
gitignor
@@ -1069,16 +1069,124 @@
lines):%0A
+ # Look for modify_string in the file to ensure we don't append the extra%0A #... |
b0e71834d1119c2b58624d0e9d674e4aa9e70cd6 | add option '--exclude-filenames' | python/generate_sugar_files.py | python/generate_sugar_files.py | #!/usr/bin/env python3
# Copyright (c) 2013, 2015, Ruslan Baratov
# All rights reserved.
import argparse
import os
import re
import sys
wiki = 'https://github.com/ruslo/sugar/wiki/Collecting-sources'
base = os.path.basename(__file__)
def first_is_subdirectory_of_second(subdir_name, dir_name):
subdir_name = subdir... | Python | 0.001368 | @@ -1184,24 +1184,166 @@
ies'%0A )%0A%0A
+ self.parser.add_argument(%0A '--exclude-filenames',%0A type=str,%0A nargs='*',%0A help='Ignore this filenames'%0A )%0A%0A
def make_h
@@ -2968,204 +2968,320 @@
-source_variable = args.var%0A for rootdir, dirlist, filelist in os.... |
e3d195f0e828f135d29bbd3a7f1a1ff748a3ebc7 | Implement expm approximation. | m_layer/m_layer.py | m_layer/m_layer.py | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | Python | 0.000022 | @@ -635,17 +635,16 @@
g=utf-8%0A
-%0A
%22%22%22Code
@@ -1153,15 +1153,45 @@
elf,
- dim_m,
+%0A dim_m,%0A
mat
@@ -1204,16 +1204,31 @@
it=None,
+%0A
with_bi
@@ -1236,16 +1236,73 @@
s=False,
+%0A matrix_squarings_exp=None,%0A
**kwarg
@@ -142... |
948a28d74c2eae3744edec60f9fbd2319873f33f | Remove unnecessary else after returns | dploy/linkcmd.py | dploy/linkcmd.py | """
The logic and workings behind the link sub-commands
"""
import dploy.actions as actions
import dploy.utils as utils
import dploy.error as error
import dploy.main as main
# pylint: disable=too-few-public-methods
class Link(main.AbstractBaseSubCommand):
"""
Concrete class implementation of the link sub-comm... | Python | 0.004957 | @@ -2014,34 +2014,16 @@
False%0A%0A
- else:%0A
@@ -2425,34 +2425,16 @@
False%0A%0A
- else:%0A
|
86429b75bea758627eeef930b604e819089435a7 | fix missing toUpper for location message | yowsup/layers/protocol_media/layer.py | yowsup/layers/protocol_media/layer.py | from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer
from .protocolentities import ImageDownloadableMediaMessageProtocolEntity
from .protocolentities import LocationMediaMessageProtocolEntity
from .protocolentities import VCardMediaMessageProtocolEntity
class YowMediaProtocolLayer(YowProtocolLayer):
... | Python | 0.000013 | @@ -1202,32 +1202,69 @@
lTreeNode(node)%0A
+ self.toUpper(entity)%0A
elif
|
64ed998229c4af8a5c3b0ff19e6afad4e71a9bf4 | Fix typo | src/nodeconductor_saltstack/sharepoint/views.py | src/nodeconductor_saltstack/sharepoint/views.py | from rest_framework import decorators, exceptions, mixins, response, viewsets, status
from rest_framework.status import HTTP_200_OK
from nodeconductor.core.exceptions import IncorrectStateException
from nodeconductor.structure import views as structure_views
from nodeconductor_saltstack.saltstack.views import track_ex... | Python | 0.998143 | @@ -6054,26 +6054,16 @@
ackend =
- backend =
user.te
@@ -8269,17 +8269,16 @@
site.delete()
-%0A
|
d17e25f899255bb361f226a022ace0eaa75a9870 | Remove accidentally left-in opt kwarg | numba/cuda/tests/cudapy/test_optimization.py | numba/cuda/tests/cudapy/test_optimization.py | import numpy as np
from numba.cuda.testing import skip_on_cudasim, CUDATestCase
from numba import cuda, float64
import unittest
def kernel_func(x):
x[0] = 1
def device_func(x, y, z):
return x * y + z
# Fragments of code that are removed from kernel_func's PTX when optimization
# is on
removed_by_opt = ( ... | Python | 0 | @@ -1169,18 +1169,8 @@
jit(
-opt=True)(
kern
|
50a527c435a56d2056765d33de988a7a5f0450f5 | Add s3 transport. | gitbigfile/transport.py | gitbigfile/transport.py | # -*- coding: utf-8 -*-
"""
gitbigfile transport module
This module defines git-bigfile transports.
Each transport should implement the methods defined in the Transport class.
"""
import os
import sys
import errno
import shutil
try:
import paramiko
PARAMIKO = True
except ImportError:
PARAMIKO = False
MAN... | Python | 0.999631 | @@ -411,16 +411,94 @@
'path'%5D
+,%0A 's3': %5B'access-key', 'secret-key-path', 'bucket-name'%5D,
%0A
@@ -3949,16 +3949,1303 @@
self.close()%0A
+%0A%0Aclass S3(Transport):%0A %22%22%22Use boto to save and retrieve files via s3.%22%22%22%0A%0A def __init__(self, **s3_kwargs):%0A ... |
4f42193b460da9c86222ddd689b2645f9a50b6e2 | Update poll-sensors.py | cron/poll-sensors.py | cron/poll-sensors.py | #!/usr/bin/env python
import MySQLdb
import datetime
import urllib2
import os
servername = "localhost"
username = "pi"
password = "password"
dbname = "pi_heating_db"
t = datetime.datetime.now().strftime('%s')
cnx = MySQLdb.connect(host=servername, user=username, passwd=password, db=dbname)
cnx.autocommit(True)
cu... | Python | 0 | @@ -921,81 +921,8 @@
';%22%0A
- sql = %22UPDATE sensors SET value='666' WHERE id='%22+str(sensor_id)+%22';%22
%0A
@@ -936,18 +936,16 @@
sql%0A
-%0A
%0A
|
9cf5ec0f8b56b6fdaef2b2f898f0ae35a642954a | Fix requests.get() in horizon | stellar_base/horizon.py | stellar_base/horizon.py | # coding: utf-8
import requests
import json
try:
from sseclient import SSEClient
except ImportError:
SSEClient = None
try:
# Python 3
from urllib.parse import urlencode
except ImportError:
# Python 2
from urllib import urlencode
def query(url, params=None, sse=False):
if sse is False:
... | Python | 0.000001 | @@ -346,18 +346,23 @@
, params
-,
+=params
)%0A
|
42710dccf4ddbd02f71a62b266c31275097f9274 | ajuste para aceitar arquivo de issns | export/xml_rsps.py | export/xml_rsps.py | # coding: utf-8
"""
Este processamento realiza a exportação de registros SciELO para o formato RSPS
"""
import os
import argparse
import logging
import codecs
import json
import threading
import multiprocessing
from Queue import Queue, Empty
from io import StringIO
import packtools
from packtools.catalogs import XML_... | Python | 0.000001 | @@ -5097,32 +5097,201 @@
spaces'%0A )%0A%0A
+ parser.add_argument(%0A '--issns_file',%0A '-i',%0A default=None,%0A help='Full path to a txt file within a list of ISSNs to be exported'%0A )%0A%0A
parser.add_a
@@ -5924,32 +5924,352 @@
ns(args.issns)%0A%0A
+ issns_from_file ... |
3870248740d83b0292ccca88a494ce19783847f0 | Raise exception if pyspark Gateway process doesn't start. | python/pyspark/java_gateway.py | python/pyspark/java_gateway.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | Python | 0 | @@ -1957,16 +1957,29 @@
in=PIPE,
+ stderr=PIPE,
preexec
@@ -1996,16 +1996,16 @@
c_func)%0A
-
@@ -2117,18 +2117,57 @@
din=PIPE
-)%0A
+, stderr=PIPE)%0A %0A try:%0A
@@ -2222,32 +2222,36 @@
ted on:%0A
+
gateway_port = i
@@ -2277,16 +2277,219 @@
line())%0A
+ ... |
03548610d88cb60fce42b4898aa678f27e1f371a | return http:// with url | fileup.py | fileup.py | #!/usr/bin/env python
# -*-Python-*-
import argparse
import base64
import datetime
import ftplib
import os
import re
import subprocess
import tempfile
def get_valid_filename(s):
"""
Return the given string converted to a string that can be used for a clean
filename. Remove leading and trailing spaces; co... | Python | 0.000947 | @@ -1736,16 +1736,17 @@
date)%0A%0A
+%0A
def main
@@ -2808,17 +2808,16 @@
lder))%0A%0A
-%0A
# Fi
@@ -2918,13 +2918,9 @@
se)%0A
-
%0A
+
@@ -3064,24 +3064,30 @@
there is
+%0A #
already
%0A # a
@@ -3078,22 +3078,16 @@
already
-%0A #
a file
@@ -3251,25 +3251,24 @@
.delete(f)%0A%0A
-%... |
3d4583d69af76cccc3ea32526084857abc808cc5 | Use label in place of name | share/robot.py | share/robot.py | import abc
import json
import random
import string
import datetime
from django.apps import apps
from django.db import migrations
from django.conf import settings
from django.apps import AppConfig
from django.utils import timezone
class RobotAppConfig(AppConfig, metaclass=abc.ABCMeta):
disabled = False
@abc... | Python | 0.000269 | @@ -4516,36 +4516,37 @@
ps(%5Bself.config.
-name
+label
, 1%5D), # Note 1
@@ -4859,20 +4859,21 @@
.config.
-name
+label
, 1%5D),
|
d1098119c442a1254ca3f5c7846978060beb9b1c | Fix bad return in the weak scaling performance plot generation | livvkit/bundles/CISM-glissade/performance.py | livvkit/bundles/CISM-glissade/performance.py | # Copyright (c) 2015, UT-BATTELLE, LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and... | Python | 0.000012 | @@ -2883,34 +2883,24 @@
-return timing_data
+continue
%0A
|
a21cdba4e742890f278c74764554711fb38ef9c1 | Remove busy_downloads method, info is kept in Redis now | bqueryd/util.py | bqueryd/util.py | import netifaces
import zmq
import random
import os
import tempfile
import zipfile
import binascii
import time
import sys
def get_my_ip():
eth_interfaces = sorted([ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')])
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifnam... | Python | 0 | @@ -3264,718 +3264,4 @@
y')%0A
-%0Adef show_busy_downloads(info_data):%0A all_downloads = info_data%5B'downloads'%5D.copy()%0A for x in info_data.get('others', %7B%7D).values():%0A all_downloads.update(x.get('downloads'))%0A for ticket, x in all_downloads.items():%0A print ticket, time.ctime(x%5... |
aa8096c94e0d067eff96d475117c630ffa371cce | Save all data from Lorax | src/py/rpmostreecompose/installer.py | src/py/rpmostreecompose/installer.py | #!/usr/bin/env python
# Copyright (C) 2014 Colin Walters <walters@verbum.org>, Andy Grimm <agrimm@redhat.com>
#
# 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 of the L... | Python | 0 | @@ -1126,22 +1126,16 @@
f create
-_disks
(self, o
@@ -1145,16 +1145,16 @@
utdir):%0A
+
@@ -1415,569 +1415,8 @@
te%0A%0A
- imagestmpdir = os.path.join(self.workdir, 'images')%0A os.mkdir(imagestmpdir)%0A%0A generated = %5B%5D%0A%0A imgtargetinstaller=os.path.join(imagestmpdir, '... |
2f50e7e71b124ae42cab5edb19c030fcc69a4ef5 | Fix failing attribute lookups | saleor/product/models/utils.py | saleor/product/models/utils.py | from django.utils.encoding import smart_text
def get_attributes_display_map(variant, attributes):
print "in get_attributes_display_map with " + str(variant) + " and " + str(attributes)
display = {}
for attribute in attributes:
value = variant.get_attribute(attribute.pk)
if value:
... | Python | 0.000001 | @@ -96,99 +96,8 @@
s):%0A
- print %22in get_attributes_display_map with %22 + str(variant) + %22 and %22 + str(attributes)%0A
|
c296d8221b5785823cb04b462c894fbcb9ede098 | Fix output for single shoe size search | shoeScraper.py | shoeScraper.py | #imports
import sqlite3
import re
import requests
from bs4 import BeautifulSoup as soup
#DECLARE SQL:
conn = sqlite3.connect('shoes_on_ebay.db')
c = conn.cursor()
def create_table():
c.execute("CREATE TABLE IF NOT EXISTS " + SQL_name + " (id TEXT, list_title TEXT, shoe_size REAL, date_sold TEXT, price REAL)")
def d... | Python | 0.998594 | @@ -4591,16 +4591,207 @@
es), 2)%0A
+if (sizeMax == sizeMin):%0A%09#single shoe size%0A%09print(%22The Ebay results for %22 + shoe_search + %22 has an average selling point of $%22 + str(avgPrice) + %22 for size %22 + str(sizeMin))%0A%0Aelse:%0A%09#range%0A%09
print(%22T
|
9aee2f384e6f11d08518757a9afd7af50002cff7 | Swap debug mode | gpbot/gpbot/settings.py | gpbot/gpbot/settings.py | """
Django settings for gpbot project.
Generated by 'django-admin startproject' using Django 1.10.5.
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 os
... | Python | 0.000001 | @@ -795,16 +795,18 @@
uction!%0A
+#
DEBUG =
@@ -810,18 +810,16 @@
= True%0A
-#
DEBUG =
|
a5a52979f87599cc7ef9f951c5b3f3d3487a9261 | Revert "Fixed KeyError in index command" | lily/management/commands/index.py | lily/management/commands/index.py | from optparse import make_option
import time
from django.conf import settings
from django.core.management.base import BaseCommand
from lily.search.analyzers import get_analyzers
from lily.search.connections_utils import get_es_client, get_index_name
from lily.search.indexing import index_objects
from lily.search.scan... | Python | 0 | @@ -4702,25 +4702,17 @@
ions
-.get(
+%5B
'force'
-, '')
+%5D
:%0A
|
6a8fba9bc6bb1108b048947b7ffc10c0904fba14 | Move plugin loading to separate function | foob0t.py | foob0t.py | # Copyright 2017 Christoph Mende
#
# 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... | Python | 0 | @@ -711,25 +711,33 @@
%7B%7D%0A
-username = None%0A%0A
+%0Adef load_plugins():%0A
for
@@ -770,24 +770,28 @@
gins():%0A
+
+
print('Loadi
@@ -819,16 +819,20 @@
'%5D)%0A
+
+
plugin =
@@ -861,16 +861,20 @@
ugin(i)%0A
+
comm
@@ -1978,16 +1978,31 @@
rgv%5B1%5D)%0A
+load_plugins()%0A
us... |
6903779f0d34145af1f13fef7f4e07b605aec3d0 | Update __init__.py | cactusbot/commands/__init__.py | cactusbot/commands/__init__.py | """Handle commands."""
from .command import Command
from .magic import COMMANDS
__all__ = ["Command", "COMMANDS]
| Python | 0.000072 | @@ -106,10 +106,11 @@
COMMANDS
+%22
%5D%0A
|
3fb8fa8b45b31c34f6c12882f870dfe19c0f7109 | version 0.0.1 update | src/parse_anot.py | src/parse_anot.py | #! /usr/bin/env python
def process_ref_line(line):
# extract last column where the attributes are
attribute = line[:-1].split("\t")[-1]
attribute = attribute.split(";")
return attribute
def update_gene_set(attribute, gene_set):
#determine the association between gene_id and (gene_type, gene_name)
#update i... | Python | 0 | @@ -1436,20 +1436,26 @@
= %22
-None%22, %22None
+unknown%22, %22unknown
%22,
@@ -1473,12 +1473,15 @@
%22, %22
-None
+unknown
%22%0A%09%09
@@ -1593,24 +1593,73 @@
%22UTR3%22%0A%09%09%09%0A
+%09%09elif %22CDS%22 in feature_ids:%0A%09%09%09feature = %22CDS%22%0A%0A
%09%09elif %22exon
@@ -1667,32 +1667,33 @@
in... |
5e8b82130a0bd0d63629e725fc06380105955274 | Update data migration | osf/migrations/0084_preprint_node_divorce.py | osf/migrations/0084_preprint_node_divorce.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-03-12 18:25
from __future__ import unicode_literals
from django.db import migrations
from django.db import transaction
def divorce_preprints_from_nodes(apps, schema_editor):
Preprint = apps.get_model('osf', 'PreprintService')
PreprintContributor = a... | Python | 0.000001 | @@ -862,177 +862,8 @@
de:%0A
- # preprint.title = preprint.node.title%0A # preprint.description = preprint.node.description%0A # preprint.creator = preprint.node.creator%0A
@@ -929,17 +929,16 @@
nt.node.
-_
contribu
@@ -940,17 +940,26 @@
tributor
-s
+_set.all()
:%0A
@@ ... |
401ec02e1c0f967fc53e7b2da5c9d56e4fb23df3 | Add document | cupy/linalg/solve.py | cupy/linalg/solve.py | import numpy
from numpy import linalg
import six
import cupy
from cupy import cuda
from cupy.cuda import cublas
from cupy.cuda import device
from cupy.linalg import util
if cuda.cusolver_enabled:
from cupy.cuda import cusolver
def solve(a, b):
'''Solves a linear matrix equation.
It computes the exact s... | Python | 0 | @@ -4553,16 +4553,77 @@
matrix%0A%0A
+ Returns:%0A cupy.ndarray: The inverse of a matrix.%0A%0A
.. s
|
dd2f7da18fb295d58ac763ee7e91b9b1a5bdf1d0 | Update __about__.py | bcrypt/__about__.py | bcrypt/__about__.py | # Author:: Donald Stufft (<donald@stufft.io>)
# Copyright:: Copyright (c) 2013 Donald Stufft
# License:: Apache License, Version 2.0
#
# 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:/... | Python | 0.00002 | @@ -1046,15 +1046,12 @@
com/
-dstufft
+pyca
/bcr
|
d7c35749c682cb86356cdf825f3886e22b07942a | Add --refresh command line argument to Django admin command build_genome_blastdb | src/edge/management/commands/build_genome_blastdb.py | src/edge/management/commands/build_genome_blastdb.py | from edge.blastdb import build_all_genome_dbs
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
build_all_genome_dbs()
| Python | 0.000001 | @@ -133,67 +133,360 @@
def
-handle(self, *args, **options):%0A build_all_genome_dbs(
+add_arguments(self, parser):%0A parser.add_argument(%0A '--refresh',%0A action='store_true',%0A help='Rebuild BLAST database files',%0A )%0A%0A def handle(self, *args, **optio... |
a3527b9a0ffb494bda40c1e8ac10fb8f4ae2aa51 | Add outdir option | src/periodical.py | src/periodical.py | #!/usr/bin/env python2
# Copyright 2012 Tom Vincent <http://tlvince.com/contact/>
'''Create a Kindle periodical from given URL(s).'''
import os
import sys
import logging
import argparse
import tempfile
import datetime
import subprocess
import yaml
from urlparse import urlparse
from bs4 import BeautifulSoup
from bo... | Python | 0.000005 | @@ -2558,16 +2558,110 @@
parse')
+%0A parser.add_argument('--outdir', default='~',%0A help='directory to write mobi file')
%0A%0A me
|
a02a5447482db1288bdc332aab5a544764fb3fa0 | remove low frequencies | index/messung/energy.py | index/messung/energy.py | #!/usr/bin/env python
import sys, os, time, socket
PORT = 1337
SAMPLES = 3
freqs = [ 30, 48, 60, 72, 84, 96, 120, 132, 144, 156, 168, 180, 192, 204,
216, 240, 264, 288, 336, 360, 384, 408, 480, 528, 600, 648, 672, 696,
720, 744, 768, 816, 864, 912, 960, 1008 ]
def server():
print "server"
s = socket.socket(soc... | Python | 0.999966 | @@ -79,17 +79,19 @@
reqs = %5B
-
+%0A%09#
30, 48,
@@ -144,20 +144,22 @@
192,
-
+%0A%09#
204,
-%0A%09
+
216,
-
+%0A%09
240,
@@ -2623,16 +2623,17 @@
-----%22%0A%0A
+#
%09for inp
@@ -2665,51 +2665,145 @@
%5D:%0A%09
-%09for cpus in %5B1, 2%5D:%0A%09%09%09for workers in %5B0,
+for input_len in %5B100%5D:%0A#%... |
f7a6dc48c6d65c3937322d9e4f6e2f5e1176b03b | fix issue where a field may not exist in the data | beaver/transport.py | beaver/transport.py | import os
def create_transport(beaver_config, file_config, logger):
"""Creates and returns a transport object"""
transport_str = beaver_config.get('transport')
if '.' not in transport_str:
# allow simple names like 'redis' to load a beaver built-in transport
module_path = 'beaver.%s_transp... | Python | 0.000001 | @@ -2443,16 +2443,67 @@
path'%7D:%0A
+ if field in data:%0A
|
f7f576adfccdfbc386c991bb35f2a52e9db19b5e | remove hack | tracker.py | tracker.py |
from utils import *
from pprint import pprint
import sys
from State import state
from player import PlayerEventCallbacks
import lastfm
def track(event, args, kwargs):
print "track:", repr(event), repr(args), repr(kwargs)
if event is PlayerEventCallbacks.onSongChange:
oldSong = kwargs["oldSong"]
newSong = kwar... | Python | 0 | @@ -336,96 +336,8 @@
%09if
-oldSong is newSong: print %22** something strange. oldSong is newSong%22 # TODO: fix%0A%09%09elif
oldS
|
587abec7ff5b90c03885e164d9b6b62a1fb41f76 | Fix the headers sent by the GitHub renderer. | grip/github_renderer.py | grip/github_renderer.py | from flask import abort, json
import requests
def render_content(text, gfm=False, context=None,
username=None, password=None):
"""Renders the specified markup using the GitHub API."""
if gfm:
url = 'https://api.github.com/markdown'
data = {'text': text, 'mode': 'gfm'}
... | Python | 0 | @@ -397,16 +397,71 @@
s(data)%0A
+ headers = %7B'content-type': 'application/json'%7D%0A
else
@@ -462,16 +462,16 @@
else:%0A
-
@@ -530,24 +530,28 @@
data = text%0A
+
headers
@@ -579,16 +579,22 @@
ext/
-plai
+x-markdow
n'%7D%0A
+%0A
@@ -643,17 +643,16 @@
se None%0A
-%0A
... |
67f64792dc7321cd9521e927b4eb1a58b67cdcdc | Allow passing of direct function reference to url triple | brink/server.py | brink/server.py | from aiohttp import web
from brink.config import config
from brink.db import conn
from brink.handlers import __handler_wrapper, __ws_handler_wrapper
from brink.utils import resolve_func
from brink.cli import print_globe, print_info
import importlib
import aiohttp_autoreload
import logging
def run_server(conf):
fo... | Python | 0 | @@ -1820,16 +1820,49 @@
rapper%0A%0A
+ if type(handler) is str:%0A
try:
@@ -1862,32 +1862,36 @@
try:%0A
+
handler_func = r
@@ -1907,24 +1907,28 @@
nc(handler)%0A
+
except M
@@ -1947,32 +1947,36 @@
dError:%0A
+
+
handler_func = r
@@ -2016,16 +2016,57 @@
andler))
+%0... |
6156960333163e15fd2ddd96e831bbdf2e92163d | Correct reference to organization | src/sentry/api/bases/organization.py | src/sentry/api/bases/organization.py | from __future__ import absolute_import
from sentry.api.base import Endpoint
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.permissions import ScopedPermission
from sentry.models import AuthIdentity, Organization, OrganizationMember
class OrganizationPermission(ScopedPermission):
scope_map... | Python | 0.000002 | @@ -1138,21 +1138,16 @@
ization=
-self.
organiza
@@ -1150,17 +1150,17 @@
nization
-_
+.
id,%0A
|
606213f51e0f887f0d353b072b099b9770cc41af | Implement open_repository() as an alias to find_repository() | format.py | format.py | # Foreign branch support for Subversion
#
# Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
from bzrlib.bzrdir import BzrDirFormat, BzrDir
from repository import SvnRepository
from branch import SvnBranch
import svn.client
from libsvn._core import SubversionException
from bzrlib.errors import NotBranchError
from... | Python | 0.000166 | @@ -1066,20 +1066,20 @@
def
-find
+open
_reposit
@@ -1194,16 +1194,122 @@
repos%0A%0A
+ # Subversion has all-in-one, so a repository is always present%0A find_repository = open_repository%0A%0A
def
|
dca5582062c10f22281f37960823c3d936cf75af | Use more specific error for wrong ticket type | mama_cas/mixins.py | mama_cas/mixins.py | import logging
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy
from django.utils.decorators import method_decorator
from django.utils.translation impor... | Python | 0 | @@ -560,24 +560,28 @@
nvalidTicket
+Spec
%0Afrom mama_c
@@ -2428,16 +2428,20 @@
idTicket
+Spec
('Proxy
@@ -2469,16 +2469,20 @@
idated'%0A
+
|
798e51e880374b43c405ce7e4314b3d1a3311c5c | Make exceptions for bad behavior (#220) | wikilabels/database/db.py | wikilabels/database/db.py | import logging
from contextlib import contextmanager
from psycopg2.extras import RealDictCursor
from psycopg2.pool import ThreadedConnectionPool
from .campaigns import Campaigns
from .labels import Labels
from .tasks import Tasks
from .worksets import Worksets
logger = logging.getLogger(__name__)
class DB:
def... | Python | 0.000003 | @@ -1332,16 +1332,102 @@
except:
+ # noqa: E722%0A # We're fine with the bare except cos we raise in any case.
%0A
|
1d863035c1d422811ea92b7532bf3991d3c88ae7 | Use session+cache only when not debugging | dash2012/settings.py | dash2012/settings.py | # Django settings for dash2012 project.
import os
import sys
DEBUG = os.environ.get('DEBUG', False)
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
ROOT = os.path.abspath(os.path.dirname(__file__))
EXTRA_LIBS_DIR = os.path.join(ROOT, 'lib')
sys... | Python | 0 | @@ -1012,16 +1012,35 @@
login'%0D%0A
+if not DEBUG:%0D%0A
SESSION_
@@ -1094,190 +1094,8 @@
e'%0D%0A
-if DEBUG:%0D%0A CACHES = %7B%0D%0A 'default': %7B%0D%0A 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',%0D%0A 'LOCATION': 'cloudfish'%0D%0A %7D%0D%0A%7D%0D%0A%0D... |
a12910798763d418f2f14d159d4b79e97dad789d | Remove TemporaryDirectory class | IPython/utils/tempdir.py | IPython/utils/tempdir.py | """TemporaryDirectory class, copied from Python 3.2.
This is copied from the stdlib and will be standard in Python 3.2 and onwards.
"""
import os as _os
import warnings as _warnings
import sys as _sys
# This code should only be used in Python versions < 3.2, since after that we
# can rely on the stdlib itself.
try:
... | Python | 0 | @@ -1,3317 +1,109 @@
-%22%22%22TemporaryDirectory class, copied from Python 3.2.%0A%0AThis is copied from the stdlib and will be standard in Python 3.2 and onwards.%0A%22%22%22%0A%0Aimport os as _os%0Aimport warnings as _warnings%0Aimport sys as _sys%0A%0A# This code should only be used in Python versions %3C 3.2, sinc... |
7d3778ed0d596653fa15a8f28ac1063154ea496e | Comment about 1MB for bucket size | fqueue.py | fqueue.py | from __future__ import absolute_import, unicode_literals, print_function
import os
import base64
import hashlib
import fcntl
import errno
import signal
from contextlib import contextmanager
from posix_ipc import Semaphore, O_CREAT, BusyError
import Queue
import marshal
import logging
logger = logging.getLogger(__na... | Python | 0 | @@ -1258,16 +1258,30 @@
= 20 #
+ 1024 * 1024 =
1MB%0A%0A
|
3145e6e26cda7e4659cac0f44406d49213648049 | add timeout to Redis lock | echo_listener.py | echo_listener.py | from multiprocessing import Pool
import echo_listener_settings as settings
from boto import sqs
from boto.sqs.message import RawMessage, Message
from boto.s3.connection import S3Connection
from boto.s3.key import Key
import json
import os.path
import sys
import redis
import time
import random
import string
import datet... | Python | 0.000001 | @@ -3942,16 +3942,18 @@
ient.set
+ex
(payload
@@ -3977,24 +3977,51 @@
ad%5B'target'%5D
+, settings.LOCK_TIMEOUT * 2
)%0A%09%0A%09%09%09bucke
|
5952f8cc4e46e9a1e76666b2c23c5db091500cac | Factor out the check for whether a date should be represented by Julian or Gregorian. | calexicon/calendars/historical.py | calexicon/calendars/historical.py | from datetime import date
from base import Calendar
from calexicon.dates import InvalidDate, DateWithCalendar
from main import JulianCalendar, ProlepticGregorianCalendar
class SwitchDateWithCalendar(DateWithCalendar):
def __str__(self):
return "%s (%s - %s)" % (
self.calendar.date_display_stri... | Python | 0.999989 | @@ -929,16 +929,113 @@
_date)%0A%0A
+ @classmethod%0A def is_gregorian_date(cls, d):%0A return d %3E= cls.first_gregorian_day%0A%0A
@cla
@@ -1087,38 +1087,30 @@
%0A if
-d %3E= cls.first
+cls.is
_gregorian_d
@@ -1102,33 +1102,37 @@
.is_gregorian_da
-y
+te(d)
:%0A re
@@ -1296,38 ... |
3f0932f8fc1277fc5354476470c2931d48f62977 | bump version | callisto_core/utils/version.py | callisto_core/utils/version.py | __version__ = '0.10.10'
| Python | 0 | @@ -14,11 +14,11 @@
'0.10.1
-0
+1
'%0A
|
26c518ddfeb73e2a8bc64039f481a680e80ced6d | fix path for config and template | tsstats.py | tsstats.py | import re
import sys
import configparser
from time import mktime
from datetime import datetime, timedelta
from jinja2 import Environment, FileSystemLoader
# parse config
config = configparser.ConfigParser()
config.read('config.ini')
if 'General' not in config or not ('logfile' in config['General'] and 'outpu... | Python | 0 | @@ -156,16 +156,161 @@
ader%0D%0A%0D%0A
+# get path%0D%0Aarg = sys.argv%5B0%5D%0D%0Aarg_find = arg.rfind('/')%0D%0Aif arg_find == -1:%0D%0A path = '.'%0D%0Aelse:%0D%0A path = arg%5B:arg_find%5D%0D%0Apath += '/'%0D%0A%0D%0A%0D%0A
# parse
@@ -367,16 +367,23 @@
ig.read(
+path +
'config.
@@ -4147,156 +4147,8 @@... |
7220621fcdba6de2e0fabb69e2d51dd382e739ba | Fix Windows freeze error | freeze.py | freeze.py | #!/usr/bin/env python3
import os
import re
from cx_Freeze import setup, Executable
with open(os.path.join("sacad", "__init__.py"), "rt") as f:
version = re.search("__version__ = \"([^\"]+)\"", f.read()).group(1)
build_exe_options = {"includes": ["lxml._elementpath"],
"packages": ["asyncio"],... | Python | 0.000001 | @@ -311,16 +311,24 @@
asyncio%22
+, %22idna%22
%5D,%0A
|
364ef672f8fc73c2a42521e7fe3096b826fb08b6 | Fix gitdir -> git | project_management/pmtools/controller/project.py | project_management/pmtools/controller/project.py | """
Pm Project module
Provide functionality for project management.
Commands:
ls list contents
init initialize a project folder
add add boilerplate code
compress compress files
clean remove files
du calculate disk usage
Synopsis:
Th... | Python | 0.000036 | @@ -3564,19 +3564,16 @@
args.git
-dir
:%0A
|
ec51bcd1803a2f576f6a325b9b950d86c5d0b2a9 | Cut 0.9.1 | invocations/_version.py | invocations/_version.py | __version_info__ = (0, 9, 0)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0.000001 | @@ -19,17 +19,17 @@
(0, 9,
-0
+1
)%0A__vers
|
38b281793a52a22b4325814f9389d7d07ed95cbc | replace couchforms/by_user with reports_forms view | custom/_legacy/pact/reports/chw_list.py | custom/_legacy/pact/reports/chw_list.py | from django.core.urlresolvers import NoReverseMatch
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.standard import CustomProjectReport, ProjectReportParametersMixin
from django.utils import html
from c... | Python | 0.000003 | @@ -305,16 +305,73 @@
ort html
+%0Afrom corehq.apps.reports.util import make_form_couch_key
%0A%0Afrom c
@@ -458,16 +458,46 @@
eReport%0A
+from datetime import datetime%0A
%0A%0Aclass
@@ -1474,32 +1474,100 @@
count(user_id):%0A
+ key = make_form_couch_key(self.domain, user_id=user_id)%0A
r... |
9f63ee0c05eb71ef612972867fe38791eaf2d86a | Fix #dnu implementation to not include self in the arg array | src/som/vmobjects/abstract_object.py | src/som/vmobjects/abstract_object.py | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe, interpreter):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
# Push the receiver onto the stack
fr... | Python | 0 | @@ -846,16 +846,39 @@
uments()
+ - 1 ## do ignore self
%0A%0A
@@ -1242,24 +1242,25 @@
i -= 1%0A
+%0A
%0A
@@ -1247,28 +1247,58 @@
1%0A%0A
-
+frame.pop() # pop self from stack
%0A arg
|
7dc660b0a270c0d43f603d02895dec285df85ef6 | fix telegram restart | rasa_core/channels/telegram.py | rasa_core/channels/telegram.py | import logging
from flask import Blueprint, request, jsonify
from telegram import (
Bot, InlineKeyboardButton, Update, InlineKeyboardMarkup,
KeyboardButton, ReplyKeyboardMarkup)
from rasa_core import constants
from rasa_core.channels import InputChannel
from rasa_core.channels.channel import UserMessage, Outp... | Python | 0.000003 | @@ -5526,17 +5526,16 @@
if
-(
text ==
@@ -5583,78 +5583,8 @@
ART)
- or%0A text == constants.USER_INTENT_RESTART)
:%0A%0A
|
4be292c5c38b4eec08c56a872f6cd4f390bc607a | make compiler's py3k warning a full deprecation warning #6837 | Lib/compiler/__init__.py | Lib/compiler/__init__.py | """Package for parsing and compiling Python source code
There are several functions defined at the top level that are imported
from modules contained in the package.
parse(buf, mode="exec") -> AST
Converts a string containing Python source code to an abstract
syntax tree (AST). The AST is defined in compiler... | Python | 0 | @@ -734,20 +734,23 @@
me.%0A%22%22%22%0A
-from
+%0Aimport
warning
@@ -754,36 +754,26 @@
ings
- import warnpy3k%0Awarnpy3k(%22t
+%0A%0Awarnings.warn(%22T
he c
@@ -792,16 +792,25 @@
age
-has been
+is deprecated and
rem
@@ -830,10 +830,45 @@
n 3.
-0%22
+x.%22,%0A DeprecationWarning
, st
@@ -882,21 ... |
c05b179675afd326ca80540cd55cfd1900e2970f | Fix wrong import. | sugar/graphics/popup.py | sugar/graphics/popup.py | # Copyright (C) 2007, One Laptop Per Child
#
# 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 of the License, or (at your option) any later version.
#
# This library is ... | Python | 0.000002 | @@ -911,42 +911,8 @@
Box%0A
-from sugar.graphics import button%0A
from
|
52fa3230a29e10b49b7e6decb68cf5dbbf7a208f | Handle Unknown locale errors properly | zou/app/__init__.py | zou/app/__init__.py | import os
import flask_fs
import traceback
from flask import Flask, jsonify
from flasgger import Swagger
from flask_restful import current_app
from flask_jwt_extended import JWTManager
from flask_principal import Principal, identity_changed, Identity
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Mi... | Python | 0 | @@ -384,16 +384,58 @@
ureError
+%0Afrom babel.core import UnknownLocaleError
%0A%0Afrom .
@@ -2486,16 +2486,143 @@
, 400%0A%0A%0A
+@app.errorhandler(UnknownLocaleError)%0Adef wrong_locale_label(error):%0A return jsonify(error=True, message=str(error)), 400%0A%0A%0A
if not c
|
61a187e6064794cb82b2f003c0eb52d96f8038a2 | Revert "try ruamel.yaml - third iteration" | cellpy/parameters/prmreader.py | cellpy/parameters/prmreader.py | # -*- coding: utf-8 -*-
import glob
import os
import sys
from collections import OrderedDict
import logging
import warnings
from pathlib import Path
import box
from ruamel.yaml import YAML
from cellpy.parameters import prms
from cellpy.exceptions import ConfigFileNotRead, ConfigFileNotWritten
logger = logging.getLo... | Python | 0 | @@ -155,16 +155,30 @@
ort box%0A
+# import yaml%0A
from rua
@@ -5690,53 +5690,8 @@
nt(f
-%22reading %7Bf%7D%22)%0A print(%22writing parameters%22
)%0A
@@ -5707,24 +5707,25 @@
prm_file(f)%0A
+%0A
print(%22r
@@ -5726,29 +5726,11 @@
int(
-%22reading parameters%22)
+f)%0A
%0A
|
7f9c9c25f5786bf96ff3d89cc8fd840e3e6a4a6d | Allow passing of a tuple of three integers to get a datetime. | pelican/plugins/jinja_filters/jinja_filters.py | pelican/plugins/jinja_filters/jinja_filters.py | """Various filters for Jinja."""
from datetime import datetime as _datetime
from titlecase import titlecase as _titlecase
__all__ = [
"article_date",
"breaking_spaces",
"datetime",
"titlecase",
]
def datetime(value, format_str="%Y/%m/%d %H:%M"):
"""
Convert a datetime to a different format.... | Python | 0.000005 | @@ -1530,24 +1530,177 @@
s assumed.%0A%0A
+ You can also generate a tuple of (up to three) integers to get a datetime%0A out, using the integer representation for the month (1=January, etc).%0A%0A
Args%0A
@@ -1822,23 +1822,91 @@
%22%22%22%0A
-JANUARY
+if len(value) %3E= 2 and isinstance(value%5B2%5D... |
addb75bfb13ffa3670090e750eb65026fd55f4f2 | version bump 3.0.6 | ella/__init__.py | ella/__init__.py | VERSION = (3, 0, 5)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
| Python | 0 | @@ -14,9 +14,9 @@
0,
-5
+6
)%0A%0A_
|
280fdec84513c554e11b1dc93b65baed7d6d1438 | Update refrigeration_loads.py | cea/demand/refrigeration_loads.py | cea/demand/refrigeration_loads.py | # -*- coding: utf-8 -*-
"""
refrigeration loads
"""
from __future__ import division
import numpy as np
import pandas as pd
from cea.technologies import heatpumps
from cea.constants import HOURS_IN_YEAR
from cea.demand.constants import T_C_REF_SUP_0, T_C_REF_RE_0
__author__ = "Jimeno A. Fonseca"
__copyright__ = "Copyri... | Python | 0.000001 | @@ -405,16 +405,53 @@
Fonseca%22
+, %22Martin Mosteiro%22, %22Gabriel Happle%22
%5D%0A__lice
@@ -1337,16 +1337,18 @@
E_0) / 2
+.0
- tsd%5B'
@@ -1599,122 +1599,627 @@
-for h in range(HOURS_IN_YEAR):%0A if tsd%5B'Qcre_sys'%5D%5Bh%5D %3E 0:%0A tsd%5B'mcpcre_sys'%5D%5Bh%5D = tsd%5B'
+tsd%5B'mcp... |
b548092d480871e402e2d50ab96d864c5851cab2 | fix __init__ changes | ffmpeg/__init__.py | ffmpeg/__init__.py | from __future__ import unicode_literals
from . import _filters, _ffmpeg, _run
from ._filters import *
from ._ffmpeg import *
from ._run import *
from ._view import *
__all__ = _filters.__all__ + _ffmpeg.__all__ + _run.__all__ + _view.__all__
| Python | 0.000057 | @@ -142,29 +142,8 @@
t *%0A
-from ._view import *%0A
__al
@@ -201,21 +201,5 @@
ll__
- + _view.__all__
%0A
|
429e86ffca22d8a35881f0d9a172efaa900a6e70 | replace False with None | dash/development/component_generator.py | dash/development/component_generator.py | from __future__ import print_function
from collections import OrderedDict
import json
import sys
import subprocess
import shlex
import os
import argparse
import shutil
import functools
import pkg_resources
import yaml
from ._r_components_generation import write_class_file
from ._r_components_generation import genera... | Python | 0.999999 | @@ -2968,36 +2968,35 @@
jlprefix is not
-Fals
+Non
e:%0A gener
@@ -3658,12 +3658,11 @@
not
-Fals
+Non
e:%0A
|
22a10d3e0e5a0f5c11fa3ebaaa05c6e6e00f95a2 | Add some metadata | cgi-bin/wepp/sm2shape.py | cgi-bin/wepp/sm2shape.py | #!/mesonet/python/bin/python
# Output by township
from pyIEM import iemdb, wellknowntext
import shapelib, dbflib, os, cgi, mx.DateTime, sys, zipfile, shutil
i = iemdb.iemdb()
mydb = i['wepp']
os.chdir('/tmp/')
# Figure out what date we want
form = cgi.FormContent()
year = int(form["year"][0])
month = int(form["mont... | Python | 0.000355 | @@ -1698,16 +1698,515 @@
l(shp)%0A%0A
+o = open(fp+%22.txt%22, 'w')%0Ao.write(%22%22%22%0AIEM Modelled Soil Moisture from the Iowa Daily Erosion Project%0Ahttp://wepp.mesonet.agron.iastate.edu%0A%0ADBF Columns are:%0A MODL_TWP Model township%0A VALID Date data is valid for YYYYMMDD%0A VSM Volumetric Soil... |
96731cebe1c729ed6eceeab916e7420ddb12f435 | Print branch name | support/travis-build.py | support/travis-build.py | #!/usr/bin/env python
# Build the project on Travis CI.
from __future__ import print_function
import errno, os, re, shutil, sys, tempfile, urllib
from subprocess import call, check_call, check_output, Popen, PIPE, STDOUT
def rmtree_if_exists(dir):
try:
shutil.rmtree(dir)
except OSError as e:
if e.errno ==... | Python | 0.000054 | @@ -464,18 +464,24 @@
is:%0A
-if
+branch =
check_o
@@ -544,21 +544,68 @@
ip()
- != 'master':
+%0A if branch != 'master':%0A print('Branch: ' + branch)
%0A
|
f1630095ffe6c0d54e16c2466a2c1885453ec1af | Remove execute permission from exception.py | ironic_lib/exception.py | ironic_lib/exception.py | # 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 compliance with the License. You may obtain
# a ... | Python | 0.000042 | |
71a84ecb772aa5560e35409219c11001ac168c6a | Add logging for contact form email. | chmvh_website/contact/forms.py | chmvh_website/contact/forms.py | from django import forms
from django.conf import settings
from django.core import mail
from django.template import loader
class ContactForm(forms.Form):
name = forms.CharField()
email = forms.EmailField()
message = forms.CharField(widget=forms.Textarea(
attrs={'rows': 5}))
template = loader.g... | Python | 0 | @@ -1,16 +1,67 @@
+import logging%0A%0Afrom smtplib import SMTPException%0A%0A
from django impo
@@ -168,16 +168,83 @@
oader%0A%0A%0A
+logger = logging.getLogger('chmvh_website.%7B0%7D'.format(__name__))%0A%0A%0A
class Co
@@ -779,16 +779,82 @@
%7D%0A%0A
+ logger.debug(%22Preparing to send email%22)%0A%0A... |
a11c058c520581239a76d1b87920fec7f087eff3 | Use round brackets | readthedocs/builds/managers.py | readthedocs/builds/managers.py | """Build and Version class model Managers"""
from __future__ import absolute_import
import logging
from django.db import models
from django.core.exceptions import ObjectDoesNotExist
from .constants import (BRANCH, TAG, LATEST, LATEST_VERBOSE_NAME, STABLE,
STABLE_VERBOSE_NAME)
from .querysets... | Python | 0.000357 | @@ -2167,14 +2167,14 @@
.get
-%5B
+(
'pk'
-%5D
+)
))%0A%0A
|
797ab31382a6c92eb4e9496969e36c35a23db20d | Bump version to 10.0.1 | recipe_scrapers/__version__.py | recipe_scrapers/__version__.py | __version__ = "10.0.0"
| Python | 0 | @@ -13,11 +13,11 @@
= %2210.0.
-0
+1
%22%0A
|
41ceb649fe9af95a6434606996794fee38b09760 | implement __json__ method | channelstream/channel.py | channelstream/channel.py | import copy
import logging
import six
import uuid
from datetime import datetime
import channelstream
log = logging.getLogger(__name__)
class Channel(object):
""" Represents one of our chat channels - has some config options """
def __init__(self, name, long_name=None, channel_configs=None):
self.n... | Python | 0.001169 | @@ -4479,8 +4479,1126 @@
tions))%0A
+%0A def get_info(self, include_history=True, include_connections=False,%0A include_users=False):%0A chan_info = %7B%0A 'name': self.name,%0A 'long_name': self.long_name,%0A 'history': self.history if include_history else %5... |
82b1e2db9c9175370d40354c2e6851bb26d58183 | bump plugin version | plugins/bountyfunding_plugin_trac/src/setup.py | plugins/bountyfunding_plugin_trac/src/setup.py | #!/usr/bin/env python
from setuptools import find_packages, setup
setup(
name='BountyFunding', version='0.5',
packages=find_packages(),
entry_points = {
'trac.plugins': [
'bountyfunding = bountyfunding.bountyfunding',
],
},
package_data={'bountyfunding': ['templates/*', 'h... | Python | 0 | @@ -109,9 +109,9 @@
='0.
-5
+6
',%0A
|
8b542d9602d459a6f38dd17c48d3f9a7680fac78 | Fixed the lower-case probleme | malware_crawl/scan/manual_html.py | malware_crawl/scan/manual_html.py | from __future__ import print_function, unicode_literals
import requests
import lxml.html
import six
from progress.bar import Bar
_malware_keywords = {'Queen Elizabeth II',}
def check_content(url):
try:
response = requests.get(url, timeout=10.0)
response.raise_for_status()
except requests.exc... | Python | 0.99868 | @@ -168,16 +168,129 @@
h II',%7D%0A
+_lower_mk = %7B%7D%0Afor k,v in _malware_keywords.items():%0A _lower_mk%5Bk.lower()%5D = v;%0A%0A_malware_keywords = _lower_mk
%0A%0Adef ch
@@ -576,110 +576,8 @@
ds%7D
- # will never count any values, because text is lowercase and _malware_keywords.keys() are mixed case.
%0A... |
e09798d5adbdea422d31eeed6fded746c0b8e5eb | update reduce options | MOSAICpipe/reduce_ALL.py | MOSAICpipe/reduce_ALL.py | import os
from glob import glob
import sys
''' This file links the MOSAIC pipeline into each folder and then does the
complete reduction on things. It still needs to have the individual association
files created before hand, but it does everything else.
I've updated it to also to the newfirm linking and reduction. Yo... | Python | 0.000001 | @@ -28,19 +28,8 @@
glob
-%0Aimport sys
%0A%0A''
@@ -1342,16 +1342,26 @@
cmd += '
+ --noSWarp
--noPho
@@ -1381,19 +1381,11 @@
--no
-SEx --noBPZ
+RGB
'%0A%0A
@@ -2047,16 +2047,17 @@
m(cmd)%0A%0A
+%0A
if __nam
|
48abe132e004dbffa86ad3ccd557aea739332013 | Add test case for layer_normalization with unnormal batch_axis | python/test/function/test_layer_normalization.py | python/test/function/test_layer_normalization.py | # Copyright 2019,2020,2021 Sony Corporation.
#
# 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... | Python | 0.000001 | @@ -3247,32 +3247,101 @@
, 4, 4, 3), 0),%0A
+ ((2, 4, 4, 3), 1),%0A
@@ -3602,32 +3602,33 @@
, 2, 5), %5B0, 1%5D)
+,
%0A
|
d7cfdbd2bde0cc876db8c1bce020d8a1cf0ea77b | Add search filtering for name and booleans in resource API. | mdot_rest/views.py | mdot_rest/views.py | from django.shortcuts import render
from .models import Resource
from .serializers import ResourceSerializer
from rest_framework import generics, permissions
class ResourceList(generics.ListCreateAPIView):
queryset = Resource.objects.all()
serializer_class = ResourceSerializer
permission_classes = (permis... | Python | 0 | @@ -151,16 +151,200 @@
issions%0A
+import django_filters%0A%0A%0Aclass ResourceFilter(django_filters.FilterSet):%0A class Meta:%0A model = Resource%0A fields = ('name', 'featured', 'accessible', 'responsive_web',)%0A
%0A%0Aclass
@@ -531,16 +531,50 @@
dOnly,)%0A
+ filter_class = ResourceFilter%0A... |
48ba12cb0018930d0674b4124ecf581cfd8bb39f | Test cleanup For #9-semweb-model | src/test/python/dot/rural/sepake/test_csv_to_rdf.py | src/test/python/dot/rural/sepake/test_csv_to_rdf.py | '''
Created on 3 Oct 2014
@author: s05nc4
'''
import unittest
import StringIO
from dot.rural.sepake.csv_to_rdf import CSV, CsvGraph, PROV
from rdflib import RDF, RDFS
from rdflib.query import ResultRow
EXAMPLE = '''"A","B","C"
1,2,3
4,5,6
'''
ALL_CELLS_QUERY = '''
SELECT ?h ?v
WHERE {{
?cell <{rdf.type}> <{csv.... | Python | 0 | @@ -195,16 +195,59 @@
esultRow
+%0Aimport csv%0Afrom rdflib.term import Literal
%0A%0AEXAMPL
@@ -1063,25 +1063,99 @@
AMPLE))%0A
+ self.csv = csv.DictReader(StringIO.StringIO(EXAMPLE))%0A
%0A
-
def _que
@@ -1399,200 +1399,128 @@
- self.assertEquals(set(%5B('A', 1), ('A', 4),%0A ... |
eddcf78349b09847c5d216ebfb5f2ce46f02d09d | Debug commit. | socbot/core.py | socbot/core.py | import logging
from twisted.words.protocols import irc
from twisted.internet import protocol, reactor
from twisted.internet.error import ReactorNotRunning
from socbot.pluginapi import API
from socbot.userdb import UserDB
# Credits to ibid for some helpful code:
# - Ping ponger
class Connection(irc.IRCClient):
n... | Python | 0 | @@ -2735,16 +2735,112 @@
eason))%0A
+ %0A self._ping_deferred.cancel()%0A self._reconnect_deferred.cancel()%0A
%0A
@@ -2955,24 +2955,76 @@
veBot(self)%0A
+ else:%0A self._timeout_reconnect()%0A
%0A def
@@ -4405,10 +4405,9 @@
t =
-12
+6
0.0%0A
|
ac70763faa0798b2e78a9f2b898570e3b08df5cb | Fix method call | cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py | cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py | import sys
from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_eventlog.models import Log
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
... | Python | 0.000008 | @@ -1618,32 +1618,37 @@
answer =
+self.
get_user_input(%22
@@ -1884,16 +1884,21 @@
nswer =
+self.
get_user
|
b31b36253053f5e2739f514c8ae2017b4bc66011 | enable to assign file_list, topmodule, config file as arguments | pyverilog_toolbox/verify_tool/dataflow_facade.py | pyverilog_toolbox/verify_tool/dataflow_facade.py | #-------------------------------------------------------------------------------
# get_dataflow_facade.py
#
# interface of register map analyzer
#
#
# Copyright (C) 2015, Ryosuke Fukatani
# License: Apache 2.0
#-------------------------------------------------------------------------------
import sys
import os
import... | Python | 0 | @@ -1130,32 +1130,64 @@
, code_file_name
+, topmodule='', config_file=None
):%0A topmo
@@ -1513,16 +1513,48 @@
ile_name
+, topmodule='', config_file=None
):%0A
@@ -2182,51 +2182,257 @@
el
-se:%0A filelist = (code_file_name,
+if code_file_name:%0A if hasattr(code_file_name, %22__... |
08d2ade71e6fb69512cb6d39cb7ef8712a44172a | update mediumRegex | mediumRegexUTF8.py | mediumRegexUTF8.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# FIX PARA WINDOWS CONSOLE ----------------------
import codecs,sys
sys.stdout = codecs.getwriter("utf8")(sys.stdout)
# -----------------------------------------------
import re
cadena = u"""—¡Joven «emponzoñado» con el whisky, qué fin… te aguarda exhibir!
El pingüino Wen... | Python | 0 | @@ -90,16 +90,34 @@
-------%0A
+# Usar: chcp 1252%0A
import c
@@ -122,16 +122,23 @@
codecs,
+locale,
sys%0Asys.
@@ -167,14 +167,37 @@
ter(
-%22utf8%22
+locale.getpreferredencoding()
)(sy
|
76dcc6cd050172af50c0721b312ea499f0bb7b71 | modify build option | build/config.py | build/config.py | # -*- coding: utf-8 -*-
cflags = [
'-std=c99',
'-Wall',
'-g',
'-O2',
# '-fno-strict-aliasing',
'-D_GNU_SOURCE',
]
libs = [
'pthread',
'ev',
'json',
]
includes = [
'ext',
]
headers = [
'stdint.h',
'stdbool.h',
'unistd.h',
'sys/stat.h',
'sys/types... | Python | 0.000001 | @@ -65,16 +65,17 @@
%0A '-g
+0
',%0A '
@@ -80,9 +80,9 @@
'-O
-2
+3
',%0A#
|
583560040fc16cb7171d04d297d84d228a7f34f2 | Add ability to exclude files when using copy/move | synthtool/transforms.py | synthtool/transforms.py | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.000005 | @@ -1972,24 +1972,90 @@
nation: Path
+,%0A excludes: ListOfPathsOrStrs = None
):%0A %22%22%22%0A
@@ -2382,57 +2382,8 @@
th)%0A
- os.makedirs(dest_dir, exist_ok=True)%0A
@@ -2431,16 +2431,269 @@
, name)%0A
+%0A exclude = %5Bexcluded for excluded in exclude... |
eb4ad794a9213c20c800fa59199a29f353ca7994 | Add a docstring to testing default gate domain constant (#3047) | cirq/testing/random_circuit.py | cirq/testing/random_circuit.py | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Python | 0 | @@ -712,16 +712,47 @@
Circuit
+%0Afrom cirq._doc import document
%0A%0Aif TYP
@@ -1001,16 +1001,202 @@
.Z: 1%0A%7D%0A
+document(%0A DEFAULT_GATE_DOMAIN,%0A %22%22%22The default gate domain for %60cirq.testing.random_circuit%60.%0A%0AThis includes the gates CNOT, CZ, H, ISWAP, CZ, S, SWAP, T, X, Y,%0Aand Z gat... |
cd9dc7ff1069e80543f6af32d625bdefaf19f178 | Fix notificatiosn | autostew_back/plugins/chat_notifications.py | autostew_back/plugins/chat_notifications.py | """
Show a message when a player logs in (and other messages, too)
"""
from autostew_back.gameserver.event import EventType, BaseEvent, LapEvent, MemberEvent
from autostew_back.gameserver.server import Server
from autostew_back.gameserver.session import SessionStage, SessionState, SessionFlags
from autostew_web_users.m... | Python | 0.001748 | @@ -1396,12 +1396,8 @@
et()
- - 1
and
@@ -1741,9 +1741,9 @@
) -
-2
+1
and
@@ -2580,37 +2580,34 @@
sage in
-first_play
+lead
er_
-f
in
-ished
+_last_lap
:%0A
@@ -2766,34 +2766,37 @@
sage in
-lead
+first_play
er_
+f
in
-_last_lap
+ished
:%0A
|
946fdcc8305d7277f0de4a6ee27a3ecbecd5d02f | Change case of navbar names | source/conf.py | source/conf.py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
#import sphinx_bootstrap_theme
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup -----------------------------... | Python | 0.000001 | @@ -6668,17 +6668,17 @@
('E
-Q
+q
uadratur
@@ -6732,17 +6732,17 @@
('E
-I
+i
ntegrato
|
40688da356ef5e086d7482824c31c90d193b39f9 | Update conf.py | source/conf.py | source/conf.py | # -*- coding: utf-8 -*-
#
# Hydrology Thematic Exploitation Platform documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 10 15:34:34 2015.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in t... | Python | 0.000001 | @@ -1002,51 +1002,8 @@
do',
- 'sphinx.ext.pngmath', 'sphinx.ext.jsmath',
'sp
|
f9d911091f01d91485f21c01850798892ed28dd0 | add right arrow | scottsright/manual_readline.py | scottsright/manual_readline.py |
char_sequences = {}
def on(seq):
def add_to_char_sequences(func):
char_sequences[seq] = func
return func
return add_to_char_sequences
@on('[D')
@on('')
@on('\x02')
def left_arrow(cursor_offset, line):
return max(0, cursor_offset - 1), line
if __name__ == '__main__':
print repr(char... | Python | 0.001032 | @@ -178,27 +178,117 @@
%02')%0A
-@on('%5Cx02
+def left_arrow(cursor_offset, line):%0A return max(0, cursor_offset - 1), line%0A%0A@on('%1B%5BC')%0A@on('%06
')%0Adef
-lef
+righ
t_ar
@@ -317,36 +317,44 @@
e):%0A return m
-ax(0
+in(len(line)
, cursor_offset
@@ -345,33 +345,33 @@
, cursor_offset
--
++
1), ... |
42fcc098fe2b89f50b28b5d158ae6eead46dd382 | Add command to help description of timez | hamper/plugins/timez.py | hamper/plugins/timez.py | import requests
import json
from hamper.interfaces import ChatCommandPlugin, Command
class Timez(ChatCommandPlugin):
name = 'timez'
priority = 2
def setup(self, loader):
try:
self.api_key = loader.config['timez']['api-key']
except (KeyError, TypeError):
self.api_k... | Python | 0.000001 | @@ -659,16 +659,24 @@
%22
+timez -
Look up
|
3555b002aae386220bc02d662a9b188426afc08f | Create a specific group for the Facebook plugins - makes it a bit neater in the list of plugins. | cmsplugin_facebook/cms_plugins.py | cmsplugin_facebook/cms_plugins.py | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_facebook import models
class BasePlugin(CMSPluginBase):
name = None
def render(self, context, instance, placeholder):
context.update({'instance': instance,
'name': self.name,
... | Python | 0 | @@ -564,16 +564,40 @@
ke Box'%0A
+ module = 'Facebook'%0A
rend
@@ -834,16 +834,40 @@
Button'%0A
+ module = 'Facebook'%0A
rend
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.