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
7854cadb63559c426f60da8c1bd63657dc0c67a1
support for all_episodes
olof/svtplay-dl,dalgr/svtplay-dl,leakim/svtplay-dl,OakNinja/svtplay-dl,spaam/svtplay-dl,OakNinja/svtplay-dl,spaam/svtplay-dl,dalgr/svtplay-dl,iwconfig/svtplay-dl,selepo/svtplay-dl,leakim/svtplay-dl,olof/svtplay-dl,OakNinja/svtplay-dl,qnorsten/svtplay-dl,leakim/svtplay-dl,qnorsten/svtplay-dl,iwconfig/svtplay-dl,selepo/s...
lib/svtplay_dl/service/mtvnn.py
lib/svtplay_dl/service/mtvnn.py
from __future__ import absolute_import import sys import re import os import xml.etree.ElementTree as ET from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils import get_http_data, is_py2_old from svtplay_dl.log import log from svtplay_dl.fetcher.rtmp import RTMP # This is _very_ similar t...
from __future__ import absolute_import import sys import re import os import xml.etree.ElementTree as ET from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils import get_http_data, is_py2_old from svtplay_dl.log import log from svtplay_dl.fetcher.rtmp import RTMP # This is _very_ similar t...
mit
Python
e6ceacdc238bb3e7179bfffc08c3e030659647f3
Tweak outline contour value
fancompute/ceviche,fancompute/ceviche
ceviche/viz.py
ceviche/viz.py
import numpy as np import matplotlib.pylab as plt """ Utilities for plotting and visualization """ def real(val, outline=None, ax=None, cbar=False, cmap='RdBu', outline_alpha=0.5): """Plots the real part of 'val', optionally overlaying an outline of 'outline' """ if ax is None: fig, ax = plt.subp...
import numpy as np import matplotlib.pylab as plt """ Utilities for plotting and visualization """ def real(val, outline=None, ax=None, cbar=False, cmap='RdBu', outline_alpha=0.5): """Plots the real part of 'val', optionally overlaying an outline of 'outline' """ if ax is None: fig, ax = plt.subp...
mit
Python
cb05d714254df5a8c82b56d9a6d2af44a98099c3
Fix comparison to literal in abort.py.
google/glazier,google/glazier
glazier/lib/actions/abort.py
glazier/lib/actions/abort.py
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
Python
0e3f4e07803a9f7f4c346c42277932169e3c7725
Correct logging filter
JamesMura/sentry,mitsuhiko/sentry,1tush/sentry,argonemyth/sentry,ifduyue/sentry,Kryz/sentry,wujuguang/sentry,JTCunning/sentry,beeftornado/sentry,ewdurbin/sentry,pauloschilling/sentry,mvaled/sentry,Natim/sentry,gg7/sentry,gencer/sentry,JamesMura/sentry,JTCunning/sentry,drcapulet/sentry,korealerts1/sentry,BayanGroup/sent...
src/sentry/utils/raven.py
src/sentry/utils/raven.py
from __future__ import absolute_import, print_function import inspect import logging from django.conf import settings from raven.contrib.django.client import DjangoClient from . import metrics UNSAFE_FILES = ( 'sentry/event_manager.py', 'sentry/tasks/process_buffer.py', ) def can_record_current_event(): ...
from __future__ import absolute_import, print_function import inspect import logging from django.conf import settings from raven.contrib.django.client import DjangoClient from . import metrics UNSAFE_FILES = ( 'sentry/event_manager.py', 'sentry/tasks/process_buffer.py', ) def can_record_current_event(): ...
bsd-3-clause
Python
d9ec6f79ac1fdef3a3137e7c5924a5e50ca2a6d5
Add quantize call to fastText call generator
JungeAlexander/cocoscore
cocoscore/ml/fasttext_helpers.py
cocoscore/ml/fasttext_helpers.py
import numpy as np def get_uniform(low, high, random_seed): random_state = np.random.RandomState(random_seed) return lambda: float('%.3g' % random_state.uniform(low, high)) def get_uniform_int(low, high, random_seed): random_state = np.random.RandomState(random_seed) return lambda: random_state.rand...
import numpy as np def get_uniform(low, high, random_seed): random_state = np.random.RandomState(random_seed) return lambda: float('%.3g' % random_state.uniform(low, high)) def get_uniform_int(low, high, random_seed): random_state = np.random.RandomState(random_seed) return lambda: random_state.rand...
mit
Python
3d89d60890745a7f542af9f9e138b3f6f1557693
Add more thorough note about precision problem
skyfielders/python-skyfield,skyfielders/python-skyfield
skyfield/tests/test_planetarylib.py
skyfield/tests/test_planetarylib.py
import numpy as np from skyfield.api import PlanetaryConstants, T0, load def test_rotation(): et_seconds = 259056665.0 ts = load.timescale() t = ts.tdb_jd(T0 + et_seconds / 3600. / 24.0) pc = PlanetaryConstants() pc.read_text(load('moon_080317.tf')) pc.read_binary(load('moon_pa_de421_1900-2050...
import numpy as np from skyfield.api import PlanetaryConstants, T0, load def test_rotation(): et_seconds = 259056665.0 ts = load.timescale() t = ts.tdb_jd(T0 + et_seconds / 3600. / 24.0) pc = PlanetaryConstants() pc.read_text(load('moon_080317.tf')) pc.read_binary(load('moon_pa_de421_1900-2050...
mit
Python
fc7e91ead4cb8d1dd297a727e8192462f657524f
Fix merge error.
kaffeel/oppia,kennho/oppia,himanshu-dixit/oppia,prasanna08/oppia,brianrodri/oppia,edallison/oppia,kaffeel/oppia,bjvoth/oppia,virajprabhu/oppia,gale320/oppia,google-code-export/oppia,AllanYangZhou/oppia,oppia/oppia,sunu/oppia,google-code-export/oppia,Atlas-Sailed-Co/oppia,virajprabhu/oppia,toooooper/oppia,MaximLich/oppi...
core/storage/user/gae_models.py
core/storage/user/gae_models.py
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
Python
970988664a31137fc719700b172aa1ddaa53225c
clear cache if home page
saurabh6790/test-erp,sheafferusa/erpnext,suyashphadtare/vestasi-erp-1,suyashphadtare/gd-erp,susuchina/ERPNEXT,saurabh6790/pow-app,indictranstech/vestasi-erpnext,Tejal011089/fbd_erpnext,gangadhar-kadam/powapp,saurabh6790/aimobilize,indictranstech/phrerp,gangadharkadam/vlinkerp,saurabh6790/med_app_rels,gangadharkadam/let...
erpnext/website/doctype/web_page/web_page.py
erpnext/website/doctype/web_page/web_page.py
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # 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 yo...
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # 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 yo...
agpl-3.0
Python
af5d19ea3721c3303ecb53fbc3adc747b9513417
Update experiment_jsd_opinions script to new opinions format
NLeSC/cptm,NLeSC/cptm
cptm/experiment_jsd_opinions.py
cptm/experiment_jsd_opinions.py
import logging import argparse import pandas as pd import numpy as np from utils.experiment import load_config, get_corpus, load_opinions from utils.controversialissues import jsd_opinions logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = arg...
import logging import argparse import pandas as pd import numpy as np from utils.experiment import load_config, get_corpus, load_opinions from utils.controversialissues import jsd_opinions logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = arg...
apache-2.0
Python
ddb4422043ff9af21047c11c9f99b9812cff2bfd
index out of range
ClearCorp-dev/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp-dev...
address_name_inc/address_name_inc.py
address_name_inc/address_name_inc.py
# -*- encoding: utf-8 -*- ############################################################################## # # address_name_inc.py # address_name_inc # First author: Mag Guevara <mag.guevara@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserv...
# -*- encoding: utf-8 -*- ############################################################################## # # address_name_inc.py # address_name_inc # First author: Mag Guevara <mag.guevara@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserv...
agpl-3.0
Python
70d68cee2234c01edd76dffe2c806a22f96c37b5
clean pickler memo
SebastianCallh/kartoffel-tsea29,SebastianCallh/kartoffel-tsea29
pi/bt_task_handler.py
pi/bt_task_handler.py
import pickle # Files in which to store BT_task objects in transition class BT_task: # NOTE If the client always asks for certain data # it might not need to check it when it arrives? def __init__(self, cmd_id = 0, data = 0): self.cmd_id = int(cmd_id) self.data = data def clean_queue...
import pickle # Files in which to store BT_task objects in transition class BT_task: # NOTE If the client always asks for certain data # it might not need to check it when it arrives? def __init__(self, cmd_id = 0, data = 0): self.cmd_id = int(cmd_id) self.data = data def clean_queue...
mit
Python
05b29a6e2491e73e1703d2e5ff39611821f75eb4
Test all combinations of corner cases
behrtam/xpython,rootulp/xpython,behrtam/xpython,pheanex/xpython,de2Zotjes/xpython,N-Parsons/exercism-python,exercism/python,de2Zotjes/xpython,smalley/python,N-Parsons/exercism-python,oalbe/xpython,mweb/python,exercism/xpython,rootulp/xpython,exercism/xpython,exercism/python,jmluy/xpython,mweb/python,pheanex/xpython,sma...
largest-series-product/largest_series_product_test.py
largest-series-product/largest_series_product_test.py
"""Tests for the largest-series-product exercise Implementation note: In case of invalid inputs to the 'slices' or 'largest_product' functions your program should raise a ValueError with a meaningful error message. Feel free to reuse your code for the series exercise! """ import unittest from series import largest_p...
"""Tests for the largest-series-product exercise Implementation note: In case of invalid inputs to the 'slices' or 'largest_product' functions your program should raise a ValueError with a meaningful error message. Feel free to reuse your code for the series exercise! """ import unittest from series import largest_p...
mit
Python
677462d6c698f39a0dd86629287ebe424a9367b3
Fix testsuite to be flake8-compliant
globusonline/globus-sdk-python,globus/globus-sdk-python,globus/globus-sdk-python,aaschaer/globus-sdk-python,sirosen/globus-sdk-python
globus_sdk/tests/test_deprecation_warnings.py
globus_sdk/tests/test_deprecation_warnings.py
""" Test that our DeprecationWarnings and PendingDeprecationWarnings are being displayed correctly on stderr, and under the right conditions. """ import sys import warnings from globus_sdk.nexus import NexusClient from globus_sdk.tests.framework import CapturedIOTestCase class DeprecationWarningsTests(CapturedIOTe...
""" Test that our DeprecationWarnings and PendingDeprecationWarnings are being displayed correctly on stderr, and under the right conditions. """ import sys import warnings from globus_sdk.nexus import NexusClient from globus_sdk.tests.framework import CapturedIOTestCase class DeprecationWarningsTests(CapturedIOTe...
apache-2.0
Python
71019d13676ab68b9ffbc54ac150bed87ca2f37a
Correct assertEqual count for Account and Movement objects. #505
lino-framework/welfare,lino-framework/welfare,khchine5/lino-welfare,lsaffre/lino-welfare,lino-framework/welfare,lsaffre/lino-welfare,lsaffre/lino-welfare,lino-framework/welfare,lsaffre/lino-welfare,khchine5/lino-welfare,khchine5/lino-welfare,khchine5/lino-welfare,khchine5/lino-welfare,lsaffre/lino-welfare,lino-framewor...
lino_welfare/projects/eupen/tests/test_import_sepa.py
lino_welfare/projects/eupen/tests/test_import_sepa.py
# -*- coding: UTF-8 -*- # Copyright 2015 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 version 3 of the # License, or (at your o...
# -*- coding: UTF-8 -*- # Copyright 2015 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 version 3 of the # License, or (at your o...
agpl-3.0
Python
b51c278fdd601e07eb2c791129f469c8da6a696e
add sendMail and comment
Yokan-Study/study,Yokan-Study/study,Yokan-Study/study
2018/08.05/app.py
2018/08.05/app.py
from flask import Flask from flask import render_template from jya_gAPIclass import GapiClass app = Flask(__name__) @app.route('/mail') def mail(): return render_template('mailcontents.html') # 1. /mail 페이지에서 정보(1, 2)를 입력 받아, [발송] 버튼을 누르면 /send로 이동 @app.route('/send') def send(): instance = GapiClass() instan...
from flask import Flask from flask import render_template from jya_gAPIclass import GapiClass app = Flask(__name__) @app.route('/mail') def mail(): return render_template('mailcontents.html') @app.route('/send') def send(): instance = GapiClass() instance.sendMail(mail_title , mail_text, email, name) if __nam...
mit
Python
8d34d4c7c4bc5216a9379a84c8a4e8af7af66a12
Fix lint errors
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/tan/benchmark/python/benchmark.py
lib/node_modules/@stdlib/math/base/special/tan/benchmark/python/benchmark.py
#!/usr/bin/env python """Benchmark tan.""" from __future__ import print_function import timeit NAME = "tan" REPEATS = 3 ITERATIONS = 1000000 def print_version(): """Print the TAP version.""" print("TAP version 13") def print_summary(total, passing): """Print the benchmark summary. # Arguments ...
#!/usr/bin/env python """Benchmark tan.""" import timeit name = "tan" repeats = 3 iterations = 1000000 def print_version(): """Print the TAP version.""" print("TAP version 13") def print_summary(total, passing): """Print the benchmark summary. # Arguments * `total`: total number of tests ...
apache-2.0
Python
284d78594624bcbd540ca806ac4d58fa237a5124
replace xrange by range - python3 compatibility
certtools/intelmq,sch3m4/intelmq,pkug/intelmq,pkug/intelmq,aaronkaplan/intelmq,robcza/intelmq,sch3m4/intelmq,certtools/intelmq,robcza/intelmq,sch3m4/intelmq,pkug/intelmq,robcza/intelmq,pkug/intelmq,sch3m4/intelmq,robcza/intelmq,aaronkaplan/intelmq,certtools/intelmq,aaronkaplan/intelmq
intelmq/bots/parsers/malwaredomains/parser.py
intelmq/bots/parsers/malwaredomains/parser.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import sys from intelmq.lib import utils from intelmq.lib.bot import Bot from intelmq.lib.message import Event def is_valid_date(strd): try: datetime.datetime.strptime(strd, '%Y%m%d') return True except Exception:...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import sys from intelmq.lib import utils from intelmq.lib.bot import Bot from intelmq.lib.message import Event def is_valid_date(strd): try: datetime.datetime.strptime(strd, '%Y%m%d') return True except Exception:...
agpl-3.0
Python
72865598fbe8658ade68f67da4e2a244a13713b9
Add command-line flags for spline order and accuracy.
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/plot-marker-trajectories.py
analysis/plot-marker-trajectories.py
import climate import lmj.plot import numpy as np import source import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', 'option'), markers=('plot traces of these markers', 'option'), spline=('interpolate data with a splin...
import climate import lmj.plot import numpy as np import source import plots @climate.annotate( root='load experiment data from this directory', pattern='plot data from files matching this pattern', markers='plot traces of these markers', ) def main(root, pattern='*5/*block00/*circuit00.csv.gz', markers=...
mit
Python
7e29a34ea6bdb0cf5c640570669f0f1bd8adfdd0
change xmlids of legacy rules to point to auditlog.rule
YannickB/server-tools,OCA/server-tools,YannickB/server-tools,OCA/server-tools,YannickB/server-tools,OCA/server-tools
auditlog/__init__.py
auditlog/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
Python
03031bb9944e4a9e253bf50babc382b6d920d039
Update urls.py
mozilla/django-jobvite
django_jobvite/urls.py
django_jobvite/urls.py
try: from django.conf.urls import patterns, url except ImportError: from django.conf.urls.defaults import patterns, url urlpatterns = patterns('', url(r'^positions/$', 'django_jobvite.views.positions', name='django_jobvite_positions'), url(r'^positions/(?P<job_id>[\w]+)/$', 'django_jobvite....
try: from django.conf.urls import patterns, url except: from django.conf.urls.defaults import patterns, url urlpatterns = patterns('', url(r'^positions/$', 'django_jobvite.views.positions', name='django_jobvite_positions'), url(r'^positions/(?P<job_id>[\w]+)/$', 'django_jobvite.views.positi...
bsd-3-clause
Python
97019a484de72f85b36caae9cea156bf206c3442
fix issue with templates rendering into unicode
rfk/django-supervisor
djsupervisor/config.py
djsupervisor/config.py
import os try: raise ImportError from cStringIO import StringIO except ImportError: from StringIO import StringIO from django import template from django.conf import settings from django.utils.importlib import import_module def find_all_configs(): """Generator yielding config file contents, in orde...
import os try: raise ImportError from cStringIO import StringIO except ImportError: from StringIO import StringIO from django import template from django.conf import settings from django.utils.importlib import import_module def find_all_configs(): """Generator yielding config file contents, in orde...
mit
Python
a14f4dc8bef011a5e48dc5caecb6f254d2a18534
update bitcoinaddr.py
c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet,c86j224s/snippet
Python_Bitcoin/bitcoinaddr.py
Python_Bitcoin/bitcoinaddr.py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import ecdsa import base58 import hashlib import unittest # ref : https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses def privkeytopubkey(privk): sk = ecdsa.SigningKey.from_string(privk, curve=ecdsa.SECP256k1) pubk = b'\04' + sk.veri...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import ecdsa import base58 import hashlib import unittest # ref : https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses # ref :https://davanum.wordpress.com/2014/03/17/generating-a-bitcoin-private-key-and-address/ def privkeytopubkey(privk): ...
apache-2.0
Python
62026ae2ee1965aa7005a73cc1f60d704fd1c8b0
remove duplicate vertical tail constraints (#143)
convexengineering/gplibrary,convexengineering/gplibrary
gpkitmodels/GP/aircraft/tail/vertical_tail.py
gpkitmodels/GP/aircraft/tail/vertical_tail.py
" vertical tail " from gpkit import parse_variables from .tail_aero import TailAero from gpkitmodels.GP.aircraft.wing.wing import Wing from gpkitmodels.GP.aircraft.wing.wing_core import WingCore from gpkitmodels.GP.aircraft.wing.wing_skin import WingSkin #pylint: disable=attribute-defined-outside-init, no-member, exec...
" vertical tail " from gpkit import parse_variables from .tail_aero import TailAero from gpkitmodels.GP.aircraft.wing.wing import Wing from gpkitmodels.GP.aircraft.wing.wing_core import WingCore from gpkitmodels.GP.aircraft.wing.wing_skin import WingSkin #pylint: disable=attribute-defined-outside-init, no-member, exec...
mit
Python
088b6d443e20dfb4b817a9e535ffa512367b820c
Fix lint
jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch
gpytorch/kernels/grid_interpolation_kernel.py
gpytorch/kernels/grid_interpolation_kernel.py
import torch from torch.autograd import Variable from .kernel import Kernel from gpytorch.utils.interpolation import Interpolation from gpytorch.lazy import ToeplitzLazyVariable class GridInterpolationKernel(Kernel): def __init__(self, base_kernel_module, grid_size): super(GridInterpolationKernel...
import torch from torch.autograd import Variable from .kernel import Kernel from gpytorch.utils.interpolation import Interpolation from gpytorch.lazy import ToeplitzLazyVariable class GridInterpolationKernel(Kernel): def __init__(self, base_kernel_module, grid_size): super(GridInterpolationKernel...
mit
Python
d38599b88a4537d92b562010ca4b7e56580f2e35
Reorder imports and use Black code style. Updated version to 0.4.4
eamigo86/graphene-django-extras
graphene_django_extras/directives/__init__.py
graphene_django_extras/directives/__init__.py
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDirective, # ...
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .list import ShuffleGraphQLDirective, SampleGraphQLDirective from .numbers import FloorGraphQLDirective, CeilGraphQLDirective from .string import ( DefaultGraphQLDirective, Base64GraphQLDirective, Nu...
mit
Python
baf41667c9c86484319c58e56187792ed571b6db
Fix writing UTF-8 texts to certificate templates
codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events
certificates/generator.py
certificates/generator.py
from os import system from os import unlink from os.path import dirname from os.path import realpath def generate_certificate_for(event_id, certificate_name, name_of_certificate_holder): resources_path = dirname(realpath(__file__)) + '/resources/' static_files_path = dirname(dirname(realpa...
from os import system from os import unlink from os.path import dirname from os.path import realpath def generate_certificate_for(event_id, certificate_name, name_of_certificate_holder): resources_path = dirname(realpath(__file__)) + '/resources/' static_files_path = dirname(dirname(realpa...
mit
Python
3f00814dd338d1c50f03f90194f0e818f5875dcb
Fix typo
rigdenlab/ample,rigdenlab/ample,linucks/ample,linucks/ample
examples/missing-domain.1k04/test_cases.py
examples/missing-domain.1k04/test_cases.py
#!/usr/bin/env ccp4-python ''' Created on 29 Dec 2015 @author: jmht ''' import os import sys AMPLE_DIR = os.sep.join(os.path.abspath(os.path.dirname(__file__)).split(os.sep)[ :-2 ]) sys.path.append(os.path.join(AMPLE_DIR,'python')) import test_funcs test_dict = {} ##################################################...
#!/usr/bin/env ccp4-python ''' Created on 29 Dec 2015 @author: jmht ''' import os import sys AMPLE_DIR = os.sep.join(os.path.abspath(os.path.dirname(__file__)).split(os.sep)[ :-2 ]) sys.path.append(os.path.join(AMPLE_DIR,'python')) import test_funcs test_dict = {} ##################################################...
bsd-3-clause
Python
23dfc12f69f24cc08368a88dd9b64c96331006d4
Add missing import in appengine_poller.py
Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbo...
compute_engine_scripts/telemetry/telemetry_master_scripts/appengine_poller.py
compute_engine_scripts/telemetry/telemetry_master_scripts/appengine_poller.py
#!/usr/bin/env python # Copyright (c) 2013 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. """Module that polls the skia-telemetry AppEngine WebApp.""" import json import os import subprocess import sys import tempfile i...
#!/usr/bin/env python # Copyright (c) 2013 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. """Module that polls the skia-telemetry AppEngine WebApp.""" import json import os import subprocess import sys import tempfile i...
bsd-3-clause
Python
050a8e10ea3253a1947c177649d61e44cfc8af78
add tests to init
OLAPLINE/TM1py
Tests/__init__.py
Tests/__init__.py
from Tests.Annotation import TestAnnotationMethods from Tests.Application import TestApplicationMethods from Tests.Cell import TestCellMethods from Tests.Chore import TestChoreMethods from Tests.Cube import TestCubeMethods from Tests.Dimension import TestDimensionMethods from Tests.Element import TestElementMethods fro...
from Tests.Annotation import TestAnnotationMethods from Tests.Application import TestApplicationMethods from Tests.Cell import TestCellMethods from Tests.Chore import TestChoreMethods from Tests.Cube import TestCubeMethods from Tests.Dimension import TestDimensionMethods from Tests.Element import TestElementMethods fro...
mit
Python
2f17fe19862513bb32276cd44ce274262c2b8aee
Update GetConfig.py
jhao104/proxy_pool,jhao104/proxy_pool
Util/GetConfig.py
Util/GetConfig.py
# -*- coding: utf-8 -*- # !/usr/bin/env python """ ------------------------------------------------- File Name: GetConfig.py Description : fetch config from config.ini Author : JHao date: 2016/12/3 ------------------------------------------------- Change Activity: ...
# -*- coding: utf-8 -*- # !/usr/bin/env python """ ------------------------------------------------- File Name: GetConfig.py Description : fetch config from config.ini Author : JHao date: 2016/12/3 ------------------------------------------------- Change Activity: ...
mit
Python
212c71fa46809d1d2b98f529c97bf785551e0945
fix custom pdf w/pictures
fnp/wolnelektury,fnp/wolnelektury,fnp/wolnelektury,fnp/wolnelektury
src/catalogue/tasks.py
src/catalogue/tasks.py
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from datetime import datetime from traceback import print_exc from celery.task import task from celery.utils.log import get_task_logger from...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from datetime import datetime from traceback import print_exc from celery.task import task from celery.utils.log import get_task_logger from...
agpl-3.0
Python
e55b3169f5185d97f3cd4ebeb803b31139ebbee5
Add basic IPDL support
bill-mccloskey/mozsearch-mozilla,bill-mccloskey/mozsearch-mozilla,bill-mccloskey/mozsearch-mozilla
find-repo-files.py
find-repo-files.py
#!/usr/bin/env python import os import os.path import sys import subprocess import json import collections from lib import run config = json.load(open(sys.argv[1])) tree_name = sys.argv[2] repo_path = config['trees'][tree_name]['files_path'] if tree_name == 'comm-central': files1 = run('hg locate', shell=True,...
#!/usr/bin/env python import os import os.path import sys import subprocess import json from lib import run config = json.load(open(sys.argv[1])) tree_name = sys.argv[2] repo_path = config['trees'][tree_name]['files_path'] if tree_name == 'comm-central': files1 = run('hg locate', shell=True, cwd=repo_path) ...
mpl-2.0
Python
e73d74b0825ad7dea7e56602a838a0a0e5c142cb
Complete level bfs sol
bowen0701/algorithms_data_structures
lc01161_maximum_level_sum_of_a_binary_tree.py
lc01161_maximum_level_sum_of_a_binary_tree.py
"""Leetcode 1161. Maximum Level Sum of a Binary Tree Medium URL: https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/ Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X such that the sum of all the values of nodes at level...
"""Leetcode 1161. Maximum Level Sum of a Binary Tree Medium URL: https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/ Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X such that the sum of all the values of nodes at level...
bsd-2-clause
Python
7ee6f4184fe66567b93ab8ae0a2a5f88a0f2e7d3
Update versioning in _metadata.py
StanczakDominik/PlasmaPy
plasmapy/_metadata.py
plasmapy/_metadata.py
## # Package metadata ## # Name name = 'plasmapy' import ah_bootstrap from astropy_helpers.git_helpers import get_git_devstr # PlasmaPy uses Semantic Versioning of the form: MAJOR.MINOR.PATCH # # - The MAJOR version changes when there are backwards incompatible changes # - The MINOR version changes when backwards...
## # Package metadata ## # Name name = 'plasmapy' # The version scheme is being discussed at: # https://github.com/PlasmaPy/PlasmaPy/issues/25 version = '0.1.dev2' # Long description / docstring description = """ PlasmaPy is a community-developed and community-driven core Python package for plasma physics. """ #...
bsd-3-clause
Python
33e2b5bae1d28d381e5e4ef015c0de2961428f66
add cuckoo score
cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo
modules/reporting/mattermost.py
modules/reporting/mattermost.py
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import requests from lib.cuckoo.common.abstracts import Report from lib.cuckoo.common.excepti...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import requests from lib.cuckoo.common.abstracts import Report from lib.cuckoo.common.excepti...
mit
Python
2610b5045593cec537997cec7b7bc185d4183cd1
Configure logging in penchy __init__.
fhirschmann/penchy,fhirschmann/penchy
penchy/__init__.py
penchy/__init__.py
# Version will be replaced by maven! __version__ = '0.1' import log log.configure() del log
# Version will be replaced by maven! __version__ = '0.1'
mit
Python
5bad3f45bdca436515b416bbcfb45ca53b46ca2a
Add get_data method to data importer
msfernandes/facebook-chatbot
application/lomadee/data_importer.py
application/lomadee/data_importer.py
from django.conf import settings from urllib.parse import urljoin, urlencode import requests class ComputerDataImporter(object): def __init__(self): pass def build_api_url(self, **kwargs): api_url = urljoin(settings.LOMADEE_API_URL, settings.LOMADEE_APP_TOKEN) # Specific path to 'Co...
from django.conf import settings from urllib.parse import urljoin, urlencode class ComputerDataImporter(object): def __init__(self): pass def build_api_url(self, **kwargs): api_url = urljoin(settings.LOMADEE_API_URL, settings.LOMADEE_APP_TOKEN) # Specific path to 'Computer' category...
mit
Python
313b10cbdc50c2c011bbda303649ee13e76440d4
Add update and close methods to photos
photoshell/photoREPL,SamWhited/photoREPL
photorepl/photo.py
photorepl/photo.py
import os import tempfile from gi.repository import Gdk from rawkit.raw import Raw class Photo(Raw): """ A photo comprises a raw file which can be edited and will update the associated preview window (if any). """ def __init__(self, filename=None, ui_thread=None): super().__init__(filen...
import os import tempfile from gi.repository import Gdk from rawkit.raw import Raw class Photo(Raw): """ A photo comprises a raw file which can be edited and will update the associated preview window (if any). """ def __init__(self, filename=None, ui_thread=None): super().__init__(filen...
bsd-2-clause
Python
3f86d63948f0c96f440db7f93646f76fb363388e
order start_date properly, readd instance_start_date
CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend
api/v2/views/instance_history.py
api/v2/views/instance_history.py
from django.db.models import Q from rest_framework import filters import django_filters from core.models import InstanceStatusHistory from api.v2.serializers.details import InstanceStatusHistorySerializer from api.v2.views.base import AuthReadOnlyViewSet from api.v2.views.mixins import MultipleFieldLookup class Ins...
from django.db.models import Q from rest_framework import filters import django_filters from core.models import InstanceStatusHistory from api.v2.serializers.details import InstanceStatusHistorySerializer from api.v2.views.base import AuthReadOnlyViewSet from api.v2.views.mixins import MultipleFieldLookup class Ins...
apache-2.0
Python
30b45b1734867e072c2200ffd96e1569b3d5fd75
UPDATE register endpoint
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/grid/backend/grid/api/auth/register.py
packages/grid/backend/grid/api/auth/register.py
# stdlib from typing import Any # third party from fastapi import APIRouter from fastapi import Body from fastapi.responses import JSONResponse # syft absolute from syft import flags from syft.core.node.common.node_manager.role_manager import RoleManager from syft.core.node.common.node_manager.user_manager import Use...
# stdlib from typing import Any # third party from fastapi import APIRouter from fastapi import Body from fastapi.responses import JSONResponse # syft absolute from syft import flags from syft.core.node.common.node_manager.role_manager import RoleManager from syft.core.node.common.node_manager.user_manager import Use...
apache-2.0
Python
514ebd85026e94e8e1433d01ad2baa03d6236794
change for localhost
phodal/iot-code,designiot/code,phodal/iot-code,designiot/code,phodal/iot-code,designiot/code,designiot/code,phodal/iot-code
chapter5/python-serail.py
chapter5/python-serail.py
import json import urllib2 import serial import time url = "http://localhost:3000/api/1" ser = serial.Serial("/dev/cu.usbmodem1451", 9600) while 1: date = urllib2.urlopen(url) status = json.load(date)[0]['led'] print status if status: ser.write('1') else: ser.write('0') time.sl...
import json import urllib2 import serial import time url = "http://api.designiot.cn/led.json" while 1: try: results = urllib2.urlopen(url) status = json.loads(results)['led'] ser = serial.Serial("/dev/cu.usbmodem1451", 9600) if status: ser.write('1') else: ...
mit
Python
88edadf6e9b5d8c8f27be0fa5c19b736b2676564
copy paste error
ImmobilienScout24/aws-monocyte,ImmobilienScout24/aws-monocyte
src/main/python/monocyte/plugins/iam_plugin.py
src/main/python/monocyte/plugins/iam_plugin.py
from __future__ import print_function, absolute_import, division import boto3 class AwsIamPlugin(object): def get_users(self): client = boto3.client('iam') user_response = client.list_users() users = user_response['Users'] return users def check_users(self, users): if...
from __future__ import print_function, absolute_import, division import boto3 class AwsSesPlugin(object): def get_users(self): client = boto3.client('iam') user_response = client.list_users() users = user_response['Users'] return users def check_users(self, users): if...
apache-2.0
Python
b08bff08d69960c9035cefa4e4021d48530c5158
Rename one test, use default dx and dz, fix naming of test class.
uwoseis/zephyr,uwoseis/anemoi
anemoi/Tests/test_Analytical.py
anemoi/Tests/test_Analytical.py
import unittest import numpy as np from anemoi import AnalyticalHelmholtz class TestAnalyticalHelmholtz(unittest.TestCase): def setUp(self): pass def test_cleanExecution(self): nx = 100 nz = 200 systemConfig = { 'c': 2500., # m/s 'nx': n...
import unittest import numpy as np from anemoi import AnalyticalHelmholtz class TestMiniZephyr(unittest.TestCase): def setUp(self): pass def test_forwardModelling(self): nx = 100 nz = 200 systemConfig = { 'dx': 1., # m 'dz': 1., # ...
mit
Python
5be33c5396286f7041fcd22ac27a4191abb6832f
Fix `accept` finds ident in a wrong way.
angr/angr,angr/angr,angr/angr
angr/procedures/posix/accept.py
angr/procedures/posix/accept.py
import angr ###################################### # accept (but not really) ###################################### class accept(angr.SimProcedure): #pylint:disable=arguments-differ def run(self, sockfd, addr, addrlen): conc_addrlen = self.state.mem[addrlen].int.concrete addr_data = self.stat...
import angr ###################################### # accept (but not really) ###################################### class accept(angr.SimProcedure): #pylint:disable=arguments-differ def run(self, sockfd, addr, addrlen): conc_addrlen = self.state.mem[addrlen].int.concrete addr_data = self.stat...
bsd-2-clause
Python
ffc85b538dd6683893ff1f10e79594277672453e
remove unneeded module
devsim/symdiff,devsim/symdiff,devsim/symdiff
bdist_wheel/setup.py
bdist_wheel/setup.py
from setuptools import setup, Distribution from glob import glob import os import re #https://stackoverflow.com/questions/35112511/pip-setup-py-bdist-wheel-no-longer-builds-forced-non-pure-wheels/36886459#36886459 #https://stackoverflow.com/questions/24071491/how-can-i-make-a-python-wheel-from-an-existing-native-libra...
from setuptools import setup, Distribution from glob import glob import os import re import html #https://stackoverflow.com/questions/35112511/pip-setup-py-bdist-wheel-no-longer-builds-forced-non-pure-wheels/36886459#36886459 #https://stackoverflow.com/questions/24071491/how-can-i-make-a-python-wheel-from-an-existing-...
apache-2.0
Python
d7e16d3ab504d44b2fd05b7c6b030d8ba594071e
fix module import
devsim/symdiff,devsim/symdiff,devsim/symdiff
bdist_wheel/setup.py
bdist_wheel/setup.py
from setuptools import setup, Distribution from glob import glob import os import re import html #https://stackoverflow.com/questions/35112511/pip-setup-py-bdist-wheel-no-longer-builds-forced-non-pure-wheels/36886459#36886459 #https://stackoverflow.com/questions/24071491/how-can-i-make-a-python-wheel-from-an-existing-...
from setuptools import setup, Distribution from glob import glob #https://stackoverflow.com/questions/35112511/pip-setup-py-bdist-wheel-no-longer-builds-forced-non-pure-wheels/36886459#36886459 #https://stackoverflow.com/questions/24071491/how-can-i-make-a-python-wheel-from-an-existing-native-library/24793171#24793171...
apache-2.0
Python
3e469432f4f8b11b999625c54bea43cf52539b3e
Update P7_controlKeyboard added hotkey combinations
JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials
books/AutomateTheBoringStuffWithPython/Chapter18/P7_controlKeyboard.py
books/AutomateTheBoringStuffWithPython/Chapter18/P7_controlKeyboard.py
# This program uses the PyAutoGUI module to manipulate keyboard input import pyautogui # Sending a String from the Keyboard pyautogui.click(100, 100) # put file editor in focus pyautogui.typewrite('Hello world!') pyautogui.typewrite('!dlrow olleH', 0.25) # Key Names pyautogui.typewrite(['enter', 'a', 'b', 'left', 'l...
# This program uses the PyAutoGUI module to manipulate keyboard input import pyautogui # Sending a String from the Keyboard pyautogui.click(100, 100) # put file editor in focus pyautogui.typewrite('Hello world!') pyautogui.typewrite('!dlrow olleH', 0.25) # Key Names pyautogui.typewrite(['enter', 'a', 'b', 'left', 'l...
mit
Python
fa8f914dfbe2961eb42ef0c47acf8a16e24d7c9d
Bump version to 0.9.7
thombashi/sqliteschema
sqliteschema/__version__.py
sqliteschema/__version__.py
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.9.7" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.9.6" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
mit
Python
5a5f37ca17fdee8149ec0f6ce78f83259ed9d530
Send forbidden codes when doing login attempts.
illicitonion/synapse,TribeMedia/synapse,matrix-org/synapse,rzr/synapse,illicitonion/synapse,iot-factory/synapse,howethomas/synapse,matrix-org/synapse,matrix-org/synapse,iot-factory/synapse,TribeMedia/synapse,rzr/synapse,iot-factory/synapse,howethomas/synapse,illicitonion/synapse,TribeMedia/synapse,rzr/synapse,iot-facto...
synapse/handlers/login.py
synapse/handlers/login.py
# -*- coding: utf-8 -*- # Copyright 2014 matrix.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- # Copyright 2014 matrix.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python
9fcbff9446935b8843c54e69665324d26592fba1
remove code duplication (#648)
sis-tools/dcos-cli,sis-tools/dcos-cli,dcos/dcos-cli,kensipe/dcos-cli,mesosphere/dcos-cli,sis-tools/dcos-cli,dcos/dcos-cli,dcos/dcos-cli,mesosphere/dcos-cli,kensipe/dcos-cli,kensipe/dcos-cli,kensipe/dcos-cli,kensipe/dcos-cli,dcos/dcos-cli,dcos/dcos-cli,mesosphere/dcos-cli
cli/dcoscli/subcommand.py
cli/dcoscli/subcommand.py
import traceback from importlib import import_module import pkg_resources from dcos import subcommand def _default_modules(): """Dict of the default dcos cli subcommands and their main methods :returns: default subcommand -> main method :rtype: {} """ defaults = subcommand.default_subcommands(...
import traceback import pkg_resources def _default_modules(): """Dict of the default dcos cli subcommands and their main methods :returns: default subcommand -> main method :rtype: {} """ # avoid circular imports from dcoscli.auth import main as auth_main from dcoscli.config import main...
apache-2.0
Python
fa386c90dcfc0e61b310d1253790befffa7fb81c
Add BaseWatcherAdmin
596acres/django-livinglots-organize,596acres/django-livinglots-organize
livinglots_organize/admin.py
livinglots_organize/admin.py
from django.contrib import admin from django.utils.safestring import mark_safe from .models import OrganizerType class ParticipantAdminMixin(object): def linked_target(self, organizer): if not organizer.content_object: return None return mark_safe( '<a href="%s">%s</a>' %...
from django.contrib import admin from django.utils.safestring import mark_safe from .models import OrganizerType class BaseOrganizerAdmin(admin.ModelAdmin): exclude = ('content_type', 'object_id',) list_display = ('name', 'email', 'type', 'post_publicly', 'added', 'linked_target',) li...
agpl-3.0
Python
e97b5d343ca80ff050fca6d37efffcfe739b42e0
Fix usage of `version_info` on Python 2.
sapphirecat/cloud-maker,sapphirecat/cloud-maker
cloud_maker/py_version.py
cloud_maker/py_version.py
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): major, minor, patch = sys.version_info[0:2] if major == 3: if minor < 3 or (minor == 3 and patch < 4): raise VersionError...
mit
Python
a57d0a0fb48620429d6b644139d1cc32f00feecd
Fix program/project description labels
vizydrop/apps
targetprocess/projects.py
targetprocess/projects.py
from targetprocess.sourcebase import TargetprocessGeneral from targetprocess.filter import TargetprocessBaseFilter from vizydrop.fields import DecimalField, DateTimeField, NumberField, TextField class TargetprocessProjectSource(TargetprocessGeneral): class Meta: identifier = "project" name = "Proj...
from targetprocess.sourcebase import TargetprocessGeneral from targetprocess.filter import TargetprocessBaseFilter from vizydrop.fields import DecimalField, DateTimeField, NumberField, TextField class TargetprocessProjectSource(TargetprocessGeneral): class Meta: identifier = "project" name = "Proj...
mit
Python
0de3535d21abbe91fc9deb2630ac4c6b16b02af5
update for new simulator
Nic30/HWToolkit
hwt/interfaces/agents/clk.py
hwt/interfaces/agents/clk.py
from hwt.hdl.constants import Time from hwt.simulator.agentBase import AgentBase from hwt.simulator.shortcuts import CallbackLoop from hwt.simulator.hdlSimulator import Timer class OscilatorAgent(AgentBase): """ Simulation agent for :class:`hwt.interfaces.std.Clk` interface * In driver mode oscillates at...
from hwt.hdl.constants import Time from hwt.simulator.agentBase import AgentBase from hwt.simulator.shortcuts import CallbackLoop class OscilatorAgent(AgentBase): """ Simulation agent for :class:`hwt.interfaces.std.Clk` interface * In driver mode oscillates at frequency specified by period * In moni...
mit
Python
d2a73d5d57e837dfbf0502c6a827fd346b122090
fix kwargs for django 2.1; closes #19
kevinmickey/django-prettyjson,kevinmickey/django-prettyjson,kevinmickey/django-prettyjson
prettyjson/widgets.py
prettyjson/widgets.py
from django.conf import settings from django.forms import widgets class PrettyJSONWidget(widgets.Textarea): DEFAULT_ATTR = 'raw' def render(self, name, value, attrs=None, **kwargs): html = super(PrettyJSONWidget, self).render(name, value, attrs) start_as = self.attrs.get("initial", self.DEF...
from django.conf import settings from django.forms import widgets class PrettyJSONWidget(widgets.Textarea): DEFAULT_ATTR = 'raw' def render(self, name, value, attrs=None): html = super(PrettyJSONWidget, self).render(name, value, attrs) start_as = self.attrs.get("initial", self.DEFAULT_ATTR)...
bsd-3-clause
Python
3b4c6cc84a8ea72f3ac627077cd32019f97863ae
add function to rebuild desk links
frappe/frappe,frappe/frappe,mhbu50/frappe,yashodhank/frappe,mhbu50/frappe,almeidapaulopt/frappe,yashodhank/frappe,saurabh6790/frappe,frappe/frappe,almeidapaulopt/frappe,saurabh6790/frappe,StrellaGroup/frappe,StrellaGroup/frappe,saurabh6790/frappe,almeidapaulopt/frappe,mhbu50/frappe,StrellaGroup/frappe,yashodhank/frappe...
frappe/desk/doctype/desk_page/desk_page.py
frappe/desk/doctype/desk_page/desk_page.py
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _, _dict from frappe.utils.data import validate_json_string from frappe.modules.export_file import export_to_file...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils.data import validate_json_string from frappe.modules.export_file import export_to_files from ...
mit
Python
19b2d8917fd3ba0218edbb6b951652f5531bd429
set state refactor
parkourben99/PiController,parkourben99/PiPool,parkourben99/PiPool,parkourben99/PiController,parkourben99/PiController,parkourben99/PiController
PiPool/models.py
PiPool/models.py
from django.db import models import RPIO class Pin(models.Model): name = models.CharField(max_length=200, null=False) description = models.CharField(max_length=200, null=False) pin_number = models.IntegerField(null=False) is_thermometer = models.BooleanField(default=False, null=False) updated_at ...
from django.db import models import RPIO class Pin(models.Model): name = models.CharField(max_length=200, null=False) description = models.CharField(max_length=200, null=False) pin_number = models.IntegerField(null=False) is_thermometer = models.BooleanField(default=False, null=False) updated_at ...
mit
Python
36019ce195fc54ddabc75defaadf597e1139f69d
Update one more reference to rules_nodejs defs.bzl that I missed.
bazelbuild/rules_typescript,bazelbuild/rules_typescript,bazelbuild/rules_typescript
internal/ts_repositories.bzl
internal/ts_repositories.bzl
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
Python
036a5f879ddf6f8c2f1ae3bfea6a58962783f949
Change subject to every mail to was sent
OpenMOOC/moocng,GeographicaGS/moocng,GeographicaGS/moocng,GeographicaGS/moocng,OpenMOOC/moocng,GeographicaGS/moocng
moocng/portal/management/commands/mailtest.py
moocng/portal/management/commands/mailtest.py
# Copyright 2013 Rooter Analysis S.L. # # 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 w...
# Copyright 2013 Rooter Analysis S.L. # # 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 w...
apache-2.0
Python
593567aec6b25ee1140a83e4017c707bc13c92f8
update script to be more percise to reduce memory usage
FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld,FinalsClub/karmaworld
karmaworld/apps/notes/management/commands/convert_notes_to_markdown.py
karmaworld/apps/notes/management/commands/convert_notes_to_markdown.py
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2012 FinalsClub Foundation import html2text from django.core.files.storage import default_storage from django.core.management.base import BaseCommand from karmaworld.apps.notes.models import Note, NoteMarkdown class Command(BaseCommand): """ Command to ...
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2012 FinalsClub Foundation import html2text from django.core.files.storage import default_storage from django.core.management.base import BaseCommand from karmaworld.apps.notes.models import Note, NoteMarkdown class Command(BaseCommand): """ Command to ...
agpl-3.0
Python
cdc63e8ce52d0ab18928d8f3737c1910c0a27257
Update FilejokerNet.py INFO_PATTERN (#3616)
vuolter/pyload,vuolter/pyload,vuolter/pyload
src/pyload/plugins/downloaders/FilejokerNet.py
src/pyload/plugins/downloaders/FilejokerNet.py
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class FilejokerNet(XFSDownloader): __name__ = "FilejokerNet" __type__ = "downloader" __version__ = "0.05" __status__ = "testing" __pyload_version__ = "0.5" __pattern__ = r"https?://(?:www\.)?filejoker\.net/\w{12}" _...
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class FilejokerNet(XFSDownloader): __name__ = "FilejokerNet" __type__ = "downloader" __version__ = "0.04" __status__ = "testing" __pyload_version__ = "0.5" __pattern__ = r"https?://(?:www\.)?filejoker\.net/\w{12}" _...
agpl-3.0
Python
c465ad764de64acef6fb52288e2ee6a1e424bbba
change session save to teardown_request
chillinc/Flask-CQLEngine
flask_cqlengine.py
flask_cqlengine.py
from cqlengine.connection import setup from cqlengine_session import clear, save, SessionManager, set_session_manager from flask import _request_ctx_stack try: from flask import _app_ctx_stack except ImportError: _app_ctx_stack = None __all__ = ('CQLEngine', ) __version__ = '0.1' # Which stack should we u...
from cqlengine.connection import setup from cqlengine_session import clear, save, SessionManager, set_session_manager from flask import _request_ctx_stack try: from flask import _app_ctx_stack except ImportError: _app_ctx_stack = None __all__ = ('CQLEngine', ) __version__ = '0.1' # Which stack should we u...
apache-2.0
Python
08b4fae4352f68a524d51a7e14767e5b093c4a73
Remove replacement of non existing migration
python-social-auth/social-app-django,python-social-auth/social-app-django,python-social-auth/social-app-django
social_django/migrations/0005_auto_20160727_2333.py
social_django/migrations/0005_auto_20160727_2333.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-28 02:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ('social_auth', '0005_auto_20160727_2333') ] dependencies = [ ('social_django', '0004_auto_...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-28 02:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ('default', '0005_auto_20160727_2333'), ('social_auth', '0005_auto_20160727_2333') ] depend...
bsd-3-clause
Python
b0958ec3c85d47e0a30233a306b9e2f6e096e0d2
Add comments to the host
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/host.py
salt/states/host.py
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['changes'] = '...
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['changes'] = '...
apache-2.0
Python
4ed4fa27a763f1ba1345d1a22f209a1eb438ce1e
update alumni
phdfbk/phdfbk.github.io,phdfbk/phdfbk.github.io,phdfbk/phdfbk.github.io,phdfbk/phdfbk.github.io,phdfbk/phdfbk.github.io
bin/create_alumni.py
bin/create_alumni.py
#!/usr/bin/python # -*- coding: utf-8 -*- import weakref import unicodecsv import requests import cgi from cStringIO import StringIO #from builtins import str, unicode, open url_alumni ="https://docs.google.com/spreadsheets/d/1UJ8eHwcBsdKRjwc6uu2KVhNIn_FSEpLMh6xqMNQ5sUY/pub?gid=2103651667&single=true&output=csv" r = re...
#!/usr/bin/python # -*- coding: utf-8 -*- import unicodecsv import requests import cgi from cStringIO import StringIO #from builtins import str, unicode, open url_alumni ="https://docs.google.com/spreadsheets/d/1UJ8eHwcBsdKRjwc6uu2KVhNIn_FSEpLMh6xqMNQ5sUY/pub?gid=2103651667&single=true&output=csv" r = requests.get(url_...
apache-2.0
Python
e863aa13681830c606153c239705507892cabd86
Update for Session
mindbender-studio/config
polly/maya/menu.py
polly/maya/menu.py
import sys from maya import cmds from avalon import api from avalon.vendor.Qt import QtCore self = sys.modules[__name__] self._menu = api.Session["AVALON_LABEL"] + "menu" def install(): from . import interactive def deferred(): # Append to Avalon's menu cmds.menuItem(divider=True) ...
import sys from maya import cmds from avalon import api from avalon.vendor.Qt import QtCore self = sys.modules[__name__] self._menu = api.session["label"] + "menu" def install(): from . import interactive def deferred(): # Append to Avalon's menu cmds.menuItem(divider=True) # Model...
mit
Python
a2d1be88ffd3c9bcc368a08ce23af4b49555d75f
Fix kinds for py3
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/utils/kinds.py
salt/utils/kinds.py
# -*- coding: utf-8 -*- ''' Application Kinds of Salt apps. These are used to indicate what kind of Application is using RAET ''' from __future__ import absolute_import from collections import namedtuple from salt.utils.odict import OrderedDict # Python equivalent of an enum APPL_KINDS = OrderedDict([('master', 0), ...
# -*- coding: utf-8 -*- ''' Application Kinds of Salt apps. These are used to indicate what kind of Application is using RAET ''' from collections import namedtuple from salt.utils.odict import OrderedDict # Python equivalent of an enum APPL_KINDS = OrderedDict([('master', 0), ('minion', 1), ...
apache-2.0
Python
8b9f064a7544360f9932ec03c92ea77b4382f2e3
Increase polling freqency to speed up tests.
git-keeper/git-keeper,git-keeper/git-keeper
git-keeper-robot/gkeeprobot/dectorators.py
git-keeper-robot/gkeeprobot/dectorators.py
# Copyright 2018 Nathan Sommer and Ben Coleman # # 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 your option) any later version. # # This program is dis...
# Copyright 2018 Nathan Sommer and Ben Coleman # # 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 your option) any later version. # # This program is dis...
agpl-3.0
Python
042c11e298dd76c16ef84b2ee1d96d75de6203d4
Print stack trace of exception.
iandmyhand/python-utils
print_traceback.py
print_traceback.py
import sys import traceback class CustomException(Exception): def __init__(self, *args, **kwargs): super(CustomException, self).__init__(*args, **kwargs) def custom_deep_function(): raise CustomException('Test to raise custom exception.') def custom_function(): custom_deep_function() try: custom_f...
import sys import traceback class CustomException(Exception): def __init__(self, *args, **kwargs): super(CustomException, self).__init__(*args, **kwargs) def custom_function(): raise CustomException('Test to raise custom exception.') try: custom_function() except: _type, _value, _traceback = sys...
mit
Python
ba1a77293ab0dcb84ad9bfb3a5d60bcf45e248e4
use splinter browser for acceptance tests
fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig...
src/adhocracy/adhocracy/frontend/tests/acceptance/adhocracy/services/test_user.py
src/adhocracy/adhocracy/frontend/tests/acceptance/adhocracy/services/test_user.py
import pytest @pytest.fixture() def browser_root(browser, server_sample): url = server_sample.application_url + 'frontend_static/root.html' browser.visit(url) return browser class TestUserLogin: def test_login_valid(self, browser_root): fill_input(browser_root, 'credentials.password', 'pass...
from selenium import webdriver from selenium.webdriver.common import proxy from selenium.webdriver.support import wait from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time import unittest def test_login_success(server_sample, browser): url = se...
agpl-3.0
Python
1b12cbe4e30382483998d5a6c87e8e1ae240f9e9
fix metrics/test_init
vsudilov/ads,barentsen/ads,bsipocz/ads,andycasey/ads,jonnybazookatone/ads,adsabs/ads,adsabs/ads,marc-white/ads
ads/tests/test_metrics.py
ads/tests/test_metrics.py
""" Tests for MetricsQuery """ import unittest from .mocks import MockMetricsResponse from ads.metrics import MetricsQuery, MetricsResponse from ads.config import METRICS_URL class TestMetricsQuery(unittest.TestCase): """ test the MetricsQuery object """ def test_init(self): """ an ...
""" Tests for MetricsQuery """ import unittest from .mocks import MockMetricsResponse from ads.metrics import MetricsQuery, MetricsResponse from ads.config import METRICS_URL class TestMetricsQuery(unittest.TestCase): """ test the MetricsQuery object """ def test_init(self): """ an ...
mit
Python
82075fe6b83bfb21cefbe09e861b486015523ec0
make truncateproject command delete schemata
ANCIR/siyazana.co.za,ANCIR/siyazana.co.za,ANCIR/siyazana.co.za,ANCIR/siyazana.co.za
connectedafrica/manage.py
connectedafrica/manage.py
import os from flask.ext.script import Manager from flask.ext.assets import ManageAssets from connectedafrica.core import assets, grano from connectedafrica.views import app manager = Manager(app) manager.add_command("assets", ManageAssets(assets)) @manager.command def truncateproject(): """ Delete the project...
import os from flask.ext.script import Manager from flask.ext.assets import ManageAssets from connectedafrica.core import assets, grano from connectedafrica.views import app manager = Manager(app) manager.add_command("assets", ManageAssets(assets)) @manager.command def truncateproject(): """ Delete the project...
mit
Python
b17523a70f7c8a919adfd28a5272af67401aeb50
remove shash in route
jettify/aiohttp_admin,jettify/aiohttp_admin,jettify/aiohttp_admin,aio-libs/aiohttp_admin,aio-libs/aiohttp_admin,jettify/aiohttp_admin,aio-libs/aiohttp_admin
aiohttp_admin/resource.py
aiohttp_admin/resource.py
import abc from abc import abstractmethod class AbstractResource(metaclass=abc.ABCMeta): def __init__(self, url=None): class_name = self.__class__.__name__.lower() self._url = url or class_name @abstractmethod async def list(self, request): pass @abstractmethod async def...
import abc from abc import abstractmethod class AbstractResource(metaclass=abc.ABCMeta): def __init__(self, url=None): class_name = self.__class__.__name__.lower() self._url = url or class_name @abstractmethod async def list(self, request): pass @abstractmethod async def...
apache-2.0
Python
2894dcd2cc354caa352b0fe60adcf244cf82b211
fix on recovery mech
jaesivsm/pyAggr3g470r,jaesivsm/pyAggr3g470r,jaesivsm/JARR,jaesivsm/pyAggr3g470r,jaesivsm/pyAggr3g470r,jaesivsm/pyAggr3g470r,jaesivsm/JARR,jaesivsm/JARR
src/lib/emails.py
src/lib/emails.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # jarr - A Web based news aggregator. # Copyright (C) 2010-2016 Cédric Bonhomme - https://www.JARR-aggregator.org # # For more information : https://github.com/JARR-aggregator/JARR/ # # This program is free software: you can redistribute it and/or modify # it under the t...
#! /usr/bin/env python # -*- coding: utf-8 -*- # jarr - A Web based news aggregator. # Copyright (C) 2010-2016 Cédric Bonhomme - https://www.JARR-aggregator.org # # For more information : https://github.com/JARR-aggregator/JARR/ # # This program is free software: you can redistribute it and/or modify # it under the t...
agpl-3.0
Python
25a994253c020885a135fd0fdfb05b7c93e9518a
Bump the version to 0.9.3
aldryn/aldryn-client,aldryn/aldryn-client
aldryn_client/__init__.py
aldryn_client/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.9.3'
# -*- coding: utf-8 -*- __version__ = '0.9.2'
bsd-3-clause
Python
5557f9015d45aee8ecf9e3f20025814bfbe3cf36
Bump to version 0.3.0.
pbs/agora-proc
agora/__init__.py
agora/__init__.py
__version__ = '0.3.0'
__version__ = '0.2.0'
apache-2.0
Python
3fca8c7b84f945fbfa6e309da9ec55d61f36b6f2
Bump development version
nephila/djangocms-installer,nephila/djangocms-installer
djangocms_installer/__init__.py
djangocms_installer/__init__.py
# -*- coding: utf-8 -*- __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' __version__ = '0.8.5.post1'
# -*- coding: utf-8 -*- __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' __version__ = '0.8.5'
bsd-3-clause
Python
75f7ff7754eee79da9cd0a430a4fa16af21cdd4d
Delete Actions if the related object is deleted
liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4
adhocracy4/actions/signals.py
adhocracy4/actions/signals.py
from itertools import chain from django.apps import apps from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_delete, post_save from .models import Action from .verbs import Verbs SYSTEM_ACTIONABLES = ( ('a4phases', 'Phase'), ('...
from django.apps import apps from django.conf import settings from django.db.models.signals import post_save from .models import Action from .verbs import Verbs def _extract_target(instance): target = None if hasattr(instance, 'content_object'): target = instance.content_object elif hasattr(insta...
agpl-3.0
Python
6901f3ee4704d8dbf5632ace47f7b1919596b904
Add static root
ACLARKNET/aclarknet-django,ACLARKNET/aclarknet-django
aclarknet/aclarknet/settings.py
aclarknet/aclarknet/settings.py
""" Django settings for aclarknet project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
""" Django settings for aclarknet project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
mit
Python
c5cd62969ebee36c99923ad7a5b9e7c527bff6cc
Update base api to include module and object imports, fix missing import of random subpackage
QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py
quantecon/__init__.py
quantecon/__init__.py
""" Import the main names to top level. """ try: import numba except: raise ImportError("Cannot import numba from current anaconda distribution. Please run `conda install numba` to install the latest version.") #-Modules-# from . import quad from . import random #-Objects-# from .compute_fp import compute_fixed_po...
""" Import the main names to top level. """ try: import numba except: raise ImportError("Cannot import numba from current anaconda distribution. Please run `conda install numba` to install the latest version.") from .compute_fp import compute_fixed_point from .discrete_rv import DiscreteRV from .ecdf import ECDF fr...
bsd-3-clause
Python
762dcd6418f1c55735f4079ba5ad3107cd21ce1d
Update main.py
googledrive/python-quickstart,googleworkspace/python-samples,gsuitedevs/python-samples
drive/driveapp/main.py
drive/driveapp/main.py
#!/usr/bin/python """Google Drive Quickstart in Python. This script uploads a single file to Google Drive. """ from __future__ import print_function import pprint import httplib2 from googleapiclient.discovery import build import googleapiclient.http import oauth2client.client from builtins import input # OAuth 2.0...
#!/usr/bin/python """Google Drive Quickstart in Python. This script uploads a single file to Google Drive. """ from __future__ import print_function import six import pprint import httplib2 from googleapiclient.discovery import build import googleapiclient.http import oauth2client.client # OAuth 2.0 scope that will...
apache-2.0
Python
fef0c7e2900c385deccab344529d63cac53bc3ab
Remove unnecessary line breaks
ElliotPenson/nameless
nameless/lambda_calculus_ast.py
nameless/lambda_calculus_ast.py
#!/usr/bin/python # -*- coding: UTF-8 -*- """ lexer.py @author ejnp """ class Expression(object): """Abstract class for any lambda calculus expression.""" def children(self): """Returns a list of Expression objects.""" pass class Variable(Expression): """Encapsulates a lambda calculus...
#!/usr/bin/python # -*- coding: UTF-8 -*- """ lexer.py @author ejnp """ class Expression(object): """Abstract class for any lambda calculus expression.""" def children(self): """Returns a list of Expression objects.""" pass class Variable(Expression): """Encapsulates a lambda calculus...
mit
Python
39b283adff717033054888243fde89708db96a7a
fix path validation for windows systems
PaulMcInnis/JobPy
jobfunnel/config/validate.py
jobfunnel/config/validate.py
import re from .valid_options import DOMAINS, PROVIDERS, DELAY_FUN from .parser import ConfigError def validate_region(region): """ Check if the region settings are valid. """ # only allow supported domains if region["domain"] not in DOMAINS: raise ConfigError("domain") # search term st...
import re from .valid_options import DOMAINS, PROVIDERS, DELAY_FUN from .parser import ConfigError def validate_region(region): """ Check if the region settings are valid. """ # only allow supported domains if region['domain'] not in DOMAINS: raise ConfigError('domain') # search term st...
mit
Python
ec78cac938a474388c6bf2b3916fbbb1f2923689
reset response every call (#56)
ros2/rclpy,ros2/rclpy
rclpy/rclpy/client.py
rclpy/rclpy/client.py
# Copyright 2016 Open Source Robotics Foundation, 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...
# Copyright 2016 Open Source Robotics Foundation, 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...
apache-2.0
Python
82d0e6b0092649155c4c82978fff758b8d9e0fc8
Remove print statement from colordiff filter
recipy/recipy,recipy/recipy
recipyGui/__init__.py
recipyGui/__init__.py
from flask import Flask, url_for import os from flask_bootstrap import Bootstrap import re from time import strptime, strftime from recipyCommon.config import get_db_path recipyGui = Flask(__name__) recipyGui.config['SECRET_KEY'] = 'geheim' recipyGui.config['tinydb'] = get_db_path() Bootstrap(recipyGui) # Function ...
from flask import Flask, url_for import os from flask_bootstrap import Bootstrap import re from time import strptime, strftime from recipyCommon.config import get_db_path recipyGui = Flask(__name__) recipyGui.config['SECRET_KEY'] = 'geheim' recipyGui.config['tinydb'] = get_db_path() Bootstrap(recipyGui) # Function ...
apache-2.0
Python
dd5ef45ffc5118cd4630aa01a98e712373b3b2b3
Load more files
erykoff/redmapper,erykoff/redmapper
redmapper/__init__.py
redmapper/__init__.py
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
apache-2.0
Python
080c276791a92481a1130be72107ac7941b2fc0e
add visual example of edge modes
rjeli/scikit-image,ofgulban/scikit-image,bsipocz/scikit-image,chriscrosscutler/scikit-image,ClinicalGraphics/scikit-image,vighneshbirodkar/scikit-image,Midafi/scikit-image,emon10005/scikit-image,blink1073/scikit-image,oew1v07/scikit-image,juliusbierk/scikit-image,oew1v07/scikit-image,robintw/scikit-image,paalge/scikit-...
doc/examples/plot_edge_modes.py
doc/examples/plot_edge_modes.py
""" ========================= Interpolation: Edge Modes ========================= This example illustrates the different edge modes available during interpolation in routines such as ``skimage.transform.rescale`` and ``skimage.transform.resize``. """ from skimage._shared._interpolation_test import extend_image import ...
""" ========================= Interpolation: Edge Modes ========================= This example illustrates the different edge modes available during interpolation in routines such as ``skimage.transform.rescale`` and ``skimage.transform.resize``. """ from skimage._shared._interpolation_test import extend_image import ...
bsd-3-clause
Python
2c304804ddc96e4664d2b4f4260ca3bbdfb8b0af
Update affected test.
pixelrebel/st2,peak6/st2,punalpatel/st2,nzlosh/st2,punalpatel/st2,tonybaloney/st2,tonybaloney/st2,tonybaloney/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,peak6/st2,lakshmi-kannan/st2,peak6/st2,Plexxi/st2,punalpatel/st2,Plexxi/st2,nzlosh/st2,emedvedev/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,emedvedev/st2,lakshmi-kannan/st...
st2api/tests/unit/controllers/v1/test_packs.py
st2api/tests/unit/controllers/v1/test_packs.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
b741d310fa1e195906c672932bcc879460c7de24
fix flashAll help msg
USC-ACTLab/crazyswarm,USC-ACTLab/crazyswarm,USC-ACTLab/crazyswarm,USC-ACTLab/crazyswarm
scripts/flashAll.py
scripts/flashAll.py
#!/usr/bin/env python3 import yaml import subprocess import argparse import os def main(): parser = argparse.ArgumentParser(description='Flash firmware.') parser.add_argument('-stm32', action="store_true") parser.add_argument('-nrf51', action="store_true") args = parser.parse_args() if not (args....
#!/usr/bin/env python3 import yaml import subprocess import argparse import os if __name__ == "__main__": parser = argparse.ArgumentParser(description='Flash firmware.') parser.add_argument('-stm32', action="store_true") parser.add_argument('-nrf51', action="store_true") args = parser.parse_args() ...
mit
Python
ac9f85e7acda5f7727384e050fc76b7f42321ce2
Handle BrokenPipeError in oplprobe.print_meets().
emilyytlin/openpowerlifting,emilyytlin/openpowerlifting,emilyytlin/openpowerlifting,emilyytlin/openpowerlifting,emilyytlin/openpowerlifting
scripts/oplprobe.py
scripts/oplprobe.py
#!/usr/bin/env python3 # vim: set ts=8 sts=4 et sw=4 tw=99: # # Library for common functionality for probe scripts. # import os import shutil import sys import urllib.request def die(msg): print(msg, file=sys.stderr) sys.exit(1) def gethtml(url): request = urllib.request.Request(url) request.add_he...
#!/usr/bin/env python3 # vim: set ts=8 sts=4 et sw=4 tw=99: # # Library for common functionality for probe scripts. # import os import shutil import sys import urllib.request def die(msg): print(msg, file=sys.stderr) sys.exit(1) def gethtml(url): request = urllib.request.Request(url) request.add_he...
agpl-3.0
Python
80089e0b31e81ea162e2ab639bb2bf31e8009906
Remove unused tag.
akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil
l10n_br_sale/__manifest__.py
l10n_br_sale/__manifest__.py
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localization Sale', 'category': 'Localisation', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'website': 'http://...
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localization Sale', 'category': 'Localisation', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'website': 'http://...
agpl-3.0
Python
d314893dd5a14960214d30a5c8e059a351b482a5
remove recursive
haandol/algorithm_in_python
search/binsearch.py
search/binsearch.py
# https://interactivepython.org/runestone/static/pythonds/SortSearch/TheBinarySearch.html#analysis-of-binary-search def binsearch(L, target, start, end): while start <= end: mid = 1 + (start + end - 1) // 2 if L[mid] == target: return mid elif L[mid] < target: start...
# https://interactivepython.org/runestone/static/pythonds/SortSearch/TheBinarySearch.html#analysis-of-binary-search def binsearch(L, target, start, end): if start > end: return -1 mid = (start + end) // 2 if L[mid] == target: return mid elif L[mid] < target: return binsearch(L...
mit
Python
05ecac15aa9b975bd83378daa0560182041bef97
Add test for go correspondance file begin
ASaiM/group_humann2_uniref_abundances_to_GO,ASaiM/group_humann2_uniref_abundances_to_GO
src/format_go_correspondance.py
src/format_go_correspondance.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re def format_go_correspondance(args): go = {} with open(args.go_correspondance_input, "r") as go_correspondance_input: for line in go_correspondance_input.readlines(): if not line.startswith('GO'): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re def format_go_correspondance(args): go = {} with open(args.go_correspondance_input, "r") as go_correspondance_input: for line in go_correspondance_input.readlines(): split_line = line[:-1].split('\...
apache-2.0
Python
52f7f233d281120c1dfebcf687482a5c02d78656
bump version
intip/aldryn-bootstrap3,intip/aldryn-bootstrap3
aldryn_bootstrap3/__init__.py
aldryn_bootstrap3/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import __version__ = '0.5.1'
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import __version__ = '0.5.0'
bsd-3-clause
Python
079449ee91225105c6be5dec7147bc83da0f3436
Initialize output table: vertex_distances_d
bowen0701/algorithms_data_structures
alg_dijkstra_shortest_path.py
alg_dijkstra_shortest_path.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division from ds_binary_heap_tuple import BinaryHeap def dijkstra(weighted_graph_d, start_vertex): inf = float('inf') vertex_distances_d = { vertex: inf for vertex in weighted_graph_d } vertex_...
from __future__ import absolute_import from __future__ import print_function from __future__ import division from ds_binary_heap_tuple import BinaryHeap def dijkstra(graph, vertex_start): pass def main(): weight_graph = { 'u': {'v': 2, 'w': 5, 'x': 1}, 'v': {'u': 2, 'w': 3, 'x': 2}, '...
bsd-2-clause
Python
cf46f2e39a342274e94de82cb9a9613da5807c78
remove unecessary extra duration
bit-bots/bitbots_misc,bit-bots/bitbots_misc,bit-bots/bitbots_misc
bitbots_utils/scripts/tf_map_odom.py
bitbots_utils/scripts/tf_map_odom.py
#!/usr/bin/env python3 import rclpy from rclpy.node import Node from rclpy.duration import Duration from geometry_msgs.msg import TransformStamped from gazebo_msgs.msg import ModelStates import tf2_ros as tf2 class TFWorld(object): def __init__(self): rclpy.init() node = Node("map") br =...
#!/usr/bin/env python3 import rclpy from rclpy.node import Node from rclpy.duration import Duration from geometry_msgs.msg import TransformStamped from gazebo_msgs.msg import ModelStates import tf2_ros as tf2 class TFWorld(object): def __init__(self): rclpy.init() node = Node("map") br =...
mit
Python
f72354e87998d0ad121df1c76bf8568175d1f20e
Add approximation import
goulu/networkx,andnovar/networkx,Sixshaman/networkx,cmtm/networkx,JamesClough/networkx,SanketDG/networkx,NvanAdrichem/networkx,jfinkels/networkx
networkx/algorithms/__init__.py
networkx/algorithms/__init__.py
from networkx.algorithms.approximation import * from networkx.algorithms.assortativity import * from networkx.algorithms.block import * from networkx.algorithms.boundary import * from networkx.algorithms.centrality import * from networkx.algorithms.cluster import * from networkx.algorithms.clique import * from networkx...
from networkx.algorithms.assortativity import * from networkx.algorithms.block import * from networkx.algorithms.boundary import * from networkx.algorithms.centrality import * from networkx.algorithms.cluster import * from networkx.algorithms.clique import * from networkx.algorithms.community import * from networkx.alg...
bsd-3-clause
Python
6e69595fce74af07dcf039a29a2ff460a237db5d
add funcionality of uploading URLs to upload func
ParhamP/altify
src/upload.py
src/upload.py
# Copyright 2016 Parham Pourdavood # 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 writin...
# Copyright 2016 Parham Pourdavood # 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 writin...
apache-2.0
Python
a7cd69443e9177bcb3ed7e6e37bb861f9f3234bc
update test note
ambitioninc/django-data-schema
data_schema/tests/model_tests.py
data_schema/tests/model_tests.py
from django.test import TestCase from django_dynamic_fixture import G from data_schema.models import FieldSchema, DataSchema class FieldSchemaTest(TestCase): def test_unicode(self): field = FieldSchema(field_key='key', display_name='Field', id=10) self.assertEqual(str(field), u'10 - key - Field...
from django.test import TestCase from django_dynamic_fixture import G from data_schema.models import FieldSchema, DataSchema class FieldSchemaTest(TestCase): def test_unicode(self): field = FieldSchema(field_key='key', display_name='Field', id=10) self.assertEqual(str(field), u'10 - key - Field...
mit
Python
8bf1a7f55e696b622ae4fdd0b2462d7cb693c342
fix building and use regex cmd instead
DeadSix27/python_cross_compile_script
packages/dependencies/tesseract.py
packages/dependencies/tesseract.py
{ 'repo_type' : 'git', 'url' : 'https://github.com/tesseract-ocr/tesseract.git', 'conf_system' : 'cmake', 'source_subfolder' : '_build', 'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DBUILD_SHARED_LIBS=0 -DBUILD_TRAINING_TOOLS=0 -DSW_BUILD=0 -DBUILD_TESTS=0 -DSTATIC=1 -DH...
{ 'repo_type' : 'git', 'url' : 'https://github.com/tesseract-ocr/tesseract.git', 'conf_system' : 'cmake', 'source_subfolder' : '_build', 'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DBUILD_SHARED_LIBS=0 -DBUILD_TRAINING_TOOLS=0 -DSW_BUILD=0 -DBUILD_TESTS=0 -DSTATIC=1 -DH...
mpl-2.0
Python