commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
4e73a057354d3445d24e7e480793f2fe18940fb1
Bump version to 0.4.4.dev1
team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend
django_backend/__init__.py
django_backend/__init__.py
from .backend.renderable import Renderable # noqa from .group import Group # noqa from .sitebackend import SiteBackend __version__ = '0.4.4.dev1' default_app_config = 'django_backend.apps.DjangoBackendConfig' site = SiteBackend(id='backend')
from .backend.renderable import Renderable # noqa from .group import Group # noqa from .sitebackend import SiteBackend __version__ = '0.4.3' default_app_config = 'django_backend.apps.DjangoBackendConfig' site = SiteBackend(id='backend')
bsd-3-clause
Python
6e9b61a10ca47770d3e0b5ada25339fee1383385
Fix typo and use += instead of .extend() to concat lists
jaap3/django-richtextfield,jaap3/django-richtextfield
djrichtextfield/widgets.py
djrichtextfield/widgets.py
from __future__ import unicode_literals import json from django.forms.widgets import Media, Textarea from django.urls import reverse from django.utils import six from django.utils.encoding import force_text from django.utils.html import format_html from djrichtextfield import settings class RichTextWidget(Textarea...
from __future__ import unicode_literals import json from django.forms.widgets import Media, Textarea from django.urls import reverse from django.utils import six from django.utils.encoding import force_text from django.utils.html import format_html from djrichtextfield import settings class RichTextWidget(Textarea...
mit
Python
b8258d3ad32fbd283f01578bf46aef4c8e5ac55d
Add assertion to prevent a class extending itself
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/definitions/thing_definition.py
thinglang/parser/definitions/thing_definition.py
from thinglang.compiler.buffer import CompilationBuffer from thinglang.compiler.context import CompilationContext from thinglang.foundation import definitions from thinglang.lexer.definitions.tags import LexicalInheritanceTag from thinglang.lexer.definitions.thing_definition import LexicalDeclarationThing from thinglan...
from thinglang.compiler.buffer import CompilationBuffer from thinglang.compiler.context import CompilationContext from thinglang.foundation import definitions from thinglang.lexer.definitions.tags import LexicalInheritanceTag from thinglang.lexer.definitions.thing_definition import LexicalDeclarationThing from thinglan...
mit
Python
37677e052c948d5ccced28bcf62ea8f85bac9822
test song
romulojales/to-be-musician,romulojales/to-be-musician
to_be_a_musician/djtinysong/tests/test_models.py
to_be_a_musician/djtinysong/tests/test_models.py
import unittest from djtinysong.models import Song class TestView(unittest.TestCase): def test_simple_class_instance(self): dictionary = { "Url": "http:\/\/tinysong.com\/8We2", "SongID": 269743, "SongName": "The Legend Of Lil' Beethoven", "ArtistID": 7620, "ArtistN...
import unittest from djtinysong.models import Song class Test(unittest.TestCase): def test_simple_class_instance(self): dictionary = { "Url": "http:\/\/tinysong.com\/8We2", "SongID": 269743, "SongName": "The Legend Of Lil' Beethoven", "ArtistID": 7620, "ArtistName"...
apache-2.0
Python
365e3acae3973dc8fee795312ecd7a5990144af4
remove redundant params, update annotations and comments, add doctest
hell03end/hse_ruz
ruz/utils/logging.py
ruz/utils/logging.py
import logging from collections import Callable from functools import wraps def Logger(name: str, level: int=logging.INFO, **kwargs) -> logging.RootLogger: """ Creates configured logger :param name, required - name for logger. :param level - logging level. :param format, str - log...
import logging from collections import Callable from functools import wraps def Logger(name: str, level: int=logging.INFO, **kwargs) -> logging.RootLogger: logging.basicConfig( format=kwargs.pop( "format", "%(asctime)s - %(name)s - %(levelname)s - %(message)s" ), le...
mit
Python
958b86044e92ab44c95acae86155be0547569c9e
Use rescent linuxdeployqt for appimage
OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator
share/ci/appimage.py
share/ci/appimage.py
import common as c from config import * import os import sys import subprocess as sub import shutil from glob import glob if len(sys.argv) > 1 and sys.argv[1] == 'glibc_version': # subcommand sub.run('ldd --version | head -n 1 | grep -Po "\\d\\.\\d\\d"', shell=True) exit(0) tag = os.environ.get('TAG', '') ar...
import common as c from config import * import os import sys import subprocess as sub import shutil from glob import glob if len(sys.argv) > 1 and sys.argv[1] == 'glibc_version': # subcommand sub.run('ldd --version | head -n 1 | grep -Po "\\d\\.\\d\\d"', shell=True) exit(0) tag = os.environ.get('TAG', '') ar...
mit
Python
58acfa1cdfadd60d63c0e485c512bbe974f89407
Fix to pythonpep code.
alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc
update-database/stackdoc/namespaces/pythonpep.py
update-database/stackdoc/namespaces/pythonpep.py
import re import urllib ############### Functions called by stackdoc def get_version(): return 1 def get_ids(title, body, tags): ids = [] if "http://www.python.org/" in body: urls = re.findall(r'<a href="([^"]+)"', body) for url in urls: m = re.match("http:\/\/www\.python\.or...
import re import urllib ############### Functions called by stackdoc def get_version(): return 1 def get_ids(title, body, tags): ids = [] if "http://docs.python.org/" in body: urls = re.findall(r'<a href="([^"]+)"', body) for url in urls: m = re.match("http:\/\/www\.python\.o...
bsd-3-clause
Python
f6e5833e60015f762a95dd1753e2aa43b6baddda
Update melodyextraction.py
altugkarakurt/morty
extras/melodyextraction.py
extras/melodyextraction.py
# -*- coding: utf-8 -*- from predominantmelodymakam.predominantmelodymakam import PredominantMelodyMakam from fileoperations.fileoperations import get_filenames_in_dir import os import json import numpy as np import sys import math # Number of decimal points to round the pitch track to. DECIMAL = 2 # get the input in...
# -*- coding: utf-8 -*- from predominantmelodymakam.predominantmelodymakam import PredominantMelodyMakam from fileoperations.fileoperations import get_filenames_in_dir import os import json import numpy as np import sys import math # Number of decimal points to round the pitch track to. DECIMAL = 2 # get the input in...
agpl-3.0
Python
85e089e3fa573e90e966927322257728f5fc7df7
add new version (#16130)
LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack
var/spack/repos/builtin/packages/nccl/package.py
var/spack/repos/builtin/packages/nccl/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Nccl(MakefilePackage): """Optimized primitives for collective multi-GPU communication.""" ...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Nccl(MakefilePackage): """Optimized primitives for collective multi-GPU communication.""" ...
lgpl-2.1
Python
6855e8e10fa5e0c00bceabbe8baee942dfadd5d1
Add 8.44 (#16397)
LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack
var/spack/repos/builtin/packages/pcre/package.py
var/spack/repos/builtin/packages/pcre/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Pcre(AutotoolsPackage): """The PCRE package contains Perl Compatible Regular Expression ...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Pcre(AutotoolsPackage): """The PCRE package contains Perl Compatible Regular Expression ...
lgpl-2.1
Python
f65ec11fd763dda6d7b8988a6764f89aa5383df8
Increment to version 1.11.4
nyaruka/smartmin,nyaruka/smartmin,nyaruka/smartmin
smartmin/__init__.py
smartmin/__init__.py
from __future__ import unicode_literals __version__ = '1.11.4'
from __future__ import unicode_literals __version__ = '1.11.3'
bsd-3-clause
Python
74ca49c62ba63b7eb42f3825ea5c036e32b98d50
Work around null TfL common names
jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk
busstops/management/commands/import_tfl_stops.py
busstops/management/commands/import_tfl_stops.py
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
""" Usage: ./manage.py import_tfl_stops < data/tfl/bus-stops.csv """ import requests from titlecase import titlecase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from busstops.management.import_from_csv import ImportFromCSVCommand from busstops.models import StopPoint class C...
mpl-2.0
Python
05f7c621b7c7504771349900d74633c2c2698fee
update test
project-callisto/callisto-core,project-callisto/callisto-core,SexualHealthInnovations/callisto-core,SexualHealthInnovations/callisto-core
callisto_core/wizard_builder/tests/test_forms.py
callisto_core/wizard_builder/tests/test_forms.py
from django.test import TestCase from .. import managers class FormSerializationTest(TestCase): manager = managers.FormManager fixtures = [ 'wizard_builder_data', ] expected_data = [{ 'descriptive_text': 'answer wisely', 'field_id': 'question_2', 'id': 2, 'page...
from django.test import TestCase from .. import managers class FormSerializationTest(TestCase): manager = managers.FormManager fixtures = [ 'wizard_builder_data', ] expected_data = [{ 'descriptive_text': 'answer wisely', 'field_id': 'question_2', 'id': 2, 'page...
agpl-3.0
Python
9a8fd944fb78d582f06d7165f097c1e54cb870dc
Add a mixin for calling full_clean() on save()
ojousima/asylum,rambo/asylum,HelsinkiHacklab/asylum,ojousima/asylum,hacklab-fi/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,rambo/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,ojousima/asylum,rambo/asy...
project/asylum/mixins.py
project/asylum/mixins.py
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): """Makes sure saves and deletes go via transa...
from reversion import revisions from django.db import transaction # Monkeypatch the revisions try: revisions.create_revision except AttributeError: revisions.create_revision = revisions.revision_context_manager.create_revision class AtomicVersionMixin(object): def save(self, *args, **kwargs): wit...
mit
Python
9100bbba7936c4944bae91062670d199bcfe9634
change the input url
elixirhub/events-portal-scraping-scripts
ScheduleUpdateData.py
ScheduleUpdateData.py
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import EventsPortal import sys import logging def logger(): """ Function that initialises logging system """ global logger # create logger with 'syncsolr' logger = logging.getLogger('scheduleAddData') ...
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import EventsPortal import sys import logging def logger(): """ Function that initialises logging system """ global logger # create logger with 'syncsolr' logger = logging.getLogger('scheduleAddData') ...
mit
Python
b492c988a8b51214b746cceb99bda0f046a550fd
Use numpy
rezoo/chainer,okuta/chainer,cupy/cupy,niboshi/chainer,chainer/chainer,wkentaro/chainer,ktnyt/chainer,hvy/chainer,kashif/chainer,okuta/chainer,tkerola/chainer,cupy/cupy,hvy/chainer,ktnyt/chainer,okuta/chainer,delta2323/chainer,benob/chainer,ktnyt/chainer,niboshi/chainer,kikusu/chainer,keisuke-umezawa/chainer,wkentaro/ch...
chainer/functions/array/permutate.py
chainer/functions/array/permutate.py
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check def _reverse_indices(indices): r = numpy.empty(len(indices), 'i') for i, ind in enumerate(indices): r[ind] = i return r class Permutate(function.Function): def __init__(self, indices, ax...
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check def _reverse_indices(indices): r = numpy.empty(len(indices), 'i') for i, ind in enumerate(indices): r[ind] = i return r class Permutate(function.Function): def __init__(self, indices, ax...
mit
Python
a7686d673a52ac1f00b71f4b1e55fc9735003073
Make harmonic oscillator in 2D work
WaveBlocks/WaveBlocksND,WaveBlocks/WaveBlocksND
examples/harmonic_oscillators/harmonic_2D_f.py
examples/harmonic_oscillators/harmonic_2D_f.py
algorithm = "fourier" T = 12 dt = 0.01 dimension = 2 ncomponents = 1 eps = 0.1 potential = "quadratic_2d" # The grid of our simulation domain limits = [(-6.283185307179586, 6.283185307179586), (-6.283185307179586, 6.283185307179586)] #number_nodes = [512, 512] number_nodes = [2048, 2048] # The parameter set of th...
algorithm = "fourier" T = 12 dt = 0.01 dimension = 2 ncomponents = 1 eps = 0.1 potential = "quadratic_2d" # The grid of our simulation domain limits = [(-6.283185307179586, 6.283185307179586), (-6.283185307179586, 6.283185307179586)] number_nodes = [512, 512] # The parameter set of the initial wavepacket Q = [[1....
bsd-3-clause
Python
39f7530f9082062abdd530255ab34d642097b605
Update ptvsd version number for 2.2 release.
bolabola/PTVS,christer155/PTVS,gomiero/PTVS,DEVSENSE/PTVS,mlorbetske/PTVS,ChinaQuants/PTVS,christer155/PTVS,dut3062796s/PTVS,Microsoft/PTVS,huguesv/PTVS,msunardi/PTVS,fivejjs/PTVS,alanch-ms/PTVS,Habatchii/PTVS,Microsoft/PTVS,denfromufa/PTVS,fjxhkj/PTVS,crwilcox/PTVS,MetSystem/PTVS,bolabola/PTVS,denfromufa/PTVS,modulexc...
Python/Product/PythonTools/ptvsd/setup.py
Python/Product/PythonTools/ptvsd/setup.py
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
apache-2.0
Python
aa72ac13733badef0e679bea22d8691d4ea05b88
Rebase off of develop
iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api
whats_fresh/whats_fresh_api/views/data_entry/preparations.py
whats_fresh/whats_fresh_api/views/data_entry/preparations.py
from django.http import (HttpResponse, HttpResponseNotFound, HttpResponseServerError) from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyE...
from django.http import (HttpResponse, HttpResponseNotFound, HttpResponseServerError) from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyE...
apache-2.0
Python
2bf9589a32cb0a8be157e09e789799608b8f386f
update dependency
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/icds_reports/migrations/0022_fix_aggregation.py
custom/icds_reports/migrations/0022_fix_aggregation.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates')) class Migration(migrations.Migration): dependencies = [ ('i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates')) class Migration(migrations.Migration): dependencies = [ ('i...
bsd-3-clause
Python
7eab91efc4ee7f8fbcfe768440ef88c077989e66
Add a test for `svo_fps` query parameter names
imbasimba/astroquery,imbasimba/astroquery
astroquery/svo_fps/tests/test_svo_fps_remote.py
astroquery/svo_fps/tests/test_svo_fps_remote.py
from io import BytesIO import pytest from astropy import units as u from astropy.io.votable import parse from astroquery.svo_fps import conf, SvoFps from astroquery.svo_fps.core import QUERY_PARAMETERS @pytest.mark.remote_data class TestSvoFpsClass: def test_get_filter_index(self): table = SvoFps.get_f...
import pytest from astropy import units as u from ..core import SvoFps @pytest.mark.remote_data class TestSvoFpsClass: def test_get_filter_index(self): table = SvoFps.get_filter_index(12_000*u.angstrom, 12_100*u.angstrom) # Check if column for Filter ID (named 'filterID') exists in table ...
bsd-3-clause
Python
6794bb897e7e8730b1c3ab2fc6b856865887ac8b
Use a simpler trace logger that does not prepend timestamps
sassoftware/rbm,sassoftware/rbm,sassoftware/rbm
scripts/upsrv_schema.py
scripts/upsrv_schema.py
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore class SimpleFileLog(tracelog.FileLog): def pr...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
apache-2.0
Python
5b50c1067673a0284a1bf47f7f7eabd780a95b14
Complete TODO
conwetlab/ckanext-privatedatasets,conwetlab/ckanext-privatedatasets,conwetlab/ckanext-privatedatasets,conwetlab/ckanext-privatedatasets
ckanext/privatedatasets/converters_validators.py
ckanext/privatedatasets/converters_validators.py
import db from ckan.plugins import toolkit from ckan.common import _ from itertools import count def private_datasets_metadata_checker(key, data, errors, context): dataset_id = data.get(('id',)) private_val = data.get(('private',)) # If the private field is not included in the data dict, we must check ...
import db from ckan.common import _ from itertools import count def private_datasets_metadata_checker(key, data, errors, context): # TODO: In some cases, we will need to retireve all the dataset information if it isn't present... private_val = data.get(('private',)) private = private_val is True if isi...
agpl-3.0
Python
f542d2856f2df723a580f93125a79b97fca96098
change save filename
majorika/crawlers,majorika/crawlers,teampopong/crawlers,lexifdev/crawlers,lexifdev/crawlers,teampopong/crawlers
committee_list/crawlers/committee_list/parser.py
committee_list/crawlers/committee_list/parser.py
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import os import urllib2 import html5lib def get_webpage(f): page = html5lib.HTMLParser(\ tree=html5lib.treebuilders.getTreeBuilder("lxml"),\ namespaceHTMLElements=False) p = page.parse(f) return p def get_elements(p, x): elems = p.xpath(x...
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import os import urllib2 import html5lib def get_webpage(f): page = html5lib.HTMLParser(\ tree=html5lib.treebuilders.getTreeBuilder("lxml"),\ namespaceHTMLElements=False) p = page.parse(f) return p def get_elements(p, x): elems = p.xpath(x...
agpl-3.0
Python
1a288b14c047f5ec823017b33af23e3f51fdfb5e
fix minor bug in pageobjects/__init__ This if block wasn't executing the class defined _object_name as None, but it should.
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
cumulusci/robotframework/pageobjects/__init__.py
cumulusci/robotframework/pageobjects/__init__.py
from robot.libraries.BuiltIn import BuiltIn from .PageObjects import PageObjects # noqa: F401 from .baseobjects import BasePage, ListingPage, HomePage, DetailPage # noqa: F401 def pageobject(page_type, object_name=None): """A decorator to designate a class as a page object""" BuiltIn().log("importing page o...
from robot.libraries.BuiltIn import BuiltIn from .PageObjects import PageObjects # noqa: F401 from .baseobjects import BasePage, ListingPage, HomePage, DetailPage # noqa: F401 def pageobject(page_type, object_name=None): """A decorator to designate a class as a page object""" BuiltIn().log("importing page o...
bsd-3-clause
Python
fbd57a4b62772368182425ae15226d78de0ce13e
Reset fix
edx/edx-ora,edx/edx-ora,edx/edx-ora,edx/edx-ora
controller/management/commands/remove_expired_subs.py
controller/management/commands/remove_expired_subs.py
from django.core.management.base import BaseCommand from django.conf import settings from django.utils import timezone #from http://jamesmckay.net/2009/03/django-custom-managepy-commands-not-committing-transactions/ #Fix issue where db data in manage.py commands is not refreshed at all once they start running from dja...
from django.core.management.base import BaseCommand from django.conf import settings from django.utils import timezone #from http://jamesmckay.net/2009/03/django-custom-managepy-commands-not-committing-transactions/ #Fix issue where db data in manage.py commands is not refreshed at all once they start running from dja...
agpl-3.0
Python
7a890ef8edc02870219aa85a9a3295674a7a50d3
Update getClanUserJSONs.py
adherrling/destiny-gotg,adherrling/destiny-gotg
Leaderboard/getClanUserJSONs.py
Leaderboard/getClanUserJSONs.py
#!/usr/bin/python import json import requests from getHeader import getHeader def retrieveClanUserJSON(): morePages = True pageCounter = 1 while morePages: clan_url = "https://bungie.net/Platform/Group//Members/?lc=en&fmt=true&currentPage="+str(pageCounter)+"&platformType=2" print "Connect...
#!/usr/bin/python import json import requests from getHeader import getHeader def retrieveClanUserJSON(): morePages = True pageCounter = 1 while morePages: clan_url = "https://bungie.net/Platform/Group/1407546/Members/?lc=en&fmt=true&currentPage="+str(pageCounter)+"&platformType=2" print "...
mit
Python
84ad17a2d968f47da0f8d22b3a371f51d2f65411
Update humidity_chart.py
webbhm/OpenAg_MVP_UI,webbhm/OpenAg_MVP_UI,webbhm/OpenAg_MVP_UI
MVP_UI/python/humidity_chart.py
MVP_UI/python/humidity_chart.py
# /usr/bin/env python import pygal import requests import json #Query the database for data #Order descending so the last rows are first #These modifiers get humidity and return only 60 rows r = requests.get('http://127.0.0.1:5984/mvp_sensor_data/_design/doc/_view/attribute_value?startkey=["humidity",{}]&endkey=["hum...
import pygal import requests import json #Query the database for data #Order descending so the last rows are first #These modifiers get humidity and return only 60 rows r = requests.get('http://127.0.0.1:5984/mvp_sensor_data/_design/doc/_view/attribute_value?startkey=["humidity",{}]&endkey=["humidity"]&descending=true...
mit
Python
31e4da5e782c29d7d0c893a3fc9af48260c50a3a
Save form data to DB on each step
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/ansible/views.py
src/ansible/views.py
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github, Playbook import sys def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): ...
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from formtools.wizard.views import SessionWizardView from ansible.models import Github def index(request): return HttpResponse("200") class PlaybookWizard(SessionWizardView): def get_form_initial(...
bsd-3-clause
Python
09726db0fc453cb1ebc7b0cf91d7e8dd5917bcf3
Update wsgi/myflaskapp.py
ghaff/whitewater-gauges,ghaff/whitewater-gauges
wsgi/myflaskapp.py
wsgi/myflaskapp.py
import os from flask import Flask from flask import request import pymongo import json from bson import json_util from bson import objectid import re app = Flask(__name__) #add this so that flask doesn't swallow error messages app.config['PROPAGATE_EXCEPTIONS'] = True #a base urls that returns all the parks in the co...
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()
mit
Python
737234eec4a0c043e064c5c238339a90e52e0dc9
Revert "Made import relative in __main__.py"
antske/coref_draft
multisieve_coreference/__main__.py
multisieve_coreference/__main__.py
from multisieve_coreference import resolve_coreference resolve_coreference.main()
from . import resolve_coreference resolve_coreference.main()
apache-2.0
Python
03c4323cf13365204540cf9d06ead88a6a3925b7
work around script reloading bug in redis-py
vpuzzella/sixpack,smokymountains/sixpack,blackskad/sixpack,llonchj/sixpack,smokymountains/sixpack,smokymountains/sixpack,vpuzzella/sixpack,blackskad/sixpack,spjwebster/sixpack,seatgeek/sixpack,blackskad/sixpack,nickveenhof/sixpack,seatgeek/sixpack,blackskad/sixpack,spjwebster/sixpack,seatgeek/sixpack,nickveenhof/sixpac...
sixpack/db.py
sixpack/db.py
import redis from redis.connection import ConnectionPool, PythonParser from config import CONFIG as cfg # Because of a bug (https://github.com/andymccurdy/redis-py/issues/318) with # script reloading in `redis-py, we need to force the `PythonParser` to prevent # sixpack from crashing if redis restarts (or scripts are...
import redis from config import CONFIG as cfg REDIS = redis.StrictRedis(host=cfg.get('redis_host'), port=cfg.get('redis_port'), db=cfg.get('redis_db')) DEFAULT_PREFIX = cfg.get('redis_prefix') def _key(k): return "{0}:{1}".format(DEFAULT_PREFIX, k) monotonic_zadd = REDIS.register_script(""" local sequential...
bsd-2-clause
Python
b0421ab7cca69862bcacf7922cd1d37276dfdbe3
convert doctype log settings db.sql calls
yashodhank/frappe,frappe/frappe,StrellaGroup/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,yashodhank/frappe,StrellaGroup/frappe,almeidapaulopt/frappe,yashodhank/frappe,frappe/frappe,yashodhank/frappe,mhbu50/frappe,almeidapaulopt/frappe,frappe/frappe,mhbu50/frappe,mhbu50/frappe,almeidapaulopt/frappe,mhbu50/frappe
frappe/core/doctype/log_settings/log_settings.py
frappe/core/doctype/log_settings/log_settings.py
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # License: MIT. See LICENSE import frappe from frappe import _ from frappe.model.document import Document class LogSettings(Document): def clear_logs(self): self.clear_error_logs() self.clear_activity_logs() self.clear_email_que...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # License: MIT. See LICENSE import frappe from frappe import _ from frappe.model.document import Document class LogSettings(Document): def clear_logs(self): self.clear_error_logs() self.clear_activity_logs() self.clear_email_que...
mit
Python
c99db48154ed327aead8a56211ac5125529f8ea0
Change merge_and_count to accept 2 array arguments
timpel/stanford-algs,timpel/stanford-algs
count-inversions/count_inversions.py
count-inversions/count_inversions.py
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr1, arr2): return 0 def main(arr_len): ...
from random import randint import sys def sort_and_count(arr): n = len(arr) if n == 1: return 0 else: first_half = arr[:n/2] second_half = arr[n/2:] return merge_and_count_split(sort_and_count(first_half), sort_and_count(second_half)) def merge_and_count_split(arr): return 0 def main(arr_len): test_a...
mit
Python
df1b2ad504d422247ac27f551810ab463eaea86e
add changelog to the admin
crateio/crate.io
crate_project/apps/packages/admin.py
crate_project/apps/packages/admin.py
from django.contrib import admin from packages.models import Package, Release, ReleaseFile, TroveClassifier, PackageURI from packages.models import ReleaseRequire, ReleaseProvide, ReleaseObsolete, ReleaseURI, ChangeLog from packages.tasks import save_releases def releases_save(modeladmin, request, queryset): sav...
from django.contrib import admin from packages.models import Package, Release, ReleaseFile, TroveClassifier, PackageURI from packages.models import ReleaseRequire, ReleaseProvide, ReleaseObsolete, ReleaseURI from packages.tasks import save_releases def releases_save(modeladmin, request, queryset): save_releases....
bsd-2-clause
Python
553f3a3a1a72f0f0ba60f739fce5d6b22f23cb22
fix xpath of yandex
dalf/searx,potato/searx,jibe-b/searx,matejc/searx,asciimoo/searx,jcherqui/searx,dalf/searx,jibe-b/searx,jibe-b/searx,jcherqui/searx,matejc/searx,jcherqui/searx,matejc/searx,PwnArt1st/searx,potato/searx,misnyo/searx,asciimoo/searx,asciimoo/searx,PwnArt1st/searx,misnyo/searx,PwnArt1st/searx,matejc/searx,potato/searx,pota...
searx/engines/yandex.py
searx/engines/yandex.py
""" Yahoo (Web) @website https://yandex.ru/ @provide-api ? @using-api no @results HTML (using search portal) @stable no (HTML can change) @parse url, title, content """ from urllib import urlencode from lxml import html from searx.search import logger logger = logger.getChild('yandex engi...
""" Yahoo (Web) @website https://yandex.ru/ @provide-api ? @using-api no @results HTML (using search portal) @stable no (HTML can change) @parse url, title, content """ from urllib import urlencode from lxml import html from searx.search import logger logger = logger.getChild('yandex engi...
agpl-3.0
Python
71ba73af5b2d9a54f340be901199f4facc2617a6
Update build_sdk.py
adjust/unity_sdk,adjust/unity_sdk,adjust/unity_sdk
scripts/build_sdk.py
scripts/build_sdk.py
#!/usr/bin/python import os, sys from scripting_utils import * import build_sdk_android as android import build_sdk_ios as ios import build_sdk_windows as windows set_log_tag('BUILD-SDK') if __name__ != "__main__": error('Error. Do not import this script, but run it explicitly.') exit() # -----...
#!/usr/bin/python import os, sys from scripting_utils import * import build_sdk_android as android import build_sdk_ios as ios import build_sdk_windows as windows set_log_tag('BUILD-SDK') if __name__ != "__main__": error('Error. Do not import this script, but run it explicitly.') exit() # -----...
mit
Python
aa026fb39bd4a053766988383e9374dba20fd7f5
Use symlinks to avoid weird behavior from removing the CWD while we're in it
lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123
scripts/init_tree.py
scripts/init_tree.py
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' print 'Your CWD is', cwd return 1 os.chdir('../../') os.mkdir('frensie_build_tree') #os.renames('FRENSIE'...
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' return 1 os.chdir('../../') os.mkdir('frensie_build_tree') os.renames('FRENSIE', 'frensie_build_tree/FRENSIE') ...
bsd-3-clause
Python
6e764cf0a4185adbc543683f2781665d1f7fbd48
fix on preloading new job page with "undefined" git hash
catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult
dashboard/dashboard/pinpoint/handlers/commits.py
dashboard/dashboard/pinpoint/handlers/commits.py
# Copyright 2019 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. from __future__ import print_function from __future__ import division from __future__ import absolute_import import logging from dashboard.api import api_r...
# Copyright 2019 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. from __future__ import print_function from __future__ import division from __future__ import absolute_import from dashboard.api import api_request_handler f...
bsd-3-clause
Python
cd014901a4453cda1576b2f10ee3fc6235b8c5e5
update for 1.7
asteven/dpkt
dpkt/__init__.py
dpkt/__init__.py
# $Id$ """fast, simple packet creation and parsing.""" __author__ = 'Dug Song <dugsong@monkey.org>' __copyright__ = 'Copyright (c) 2004 Dug Song' __license__ = 'BSD' __url__ = 'http://dpkt.googlecode.com/' __version__ = '1.7' from dpkt import * import ah import aim import arp import asn1 import bgp import cdp impor...
# $Id$ """fast, simple packet creation and parsing.""" __author__ = 'Dug Song <dugsong@monkey.org>' __copyright__ = 'Copyright (c) 2004 Dug Song' __license__ = 'BSD' __url__ = 'http://monkey.org/~dugsong/dpkt/' __version__ = '1.6' from dpkt import * import ah import aim import arp import asn1 import bgp import cdp ...
bsd-3-clause
Python
0b5675c8940b5b4ffe0e758432c2c724e54f685e
add background and mouse responder methods
schriftgestalt/GlyphsSDK,schriftgestalt/GlyphsSDK,schriftgestalt/GlyphsSDK
ObjectWrapper/GlyphsApp/UI/CanvasView.py
ObjectWrapper/GlyphsApp/UI/CanvasView.py
# -*- coding: utf-8 -*- from __future__ import print_function __all__ = ["CanvasView"] import traceback from vanilla import Group from AppKit import NSView, NSRectFill, NSColor class CanvasView_view(NSView): def drawRect_(self, rect): try: if self._backgroundColor is not None: self._backgroundColor.set...
# -*- coding: utf-8 -*- from __future__ import print_function __all__ = ["CanvasView"] import traceback from vanilla import Group from AppKit import NSView class CanvasView_view(NSView): def drawRect_(self, rect): try: if self._delegate != None: self._delegate.draw(self) except: print(traceback.fo...
apache-2.0
Python
edb2bfb45c069a1b83f1e9a82c64e2910c4d1fda
add help and show version.
Tynox/SimpleRenameTool
rename_tool.py
rename_tool.py
#!/usr/bin/env python # encoding:utf-8 """ A Simple Rename Tool. """ import os import sys import getopt version = 0.2 opts = None args = None fileList = None dir = None def init(): """ Init and get arguments. """ global opts global args # get options try: opts, args = geto...
#!/usr/bin/env python # encoding:utf-8 """ A Simple Rename Tool. version: 0.2 """ import os import sys import getopt opts = None args = None fileList = None dir = None def init(): """ Init and get arguments. """ global opts global args try: #dir = sys.argv[1] opts, args...
unlicense
Python
9c642cb06a4f3a7cea11d6020752f0eabaebc90c
update dev version after 0.17.0 tag [skip ci]
desihub/desisurvey,desihub/desisurvey
py/desisurvey/_version.py
py/desisurvey/_version.py
__version__ = '0.17.0.dev1045'
__version__ = '0.17.0'
bsd-3-clause
Python
9118b0326ac1c27e9773cc12fd88fccbea26442b
update dev version after 1.1.1 tag [ci skip]
desihub/desitarget,desihub/desitarget
py/desitarget/_version.py
py/desitarget/_version.py
__version__ = '1.1.1.dev5118'
__version__ = '1.1.1'
bsd-3-clause
Python
ba662a902384ca2a07316f66407ee703f65a58bd
Update urls
aptivate/alfie,aptivate/kashana,aptivate/alfie,aptivate/alfie,daniell/kashana,aptivate/alfie,aptivate/kashana,aptivate/kashana,daniell/kashana,daniell/kashana,daniell/kashana,aptivate/kashana
django/website/contacts/auth_urls.py
django/website/contacts/auth_urls.py
from django.conf.urls import patterns, url from django.contrib.auth.views import ( login, logout_then_login, password_reset_confirm ) from .views import ResetPassword, change_password urlpatterns = [ url(r'login/$', login, name='login'), url(r'logout/$', logout_then_login, name='logout'), # Activatio...
from django.conf.urls import patterns, url from django.contrib.auth.views import ( login, logout_then_login, password_reset_confirm ) from .views import ResetPassword, change_password urlpatterns = patterns('', url(r'login/$', login, name='login'), url(r'logout/$', logout_then_login, name='logout'), ...
agpl-3.0
Python
69ed2a36ab8531cb22bdc26afcf58780e3889d19
check service manager using /proc/1/comm
tcpcloud/openvstorage,tcpcloud/openvstorage,tcpcloud/openvstorage,tcpcloud/openvstorage
ovs/extensions/services/service.py
ovs/extensions/services/service.py
# Copyright 2015 CloudFounders NV # # 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 writ...
# Copyright 2015 CloudFounders NV # # 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 writ...
apache-2.0
Python
761b8e7e471f111b78f36f7aad34e8d89fdc3002
Make oweb.tests.views.account_delete.test_redirect work
Mischback/django-oweb,Mischback/django-oweb
oweb/tests/views/account_delete.py
oweb/tests/views/account_delete.py
"""Contains tests for oweb.views.updates.account_delete""" # Python imports from unittest import skip # Django imports from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.contrib.auth.models import User # app imports from oweb.tests import OWebViewTests from oweb.mod...
"""Contains tests for oweb.views.updates.account_delete""" # Python imports from unittest import skip # Django imports from django.core.urlresolvers import reverse # app imports from oweb.tests import OWebViewTests class OWebViewsAccountDeleteTests(OWebViewTests): def test_login_required(self): """Unauth...
mit
Python
25aaca207d1c720d414df2eebca3acc954c5eb88
Use extensions in view
alexandermendes/pybossa-discourse
pybossa_discourse/view.py
pybossa_discourse/view.py
# -*- coding: utf8 -*- """Views module for pybossa-discourse.""" from flask import Blueprint, request, url_for, flash, redirect from flask import current_app as app from flask.ext.login import current_user from . import discourse_sso, discourse_client def index(): """Attempt to sign in via SSO then redirect to D...
# -*- coding: utf8 -*- """Views module for pybossa-discourse.""" from flask import Blueprint, request, url_for, flash, redirect from flask import current_app as app from flask.ext.login import current_user def index(): """Attempt to sign in via SSO then redirect to Discourse.""" discourse_sso = app.extension...
bsd-3-clause
Python
036a71a41e64f9eb08314a285e3c4895af3b410b
Update pylsy_test.py
bcho/Pylsy,muteness/Pylsy,huiyi1990/Pylsy,gnithin/Pylsy,gnithin/Pylsy,huiyi1990/Pylsy,bcho/Pylsy,muteness/Pylsy
pylsy/tests/pylsy_test.py
pylsy/tests/pylsy_test.py
# -*- coding: utf-8 -*- import sys sys.path.append('..') from __future__ import absolute_import import unittest from pylsy.pylsy import pylsytable class PylsyTableTests(unittest.TestCase): def setUp(self): attributes = ["name", "age"] self.table = pylsytable(attributes) def tearDown(self): ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import unittest from pylsy.pylsy import pylsytable class PylsyTableTests(unittest.TestCase): def setUp(self): attributes = ["name", "age"] self.table = pylsytable(attributes) def tearDown(self): self.table = None de...
mit
Python
4a8678d2b8ac5b7609244a38affaf308564a5c1f
Make SVDFile.from_builtin() handle missing or bad svd zip.
mbedmicro/pyOCD,pyocd/pyOCD,mesheven/pyOCD,flit/pyOCD,flit/pyOCD,mesheven/pyOCD,mesheven/pyOCD,mbedmicro/pyOCD,mbedmicro/pyOCD,pyocd/pyOCD
pyocd/debug/svd/loader.py
pyocd/debug/svd/loader.py
# pyOCD debugger # Copyright (c) 2015-2019 Arm Limited # SPDX-License-Identifier: Apache-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://www.apache.org/licenses/LICENSE-2.0...
# pyOCD debugger # Copyright (c) 2015-2019 Arm Limited # SPDX-License-Identifier: Apache-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://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
Python
64d8bb7f620c8ce047a442fe8d17092428a0e33b
fix tag
PyThaiNLP/pythainlp
pythainlp/tag/__init__.py
pythainlp/tag/__init__.py
# -*- coding: utf-8 -*- # TODO ปรับ API ให้เหมือน nltk from __future__ import absolute_import,division,print_function,unicode_literals import sys def pos_tag(text,engine='old'): """ ระบบ postaggers pos_tag(text,engine='old') engine ที่รองรับ * old เป็น UnigramTagger * artagger เป็น RDR POS Tagger """ if engin...
# -*- coding: utf-8 -*- # TODO ปรับ API ให้เหมือน nltk from __future__ import absolute_import,division,print_function,unicode_literals import sys def pos_tag(text,engine='old'): """ ระบบ postaggers pos_tag(text,engine='old') engine ที่รองรับ * old เป็น UnigramTagger * artagger เป็น RDR POS Tagger """ if engin...
apache-2.0
Python
75c50c31cc6f7a5075f35d4913acbeb5f41ded50
fix for error messages
rmorlok/pytracts
pytracts/message_types.py
pytracts/message_types.py
#!/usr/bin/env python # # Copyright 2014 Docalytics Inc, Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
#!/usr/bin/env python # # Copyright 2014 Docalytics Inc, Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
Python
3a8e857aa12ac55a5b5e531e72356541a185da56
Load from different file
kim135797531/opencog,Allend575/opencog,roselleebarle04/opencog,kinoc/opencog,sumitsourabh/opencog,rTreutlein/atomspace,cosmoharrigan/opencog,yantrabuddhi/atomspace,ruiting/opencog,iAMr00t/opencog,virneo/atomspace,kinoc/opencog,Allend575/opencog,tim777z/opencog,williampma/opencog,rodsol/atomspace,inflector/atomspace,tim...
opencog/python/pln/examples/relex2logic/evaluation_to_member_example.py
opencog/python/pln/examples/relex2logic/evaluation_to_member_example.py
""" For running evaluation_to_member_agent.py without the cogserver """ from __future__ import print_function from pln.examples.relex2logic import evaluation_to_member_agent from opencog.atomspace import types, AtomSpace, TruthValue from opencog.scheme_wrapper import load_scm, scheme_eval, scheme_eval_h, __init__ from...
""" For running evaluation_to_member_agent.py without the cogserver """ from __future__ import print_function from pln.examples.relex2logic import evaluation_to_member_agent from opencog.atomspace import types, AtomSpace, TruthValue from opencog.scheme_wrapper import load_scm, scheme_eval, scheme_eval_h, __init__ from...
agpl-3.0
Python
7b1b323da3e2fcf79c0bff36d6e0665d1b88e74e
Fix stupid typo...
editorsnotes/editorsnotes,editorsnotes/editorsnotes
editorsnotes/auth/utils.py
editorsnotes/auth/utils.py
from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.utils.http import urlsafe_base64_encode def send_activation_email(request, user): b64uid = urlsafe_base64_encode(str(us...
from django.contrib.auth.tokens import PasswordResetTokenGenerator from django conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.utils.http import urlsafe_base64_encode def send_activation_email(request, user): b64uid = urlsafe_base64_encode(str(us...
agpl-3.0
Python
9359d64c56c1735544c2e2e77b160bb14048b497
use polling_district_id
andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_salford.py
polling_stations/apps/data_collection/management/commands/import_salford.py
""" Import Salford """ import sys from django.contrib.gis.geos import Point from data_collection.management.commands import BaseShpImporter class Command(BaseShpImporter): """ Imports the Polling Station data from Salford """ council_id = 'E08000006' districts_name = 'Salford_Polling_Districts...
""" Import Salford """ import sys from django.contrib.gis.geos import Point from data_collection.management.commands import BaseShpImporter class Command(BaseShpImporter): """ Imports the Polling Station data from Salford """ council_id = 'E08000006' districts_name = 'Salford_Polling_Districts...
bsd-3-clause
Python
cd48c66406c39ca6dd6bdc6ba7c2be0df623e6ae
Fix return codes for check recipient
meskio/leap_mx,meskio/leap_mx,leapcode/leap_mx,micah/leap_mx,leapcode/leap_mx,micah/leap_mx
src/leap/mx/check_recipient_access.py
src/leap/mx/check_recipient_access.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # check_recipient_access.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
agpl-3.0
Python
3d53d3fe37e36a8f05a8cae27f8aa138b063fcd6
add docstrings (#937)
TresAmigosSD/SMV,TresAmigosSD/SMV,TresAmigosSD/SMV,TresAmigosSD/SMV
src/main/python/smv/py4j_interface.py
src/main/python/smv/py4j_interface.py
# This file is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
# This file is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
apache-2.0
Python
7f32ca34ec26174e10b5b8de65883b39293c3ed0
Update assignment5.py
LamaHamadeh/Microsoft-DAT210x
Module-3/assignment5.py
Module-3/assignment5.py
''' author: Lama Hamadeh ''' import pandas as pd import matplotlib.pyplot as plt import matplotlib from pandas.tools.plotting import parallel_coordinates # Look pretty... matplotlib.style.use('ggplot') wheat_dataset=pd.read_csv('/Users/ADB3HAMADL/Desktop/Anaconda_Packages/DAT210x-master/Module3/Datasets/wheat.data',...
# # This code is intentionally missing! # Read the directions on the course lab page! # import pandas as pd import matplotlib.pyplot as plt import matplotlib from pandas.tools.plotting import parallel_coordinates # Look pretty... matplotlib.style.use('ggplot') wheat_dataset=pd.read_csv('/Users/ADB3HAMADL/Desktop/Ana...
mit
Python
7888242104e9f14b4e8a926e37aa793a60c36f10
Implement files.put/files.template
Fizzadar/pyinfra,Fizzadar/pyinfra
pyinfra/modules/files.py
pyinfra/modules/files.py
# pyinfra # File: pyinfra/modules/file.py # Desc: manage files/templates <> server from cStringIO import StringIO from jinja2 import Template from pyinfra.api import operation @operation def put(local_file, remote_file): '''Copy a local file to the remote system.''' # Just load the local file local_fil...
# pyinfra # File: pyinfra/modules/file.py # Desc: manage files/templates <> server from pyinfra.api import operation @operation def put(local_file, remote_file): '''[Not implemented] Copy a local file to the remote system.''' pass @operation def template(template_name, remote_file, **data): '''[Not imp...
mit
Python
da24aa8c97713a1ba5b5735aa169f8cf050fe88a
add function(image to csv).
CORDEA/deeplearning-tutorials,CORDEA/deeplearning-tutorials
pylearn2/convertImage.py
pylearn2/convertImage.py
#!/usr/bin/env python # encoding:utf-8 # # Copyright [2015] [Yoshihiro Tanaka] # 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 requir...
#!/usr/bin/env python # encoding:utf-8 # # Copyright [2015] [Yoshihiro Tanaka] # 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 requir...
apache-2.0
Python
368306261e2d206d4dfad8f647a7d459462631a4
Optimize number 37: x in set() faster than x in list()
dhermes/project-euler,dhermes/project-euler,dhermes/project-euler
python/too_slow/no037.py
python/too_slow/no037.py
#!/usr/bin/env python # The number 3797 has an interesting property. Being prime itself, # it is possible to continuously remove digits from left to right, # and remain prime at each stage: # 3797, 797, 97, and 7. # Similarly we can work from right to left: 3797, 379, 37, and 3. # Find the sum of the only eleven pri...
#!/usr/bin/env python # The number 3797 has an interesting property. Being prime itself, # it is possible to continuously remove digits from left to right, # and remain prime at each stage: # 3797, 797, 97, and 7. # Similarly we can work from right to left: 3797, 379, 37, and 3. # Find the sum of the only eleven pri...
apache-2.0
Python
3ac8788c9090b5655676b239db826ef5da3544f4
Update version to 0.11.0
artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service
storage_service/storage_service/__init__.py
storage_service/storage_service/__init__.py
__version__ = '0.11.0'
__version__ = '0.10.0'
agpl-3.0
Python
0675090877483bcbbfbc7b3d7ef8ed3f97085f8c
Add python_2_unicode_compatible
zooming-tan/Project-AENEAS,zooming-tan/Project-AENEAS,zooming-tan/Project-AENEAS,zooming-tan/Project-AENEAS
Project-AENEAS/issues/models.py
Project-AENEAS/issues/models.py
"""Mini Issue Tracker program. Originally taken from Paul Bissex's blog post: http://news.e-scribe.com/230 and snippet: http://djangosnippets.org/snippets/28/ """ from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.utils.encoding import python_2_unicode_...
"""Mini Issue Tracker program. Originally taken from Paul Bissex's blog post: http://news.e-scribe.com/230 and snippet: http://djangosnippets.org/snippets/28/ """ from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy ...
bsd-3-clause
Python
14c2019aa5bf716cab0f2ed2b97bbc32d8c74a81
Improve parameters of sync_suricate command
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/feedback/management/commands/sync_suricate.py
geotrek/feedback/management/commands/sync_suricate.py
from django.core.management.base import BaseCommand from geotrek.feedback.parsers import SuricateParser class Command(BaseCommand): leave_locale_alone = True def add_arguments(self, parser): # parser.add_argument('-l', dest='limit', type=int, help='Limit number of lines to import') # todo ...
from django.core.management.base import BaseCommand from geotrek.feedback.parsers import SuricateParser class Command(BaseCommand): leave_locale_alone = True def add_arguments(self, parser): # parser.add_argument('-l', dest='limit', type=int, help='Limit number of lines to import') # todo ...
bsd-2-clause
Python
e78bd17a742961368c4b026be5a447e3d234c870
Update tensorflow10_def_add_layer.py
wangwei7175878/tutorials
tensorflowTUT/tensorflow10_def_add_layer.py
tensorflowTUT/tensorflow10_def_add_layer.py
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial import tensorflow as tf def add_layer(inputs, in_size, out_size, activation_function=None): Weights...
import tensorflow as tf def add_layer(inputs, in_size, out_size, activation_function=None): Weights = tf.Variable(tf.random_normal([in_size, out_size])) biases = tf.Variable(tf.zeros([1, out_size]) + 0.1) Wx_plus_b = tf.matmul(inputs, Weights) + biases if activation_function is None: outputs =...
mit
Python
44629d5a6d3b76e721aa0cf11041924f5a088d6e
fix output values
FRC-1123/frc2017-1123,FRC-1123/frc2017-1123,FRC-1123/frc2017-1123,FRC-1123/frc2017-1123
robot/robot.py
robot/robot.py
#!/usr/bin/env python3 import wpilib import ctre class Robot(wpilib.IterativeRobot): def robotInit(self): """ This function is called upon program startup and should be used for any initialization code. """ left_motor = ctre.CANTalon(0) right_motor = ctre.CANTalon(...
#!/usr/bin/env python3 import wpilib import ctre class Robot(wpilib.IterativeRobot): def robotInit(self): """ This function is called upon program startup and should be used for any initialization code. """ left_motor = ctre.CANTalon(0) right_motor = ctre.CANTalon(...
mit
Python
99553ec68046962cda61c4296e6345180f377780
fix serialization bug
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
soil/views.py
soil/views.py
import uuid from datetime import datetime from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, Http404, HttpResponse from django.core.cache import cache import logging from django.shortcuts import render_to_response from dja...
import uuid from datetime import datetime from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, Http404, HttpResponse from django.core.cache import cache import logging from django.shortcuts import render_to_response from dja...
bsd-3-clause
Python
b013a84227adf2f25c09519762c2610ea8a500da
Test Unit
R3SWebDevelopment/HappyDogs,R3SWebDevelopment/HappyDogs,R3SWebDevelopment/HappyDogs,R3SWebDevelopment/HappyDogs
HappyDogs/HappyDogs/urls.py
HappyDogs/HappyDogs/urls.py
from django.conf.urls import include, url from HappyDogs.apps.HappyDogs.views import happy_dogs_home from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^$', happy_dogs_home , name='index'), url(r'^happy_dogs/', include('HappyDogs.apps.HappyDogs.urls')), url(r'...
from django.conf.urls import include, url urlpatterns = [ url(r'^happy_dogs/', include('HappyDogs.apps.HappyDogs.urls')), url(r'^rest/happy_dogs/', include('HappyDogs.apps.HappyDogs.rest_urls')), ]
mit
Python
cf4e24ce50c535e91525465c65217f21b89448a6
add example using unicode
kmaehashi/sensorbee-python
example/general_example.py
example/general_example.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from pysensorbee import SensorBeeAPI class GeneralExample(object): def main(self): api = SensorBeeAPI() print("Runtime Status:") print(api.runtime_status()) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from pysensorbee import SensorBeeAPI class GeneralExample(object): def main(self): api = SensorBeeAPI() print("Runtime Status:") print(api.runtime_status()) ...
mit
Python
ec082a531ad2e6dbc3d8ce4de78c76b84d615c38
update view.py - import render from django shortcuts
django-fluent/django-fluent-contents,edoburu/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents
example/simplecms/views.py
example/simplecms/views.py
from django.http import Http404 from django.shortcuts import render from django.template.context import RequestContext from simplecms.models import Page def page_detail(request, path): stripped = path.strip('/') if path else '' stripped = stripped and u'/%s/' % stripped or '/' try: page = Page.ob...
from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from simplecms.models import Page def page_detail(request, path): stripped = path.strip('/') if path else '' stripped = stripped and u'/%s/' % stripped or '/' try: pa...
apache-2.0
Python
b275b06379fea006e91f45c976d72751595031dc
Comment out string import since it is not used
mozilla-services/screenshots,mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/pageshot,mozilla-services/pageshot,mozilla-services/pageshot,mozilla-services/screenshots
test/server/test_image_validation.py
test/server/test_image_validation.py
from urlparse import urljoin from clientlib import ( make_example_shot, make_random_id, screenshots_session, example_images ) import random # import string # Hack to make this predictable: random.seed(0) def test_invalid_image_url(): with screenshots_session() as user: shot_id = make_rand...
from urlparse import urljoin from clientlib import ( make_example_shot, make_random_id, screenshots_session, example_images ) import random import string # Hack to make this predictable: random.seed(0) def test_invalid_image_url(): with screenshots_session() as user: shot_id = make_random...
mpl-2.0
Python
aefd972c7fb423396f59da03a1d460cd3559d1e1
Remove unnecesssary comments of old function signatures
nelson-liu/paraphrase-id-tensorflow,nelson-liu/paraphrase-id-tensorflow
duplicate_questions/data/tokenizers/word_tokenizers.py
duplicate_questions/data/tokenizers/word_tokenizers.py
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in s...
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sente...
mit
Python
586c3fb90bd765ebee1f5e63f94a86144623d9d2
Update map-sum-pairs.py
yiwen-luo/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,yiwen-luo/LeetCode,kamyu104/LeetCode,yiwen-luo/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11...
Python/map-sum-pairs.py
Python/map-sum-pairs.py
# Time: O(n), n is the length of key # Space: O(t), t is the number of nodes in trie # Implement a MapSum class with insert, and sum methods. # # For the method insert, you'll be given a pair of (string, integer). # The string represents the key and the integer represents the value. # If the key already existed, then...
# Time: O(n), n is the length of key # Space: O(t), t is the number of nodes in trie class MapSum(object): def __init__(self): """ Initialize your data structure here. """ _trie = lambda: collections.defaultdict(_trie) self.__root = _trie() def insert(self, key, ...
mit
Python
6a833e64c4fdfd321a1e031133cf22aaec2d92a6
Test format_error
PyBossa/pbs,PyBossa/pbs,PyBossa/pbs
test/test.py
test/test.py
"""Test module for pbs client.""" import pbclient from helpers import * from mock import patch from nose.tools import assert_raises from requests import exceptions class Test(object): """Test class for pbs.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "...
"""Test module for pbs client.""" import pbclient from helpers import * from mock import patch from nose.tools import assert_raises from requests import exceptions class Test(object): """Test class for pbs.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "...
agpl-3.0
Python
d9c677a35d18a878ef8d253a9453e93da3341e96
Add extremely basic template for command modules
johnmarcampbell/twircBot
runTwircBot.py
runTwircBot.py
#!/usr/bin/env python3 from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
#!/usr/bin/env python3 from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start()
mit
Python
d58015f39451f4efc4a66f77f62e01009c22917b
Fix the windows red build by removing the known_host backup all the time
neo4j/neo4j-python-driver,neo4j/neo4j-python-driver
test/util.py
test/util.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2016 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2016 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
apache-2.0
Python
fa14d14bcd83a630eeffb0b6504612be24754c09
add catch for windows -- clear() doesn't exist
gskielian/SimpleCV,jlegendary/SimpleCV,jayrambhia/SimpleCV2,nils-werner/SimpleCV,jyt109/SimpleCV,nikhilgk/SimpleCV,gskielian/SimpleCV,sightmachine/SimpleCV2,beni55/SimpleCV,gskielian/SimpleCV,nils-werner/SimpleCV,hayd/SimpleCV,nils-werner/SimpleCV,nikhilgk/SimpleCV,jyt109/SimpleCV,tpltnt/SimpleCV,jlegendary/SimpleCV,jy...
SimpleCV/Shell/Shell.py
SimpleCV/Shell/Shell.py
#!/usr/bin/python #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # SimpleCV # a kinder, gentler machine vision python library #----------------------------------------------------------------------- # SimpleCV is an interface for Open Source machine # vision libraries in Python. # It provide...
#!/usr/bin/python #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # SimpleCV # a kinder, gentler machine vision python library #----------------------------------------------------------------------- # SimpleCV is an interface for Open Source machine # vision libraries in Python. # It provide...
bsd-3-clause
Python
94c50696a9ec448766023c9575d5b73785b1afeb
print vertical
R-Mascarenhas/git-tutorial
hello.py
hello.py
x = "Hello World!" for i in x: print(i) input()
x = "Hello World!" print(x) input()
apache-2.0
Python
cb6c1a854f64c72bc4bf809307692b801286fe95
remove redundant and broken re-definition of programrolegrant
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/models/program_role_grant.py
accelerator/models/program_role_grant.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from django.conf import settings from django.db import models from accelerator_abstract.models.accelerator_model import AcceleratorModel from accelerator_abstract.models.base_program_role_grant import ( ...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from django.conf import settings from django.db import models from accelerator_abstract.models.accelerator_model import AcceleratorModel from accelerator_abstract.models.base_program_role_grant import ( ...
mit
Python
ecb060f85c3de21b6f2e6ea94417685307252791
Improve QtScriptEngineDebugger test behavior
IronManMark20/pyside2,BadSingleton/pyside2,gbaty/pyside2,M4rtinK/pyside-android,RobinD42/pyside,enthought/pyside,IronManMark20/pyside2,enthought/pyside,PySide/PySide,RobinD42/pyside,BadSingleton/pyside2,enthought/pyside,BadSingleton/pyside2,gbaty/pyside2,RobinD42/pyside,M4rtinK/pyside-bb10,M4rtinK/pyside-bb10,pankajp/p...
tests/QtScriptTools/debugger_test.py
tests/QtScriptTools/debugger_test.py
import unittest from PySide.QtCore import SIGNAL, QTimer from PySide.QtScript import QScriptEngine from PySide.QtScriptTools import QScriptEngineDebugger from helper import UsesQApplication class DebuggerTest(UsesQApplication): def setUp(self): UsesQApplication.setUp(self) self.engine = QScript...
import unittest from PySide.QtCore import SIGNAL from PySide.QtScript import QScriptEngine from PySide.QtScriptTools import QScriptEngineDebugger from helper import UsesQApplication class DebuggerTest(UsesQApplication): def setUp(self): UsesQApplication.setUp(self) self.engine = QScriptEngine()...
lgpl-2.1
Python
8a8cc7b5f37baa315470083eedf942b004ff3662
add more cases to member list acceptance test (#4804)
mvaled/sentry,ifduyue/sentry,looker/sentry,JackDanger/sentry,JamesMura/sentry,looker/sentry,jean/sentry,beeftornado/sentry,jean/sentry,mvaled/sentry,gencer/sentry,jean/sentry,ifduyue/sentry,JamesMura/sentry,jean/sentry,looker/sentry,mvaled/sentry,gencer/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,JackDanger/sentr...
tests/acceptance/test_member_list.py
tests/acceptance/test_member_list.py
from __future__ import absolute_import from sentry.models import OrganizationMember from sentry.testutils import AcceptanceTestCase class ListOrganizationMembersTest(AcceptanceTestCase): def setUp(self): super(ListOrganizationMembersTest, self).setUp() self.user = self.create_user('foo@example.co...
from __future__ import absolute_import from sentry.testutils import AcceptanceTestCase class ListOrganizationMembersTest(AcceptanceTestCase): def setUp(self): super(ListOrganizationMembersTest, self).setUp() self.user = self.create_user('foo@example.com') self.org = self.create_organizati...
bsd-3-clause
Python
16b3e30a88e9101db58c0549e515848df29f29b9
Set up sample project to throw web exceptions (for request oject)
Osmose/raygun4py,MindscapeHQ/raygun4py,ferringb/raygun4py
raygun4py-sample/test.py
raygun4py-sample/test.py
import sys, os, urllib2 import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1...
import sys, os import traceback from provider import raygunprovider def handle_exception(exc_type, exc_value, exc_traceback): cl = raygunprovider.RaygunSender("onPbQXtZKqJX38IuN4AQKA==") cl.set_version("1.2") print cl.send(exc_type, exc_value, exc_traceback, "myclass", ["tag1", "tag2"], {"key1": 1111, ...
mit
Python
9d2f071c28d4f84ae57ab7b572b3c98620c820a4
Fix sort order
adamtheturtle/vws-python,adamtheturtle/vws-python
tests/mock_vws/test_delete_target.py
tests/mock_vws/test_delete_target.py
""" Tests for deleting targets. """ import pytest from requests import codes from requests_mock import DELETE from common.constants import ResultCodes from tests.mock_vws.utils import assert_vws_failure from tests.utils import VuforiaServerCredentials from vws._request_utils import target_api_request @pytest.mark.u...
""" Tests for deleting targets. """ import pytest from requests import codes from requests_mock import DELETE from common.constants import ResultCodes from tests.mock_vws.utils import assert_vws_failure from vws._request_utils import target_api_request from tests.utils import VuforiaServerCredentials @pytest.mark.u...
mit
Python
719bd53fe9b7346e858becce99b6f0eead40b3fe
bump to 1.1
s0undt3ch/sorbic,thatch45/sorbic
sorbic/__init__.py
sorbic/__init__.py
# -*- coding: utf-8 -*- version = '0.1.1'
# -*- coding: utf-8 -*- version = '0.1.0'
apache-2.0
Python
d147832e3c6d86ec81c2ea35bde1de7358cac27e
Fix atol in test
poliastro/poliastro
tests/tests_twobody/test_sampling.py
tests/tests_twobody/test_sampling.py
from functools import partial import hypothesis.strategies as st import numpy as np from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from hypothesis import example, given, settings from poliastro.twobody.sampling import sample_closed angles = partial(st.floats, min_value=-2 * ...
from functools import partial import hypothesis.strategies as st import numpy as np from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from hypothesis import example, given, settings from poliastro.twobody.sampling import sample_closed angles = partial(st.floats, min_value=-2 * ...
mit
Python
6979d67e50366ec0fb1336cec8a5a69fee190433
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/7c99aeadacee949f4de11eafe7e83bae80358791.
paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorf...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "7c99aeadacee949f4de11eafe7e83bae80358791" TFRT_SHA256 = "482deb3aecbaff840b9de99c5dc5...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "a0616887359cc71195d562d2f6eb53abd7080f4a" TFRT_SHA256 = "943724d90fecd811d6c93cb7d3f5...
apache-2.0
Python
bccbd3ec0795371653c8d0cd5cc82999715b0687
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/36bc3321fbeacbc170257d5f345f0962fde39a64.
google/tsl,google/tsl,google/tsl
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "36bc3321fbeacbc170257d5f345f0962fde39a64" TFRT_SHA256 = "61cb6c8bf4c69b71475572c47309...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "3d3b2e9a5cdb682c2cb7a04f80846734dafb9880" TFRT_SHA256 = "73af62ae6962b38e1fe8d675a43a...
apache-2.0
Python
968a1751ef6ccadc30ac6bd0f0be5056ac0e9288
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/780e7a8cc4bb4c9338ad2da7cf63c75ce491cb96.
Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflo...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "780e7a8cc4bb4c9338ad2da7cf63c75ce491cb96" TFRT_SHA256 = "983a6740b2d2737bb2b0fc50caed...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "04472136dd8959de458771bbe1127f7a860e6884" TFRT_SHA256 = "16e69b914bb119dbe30422b86e7d...
apache-2.0
Python
0f28fe59a0f166f70b7fa9e6f4b209cc7632a126
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/abc30e257aea33e6637010a90e015f018ac065ca.
gautam1858/tensorflow,yongtang/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensor...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "abc30e257aea33e6637010a90e015f018ac065ca" TFRT_SHA256 = "9382080217c32d0a0029fe58e72efd711323ddebd70f20...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "02ce138aadc5b4a7f585085fe75d9024d921c5a5" TFRT_SHA256 = "1abe70a9684aadf8aa5b2ce32d5b0a1ac67f4f8f7fb0fb...
apache-2.0
Python
f2ff64a2897610d8b3d629ce9a198f60fb5402ce
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/e3a3076004d39ea17f6573898033e78a6321f505.
frreiss/tensorflow-fred,gautam1858/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_librar...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "e3a3076004d39ea17f6573898033e78a6321f505" TFRT_SHA256 = "99b146cbac1288f104e65060219b63c26ea0d485d1de0b...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "ff325fafd1976e494831e9b3897ddf2c93235fbc" TFRT_SHA256 = "ff221d793a6938cddb8075bf599a5060864803e0a96eef...
apache-2.0
Python
3dfb6078d3f22235a856183499f5c1d6581a7de7
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/7ed8de2e571d95575634f354762740aefd34e7fb.
Intel-Corporation/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,karl...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "7ed8de2e571d95575634f354762740aefd34e7fb" TFRT_SHA256 = "33831854b097fc733649886d74e6c10546c8aeee94e953...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "433795f38edd59236fc2ce2acc2f050be4646d8f" TFRT_SHA256 = "37beb3024c1821e93f42959dd14f845467b17a35f6e10d...
apache-2.0
Python
45b39e8fca6341e69c3772c5914f8c78fb9545f8
Fix bug with game screen UI being created more than once
TheCodeInside/NumberMunchersXO,TheCodeInside/NumberMunchersXO
Source/Gamestates/gamescreen.py
Source/Gamestates/gamescreen.py
import pygame, sys from input import xo_input from UI.uicontainer import UIContainer class GameScreen: def __init__(self, manager, screen): self.stateManager = manager self.window = screen self.uiContainer = UIContainer(self.window) self.uiContainer.horizontalStride = 5 sel...
import pygame, sys from input import xo_input from UI.uicontainer import UIContainer class GameScreen: def __init__(self, manager, screen): self.stateManager = manager self.window = screen self.uiContainer = UIContainer(self.window) self.uiContainer.horizontalStride = 5 se...
mit
Python
ec15f264f5deec8a31b72c52edecdbe16c6c3f1f
Fix Score Keeper
andreimatei/congratboto
app_engine/plugins/score_keeper_plugin.py
app_engine/plugins/score_keeper_plugin.py
import re from operator import attrgetter from google.appengine.ext import db BOT_ID = "100007101244912" class Participant(db.Model): """Models an individual chat participant, with her score.""" name = db.StringProperty(indexed=False) thread_id = db.StringProperty(indexed=True) score = db.IntegerProperty(ind...
import re from operator import attrgetter from google.appengine.ext import db BOT_ID = "100007101244912" class Participant(db.Model): """Models an individual chat participant, with her score.""" name = db.StringProperty(indexed=False) thread_id = db.StringProperty(indexed=True) score = db.IntegerProperty(ind...
mit
Python
9f3356d06067dbcc77a79afee6bccf80600dab28
Add a method to get the idle time. Also data are directly readed in /proc/uptime.
juliendelplanque/raspirestmonitor
server/systeminfo.py
server/systeminfo.py
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess from datetime import timedelta def get_uptime(): """ Return the uptime of the system as a timedelta object. """ proc = subprocess.Popen(["cat /proc/uptime"], ...
#!/bin/python3 """ This script contains functions to access various system's info. Author: Julien Delplanque """ import subprocess def get_uptime(): """ Return the uptime of the system as a str using the command: $ uptime """ proc = subprocess.Popen(["uptime"], stdout=subprocess.PIPE, shell=True) ...
mit
Python
06196dcac0573cd853e72222bd067ec023157a6c
add rejected apps to list_packaged_apps management command
Revanth47/addons-server,andymckay/zamboni,wagnerand/zamboni,lavish205/olympia,jasonthomas/zamboni,jpetto/olympia,kmaglione/olympia,ngokevin/zamboni,diox/olympia,Joergen/zamboni,mozilla/olympia,robhudson/zamboni,psiinon/addons-server,beni55/olympia,atiqueahmedziad/addons-server,mozilla/zamboni,mudithkr/zamboni,aviarypl/...
mkt/webapps/management/commands/list_packaged_apps.py
mkt/webapps/management/commands/list_packaged_apps.py
from optparse import make_option from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand import amo from files.models import File HELP = 'List all Marketplace packaged apps' statuses = {'pending': amo.STATUS_PENDING, 'public': amo.STATUS_PUBLIC, ...
from optparse import make_option from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand import amo from files.models import File HELP = 'List all Marketplace packaged apps' statuses = {'pending': amo.STATUS_PENDING, 'public': amo.STATUS_PUBLIC, ...
bsd-3-clause
Python
090d7a0e877b838beda7cb7ca6955673def8c243
Remove debug code
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/utils/tests/test_functional.py
bluebottle/utils/tests/test_functional.py
from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.template.response import TemplateResponse from django.http.response import HttpResponseForbidden from django.test.client import RequestFactory from bluebottle.test.utils import BluebottleTestCase from bluebottle.test....
from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.template.response import TemplateResponse from django.http.response import HttpResponseForbidden from django.test.client import RequestFactory from bluebottle.test.utils import BluebottleTestCase from bluebottle.test....
bsd-3-clause
Python
ee6273f4bf2939294f0843e77ab9d6b8e7979cda
Remove reference to nonexistent attribute from string party sequence's representation
m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
byceps/blueprints/shop/models/sequence.py
byceps/blueprints/shop/models/sequence.py
# -*- coding: utf-8 -*- """ byceps.blueprints.shop.models.sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from enum import Enum from sqlalchemy.ext.hybrid import hybrid_property from ....database import db from ....util...
# -*- coding: utf-8 -*- """ byceps.blueprints.shop.models.sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from enum import Enum from sqlalchemy.ext.hybrid import hybrid_property from ....database import db from ....util...
bsd-3-clause
Python
6588c1f953f063b120e7f096cfd1ae0dfafcd9aa
Add 'gbf.game.mbga' to gbf checker
moondropx/dogbot,moondropx/dogbot
dogbot/bot/listeners/gbf.py
dogbot/bot/listeners/gbf.py
import re import requests from requests.exceptions import MissingSchema from dogbot.cqsdk.utils import reply GBF_PATTERN = re.compile("(((https|http)?://)" # 端口 "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" # ftp 用戶密碼 "(([0-9]{1,3}\.){3}[0-9]{1,3}" # I...
import re import requests from requests.exceptions import MissingSchema from dogbot.cqsdk.utils import reply GBF_PATTERN = re.compile("(((https|http|ftp|rtsp|mms)?://)" # 端口 "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" # ftp 用戶密碼 "(([0-9]{1,3}\.){3}[0-...
apache-2.0
Python
5bb2ee7b2a8e0d51437d6536f6cd336ae48fa4a5
Add ability to match 'Error:\n...', and escape error string
JasonGross/coq-tools,JasonGross/coq-tools
diagnose_error.py
diagnose_error.py
from __future__ import with_statement import os, sys, tempfile, subprocess, re from memoize import memoize __all__ = ["has_error", "get_error_line_number", "make_reg_string", "get_coq_output", "get_error_string"] DEFAULT_ERROR_REG_STRING = 'File "[^"]+", line ([0-9]+), characters [0-9-]+:\n(Error:\s*[^\n]+|[^\n]+)' D...
from __future__ import with_statement import os, sys, tempfile, subprocess, re from memoize import memoize __all__ = ["has_error", "get_error_line_number", "make_reg_string", "get_coq_output", "get_error_string"] DEFAULT_ERROR_REG_STRING = 'File "[^"]+", line ([0-9]+), characters [0-9-]+:\n([^\n]+)' DEFAULT_ERROR_REG...
mit
Python
5d2043d0b662f38bd51e062367c2e4b703b457a1
Update version 0.11.4 -> 0.11.5
dwavesystems/dimod,dwavesystems/dimod
dimod/__init__.py
dimod/__init__.py
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python