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
9179907357c6e8aad33a8a5e5cd39b164b2f9cc0
Update BUILD_OSS to 4680.
fcitx/mozc,google/mozc,fcitx/mozc,fcitx/mozc,fcitx/mozc,google/mozc,google/mozc,google/mozc,fcitx/mozc,google/mozc
src/data/version/mozc_version_template.bzl
src/data/version/mozc_version_template.bzl
# Copyright 2010-2021, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
# Copyright 2010-2021, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
bsd-3-clause
Python
db2bb0356cfdf486a9e628726cd4e5879311fe8b
update version
overfly83/bjrobot
src/BJRobot/version.py
src/BJRobot/version.py
VERSION = '0.5.0'
VERSION = '0.4.0'
mit
Python
137271045313a12bbe9388ab1ac6c8cb786b32b7
Reset mock befor running test.
benkonrath/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian
guardian/testapp/tests/test_management.py
guardian/testapp/tests/test_management.py
from __future__ import absolute_import from __future__ import unicode_literals from guardian.compat import get_user_model from guardian.compat import mock from guardian.compat import unittest from guardian.management import create_anonymous_user import django mocked_get_init_anon = mock.Mock() class TestGetAnonymo...
from __future__ import absolute_import from __future__ import unicode_literals from guardian.compat import get_user_model from guardian.compat import mock from guardian.compat import unittest from guardian.management import create_anonymous_user import django mocked_get_init_anon = mock.Mock() class TestGetAnonymo...
bsd-2-clause
Python
30020d3826a2460288b6a57963753787020a945a
Implement support for the 'D' type in packb()
wbolster/temporenc-python
temporenc/temporenc.py
temporenc/temporenc.py
import struct SUPPORTED_TYPES = set([ 'D', 'T', 'DT', 'DTZ', 'DTS', 'DTSZ', ]) STRUCT_32 = struct.Struct('>L') def packb(type=None, year=None, month=None, day=None): """ Pack date and time information into a byte string. :return: encoded temporenc value :rtype: bytes ""...
def packb(type=None, year=None, month=None, day=None): raise NotImplementedError()
bsd-3-clause
Python
7c63030bd70b32ec4c13ff4273d103ddbb0ffa0f
include tumblrprofile in djangoadmin
castaway2000/OpenStay,castaway2000/OpenStay,castaway2000/OpenStay
hackathon_starter/hackathon/admin.py
hackathon_starter/hackathon/admin.py
from django.contrib import admin from hackathon.models import UserProfile, Profile, InstagramProfile, TwitterProfile, MeetupToken, GithubProfile, LinkedinProfile, TumblrProfile # Register your models here. class TwitterProfileAdmin(admin.ModelAdmin): list_display = ('user','twitter_user') admin.site.register(UserPro...
from django.contrib import admin from hackathon.models import UserProfile, Profile, InstagramProfile, TwitterProfile, MeetupToken, GithubProfile, LinkedinProfile # Register your models here. class TwitterProfileAdmin(admin.ModelAdmin): list_display = ('user','twitter_user') admin.site.register(UserProfile) admin.sit...
mpl-2.0
Python
c3df7d5adf551213c94f2d0e0598552ce6ee9aaf
move collection list filtering logic to db query
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
hs_collection_resource/page_processors.py
hs_collection_resource/page_processors.py
from django.http import HttpResponseRedirect, HttpResponseForbidden from django.db.models import Q from mezzanine.pages.page_processors import processor_for from hs_core import page_processors from hs_core.models import BaseResource from hs_core.views import add_generic_context from hs_core.views.utils import get_my_r...
from django.http import HttpResponseRedirect from mezzanine.pages.page_processors import processor_for from hs_core import page_processors from hs_core.models import BaseResource from hs_core.views import add_generic_context from hs_core.views.utils import get_my_resources_list from .models import CollectionResource ...
bsd-3-clause
Python
75a0dec32210432374b45dbed2845dfe171b9b36
Set version number to 0.4.1
brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab
climlab/__init__.py
climlab/__init__.py
__version__ = '0.4.1' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.4.1dev' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiat...
mit
Python
85af2e031479c78aaef433e2294648125916251a
Improve color palette for cycling Curves
jvivian/rnaseq-lib,jvivian/rnaseq-lib
src/rnaseq_lib/plot/opts.py
src/rnaseq_lib/plot/opts.py
import holoviews as hv color_sequence = ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'] gen...
gene_curves_opts = { 'Curve': {'plot': dict(height=120, width=600, tools=['hover'], invert_xaxis=True, yrotation=45, yaxis='left'), 'style': dict(line_width=1.5)}, 'Curve.Percentage_of_Normal_Samples': {'plot': dict(xaxis=None, invert_yaxis=True), 'style'...
mit
Python
72c5168ff71223db32ef37a12fd8781f28bfc433
change CTCP VERSION reply
sammdot/circa
circa.py
circa.py
#!/usr/bin/env python3 import sdirc import yaml import threading import importlib import modules VERSION = "1.0" class Circa(sdirc.Client): def __init__(self, **conf): conf["autoconn"] = False conf["prefix"] = conf["prefix"] if "prefix" in conf else "!" sdirc.Client.__init__(self, **conf) self.modules = {}...
#!/usr/bin/env python3 import sdirc import yaml import threading import importlib import modules VERSION = "1.0" class Circa(sdirc.Client): def __init__(self, **conf): conf["autoconn"] = False conf["prefix"] = conf["prefix"] if "prefix" in conf else "!" sdirc.Client.__init__(self, **conf) self.modules = {}...
bsd-3-clause
Python
dc6100fea3097d97e7065bd653093798eac84909
Allow passing in of timezone
pinax/pinax-calendars,eldarion/kairios,eldarion/kairios
kairios/templatetags/kairios_tags.py
kairios/templatetags/kairios_tags.py
import calendar as cal import datetime from django import template from django.util import timezone import pytz register = template.Library() def delta(year, month, d): mm = month + d yy = year if mm > 12: mm, yy = mm % 12, year + mm / 12 elif mm < 1: mm, yy = 12 + mm, year - 1 ...
import calendar as cal import datetime from django import template register = template.Library() def delta(year, month, d): mm = month + d yy = year if mm > 12: mm, yy = mm % 12, year + mm / 12 elif mm < 1: mm, yy = 12 + mm, year - 1 return yy, mm @register.inclusion_tag("kair...
unknown
Python
fd7577d34ef206869517f3717070880d098d4d8b
change URL dispach rules
indexofire/django-cms-content,indexofire/django-cms-content,indexofire/django-cms-content
cms_content/urls.py
cms_content/urls.py
# -*- coding: utf-8 -*- from django.conf.urls.defaults import * from cms_content.views import * from cms_content.models import * from cms_content.utils.queryset import queryset_iterator urlpatterns = patterns ('', url(r'^$', section_list, {'sections': CMSSection.objects.all()}, name='section'), url(r'^(?P<sl...
# -*- coding: utf-8 -*- from django.conf.urls.defaults import * from cms_content.views import * from cms_content.models import * from cms_content.utils.queryset import queryset_iterator urlpatterns = patterns ('', url(r'^$', section_list, {'sections': CMSSection.objects.all()}, name='section'), url(r'^(?P<sl...
bsd-3-clause
Python
ce83a4fb2f650380b7683ea688791e078b6fe7ec
Fix wrong redirect on logout
YouNeedToSleep/sleepy,YouNeedToSleep/sleepy,YouNeedToSleep/sleepy
src/sleepy/web/views.py
src/sleepy/web/views.py
from django.contrib import messages from django.contrib.auth import REDIRECT_FIELD_NAME, logout from django.core.urlresolvers import reverse_lazy from django.views.generic import RedirectView, TemplateView from django.utils.http import is_safe_url from django.utils.translation import ugettext class IndexView(Template...
from django.contrib import messages from django.contrib.auth import REDIRECT_FIELD_NAME, logout from django.core.urlresolvers import reverse_lazy from django.views.generic import RedirectView, TemplateView from django.utils.http import is_safe_url from django.utils.translation import ugettext class IndexView(Template...
bsd-3-clause
Python
e8389c211ef56869cd9c6c1177aa6a610a915aa2
Fix manifest and add format to properties
redmatter/combine
combine/manifest.py
combine/manifest.py
# Copyright (c) 2010 John Reese # Licensed under the MIT license import yaml from combine import CombineError MANIFEST_FORMAT = 1 class Manifest: def __init__(self): self.properties = {"manifest-format": MANIFEST_FORMAT} self.actions = [] def add_property(self, name, value): self.p...
# Copyright (c) 2010 John Reese # Licensed under the MIT license import yaml from combine import Change, CombineError MANIFEST_FORMAT = 1 class Manifest: def __init__(self): self.properties = {} self.actions = [] def add_property(self, name, value): self.properties[name] = value ...
mit
Python
291f11c6325a1ae082845be81692bc64521eab7e
refactor create-kdtree script
legacysurvey/legacypipe,legacysurvey/legacypipe
py/legacypipe/create-kdtrees.py
py/legacypipe/create-kdtrees.py
import os from astrometry.libkd.spherematch import * from astrometry.util.fits import fits_table import numpy as np # This script creates the survey-ccd-*.kd.fits kd-trees from # survey-ccds-*.fits.gz (zeropoints) files # def create_kdtree(infn, outfn): readfn = infn # gunzip if infn.endswith('.gz'): ...
import os from astrometry.libkd.spherematch import * from astrometry.util.fits import fits_table import numpy as np # This script creates the survey-ccd-*.kd.fits kd-trees from # survey-ccds-*.fits.gz (zeropoints) files # indir = '/global/projecta/projectdirs/cosmo/work/legacysurvey/dr8/DECaLS/' outdir = '/global/cs...
bsd-3-clause
Python
7b746d2d4ae732ee1eae326254f3a6df676a7973
Add __str__ function for SgTable
lnishan/SQLGitHub
components/table.py
components/table.py
"""A class to store tables.""" class SgTable: """A class to store tables.""" def __init__(self): self._fields = [] self._table = [] def __len__(self): return len(self._table) def __iter__(self): for row in self._table: yield row def __getitem__(self,...
"""A class to store tables.""" class SgTable: """A class to store tables.""" def __init__(self): self._fields = [] self._table = [] def __len__(self): return len(self._table) def __iter__(self): for row in self._table: yield row def __getitem__(self,...
mit
Python
8a45ca4dff9957a6fce07dfa067633fcd842bc51
Update cpp.py
StatisKit/StatisKit,StatisKit/StatisKit
conda/libdev/cpp.py
conda/libdev/cpp.py
import os from SCons.Defaults import Delete def generate(env): """Add Builders and construction variables to the Environment.""" if not 'cpp' in env['TOOLS'][:-1]: env.Tool('system') env.Tool('prefix') def BuildCpp(env, target, sources): # Code to build "target" from "...
import os from SCons.Defaults import Move def generate(env): """Add Builders and construction variables to the Environment.""" if not 'cpp' in env['TOOLS'][:-1]: env.Tool('system') env.Tool('prefix') def BuildCpp(env, target, sources): # Code to build "target" from "so...
apache-2.0
Python
e58b94f29888ac1c48bec77cb08fc90919c7720b
add filename attribute
accraze/python-twelve-tone
src/twelve_tone/midi.py
src/twelve_tone/midi.py
from miditime.miditime import MIDITime class MIDIFile(object): def __init__(self, BPM=120, filename='example.mid'): self.pattern = MIDITime(BPM, filename) self.step_counter = 0 self.filename = filename def create(self, notes): midinotes = [] offset = 60 attack...
from miditime.miditime import MIDITime class MIDIFile(object): def __init__(self, BPM=120, filename='example.mid'): self.pattern = MIDITime(BPM, filename) self.step_counter = 0 def create(self, notes): midinotes = [] offset = 60 attack = 200 beats = 1 ...
bsd-2-clause
Python
aa46499c43bd7e4162dc657fa898b1df5e2dcee9
Exclude windows from extended ascii mode because travis is unhappy
compas-dev/compas
src/compas/__main__.py
src/compas/__main__.py
# -*- coding: utf-8 -*- from __future__ import print_function import sys import pkg_resources import compas if __name__ == '__main__': c = 'DCDHDCACDHDCAEDEACDHDCAEDEACDHDCAEDCDEACDHDCADCACDEADHDCAEDADEACDHDADADADHDCACDCAEDEACDCACDHDCAEDEACDCAEDEACDCAEDBACDHDAEDEACDADADCAEDBADHDAGDEACDADEADCAEDEADHDBADEDCAEDEAC...
# -*- coding: utf-8 -*- from __future__ import print_function import sys import pkg_resources import compas if __name__ == '__main__': c = 'DCDHDCACDHDCAEDEACDHDCAEDEACDHDCAEDCDEACDHDCADCACDEADHDCAEDADEACDHDADADADHDCACDCAEDEACDCACDHDCAEDEACDCAEDEACDCAEDBACDHDAEDEACDADADCAEDBADHDAGDEACDADEADCAEDEADHDBADEDCAEDEAC...
mit
Python
ee9646c5e71dcbaf776d9f9f929dead5e5c1fa82
Revert "cookie.value() didn't really need to be a string, since QSettings will take a QVariant anyways."
Lkhagvadelger/phantomjs,nicksay/phantomjs,nin042/phantomjs,jjyycchh/phantomjs,chauhanmohit/phantomjs,mattvick/phantomjs,ChrisAntaki/phantomjs,liorvh/phantomjs,joomel1/phantomjs,ChrisAntaki/phantomjs,sporttech/phantomjs,tianzhihen/phantomjs,Observer-Wu/phantomjs,hexid/phantomjs,AladdinSonni/phantomjs,likaiwalkman/phanto...
python/pyphantomjs/cookiejar.py
python/pyphantomjs/cookiejar.py
''' This file is part of the PyPhantomJS project. Copyright (C) 2011 James Roe <roejames12@hotmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
''' This file is part of the PyPhantomJS project. Copyright (C) 2011 James Roe <roejames12@hotmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
bsd-3-clause
Python
1c8bd21fe895260254684d3e2b2f9f5b70fdb91f
Fix error msg
ExaScience/smurff,ExaScience/smurff,ExaScience/smurff,ExaScience/smurff,ExaScience/smurff,ExaScience/smurff
python/smurff/smurff/prepare.py
python/smurff/smurff/prepare.py
import numpy as np import scipy as sp import pandas as pd import scipy.sparse import numbers from .helper import SparseTensor def make_train_test(Y, ntest): """Splits a sparse matrix Y into a train and a test matrix. Y scipy sparse matrix (coo_matrix, csr_matrix or csc_matrix) ntest either a...
import numpy as np import scipy as sp import pandas as pd import scipy.sparse import numbers from .helper import SparseTensor def make_train_test(Y, ntest): """Splits a sparse matrix Y into a train and a test matrix. Y scipy sparse matrix (coo_matrix, csr_matrix or csc_matrix) ntest either a...
mit
Python
980b3eded1e06c8f152b873531273c1b0154a755
Update Visualization-commandCenter.py
danjhenry/opencv-pythonbot
dataCenter/Visualization-commandCenter.py
dataCenter/Visualization-commandCenter.py
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np import matplotlib.pyplot as plt import pickle with open('firefox-bot/config/iframe.txt', 'r') as loginInfo: newName = loginInfo.readline() newName = newName.rstrip() def load_obj(name): with open(name + '.pkl', 'rb') as f: ...
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np import matplotlib.pyplot as plt import pickle with open('firefox-bot/config/iframe.txt', 'r') as loginInfo: newName = loginInfo.readline() newName = newName.rstrip() def load_obj(name): with open(name + '.pkl', 'rb') as f: ...
mit
Python
18be6e0d3ee656f150e54bc0abe3959d92e2b35c
add message for script completion to dashboard
architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst
cea/api.py
cea/api.py
""" Provide access to the scripts exported by the City Energy Analyst. """ from __future__ import print_function import datetime def register_scripts(): import cea.config import cea.scripts import importlib config = cea.config.Configuration() def script_wrapper(cea_script): module_path =...
""" Provide access to the scripts exported by the City Energy Analyst. """ from __future__ import print_function def register_scripts(): import cea.config import cea.scripts import importlib config = cea.config.Configuration() def script_wrapper(cea_script): module_path = cea_script.mod...
mit
Python
ef5c049a4c32e69c9ce88c958ae8272bdfddeba4
Add area info in check price result
skooby2011/crawler_lianjia
check_price.py
check_price.py
# -*- coding:utf-8 -*- import pymysql import pymysql.cursors from prettytable import PrettyTable from colorama import init, Fore import pdb database_name = "house_price_04" # 打开数据库连接 db=pymysql.connect("localhost","root","aB123456",database_name,charset='utf8mb4') # 使用cursor()方法获取操作游标 cursor=db.cursor() #输入要查询的小区名称 ...
# -*- coding:utf-8 -*- import pymysql import pymysql.cursors from prettytable import PrettyTable from colorama import init, Fore database_name = "house_price_04" # 打开数据库连接 db=pymysql.connect("localhost","root","aB123456",database_name,charset='utf8mb4') # 使用cursor()方法获取操作游标 cursor=db.cursor() #输入要查询的小区名称 check_name= ...
apache-2.0
Python
94dfdbeae55d4c47c7b1161c68795429ebc0687a
fix pprintInterface for unit with array intf
Nic30/HWToolkit
hwt/simulator/utils.py
hwt/simulator/utils.py
from random import Random import sys from hwt.serializer.serializerClases.indent import getIndent from hwt.synthesizer.interfaceLevel.interfaceUtils.proxy import InterfaceProxy from hwt.synthesizer.interfaceLevel.mainBases import InterfaceBase def valueHasChanged(valA, valB): return valA.val is not valB.val or v...
from random import Random import sys from hwt.serializer.serializerClases.indent import getIndent from hwt.synthesizer.interfaceLevel.interfaceUtils.proxy import InterfaceProxy def valueHasChanged(valA, valB): return valA.val is not valB.val or valA.vldMask != valB.vldMask def agent_randomize(agent, timeQuantu...
mit
Python
222e2bf4728440fdff2675756b4aa08aba4585fb
Update __init__.py
delitamakanda/socialite,delitamakanda/socialite,delitamakanda/socialite
app/__init__.py
app/__init__.py
from flask import Flask, render_template from flask.ext.mail import Mail from flask.ext.login import LoginManager from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.pagedown import PageDown from flask.ext.flatpages import FlatPages from config import config from .util import...
from flask import Flask, render_template from flask.ext.mail import Mail from flask.ext.login import LoginManager from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.pagedown import PageDown from flask.ext.flatpages import FlatPages from config import config mail = Mail() mom...
mit
Python
690696493f110899282ad22f9b02d3d0fd91fe31
Rewrite wirecloud.catalogue.admin module
rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud
src/wirecloud/catalogue/admin.py
src/wirecloud/catalogue/admin.py
# -*- coding: utf-8 -*- # Copyright (c) 2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
# -*- coding: utf-8 -*- #...............................licence........................................... # # (C) Copyright 2008 Telefonica Investigacion y Desarrollo # S.A.Unipersonal (Telefonica I+D) # # This file is part of Morfeo EzWeb Platform. # # Morfeo EzWeb Platform is free software: you can ...
agpl-3.0
Python
bc467365ebd287d96109ea0771403a10d3f56580
set upload limit
mainulhossain/phenoproc,mainulhossain/phenoproc,mainulhossain/phenoproc,mainulhossain/phenoproc,mainulhossain/phenoproc
app/__init__.py
app/__init__.py
from flask import Flask from flask_bootstrap import Bootstrap from flask_mail import Mail from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_pagedown import PageDown from config import config import os import flask_sijax bootstrap = Bootstrap() mail ...
from flask import Flask from flask_bootstrap import Bootstrap from flask_mail import Mail from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_pagedown import PageDown from config import config import os import flask_sijax bootstrap = Bootstrap() mail ...
mit
Python
a2e5e2d5b75acafe5b1de0b92a9206a6a2ec4d25
Fix py36 unit tests
openstack/blazar,openstack/blazar,ChameleonCloud/blazar,ChameleonCloud/blazar,stackforge/blazar,stackforge/blazar
blazar/tests/api/test_root.py
blazar/tests/api/test_root.py
# Copyright (c) 2014 Bull. # # 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, sof...
# Copyright (c) 2014 Bull. # # 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, sof...
apache-2.0
Python
1bde8a92f47d49c6bea286a66fe89a3ccaca80a0
Fix for .env being loaded for manage.py commands
ukgovdatascience/classifyintentsapp,ukgovdatascience/classifyintentsapp
app/__init__.py
app/__init__.py
from flask import Flask from flask_bootstrap import Bootstrap from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_pagedown import PageDown bootstrap = Bootstrap() moment = Moment() db = SQLAlchemy() pagedown = PageDown() login_manager = LoginManager(...
from flask import Flask from flask_bootstrap import Bootstrap from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_pagedown import PageDown from config import config bootstrap = Bootstrap() moment = Moment() db = SQLAlchemy() pagedown = PageDown() log...
mit
Python
fb236951e1658beb32bd6dc45cf8d49a4636162a
Add tests for repr on tables
dwillmer/blaze,jdmcbr/blaze,LiaoPan/blaze,scls19fr/blaze,mrocklin/blaze,LiaoPan/blaze,jcrist/blaze,ChinaQuants/blaze,maxalbert/blaze,alexmojaki/blaze,nkhuyu/blaze,nkhuyu/blaze,cpcloud/blaze,caseyclements/blaze,ContinuumIO/blaze,cowlicks/blaze,cpcloud/blaze,xlhtc007/blaze,xlhtc007/blaze,alexmojaki/blaze,mrocklin/blaze,c...
blaze/api/tests/test_table.py
blaze/api/tests/test_table.py
from blaze.api.table import Table, compute, table_repr from blaze.data.python import Python from blaze.compute.core import compute from blaze.compute.python import compute from datashape import dshape import pandas as pd data = (('Alice', 100), ('Bob', 200)) t = Table(data, columns=['name', 'amount']) def t...
from blaze.api.table import Table, compute, table_repr from blaze.data.python import Python from blaze.compute.core import compute from blaze.compute.python import compute from datashape import dshape data = (('Alice', 100), ('Bob', 200)) t = Table(data, columns=['name', 'amount']) def test_resources(): ...
bsd-3-clause
Python
a085573261c0ed69b6bcabc40c4914a1623dc757
Add link to FB
ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server
bot/app/buffer.py
bot/app/buffer.py
from buffpy import API from buffpy.managers.profiles import Profiles from spacelaunchnow import config hashtags = '''\n . . .⠀⠀ .⠀⠀ .⠀⠀ #SpaceLaunchNow #space #spacex #nasa #rocket #mars #aerospace #earth #solarsystem #iss #elonmusk #moonlanding #spaceshuttle #spacewalk #esa #science #picoftheday #blueorigin #Florida...
from buffpy import API from buffpy.managers.profiles import Profiles from spacelaunchnow import config hashtags = '''\n . . .⠀⠀ .⠀⠀ .⠀⠀ #SpaceLaunchNow #space #spacex #nasa #rocket #mars #aerospace #earth #solarsystem #iss #elonmusk #moonlanding #spaceshuttle #spacewalk #esa #science #picoftheday #blueorigin #Florida...
apache-2.0
Python
d89252a2bbbe0677d2ad184f4c519e2b4d6ee9bd
Add JSON to data.
ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server
bot/serializer.py
bot/serializer.py
from bot.models import Launch, Notification, DailyDigestRecord from rest_framework import serializers class NotificationSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Notification fields = ( 'launch', 'url', 'wasNotifiedTwentyFourHour', 'wasNotifiedOneHour', '...
from bot.models import Launch, Notification, DailyDigestRecord from rest_framework import serializers class NotificationSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Notification fields = ( 'launch', 'url', 'wasNotifiedTwentyFourHour', 'wasNotifiedOneHour', '...
apache-2.0
Python
43a53981c3da2db8a4d06c883cd72442b72eb4be
Update spec_driven_model/tests/fake_mixin.py
OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil
spec_driven_model/tests/fake_mixin.py
spec_driven_model/tests/fake_mixin.py
# Copyright 2021 Akretion - Raphael Valyi <raphael.valyi@akretion.com> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). from odoo import fields, models class PoXsdMixin(models.AbstractModel): _description = "Abstract Model for PO XSD" _name = "spec.mixin.poxsd" _field_prefix =...
# Copyright 2021 Akretion - Raphael Valyi <raphael.valyi@akretion.com> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). from odoo import fields, models class PoXsdMixin(models.AbstractModel): _description = "Abstract Model for PO XSD" _name = "spec.mixin.poxsd" _field_prefix =...
agpl-3.0
Python
f07a05f6a6edd0ef481dd9a24c1556b345fe7686
Remove attempt to import module that no longer exists
IATI/iati.core,IATI/iati.core
iati/tests/conftest.py
iati/tests/conftest.py
"""Configuration to exist in the global scope for pytest.""" import collections import pytest import iati.default import iati.resources import iati.tests.utilities import iati pytest_plugins = [ # name required by pytest # pylint: disable=invalid-name 'iati.tests.fixtures.comparison', 'iati.tests.fixtures.v...
"""Configuration to exist in the global scope for pytest.""" import collections import pytest import iati.default import iati.resources import iati.tests.utilities import iati pytest_plugins = [ # name required by pytest # pylint: disable=invalid-name 'iati.tests.fixtures.comparison', 'iati.tests.fixtures.u...
mit
Python
0c160c8e787a9019571f358b70633efa13cad466
Support for inbox.util.eas in the /inbox-eas repo; this is where EAS-specific util code would live.
gale320/sync-engine,Eagles2F/sync-engine,jobscore/sync-engine,wakermahmud/sync-engine,EthanBlackburn/sync-engine,jobscore/sync-engine,Eagles2F/sync-engine,PriviPK/privipk-sync-engine,wakermahmud/sync-engine,Eagles2F/sync-engine,closeio/nylas,Eagles2F/sync-engine,wakermahmud/sync-engine,ErinCall/sync-engine,rmasters/inb...
inbox/util/__init__.py
inbox/util/__init__.py
""" Non-server-specific utility modules. These shouldn't depend on any code from the inbox module tree! Don't add new code here! Find the relevant submodule, or use misc.py if there's really no other place. """ # Allow out-of-tree submodules. from pkgutil import extend_path __path__ = extend_path(__path__,...
""" Non-server-specific utility modules. These shouldn't depend on any code from the inbox module tree! Don't add new code here! Find the relevant submodule, or use misc.py if there's really no other place. """
agpl-3.0
Python
933a082a76c6c9b72aaf275f45f0d155f66eeacf
Fix Python 3.3 calling another virtualenv as a subprocess.
waylonflinn/asv,airspeed-velocity/asv,edisongustavo/asv,giltis/asv,giltis/asv,qwhelan/asv,edisongustavo/asv,pv/asv,edisongustavo/asv,waylonflinn/asv,mdboom/asv,qwhelan/asv,cpcloud/asv,spacetelescope/asv,qwhelan/asv,pv/asv,giltis/asv,ericdill/asv,cpcloud/asv,mdboom/asv,mdboom/asv,ericdill/asv,cpcloud/asv,pv/asv,airspeed...
asv/__init__.py
asv/__init__.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys if sys.version_info >= (3, 3): # OS X framework builds of Python 3.3 can not call other 3.3 # virtual...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals)
bsd-3-clause
Python
91ef2866d14348971326df39d7868ad5c424b64c
remove the 10 article limit that was used for testing
osma/annif,osma/annif,osma/annif
autoindex_sk.py
autoindex_sk.py
#!/usr/bin/env python3 import sys import csv from bs4 import BeautifulSoup import autoindex from rdflib import Graph, URIRef, Literal from rdflib.namespace import DC, DCTERMS, SKOS, XSD def autoindex_doc(text, url, title, date, author, place): g = Graph() uri = URIRef(url) g.add((uri, DCTERMS.title, Lit...
#!/usr/bin/env python3 import sys import csv from bs4 import BeautifulSoup import autoindex from rdflib import Graph, URIRef, Literal from rdflib.namespace import DC, DCTERMS, SKOS, XSD def autoindex_doc(text, url, title, date, author, place): g = Graph() uri = URIRef(url) g.add((uri, DCTERMS.title, Lit...
cc0-1.0
Python
5d21942823ea21a3c2eb38e43b4b8b4fa2ec2ac1
Allow mayday.us for CORS
Rio517/pledgeservice,MayOneUS/pledgeservice,MayOneUS/pledgeservice,Rio517/pledgeservice,Rio517/pledgeservice
backend/util.py
backend/util.py
"""General utilities.""" import urlparse import logging def ConstantTimeIsEqual(a, b): """Securely compare two strings without leaking timing information.""" if len(a) != len(b): return False acc = 0 for x, y in zip(a, b): acc |= ord(x) ^ ord(y) return acc == 0 # TODO(hjfreyer): Pull into some kin...
"""General utilities.""" import urlparse import logging def ConstantTimeIsEqual(a, b): """Securely compare two strings without leaking timing information.""" if len(a) != len(b): return False acc = 0 for x, y in zip(a, b): acc |= ord(x) ^ ord(y) return acc == 0 # TODO(hjfreyer): Pull into some kin...
apache-2.0
Python
52873e4238a54cb93f403d509d2bebef8971ec9b
Work around deprecation warning with new cssutils versions.
0x1997/webassets,rs/webassets,scorphus/webassets,wijerasa/webassets,heynemann/webassets,aconrad/webassets,scorphus/webassets,florianjacob/webassets,aconrad/webassets,0x1997/webassets,glorpen/webassets,aconrad/webassets,heynemann/webassets,wijerasa/webassets,glorpen/webassets,JDeuce/webassets,heynemann/webassets,florian...
django_assets/filter/cssutils/__init__.py
django_assets/filter/cssutils/__init__.py
import logging import logging.handlers from django.conf import settings from django_assets.filter import BaseFilter __all__ = ('CSSUtilsFilter',) class CSSUtilsFilter(BaseFilter): """Minifies CSS by removing whitespace, comments etc., using the Python `cssutils <http://cthedot.de/cssutils/>`_ l...
import logging import logging.handlers from django.conf import settings from django_assets.filter import BaseFilter __all__ = ('CSSUtilsFilter',) class CSSUtilsFilter(BaseFilter): """Minifies CSS by removing whitespace, comments etc., using the Python `cssutils <http://cthedot.de/cssutils/>`_ l...
bsd-2-clause
Python
52d804aac69bceb9dee9c1b21044551b80bcdfdc
Fix handling default for `--output` option in `people_search` cmd.
nihn/linkedin-scraper,nihn/linkedin-scraper
linkedin_scraper/commands/people_search.py
linkedin_scraper/commands/people_search.py
from getpass import getpass from scrapy.commands.crawl import Command as BaseCommand def sanitize_query(query): return query.replace(' ', '+') class Command(BaseCommand): def short_desc(self): return "Scrap people from LinkedIn" def syntax(self): return "[options] <query>" def add...
from getpass import getpass from scrapy.commands.crawl import Command as BaseCommand def sanitize_query(query): return query.replace(' ', '+') class Command(BaseCommand): def short_desc(self): return "Scrap people from LinkedIn" def syntax(self): return "[options] <query>" def add...
mit
Python
637b3c36e9a5952fc29ceaa705703e94f9f172d3
Update app_settings.py
kartoza/django-wms-client,kartoza/django-wms-client,kartoza/django-wms-client,kartoza/django-wms-client
django_project/wms_client/app_settings.py
django_project/wms_client/app_settings.py
# coding=utf-8 """Settings file for WMS Client. """ from django.conf import settings # Allow base django project to override settings default_leaflet_tiles = ( 'OpenStreetMap', 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', ('© <a href="http://www.openstreetmap.org" target="_parent">OpenStreetMa...
# coding=utf-8 """Settings file for WMS Client. """ from django.conf import settings # Allow base django project to override settings default_leaflet_tiles = ( 'OpenStreetMap', 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', ('© <a hr ef="http://www.openstreetmap.org" target="_parent">OpenStree...
bsd-2-clause
Python
4071c77a6e598c27f7a8b2195ff5e68332120615
Fix formatting.
nzlosh/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,peak6/st2,peak6/st2,nzlosh/st2,lakshmi-kannan/st2,StackStorm/st2,Plexxi/st2,tonybaloney/st2,Plexxi/st2,tonybaloney/st2,StackStorm/st2,peak6/st2,lakshmi-kannan/st2,nzlosh/st2,tonybaloney/st2,lakshmi-kannan/st2,Plexxi/st2
st2common/st2common/cmd/validate_config.py
st2common/st2common/cmd/validate_config.py
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
Python
d35aed562b3c9eba6f7de7ac4aa7d6ad7723ec0a
Add listnener decos
BlackSynder/synbot
cogs/cancer.py
cogs/cancer.py
from discord.ext.commands import Cog class Cancer(Cog): def __init__(self, bot): self.bot = bot self.ok_list = [198101180180594688, 246291440106340352] @Cog.listener async def on_member_join(self, member): if member.guild.id not in self.ok_list: return await me...
from discord.ext import commands class Cancer(commands.Cog): def __init__(self, bot): self.bot = bot self.ok_list = [198101180180594688, 246291440106340352] async def on_member_join(self, member): if member.guild.id not in self.ok_list: return await member.guild.sy...
mit
Python
1b3c9e5f46f48865882f1087ced0ade168233711
fix formatting and caching
Naught0/qtbot
cogs/stonks.py
cogs/stonks.py
import discord import json from datetime import datetime from discord.ext import commands from utils.aiohttp_wrap import aio_get_json class Stonks(commands.Cog): URL = "https://finnhub.io/api/v1/quote" TTL = 60 * 15 def __init__(self, bot): self.bot = bot self.session = bot.aio_session ...
import discord import json from datetime import datetime from discord.ext import commands from utils.aiohttp_wrap import aio_get_json class Stonks(commands.Cog): URL = "https://finnhub.io/api/v1/quote" def __init__(self, bot): self.bot = bot self.session = bot.aio_session self.redis...
mit
Python
50e69a0d53dffbc961b865f583ca071dfb49648c
Reformat class
berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud
mediacloud/mediawords/util/sql.py
mediacloud/mediawords/util/sql.py
import time import datetime # noinspection PyPackageRequirements import dateutil.parser from mediawords.util.perl import decode_string_from_bytes_if_needed def get_sql_date_from_epoch(epoch: int) -> str: # Returns local date by default, no need to set timezone try: return datetime.datetime.fromtimes...
import time import datetime # noinspection PyPackageRequirements import dateutil.parser from mediawords.util.perl import decode_string_from_bytes_if_needed def get_sql_date_from_epoch(epoch: int) -> str: # Returns local date by default, no need to set timezone try: return datetime.datetime.fromtimes...
agpl-3.0
Python
b87711d62a1f2c4974f945625312d8a33ba91fb6
convert grp_members into a lambda and add usr_search lambda
alces/essentia-et-accidentia,alces/essentia-et-accidentia,alces/essentia-et-accidentia
code-samples/membersOfDomainGroup.py
code-samples/membersOfDomainGroup.py
#!/usr/bin/env python # print a list of members of a domain group param = { '-f': 'mail', # field name '-s': '\n', # separator } import getopt import ldap import re import sys try: param.update(dict(getopt.getopt(sys.argv[1:], 'g:f:s:')[0])) if '-g' not in param: sys.stderr.write("-g parameter is required\n")...
#!/usr/bin/env python # print a list of members of a domain group param = { '-f': 'mail', # field name '-s': '\n', # separator } import getopt import ldap import re import sys try: param.update(dict(getopt.getopt(sys.argv[1:], 'g:f:s:')[0])) if '-g' not in param: sys.stderr.write("-g parameter is required\n")...
bsd-2-clause
Python
f47ebbe4dcacdd0ef96799a5d11925e0a8b6d5d5
fix import path
jplusplus/statscraper
test/test_resultset.py
test/test_resultset.py
from unittest import TestCase from statscraper import ResultSet from pandas.api import types as ptypes class TestResultSet(TestCase): def test_pandas_export(self): result = ResultSet() result.append({'city': "Voi", 'value': 45483}) df = result.pandas self.assertTrue(ptypes.is_num...
from unittest import TestCase from statscraper.base_scraper import ResultSet from pandas.api import types as ptypes class TestResultSet(TestCase): def test_pandas_export(self): result = ResultSet() result.append({'city': "Voi", 'value': 45483}) df = result.pandas self.assertTrue(...
mit
Python
cf5ad85a35824646a30d90de79d72f4068dade50
Fix failing QML test with Qt 5.9 due to assert
qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside
tests/QtQml/bug_557.py
tests/QtQml/bug_557.py
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
lgpl-2.1
Python
2ddfb4f0f4f2de060399a6e5b519a7f4b788ace5
make it possible to show languages for selected values on a map
clld/autotyp,clld/autotyp
autotyp/adapters.py
autotyp/adapters.py
from sqlalchemy.orm import joinedload from clld.interfaces import IParameter, IValue, IIndex from clld.db.meta import DBSession from clld.db.models.common import ValueSet from clld.web.adapters.base import Index from clld.web.adapters.geojson import GeoJsonParameter from clld.web.maps import SelectedLanguagesMap cla...
from sqlalchemy.orm import joinedload from clld.interfaces import IParameter, ILanguage, IIndex from clld.db.meta import DBSession from clld.db.models.common import ValueSet from clld.web.adapters.base import Index from clld.web.adapters.geojson import GeoJsonParameter from clld.web.maps import SelectedLanguagesMap ...
apache-2.0
Python
e3d082588db63690a846007beb8ddd42ebd4144e
Include pages urls into the main url patterns
FreeCodeCampRoma/precision_school-management,FreeCodeCampRoma/precision_school-management,FreeCodeCampRoma/precision_school-management,FreeCodeCampRoma/precision_school-management
config/urls.py
config/urls.py
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ # Django Admin, use {% url 'admin:index' %} url...
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ # Django Admin, use {% url 'admin:index' %} url...
mit
Python
2f412d6d98e6b03c1e3997d6acb0d15cace12e28
remove trailing spaces
felipecruz/coopy,felipecruz/coopy
coopy/utils.py
coopy/utils.py
def method_or_none(instance, name): method = getattr(instance, name) if (name[0:2] == '__' and name[-2,:] == '__') or \ not callable(method) : return None return method def action_check(obj): return (hasattr(obj, '__readonly'), hasattr(obj, '__unl...
def method_or_none(instance, name): method = getattr(instance, name) if (name[0:2] == '__' and name[-2,:] == '__') or \ not callable(method) : return None return method def action_check(obj): return (hasattr(obj, '__readonly'), hasattr(obj...
bsd-3-clause
Python
919a4f183e9a09ded7cf6272f9be300f22408c08
fix method or none method name comparison
felipecruz/coopy,felipecruz/coopy
coopy/utils.py
coopy/utils.py
def method_or_none(instance, name): method = getattr(instance, name) if (name[0:2] == '__' and name[-2:] == '__') or \ not callable(method) : return None return method def action_check(obj): return (hasattr(obj, '__readonly'), hasattr(obj, '__unlo...
def method_or_none(instance, name): method = getattr(instance, name) if (name[0:2] == '__' and name[-2,:] == '__') or \ not callable(method) : return None return method def action_check(obj): return (hasattr(obj, '__readonly'), hasattr(obj, '__unl...
bsd-3-clause
Python
b59f21ee28cc8eaf56cbc49fd7926e243e92276f
Fix bug for users with Space inside their usernames.
luanfonceca/speakerfight,luanfonceca/speakerfight,mauricioabreu/speakerfight,mauricioabreu/speakerfight,luanfonceca/speakerfight,mauricioabreu/speakerfight
core/models.py
core/models.py
from django.core.exceptions import AppRegistryNotReady from django.core.urlresolvers import reverse_lazy from django.conf import settings from django.db import models from django.db.models.signals import post_save, pre_save from django.utils.translation import ugettext as _ class Profile(models.Model): about_me =...
from django.core.exceptions import AppRegistryNotReady from django.core.urlresolvers import reverse_lazy from django.conf import settings from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext as _ class Profile(models.Model): about_me = models.Te...
mit
Python
b1eb69620bbe875d117498ed95e009a019e54fab
Fix vote app URL patterns
kuboschek/jay,OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay,kuboschek/jay
votes/urls.py
votes/urls.py
from django.conf.urls import include, url from django.views.generic import TemplateView from votes.views import VoteView, results, system_home urlpatterns = [ url(r'^$', system_home, name="system"), url(r'^(?P<vote_name>[\w-]+)/$', VoteView.as_view(), name="vote"), url(r'^(?P<vote_name>[\w-]+)/results/$'...
from django.conf.urls import include, url from django.views.generic import TemplateView from votes.views import VoteView, results, system_home urlpatterns = [ url(r'^$', system_home, name="system"), url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view(), name="vote"), url(r'^(?P<vote_name>[\w-]+)/results$', ...
mit
Python
1d0b114c7e918c87e14d9ea7a7c49cb9120db68b
Bump version (#128)
VirusTotal/vt-py
vt/version.py
vt/version.py
"""Defines VT release version.""" __version__ = '0.17.3'
"""Defines VT release version.""" __version__ = '0.17.2'
apache-2.0
Python
1034699a21dc0cf4862624d076d487deae7df9e2
add NullHandler to avoid "no handlers could be found" error.
fonttools/fonttools,googlefonts/fonttools
Lib/fontTools/__init__.py
Lib/fontTools/__init__.py
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * import logging # add a do-nothing handler to the libary's top-level logger, to avoid # "no handlers could be found" error if client doesn't configure logging log = logging.getLogger(__name__) log.addHandler(logging.NullH...
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * version = "3.0"
mit
Python
44620b2fa69500e1cada5622fa96eedd9c931006
Add test for MessageBeep()
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_winsound.py
Lib/test/test_winsound.py
# Ridiculously simple test of the winsound module for Windows. import winsound, time for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!" winsound.MessageBeep() time.sleep(0.5) winsound.MessageBeep(winsound.MB_OK) time.sleep(0.5) winsound.MessageBeep...
# Ridiculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!"
mit
Python
53a86e2318256e6edcca3d1e4ce2981a29bd8208
Add flask-email configs
Kashomon/online-ratings,usgo/online-ratings,duckpunch/online-ratings,usgo/online-ratings,Kashomon/online-ratings,duckpunch/online-ratings,Kashomon/online-ratings,usgo/online-ratings
web/config.py
web/config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class BaseConfiguration(object): DEBUG = False TESTING = False ADMINS = frozenset(['youremail@yourdomain.com']) SECRET_KEY = 'SecretKeyForSessionSigning' THREADS_PER_PAGE = 8 DATABASE = 'app.db' DATABASE_PATH = os.path.join(...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class BaseConfiguration(object): DEBUG = False TESTING = False ADMINS = frozenset(['youremail@yourdomain.com']) SECRET_KEY = 'SecretKeyForSessionSigning' THREADS_PER_PAGE = 8 DATABASE = 'app.db' DATABASE_PATH = os.path.join(...
mit
Python
d08012b044e7340ce7f8c41ce5634d72f40de35d
Update test_server.py
hushfile/hushfile-test
server-functional/test_server.py
server-functional/test_server.py
import requests import unittest import json import logging import zlib import sys from colorama import init, Fore, Back, Style logger = logging.getLogger('test_server') ENDPOINT = "you_forgot_to_provide_the_endpoint_as_the_first_command_line_argument" class TestErrorHandling(unittest.TestCase): def check_parsable_b...
import requests import unittest import json import logging logger = logging.getLogger('test_server') ENDPOINT = "http://localhost:8801/api" class TestErrorHandling(unittest.TestCase): def check_parsable_but_not_ok(self): try: self.assertNotEqual(self.resp.json()["status"], "OK") except Exception as e: log...
bsd-2-clause
Python
5000eea27c511ad036f03b64e2be7dc69bac0845
Add `JSONField`
prophile/jacquard,prophile/jacquard
jacquard/odm/fields.py
jacquard/odm/fields.py
import abc import copy class BaseField(object, metaclass=abc.ABCMeta): def __init__(self, null=False, default=None): self.null = null self.default = default @abc.abstractmethod def transform_to_storage(self, value): raise NotImplementedError() @abc.abstractmethod def tran...
import abc class BaseField(object, metaclass=abc.ABCMeta): def __init__(self, null=False, default=None): self.null = null self.default = default @abc.abstractmethod def transform_to_storage(self, value): raise NotImplementedError() @abc.abstractmethod def transform_from_s...
mit
Python
aa3a8ee76f85ef1c3c4c0beb7b6c46a0c69961f1
allow absent of tornado
mSOHU/http2
http2/__init__.py
http2/__init__.py
# -*- coding: utf-8 -*- try: from tornado import version_info except ImportError: pass else: if version_info[0] >= 4: from http2.torando4 import *
# -*- coding: utf-8 -*- from tornado import version_info if version_info[0] >= 4: from http2.torando4 import * else: raise NotImplementedError()
apache-2.0
Python
50b7345c1dcb3c2fcc05fa61108fa1649ae17a0c
Add admin filters
Iceberg-Marketplace/django-iceberg,izberg-marketplace/django-izberg,izberg-marketplace/django-izberg,Iceberg-Marketplace/django-iceberg
django_iceberg/admin.py
django_iceberg/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django_iceberg.models import UserIcebergModel class UserIcebergModelAdmin(admin.ModelAdmin): list_display = ('user', 'environment', 'last_updated', 'application_namespace') list_filter = ('environment', 'last_updated') search_fields = ('user_...
# -*- coding: utf-8 -*- from django.contrib import admin from django_iceberg.models import UserIcebergModel class UserIcebergModelAdmin(admin.ModelAdmin): list_display = ('user', 'environment', 'last_updated', 'application_namespace') raw_id_fields = ("user",) admin.site.register(UserIcebergModel, UserIc...
mit
Python
019a1ab10b71d4bb768e96957e9d485efeb588fc
add admin class for Attachment model --- djangobb_forum/admin.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
saifrahmed/DjangoBB,agepoly/DjangoBB,hsoft/slimbb,slav0nic/DjangoBB,hsoft/slimbb,saifrahmed/DjangoBB,rashoodkhan/DjangoBB,slav0nic/DjangoBB,slav0nic/DjangoBB,hsoft/slimbb,hsoft/DjangoBB,hsoft/DjangoBB,rashoodkhan/DjangoBB,agepoly/DjangoBB,agepoly/DjangoBB,hsoft/DjangoBB,saifrahmed/DjangoBB
djangobb_forum/admin.py
djangobb_forum/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth.models import User from djangobb_forum.models import Category, Forum, Topic, Post, Profile, Reputation, \ Report, Ban, Attachment class CategoryAdmin(admin.ModelAdmin): list_d...
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth.models import User from djangobb_forum.models import Category, Forum, Topic, Post, Profile, Reputation,\ Report, Ban class CategoryAdmin(admin.ModelAdmin): list_display = ['na...
bsd-3-clause
Python
8a6b88c38b2844fba03b6664fe828ebbd5a08a68
use pkdlog so it passes test for pkdp
radiasoft/pykern,radiasoft/pykern
tests/pkdebug2_test.py
tests/pkdebug2_test.py
# -*- coding: utf-8 -*- u"""pytest for `pykern.pkdebug` :copyright: Copyright (c) 2015 Bivio Software, Inc. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function def test_format(capsys): from pykern import pkconfig ...
# -*- coding: utf-8 -*- u"""pytest for `pykern.pkdebug` :copyright: Copyright (c) 2015 Bivio Software, Inc. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function def test_format(capsys): from pykern import pkconfig ...
apache-2.0
Python
db4b63ee097116c5be711d1b6a69100065f1a885
update format unicode
alswl/weby
weby/utils.py
weby/utils.py
# coding=utf8 from datetime import datetime, date import json def format_dic(dic): """将 dic 格式化为 JSON,处理日期等特殊格式""" for key, value in dic.iteritems(): dic[key] = format_value(value) return dic def format_value(value, include_fields=[], is_compact=True): if isinstance(value, dict): re...
# coding=utf8 from datetime import datetime, date def format_dic(dic): """将 dic 格式化为 JSON,处理日期等特殊格式""" for key, value in dic.iteritems(): dic[key] = format_value(value) return dic def format_value(value): if isinstance(value, dict): return format_dic(value) elif isinstance(valu...
mit
Python
72df56880ffaf0aba3b6f919d5a7f2add32623dc
Update binary_clock.py
mcgyver5/python_binary_clock
binary_clock.py
binary_clock.py
__author__ = 'tim mcguire' import datetime import math import Tkinter import sys,os def to_binary(dec, width): x = width - 1 answer = "" while x >= 0: current_power = math.pow(2, x) # how many powers of two fit into dec? how_many = int(dec / current_power) answer += str(how...
__author__ = 'tim mcguire' import datetime import math import Tkinter import sys,os def to_binary(dec, width): x = width - 1 answer = "" while x >= 0: current_power = math.pow(2, x) # how many powers of two fit into dec? how_many = int(dec / current_power) answer += str(how...
apache-2.0
Python
36ca52e816a2938c6723e3ec2ed4a350958c78d8
remove comments
mcgyver5/python_binary_clock
binary_clock.py
binary_clock.py
__author__ = 'tim mcguire' import datetime import math import Tkinter def to_binary(dec, width): x = width - 1 answer = "" while x >= 0: current_power = math.pow(2, x) # how many powers of two fit into dec? how_many = int(dec / current_power) answer += str(how_many) ...
__author__ = 'tim mcguire' import datetime import math import Tkinter def to_binary(dec, width): x = width - 1 answer = "" while x >= 0: current_power = math.pow(2, x) # how many powers of two fit into dec? how_many = int(dec / current_power) answer += str(how_many) ...
apache-2.0
Python
e59d6be5a31dbe775f6481d079f0f4e81a27a9ce
Add import of the re module to the utils module
SizzlingVortex/classyfd
classyfd/utils.py
classyfd/utils.py
""" Contains utility functions used within this library that are also useful outside of it. """ import os import pwd import string import random import re # Operating System Functions def determine_if_os_is_posix_compliant(): """ Determine if the operating system is POSIX compliant or not Return V...
""" Contains utility functions used within this library that are also useful outside of it. """ import os import pwd import string import random # Operating System Functions def determine_if_os_is_posix_compliant(): """ Determine if the operating system is POSIX compliant or not Return Value: ...
mit
Python
00e865178f8e1762e7cd1ec8d44713d73cc58c47
tidy up of DynTypedNode in python
AndrewWalker/clast,AndrewWalker/clast,AndrewWalker/clast
clast/__init__.py
clast/__init__.py
import _clast from _clast import * def __get(self, kind): return getattr(self, '_get_' + kind.__name__)() # Monkey patch an extra method on that we can't do in C++ _clast.DynTypedNode.get = __get
import _clast from _clast import * ## REPRESENTATIVE CLASSES ONLY def cxxRecordDecl(*args): return _clast._cxxRecordDecl(list(args)) def decl(*args): return _clast._decl(list(args)) def stmt(*args): return _clast._stmt(list(args)) def forStmt(*args): return _clast._forStmt(list(args)) def hasLoopI...
mit
Python
a4db65ff4c5b3edd4739b0864f4e1641b37b3b87
Remove wrong comment
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/tests/test_logging.py
setuptools/tests/test_logging.py
import inspect import logging import os import pytest setup_py = """\ from setuptools import setup setup( name="test_logging", version="0.0" ) """ @pytest.mark.parametrize( "flag, expected_level", [("--dry-run", "INFO"), ("--verbose", "DEBUG")] ) def test_verbosity_level(tmp_path, monkeypatch, flag, e...
import inspect import logging import os import pytest setup_py = """\ from setuptools import setup setup( name="test_logging", version="0.0" ) """ @pytest.mark.parametrize( "flag, expected_level", [("--dry-run", "INFO"), ("--verbose", "DEBUG")] ) def test_verbosity_level(tmp_path, monkeypatch, flag, e...
mit
Python
7bccd20523f96728db7a6b5fd23cb339787ecd3a
Bump to 1.1.4
kivy/pyjnius,kivy/pyjnius,kivy/pyjnius
jnius/__init__.py
jnius/__init__.py
''' Pyjnius ======= Accessing Java classes from Python. All the documentation is available at: http://pyjnius.readthedocs.org ''' __version__ = '1.1.4' from .jnius import * # noqa from .reflect import * # noqa from six import with_metaclass # XXX monkey patch methods that cannot be in cython. # Cython doesn't al...
''' Pyjnius ======= Accessing Java classes from Python. All the documentation is available at: http://pyjnius.readthedocs.org ''' __version__ = '1.1.4.dev0' from .jnius import * # noqa from .reflect import * # noqa from six import with_metaclass # XXX monkey patch methods that cannot be in cython. # Cython doesn...
mit
Python
6a27bd99352e4dc7f38c6f819a8a45b37c1a094c
Remove TODO to add requirements.txt
jbrudvik/yahoo-fantasy-basketball
start-active-players.py
start-active-players.py
""" Start active players for the week Ideas: - Include the names of players who cannot be started - And maybe the full roster on those dates """ import requests from bs4 import BeautifulSoup # TODO: Configure this somewhere better (as a direct argument to the script, probably TEAM_URL = 'http://basketball.fantas...
""" Start active players for the week Ideas: - Include the names of players who cannot be started - And maybe the full roster on those dates TODO: - Add required packages in requirements.txt """ import requests from bs4 import BeautifulSoup # TODO: Configure this somewhere better (as a direct argument to the sc...
mit
Python
a6390df0f4fb9c9402b1c795d4bf65765b793412
Bump dallinger version
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
dallinger/version.py
dallinger/version.py
"""Dallinger version number.""" __version__ = "5.0.6"
"""Dallinger version number.""" __version__ = "5.0.5"
mit
Python
7ed8de3d15941c683ae70c15a6ce50bbe29a6580
remove unused field from books
openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,Connexions/openstax-cms,Connexions/openstax-cms,openstax/openstax-cms
books/models.py
books/models.py
from django.db import models from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import (FieldPanel, InlinePanel) from wagtail.wagtailimages.edit_handlers import ImageChooserP...
from django.db import models from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import (FieldPanel, InlinePanel) from wagtail.wagtailimages.edit_handlers import ImageChooserP...
agpl-3.0
Python
e0b3e23d4890a10f8bca4c699e5a9cd6294fee29
add xpub
chaeplin/dashmnb,chaeplin/dashmnb
keepkey-for-mn.py
keepkey-for-mn.py
#!/usr/bin/env python3 import sys, os sys.path.append( os.path.join( os.path.dirname(__file__), '.' ) ) sys.path.append( os.path.join( os.path.dirname(__file__), '.', 'dashlib' ) ) from config import * from keepkeylib.client import KeepKeyClient from keepkeylib.transport_hid import HidTransport import keepkeylib.ckd...
#!/usr/bin/env python3 import sys, os sys.path.append( os.path.join( os.path.dirname(__file__), '.' ) ) sys.path.append( os.path.join( os.path.dirname(__file__), '.', 'dashlib' ) ) from config import * from keepkeylib.client import KeepKeyClient from keepkeylib.transport_hid import HidTransport import keepkeylib.ckd...
mit
Python
6fc68abdb48134f4e647f0a1d69becd374d1147f
add missing Python file encoding
brasilcomvc/brasilcomvc,brasilcomvc/brasilcomvc,brasilcomvc/brasilcomvc
brasilcomvc/accounts/admin.py
brasilcomvc/accounts/admin.py
# coding: utf8 from __future__ import unicode_literals from django.contrib import admin from .models import User, UserAddress class UserAdmin(admin.ModelAdmin): class UserAddressInline(admin.StackedInline): model = UserAddress list_display = ('email', 'full_name', 'username',) fieldsets = ( ...
from django.contrib import admin from .models import User, UserAddress class UserAdmin(admin.ModelAdmin): class UserAddressInline(admin.StackedInline): model = UserAddress list_display = ('email', 'full_name', 'username',) fieldsets = ( ('Informações Pessoais', { 'fields': (...
apache-2.0
Python
56cbbef7b8bbfa31445dad1561c4014804250fd5
fix test
DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core
kyototycoon/test/test_kyototycoon.py
kyototycoon/test/test_kyototycoon.py
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from nose.plugins.attrib import attr # 3p import requests # project from checks import AgentCheck from tests.checks.common import AgentCheckTest config = { 'instances': [{ 'report_url': 'ht...
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from nose.plugins.attrib import attr # 3p import requests # project from checks import AgentCheck from tests.checks.common import AgentCheckTest config = { 'instances': [{ 'report_url': 'ht...
bsd-3-clause
Python
251a91c1bf245b3674c2612149382a0f1e18dc98
Add tests for getrpcinfo
droark/bitcoin,achow101/bitcoin,midnightmagic/bitcoin,AkioNak/bitcoin,yenliangl/bitcoin,cdecker/bitcoin,pataquets/namecoin-core,bitcoinsSG/bitcoin,practicalswift/bitcoin,bespike/litecoin,rnicoll/bitcoin,namecoin/namecore,litecoin-project/litecoin,dscotese/bitcoin,fujicoin/fujicoin,CryptArc/bitcoin,bespike/litecoin,mm-s...
test/functional/interface_rpc.py
test/functional/interface_rpc.py
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests some generic aspects of the RPC interface.""" from test_framework.test_framework import BitcoinTestFr...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests some generic aspects of the RPC interface.""" from test_framework.test_framework import BitcoinTestFr...
mit
Python
46c09fd75c6f45d68cd722cd3a12b88d04257083
Add tests for getrpcinfo
chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin
test/functional/interface_rpc.py
test/functional/interface_rpc.py
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests some generic aspects of the RPC interface.""" from test_framework.test_framework import BitcoinTestFr...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests some generic aspects of the RPC interface.""" from test_framework.test_framework import BitcoinTestFr...
mit
Python
35cf00b5f05f4b1df8b40b7edc3aac76534c8903
enable some reduction tests
bh107/bohrium,bh107/bohrium,madsbk/bohrium,madsbk/bohrium,madsbk/bohrium,bh107/bohrium,madsbk/bohrium,bh107/bohrium
test/python/tests/test_reduce.py
test/python/tests/test_reduce.py
import util class test_reduce_views: """ Test reduction of all kind of views""" def init(self): for cmd, ndim in util.gen_random_arrays("R", 4, dtype="np.float32"): cmd = "R = bh.random.RandomState(42); a = %s; " % cmd for i in range(ndim): yield (cmd, i) ...
import util class tes1t_reduce_views: """ Test reduction of all kind of views""" def init(self): for cmd, ndim in util.gen_random_arrays("R", 4, dtype="np.float32"): cmd = "R = bh.random.RandomState(42); a = %s; " % cmd for i in range(ndim): yield (cmd, i) ...
apache-2.0
Python
b2266a2640d542fa6f9734fa9565a7521d06f1b0
Bump again
theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs
bulbs/__init__.py
bulbs/__init__.py
__version__ = "0.11.4"
__version__ = "0.11.3"
mit
Python
aee41bac296eece9c30565c5824db9a019833ee0
Add decorator docs
n9code/calm,n9code/calm
calm/decorator.py
calm/decorator.py
""" This module defines general decorators to define the Calm Application. """ from calm.resource import Resource from calm.ex import DefinitionError def produces(resource_type): """Decorator to specify what kind of Resource the handler produces.""" if not isinstance(resource_type, Resource): raise De...
def produces(resource_type): def decor(func): if getattr(func, 'handler_def', None): func.handler_def.produces = resource_type else: func.produces = resource_type return func return decor def consumes(resource_type): def decor(func): if getattr(f...
mit
Python
6f0b75f0561563926afc37dca8451f886e2e2d4f
Handle unicode data like cdbdump
pombredanne/python-pure-cdb,dw/python-pure-cdb,dw/python-pure-cdb,pombredanne/python-pure-cdb
cdblib/cdbdump.py
cdblib/cdbdump.py
from __future__ import print_function import argparse import sys import six import cdblib def cdbdump(parsed_args, **kwargs): # Read binary data from stdin by default stdin = kwargs.get('stdin') if stdin is None: stdin = sys.stdin if six.PY2 else sys.stdin.buffer # Print text data to stdou...
from __future__ import print_function import argparse import sys import six import cdblib def cdbdump(parsed_args, **kwargs): # Read binary data from stdin by default stdin = kwargs.get('stdin') if stdin is None: stdin = sys.stdin if six.PY2 else sys.stdin.buffer # Print text data to stdou...
mit
Python
9e22b82b9f5848ae3bfc8def66fe7b3d23c8f5b8
Change Alfred date of posting to be iso8601 compatible.
multiplechoice/workplace
jobs/spiders/alfred.py
jobs/spiders/alfred.py
import json import urlparse import dateutil.parser import scrapy from jobs.items import JobsItem class AlfredSpider(scrapy.Spider): name = "alfred" start_urls = ['https://api.alfred.is/api/v3/web/open/jobs?cat=0&limit=100&page=0'] def parse(self, response): # we're using an api rather than scra...
import json import urlparse import scrapy from jobs.items import JobsItem from jobs.spiders.visir import decode_date_string class AlfredSpider(scrapy.Spider): name = "alfred" start_urls = ['https://api.alfred.is/api/v3/web/open/jobs?cat=0&limit=100&page=0'] def parse(self, response): # we're us...
apache-2.0
Python
210c2cf58c246c3733542b8fee7c3eb9fe5d860d
bump version
project-callisto/callisto-core,SexualHealthInnovations/callisto-core,project-callisto/callisto-core,SexualHealthInnovations/callisto-core
callisto/delivery/__init__.py
callisto/delivery/__init__.py
__version__ = '0.4.1'
__version__ = '0.4.0'
agpl-3.0
Python
623ce2d8624a1a04156a35ae762d29a19fbc7b52
fix broken docstring
rtulke/ceph-deploy,trhoden/ceph-deploy,branto1/ceph-deploy,ktdreyer/ceph-deploy,ktdreyer/ceph-deploy,codenrhoden/ceph-deploy,Vicente-Cheng/ceph-deploy,isyippee/ceph-deploy,SUSE/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,jumpstarter-io/ceph-deploy,isyippee/ceph-deploy,codenrhoden/ceph-deploy,zhouyuan/ceph-deploy,shenheq...
ceph_deploy/util/templates.py
ceph_deploy/util/templates.py
ceph_repo = """ [ceph] name=Ceph packages for $basearch baseurl={repo_url}/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey={gpg_url} [ceph-noarch] name=Ceph noarch packages baseurl={repo_url}/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey={gpg_url} [ceph-source] name=Ceph source packages baseurl={repo_url}/SRPMS ...
ceph_repo = """ [ceph] name=Ceph packages for $basearch baseurl={repo_url}/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey={gpg_url} [ceph-noarch] name=Ceph noarch packages baseurl={repo_url}/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey={gpg_url} [ceph-source] name=Ceph source packages baseurl={repo_url}/SRPMS ...
mit
Python
f4b8246aead0657e0f997773efed5fbc2147cce7
add '# noqa' to imports to make flake8 happy
alfredodeza/ceph-doctor
ceph_medic/remote/__init__.py
ceph_medic/remote/__init__.py
import mon # noqa import osd # noqa import common # noqa import functions # noqa import commands # noqa
import mon import osd import common import functions import commands
mit
Python
20e8ef6bd68100a70b9d50013630ff71d8b7ec94
Support wildcard matches on coverage/junit results
dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes
changes/artifacts/__init__.py
changes/artifacts/__init__.py
from __future__ import absolute_import, print_function from .manager import Manager from .coverage import CoverageHandler from .xunit import XunitHandler manager = Manager() manager.register(CoverageHandler, ['coverage.xml', '*.coverage.xml']) manager.register(XunitHandler, ['xunit.xml', 'junit.xml', '*.xunit.xml', ...
from __future__ import absolute_import, print_function from .manager import Manager from .coverage import CoverageHandler from .xunit import XunitHandler manager = Manager() manager.register(CoverageHandler, ['coverage.xml']) manager.register(XunitHandler, ['xunit.xml', 'junit.xml'])
apache-2.0
Python
0bf6441863433575aebcbd0b238d27d95830c015
Fix .iob converter (closes #3620)
honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy
spacy/cli/converters/iob2json.py
spacy/cli/converters/iob2json.py
# coding: utf8 from __future__ import unicode_literals import re from cytoolz import partition_all from ...gold import iob_to_biluo def iob2json(input_data, n_sents=10, *args, **kwargs): """ Convert IOB files into JSON format for use with train cli. """ sentences = read_iob(input_data.split("\n")) ...
# coding: utf8 from __future__ import unicode_literals import re from ...gold import iob_to_biluo from ...util import minibatch def iob2json(input_data, n_sents=10, *args, **kwargs): """ Convert IOB files into JSON format for use with train cli. """ docs = [] for group in minibatch(docs, n_sents...
mit
Python
f190916a828ab4b8ecf16cc6a82ebf3cf8f821e1
Add a test for executing specs with tags
nestorsalceda/mamba
spec/execution_with_tags_spec.py
spec/execution_with_tags_spec.py
from mamba import description, before, context, it from doublex import Spy from expects import expect, be_true, be_false from mamba import reporter, runnable from mamba.example import Example from mamba.example_group import ExampleGroup from spec.object_mother import an_example_group TAGS = ['any_tag'] with descri...
from mamba import description, before, context, it from doublex import Spy from expects import expect, be_true, be_false from mamba import reporter, runnable from mamba.example import Example from mamba.example_group import ExampleGroup from spec.object_mother import an_example_group TAGS = ['any_tag'] with descri...
mit
Python
d57fb3ca8c1f4329c8ac90cb785b27123d98aee5
Bump the version to 0.3.1
dmtucker/backlog
backlog/__init__.py
backlog/__init__.py
"""A Simple Note Manager""" from __future__ import absolute_import from backlog.backlog import Backlog __version__ = '0.3.1'
"""A Simple Note Manager""" from __future__ import absolute_import from backlog.backlog import Backlog __version__ = '0.3.0'
lgpl-2.1
Python
0f782215e58eba53b72667bffde667f4d03a0d4a
Update version.
alphagov/notifications-python-client,alphagov/notifications-python-client
client/version.py
client/version.py
__version__ = '0.2.0'
__version__ = '0.1.9'
mit
Python
6749060a7546b7dee3c6e643c7dfad4db7934061
package for release
9nix00/cliez
cliez/__init__.py
cliez/__init__.py
# -*- coding: utf-8 -*- version = "1.6.10" version_info = (1, 6, 10)
# -*- coding: utf-8 -*- version = "1.6.9" version_info = (1, 6, 9)
mit
Python
05f45992e871dc0d98613fb31269c43e21869414
Add envy help command
cloudenvy/cloudenvy
cloudenvy/main.py
cloudenvy/main.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 import argparse import logging from cloudenvy.config import EnvyConfig from cloudenvy.commands.envy_up import EnvyUp from cloudenvy.commands.envy_list import EnvyList from cloudenvy.commands.envy_provision import EnvyProvision from cloudenvy.commands.envy_snapshot import E...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 import argparse import logging from cloudenvy.config import EnvyConfig from cloudenvy.commands.envy_up import EnvyUp from cloudenvy.commands.envy_list import EnvyList from cloudenvy.commands.envy_provision import EnvyProvision from cloudenvy.commands.envy_snapshot import E...
apache-2.0
Python
41bb51f7f0aa1fda927af51498ec1acbf9eeddcc
fix history links
LeagueOfAutomatedNations/LeagueBot,LeagueOfAutomatedNations/LeagueBot
leaguebot/services/alerters/slack.py
leaguebot/services/alerters/slack.py
from leaguebot import app import leaguebot.models.map as screepmap import leaguebot.services.screeps as screeps import leaguebot.services.slack as slack import re def sendBattleMessage(battleinfo): message = getBattleMessageText(battleinfo) sendToSlack(message) def getBattleMessageText(battleinfo): room...
from leaguebot import app import leaguebot.models.map as screepmap import leaguebot.services.screeps as screeps import leaguebot.services.slack as slack import re def sendBattleMessage(battleinfo): message = getBattleMessageText(battleinfo) sendToSlack(message) def getBattleMessageText(battleinfo): room...
mit
Python
2c9a0f9783c72af122d7c728a7760c8a2027d45f
Fix remove debug print
genropy/genropy-core,genropy/genropy-core
tests/resolver_test.py
tests/resolver_test.py
from gnr.core.gnrbag import Bag, BagCbResolver def hello(x=''): return 'i say : %s ' % x b = Bag() b.setCallBackItem('say_hello', hello, x='hello') b.setCallBackItem('say_muu', hello, x='muu') b.setCallBackItem('say_buzbuz', hello, x='buzbuz') resolver = BagCbResolver(hello, x='fatto da resolver e non da setCallB...
from gnr.core.gnrbag import Bag, BagCbResolver def hello(x=''): return 'i say : %s ' % x b = Bag() b.setCallBackItem('say_hello', hello, x='hello') b.setCallBackItem('say_muu', hello, x='muu') b.setCallBackItem('say_buzbuz', hello, x='buzbuz') resolver = BagCbResolver(hello, x='fatto da resolver e non da setCallB...
lgpl-2.1
Python
539c11706d91db92e36f49694603f2ed668d8cbb
Add a __unicode__ method to the Book model. Will show book title in admin instead of "Book object".
zbyte64/django-dockit,zbyte64/django-dockit
test_environment/books/models.py
test_environment/books/models.py
from dockit.schema import Document, Schema, ModelReferenceField, \ TextField, DictField, SchemaField, FileField, IntegerField, \ ReferenceField, ListField, GenericSchemaField, CharField, DateField from django.contrib.auth.models import User class Author(Document): user = ModelReferenceField(User) inte...
from dockit.schema import Document, Schema, ModelReferenceField, \ TextField, DictField, SchemaField, FileField, IntegerField, \ ReferenceField, ListField, GenericSchemaField, CharField, DateField from django.contrib.auth.models import User class Author(Document): user = ModelReferenceField(User) inte...
bsd-3-clause
Python
bfb048d9a1ac34cd07e0fc8d94c0e97d901ee096
fix simple_parser
mgilson/html5lib-python,alex/html5lib-python,dstufft/html5lib-python,alex/html5lib-python,mgilson/html5lib-python,mgilson/html5lib-python,html5lib/html5lib-python,gsnedders/html5lib-python,mindw/html5lib-python,html5lib/html5lib-python,dstufft/html5lib-python,dstufft/html5lib-python,ordbogen/html5lib-python,mindw/html5...
tests/simple_parser.py
tests/simple_parser.py
from test_parser import * import sys, os os.chdir(os.path.split(os.path.abspath(__file__))[0]) sys.path.insert(0, os.path.abspath(os.pardir)) import parser if __name__ == "__main__": x = "" if len(sys.argv) > 1: x = sys.argv[1] else: x = "x" p = parser.HTMLParser() documen...
from test_parser import * import sys os.chdir("..") import parser if __name__ == "__main__": x = "" if len(sys.argv) > 1: x = sys.argv[1] else: x = "x" p = parser.HTMLParser() document = p.parse(StringIO.StringIO(x)) print convertTreeDump(document.printTree())
mit
Python
ae8f9c39cd75d837a4cb5a4cea4d3d11fd1cabed
Add additional test case for comments
PyCQA/isort,PyCQA/isort
tests/test_comments.py
tests/test_comments.py
from hypothesis_auto import auto_pytest_magic from isort import comments auto_pytest_magic(comments.parse) auto_pytest_magic(comments.add_to_line) def test_add_to_line(): assert comments.add_to_line([], "import os # comment", removed=True).strip() == "import os"
from hypothesis_auto import auto_pytest_magic from isort import comments auto_pytest_magic(comments.parse) auto_pytest_magic(comments.add_to_line)
mit
Python
aa1008691e3433f8350d3f3a5e5d03d9c629a45c
Test for getting parameters back from ideal observer
achabotl/pambox
tests/test_idealobs.py
tests/test_idealobs.py
import pytest import scipy.io as sio from pambox import idealobs import numpy as np @pytest.fixture def data(): return np.array([0.28032187, 1.07108181, 3.35513227, 8.66774961, 18.61914334, 33.63172026, 51.87228063, 69.72236134, 83.79127082, 92.72205919, 97.287...
import pytest import scipy.io as sio from pambox import idealobs import numpy as np @pytest.fixture def data(): return np.array([0.28032187, 1.07108181, 3.35513227, 8.66774961, 18.61914334, 33.63172026, 51.87228063, 69.72236134, 83.79127082, 92.72205919, 97.287...
bsd-3-clause
Python