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
d8bfbe6c11249dbfe4a722cc75555ddc3a506acc
make sure any dotted params are turned into underscores as dotted isn't supported
hiidef/hiispider,hiidef/hiispider
hiispider/resources/exposed.py
hiispider/resources/exposed.py
import sys from twisted.web import server from twisted.internet.defer import maybeDeferred from .base import BaseResource class ExposedResource(BaseResource): isLeaf = True def __init__(self, server, function_name): self.primary_server = server self.function_name = function_name ...
import sys from twisted.web import server from twisted.internet.defer import maybeDeferred from .base import BaseResource class ExposedResource(BaseResource): isLeaf = True def __init__(self, server, function_name): self.primary_server = server self.function_name = function_name ...
mit
Python
347e6f94144ecc10ab6aa36b384c57d10caeb906
fix typo in ref_dict['evsonganaly']
NickleDave/hybrid-vocal-classifier
hvc/parse/ref_spect_params.py
hvc/parse/ref_spect_params.py
import numpy as np import scipy.signal refs_dict = { 'tachibana': { 'nperseg': 256, 'noverlap': 192, 'window': 'Hann', # Hann window 'freq_cutoffs': [10, 15990], # basically no bandpass, as in Tachibana 'filter_func': 'diff', 'spect_func': 'mpl', 'log_trans...
import numpy as np import scipy.signal refs_dict = { 'tachibana': { 'nperseg': 256, 'noverlap': 192, 'window': 'Hann', # Hann window 'freq_cutoffs': [10, 15990], # basically no bandpass, as in Tachibana 'filter_func': 'diff', 'spect_func': 'mpl', 'log_trans...
bsd-3-clause
Python
9f1134174c594564519a88cbfafe443b2be782e2
Update track_name, short_label, and long_label per discussions on 2016-09-09
Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator
python/render/render_tracks.py
python/render/render_tracks.py
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}'.format(metadata['protein'], metadata['serial_number']) d['bigbed_url'] = metadata['track_filename'] d['short_label'] = metadata['protein'] d['l...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
mit
Python
3ce7a707d1933c89d00c773f95096e31d31325b5
add Python logging module import to provide log.error
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/tls.py
salt/states/tls.py
# -*- coding: utf-8 -*- ''' Enforce state for SSL/TLS ========================= ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function import time import datetime import logging __virtualname__ = 'tls' def __virtual__(): if 'tls.cert_info' not in __salt__: ret...
# -*- coding: utf-8 -*- ''' Enforce state for SSL/TLS ========================= ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function import time import datetime __virtualname__ = 'tls' def __virtual__(): if 'tls.cert_info' not in __salt__: return False ...
apache-2.0
Python
039ca493135867bb70c182ba640628c5cc88081e
Simplify Post Detail queryset.
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
blog/views.py
blog/views.py
from django.core.urlresolvers import reverse_lazy from django.views.generic import ( ArchiveIndexView, CreateView, DeleteView, DetailView, MonthArchiveView, YearArchiveView) from core.utils import UpdateView from user.decorators import \ require_authenticated_permission from .forms import PostForm from .m...
from django.core.urlresolvers import reverse_lazy from django.views.generic import ( ArchiveIndexView, CreateView, DeleteView, DetailView, MonthArchiveView, YearArchiveView) from core.utils import UpdateView from user.decorators import \ require_authenticated_permission from .forms import PostForm from .m...
bsd-2-clause
Python
1eed345f4494313274eb97bcc8fdc60089545f51
test script
chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI,chriz2600/DreamcastHDMI
assets/test.py
assets/test.py
#!env python3 #for x in range(859, 1400): # print(x / 858); # 1,06993006993007 # 1,05893536121673 results = {} for vert in range(1053, 1900): for horiz in range(859, 1400): horiztest = (horiz / 858) verttest = (vert / 1052) ref = horiztest * verttest * 54 results[ref] = { ...
#!env python3 #for x in range(859, 1400): # print(x / 858); # 1,06993006993007 # 1,05893536121673 for vert in range(1053, 1900): for horiz in range(859, 1400): horiztest = (horiz / 858) verttest = (vert / 1052) ref = horiztest * verttest * 54 if ref == 72.0: print...
mit
Python
36472b552a119aa57acb484b9522445b3cd804dd
check for corrupted audio files
long0612/sas-clientLib,long0612/sas-clientLib,long0612/sas-clientLib,long0612/sas-clientLib
python/test/audio_proc_test.py
python/test/audio_proc_test.py
''' Try processing audio from Illiad in python Long Le <longle1@illinois.edu> University of Illinois ''' print(__doc__) import numpy as np from scipy.io import wavfile from scipy import signal import matplotlib.pyplot as plt import sys sys.path.insert(0,sys.path[0]+'/../src/') #print(sys.path) from sasclient import *...
''' Try processing audio from Illiad in python Long Le <longle1@illinois.edu> University of Illinois ''' print(__doc__) import numpy as np from scipy.io import wavfile from scipy import signal import matplotlib.pyplot as plt import sys sys.path.insert(0,sys.path[0]+'/../src/') #print(sys.path) from sasclient import *...
mit
Python
7b1d65d17dbbc71cbd80c49fd2ed19636f49680e
Add initial hue parameter
kevinpt/symbolator,SymbiFlow/symbolator
nucanvas/color/sinebow.py
nucanvas/color/sinebow.py
import math from math import sin, pi import colorsys def sinebow(hue): '''Adapted from http://basecase.org/env/on-rainbows''' hue = -(hue + 0.5) # Start at red rotating clockwise rgb = sin(pi * hue), sin(pi * (hue + 1.0/3.0)), sin(pi * (hue + 2.0/3.0)) return tuple(int(255 * c**2) for c in rgb) def distinct...
import math from math import sin, pi import colorsys def sinebow(hue): '''Adapted from http://basecase.org/env/on-rainbows''' hue = -(hue + 0.5) # Start at red rotating clockwise rgb = sin(pi * hue), sin(pi * (hue + 1.0/3.0)), sin(pi * (hue + 2.0/3.0)) return tuple(int(255 * c**2) for c in rgb) def distinct...
mit
Python
fa5bb37159d09c5bff53b83a4821e3f154892d1d
Fix issue with test discovery and broken CUDA drivers.
sklam/numba,cpcloud/numba,sklam/numba,numba/numba,seibert/numba,jriehl/numba,numba/numba,stuartarchibald/numba,jriehl/numba,IntelLabs/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,IntelLabs/numba,jriehl/numba,seibert/numba,numba/numba,jriehl/numba,gmarkall/numba,numba/numba,sklam/numba,seibert/numba,stuartar...
numba/cuda/device_init.py
numba/cuda/device_init.py
from __future__ import print_function, absolute_import, division # Re export from .stubs import (threadIdx, blockIdx, blockDim, gridDim, syncthreads, shared, local, const, grid, gridsize, atomic, threadfence_block, threadfence_system, threadfence) from .cudad...
from __future__ import print_function, absolute_import, division # Re export from .stubs import (threadIdx, blockIdx, blockDim, gridDim, syncthreads, shared, local, const, grid, gridsize, atomic, threadfence_block, threadfence_system, threadfence) from .cudad...
bsd-2-clause
Python
e754c16b0e78fbf084374f470367f1971c826cd3
Update constants.py
cloudcomputinghust/bioinformatics-dashboard,cloudcomputinghust/bioinformatics-dashboard,cloudcomputinghust/bioinformatics-dashboard
bioinformatics/bioworkflow/constants.py
bioinformatics/bioworkflow/constants.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
Python
093657bf154f0fcadc209941791017a300f32b90
duplicate line checking function added
mhabib1981/pySecn00b
url_decode.py
url_decode.py
import sys from urllib import unquote import re from binascii import unhexlify from hashlib import md5 def main(): if len(sys.argv)!=2: print "Usage: %s <file>" % sys.argv[0] sys.exit(0) else: inFile=open(sys.argv[1], 'r').readlines() url_hash_list=[] for line in inFile: curr_hash_val=line_hash(line) ...
#!/usr/bin import sys from urllib import unquote import re from binascii import unhexlify def main(): if len(sys.argv)!=2: print "Usage: %s <file>" % sys.argv[0] sys.exit(0) else: inFile=open(sys.argv[1], 'r').readlines() for line in inFile: decoded_url=url_decode(line) if '0x' in decoded_url: he...
cc0-1.0
Python
6a144b25ec4e75dc526f821b651f4e426d792d75
Handle comments on same line as function declaration
ilveroluca/rapi,ilveroluca/rapi,ilveroluca/rapi,ilveroluca/rapi
rapi_bwa/extract_bwa_header.py
rapi_bwa/extract_bwa_header.py
#!/usr/bin/env python import re import os import sys RequiredPrototypes = { 'kt_for': 'kthread.c', 'mem_align1_core': 'bwamem.c', 'mem_approx_mapq_se': 'bwamem.c', 'mem_mark_primary_se': 'bwamem.c', 'mem_matesw': 'bwamem_pair.c', 'mem_pair': 'bwamem_pair.c' } def writeline(txt=''): sys.st...
#!/usr/bin/env python import re import os import sys RequiredPrototypes = { 'kt_for': 'kthread.c', 'mem_align1_core': 'bwamem.c', 'mem_approx_mapq_se': 'bwamem.c', 'mem_mark_primary_se': 'bwamem.c', 'mem_matesw': 'bwamem_pair.c', 'mem_pair': 'bwamem_pair.c' } def writeline(txt=''): sys.st...
mit
Python
4ad67a81e2b8620649c27628473542c2d12ba02b
change those timeformats
ebu/ebu-tt-live-toolkit,bbc/ebu-tt-live-toolkit,bbc/ebu-tt-live-toolkit,bbc/ebu-tt-live-toolkit,ebu/ebu-tt-live-toolkit,ebu/ebu-tt-live-toolkit
ebu_tt_live/scripts/ebu_dummy_encoder.py
ebu_tt_live/scripts/ebu_dummy_encoder.py
import logging from .common import create_loggers from ebu_tt_live import bindings from ebu_tt_live.bindings import _ebuttm as metadata from pyxb import BIND from datetime import timedelta log = logging.getLogger('ebu_dummy_encoder') def main(): create_loggers() log.info('Dummy XML Encoder') tt = bindin...
import logging from .common import create_loggers from ebu_tt_live import bindings from ebu_tt_live.bindings import _ebuttm as metadata from pyxb import BIND from datetime import timedelta log = logging.getLogger('ebu_dummy_encoder') def main(): create_loggers() log.info('Dummy XML Encoder') tt = bindin...
bsd-3-clause
Python
54a24423c07e1d6e2c0a6e8c7c7586b8655aa6e7
Fix `date` filter for models with `time` field
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
api/filters.py
api/filters.py
# -*- coding: utf-8 -*- from django_filters import rest_framework as filters from core import models class TimeFieldFilter(filters.FilterSet): date = filters.DateFilter(field_name='time__date', label='Date') date_min = filters.DateFilter(field_name='time__date', label='Min. Date', ...
# -*- coding: utf-8 -*- from django_filters import rest_framework as filters from core import models class TimeFieldFilter(filters.FilterSet): date = filters.DateFilter(field_name='date', label='Date') date_min = filters.DateFilter(field_name='time__date', label='Min. Date', ...
bsd-2-clause
Python
adbb54f0c935ef04e4e2e00cf147e3729d8c1761
Add version number
iamahuman/angr,schieb/angr,angr/angr,iamahuman/angr,angr/angr,schieb/angr,angr/angr,iamahuman/angr,schieb/angr
angr/__init__.py
angr/__init__.py
# pylint: disable=wildcard-import __version__ = (8, 19, 2, 4) if bytes is str: raise Exception(""" =-=-=-=-=-=-=-=-=-=-=-=-= WELCOME TO THE FUTURE! =-=-=-=-=-=-=-=-=-=-=-=-=-= angr has transitioned to python 3. Due to the small size of the team behind it, we can't reasonably maintain compatibility between bot...
# pylint: disable=wildcard-import if bytes is str: raise Exception(""" =-=-=-=-=-=-=-=-=-=-=-=-= WELCOME TO THE FUTURE! =-=-=-=-=-=-=-=-=-=-=-=-=-= angr has transitioned to python 3. Due to the small size of the team behind it, we can't reasonably maintain compatibility between both python 2 and python 3. If y...
bsd-2-clause
Python
364b9c71442b141edaafae9acacad497f091f7db
Fix name duplication in `app_config` Bazel rule
project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak
oak/common/app_config.bzl
oak/common/app_config.bzl
# # Copyright 2020 The Project Oak Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# # Copyright 2020 The Project Oak Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
Python
7204f6d4e957c3f15068e0bbf72f822717193b39
Add serializer param to RPC service
NaohiroTamura/ironic-lib,faizan-barmawer/ironic-lib,citrix-openstack-build/ironic-lib,faizan-barmawer/elytics,openstack/ironic-lib
ironic/openstack/common/rpc/service.py
ironic/openstack/common/rpc/service.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
apache-2.0
Python
bf73e73c93c323a6b7395b3a1d40dd55dea4b65a
Update init file with descriptions
bgyori/indra,johnbachman/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,sorgerlab/indra
indra/sources/dgi/__init__.py
indra/sources/dgi/__init__.py
# -*- coding: utf-8 -*- """A processor for the `Drug Gene Interaction Database (DGI-DB) <http://www.dgidb.org>`_. * `Integration of the Drug–Gene Interaction Database (DGIdb 4.0) with open crowdsource efforts <https://doi.org/10.1093/nar/gkaa1084>`_. Freshour, *et al*. Nucleic Acids Research. 2020 Nov 25. Interac...
bsd-2-clause
Python
571e4d827aee1445ed40467f7c394a29f1b730db
Remove request argument
FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack
user/views.py
user/views.py
from django.http import HttpResponseRedirect from django.views import generic from django.shortcuts import render, reverse from django.contrib.auth import login, logout from .forms import SignupForm, SigninForm, UpdateForm from .models import User class ProfileView(generic.ListView): model = User template_na...
from django.http import HttpResponseRedirect from django.views import generic from django.shortcuts import render, reverse from django.contrib.auth import login, logout from .forms import SignupForm, SigninForm, UpdateForm from .models import User class ProfileView(generic.ListView): model = User template_na...
mit
Python
fecdc92a9be73465e268077eccd00ea75622bd72
fix closed acc bug
sudoguy/instabot,rasperepodvipodvert/instabot,misisnik/testinsta,instagrambot/instabot,vkgrd/instabot,Diapostrofo/instabot,ohld/instabot,misisnik/testinsta,instagrambot/instapro,instagrambot/instabot,AlexBGoode/instabot
instabot/bot/bot_like_feed.py
instabot/bot/bot_like_feed.py
import time import random def like_timeline(bot, amount=None): """ Likes last 8 medias from timeline feed """ print ("Liking timeline feed:") if amount is not None and amount > 8: amount = 8 print (" Can't request more than 8 medias from timeline... yet") if not bot.getTimelineFeed(): ...
import time import random def like_timeline(bot, amount=None): """ Likes last 8 medias from timeline feed """ print ("Liking timeline feed:") if amount is not None and amount > 8: amount = 8 print (" Can't request more than 8 medias from timeline... yet") if not bot.getTimelineFeed(): ...
apache-2.0
Python
c1b4b2adc84dad470dc90f0aa898b41ae6fe7162
remove tests for infer_repo as it no longer exists
ceph/ice-setup
ice_setup/tests/test_system.py
ice_setup/tests/test_system.py
import os import tempfile from pytest import raises import pytest from textwrap import dedent from ice_setup.ice import get_fqdn, ICEError, DirNotFound class FakeSocket(object): pass @pytest.fixture def cephdeploy_conf(): path = tempfile.mkstemp() def fin(): os.remove(path) return path[-1]...
import os import tempfile from pytest import raises import pytest from textwrap import dedent from ice_setup.ice import get_fqdn, infer_ceph_repo, ICEError, DirNotFound class FakeSocket(object): pass @pytest.fixture def cephdeploy_conf(): path = tempfile.mkstemp() def fin(): os.remove(path) ...
mit
Python
5db0dfc3ada74f338a598d7e82405ba47556d79d
Update models.py
flysmoke/ijizhang,flysmoke/ijizhang,flysmoke/ijizhang,flysmoke/ijizhang
ijizhang_prj/jizhang/models.py
ijizhang_prj/jizhang/models.py
#coding=utf-8 from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse # Create your models here. class Category(models.Model): INCOME_CHOICES = ( (True, _(u'收入')), (False, _(u'支出')...
#coding=utf-8 from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse # Create your models here. class Category(models.Model): INCOME_CHOICES = ( (True, _(u'收入')), (False, _(u'支出')...
mit
Python
64a78085fffe8dc525596b870c8e150d9171f271
Fix issue where Pulsar would enter a restart loop when cancelling a buffering
likeitneverwentaway/plugin.video.quasar,komakino/plugin.video.pulsar,johnnyslt/plugin.video.quasar,elrosti/plugin.video.pulsar,Zopieux/plugin.video.pulsar,pmphxs/plugin.video.pulsar,johnnyslt/plugin.video.quasar,steeve/plugin.video.pulsar,peer23peer/plugin.video.quasar,peer23peer/plugin.video.quasar,likeitneverwentaway...
resources/site-packages/pulsar/monitor.py
resources/site-packages/pulsar/monitor.py
import xbmc import urllib2 import threading from pulsar.config import PULSARD_HOST class PulsarMonitor(xbmc.Monitor): def __init__(self): self._closing = threading.Event() @property def closing(self): return self._closing def onAbortRequested(self): # Only when closing Kodi ...
import xbmc import urllib2 import threading from pulsar.config import PULSARD_HOST class PulsarMonitor(xbmc.Monitor): def __init__(self): self._closing = threading.Event() @property def closing(self): return self._closing def onAbortRequested(self): self._closing.set() d...
bsd-3-clause
Python
822571366271b5dca0ac8bf41df988c6a3b61432
Bump version.
concordusapps/alchemist
alchemist/_version.py
alchemist/_version.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 3, 12) __version__ = '.'.join(map(str, __version_info__))
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 3, 11) __version__ = '.'.join(map(str, __version_info__))
mit
Python
d91b32f9f14787d45e271561094a5372990adea4
Fix Meta/__meta__ resolution over more than two levels of inheritance
biosustain/venom
venom/util.py
venom/util.py
from typing import Dict, Any, Tuple # FIXME should be Generic class AttributeDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ def _meta_obj_to_dict(meta_obj): dct = {} for k, v in meta_obj.__dict__.items(): if not k.startswith('__'): dct[k] = v return...
from typing import Dict, Any, Tuple # FIXME should be Generic class AttributeDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ def _meta_obj_to_dict(meta_obj): dct = {} for k, v in meta_obj.__dict__.items(): if not k.startswith('__'): dct[k] = v return...
mit
Python
adc533b76845fa7055ab41bd669ea8145e966849
Fix default_seat_identifier
FodT/t1-python,pswaminathan/t1-python,Cawb07/t1-python,MediaMath/t1-python
terminalone/models/supplysource.py
terminalone/models/supplysource.py
# -*- coding: utf-8 -*- """Provides supply source object.""" from __future__ import absolute_import from ..entity import Entity class SupplySource(Entity): """SupplySource object""" collection = 'supply_sources' resource = 'supply_source' _relations = { 'parent_supply', } _rtb_types =...
# -*- coding: utf-8 -*- """Provides supply source object.""" from __future__ import absolute_import from ..entity import Entity class SupplySource(Entity): """SupplySource object""" collection = 'supply_sources' resource = 'supply_source' _relations = { 'parent_supply', } _rtb_types =...
apache-2.0
Python
102f3768544c180395b5b044ad0c0bf628d5f89a
Fix import
Zaneh-/bearded-tribble-back,forging2012/taiga-back,forging2012/taiga-back,coopsource/taiga-back,frt-arch/taiga-back,Zaneh-/bearded-tribble-back,gam-phon/taiga-back,forging2012/taiga-back,CoolCloud/taiga-back,dycodedev/taiga-back,astagi/taiga-back,dycodedev/taiga-back,CMLL/taiga-back,gauravjns/taiga-back,gauravjns/taiga...
taiga/projects/votes/serializers.py
taiga/projects/votes/serializers.py
from rest_framework import serializers from taiga.users.models import User class VoterSerializer(serializers.ModelSerializer): full_name = serializers.CharField(source='get_full_name', required=False) class Meta: model = User fields = ('id', 'username', 'first_name', 'last_name', 'full_name'...
from django.contrib.auth import get_user_model from rest_framework import serializers class VoterSerializer(serializers.ModelSerializer): full_name = serializers.CharField(source='get_full_name', required=False) class Meta: model = get_user_model() fields = ('id', 'username', 'first_name', '...
agpl-3.0
Python
6d93bf9cac2d8c5a2388d8681c29dc24a7490502
disable github api test on ci
sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper
_unittests/ut_loghelper/test_github_api.py
_unittests/ut_loghelper/test_github_api.py
""" @brief test tree node (time=12s) """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not in sys.p...
""" @brief test tree node (time=12s) """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not in sys.p...
mit
Python
9915d7ce33897409e23ce007806fa1f5f34e183b
Drop (py3.6+) environment printout in test example
originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype
jpype/_pyinstaller/example.py
jpype/_pyinstaller/example.py
import os import jpype import jpype.imports print('+++ about to start JVM') jpype.startJVM() print('+++ JVM started')
import os import jpype import jpype.imports from jpype.types import * for key, value in sorted(os.environ.items()): print(f'{key!r}: {value!r}') print('+++ about to start JVM') jpype.startJVM() print('+++ JVM started')
apache-2.0
Python
fb99e7248441353ab1e4a271102ba269b331c6b8
Update libchromiumcontent to have mas build
simongregory/electron,joaomoreno/atom-shell,aliib/electron,rajatsingla28/electron,felixrieseberg/electron,arturts/electron,kcrt/electron,nekuz0r/electron,minggo/electron,voidbridge/electron,deed02392/electron,dongjoon-hyun/electron,leftstick/electron,twolfson/electron,kokdemo/electron,astoilkov/electron,voidbridge/elec...
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python import errno import os import platform import sys BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '78e54bc39a04b758ed5167cd980cc4d9951bd629' PLATFORM = { 'cygwin': 'win32', 'darwin': 'd...
#!/usr/bin/env python import errno import os import platform import sys BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 'http://github-janky-artifacts.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '04523758cda2a96d2454f9056fb1fb9a1c1f95f1' PLATFORM = { 'cygwin': 'win32', 'darwin': ...
mit
Python
d2ad58a752685b9982081331971276d7c14fec92
remove print statement
coco-project/coco,coco-project/coco,coco-project/coco,coco-project/coco
ipynbsrv/web/api_client_proxy.py
ipynbsrv/web/api_client_proxy.py
from ipynbsrv.client.clients import HttpClient def get_httpclient_instance(request): base_url = "http://localhost:8000/api" username = request.user.username password = request.session.get('password') return HttpClient(base_url, auth=(username, password)) def set_session_password(request): if req...
from ipynbsrv.client.clients import HttpClient def get_httpclient_instance(request): base_url = "http://localhost:8000/api" username = request.user.username password = request.session.get('password') print("{}:{}".format(username, password)) return HttpClient(base_url, auth=(username, password)) ...
bsd-3-clause
Python
b4e0294eed4dce7d5170cbc41e0bbec5e6387e82
Revert "improved config"
renskiy/fabricio
examples/service/swarm/fabfile.py
examples/service/swarm/fabfile.py
import fabricio from fabric import api as fab from fabricio import tasks, docker from fabricio.misc import AvailableVagrantHosts hosts = AvailableVagrantHosts(guest_network_interface='eth1') @fab.task(name='swarm-init') @fab.serial def swarm_init(): """ enable Docker swarm mode """ def _swarm_init()...
import fabricio from fabric import api as fab from fabricio import tasks, docker from fabricio.misc import AvailableVagrantHosts hosts = AvailableVagrantHosts(guest_network_interface='eth1') @fab.task(name='swarm-init') @fab.serial def swarm_init(): """ enable Docker swarm mode """ def _swarm_init()...
mit
Python
92e55388e427b9497947bf9534b612c744978bb6
Load config on startup, reorganize imports, remove comments, log dry run start
kocsenc/i-have-an-opinion,kocsenc/i-have-an-opinion,kocsenc/i-have-an-opinion,kocsenc/i-have-an-opinion
backend/api.py
backend/api.py
# create our little application :) from flask import Flask, request import argparse import configparser import random import tweepy app = Flask(__name__) dry_run = None config = None def are_you_the_keymaster(): config = configparser.ConfigParser() config.read('keys.ini') return config def twitter_han...
# create our little application :) import argparse import configparser from flask import Flask, request import random import tweepy app = Flask(__name__) dry_run = None def are_you_the_keymaster(): config = configparser.ConfigParser() config.read('keys.ini') return config def twitter_handler(message): ...
bsd-2-clause
Python
3a15797507678c1ae2962e5421ba2c28afe01f26
Remove outdated comments.
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/symbol.py
Lib/symbol.py
#! /usr/bin/env python # # Non-terminal symbols of Python grammar (from "graminit.h") # # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/symbol.py ...
#! /usr/bin/env python # # Non-terminal symbols of Python grammar (from "graminit.h") # # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # PYTHONPATH=Lib:Modules...
mit
Python
b3e78b4934bebaf43fdb7787c5a3b3e166a35e23
Bump to 0.2.1
jrief/djangocms-bootstrap3,jrief/djangocms-bootstrap3
cms_bootstrap3/__init__.py
cms_bootstrap3/__init__.py
__version__ = '0.2.1'
__version__ = '0.2.0'
mit
Python
a2fdd4c71c53095ce0285ab562f88950aab01bd7
Fix indentation
frinder/frinder-app,frinder/frinder-app,frinder/frinder-app
scripts/add_users.py
scripts/add_users.py
from google.cloud import firestore import argparse import datetime import names import random genders = [u'male', u'female'] interests = [u'Movies', u'Football', u'Books', u'Music'] script_version=1 def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() for doc in docs: print(u'{} =...
from google.cloud import firestore import argparse import datetime import names import random genders = [u'male', u'female'] interests = [u'Movies', u'Football', u'Books', u'Music'] script_version=1 def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() for doc in docs: print(u'{} => {}...
mit
Python
d301e196017b442562224f786cfe23cc8cc3c70c
Update connectivity matrix.
visdesignlab/TulipPaths,visdesignlab/TulipPaths
experiments/connectivityMatrix.py
experiments/connectivityMatrix.py
from tulip import * from tulipgui import * import tulippaths as tp import json #graphFile = '../data/test_feedback.tlp' graphFile = '../data/514_10hops.tlp' graph = tlp.loadGraph(graphFile) acRegexes = ['AC', 'IAC', 'YAC', 'GAC'] acRegexes = '(?:%s)' % '|'.join(acRegexes) nodeConstraints = ['CBb.*', acRegexes, 'CBb.*...
from tulip import * from tulipgui import * import tulippaths as tp import json graphFile = '../data/test_feedback.tlp' #graphFile = '../data/514_10hops.tlp' graph = tlp.loadGraph(graphFile) acRegexes = ['AC', 'IAC', 'YAC'] acRegexes = '(?:%s)' % '|'.join(acRegexes) nodeConstraints = ['CBb.*', acRegexes, 'GC'] edgeCon...
mit
Python
a76d215f95b5acaf1ce7e35daeef6447fa122795
fix maintainer email address to point to mailing list
acigna/pywez,acigna/pywez,acigna/pywez
zsi/setup.py
zsi/setup.py
#! /usr/bin/env python # $Header$ import sys from distutils.core import setup _url = "http://pywebsvcs.sf.net/" import ConfigParser cf = ConfigParser.ConfigParser() cf.read('setup.cfg') major = cf.getint('version', 'major') minor = cf.getint('version', 'minor') release = cf.getint('version', 'release') _version = "%d...
#! /usr/bin/env python # $Header$ import sys from distutils.core import setup _url = "http://pywebsvcs.sf.net/" import ConfigParser cf = ConfigParser.ConfigParser() cf.read('setup.cfg') major = cf.getint('version', 'major') minor = cf.getint('version', 'minor') release = cf.getint('version', 'release') _version = "%d...
mit
Python
67c98ba67f99d5de5022b32fdb3eb9cd0d96908f
Add missing line on the script and some comment
jstuyck/MitmProxyScripts
scripts/tappedout.py
scripts/tappedout.py
from binascii import unhexlify #This can be replace by using the "decode" function on the reponse def request(context, flow): if (flow.request.host.find('change.me') > -1 and flow.request.path.find('somethingaboutcurrency') > -1): flow.request.headers['Accept-Encoding'] = [''] def response(context, flow):...
from binascii import unhexlify def request(context, flow): if (flow.request.host.find('change.me') > -1 and flow.request.path.find('somethingaboutcurrency') > -1): def response(context, flow): if (flow.request.host.find('change.me') > -1 and flow.request.path.find('somethingaboutcurrency') > -1):...
apache-2.0
Python
4e6b759219c2d15902196d1747a7eb89cebad150
test commit
noahklein/unichat
chat/models.py
chat/models.py
from django.db import models class Chatroom(models.Model): name = models.CharField(max_length=32) occupants = models.IntegerField(default=0) def __unicode__(self): return self.name class Message(models.Model): chatroom = models.ForeignKey(Chatroom) username = models.CharField(max_length...
from django.db import models class Chatroom(models.Model): name = models.CharField(max_length=32) occupants = models.IntegerField(default=0) def __unicode__(self): return self.name class Message(models.Model): chatroom = models.ForeignKey(Chatroom) username = models.CharField(max_length...
mit
Python
151a5f75a240c875fc591390c208c933e8d0e782
Update name of Eidos reading class
johnbachman/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,pvtodorov/indra
indra/sources/eidos/eidos_reader.py
indra/sources/eidos/eidos_reader.py
import json from indra.java_vm import autoclass, JavaException class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings are done with the same in...
import json from indra.java_vm import autoclass, JavaException class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings are done with the same in...
bsd-2-clause
Python
977557675167a5e2c22fd3d94cd4c93acbb4b326
Update ipc_lista1.8.py
any1m1c/ipc20161
lista1/ipc_lista1.8.py
lista1/ipc_lista1.8.py
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. #Calcule e mostre o total do seu salário no referido mês. QntHora = input("Entre com o valor de seu rendimento por hora: ") hT = input("E...
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. #Calcule e mostre o total do seu salário no referido mês. QntHora = input("Entre com o valor de seu rendimento por hora: ") hT = input("E...
apache-2.0
Python
ad76d59c48443697107854812073ea8521d21cbf
Update __init__.py
lindemann09/pyForceDAQ,lindemann09/pyForceDAQ,lindemann09/pyForceDAQ
forceDAQ/__init__.py
forceDAQ/__init__.py
__version__ = "0.8.11c" __author__ = "Oliver Lindemann" """ launch the GUI force from your Python program: `` from forceDAQ import gui gui.run_with_options(remote_control=False, ask_filename=True, calibration_file="FT_sensor1.cal") `` import relevant stuff to program your own fo...
__version__ = "0.8.11b" __author__ = "Oliver Lindemann" """ launch the GUI force from your Python program: `` from forceDAQ import gui gui.run_with_options(remote_control=False, ask_filename=True, calibration_file="FT_sensor1.cal") `` import relevant stuff to program your own fo...
mit
Python
3db6d8352a993f64380c21c2b29d30ae7f79e4cc
Fix isolated test runner
llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy
llvm/tests/__init__.py
llvm/tests/__init__.py
from __future__ import print_function import sys import os import unittest import subprocess import llvm tests = [] # stores unittest.TestCase objects # Isolated tests # Tests that affect process-wide settings isolated_tests = [] # stores modue name def run(verbosity=1): print('llvmpy is installed in: ' + os....
from __future__ import print_function import sys import os import unittest import subprocess import llvm tests = [] # stores unittest.TestCase objects # Isolated tests # Tests that affect process-wide settings isolated_tests = [] # stores modue name def run(verbosity=1): print('llvmpy is installed in: ' + os....
bsd-3-clause
Python
aae63bca5f5a9a70be40078de38a074f95c53f64
fix duplicate text execution
xuru/substrate,xuru/substrate,xuru/substrate
local/commands/test.py
local/commands/test.py
import logging import tempfile from google.appengine.tools import dev_appserver from google.appengine.tools import dev_appserver_main from nose.core import main from nosegae import NoseGAE from nose_exclude import NoseExclude from nose.plugins.logcapture import LogCapture import re import os os.environ['NOSE_WITH_N...
import logging import tempfile from google.appengine.tools import dev_appserver from google.appengine.tools import dev_appserver_main from nose.core import main from nosegae import NoseGAE from nose_exclude import NoseExclude from nose.plugins.logcapture import LogCapture import re import os os.environ['NOSE_WITH_N...
mit
Python
2d34a073932cc61a469e0c9e86be44465e3fa67f
fix auth.urls
sunlightlabs/django-locksmith,sunlightlabs/django-locksmith,sunlightlabs/django-locksmith
locksmith/auth/urls.py
locksmith/auth/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('locksmith.auth.views', url(r'^create_key/$', 'create_key', name='create_key'), url(r'^update_key/$', 'update_key', name='update_key'), url(r'^update_key_by_email/$', 'update_key', {'get_by':'email'}, name='update_key_by_email'), )
from django.conf.urls.defaults import * urlpatterns = patterns('locksmith.auth.views', url(r'^create_key/$', self.create_key_view, name='create_key'), url(r'^update_key/$', self.update_key_view, name='update_key'), url(r'^update_key_by_email/$', self.update_key_view, {'get_by':'email'}, name='updat...
bsd-3-clause
Python
8179c573ff3a55e9a8df878c1286d5a99acab9cd
test perm using py.test - tidy #1150
pkimber/login,pkimber/login,pkimber/login
login/tests/fixture.py
login/tests/fixture.py
# -*- encoding: utf-8 -*- import pytest from login.tests.factories import ( TEST_PASSWORD, UserFactory, ) class PermTest: def __init__(self, client): setup_users() self.client = client def anon(self, url): self.client.logout() response = self.client.get(url) ...
# -*- encoding: utf-8 -*- import pytest from login.tests.factories import ( TEST_PASSWORD, UserFactory, ) class PermTest: def __init__(self, client): setup_users() self.client = client def anon(self, url): self.client.logout() response = self.client.get(url) ...
apache-2.0
Python
09ed0e911e530e9b907ac92f2892248b6af245fa
Add cassette and failed request as properties of thrown CannotOverwriteCassetteException
kevin1024/vcrpy,graingert/vcrpy,graingert/vcrpy,kevin1024/vcrpy
vcr/errors.py
vcr/errors.py
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): self.cassette = kwargs["cassette"] self.failed_request = kwargs["failed_request"] message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCas...
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): ...
mit
Python
18f24306c5201d3bf5241ad0a684e3e4016bf10f
Improve the design: machinist style FSM, another failure edge case.
w4ngyi/flocker,moypray/flocker,lukemarsden/flocker,Azulinho/flocker,LaynePeng/flocker,wallnerryan/flocker-profiles,beni55/flocker,moypray/flocker,wallnerryan/flocker-profiles,beni55/flocker,AndyHuu/flocker,agonzalezro/flocker,jml/flocker,mbrukman/flocker,runcom/flocker,runcom/flocker,AndyHuu/flocker,adamtheturtle/flock...
flocker/snapshots.py
flocker/snapshots.py
""" Snapshotting of a filesystem. """ from zope.interface import Interface class IFilesystemSnapshots(Interface): """ Support creating and listing snapshots of a specific filesystem. """ def create(name): """ Create a snapshot of the filesystem. @param name: The name of the s...
""" Snapshotting of a filesystem. """ from zope.interface import Interface class IFilesystemSnapshots(Interface): """ Support creating and listing snapshots of a specific filesystem. """ def create(name): """ Create a snapshot of the filesystem. @param name: The name of the s...
apache-2.0
Python
d8a0c5adc2b3554e085c7199a1ad1011fe237f9b
bump version to v0.5.6
PaulSchweizer/flowpipe
flowpipe/__init__.py
flowpipe/__init__.py
"""Flow-based programming with python.""" __version__ = '0.5.6' import logging PACKAGE = 'flowpipe' # create logger logger = logging.getLogger(PACKAGE) logger.propagate = False # create console handler and set level to debug handler = logging.StreamHandler() # create formatter formatter = logging.Formatter('%(nam...
"""Flow-based programming with python.""" __version__ = '0.5.5' import logging PACKAGE = 'flowpipe' # create logger logger = logging.getLogger(PACKAGE) logger.propagate = False # create console handler and set level to debug handler = logging.StreamHandler() # create formatter formatter = logging.Formatter('%(nam...
mit
Python
01b2307235512db3f8395797cd7c5ac8f464d23c
Update extralife crawler
datagutten/comics,jodal/comics,datagutten/comics,klette/comics,jodal/comics,klette/comics,jodal/comics,klette/comics,datagutten/comics,datagutten/comics,jodal/comics
comics/comics/extralife.py
comics/comics/extralife.py
from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'ExtraLife' language = 'en' url = 'http://www.myextralife.com/' start_date = '2001-06-17' rights = 'Scott Johnson' class Crawler(CrawlerBase): history_capable_dat...
from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'ExtraLife' language = 'en' url = 'http://www.myextralife.com/' start_date = '2001-06-17' rights = 'Scott Johnson' class Crawler(CrawlerBase): history_capable_dat...
agpl-3.0
Python
48f9f8b299d665b8fa96231b58c5be0809988b4e
add doc
TeamGhostBuster/restful-api
app/api/__init__.py
app/api/__init__.py
from .article import controller as article_api from .list import controller as list_api from .user import controller as user_api from .group import controller as group_api from .comment import controller as comment_api from .article import model as article_model from .list import model as list_model from .user import m...
from .article import controller as article_api from .list import controller as list_api from .user import controller as user_api from .group import controller as group_api from .comment import controller as comment_api from .article import model as article_model from .list import model as list_model from .user import m...
apache-2.0
Python
f0bd1ac1499f069e11fc773d33c82018670f91af
Fix RestFormMixin errors bug
matllubos/django-is-core,matllubos/django-is-core
is_core/form/__init__.py
is_core/form/__init__.py
from django import forms from django.core.exceptions import ValidationError class AllFieldsUniqueValidationModelForm(forms.ModelForm): def validate_unique(self): try: self.instance.validate_unique() except ValidationError as e: self._update_errors(e) class RestFormMixin(...
from django import forms from django.core.exceptions import ValidationError class AllFieldsUniqueValidationModelForm(forms.ModelForm): def validate_unique(self): try: self.instance.validate_unique() except ValidationError as e: self._update_errors(e) class RestFormMixin(...
bsd-3-clause
Python
e6abb0a1326cc15209076883029b61e5d4fd03c3
Add date format to queue_util
lukesanantonio/inpassing-backend,lukesanantonio/inpassing-backend
inpassing/worker/queue_util.py
inpassing/worker/queue_util.py
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. DATE_FMT = '%Y-%m-%d' CONSUMER_QUEUE_FMT = '{}:{}:consumer' def consumer_queue(org_id, date): return CONSUMER_QUEUE_FMT.format(org_id, str(date)) PRODUCER_QUEUE_FMT = '{}:{}:producer' def producer_queue(org_id, date): return PRODUCER_QUEUE...
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. CONSUMER_QUEUE_FMT = '{}:{}:consumer' def consumer_queue(org_id, date): return CONSUMER_QUEUE_FMT.format(org_id, str(date)) PRODUCER_QUEUE_FMT = '{}:{}:producer' def producer_queue(org_id, date): return PRODUCER_QUEUE_FMT.format(org_id, str...
mit
Python
0dfb00466b8a5ad38520b9346d35cec032d1d969
Update buy.py
sukeesh/Jarvis,sukeesh/Jarvis,appi147/Jarvis,appi147/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis
jarviscli/plugins/buy.py
jarviscli/plugins/buy.py
from plugin import plugin import os import subprocess import sys import webbrowser @plugin("buy") def buy(jarvis, s): """ Searches the string you provide on amazon or ebay. Generates Url and opens browser. Uses: a) "buy <shop> <search term>" (One line command) b) "buy", Asks for shop,"<shop>...
from plugin import plugin import os import subprocess import sys import webbrowser @plugin("buy") def buy(jarvis, s): """ Searches the string you provide on amazon or ebay. Generates Url and opens browser. Uses: a) "buy <shop> <search term>" (One line command) b) "buy", Asks for shop,"<shop>...
mit
Python
392f209791eede86d65f018a9b873b33cb7ccb02
Fix issue with GO term (unsorted).
ArnaudBelcour/Workflow_GeneList_Analysis,ArnaudBelcour/Workflow_GeneList_Analysis
test/test_uniprot_retrieval_data.py
test/test_uniprot_retrieval_data.py
import numpy as np import pandas as pa import unittest import pathway_extraction.uniprot_retrieval_data as uniprot_retrieval_data test_data_directory_uniprot = 'test_data/' + 'test_uniprot_retrieval/' class uniprot_retrieval_data_test(unittest.TestCase): def test_extract_information_from_uniprot(self): ...
import numpy as np import pandas as pa import unittest import pathway_extraction.uniprot_retrieval_data as uniprot_retrieval_data test_data_directory_uniprot = 'test_data/' + 'test_uniprot_retrieval/' class uniprot_retrieval_data_test(unittest.TestCase): def test_extract_information_from_uniprot(self): ...
agpl-3.0
Python
e17fe26503e9a72b43c1b9b662dd4319ccff1fd7
Use an immutable tagged version of the Docker CLI container
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
server/__init__.py
server/__init__.py
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import genRESTEndPointsForSlicerCLIsInDocker _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsRoot = Webroot(_template) histomicsRoot.updateHt...
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import genRESTEndPointsForSlicerCLIsInDocker _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsRoot = Webroot(_template) histomicsRoot.updateHt...
apache-2.0
Python
9bba07c29f8cf5ecfa1f20d1fa16a16866bb3f6c
update Pendle import script for parl.2017-06-08 (closes #948)
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_pendle.py
polling_stations/apps/data_collection/management/commands/import_pendle.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000122' addresses_name = 'parl.2017-06-08/Version 1/Pendle Democracy_Club__08June2017.tsv' stations_name = 'parl.2017-06-08/Version 1/Pendle Democracy_Club_...
from data_collection.management.commands import BaseXpressWebLookupCsvImporter class Command(BaseXpressWebLookupCsvImporter): council_id = 'E07000122' addresses_name = 'PendlePropertyPostCodePollingStationWebLookup-2017-03-01.TSV' stations_name = 'PendlePropertyPostCodePollingStationWebLookup-2017-03-01.TS...
bsd-3-clause
Python
6ff0a16e4b9f6b0e1aabfa50135f59ec6e36042c
fix os.environ
nagyistoce/edx-analytics-data-api,rue89-tech/edx-analytics-data-api,edx/edx-analytics-data-api,Stanford-Online/edx-analytics-data-api,open-craft/edx-analytics-data-api,rue89-tech/edx-analytics-data-api,rue89-tech/edx-analytics-data-api,Stanford-Online/edx-analytics-data-api,nagyistoce/edx-analytics-data-api,edx/edx-ana...
analyticsdataserver/settings/production.py
analyticsdataserver/settings/production.py
"""Production settings and globals.""" from os import environ from base import * import yaml from analyticsdataserver.logsettings import get_logger_config # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ...
"""Production settings and globals.""" from os import environ from base import * import yaml from analyticsdataserver.logsettings import get_logger_config # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ...
agpl-3.0
Python
ce7d80de371baac92c786651706bde09ee45c96e
Handle check-ins w/o boarding group/position
DavidWittman/serverless-southwest-check-in
lambda/src/handlers/check_in.py
lambda/src/handlers/check_in.py
import logging import sys import swa, exceptions, mail # Set up logging log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) def _generate_email_body(response): body = "I just checked in to your flight! Please login to Southwest to view your boarding passes.\n" for flight in response['checkInConfir...
import logging import sys import swa, exceptions, mail # Set up logging log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) def _generate_email_body(response): body = "I just checked in to your flight! Please login to Southwest to view your boarding passes.\n" for flight in response['checkInConfir...
mit
Python
8a20c956c02caa74dbf7c79e9e714e420479dcef
update py
suensummit/erjsTesting,suensummit/erjsTesting
web_test.py
web_test.py
from selenium import webdriver from pandas import * import csv import time # load test data with open('web_test_funnel.csv', 'rb') as f: reader = csv.reader(f) testbot_raw = list(reader) testbot = sorted(testbot_raw, key=lambda testbot_raw: testbot_raw[2]) df = DataFrame(testbot, columns = testbot[len(testbot)-1]) ...
from selenium import webdriver from pandas import * import csv import time # load test data with open('web_test_funnel.csv', 'rb') as f: reader = csv.reader(f) testbot_raw = list(reader) testbot = sorted(testbot_raw, key=lambda testbot_raw: testbot_raw[2]) df = DataFrame(testbot, columns = testbot[len(testbot)-1]) ...
apache-2.0
Python
2cf4d2446414795ab23a1117874085bc19cd814e
make it runnable even if locale is not set such like in docker env; may close issues#3
ssato/python-anytemplate,ssato/python-anytemplate
anytemplate/compat.py
anytemplate/compat.py
# # Author: Satoru SATOH <ssato redhat.com> # License: MIT # # pylint: disable=invalid-name, redefined-builtin, unused-argument """Module to keep backward compatibilities. """ from __future__ import absolute_import import codecs import itertools import locale import os.path import sys try: import json except Impo...
# # Author: Satoru SATOH <ssato redhat.com> # License: MIT # # pylint: disable=invalid-name, redefined-builtin, unused-argument """Module to keep backward compatibilities. """ from __future__ import absolute_import import codecs import itertools import locale import os.path import sys try: import json except Impo...
mit
Python
760ad145b380fe45d6a0350d7298a29d7c47452c
Add python3.4 compatibility to is_json
Daanvdk/is_valid
is_valid/wrapper_predicates.py
is_valid/wrapper_predicates.py
import json def is_transformed( transform, predicate, *args, exceptions=[Exception], msg='data can\'t be transformed', **kwargs ): """ Generates a predicate that checks if the data is valid according to some predicate after a function has been applied to the data. If this function throws an ex...
import json def is_transformed(transform, predicate, *args, exceptions=[ Exception ], msg='data can\'t be transformed', **kwargs): """ Generates a predicate that checks if the data is valid according to some predicate after a function has been applied to the data. If this function throws an except...
mit
Python
63a9d670035368e1a2e8da2a5b783b6811340575
add actionAngleSpherical to top level
followthesheep/galpy,followthesheep/galpy,jobovy/galpy,followthesheep/galpy,followthesheep/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
galpy/actionAngle.py
galpy/actionAngle.py
from galpy.actionAngle_src import actionAngle from galpy.actionAngle_src import actionAngleFlat from galpy.actionAngle_src import actionAnglePower from galpy.actionAngle_src import actionAngleAxi from galpy.actionAngle_src import actionAngleAdiabatic from galpy.actionAngle_src import actionAngleAdiabaticGrid from galpy...
from galpy.actionAngle_src import actionAngle from galpy.actionAngle_src import actionAngleFlat from galpy.actionAngle_src import actionAnglePower from galpy.actionAngle_src import actionAngleAxi from galpy.actionAngle_src import actionAngleAdiabatic from galpy.actionAngle_src import actionAngleAdiabaticGrid from galpy...
bsd-3-clause
Python
1e10da86d224642066e4e3390454be615c308664
set the process group and kill children
Yelp/paasta,gstarnberger/paasta,gstarnberger/paasta,somic/paasta,somic/paasta,Yelp/paasta
paasta_tools/paasta_cli/paasta_cli.py
paasta_tools/paasta_cli/paasta_cli.py
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """A command line tool for viewing information from the PaaSTA stack.""" import argcomplete import argparse import os import signal from paasta_tools.paasta_cli import cmds from paasta_tools.paasta_cli.utils \ import file_names_in_dir as paasta_commands_dir, load_metho...
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """A command line tool for viewing information from the PaaSTA stack.""" import argcomplete import argparse from paasta_tools.paasta_cli import cmds from paasta_tools.paasta_cli.utils \ import file_names_in_dir as paasta_commands_dir, load_method from paasta_tools.util...
apache-2.0
Python
4da09ae9bc9fa05545f5032c398a350798035d60
Fix factory import
SCUEvals/scuevals-api,SCUEvals/scuevals-api
tests/fixtures/factories/student.py
tests/fixtures/factories/student.py
import factory from datetime import timedelta, datetime, timezone from .user import UserFactory from scuevals_api import models from scuevals_api.utils import datetime_from_date class StudentFactory(UserFactory): class Meta: model = models.Student sqlalchemy_session = models.db.session gradu...
import factory from datetime import timedelta, datetime, timezone from utils import datetime_from_date from .user import UserFactory from scuevals_api import models class StudentFactory(UserFactory): class Meta: model = models.Student sqlalchemy_session = models.db.session graduation_year = ...
agpl-3.0
Python
2333980b427c818e0db320a3a5406094a9e64183
Test parent processes handling of KeyboardInterrupt
dbryant4/furtive
tests/test_hasher_hash_directory.py
tests/test_hasher_hash_directory.py
""" Test cases for furtive.hasher object """ import logging import unittest import multiprocessing from mock import MagicMock, patch from furtive.hasher import HashDirectory, hash_task, initializer class TestHashDirectory(unittest.TestCase): def test_hash_directory(self): """ Ensure HashDirectory will c...
""" Test cases for furtive.hasher object """ import logging import unittest import multiprocessing from mock import MagicMock from furtive.hasher import HashDirectory, hash_task, initializer class TestHashDirectory(unittest.TestCase): def test_hash_directory(self): """ Ensure HashDirectory will correctl...
mit
Python
90da7aa5028d64437f3fcaf903075cbda293b575
Fix logging in tests
genenetwork/genenetwork2,genenetwork/genenetwork2,DannyArends/genenetwork2,DannyArends/genenetwork2,zsloan/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,DannyArends/genenetwork2,zsloan/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,DannyArends/genenetwork2,pjotrp/genenetwork2,...
test/requests/parametrized_test.py
test/requests/parametrized_test.py
import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init__(methodName=me...
import logging import unittest from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init__(methodName=methodName) self.g...
agpl-3.0
Python
b60fb0db2cc1ab3605f34e9b604e920279434c36
Disable mouse handling in vterm example.
westurner/urwid,wardi/urwid,zyga/urwid,douglas-larocca/urwid,harlowja/urwid,drestebon/urwid,hkoof/urwid,bk2204/urwid,urwid/urwid,drestebon/urwid,inducer/urwid,hkoof/urwid,hkoof/urwid,bk2204/urwid,rndusr/urwid,rndusr/urwid,zyga/urwid,westurner/urwid,inducer/urwid,rndusr/urwid,mountainstorm/urwid,foreni-packages/urwid,fo...
vterm_test.py
vterm_test.py
#!/usr/bin/python import urwid def main(): event_loop = urwid.SelectEventLoop() mainframe = urwid.Frame( urwid.Columns([ ('fixed', 3, urwid.SolidFill('|')), urwid.Pile([ ('weight', 70, urwid.TerminalWidget(None, event_loop)), ('fixed', 1, urwid.F...
#!/usr/bin/python import urwid def main(): event_loop = urwid.SelectEventLoop() mainframe = urwid.Frame( urwid.Columns([ ('fixed', 3, urwid.SolidFill('|')), urwid.Pile([ ('weight', 70, urwid.TerminalWidget(None, event_loop)), ('fixed', 1, urwid.F...
lgpl-2.1
Python
e1fc818b8d563c00c77060cd74d2781b287c0b5d
Include Plot, SPlot in xnuplot.__all__.
marktsuchida/Xnuplot
xnuplot/__init__.py
xnuplot/__init__.py
from .plot import Plot, SPlot __all__ = ["Plot", "SPlot", "gnuplot", "numplot"]
from .plot import Plot, SPlot __all__ = ["gnuplot", "numplot"]
mit
Python
68802180ac5c7d02a20d88879b583fbcdc7f4059
Add BinauralSepsm to __init__
achabotl/pambox
pambox/speech/__init__.py
pambox/speech/__init__.py
""" The :mod:`pambox.speech` module gather speech intelligibility models. """ from __future__ import absolute_import from .binauralsepsm import BinauralSepsm from .sepsm import Sepsm from .mrsepsm import MrSepsm from .sii import Sii from .material import Material from .experiment import Experiment __all__ = [ 'Bi...
""" The :mod:`pambox.speech` module gather speech intelligibility models. """ from __future__ import absolute_import from .sepsm import Sepsm from .mrsepsm import MrSepsm from .sii import Sii from .material import Material from .experiment import Experiment __all__ = [ 'Sepsm', 'MrSepsm', 'Sii', 'Mate...
bsd-3-clause
Python
7c37d4f95897ddbc061ec0a84185a19899b85b89
Update shebang to use /usr/bin/env.
quattor/aquilon-protocols,quattor/aquilon-protocols
compile_for_dist.py
compile_for_dist.py
#!/usr/bin/env python2.6 # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Add /ms/dist to traceback of files compiled in /ms/dev.""" import sys import py_compile import re def main(args=None):...
#!/ms/dist/python/PROJ/core/2.5.2-1/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Add /ms/dist to traceback of files compiled in /ms/dev.""" import sys import py_compile import re ...
apache-2.0
Python
0f848402257faac3a807cdfe90cc505e2ae39129
Fix typo
OneDrive/onedrive-sdk-python
src/onedrivesdk/model/async_operation_status.py
src/onedrivesdk/model/async_operation_status.py
# -*- coding: utf-8 -*- ''' # Copyright (c) 2015 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
# -*- coding: utf-8 -*- ''' # Copyright (c) 2015 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
mit
Python
70245c78a7f4a036b439b0dc1e784c58d468233e
Bump ptpython version
google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed
pw_console/py/setup.py
pw_console/py/setup.py
# Copyright 2021 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2021 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
Python
a86dfd5335a9dc764de4f6e75c03621373831448
Fix ParametricAttention layer (#457)
spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc
thinc/layers/parametricattention.py
thinc/layers/parametricattention.py
from typing import Tuple, Callable, Optional from ..model import Model from ..config import registry from ..types import Ragged from ..util import get_width InT = Ragged OutT = Ragged @registry.layers("ParametricAttention.v1") def ParametricAttention(nO: Optional[int] = None) -> Model[InT, OutT]: """Weight inp...
from typing import Tuple, Callable, Optional from ..model import Model from ..config import registry from ..types import Ragged from ..util import get_width InT = Ragged OutT = Ragged @registry.layers("ParametricAttention.v1") def ParametricAttention(nO: Optional[int] = None) -> Model[InT, OutT]: """Weight inp...
mit
Python
fb3cd2f1096ff8e7fa2a377c3a531f3e00168a0f
Add a 404 handler
TheScienceMuseum/nmsi-redirects
application.py
application.py
from flask import Flask from flask import redirect from flask import request import csv # example of old url # http://collectionsonline.nmsi.ac.uk/detail.php?type=related&kv=66468&t=objects application = Flask(__name__) courl = 'https://collection.sciencemuseum.org.uk' lookup = {} # load mapping table into a di...
from flask import Flask from flask import redirect from flask import request import csv # example of old url # http://collectionsonline.nmsi.ac.uk/detail.php?type=related&kv=66468&t=objects application = Flask(__name__) courl = 'https://collection.sciencemuseum.org.uk' lookup = {} # load mapping table into a di...
mit
Python
12a5b4402bbcb62291bcb5ecc6ac8817b88dd72c
Fix typos
davidgasquez/tip
tip/algorithms/sorting/mergesort.py
tip/algorithms/sorting/mergesort.py
"""Merge Sort Algorithm. The Merge Sort is a recursive sort of order n*log(n). It is notable for having a worst case and average complexity of O(n*log(n)), and a best case complexity of O(n) (for pre-sorted input). The basic idea is to split the collection into smaller groups by halving it until the groups only have...
""" Merge Sort The Merge Sort is a recursive sort of order n*log(n). It is notable for having a worst case and average complexity of O(n*log(n)), and a best case complexity of O(n) (for pre-sorted input). The basic idea is to split the collection into smaller groups by halving it until the groups only have one elemen...
unlicense
Python
10bcbc32e4a0c20d3a2ec6c85dbd7f92f5aea52d
fix fetching undelivered messages to user
tomi77/django-chat,tomi77/django-chat
chat/query.py
chat/query.py
"""Message related query sets""" from django.db.models.query import QuerySet class MessageQuerySet(QuerySet): """Message query set""" def undelivered(self, to): """Fetch only undelivered messages""" if to is not None: return self.filter(deliveries__receiver=to, ...
"""Message related query sets""" from django.db.models.query import QuerySet class MessageQuerySet(QuerySet): """Message query set""" def undelivered(self, to): """Fetch only undelivered messages""" queryset = self.filter(deliveries__delivered_at__isnull=True) if to is not None: ...
mit
Python
4bd6c570eeebee87bec301140be3a4b1c8bddd19
add AutoReload class
karldoenitz/karlooper,karldoenitz/karlooper,karldoenitz/karlooper,karldoenitz/karlooper
karlooper/autoreload/__init__.py
karlooper/autoreload/__init__.py
# -*-coding:utf-8-*- class AutoReload(object): def __init__(self, **kwargs): pass def __check(self): pass def run(self): pass
# -*-coding:utf-8-*-
mit
Python
4f1b16facd4e209a2185caf6f8cfd82583abf247
Fix NameError for class Election
shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server
server_ui/views.py
server_ui/views.py
""" server_ui specific views """ from helios.models import * from helios_auth.security import * from view_utils import * import helios.views import helios from helios.crypto import utils as cryptoutils from helios_auth.security import * from helios.security import can_create_election from django.core.urlresolvers im...
""" server_ui specific views """ from helios.models import * from helios_auth.security import * from view_utils import * import helios.views import helios from helios.crypto import utils as cryptoutils from helios_auth.security import * from helios.security import can_create_election from django.core.urlresolvers im...
apache-2.0
Python
4db43166543ea8bc47f7eeeb5228540c7b865e35
define sday, year, and month for stub entries
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/ingestors/harry/fill_month.py
scripts/ingestors/harry/fill_month.py
import psycopg2 import datetime import sys from pyiem.network import Table as NetworkTable PGCONN = psycopg2.connect(database='coop', host='iemdb') cursor = PGCONN.cursor() def main(): """ Go Main Go """ year = int(sys.argv[1]) month = int(sys.argv[2]) sts = datetime.datetime(year, month, 1) ets =...
import psycopg2 import datetime import sys from pyiem.network import Table as NetworkTable PGCONN = psycopg2.connect(database='coop', host='iemdb') cursor = PGCONN.cursor() def main(): """ Go Main Go """ year = int(sys.argv[1]) month = int(sys.argv[2]) sts = datetime.datetime(year, month, 1) ets =...
mit
Python
f3b0cefab30a9b9cb78c05054afa96eac5f66565
add some prints
antocuni/pypy-wheels,antocuni/pypy-wheels
build_index.py
build_index.py
import sys import py class IndexBuilder(object): def __init__(self, wheeldir, outdir): self.wheeldir = py.path.local(wheeldir) self.outdir = py.path.local(outdir) self.packages = [] def copy_wheels(self): for whl in self.wheeldir.visit('*.whl'): print 'Collecting w...
import sys import py PACKAGES = [ 'netifaces', ] class IndexBuilder(object): def __init__(self, wheeldir, outdir): self.wheeldir = py.path.local(wheeldir) self.outdir = py.path.local(outdir) self.packages = [] def copy_wheels(self): for whl in self.wheeldir.visit('*.whl')...
mit
Python
231a58846c7c4c6fe782ac1a98f4cbf7860cdd86
add missing import ChessPiece
ilius/chess-challenge
chess_util.py
chess_util.py
""" contains some chess-related utility functions """ import random from cmd_util import input_int from pieces import ChessPiece def format_board(board, row_count, col_count): """ convert a `board` into string than can be shown in console board: a dict { (row_num, col_num) => piece_symbol } row_coun...
""" contains some chess-related utility functions """ import random from cmd_util import input_int def format_board(board, row_count, col_count): """ convert a `board` into string than can be shown in console board: a dict { (row_num, col_num) => piece_symbol } row_count: number of rows col_coun...
mit
Python
675ad4ce3baff98980126e67db970067bfdd73cb
Fix unicorn heroku bug
audip/doctorsfor.me,audip/doctorsfor.me
application.py
application.py
from app import app import os port = int(os.environ.get('PORT', 8000)) if __name__ == '__main__': app.run(host='0.0.0.0',port=port, debug=debug_flag)
from app import app import os port = int(os.environ.get('PORT', 8000)) app.run(host='0.0.0.0',port=port, debug=False)
apache-2.0
Python
3b67827ff5a81559e521a2ab9f837baccf67386c
Update Mpu6050.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
service/Mpu6050.py
service/Mpu6050.py
webgui = Runtime.createAndStart("WebGui","WebGui") raspi = Runtime.createAndStart("RasPi","RasPi") # mpu6050 = Runtime.createAndStart("Mpu6050","Mpu6050") mpu6050.setController(raspi,"1","0x68") mpu6050.refresh() print mpu6050.filtered_x_angle; print mpu6050.filtered_y_angle; print mpu6050.filtered_z_angle;
# start the service mpu6050 = Runtime.start("mpu6050","Mpu6050")
apache-2.0
Python
99820d14a1b083b5aee651da8773ac7b720e6aa5
Improve JSON response handling
schwartzman/technologist,schwartzman/technologist
application.py
application.py
import hashlib import sqlite3 from flask import Flask from flask import Markup from flask import g from flask import jsonify from flask import render_template from random import SystemRandom choice = SystemRandom().choice app = Flask(__name__) @app.context_processor def set_buster(): with open('last-commit.txt'...
import hashlib import json import sqlite3 from flask import Flask from flask import Markup from flask import g from flask import render_template from random import SystemRandom choice = SystemRandom().choice app = Flask(__name__) @app.context_processor def set_buster(): with open('last-commit.txt') as f: ...
mit
Python
3155104dc72cd4c4951395219e6aae201bca4e52
Remove an extra line
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
services/yammer.py
services/yammer.py
import foauth.providers class Yammer(foauth.providers.OAuth2): # General info about the provider provider_url = 'https://www.yammer.com/' docs_url = 'https://developer.yammer.com/api/' # URLs to interact with the API authorize_url = 'https://www.yammer.com/dialog/oauth' access_token_url = 'ht...
import foauth.providers class Yammer(foauth.providers.OAuth2): # General info about the provider provider_url = 'https://www.yammer.com/' docs_url = 'https://developer.yammer.com/api/' # URLs to interact with the API authorize_url = 'https://www.yammer.com/dialog/oauth' access_token_url = 'ht...
bsd-3-clause
Python
8674a8ae44f285ab7ee753822d879bdffca3864d
make tagging optional
rizumu/django-paste-organizer
paste_organizer/models.py
paste_organizer/models.py
from datetime import datetime from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ try: from tagging.fields import TagField except: TagField = None class Pastebin(models.Model): """ Online service where your paste is hosted ...
from datetime import datetime from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from tagging.fields import TagField class Pastebin(models.Model): """ Online service where your paste is hosted """ pastebin_name = models.CharF...
mit
Python
1cbe401e62b2f5d7fee815a3516ee6ea0ecfac75
Bump version to v0.7.0.3
gaqzi/py-gocd-cli,gaqzi/gocd-cli
gocd_cli/__init__.py
gocd_cli/__init__.py
__import__('pkg_resources').declare_namespace(__name__) __version__ = '0.7.0.3'
__import__('pkg_resources').declare_namespace(__name__) __version__ = '0.7.0.2'
mit
Python
b5abccb1dc733522df19d56e0906890531a700d3
Set all fields on input object types
graphql-python/graphene,graphql-python/graphene
graphene/types/inputobjecttype.py
graphene/types/inputobjecttype.py
from collections import OrderedDict from .base import BaseOptions, BaseType from .inputfield import InputField from .unmountedtype import UnmountedType from .utils import yank_fields_from_attrs # For static type checking with Mypy MYPY = False if MYPY: from typing import Dict, Callable # NOQA class InputObjec...
from collections import OrderedDict from .base import BaseOptions, BaseType from .inputfield import InputField from .unmountedtype import UnmountedType from .utils import yank_fields_from_attrs # For static type checking with Mypy MYPY = False if MYPY: from typing import Dict, Callable # NOQA class InputObjec...
mit
Python
3ef154fe39ab68ab4b4e178edb60edddbf5c15b7
Add (gontend-assuming) get_display_url() to Event
akx/gentry,akx/gentry,akx/gentry,akx/gentry
gore/models/event.py
gore/models/event.py
import json from django.db import models from django.utils import timezone from django.utils.encoding import force_text from django.utils.timezone import now from gentry.utils import make_absolute_uri def determine_type(body): type = 'unknown' if 'exception' in body: type = 'exception' if 'sentr...
import json from django.db import models from django.utils import timezone from django.utils.encoding import force_text from django.utils.timezone import now def determine_type(body): type = 'unknown' if 'exception' in body: type = 'exception' if 'sentry.interfaces.Message' in body: type ...
mit
Python
683e995e8be98e0c20b3530fd6729b519ac61eae
Add help
haramaki/spark-openstack
webhookapp.py
webhookapp.py
# import Flask from flask import Flask, request # import custom-made modules import sparkmessage import argparse import prettytable import oscontroller # Create an instance of Flask app = Flask(__name__) TOKEN = "" CON = {} HELP = """ help show this message server create <name> create server server ...
# import Flask from flask import Flask, request # import custom-made modules import sparkmessage import argparse import prettytable import oscontroller # Create an instance of Flask app = Flask(__name__) TOKEN = "" CON = {} # Index page will trigger index() function @app.route('/') def index(): return 'Hello Wor...
apache-2.0
Python
d60aa60c38d16ae745e336a7cd016bb2fd044b4a
test if the working dir exists
laurentb/assnet,laurentb/assnet
ass2m/ass2m.py
ass2m/ass2m.py
# -*- coding: utf-8 -*- # Copyright(C) 2011 Romain Bignon, Laurent Bachelier # # 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, version 3 of the License. # # This program is distributed in the ...
# -*- coding: utf-8 -*- # Copyright(C) 2011 Romain Bignon, Laurent Bachelier # # 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, version 3 of the License. # # This program is distributed in the ...
agpl-3.0
Python
9fb7de1bd5e0a697f44008c324ecacf283f8e4eb
Fix for time format
macedot/scrapyGranja,macedot/scrapyGranja
granjaRaces/items.py
granjaRaces/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.loader.processors import MapCompose, TakeFirst def intCheckDQ(str): if 'DQ' in str: return 99 return int(str) def strTimeToFloat(str): ...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.loader.processors import MapCompose, TakeFirst def intCheckDQ(str): if 'DQ' in str: return 99 return int(str) def strTimeToFloat(str): ...
agpl-3.0
Python
acb512a4a74f118c5e09ddb508549aed896ae1dd
Fix dynamic split
viewflow/viewflow,pombredanne/viewflow,codingjoe/viewflow,pombredanne/viewflow,ribeiro-ucl/viewflow,viewflow/viewflow,codingjoe/viewflow,viewflow/viewflow,ribeiro-ucl/viewflow,codingjoe/viewflow,ribeiro-ucl/viewflow
tests/examples/customnode/views.py
tests/examples/customnode/views.py
from django.views import generic from django.http import HttpResponseRedirect from viewflow.views import task from . import models class DecisionView(task.TaskViewMixin, generic.CreateView): model = models.Decision fields = ['decision'] def form_valid(self, form): self.object = form.save(commit...
from django.views import generic from django.http import HttpResponseRedirect from viewflow.views import task from . import models class DecisionView(task.TaskViewMixin, generic.CreateView): model = models.Decision fields = ['decision'] def form_valid(self, form): self.object = form.save(commit...
agpl-3.0
Python
6aa8db30afba817ff9b5653480d6f735f09d9c3a
Add players, match_valid to Ladder
massgo/mgaladder,hndrewaall/mgaladder,massgo/mgaladder,massgo/mgaladder,hndrewaall/mgaladder,hndrewaall/mgaladder
ladder.py
ladder.py
#! /usr/bin/env python3 class Player: def __init__(self, name, rank): self.name = name self.rank = rank def __repr__(self): return '<{:s}(name={:s}, rank={:d})>'.format(self.__class__.__name__, self.name, self.rank) def __str__(self): rank_str = '' if self.rank <...
#! /usr/bin/env python3 class Player: def __init__(self, name, rank): self.name = name self.rank = rank def __repr__(self): return '<{:s}(name={:s}, rank={:d})>'.format(self.__class__.__name__, self.name, self.rank) def __str__(self): rank_str = '' if self.rank ...
agpl-3.0
Python
51fca346cceffb3a67bacbbec04166f49c6448a0
Update get_arxiv_corpus.py
fajifr/recontent,fajifr/recontent,fajifr/recontent
tools/gensimple/get_arxiv_corpus.py
tools/gensimple/get_arxiv_corpus.py
# Freija Descamps <freija@gmail.com> July 2016 # modified to download arxiv corpus import os import wget URL = 'https://dl.dropboxusercontent.com/u/99220436/recontent-data/arx/' CORPUS_NAME = 'arx' MMFILE = CORPUS_NAME + '.mm' DICTFILE = CORPUS_NAME + '_wordids.txt' SIMMATRIX = CORPUS_NAME + '-lsi.index' LSIMODEL =...
# Freija Descamps <freija@gmail.com> July 2016 # modified to download arxiv corpus import os import wget URL = 'https://dl.dropboxusercontent.com/u/99220436/recontent-data/arXiv1314/' CORPUS_NAME = 'arx' MMFILE = CORPUS_NAME + '.mm' DICTFILE = CORPUS_NAME + '_wordids.txt' SIMMATRIX = CORPUS_NAME + '-lsi.index' LSIM...
mit
Python
c10b7cb1e8d284f3d09559167751cd43c51d83dd
revert accidental changes to PRESUBMIT.py
hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,Jonekee/chromium.s...
tools/memory_inspector/PRESUBMIT.py
tools/memory_inspector/PRESUBMIT.py
# Copyright 2014 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. """Top-level presubmit script for memory_inspector. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit...
# Copyright 2014 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. """Top-level presubmit script for memory_inspector. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit...
bsd-3-clause
Python
08c6ce960f3d96cebd0ea964827550f70232321b
fix setup for new directory structure
SiLab-Bonn/basil,MarcoVogt/basil,SiLab-Bonn/basil
host/setup.py
host/setup.py
#!/usr/bin/env python from distutils.core import setup f = open('VERSION', 'r') basil_version = f.readline().strip() f.close() setup( name='Basil', version=basil_version, packages=['basil', 'basil.HL', 'basil.RL', 'basil.TL', 'basil.UL', 'basil.utils'], description='Basil: SILAB modular readout fr...
#!/usr/bin/env python from distutils.core import setup f = open('VERSION', 'r') basil_version = f.readline().strip() f.close() setup( name='Basil', version=basil_version, package_dir={'basil': '', 'basil.HL': 'HL', 'basil.RL': 'RL', 'basil.TL': 'TL', 'basil.UL': 'UL', 'basil.utils': 'utils'}, pack...
bsd-3-clause
Python
5a5c25d507540598f989086f6e9cfb7ec815f51c
Rename sdk/redistributable_bin/osx32 to sdk/redistributable_bin/osx
Gramps/GodotSteam,Gramps/GodotSteam,Gramps/GodotSteam
godotsteam/config.py
godotsteam/config.py
def can_build(env, platform): return platform=="x11" or platform=="windows" or platform=="osx" def configure(env): env.Append(CPPPATH=["#modules/godotsteam/sdk/public/"]) # If compiling Linux if env["platform"]== "x11": env.Append(LIBS=["steam_api"]) env.Append(RPATH=["."]) if env["bits"]=="32": env.Appe...
def can_build(env, platform): return platform=="x11" or platform=="windows" or platform=="osx" def configure(env): env.Append(CPPPATH=["#modules/godotsteam/sdk/public/"]) # If compiling Linux if env["platform"]== "x11": env.Append(LIBS=["steam_api"]) env.Append(RPATH=["."]) if env["bits"]=="32": env.Appe...
mit
Python