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
f925c2378b731add65b57ebd1a66392166d558b9
Correct the name of the file.
jwg4/pyQuantuccia,jwg4/pyQuantuccia
pyQuantuccia/setup.py
pyQuantuccia/setup.py
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['src/pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
bsd-3-clause
Python
e9d64ca576d54f80b85599bb80722e5c028777b2
use parse_request
xmaruto/mcord,wathsalav/xos,xmaruto/mcord,cboling/xos,wathsalav/xos,xmaruto/mcord,opencord/xos,jermowery/xos,open-cloud/xos,zdw/xos,wathsalav/xos,open-cloud/xos,cboling/xos,opencord/xos,zdw/xos,cboling/xos,wathsalav/xos,opencord/xos,cboling/xos,zdw/xos,zdw/xos,xmaruto/mcord,open-cloud/xos,jermowery/xos,jermowery/xos,je...
plstackapi/planetstack/views/roles.py
plstackapi/planetstack/views/roles.py
from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from plstackapi.planetstack.api.roles import add_role, delete_role, get_roles from plstackapi.planetstack.serializers import RoleSerializer from plstackapi.util.json i...
from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from plstackapi.planetstack.api.roles import add_role, delete_role, get_roles from plstackapi.planetstack.serializers import RoleSerializer class RoleListCreate(APIV...
apache-2.0
Python
dca8dabd63a95169803e69364a58222f41497879
fix syntax error
opencord/xos,zdw/xos,jermowery/xos,open-cloud/xos,opencord/xos,xmaruto/mcord,zdw/xos,opencord/xos,zdw/xos,xmaruto/mcord,jermowery/xos,cboling/xos,xmaruto/mcord,open-cloud/xos,cboling/xos,wathsalav/xos,jermowery/xos,zdw/xos,jermowery/xos,wathsalav/xos,cboling/xos,xmaruto/mcord,open-cloud/xos,wathsalav/xos,cboling/xos,wa...
plstackapi/planetstack/views/roles.py
plstackapi/planetstack/views/roles.py
from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from plstackapi.planetstack.api.roles import add_role, delete_role, get_roles from plstackapi.planetstack.serializers import RoleSerializer class RoleListCreate(APIV...
from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from plstackapi.planetstack.api.roles import add_role, delete_role, get_roles from plstackapi.planetstack.serializers import RoleSerializer class RoleListCreate(APIV...
apache-2.0
Python
1ed3a918db818974b20f06a7922bf26b07d7ac5f
Add message model
jason-feng/chatroom,jason-feng/chatroom,jason-feng/chatroom,jason-feng/chatroom
client/models.py
client/models.py
from django.db import models from django.contrib.auth.models import User # Create your models here. class Message(models.Model): user = models.ForeignKey(User, null=True) # username field is useful to store guest name of unauthenticated users username = models.CharField(max_length=20) date = models.Da...
from django.db import models # Create your models here.
apache-2.0
Python
5bc7168ee5ffbbd617100e5f0e1d0d0fd8c5b2c6
Use argparse.
ProgVal/pydigmips
pydigmips/__main__.py
pydigmips/__main__.py
import sys import argparse from . import loaders from . import emulator def main(fd): program = loaders.load_hexa(fd.readlines()) e = emulator.Emulator(program) try: e.run_all() except emulator.SelfLoop: print() print('Self-loop detected. (“stop: j stop”?)') except emulator...
import sys from . import loaders from . import emulator def main(filename): with open(filename) as fd: program = loaders.load_hexa(fd.readlines()) e = emulator.Emulator(program) try: e.run_all() except emulator.SelfLoop: print() print('Self-loop detected. (“stop: j stop...
mit
Python
182013b8e9806c039db0c08805f3b545caac83fb
Correct the docstring
nedbat/zellij
defuzz.py
defuzz.py
""" De-fuzz tuples of floats. """ class Defuzzer: """ Remove the fuzz from a collection of float tuples. Call `defuzz` with a tuple of floats. It will return a tuple of floats which are close enough to the input. The returned value will be either the same as the input, or will be a previously se...
""" De-fuzz tuples of floats. """ class Defuzzer: """ Like a defaultdict, but with Points as keys. Points compare inexactly, so a simple dict with points as keys won't work. We get constant-time behavior by storing points three ways: as-is, and rounded two different ways. If any of those three ...
apache-2.0
Python
484ea5a41af7bfd001bd4a26aa6cbda3af687bd9
Update __init__.py
hammerlab/pyensembl,hammerlab/pyensembl
pyensembl/__init__.py
pyensembl/__init__.py
# Copyright (c) 2015. Mount Sinai School of Medicine # # 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 o...
# Copyright (c) 2015. Mount Sinai School of Medicine # # 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 o...
apache-2.0
Python
b8d1d35352c6b9daaec2c412fc2afda433893f0f
Fix building against YAZ4
dengelke/node-zoom2,dengelke/node-zoom2,dengelke/node-zoom2,dengelke/node-zoom2
binding.gyp
binding.gyp
{ 'targets': [ { 'target_name': 'zoom', "cflags": ["<!@(yaz-config --libs <!@(if test '4' = <!@(pkg-config --modversion yaz|cut -f1 -d '.');then echo -n '--cflags';else echo -n '--include';fi))"], "libraries": ["<!@(yaz-config --libs)"], 'include_dirs': [ '<!(node -e "require(\'nan...
{ 'targets': [ { 'target_name': 'zoom', "cflags": ["<!@(yaz-config --libs --include)"], "libraries": ["<!@(yaz-config --libs)"], 'include_dirs': [ '<!(node -e "require(\'nan\')")' ], 'sources': [ 'src/zoom.cc', 'src/query.cc', 'src/record.cc', ...
mit
Python
ef3a6cd4db94fdafa7f7d7d4cc584cb6ee101be4
Fix binding.gyp for Linux.
bls/node-divsufsort,bls/node-divsufsort,bls/node-divsufsort,bls/node-divsufsort
binding.gyp
binding.gyp
{ 'targets': [ { 'target_name': 'divsufsort', 'sources': [ 'src/divsufsort.cc' ], 'libraries': [ '-ldivsufsort', ], 'include_dirs' : [ "<!(node -e \"require('nan')\")" ], 'conditions': [ ['OS=="linux"', { 'ldflags': [ '-Wl,-rpath,/usr/local...
{ 'targets': [ { 'target_name': 'divsufsort', 'sources': [ 'src/divsufsort.cc' ], 'libraries': [ '-ldivsufsort', ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ] } ] }
mit
Python
657d0626f74604c34909936aaf0c5dbf381a0f3c
Add arg index
pkronstrom/intercom
client.py
client.py
from pymumble.pymumble_py3 import Mumble, constants import alsaaudio class MumbleClient: def __init__(self, host, config): self.mumble = Mumble(config['host'], config['user'], debug=False) self.mumble.start() self.mumble.is_ready() self.mumble.set_receive_sound(True) self.m...
from pymumble.pymumble_py3 import Mumble, constants import alsaaudio class MumbleClient: def __init__(self, host, config): self.mumble = Mumble(config['host'], config['user'], debug=False) self.mumble.start() self.mumble.is_ready() self.mumble.set_receive_sound(True) self.m...
mit
Python
b0b1a600882a6a9cd8ce6416a58aa8e7bfc854ae
Add fftw3 lib
noflo/noflo-ccv,noflo/noflo-ccv,noflo/noflo-ccv,noflo/noflo-ccv
binding.gyp
binding.gyp
{ 'target_defaults': { 'default_configuration': 'Release' }, 'targets': [ { 'target_name': 'scddetect', 'type': 'executable', 'sources': [ 'src/scddetect.c', ], 'libraries': [ '-L/app/vendor/libccv', '-L/home/vilson/repos/ccv/lib', '-lccv -lm -...
{ 'target_defaults': { 'default_configuration': 'Release' }, 'targets': [ { 'target_name': 'scddetect', 'type': 'executable', 'sources': [ 'src/scddetect.c', ], 'libraries': [ '-L/app/vendor/libccv', '-lccv -lm -lpng -ljpeg -lpthread -lgsl -lgslcblas' ...
mit
Python
04ea2869f8d3a6e2b5eee23753d0ba4bc04d50db
return binding.gyp to it's initial state
Sannis/node-mysql-libmysqlclient,Sannis/node-mysql-libmysqlclient,Sannis/node-mysql-libmysqlclient,Sannis/node-mysql-libmysqlclient
binding.gyp
binding.gyp
{ 'targets': [ { # have to specify 'liblib' here since gyp will remove the first one :\ 'target_name': 'mysql_bindings', 'sources': [ 'src/mysql_bindings.cc', 'src/mysql_bindings_connection.cc', 'src/mysql_bindings_result.cc', 'src/mysql_bindings_statement.cc', ...
{ 'targets': [ { # have to specify 'liblib' here since gyp will remove the first one :\ 'target_name': 'mysql_bindings', 'sources': [ 'src/mysql_bindings.cc', 'src/mysql_bindings_connection.cc', 'src/mysql_bindings_result.cc', 'src/mysql_bindings_statement.cc', ...
mit
Python
b1c29cdd59b389c6b35ca2fdfbeff84e2031db49
Revert seperator symbol to hyphen
notcammy/PyInstaLive
pyinstalive/logger.py
pyinstalive/logger.py
import os import sys def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[...
import os import sys def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[...
mit
Python
293bb8a30dc95170a1c70dca08050d4f71a0516c
remove DXL compliance filter
pollen/pyrobus
pyluos/modules/dxl.py
pyluos/modules/dxl.py
from .module import Module, interact class DynamixelMotor(Module): def __init__(self, id, alias, robot): Module.__init__(self, 'DynamixelMotor', id, alias, robot) # Read self.position = None # Write self._target_position = None self._moving_speed = None self...
from .module import Module, interact class DynamixelMotor(Module): def __init__(self, id, alias, robot): Module.__init__(self, 'DynamixelMotor', id, alias, robot) # Read self.position = None # Write self._target_position = None self._moving_speed = None self...
mit
Python
b354230f38cee01157aa814ba7b7bd29013413e3
Refactor cli parse args
eiginn/passpie,eiginn/passpie,scorphus/passpie,marcwebbie/pysswords,scorphus/passpie,marcwebbie/passpie,marcwebbie/passpie
pysswords/__main__.py
pysswords/__main__.py
import os import argparse def default_db(): return os.path.join(os.path.expanduser("~"), "~/.pysswords") def parse_args(args): parser = argparse.ArgumentParser(prog="Pysswords") group_init = parser.add_argument_group("Init options") group_init.add_argument("-I", "--init", action="store_true") g...
import os import argparse def default_db(): return os.path.join(os.path.expanduser("~"), "~/.pysswords") def parse_args(args): parser = argparse.ArgumentParser(prog="Pysswords") group_init = parser.add_argument_group("Init options") group_init.add_argument("-I", "--init", action="store_true") gr...
mit
Python
d388e686e26f691a763d5bda168eec44982d06b5
revert accidental experimentation
gpitel/pyjs,spaceone/pyjs,pyjs/pyjs,lancezlin/pyjs,anandology/pyjamas,minghuascode/pyj,lancezlin/pyjs,pyjs/pyjs,gpitel/pyjs,spaceone/pyjs,spaceone/pyjs,gpitel/pyjs,pyjs/pyjs,pyjs/pyjs,spaceone/pyjs,minghuascode/pyj,gpitel/pyjs,anandology/pyjamas,Hasimir/pyjs,pombredanne/pyjs,pombredanne/pyjs,pombredanne/pyjs,Hasimir/py...
library/pyjamas/ui/ClickListener.py
library/pyjamas/ui/ClickListener.py
""" Copyright (C) 2008, 2009 - Luke Kenneth Casson Leighton <lkcl@lkcl.net> """ from pyjamas import DOM from pyjamas.ui import Event class ClickHandler(object): def __init__(self, preventDefault=False): self._clickListeners = [] self._doubleclickListeners = [] self._clickPreventDef...
""" Copyright (C) 2008, 2009 - Luke Kenneth Casson Leighton <lkcl@lkcl.net> """ from pyjamas import DOM from pyjamas.ui import Event from pyjamas.EventController import Handler class ClickHandler(object): def __init__(self, preventDefault=False): self._clickListeners = Handler(self, "Click") ...
apache-2.0
Python
79db38fc2c514846215dc73eef6a9c6ee75d6005
fix backwards boolean in CLI
cmheisel/pywatch
src/pywatch/__init__.py
src/pywatch/__init__.py
VERSION = "0.4" import sys from optparse import OptionParser from pywatch.watcher import Watcher def main(args=None): """ Used by the pywatch script to handle command-line args. """ if not args: args = sys.argv[1:] usage = 'usage: %prog [options] "command" file1 file2 ...' pars...
VERSION = "0.4" import sys from optparse import OptionParser from pywatch.watcher import Watcher def main(args=None): """ Used by the pywatch script to handle command-line args. """ if not args: args = sys.argv[1:] usage = 'usage: %prog [options] "command" file1 file2 ...' pars...
mit
Python
6655bfcb1f6bd43497fe71cb6b7c83f899c5ee60
Bump Version
nluedtke/brochat-bot
common.py
common.py
VERSION_YEAR = 2017 VERSION_MONTH = 11 VERSION_DAY = 8 VERSION_REV = 0 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 items_awarded = 0 trump_tweets_seen = ...
VERSION_YEAR = 2017 VERSION_MONTH = 10 VERSION_DAY = 30 VERSION_REV = 1 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 items_awarded = 0 trump_tweets_seen =...
mit
Python
9d7267717d689389ad42ef39bfd3aa8892f4e107
Bump Version
nluedtke/brochat-bot
common.py
common.py
VERSION_YEAR = 2018 VERSION_MONTH = 4 VERSION_DAY = 6 VERSION_REV = 0 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None pubg_api_key = None pubg_api = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 ite...
VERSION_YEAR = 2018 VERSION_MONTH = 4 VERSION_DAY = 5 VERSION_REV = 0 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None pubg_api_key = None pubg_api = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 ite...
mit
Python
18643e3efb9f0665163fcb98dd20458417132976
Bump version
nluedtke/brochat-bot
common.py
common.py
VERSION_YEAR = 2018 VERSION_MONTH = 6 VERSION_DAY = 2 VERSION_REV = 0 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None pubg_api_key = None pubg_api = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 ite...
VERSION_YEAR = 2018 VERSION_MONTH = 5 VERSION_DAY = 28 VERSION_REV = 0 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None pubg_api_key = None pubg_api = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 it...
mit
Python
20ace9a4d88b967406e856af8b42f19805058e4d
Clean up config
youtify/youtify,youtify/youtify,youtify/youtify
config.py
config.py
import os CLIENT_ID = '' CLIENT_SECRET = '' ON_PRODUCTION = os.environ['SERVER_SOFTWARE'].startswith('Google App Engine') # http://stackoverflow.com/questions/1916579/in-python-how-can-i-test-if-im-in-google-app-engine-sdk if ON_PRODUCTION: REDIRECT_URL = 'http://www.youtify.com/flattrback' else: REDIRECT_UR...
CLIENT_ID = '' CLIENT_SECRET = '' FLATTR_URL = 'http://flattr.dev' #FLATTR_URL = 'https://flattr.com' REDIRECT_URL = 'http://localhost:8080/flattrback'
mit
Python
83fc1ac7a258b5d9efdec9b5066161b82f2f1c5b
update config.py for os.getenv
staugur/Interest.blog,staugur/Interest.blog,staugur/Interest.blog,staugur/Interest.blog
config.py
config.py
# -*- coding:utf8 -*- import os GLOBAL={ "Host": os.environ.get("interest.blog.Host", "0.0.0.0"), #Application run network address, you can set it `0.0.0.0`, `127.0.0.1`, or someone IP "Port": int(os.environ.get("interest.blog.Port", 10140)), #Application run port, default port "LogLevel": os.e...
# -*- coding:utf8 -*- import os GLOBAL={ "Host": os.environ.get("interest.blog.host", "0.0.0.0"), #Application run network address, you can set it `0.0.0.0`, `127.0.0.1`, or someone IP "Port": int(os.environ.get("interest.blog.port", 10140)), #Application run port, default port "LogLevel": os.e...
mit
Python
5a4bd773176c765a63662a74ccd7499f51e08e11
Remove useless BASE_DIR config
mdsrosa/routes_api_python
config.py
config.py
import os class Config(object): DEBUG = False TESTING = False SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_TRACK_MODIFICATIONS = True class ProductionConfig(Config): DEBUG = False class StagingConfig(Config): DEBUG = True DEVELOPMENT = True class DevelopmentConfig(...
import os class Config(object): DEBUG = False TESTING = False BASE_DIR = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_TRACK_MODIFICATIONS = True class ProductionConfig(Config): DEBUG = False class StagingConfig(Config): DEBU...
mit
Python
5161983c56d742208612239c45bde4be31260666
test still
KieberLab/indCAPS,KieberLab/indCAPS,KieberLab/indCAPS,KieberLab/indCAPS
config.py
config.py
import os workers = int(os.environ.get('GUNICORN_PROCESSES', '3')) threads = int(os.environ.get('GUNICORN_THREADS', '1')) forwarded_allow_ips = '*' secure_scheme_headers = { 'X-Forwarded-Proto': 'https' } access_log_format = '"%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" "%({Forwarded}i)s"'
import os workers = int(os.environ.get('GUNICORN_PROCESSES', '3')) threads = int(os.environ.get('GUNICORN_THREADS', '1')) forwarded_allow_ips = '*' secure_scheme_headers = { 'X-Forwarded-Proto': 'https' } access_log_format = '"%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" "%({X-Forwarded-For}i)s"'
bsd-3-clause
Python
51bb7408f8a479a75200ec1b01a05cb65982d060
Change environment variable names and add placeholders
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
config.py
config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("MYDICTIONARY_SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True ...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True class Develo...
mit
Python
e7c10175c93cb90f0eac3b12c401c12190674c7f
Remove __doc__ attribute from ARGS
crowsonkb/style_transfer,crowsonkb/style_transfer,crowsonkb/style_transfer,crowsonkb/style_transfer
config.py
config.py
# Configuration file for style_transfer.
"""Configuration file for style_transfer."""
mit
Python
4c6ae05b9a4088d272c57d07ca99e14294988189
add default icon to config
uilab-github/slask,Marclass/limbo,freshbooks/limbo,michaelMinar/limbo,signalnine/alanabot,akatrevorjay/slask,rizaon/limbo,TetraEtc/limbo,wmv/slackbot-python,TetraEtc/limbo,NUKnightLab/slask,sentinelleader/limbo,palachu/sdbot,shawnsi/limbo,ruhee/limbo,UnILabKAIST/slask,uilab-github/slask,Whirlscape/debt-bot,kylemsguy/li...
config.py
config.py
config = { "username": 'slask', "icon": ":poop:", }
config = { "username": 'slask', }
mit
Python
d6f9ba523aaf77b34be414d5416c4db52c6f4afe
add config timeout
zjuguxi/flask_study,zjuguxi/flask_study,zjuguxi/flask_study
config.py
config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get('MAIL_USE...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get('MAIL_USE...
mit
Python
4999beab47529e8c3b7c95c040fb29de2b987756
add registered shipping choices
rctay/satchmo-shipping-singpost
config.py
config.py
""" Copyright (C) 2009-2010, Tay Ray Chuan Please see LICENCE for licensing details. """ from django.utils.translation import ugettext_lazy as _ from livesettings import * SHIP_MODULES = config_get('SHIPPING', 'MODULES') SHIP_MODULES.add_choice(('singpost', 'SingPost')) SHIPPING_GROUP = ConfigurationGroup('singpost...
""" Copyright (C) 2009-2010, Tay Ray Chuan Please see LICENCE for licensing details. """ from django.utils.translation import ugettext_lazy as _ from livesettings import * SHIP_MODULES = config_get('SHIPPING', 'MODULES') SHIP_MODULES.add_choice(('singpost', 'SingPost')) SHIPPING_GROUP = ConfigurationGroup('singpost...
bsd-3-clause
Python
2feddffbec1a68b368e5c91f814fc8bfe8692402
Fix symlink sanity check
sassoftware/bob,sassoftware/bob
bob/scm.py
bob/scm.py
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
Python
8461b9552b1652c29a473f6b3839847a40487c28
Update d_main.py
stan-cap/bt_rssi,stan-cap/bt_rssi
d_main.py
d_main.py
from bt_proximity import BluetoothRSSI import time import sys import datetime #//////////////////////////////// BT_ADDR1 = 'C8:A8:23:EE:14:61'#/// Enter your first bluetooth address here! #//////////////////////////////// #//////////////////////////////// BT_ADDR2 = '00:CD:FE:9C:77:FD'#/// Enter your second bluetoot...
mit
Python
60a44990cb6a3042fa4a4f157ecefa9cbc97ead0
test cases for latest story parts
mohrm/umklapp_site,mohrm/umklapp_site,mohrm/umklapp_site
umklapp/test.py
umklapp/test.py
from django.test import TestCase from django.test.utils import override_settings from umklapp.models import * class UmklappTestCase(TestCase): def addUsers(self): self.users = [] for i in range(0,7): u = User.objects.create_user( "user%d" % i, "test@exam...
from django.test import TestCase from django.test.utils import override_settings from umklapp.models import * class UmklappTestCase(TestCase): def addUsers(self): self.users = [] for i in range(0,7): u = User.objects.create_user( "user%d" % i, "test@exam...
mit
Python
e53a2ae95abe475dd961148e01dc540d1c76eabc
fix TypeError: integer argument expected, got float
Jeija/bluefluff,Jeija/bluefluff,Jeija/bluefluff
util/toimage.py
util/toimage.py
#!/usr/bin/env python3 from PIL import Image, ImageDraw import binascii import argparse import codecs import math import sys import os WIDTH = 64 # Parse path to DLC file parser = argparse.ArgumentParser() parser.add_argument("dlcfile", help="Path to DLC file") args = parser.parse_args() print("Opening " + args.dlcf...
#!/usr/bin/env python3 from PIL import Image, ImageDraw import binascii import argparse import codecs import math import sys import os WIDTH = 64 # Parse path to DLC file parser = argparse.ArgumentParser() parser.add_argument("dlcfile", help="Path to DLC file") args = parser.parse_args() print("Opening " + args.dlcf...
mit
Python
4e7db7e16db558c61b7ed73ae8f9da87ca830f9f
Test commit after rename.
mckinziebrandon/DeepChatModels,mckinziebrandon/DeepChatModels,mckinziebrandon/DeepChatModels
utils/ubuntu.py
utils/ubuntu.py
from utils.dataset import Dataset from utils.data_utils import * from tensorflow import gfile class Ubuntu(Dataset): def __init__(self, vocab_size): self.name = "ubuntu" self.vocab_size = vocab_size self._data_dir = '/home/brandon/terabyte/Datasets/ubuntu_dialogue_corpus' paths_t...
from utils.dataset import Dataset from utils.data_utils import * from tensorflow import gfile class Ubuntu(Dataset): def __init__(self, vocab_size): self.name = "ubuntu" self.vocab_size = vocab_size self._data_dir = '/home/brandon/terabyte/Datasets/ubuntu_dialogue_corpus' paths_t...
mit
Python
ae14d6c06f3a718e741b475e4f8d6b749a4293fa
Work on functional template detector (using DT's)
KitwareMedical/pydstk,KitwareMedical/pydstk
detect.py
detect.py
################################################################################ # # Library: pydstk # # Copyright 2010 Kitware Inc. 28 Corporate Drive, # Clifton Park, NY, 12065, USA. # # All rights reserved. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in co...
################################################################################ # # Library: pydstk # # Copyright 2010 Kitware Inc. 28 Corporate Drive, # Clifton Park, NY, 12065, USA. # # All rights reserved. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in co...
apache-2.0
Python
0740c56922554ca084891a3ca09c1238f370011a
split levels of abstractions using a reusable property
Psycojoker/voltairine,Psycojoker/voltairine,Psycojoker/voltairine
video/models.py
video/models.py
import os import av from django.db import models from django.conf import settings from jsonfield import JSONField class Video(models.Model): title = models.CharField(max_length=255) file_name = models.CharField(max_length=255) film_name = models.CharField(max_length=255, null=True, blank=True) reali...
import os import av from django.db import models from django.conf import settings from jsonfield import JSONField class Video(models.Model): title = models.CharField(max_length=255) file_name = models.CharField(max_length=255) film_name = models.CharField(max_length=255, null=True, blank=True) reali...
agpl-3.0
Python
f625e34d1242d57ecd8fbc0dc0c15dd1e572a5ce
Fix file handling
swarmer/fridge,swarmer/fridge
fridge.py
fridge.py
""" A persistent dict-like storage that uses JSON to store its contents. """ import json import errno class Fridge(dict): def __init__(self, path=None, file=None): if path is None and file is None: raise ValueError('No path or file specified') elif path is not None and file is not No...
""" A persistent dict-like storage that uses JSON to store its contents. """ import json import errno class Fridge(dict): def __init__(self, path=None, file=None): if path is None and file is None: raise ValueError('No path or file specified') elif path is not None and file is not No...
mit
Python
bd308b3f13308283be9509feae49b5e815851a99
Update to Entry.getPoster to include reference
carlmw/oscar-wager,carlmw/oscar-wager
wager/models.py
wager/models.py
import google.appengine.api.urlfetch import simplejson from django.db import models from django.template.defaultfilters import slugify class Wager(models.Model): """Wager model detailing the agreement of participants""" name = models.CharField(max_length=50, unique=True) slug = models.CharField(ma...
import urllib, urllib2 import simplejson from django.db import models from django.template.defaultfilters import slugify class Wager(models.Model): """Wager model detailing the agreement of participants""" name = models.CharField(max_length=50, unique=True) slug = models.CharField(max_length=50, d...
bsd-3-clause
Python
3eab8bdcafd5b6a30489b089bfeaa6008ed0d36b
convert dl.py to beautifulsoup
Saturn/champsleagueviz,Saturn/champsleagueviz,llimllib/champsleagueviz,llimllib/champsleagueviz,llimllib/champsleagueviz,Saturn/champsleagueviz
wcqualify/dl.py
wcqualify/dl.py
import requests, csv, time from bs4 import BeautifulSoup def download_group_odds(): teams = [] sites = [] for group in (chr(ord('a') + x) for x in range(0,8)): urltemplate = "http://www.oddschecker.com/football/world-cup/group-{}/to-qualify" url = urltemplate.format(group) print "ge...
import re, requests, csv, time def download_group_odds(): teams = [] sites = [] for group in (chr(ord('a') + x) for x in range(0,8)): url = "http://www.oddschecker.com/football/world-cup-groups/group-{}/world-cup-group-{}/to-qualify".format(group, group) print "getting %s" % url r =...
mit
Python
b48545e6fb85a913a366d51d86aebef941df02f4
Disable SQLALCHEMY_TRACK_MODIFICATIONS
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
db/manage.py
db/manage.py
from functools import update_wrapper import click from radar.app import create_app from radar.database import db from radar.fixtures import dev, create_initial_data def app_context(f): @click.pass_context def new_func(ctx, *args, **kwargs): with ctx.obj['app'].app_context(): return ctx.i...
from functools import update_wrapper import click from radar.app import create_app from radar.database import db from radar.fixtures import dev, create_initial_data def app_context(f): @click.pass_context def new_func(ctx, *args, **kwargs): with ctx.obj['app'].app_context(): return ctx.i...
agpl-3.0
Python
af4df82603d9aac70e47672f196a0a5e5160f817
improve readability of settings.py
relekang/python-semantic-release,relekang/python-semantic-release
semantic_release/settings.py
semantic_release/settings.py
"""Helpers to read settings from setup.cfg or pyproject.toml """ import configparser import importlib import os from functools import wraps from os import getcwd from typing import Callable import ndebug import toml from .errors import ImproperConfigurationError debug = ndebug.create(__name__) def _config(): #...
"""Settings """ import configparser import importlib import os from functools import wraps from os import getcwd from typing import Callable import ndebug import toml from .errors import ImproperConfigurationError debug = ndebug.create(__name__) def _config(): parser = configparser.ConfigParser() current_d...
mit
Python
0778f3d8293f447435459e43ade0c18f2f2c7f26
Use shell subprocess call
rolurq/flask-gulp
flask_static/extensions.py
flask_static/extensions.py
import os import subprocess from functools import wraps extensions = {} def extension(f): """ Decorator to create new extensions Each extension will receive a file name in `filename` and its content in `data`. The decorated function must return a tuple `(dest, ouput)`, where `ou...
import os import subprocess from functools import wraps extensions = {} def extension(f): """ Decorator to create new extensions Each extension will receive a file name in `filename` and its content in `data`. The decorated function must return a tuple `(dest, ouput)`, where `ou...
mit
Python
29b57a6a1a26a42a57f861234a14a00e6d537247
allow levels==0 to work (#3)
siawyoung/Dropbox-Folder-Size
dropbox_folder_size.py
dropbox_folder_size.py
import dropbox client = dropbox.client.DropboxClient('<INSERT ACCESS TOKEN>') # choose 0 to express values in bytes, 1 in KB, 2 in MB, 3 in GB. denomination = 2 # choose how many levels you want to segregate by # e.g. if levels is 1, will return folder sizes of folders in Dropbox root # If you just want to know over...
import dropbox client = dropbox.client.DropboxClient('<INSERT ACCESS TOKEN>') # choose 0 to express values in bytes, 1 in KB, 2 in MB, 3 in GB. denomination = 2 # choose how many levels you want to segregate by # e.g. if levels is 1, will return folder sizes of folders in Dropbox root # If you just want to know over...
mit
Python
8eaf7530f7b5057b424b14b8d747f7fdb2c32ccb
Bump version.
armet/python-armet
armet/_version.py
armet/_version.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 4, 30) __version__ = '.'.join(map(str, __version_info__))
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 4, 29) __version__ = '.'.join(map(str, __version_info__))
mit
Python
afb18dea711ece758d7eb7e6c0397fd1a7b9af74
set added AVAILABLE and HARDWARE_TYPE elements
onelab-eu/sfa,yippeecw/sfa,yippeecw/sfa,onelab-eu/sfa,onelab-eu/sfa,yippeecw/sfa
sfa/rspecs/rspec_elements.py
sfa/rspecs/rspec_elements.py
from sfa.util.enumeration import Enum # recognized top level rspec elements RSpecElements = Enum( AVAILABLE='AVAILABLE', BWLIMIT='BWLIMIT', EXECUTE='EXECUTE', NETWORK='NETWORK', COMPONENT_MANAGER='COMPONENT_MANAGER', HARDWARE_TYPE='HARDWARE_TYPE', INSTALL='INSTALL', INTERFACE='INTERF...
from sfa.util.enumeration import Enum # recognized top level rspec elements RSpecElements = Enum( BWLIMIT='BWLIMIT', EXECUTE='EXECUTE', NETWORK='NETWORK', COMPONENT_MANAGER='COMPONENT_MANAGER', INSTALL='INSTALL', INTERFACE='INTERFACE', INTERFACE_REF='INTERFACE_REF', LOCATION='LOCATIO...
mit
Python
c151fbd2f5f608bdfc09caf2b03ae9106b338542
Clean up the table afterward
Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed,Rosuav/shed
hammer.py
hammer.py
import psycopg2 import random import time try: range = xrange except NameError: pass conn = psycopg2.connect("") with conn, conn.cursor() as cur: cur.execute("drop table if exists hammer") cur.execute("create table hammer (id serial primary key, count integer not null default 0)") for _ in range(100): cur.execute...
import psycopg2 import random import time try: range = xrange except NameError: pass conn = psycopg2.connect("") with conn, conn.cursor() as cur: cur.execute("drop table if exists hammer") cur.execute("create table hammer (id serial primary key, count integer not null default 0)") for _ in range(100): cur.execute...
mit
Python
e4a3785fa0b9c04465e65074594ce97529a4ee92
Add esc on global level
kwadrat/rgb_tdd
common_rg_bar.py
common_rg_bar.py
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width 3. (optional) Text to display (without color) shows red/green bar to visualize return code of previous command ''' import sys esc = chr(27) def main(): if len(sys.argv) >= 2: code = sys.argv[1] ...
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width 3. (optional) Text to display (without color) shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x...
mit
Python
2a022adc16a84b6cedebfab523f6f250736daefd
Bump version to 0.8.1 for patch release
OSSHealth/ghdata,OSSHealth/ghdata,OSSHealth/ghdata
augur/metadata.py
augur/metadata.py
__version__ = '0.8.1'
__version__ = '0.8.0'
mit
Python
afa8c92038b688c32b95c6a56740979298282025
Update metadata.py
OSSHealth/ghdata,OSSHealth/ghdata,OSSHealth/ghdata
augur/metadata.py
augur/metadata.py
__version__ = '0.9.0'
__version__ = '0.8.1'
mit
Python
33f420cc68554b13509b17e09bf2c790db3b5b0f
change to post instead
universalcore/unicore-cms,universalcore/unicore-cms,universalcore/unicore-cms
cms/api/notify.py
cms/api/notify.py
import os from cornice.resource import resource from cms.api.utils import ApiBase from cms.tasks import fastforward @resource(path='/api/notify/') class NotifyApi(ApiBase): def post(self): repo_path = os.path.join( self.request.registry.settings['git.path'], '.git') fastforward.delay(...
import os from cornice.resource import resource from cms.api.utils import ApiBase from cms.tasks import fastforward @resource(path='/api/notify/') class NotifyApi(ApiBase): def get(self): repo_path = os.path.join( self.request.registry.settings['git.path'], '.git') fastforward.delay(r...
bsd-2-clause
Python
5e207d6530df65a08e918d5a1f01c25feda345fa
Enhance the IsRhel# components and add the 'minor' attr (#2925)
RedHatInsights/insights-core,RedHatInsights/insights-core
insights/components/rhel_version.py
insights/components/rhel_version.py
""" IsRhel6, IsRhel7 and IsRhel8 =============================== An ``IsRhel*`` component is valid if the :py:class:`insights.combiners.redhat_release.RedHatRelease` combiner indicates the major RHEL version represented by the component. Otherwise, it raises a :py:class:`insights.core.dr.SkipComponent` to prevent depe...
""" IsRhel6, IsRhel7 and IsRhel8 =============================== An ``IsRhel*`` component is valid if the :py:class:`insights.combiners.redhat_release.RedHatRelease` combiner indicates the major RHEL version represented by the component. Otherwise, it raises a :py:class:`insights.core.dr.SkipComponent` to prevent depe...
apache-2.0
Python
f553d10e4aebc8fc2437ea7db5d2eee92f741fc0
put imperavi/ajax-select import inside conditional
mthornhill/django-pressroom,mthornhill/django-pressroom
src/pressroom/admin.py
src/pressroom/admin.py
from django.contrib import admin from django.conf import settings from models import Article, Document, Section class ArticleAdminBase(admin.ModelAdmin): list_display = ('headline', 'author', 'language', 'pub_date', 'publish', 'modified_by') search_fields = ('headline', 'author', 'summary', 'body') list_fi...
from django.contrib import admin from django.conf import settings from models import Article, Document, Section from imperavi.admin import ImperaviAdmin from ajax_select import make_ajax_form from ajax_select.admin import AjaxSelectAdmin class ArticleAdminBase(admin.ModelAdmin): list_display = ('headline', 'author...
bsd-3-clause
Python
954902c8f8891bb666ff88b97eac8c44e9d89c97
Fix missing last day
sushi-irc/tekka
tekka/helper/history.py
tekka/helper/history.py
""" provide functions for history handling. note that history stuff is only possible if maki is not running remote. """ import re import os from ..com import sushi from ..typecheck import types FILEPATTERN= re.compile(r'([0-9]+)-([0-9]+)\.txt') DATEPATTERN= re.compile(r'^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+):...
""" provide functions for history handling. note that history stuff is only possible if maki is not running remote. """ import re import os from ..com import sushi from ..typecheck import types FILEPATTERN= re.compile(r'([0-9]+)-([0-9]+)\.txt') DATEPATTERN= re.compile(r'^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+):...
bsd-2-clause
Python
c49b40d9eaa719883107182c0bea7099ffa5003e
Fix missing `comment` optionality
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
pycroft/model/task_serialization.py
pycroft/model/task_serialization.py
from dataclasses import dataclass from typing import Optional from datetime import date from marshmallow import Schema, fields, post_load class TaskParams: pass class UserMoveOutSchema(Schema): comment = fields.Str() end_membership = fields.Bool() @post_load def build(self, data, **kwargs): ...
from dataclasses import dataclass from typing import Optional from datetime import date from marshmallow import Schema, fields, post_load class TaskParams: pass class UserMoveOutSchema(Schema): comment = fields.Str() end_membership = fields.Bool() @post_load def build(self, data, **kwargs): ...
apache-2.0
Python
0e834f697401fe4d87a4a73fb3ec8c67b8d5f55d
sort list of sponsors explicitly, because when you update a sponsor (by delete/insert) the output order is wrong
biviosoftware/publicprize,biviosoftware/publicprize,biviosoftware/publicprize
publicprize/contest/model.py
publicprize/contest/model.py
# -*- coding: utf-8 -*- """ The singleton model which handles global tasks. :copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved. :license: Apache, see LICENSE for more details. """ import flask import random from .. import biv from .. import common from ..auth import model as pam from .....
# -*- coding: utf-8 -*- """ The singleton model which handles global tasks. :copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved. :license: Apache, see LICENSE for more details. """ import flask import random from .. import biv from .. import common from ..auth import model as pam from .....
apache-2.0
Python
86c715b665af15d323c5d46976febdecce110c85
Add Onnx Supported Layers (#2902)
intel-analytics/BigDL,yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL
python/bigdl/dllib/nn/onnx/layer.py
python/bigdl/dllib/nn/onnx/layer.py
# # Copyright 2016 The BigDL 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 to in ...
# # Copyright 2016 The BigDL 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 to in ...
apache-2.0
Python
2bfe93c4cac0340f1d9a150693b69c1e6d1bb85c
Bump version to 0.16.1
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
pytablereader/__version__.py
pytablereader/__version__.py
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.16.1" __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.16.0" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
mit
Python
4e84769eeb2684bc5316f4b9f65c5015b086f7b2
Add HMAC keys to signing
qiime2/qiime-studio-frontend,qiime2/qiime-studio,jakereps/qiime-studio,qiime2/qiime-studio,jakereps/qiime-studio-frontend,qiime2/qiime-studio-frontend,jakereps/qiime-studio,jakereps/qiime-studio,jakereps/qiime-studio-frontend,qiime2/qiime-studio
qiime_studio/api/security.py
qiime_studio/api/security.py
import hmac import base64 import os import urllib import collections from time import time from flask import request, abort __KEY = os.urandom(33) __WHITE_LIST = ["GET", "OPTIONS"] def validate_request_authentication(): if (request.method not in __WHITE_LIST): request_date = int(request.headers.get('Req...
import hmac import base64 import os import urllib import collections from time import time from flask import request, abort __KEY = os.urandom(33) __WHITE_LIST = ["GET", "OPTIONS"] def validate_request_authentication(): if (request.method not in __WHITE_LIST): request_date = int(request.headers.get('Req...
bsd-3-clause
Python
a19a5dfacd09ffebe8fdc2f5edcbf1aec6d73751
Use a different django secret key for each test run.
smn/django-dirtyfields,romgar/django-dirtyfields
tests/django_settings.py
tests/django_settings.py
# Minimum settings that are needed to run django test suite import os import secrets import tempfile SECRET_KEY = secrets.token_hex() if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined...
# Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined in .travis...
bsd-3-clause
Python
1778f7d424169a0cd6132175c9646bff9f3aac0b
Remove ambigious variable name
jmlong1027/multiscanner,mitre/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,MITRECND/multiscanner,MITRECND/multiscanner
tests/test_common_lib.py
tests/test_common_lib.py
import os import sys MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.join(MS_WD, 'libs') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'libs')) import common def test_list2cmdline(): ls = ['1', 'a', '"dsafsad"'] result = '1 a "dsafsad"' assert common.list2cmdl...
import os import sys MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.join(MS_WD, 'libs') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'libs')) import common def test_list2cmdline(): l = ['1', 'a', '"dsafsad"'] result = '1 a "dsafsad"' assert common.list2cmdli...
mpl-2.0
Python
0047e8dc50a86856f029cdeb6431a73c186d8740
Remove unnecessary path definition.
caseynbrock/opal2,caseynbrock/opal2
tests/tools_for_tests.py
tests/tools_for_tests.py
#!/usr/bin/env python import os import shutil import tempfile main_dir = os.getcwd() test_dir = os.path.join(main_dir, 'tests') # main test directory class TemporaryDirectory(object): """ Context manager for tempfile.mkdtemp() so it's usable with 'with' statement. This version automatically changes to an...
#!/usr/bin/env python import os import shutil import tempfile main_dir = os.getcwd() test_dir = os.path.join(main_dir, 'tests') # main test directory test_inputs_dir = os.path.join(test_dir, 'test_inputs') class TemporaryDirectory(object): """ Context manager for tempfile.mkdtemp() so it's usable with 'with'...
mit
Python
e6b6897802671cadd9fbb33a8426bab74c2d4dfb
add version var
alanwells/donkey,kennethjiang/donkey,wroscoe/donkey,wroscoe/donkey,wroscoe/donkey,ricorx7/donkey,ricorx7/donkey,alanwells/donkey,ricorx7/donkey,wroscoe/donkey,alanwells/donkey,ricorx7/donkey,kennethjiang/donkey,kennethjiang/donkey
donkeycar/__init__.py
donkeycar/__init__.py
__version__ = '2.1.3' from .parts import * from .vehicle import Vehicle from .memory import Memory from . import utils from . import config from .config import load_config
from .parts import * from .vehicle import Vehicle from .memory import Memory from . import utils from . import config from .config import load_config
mit
Python
3930c6a2dc5193f8b60020a4a920088a39b5752e
Remove faked delay from downloader example.
itamarst/crochet,rolando/crochet,wrmsr/crochet
examples/downloader.py
examples/downloader.py
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, in_event_loop, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @in_event_loop ...
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, in_event_loop, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @in_event_loop ...
mit
Python
340573b07f57a7564efb74754cf0884a5f921a41
fix example broken in main example
thomasballinger/curtsies,sebastinas/curtsies,spthaolt/curtsies
examples/quickstart.py
examples/quickstart.py
from __future__ import unicode_literals # convenient for Python 2 import random from curtsies import FullscreenWindow, Input, FSArray from curtsies.fmtfuncs import red, bold, green, on_blue, yellow print(yellow('this prints normally, not to the alternate screen')) with FullscreenWindow() as window: with Input() a...
from __future__ import unicode_literals # convenient for Python 2 import random from curtsies import FullscreenWindow, Input, FSArray from curtsies.fmtfuncs import red, bold, green, on_blue, yellow print(yellow('this prints normally, not to the alternate screen')) with FullscreenWindow() as window: with Input() a...
mit
Python
0f769ab68f6f77134d77776a69d7aaa6ad1f48ac
refactor using_xref.py
mozman/ezdxf,mozman/ezdxf,mozman/ezdxf,mozman/ezdxf,mozman/ezdxf
examples/using_xref.py
examples/using_xref.py
# Copyright (c) 2018-2022 Manfred Moitzi # License: MIT License import pathlib import ezdxf from ezdxf.addons import odafc CWD = pathlib.Path("~/Desktop/Outbox").expanduser() if not CWD.exists(): CWD = pathlib.Path(".") # ------------------------------------------------------------------------------ # This exampl...
# Copyright (c) 2018-2021 Manfred Moitzi # License: MIT License from pathlib import Path import ezdxf from ezdxf.addons import odafc # Setup your preferred output folder: OUTBOX = Path("~/Desktop/Outbox").expanduser() if not OUTBOX.exists(): OUTBOX = Path(".") # AutoCAD can not resolve XREFS in DXF R12 Format :-(...
mit
Python
23439d00555481f587eec4ec033f962c73705b82
Implement workaround for issue https://github.com/jacquev6/PyGithub/issues/256.
bilderbuchi/OF_repo_utilities
get_percentage_of_unmergeable_PRs.py
get_percentage_of_unmergeable_PRs.py
#!/usr/bin/env python3 """Print the percentage of unmergeable PRs and some associated stats.""" import github_tools from time import sleep Repo = github_tools.get_repo() merge_true = 0 merge_false = 0 nr_prs = 0 pulls = Repo.get_pulls('open') for p in pulls: nr_prs += 1 # TODO: Workaround for https://github...
#!/usr/bin/env python3 """Print the percentage of unmergeable PRs and some associated stats.""" import github_tools Repo = github_tools.get_repo() merge_true = 0 merge_false = 0 nr_prs = 0 pulls = Repo.get_pulls('open') for p in pulls: nr_prs += 1 print("nr " + str(p.number) + ", mergeable:" + str(p.mergeab...
mit
Python
50a4ae5009913b33319cabc63e9150e41bc6865a
allow login auth
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/linked_domain/views.py
corehq/apps/linked_domain/views.py
from __future__ import absolute_import from django.http import JsonResponse, Http404, HttpResponseForbidden from corehq.apps.app_manager.dbaccessors import get_latest_released_app, get_app from corehq.apps.domain.decorators import api_key_auth, login_or_api_key from corehq.apps.linked_domain.decorators import require_...
from __future__ import absolute_import from django.http import JsonResponse, Http404, HttpResponseForbidden from corehq.apps.app_manager.dbaccessors import get_latest_released_app, get_app from corehq.apps.domain.decorators import api_key_auth from corehq.apps.linked_domain.decorators import require_linked_domain from...
bsd-3-clause
Python
f58e2f401ad0e745232fb2e9b15790f1d0baa8b4
Create database in wrong order
drnlm/sqlobject,drnlm/sqlobject,sqlobject/sqlobject,sqlobject/sqlobject
sqlobject/tests/test_SQLMultipleJoin.py
sqlobject/tests/test_SQLMultipleJoin.py
from sqlobject import * from sqlobject.tests.dbtest import * class Race(SQLObject): name = StringCol() fightersAsList = MultipleJoin('RFighter') fightersAsSResult = SQLMultipleJoin('RFighter') class RFighter(SQLObject): name = StringCol() race = ForeignKey('Race') power = IntCol() def createA...
from sqlobject import * from sqlobject.tests.dbtest import * class Race(SQLObject): name = StringCol() fightersAsList = MultipleJoin('RFighter') fightersAsSResult = SQLMultipleJoin('RFighter') class RFighter(SQLObject): name = StringCol() race = ForeignKey('Race') power = IntCol() def createA...
lgpl-2.1
Python
df006c0ef957d5804a856c941dc4f09bde77f460
simplify landing page tuple
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/users/landing_pages.py
corehq/apps/users/landing_pages.py
from collections import namedtuple from django.urls import reverse from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_noop from corehq import toggles LandingPage = namedtuple('LandingPage', ['id', 'name', 'urlname']) ALL_LANDING_PAGES = ( LandingPage('dashboard', ...
from collections import namedtuple from django.urls import reverse from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_noop from corehq import toggles class LandingPage(namedtuple('LandingPage', ['id', 'name', 'urlname'])): def get_urlname(self, domain): if ...
bsd-3-clause
Python
fd8d316a0a7297531b836603b4c1b225d357722a
prepare version 2.13.5
Star2Billing/newfies-dialer,newfies-dialer/newfies-dialer,Star2Billing/newfies-dialer,romonzaman/newfies-dialer,newfies-dialer/newfies-dialer,saydulk/newfies-dialer,newfies-dialer/newfies-dialer,Star2Billing/newfies-dialer,romonzaman/newfies-dialer,newfies-dialer/newfies-dialer,saydulk/newfies-dialer,romonzaman/newfies...
newfies/newfies_dialer/__init__.py
newfies/newfies_dialer/__init__.py
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Bi...
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Bi...
mpl-2.0
Python
666155f5fab1e2de27827154c5211976f36eae19
Update studentvue.py
pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker
igc/util/studentvue.py
igc/util/studentvue.py
from splinter import Browser def check_authentication(studentId, password): browser = Browser('phantomjs') url = 'https://parentvue.vbcps.com/Login_Student_PXP.aspx' browser.visit(url) browser.find_by_id('username').fill(studentId) browser.find_by_id('password').fill(password) browser.find_b...
from splinter import Browser def check_authentication(studentId, password): browser = Browser('phantomjs') url = 'https://studentvue.vbcps.com/Login_Student_PXP.aspx' browser.visit(url) browser.find_by_id('username').fill(studentId) browser.find_by_id('password').fill(password) browser.find_...
agpl-3.0
Python
8d66bdb8968a130b5ba3ba886817b137e163a24f
include std{out, err} in subprocess failure exception (#7457)
cseed/hail,cseed/hail,danking/hail,cseed/hail,hail-is/hail,danking/hail,cseed/hail,hail-is/hail,danking/hail,hail-is/hail,cseed/hail,hail-is/hail,hail-is/hail,cseed/hail,danking/hail,danking/hail,cseed/hail,danking/hail,cseed/hail,danking/hail,hail-is/hail,hail-is/hail,danking/hail,hail-is/hail
hail/python/hailtop/utils/process.py
hail/python/hailtop/utils/process.py
import asyncio class CalledProcessError(Exception): def __init__(self, command, returncode, outerr): super().__init__() self.command = command self.returncode = returncode self.outerr = outerr def __str__(self): return (f'Command {self.command} returned non-zero exit s...
import asyncio class CalledProcessError(Exception): def __init__(self, command, returncode): super().__init__() self.command = command self.returncode = returncode def __str__(self): return f'Command {self.command} returned non-zero exit status {self.returncode}.' async def ...
mit
Python
2b3a1a34b539ff5eccfd9a88858efc0d8b048226
Add an additional comment during the proprocessing.
bstell/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,googlefonts/TachyFont,googlefonts/TachyFont,moyogo/tachyfont,moyogo/tachyfont,bstell/TachyFont,bstell/TachyFont,googlei18n/TachyFont,googlei18n/TachyFont,googlei18n/TachyFont,bstell/TachyFont,googlei18n/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,moyogo/tachy...
build_time/src/main.py
build_time/src/main.py
""" Copyright 2014 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 ...
""" Copyright 2014 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 ...
apache-2.0
Python
9852d6d10b50ab3de1eecfa7d338b1b03e188e90
Test email sending.
AndrewLvov/django-registration,newvem/django-registration,maraujop/django-registration,fedenko/django-registration,QPmedia/django-registration,thedod/django-registration-hg-mirror,aptivate/django-registration,AndrewLvov/django-registration,QPmedia/django-registration,CoatedMoose/django-registration,rbarrois/django-regi...
registration/tests.py
registration/tests.py
""" Unit tests for django-registration. """ from django.core import mail from django.test import TestCase class DefaultBackendTestCase(TestCase): """ Test the default registration backend. """ def setUp(self): """ Create an instance of the default backend for use in testing. ...
""" Unit tests for django-registration. """ from django.test import TestCase class DefaultBackendTestCase(TestCase): """ Test the default registration backend. """ def setUp(self): """ Create an instance of the default backend for use in testing. """ fro...
bsd-3-clause
Python
769d0c3128c1f82bf0722cc57b63f956da38042e
bump version to 2.0.0.post1
beniwohli/apm-agent-python,beniwohli/apm-agent-python,beniwohli/apm-agent-python,beniwohli/apm-agent-python
elasticapm/version.py
elasticapm/version.py
__version__ = (2, 0, 0, 'post1') VERSION = '.'.join(map(str, __version__))
__version__ = (2, 0, 0) VERSION = '.'.join(map(str, __version__))
bsd-3-clause
Python
0f688ac6b05caada0f2b72e5e6bc484c1b45ac04
Update bold init for imports
poldracklab/fmriprep,oesteban/preprocessing-workflow,poldracklab/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,poldracklab/fmriprep,oesteban/fmriprep,oesteban/preprocessing-workflow,oesteban/fmriprep,poldracklab/fmriprep
fmriprep/workflows/bold/__init__.py
fmriprep/workflows/bold/__init__.py
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
bsd-3-clause
Python
70bce9a27673f777c7e6e5cc34834f8d774cebfc
Bump version
frankie567/drf-tracking
rest_framework_tracking/__init__.py
rest_framework_tracking/__init__.py
__version__ = '1.1.0' default_app_config = 'rest_framework_tracking.apps.RestFrameworkTrackingConfig'
__version__ = '1.0.0' default_app_config = 'rest_framework_tracking.apps.RestFrameworkTrackingConfig'
isc
Python
05d66bec85cfd9153df7f05c08dbcc5797f7b37b
Enable download in daemon.
jmfield2/gdrive-linux,jimlawton/gdrive-linux,jimlawton/gdrive-linux-googlecode,babycaseny/gdrive-linux
drived.py
drived.py
#!/usr/bin/env python # # Copyright 2012 Jim Lawton. 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 requir...
#!/usr/bin/env python # # Copyright 2012 Jim Lawton. 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 requir...
apache-2.0
Python
e76f6fafef73d90862da082cac10bcbf1a71ca21
Add flag to debug nans.
tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor
tensor2tensor/trax/rlax/ppo_main.py
tensor2tensor/trax/rlax/ppo_main.py
# coding=utf-8 # Copyright 2019 The Tensor2Tensor 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...
# coding=utf-8 # Copyright 2019 The Tensor2Tensor 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...
apache-2.0
Python
11fd5e357527f8b3a7ac4cba3a3f2d4605c84888
Fix grep encoding (#820)
google/turbinia,google/turbinia,google/turbinia,google/turbinia,google/turbinia
turbinia/workers/grep.py
turbinia/workers/grep.py
# -*- coding: utf-8 -*- # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# -*- coding: utf-8 -*- # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Python
51a735a642822dd64fdfe735b5f528bd52e7aa9b
add docstring
instinct-vfx/rez,nerdvegas/rez,nerdvegas/rez,instinct-vfx/rez
src/rez/application.py
src/rez/application.py
from rez.config import config class Application(object): """An interface for registering custom Rez subcommand To register plugin and expose subcommand, the plugin module.. * MUST have a module-level docstring (used as the command help) * MUST have a module-level attribute `command_behavior` * ...
from rez.config import config class Application(object): """An interface for registering custom Rez application/subcommand""" def __init__(self): self.type_settings = config.plugins.application self.settings = self.type_settings.get(self.name()) @classmethod def name(cls): ""...
apache-2.0
Python
c7ce8a408d674a1407198fa4510c39aef3aae133
Bump version; 0.1.4.dev1
treasure-data/td-client-python
tdclient/version.py
tdclient/version.py
__version__ = "0.1.4.dev1"
__version__ = "0.1.4.dev0"
apache-2.0
Python
637630c55c5a723eeb3e4da2e54c59430b936812
Bump version; 0.3.0.dev1
treasure-data/td-client-python
tdclient/version.py
tdclient/version.py
__version__ = "0.3.0.dev1"
__version__ = "0.3.0.dev0"
apache-2.0
Python
32aa534972b265a2c02f6af727978199eac9b003
Add CROP_SIZE to settings
novapost/insight-reloaded
insight_reloaded/insight_settings.py
insight_reloaded/insight_settings.py
# -*- coding: utf-8 -*- import os.path try: import settings except ImportError: settings = None REDIS_HOST = getattr(settings, 'REDIS_HOST', 'localhost') REDIS_PORT = getattr(settings, 'REDIS_PORT', 6379) REDIS_DB = getattr(settings, 'REDIS_DB', 0) DEFAULT_REDIS_QUEUE_KEY = getattr(settings, 'DEFAULT_REDIS_QUE...
# -*- coding: utf-8 -*- import os.path try: import settings except ImportError: settings = None REDIS_HOST = getattr(settings, 'REDIS_HOST', 'localhost') REDIS_PORT = getattr(settings, 'REDIS_PORT', 6379) REDIS_DB = getattr(settings, 'REDIS_DB', 0) DEFAULT_REDIS_QUEUE_KEY = getattr(settings, 'DEFAULT_REDIS_QUE...
bsd-3-clause
Python
8bdbbf94091e8a41b8c691efcfce6acb04db3750
Revert cache config
loleg/dribdat,loleg/dribdat,loleg/dribdat,loleg/dribdat
dribdat/settings.py
dribdat/settings.py
# -*- coding: utf-8 -*- """Application configuration.""" import os os_env = os.environ class Config(object): """Base configuration.""" SECRET_KEY = os_env.get('DRIBDAT_SECRET', 'A-big-scary-Secret-goes-HERE.') DRIBDAT_APIKEY = os_env.get('DRIBDAT_APIKEY', None) DRIBDAT_SLACK_ID = os_env.get('DRIBDAT_...
# -*- coding: utf-8 -*- """Application configuration.""" import os os_env = os.environ class Config(object): """Base configuration.""" SECRET_KEY = os_env.get('DRIBDAT_SECRET', 'A-big-scary-Secret-goes-HERE.') DRIBDAT_APIKEY = os_env.get('DRIBDAT_APIKEY', None) DRIBDAT_SLACK_ID = os_env.get('DRIBDAT_...
mit
Python
92e7889f5a8046b81b0f02ba2dbf6ddf55248fee
remove unused
tombee/shipyard,swege/shipyard,OnePaaS/shipyard,linecheng/shipyard,Dumbear/shipyard,leominov/shipyard,linecheng/shipyard,wujingke/shipyard,leroy-chen/shipyard,beyondblog/shipyard,RustJason/shipyard,LongTaiJun/DockerUI,jsyinwenjun/shipyard,dockerclubgroup/shipyard,bkcsoft/shipyard,John-Lin/shipyard,chenrui2014/shipyard,...
applications/models.py
applications/models.py
from django.db import models from django.db.models.signals import post_save, pre_delete, m2m_changed from django.contrib.auth.models import User from containers.models import Container from shipyard import utils from django.utils.translation import ugettext as _ import uuid PROTOCOL_CHOICES = ( ('http', _('HTTP'))...
from django.db import models from django.db.models.signals import post_save, pre_delete, m2m_changed from django.contrib.auth.models import User from containers.models import Container from shipyard import utils from django.utils.translation import ugettext as _ import uuid PROTOCOL_CHOICES = ( ('http', _('HTTP'))...
apache-2.0
Python
c5573a39b1b335e75ad8be0703dc491fb50fb3cc
modify merge conflicts
sparcs-kaist/sparcssso,sparcs-kaist/sparcssso,sparcs-kaist/sparcssso,sparcs-kaist/sparcssso,sparcs-kaist/sparcssso,sparcs-kaist/sparcssso
apps/account/models.py
apps/account/models.py
from django.db import models from django.contrib.auth.models import User MALE = 'M' FEMALE = 'F' NONE = 'N' GENDER = ( (MALE, 'Male'), (FEMALE, 'Female'), (NONE, 'None'), ) class EmailAuthToken(models.Model): token = models.CharField(max_length=48, primary_key=True) expire_time = models.DateTime...
from django.db import models from django.contrib.auth.models import User MALE = 'M' FEMALE = 'F' NONE = 'N' GENDER = ( (MALE, 'Male'), (FEMALE, 'Female'), (NONE, 'None'), ) class EmailAuthToken(models.Model): token = models.CharField(max_length=48, primary_key=True) expire_time = models.DateTime...
mit
Python
7cf407ba29f69b720e3501f3f147238b10d4e4be
Fix bug for returning messages.
kkinder/GAEStarterKit,kkinder/GAEStarterKit,kkinder/GAEStarterKit
apps/email/__init__.py
apps/email/__init__.py
""" Handles emails sent from app to users/admins. The intended way to send emails is by calling, simply, the send_email_from_template method. """ import flask import models import controllers def send_email_from_template(template_prefix, from_address, to_address, **context): """ Uses flask templates to generi...
""" Handles emails sent from app to users/admins. The intended way to send emails is by calling, simply, the send_email_from_template method. """ import flask import models import controllers def send_email_from_template(template_prefix, from_address, to_address, **context): """ Uses flask templates to generi...
apache-2.0
Python
cacec48020a5523050e13912018af1069b7adb82
add the course id
illotum/sdn-fabric,illotum/sdn-fabric
fabric.py
fabric.py
#!/bin/env python # Alex # MINT 719
#!/bin/env python # Alex
apache-2.0
Python
7ac8f94e07dbb9415a355c3940dc8ad8953dcd57
Remove unused timezone from locale initializer
z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask
catwatch/initialize.py
catwatch/initialize.py
from flask import request from flask_login import current_user from itsdangerous import URLSafeTimedSerializer from catwatch.extensions import login_manager, babel def authentication(app, user_model): """ Initialize the Flask-Login extension (mutates the app passed in). :param app: Flask application ins...
from flask import request from flask_login import current_user from itsdangerous import URLSafeTimedSerializer from catwatch.extensions import login_manager, babel def authentication(app, user_model): """ Initialize the Flask-Login extension (mutates the app passed in). :param app: Flask application ins...
mit
Python
d94fd1b866c9dd4bc83c1167494b7d3b4348ea3e
Format outgoing messages using markdown
cmende/pytelefoob0t
foob0t.py
foob0t.py
# Copyright 2017 Christoph Mende # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2017 Christoph Mende # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
Python
3def26abf75aecd3550ecb52d26fe244b620f9e0
include microseconds in filename to avoid multiple calls overwriting eachother
qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq
dimagi/utils/decorators/profile.py
dimagi/utils/decorators/profile.py
import hotshot import os from datetime import datetime from django.conf import settings try: PROFILE_LOG_BASE = settings.PROFILE_LOG_BASE except Exception: PROFILE_LOG_BASE = "/tmp" # Source: http://code.djangoproject.com/wiki/ProfilingDjango def profile(log_file): """Profile some callable. This dec...
import hotshot import os import time from django.conf import settings try: PROFILE_LOG_BASE = settings.PROFILE_LOG_BASE except Exception: PROFILE_LOG_BASE = "/tmp" # Source: http://code.djangoproject.com/wiki/ProfilingDjango def profile(log_file): """Profile some callable. This decorator uses the ho...
bsd-3-clause
Python
cb053f50a7034df06278fc41b7bcae8250ef8487
fix LowerTemporalResolution preprocessor
pyannote/pyannote-audio,pyannote/pyannote-audio,pyannote/pyannote-audio
pyannote/audio/utils/preprocessors.py
pyannote/audio/utils/preprocessors.py
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2022- CNRS # 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...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2022- CNRS # 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...
mit
Python
3382fde96e25aea954e51fd3020342dd133cfe40
Update version
chargehound/chargehound-python
chargehound/version.py
chargehound/version.py
from __future__ import unicode_literals VERSION = '2.5.0'
from __future__ import unicode_literals VERSION = '2.4.0'
mit
Python
91be552ce5abd337e75415a6c82740a33a1ea159
Replace customers.medical_notes with customers.medical_details
gadventures/gapipy
gapipy/resources/booking/customer.py
gapipy/resources/booking/customer.py
from __future__ import unicode_literals from ..base import Resource class Customer(Resource): _resource_name = 'customers' _is_listable = False _is_parent_resource = True _as_is_fields = [ 'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes', 'emergency_contacts', 'medical...
from __future__ import unicode_literals from ..base import Resource class Customer(Resource): _resource_name = 'customers' _is_listable = False _is_parent_resource = True _as_is_fields = [ 'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes', 'emergency_contacts', 'medical...
mit
Python
e7f18838a40742b8c87f214cfb4ae0ac844e3c8f
Define channels for "before", "filter", "start" and "end" feedbacks.
treemo/circuits,eriol/circuits,treemo/circuits,treemo/circuits,eriol/circuits,eriol/circuits,nizox/circuits
circuits/web/events.py
circuits/web/events.py
# Module: events # Date: 3rd February 2009 # Author: James Mills, prologic at shortcircuit dot net dot au """Events This module implements the necessary Events needed. """ from circuits import Event class Request(Event): """Request(Event) -> Request Event args: request, response """ succes...
# Module: events # Date: 3rd February 2009 # Author: James Mills, prologic at shortcircuit dot net dot au """Events This module implements the necessary Events needed. """ from circuits import Event class Request(Event): """Request(Event) -> Request Event args: request, response """ succes...
mit
Python
a487dedab855b0efc686c530b5950d3998824134
optimize csvmanager, you can read special coloumns
ckaus/EpiPy
src/utils/csvmanager.py
src/utils/csvmanager.py
# -*- coding: utf-8 -*- import os.path import csv import logger current_dir = os.path.abspath(os.path.dirname(__file__)) resources_dir = os.path.abspath(current_dir + "/../../resources/data") def read(file_name, seperator=";", col=[]): """ This function reads a csv file. :param file_name: a file name :param t...
# -*- coding: utf-8 -*- import os.path import csv import logger current_dir = os.path.abspath(os.path.dirname(__file__)) resources_dir = os.path.abspath(current_dir + "/../../resources") def read(file_name, seperator=";"): """ This function reads a csv file. :param file_name: a file name :param type: str :...
mit
Python
fc78f6227a1f0aaeea18bafa7f995874ff9d8657
work in progress cause my computer is acting up and I don't want to lose this
project-em/ns3-sentiment
stance/dueling_lstms.py
stance/dueling_lstms.py
from keras.datasets import imdb from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from keras.layers.embeddings import Embedding from keras.preprocessing import sequence from article_utils import read_data_file import glob import numpy as np from nltk.tokenize import wordpu...
from keras.datasets import imdb from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from keras.layers.embeddings import Embedding from keras.preprocessing import sequence from data_util import load_data from article_utils import read_data_file import numpy as np def train(...
mit
Python
8f7e3f1c540e01cc476d16d4c6c3c4c5e65b5be2
fix default gravatar url (identicon)
LearnProgramming/lpmc-site,LearnProgramming/lpmc-site,LearnProgramming/lpmc-site
github.py
github.py
import config import hashlib import urllib.parse import tornado.auth import tornado.escape import tornado.gen import tornado.httpclient import tornado.httputil class GithubMixin(tornado.auth.OAuth2Mixin): _OAUTH_AUTHORIZE_URL = 'https://github.com/login/oauth/authorize' _OAUTH_ACCESS_TOKEN_URL = 'https://github.co...
import config import hashlib import urllib.parse import tornado.auth import tornado.escape import tornado.gen import tornado.httpclient import tornado.httputil class GithubMixin(tornado.auth.OAuth2Mixin): _OAUTH_AUTHORIZE_URL = 'https://github.com/login/oauth/authorize' _OAUTH_ACCESS_TOKEN_URL = 'https://github.co...
mit
Python
52a224aacdb65e032b6c22f0c5ee93e3d6a12dfe
add more not_title_tokens
thongdong7/subfind,thongdong7/subfind,thongdong7/subfind,thongdong7/subfind
subfind/movie_parser.py
subfind/movie_parser.py
import re from subfind.exception import MovieNotFound from subfind.tokenizer import tokenizer movie_extensions = ['mp4', 'mkv'] movie_file_pattern = re.compile('^(.+)\.\w+$') not_title_tokens = set(['x264', '1080p', '1080', '1080i', '720p', 'hdrip', 'hdtv']) year_pattern = re.compile('^(19\d{2}|201\d)$') movie_title_...
import re from subfind.exception import MovieNotFound from subfind.tokenizer import tokenizer movie_extensions = ['mp4', 'mkv'] movie_file_pattern = re.compile('^(.+)\.\w+$') not_title_tokens = set(['x264', '1080p', '1080', 'hdrip']) year_pattern = re.compile('^(19\d{2}|201\d)$') movie_title_year_pattern = re.compile...
mit
Python