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
4d79d49eb6e542f43636c6232c98953ffc1b28d3
clean up stitcher script
360ls/desktop,360ls/desktop,360ls/desktop
app/services/stitcher.py
app/services/stitcher.py
#!/usr/bin/env python """ Script for streaming a camera feed """ import sys import signal import argparse import subprocess try: import cv2 except: raise Exception('OpenCV is not installed') def parse_args(): """ Parses command line arguments """ parser = argparse.ArgumentParser() parser...
#!/usr/bin/env python import sys import signal, os import argparse import subprocess try: import cv2 except: raise Exception('OpenCV is not installed') def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-f', default='') parser.add_argument('-i', type=int, default=0) par...
mit
Python
54682633b6312cb942d819be9c02beb2b5ad7bef
Add edit-entry, single-entry, new_entry.
steventhan/learning-journal,steventhan/learning-journal,steventhan/learning-journal
learning_journal/learning_journal/views.py
learning_journal/learning_journal/views.py
from pyramid.response import Response import os HERE = os.path.dirname(__file__) def home_page(request): imported_text = open(os.path.join(HERE + '/static/', 'index.html')).read() return Response(imported_text) def view_entry(request): imported_text = open(os.path.join(HERE + '/static/', 'single-entry...
from pyramid.response import Response import os HERE = os.path.dirname(__file__) def home_page(request): imported_text = open(os.path.join(HERE + '/static/', 'index.html')).read() return Response(imported_text) def includeme(config): config.add_view(home_page, route_name='home')
mit
Python
0b11bf48989673245adbc89aa6f65c85debafd9f
Make sure billing/shipping aren't populated if they aren't there
armstrong/armstrong.apps.donations,armstrong/armstrong.apps.donations
armstrong/apps/donations/backends.py
armstrong/apps/donations/backends.py
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
from armstrong.utils.backends import GenericBackend from billing import get_gateway from . import forms class AuthorizeNetBackend(object): def get_form_class(self): return forms.CreditCardDonationForm def purchase(self, donation, form): authorize = get_gateway("authorize_net") author...
apache-2.0
Python
5efddf26176ac778556a3568bf97c2e70daac866
Replace many double quotes with single quotes
samjabrahams/anchorhub
anchorhub/settings/default_settings.py
anchorhub/settings/default_settings.py
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = "{ }" INPUT = "." OUTPUT = "out-anchorhub" ARGPARSER = { "description": "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { "help": "Path of directory tree to b...
apache-2.0
Python
0ac45656e3b76564d1e1752dd16ae91cfc918134
Set room maximum capacity
andela-bmwenda/amity-cp1
app/room.py
app/room.py
class Room(object): """Room class that creates rooms in amity """ def __init__(self, room_name, room_type, capacity, occupants): self.room_name = room_name self.room_type = room_type self.capacity = capacity self.occupants = [] class LivingSpace(Room): """Creates livi...
class Room(object): """Room class that creates rooms in amity """ def __init__(self, room_name, room_type, capacity, occupants): self.room_name = room_name self.room_type = room_type self.capacity = capacity self.occupants = [] class LivingSpace(Room): """Creates livi...
mit
Python
e3a84c3ccadb98ecb5dae563475de5108d46cf9d
Format external_plugin_dependencies.bzl with buildifier
GerritCodeReview/plugins_quota,GerritCodeReview/plugins_quota,GerritCodeReview/plugins_quota
external_plugin_deps.bzl
external_plugin_deps.bzl
load("//tools/bzl:maven_jar.bzl", "maven_jar") def external_plugin_deps(): maven_jar( name = "mockito", artifact = "org.mockito:mockito-core:2.15.0", sha1 = "b84bfbbc29cd22c9529409627af6ea2897f4fa85", deps = [ "@byte_buddy//jar", "@byte_buddy_agent//jar", ...
load("//tools/bzl:maven_jar.bzl", "maven_jar") def external_plugin_deps(): maven_jar( name = "mockito", artifact = "org.mockito:mockito-core:2.15.0", sha1 = "b84bfbbc29cd22c9529409627af6ea2897f4fa85", deps = [ "@byte_buddy//jar", "@byte_buddy_agent//jar", "@objenesis//jar", ], ...
apache-2.0
Python
0a902a5afd43fe817320bd1e400828abcd1faa83
make su promt AIX compatible
thaim/ansible,thaim/ansible
lib/ansible/utils/su_prompts.py
lib/ansible/utils/su_prompts.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
mit
Python
f41714fb34c82d523b212f0a4301757969598373
Simplify correct function.
pinireznik/antitude,pinireznik/antitude,pinireznik/antitude,pinireznik/antitude
agents/serf/scripts/AgentEventHandler.py
agents/serf/scripts/AgentEventHandler.py
#!/usr/bin/python import re import os import SerfCID class AgentEventHandler: def __init__(self, payload="", CID="", envVarGetter=""): self.payload = payload self.CID = CID self.TARGET_STRING = "TARGET" self.TARGET_ALL_STRING = self.TARGET_STRING + "=ALL" self.envVarGetter ...
#!/usr/bin/python import re import os import SerfCID class AgentEventHandler: def __init__ (self, payload="", CID="", envVarGetter=""): self.payload = payload self.CID = CID self.TARGET_STRING = "TARGET" self.TARGET_ALL_STRING = self.TARGET_STRING + "=ALL" self.envVarGetter = envVarGetter def getPaylo...
apache-2.0
Python
502ffa8fe93e0066f3553039493ef8b552069141
Add KDumpConf shared mapper.
RedHatInsights/insights-core,RedHatInsights/insights-core
falafel/mappers/kdump.py
falafel/mappers/kdump.py
import re from falafel.core import computed, MapperOutput from falafel.core.plugins import mapper @mapper("cmdline") def crashkernel_enabled(context): """ Determine if kernel is configured to reserve memory for the crashkernel """ for line in context.content: if 'crashkernel' in line: ...
import re from falafel.core.plugins import mapper @mapper("cmdline") def crashkernel_enabled(context): """ Determine if kernel is configured to reserve memory for the crashkernel """ for line in context.content: if 'crashkernel' in line: return True @mapper("systemctl_list-unit-...
apache-2.0
Python
4bce4da138c4dc8060e11451eb21fb2f7c0891f5
Fix issue #1: Runserver failed when having callback function in root URLconf
zniper/django-quickadmin
quickadmin/register.py
quickadmin/register.py
from django.contrib import admin from django.utils.module_loading import import_module from django.db.models import get_models from django.conf import settings from django.conf.urls import include, url from django.utils.log import getLogger from .config import QADMIN_DEFAULT_EXCLUDES, USE_APPCONFIG logger = getLogg...
from django.contrib import admin from django.utils.module_loading import import_module from django.db.models import get_models from django.conf import settings from django.conf.urls import include, url from django.utils.log import getLogger from .config import QADMIN_DEFAULT_EXCLUDES, USE_APPCONFIG logger = getLogg...
mit
Python
ff90958a0c79936d5056840ba03a5863bcdef099
Mark as test as "todo" for now.
emgee/formal,emgee/formal,emgee/formal
formal/test/test_util.py
formal/test/test_util.py
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
from twisted.trial import unittest from formal import util class TestUtil(unittest.TestCase): def test_validIdentifier(self): self.assertEquals(util.validIdentifier('foo'), True) self.assertEquals(util.validIdentifier('_foo'), True) self.assertEquals(util.validIdentifier('_foo_'), True) ...
mit
Python
2e7271a33e098d7cdef15207e8caa05e644c3223
Use full URI for build failure reasons
bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes
changes/buildfailures/testfailure.py
changes/buildfailures/testfailure.py
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure from changes.utils.http import build_uri class TestFailure(BuildFailure): def get_html_label(self, build): link = build_uri('/projects/{0}/builds/{1}/tests/?result=failed'.format(build.pr...
from __future__ import absolute_import from jinja2 import Markup from changes.buildfailures.base import BuildFailure class TestFailure(BuildFailure): def get_html_label(self, build): link = '/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex) try: ...
apache-2.0
Python
4c303007d6418e2a2f1b2e1778d6b7d0c0573c74
Raise read-only fs on touch
bussiere/gitfs,PressLabs/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs,rowhit/gitfs
gitfs/views/read_only.py
gitfs/views/read_only.py
from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): raise...
import os from errno import EROFS from fuse import FuseOSError from gitfs import FuseMethodNotImplemented from .view import View class ReadOnlyView(View): def getxattr(self, path, fh): raise FuseMethodNotImplemented def open(self, path, flags): return 0 def create(self, path, fh): ...
apache-2.0
Python
7c3a164b74f345be07843482728b2e0b33a927bc
bump minor version
swistakm/graceful
src/graceful/__init__.py
src/graceful/__init__.py
# -*- coding: utf-8 -*- VERSION = (0, 1, 0) # PEP 386 # noqa __version__ = ".".join([str(x) for x in VERSION]) # noqa """ Minimalist framework for self-descriptive RESTful APIs build on top of falcon. It is inspired by Django REST Framework package. Mostly by how object serialization is done but more emphasis is p...
# -*- coding: utf-8 -*- VERSION = (0, 0, 4) # PEP 386 # noqa __version__ = ".".join([str(x) for x in VERSION]) # noqa """ Minimalist framework for self-descriptive RESTful APIs build on top of falcon. It is inspired by Django REST Framework package. Mostly by how object serialization is done but more emphasis is p...
bsd-3-clause
Python
9b5d2929f58a3155edc5f03a3cca14ff25356021
Remove pidfile in Container.kill()
ianpreston/cask,ianpreston/cask
src/libcask/container.py
src/libcask/container.py
import os import os.path import time import signal import subprocess import libcask.attach class Container(object): def __init__( self, name, root_path, pid_path, hostname, ipaddr, ipaddr_host, entry_point, ): # Human-readable name for t...
import os import os.path import time import signal import subprocess import libcask.attach class Container(object): def __init__( self, name, root_path, pid_path, hostname, ipaddr, ipaddr_host, entry_point, ): # Human-readable name for t...
mit
Python
6f61215263cfe02dc50e508514d1d23208e46d92
Allow modules context processor works without request.user Fix #524
viewflow/django-material,viewflow/django-material,viewflow/django-material
material/frontend/context_processors.py
material/frontend/context_processors.py
from . import modules as modules_registry def modules(request): """Add current module and modules list to the template context.""" module = None if request.resolver_match: module = getattr(request.resolver_match.url_name, 'module', None) return { 'modules': modules_registry.available...
from . import modules as modules_registry def modules(request): """Add current module and modules list to the template context.""" if not hasattr(request, 'user'): raise ValueError('modules context processor requires "django.contrib.auth.context_processors.auth"' 'to be in TEM...
bsd-3-clause
Python
0d8c30e58d8b53f90f9318cdf3db26ed1e272602
Fix pep8 violation.
CredoReference/edx-platform,Stanford-Online/edx-platform,edx/edx-platform,a-parhom/edx-platform,Stanford-Online/edx-platform,mitocw/edx-platform,Edraak/edraak-platform,Stanford-Online/edx-platform,angelapper/edx-platform,cpennington/edx-platform,edx/edx-platform,philanthropy-u/edx-platform,eduNEXT/edunext-platform,Edra...
lms/envs/static.py
lms/envs/static.py
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
agpl-3.0
Python
1af17b029cef4c3a197fd3a4813fc704cb277e59
use the correct name
geometalab/drf-utm-zone-info,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx,geometalab/osmaxx,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend
osmaxx-py/osmaxx/excerptexport/urls.py
osmaxx-py/osmaxx/excerptexport/urls.py
from django.conf.urls import url from django.contrib.auth.views import login, logout from django.views.generic import TemplateView from osmaxx.excerptexport.views import ( list_downloads, download_file, extraction_order_status, list_orders, NewExtractionOrderView, access_denied, ) excerpt_exp...
from django.conf.urls import url from django.contrib.auth.views import login, logout from django.views.generic import TemplateView from osmaxx.excerptexport.views import ( list_downloads, download_file, extraction_order_status, list_orders, NewExtractionOrderView, access_denied, ) except_expo...
isc
Python
dda9b7576269f7dfc7ca864da33f6b047228e667
remove armeabi and mips targets
Akaaba/pdraw,Akaaba/pdraw,Akaaba/pdraw,Akaaba/pdraw
config/buildcfg.py
config/buildcfg.py
import sys, os import dragon import apps_tools.android as android import apps_tools.ios as ios android_pdraw_dir = os.path.join(dragon.WORKSPACE_DIR, "packages", "pdraw") android_jni_dir = os.path.join(android_pdraw_dir, "libpdraw", "android", "jni") android_app_dir = os.path.join(android_pdraw_dir, "apps...
import sys, os import dragon import apps_tools.android as android import apps_tools.ios as ios android_pdraw_dir = os.path.join(dragon.WORKSPACE_DIR, "packages", "pdraw") android_jni_dir = os.path.join(android_pdraw_dir, "libpdraw", "android", "jni") android_app_dir = os.path.join(android_pdraw_dir, "apps...
bsd-3-clause
Python
b46cf3c17afb7300d7a72725e70650c59a1e67ad
Update fun.py
DNAGamer/Helix3
code/fun.py
code/fun.py
import asyncio import discord from discord.ext import commands class Fun: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, no_pm=True) async def ping(message): if message.content.startswith('!ping'): return await my_bot.say("Hello, world!")
import asyncio import discord from discord.ext import commands class Fun: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, no_pm=True) async def ping(message): if message.content.startswith('!ping'): await client.send_message(message.chann...
mit
Python
a307c5fc2555d282dfa6193cdbcfb2d15e185c0c
Allow query without table to run
lebinh/aq
aq/parsers.py
aq/parsers.py
import collections from collections import namedtuple from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectPa...
from collections import namedtuple import collections from six import string_types from aq.errors import QueryParsingError from aq.select_parser import select_stmt, ParseException TableId = namedtuple('TableId', ('database', 'table', 'alias')) QueryMetadata = namedtuple('QueryMetadata', ('tables',)) class SelectP...
mit
Python
f48c0b25556c3ea89dcb3bd4c4d9608730689be8
Make sure www.example.test is checked.
adelton/webauthinfra,adelton/webauthinfra,adelton/webauthinfra,adelton/webauthinfra
src/test-saml.py
src/test-saml.py
#!/usr/bin/python3 from sys import argv from xvfbwrapper import Xvfb from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions print("Admin password " + argv[1]) with Xvfb() as xvfb: driver = webdriver.Firefox(log_path = "/tmp/...
#!/usr/bin/python3 from sys import argv from xvfbwrapper import Xvfb from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions print("Admin password " + argv[1]) with Xvfb() as xvfb: driver = webdriver.Firefox(log_path = "/tmp/...
apache-2.0
Python
0bbfcaabcee591ca19702ec071d711ac411597fd
Increment version to 0.2.4
approvals/ApprovalTests.Python,approvals/ApprovalTests.Python,tdpreece/ApprovalTests.Python,approvals/ApprovalTests.Python
approvaltests/version.py
approvaltests/version.py
version_number = "0.2.4"
version_number = "0.2.3"
apache-2.0
Python
1eda7cfbda31ab7b39182e4a2fdacf8bfcf147a2
Update __init__.py
williamFalcon/pytorch-lightning,williamFalcon/pytorch-lightning
pytorch_lightning/__init__.py
pytorch_lightning/__init__.py
"""Root package info.""" __version__ = '0.10.0rc1' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string,...
"""Root package info.""" __version__ = '0.9.1rc4' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string, ...
apache-2.0
Python
d24cf56d0ad2e8388eb931b10c170df86870c5b0
Update __init__.py (#4308)
williamFalcon/pytorch-lightning,williamFalcon/pytorch-lightning
pytorch_lightning/__init__.py
pytorch_lightning/__init__.py
"""Root package info.""" __version__ = '1.0.4rc0' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string, ...
"""Root package info.""" __version__ = '1.0.3' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string, see...
apache-2.0
Python
7523ff90cadcefe3d51682d3301f7ceb51c70ced
Revert "Corrige a resolução"
dvl/raspberry-pi_timelapse,dvl/raspberry-pi_timelapse
timelapse.py
timelapse.py
import os import datetime import time import picamera from PIL import Image, ImageStat, ImageFont, ImageDraw with picamera.PiCamera() as camera: camera.resolution = (1024, 768) camera.rotation = 180 time.sleep(2) # camera warm-up time for filename in camera.capture_continuous('images/img_{timesta...
import os import datetime import time import picamera from PIL import Image, ImageStat, ImageFont, ImageDraw with picamera.PiCamera() as camera: camera.resolution = (1024, 728) camera.rotation = 180 time.sleep(2) # camera warm-up time for filename in camera.capture_continuous('images/img_{timesta...
mit
Python
60f89131b8f18046e4504b20c64f95cb3b30085a
Make sure we allow https flv files
wevoice/wesub,norayr/unisubs,norayr/unisubs,ofer43211/unisubs,ujdhesa/unisubs,eloquence/unisubs,ofer43211/unisubs,pculture/unisubs,pculture/unisubs,eloquence/unisubs,ofer43211/unisubs,ReachingOut/unisubs,norayr/unisubs,wevoice/wesub,ReachingOut/unisubs,ReachingOut/unisubs,ReachingOut/unisubs,eloquence/unisubs,eloquence...
apps/videos/types/flv.py
apps/videos/types/flv.py
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
agpl-3.0
Python
b856016182a9a0c97ccb5e6593aa16f3a269bf79
fix ToDoList class method add_todo to pass non_boolean test
davidnjakai/bc-8-todo-console-application
todo_list.py
todo_list.py
import todo_item class ToDoList(object): def __init__(self, name, description, todo_items): self.name = name self.description = description self.todo_items = todo_items def add_todo(self, content, complete = False, *args): if type(complete) != type(True): self.complete = False return item = todo_item...
import todo_item class ToDoList(object): def __init__(self, name, description, todo_items): self.name = name self.description = description self.todo_items = todo_items def add_todo(self, content, complete = False, *args): item = todo_item.ToDoItem(content, complete, *args) self.todo_items.append(item) d...
mit
Python
c000dd1d0940b47c13761bb09e0cb50a2adc6a2e
Handle token_endpoint auth type in osc plugin
openstack/python-heatclient
heatclient/osc/plugin.py
heatclient/osc/plugin.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 # distrib...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
apache-2.0
Python
ab365a6fdf39feed6f529a4a5170c2d9f674b706
fix unicode issue
nojhan/weboob-devel,laurent-george/weboob,yannrouillard/weboob,RouxRC/weboob,Konubinix/weboob,Boussadia/weboob,sputnick-dev/weboob,Boussadia/weboob,willprice/weboob,willprice/weboob,nojhan/weboob-devel,RouxRC/weboob,laurent-george/weboob,sputnick-dev/weboob,eirmag/weboob,eirmag/weboob,eirmag/weboob,sputnick-dev/weboob,...
weboob/backends/orange/pages/compose.py
weboob/backends/orange/pages/compose.py
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
agpl-3.0
Python
ca327b35c2e45329962da0dc04cfe2354ffd8b35
add lcm gl support to testDrakeVisualizer.py
gizatt/director,rdeits/director,empireryan/director,RobotLocomotion/director,edowson/director,openhumanoids/director,openhumanoids/director,mithrandir123/director,manuelli/director,RobotLocomotion/director,edowson/director,empireryan/director,mitdrc/director,empireryan/director,RussTedrake/director,gizatt/director,rdei...
src/python/tests/testDrakeVisualizer.py
src/python/tests/testDrakeVisualizer.py
from ddapp.consoleapp import ConsoleApp from ddapp.screengrabberpanel import ScreenGrabberPanel from ddapp.drakevisualizer import DrakeVisualizer from ddapp.lcmgl import LCMGLManager from ddapp import objectmodel as om from ddapp import applogic from PythonQt import QtCore, QtGui class DrakeVisualizerApp(ConsoleApp)...
from ddapp.consoleapp import ConsoleApp from ddapp.screengrabberpanel import ScreenGrabberPanel from ddapp.drakevisualizer import DrakeVisualizer from ddapp import objectmodel as om from ddapp import applogic from PythonQt import QtCore, QtGui class DrakeVisualizerApp(ConsoleApp): def __init__(self): C...
bsd-3-clause
Python
38939635530223ef7d736c19c9c2d666c67baca4
fix file format generated by ffhlwiki.py
FreiFunkMuenster/ffmap-backend,freifunk-mwu/ffmap-backend,FreifunkBremen/ffmap-backend,FreifunkJena/ffmap-backend,ffac/ffmap-backend,FreifunkBremen/ffmap-backend,ff-kbu/ffmap-backend,freifunkhamburg/ffmap-backend,FreiFunkMuenster/ffmap-backend,freifunk-kiel/ffmap-backend,rubo77/ffmap-backend,freifunk-mwu/ffmap-backend,...
ffhlwiki.py
ffhlwiki.py
#!/usr/bin/env python3 import json import argparse from itertools import zip_longest from urllib.request import urlopen from bs4 import BeautifulSoup def import_wikigps(url): def fetch_wikitable(url): f = urlopen(url) soup = BeautifulSoup(f) table = soup.find_all("table")[0] rows = table.find_all...
#!/usr/bin/env python3 import json import argparse from itertools import zip_longest from urllib.request import urlopen from bs4 import BeautifulSoup def import_wikigps(url): def fetch_wikitable(url): f = urlopen(url) soup = BeautifulSoup(f) table = soup.find_all("table")[0] rows = table.find_all...
bsd-3-clause
Python
47c76074e010107fb3bfe3fc0f74482058efac50
Add support for constructor keyword arguments (i.e. pass them through to FilesystemCollection).
kirkeby/sheared
src/sheared/web/collections/entwined.py
src/sheared/web/collections/entwined.py
# # Sheared -- non-blocking network programming library for Python # Copyright (C) 2003 Sune Kirkeby <sune@mel.interspace.dk> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2...
# # Sheared -- non-blocking network programming library for Python # Copyright (C) 2003 Sune Kirkeby <sune@mel.interspace.dk> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2...
mit
Python
6fcce1bcecb15000c671c706588d6fd0d92145e5
Add windbg info to header
snare/voltron,snare/voltron,snare/voltron,snare/voltron
voltron/entry.py
voltron/entry.py
""" This is the main entry point for Voltron from the debugger host's perspective. This file is loaded into the debugger through whatever means the given host supports. LLDB: (lldb) command script import /path/to/voltron/entry.py GDB: (gdb) source /path/to/voltron/entry.py VDB: (vdb) script /path/to/v...
""" This is the main entry point for Voltron from the debugger host's perspective. This file is loaded into the debugger through whatever means the given host supports. In LLDB: (lldb) command script import /path/to/voltron/entry.py In GDB: (gdb) source /path/to/voltron/entry.py In VDB: (vdb) script /...
mit
Python
6aadcd9739e6cbee01164fccae56a37f6130455c
Add CLI for yatsm map; TODO port script
valpasq/yatsm,valpasq/yatsm,c11/yatsm,c11/yatsm,ceholden/yatsm,ceholden/yatsm
yatsm/cli/map.py
yatsm/cli/map.py
""" Command line interface for creating maps of YATSM algorithm output """ import datetime as dt import logging import os import re import click import numpy as np from osgeo import gdal import patsy from yatsm.cli.cli import (cli, date_arg, date_format_opt, rootdir_opt, resultdir_opt, exam...
""" Command line interface for creating maps of YATSM algorithm output """ from datetime import datetime as dt import logging import os import click import numpy as np from yatsm.cli.cli import cli logger = logging.getLogger('yatsm') @cli.command(short_help='Make map of YATSM output for a given date') @click.pass...
mit
Python
3275827ef5578142e07747f9feacc4f47fc22006
Update factorial.py
mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-inter...
problems/factorial/factorial.py
problems/factorial/factorial.py
# Recursive factorial def fac(n): return 1 if n == 1 else n * fac(n-1) print(fac(3)) # 6 print(fac(33)) # 8683317618811886495518194401280000000 # Iterative factorial def fac(n): res = i = 1 while i <= n: res *= i i += 1 return res print(fac(3)) # 6 print(fac(33)) # 86833176188118864...
def fac(n): return 1 if n == 1 else n * fac(n-1) print fac(3) print fac(33)
mit
Python
b250cfacdb45d85bf6ef7f0a1f28b89935c24b9b
Update settings.py
shivamsupr/django-jinja2-globals
project-name/my_app/settings.py
project-name/my_app/settings.py
# Snippets from Actual Settings.py TEMPLATES = [ { 'BACKEND': 'django_jinja.backend.Jinja2', "DIRS": ["PROJECT_ROOT_DIRECTORY", "..."], 'APP_DIRS': True, 'OPTIONS': { 'match_extension': '.html', 'context_processors': [ 'django.template.context...
# Snippets from Actual Settings.py TEMPLATES = [ { 'BACKEND': 'django_jinja.backend.Jinja2', "DIRS": "PROJECT_ROOT_DIRECTORY", 'APP_DIRS': True, 'OPTIONS': { 'match_extension': '.html', 'context_processors': [ 'django.template.context_processo...
mit
Python
94e85fb24a9b2c327094b880e05251ffb00c1335
Add urls for list by topic and by location
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
bills/urls.py
bills/urls.py
from . import views from django.conf.urls import url urlpatterns = [ url(r'^by_topic/', views.bill_list_by_topic), url(r'^by_location', views.bill_list_by_location), url(r'^latest_activity/', views.latest_bill_activity), url(r'^latest/', views.latest_bill_actions), url(r'^detail/(?P<bill_id>(.*))/...
from . import views from django.conf.urls import url urlpatterns = [ url(r'^list/', views.bill_list), url(r'^latest_activity/', views.latest_bill_activity), url(r'^latest/', views.latest_bill_actions), url(r'^detail/(?P<bill_id>(.*))/$', views.bill_detail, name='bill_detail'), ]
mit
Python
1bc7937bf0c4c65996e586aef997250869bf5ed1
Use python from env.
AtomLinter/linter-pylama
bin/pylama.py
bin/pylama.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import sys import os from pylama.main import shell if __name__ == '__main__': try: virtual_env = os.environ.get('VIRTUAL_ENV', '') activate_this = os.path.join(virtual_env, 'bin', 'activate_this.py') with open(activate_this) as f: ...
#!/usr/bin/python # -*- coding: utf-8 -*- import re import sys import os from pylama.main import shell if __name__ == '__main__': try: virtual_env = os.environ.get('VIRTUAL_ENV', '') activate_this = os.path.join(virtual_env, 'bin', 'activate_this.py') with open(activate_this) as f: ...
mit
Python
b2bc2f50c9866e758c242a6c8b57a86153cc418a
bump version
vmalloc/confetti,Infinidat/infi.conf
infi/conf/__version__.py
infi/conf/__version__.py
__version__ = "0.0.11"
__version__ = "0.0.10"
bsd-3-clause
Python
583a6319230b89a5f19c26e5bab83e28a5a4792e
Fix the but There is an error (cannot concatenate str and int objects) when the user does not specify the inputs.
ricardogsilva/PyWPS,jonas-eberle/pywps,geopython/pywps,ldesousa/PyWPS,bird-house/PyWPS,jachym/PyWPS,tomkralidis/pywps
pywps/processes/dummyprocess.py
pywps/processes/dummyprocess.py
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.jesus@gmail.com) as suggested by Kor de Jong """ from pywps.Process import WPSProcess import types class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, ...
""" DummyProcess to check the WPS structure Author: Jorge de Jesus (jorge.de-jesus@jrc.it) as suggested by Kor de Jong """ from pywps.Process import WPSProcess class Process(WPSProcess): def __init__(self): # init process WPSProcess.__init__(self, i...
mit
Python
cc7ffbe88b7b71b32e036be6080f03a353fdbafe
Revert to using get_task_logger
caktus/rapidsms,peterayeni/rapidsms,ehealthafrica-ci/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,caktus/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,caktus/rapidsms,peterayeni/rapidsms,catalpainternational/rapidsms,eHealthAfrica/rapidsms,ehealthafrica-ci/rapidsms,eHealthAfrica/rapidsms,eHealthAfrica...
rapidsms/router/celery/tasks.py
rapidsms/router/celery/tasks.py
import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Co...
import celery import logging from rapidsms.errors import MessageSendingError logger = logging.getLogger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Connection from rapidsms.r...
bsd-3-clause
Python
83f2fe37c6eda993d6b9e2cf2d187646a366f6d8
Make timer daemon
ollien/playserver,ollien/playserver,ollien/playserver
playserver/trackchecker.py
playserver/trackchecker.py
from threading import Timer from . import track _listeners = [] class TrackChecker(): def __init__(self, interval = 5): self.listeners = [] self.CHECK_INTERVAL = interval self.currentSong = "" self.currentArtist = "" self.currentAlbum = "" self.timer = None def checkSong(self): song = track.getCurren...
from threading import Timer from . import track _listeners = [] class TrackChecker(): def __init__(self, interval = 5): self.listeners = [] self.CHECK_INTERVAL = interval self.currentSong = "" self.currentArtist = "" self.currentAlbum = "" self.timer = None def checkSong(self): song = track.getCurren...
mit
Python
0d3082f46f0ffccaca10d3f53f22e6403783d874
change the range of the mean transmittance plot.
yishayv/lyacorr,yishayv/lyacorr
plot_mean_transmittance.py
plot_mean_transmittance.py
import matplotlib.pyplot as plt import common_settings import mean_flux lya_center = 1215.67 settings = common_settings.Settings() m = mean_flux.MeanFlux.from_file(settings.get_mean_transmittance_npy()) fig = plt.figure() ax1 = fig.add_subplot(2, 1, 1) ax2 = ax1.twiny() ax1.plot(m.ar_z, m.get_weighted_mean()) # pl...
import matplotlib.pyplot as plt import common_settings import mean_flux lya_center = 1215.67 settings = common_settings.Settings() m = mean_flux.MeanFlux.from_file(settings.get_mean_transmittance_npy()) fig = plt.figure() ax1 = fig.add_subplot(2, 1, 1) ax2 = ax1.twiny() ax1.plot(m.ar_z, m.get_weighted_mean()) # pl...
mit
Python
7e8f8b7ba96ade849eaed239751ef3d00c57d0bd
Update plots_digits_classification.py
tomlof/scikit-learn,altairpearl/scikit-learn,hlin117/scikit-learn,MatthieuBizien/scikit-learn,waterponey/scikit-learn,hlin117/scikit-learn,mikebenfield/scikit-learn,meduz/scikit-learn,aflaxman/scikit-learn,btabibian/scikit-learn,nikitasingh981/scikit-learn,shyamalschandra/scikit-learn,Sentient07/scikit-learn,YinongLong...
examples/classification/plot_digits_classification.py
examples/classification/plot_digits_classification.py
""" ================================ Recognizing hand-written digits ================================ An example showing how the scikit-learn can be used to recognize images of hand-written digits. This example is commented in the :ref:`tutorial section of the user manual <introduction>`. """ print(__doc__) # Autho...
""" ================================ Recognizing hand-written digits ================================ An example showing how the scikit-learn can be used to recognize images of hand-written digits. This example is commented in the :ref:`tutorial section of the user manual <introduction>`. """ print(__doc__) # Autho...
bsd-3-clause
Python
746eace7e4677b034743b25e0f8d53aabd07dd5c
Fix bugs?
matthewbentley/autopoke
autopoke.py
autopoke.py
#!/bin/env python from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException from time import sleep from getpass import getpass if __name__ == '__main__': driver = webdriver.phantomjs.webdriver.WebDriver() driver.get('https://facebook.com') driver.find_element_by_...
#!/bin/env python from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException from time import sleep from getpass import getpass if __name__ == '__main__': driver = webdriver.phantomjs.webdriver.WebDriver() driver.get('https://facebook.com') driver.find_element_by_...
mit
Python
d9fb8d20948e76d4df176d083e4284d3c99258ca
return int index for userid's in the Netflix dataset
Evfro/polara
polara/datasets/netflix.py
polara/datasets/netflix.py
import pandas as pd import tarfile def get_netflix_data(gz_file): movie_data = [] movie_inds = [] with tarfile.open(gz_file) as tar: training_data = tar.getmember('download/training_set.tar') with tarfile.open(fileobj=tar.extractfile(training_data)) as inner: for item in inner....
import pandas as pd import tarfile def get_netflix_data(gz_file): movie_data = [] movie_name = [] with tarfile.open(gz_file) as tar: training_data = tar.getmember('download/training_set.tar') with tarfile.open(fileobj=tar.extractfile(training_data)) as inner: for item in inner....
mit
Python
5e4b661c446ad3fc9d27e55c7b0cfc9b17e4d8f9
add comment
PythonZone/PyAlaOCL,megaplanet/PyAlaOCL
pyalaocl/useocl/state.py
pyalaocl/useocl/state.py
# coding=utf-8 """ Simple metamodel for object states. Contains definitions for: - State, - Object, - Link, - LinkObject. """ from collections import OrderedDict class State(object): def __init__(self): self.objects = OrderedDict() self.links = OrderedDict() self.linkObject = OrderedDict...
# coding=utf-8 from collections import OrderedDict class State(object): def __init__(self): self.objects = OrderedDict() self.links = OrderedDict() self.linkObject = OrderedDict() class StateElement(object): def __init__(self, state): self.state = state class Object(StateE...
mit
Python
c824120ea5a33d3ee4cebc61b5bdf6b8258cf11f
remove set_printoptions call from debugging
HIPS/autograd,barak/autograd,hips/autograd,HIPS/autograd,kcarnold/autograd,hips/autograd
autograd/scipy/linalg.py
autograd/scipy/linalg.py
from __future__ import division import scipy.linalg import autograd.numpy as anp from autograd.numpy.numpy_wrapper import wrap_namespace from autograd.numpy.linalg import atleast_2d_col as al2d wrap_namespace(scipy.linalg.__dict__, globals()) # populates module namespace def _flip(a, trans): if anp.iscomplexob...
from __future__ import division import scipy.linalg import autograd.numpy as anp from autograd.numpy.numpy_wrapper import wrap_namespace from autograd.numpy.linalg import atleast_2d_col as al2d anp.set_printoptions(precision=3) wrap_namespace(scipy.linalg.__dict__, globals()) # populates module namespace def _fli...
mit
Python
5dd8c7d2f14e6323655ca9eb879597ab8b2b0ec4
Fix battery voltage calculation
chrisb2/gate-alarm
gate_app.py
gate_app.py
from utime import sleep_ms, sleep import webrepl from mqtt import MQTTClient from machine import Pin, ADC, PWM import secrets # Pin constants LED1 = 16 # GPIO16, D0, Nodemcu led LED2 = 2 # GPIO2, D4, ESP8266 led SWITCH = 5 # GPIO5, D1 BATTERY = 0 # ADC0, A0 BUZZER = 14 # GPIO14, D5 # Resistors in voltage d...
from utime import sleep_ms, sleep import webrepl from mqtt import MQTTClient from machine import Pin, ADC, PWM import secrets # Pin constants LED1 = 16 # GPIO16, D0, Nodemcu led LED2 = 2 # GPIO2, D4, ESP8266 led SWITCH = 5 # GPIO5, D1 BATTERY = 0 # ADC0, A0 BUZZER = 14 # GPIO14, D5 # Resistors in voltage d...
mit
Python
0a89c9e32e625e53cbe5ea151aff42031fb833a5
Add canonical link
yashodhank/frappe,StrellaGroup/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,mhbu50/frappe,almeidapaulopt/frappe,yashodhank/frappe,frappe/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,mhbu50/frappe,yashodhank/frappe,yashodhank/frappe,mhbu50/frappe,mhbu50/frappe,frappe/frappe,almeidapaulopt/frappe,frappe/frappe
frappe/website/page_controllers/base_template_page.py
frappe/website/page_controllers/base_template_page.py
import frappe from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.page_controllers.web_page import WebPage from frappe.website.website_components.metatags import MetaTags class BaseTemplatePage(WebPage): def init_context(self): self.context = frappe._dict()...
import frappe from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.page_controllers.web_page import WebPage from frappe.website.website_components.metatags import MetaTags class BaseTemplatePage(WebPage): def init_context(self): self.context = frappe._dict()...
mit
Python
6a7bc9e7dacd30b27b48d37763c47b2419aca2a9
Change the imports to be Python3 compatible
mossberg/pyipinfodb
pyipinfodb/pyipinfodb.py
pyipinfodb/pyipinfodb.py
#!/usr/bin/env python """ Simple python wrapper around the IPInfoDB API. """ import json try: from urllib import urlencode except ImportError: from urllib.parse import urlencode try: import urllib2 except ImportError: import urllib.request as urllib2 import socket class IPInfo() : def __init_...
#!/usr/bin/env python """ Simple python wrapper around the IPInfoDB API. """ import json from urllib import urlencode import urllib2 import socket class IPInfo() : def __init__(self, apikey): self.apikey = apikey def get_ip_info(self, baseurl, ip=None): """ Same as get_city a...
mit
Python
305e54c328cf212e01a3af7cec7b940894044e55
Use float, not int for random WPM
nickodell/morse-code
gen_test.py
gen_test.py
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.uniform(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
import math import numpy import random from demodulate.cfg import * def gen_test_data(): pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A' cycles_per_sample = MORSE_FREQ/SAMPLE_FREQ radians_per_sample = cycles_per_sample * 2 * math.pi WPM = random.randint(2,20) elements_per_second = WPM * 50.0 / 60.0 samples_...
mit
Python
dfb1784009549829a9a9bb1b72be51dacd44ec99
Update auth.py
pathakvaidehi2391/WorkSpace,pathakvaidehi2391/WorkSpace
azurecloudify/auth.py
azurecloudify/auth.py
import requests import json import urllib2 from cloudify import ctx import constants def get_token_from_client_credentials(): client_id = ctx.node.properties['client_id'] client_secret = ctx.node.properties['password'] tenant_id = ctx.node.properties['tenant_id'] endpoints = 'https://login.microsoft...
import requests import json import urllib2 from cloudify import ctx import constants def get_token_from_client_credentials(): client_id = ctx.node.properties['client_id'] client_secret = ctx.node.properties['password'] tenant_id = ctx.node.properties['tenant_id'] endpoints = 'https://login.microsoft...
apache-2.0
Python
89a18ea91fb2d095541510155dcdf94ad76b8374
Fix broken lookdev loader
getavalon/core,mindbender-studio/core,pyblish/pyblish-mindbender,getavalon/core,MoonShineVFX/core,MoonShineVFX/core,mindbender-studio/core
mindbender/maya/loaders/mindbender_look.py
mindbender/maya/loaders/mindbender_look.py
import json from mindbender import api from mindbender.maya import lib, pipeline from maya import cmds class LookLoader(api.Loader): """Specific loader for lookdev""" families = ["mindbender.lookdev"] def process(self, asset, subset, version, representation): fname = representation["path"].for...
import json from mindbender import api from mindbender.maya import lib, pipeline from maya import cmds class LookLoader(api.Loader): """Specific loader for lookdev""" families = ["mindbender.look"] def process(self, asset, subset, version, representation): fname = representation["path"].format...
mit
Python
33fef0560e14f94bab7d74d0c6a62d2016487822
Tidy urls.py
nikdoof/test-auth
app/urls.py
app/urls.py
from django.conf.urls.defaults import * from django.contrib import admin from django.contrib.auth.views import login from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from utils import installed from registration.views import register from sso.forms import Registrati...
from django.conf.urls.defaults import * from django.contrib import admin from django.contrib.auth.views import login from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from utils import installed from registration.views import register from sso.forms import Registrati...
bsd-3-clause
Python
8a9422f7c323394af04f90a43a078098197076b9
fix small bug in dynamic urls.py
RyFry/leagueofdowning,RyFry/leagueofdowning,RyFry/leagueofdowning,RyFry/leagueofdowning
app/urls.py
app/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^about', views.about, name='about'), url(r'^test', views.test, name='test'), url(r'^champions/$', views.champions), url(r'^champions/.*', views.champion), url(r'^champions/*',...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^about', views.about, name='about'), url(r'^test', views.test, name='test'), url(r'^champions/$', views.champions), url(r'^champions/.*', views.champion), url(r'^champions/*',...
mit
Python
2a1b5dbbd3e0c78df76d904602f1c4fcc6157a6b
Clean up imports
rscada/python-mbus,Cougar/python-mbus,neurobat/python-mbus
mbus/MBusHandle.py
mbus/MBusHandle.py
from ctypes import Structure, c_uint8, c_void_p, c_int, c_byte class MBusHandle(Structure): _fields_ = [("fd", c_int), ("max_data_retry", c_int), ("max_search_retry", c_int), ("purge_first_frame", c_byte), ("is_serial", ...
from ctypes import Structure, c_uint32, c_uint8, c_void_p, c_int, c_byte class MBusHandle(Structure): _fields_ = [("fd", c_int), ("max_data_retry", c_int), ("max_search_retry", c_int), ("purge_first_frame", c_byte), ("is_ser...
bsd-3-clause
Python
cdb3e3872ad0dfa722f9955a7beff38b2cfa3547
remove schema form requester
emilkjer/django-memorycms,emilkjer/django-memorycms
backend/auth/utils.py
backend/auth/utils.py
import json from django.http import HttpResponse from auth.models import Token def json_response(response_dict, status=200): response = HttpResponse(json.dumps(response_dict), content_type="application/json", status=status) response['Access-Control-Allow-Origin'] = 'memorycms.moome.net' response['Access-C...
import json from django.http import HttpResponse from auth.models import Token def json_response(response_dict, status=200): response = HttpResponse(json.dumps(response_dict), content_type="application/json", status=status) response['Access-Control-Allow-Origin'] = 'http://memorycms.moome.net/' response['...
mit
Python
2a4bbb19bf32a08e7c398558d39c201f8b089342
change to len
hanabishi/pythoncam
backend/camservice.py
backend/camservice.py
import cherrypy from cammodule import CamModule, get_camera_list, setup_pygame_camera class CamService(object): def __init__(self): self.camera_list = [] setup_pygame_camera() camera_list = get_camera_list() for camera_index, camera_name in enumerate(camera_list): self....
import cherrypy from cammodule import CamModule, get_camera_list, setup_pygame_camera class CamService(object): def __init__(self): self.camera_list = [] setup_pygame_camera() camera_list = get_camera_list() for camera_index, camera_name in enumerate(camera_list): self....
mit
Python
ae7cc245938b1e02974f9b54830146019ca9c0c1
make imports init __init__ prettier
PeerAssets/pypeerassets
pypeerassets/__init__.py
pypeerassets/__init__.py
from pypeerassets.kutil import Kutil from pypeerassets.provider import * from pypeerassets.__main__ import (deck_parser, find_all_valid_cards, find_all_valid_decks, find_deck, deck...
from pypeerassets.kutil import Kutil from pypeerassets.provider import * from pypeerassets.__main__ import *
bsd-3-clause
Python
3aa36ff6ef79f061158ad57b1f4a251b3eeafd7a
Add virtual shift dealer_btn method
ishikota/PyPokerEngine
pypoker2/engine/table.py
pypoker2/engine/table.py
from pypoker2.engine.card import Card from pypoker2.engine.seats import Seats from pypoker2.engine.deck import Deck class Table: def __init__(self, cheat_deck=None): self.dealer_btn = 0 self.seats = Seats() self.deck = cheat_deck if cheat_deck else Deck() self.__community_card = [] def get_commun...
from pypoker2.engine.card import Card from pypoker2.engine.seats import Seats from pypoker2.engine.deck import Deck class Table: def __init__(self, cheat_deck=None): self.dealer_btn = 0 self.seats = Seats() self.deck = cheat_deck if cheat_deck else Deck() self.__community_card = [] def get_commun...
mit
Python
58a69bf2dd93027f083fe54721847c438f861f10
Fix import of new data after rebase
bert9bert/statsmodels,wkfwkf/statsmodels,kiyoto/statsmodels,yl565/statsmodels,nvoron23/statsmodels,bashtage/statsmodels,yl565/statsmodels,edhuckle/statsmodels,jseabold/statsmodels,phobson/statsmodels,statsmodels/statsmodels,adammenges/statsmodels,statsmodels/statsmodels,ChadFulton/statsmodels,wdurhamh/statsmodels,jseab...
statsmodels/datasets/statecrime/data.py
statsmodels/datasets/statecrime/data.py
#! /usr/bin/env python """Statewide Crime Data""" __docformat__ = 'restructuredtext' COPYRIGHT = """Public domain.""" TITLE = """Statewide Crime Data 2009""" SOURCE = """ All data is for 2009 and was obtained from the American Statistical Abstracts except as indicated below. """ DESCRSHORT = """State ...
#! /usr/bin/env python """Statewide Crime Data""" __docformat__ = 'restructuredtext' COPYRIGHT = """Public domain.""" TITLE = """Statewide Crime Data 2009""" SOURCE = """ All data is for 2009 and was obtained from the American Statistical Abstracts except as indicated below. """ DESCRSHORT = """State ...
bsd-3-clause
Python
ea92aeed4dc606def49df643cadc696fec6452b3
fix docstring (again)
mapbox/geocoding-example,mapbox/geocoding-example,mapbox/geocoding-example,mapbox/geocoding-example
python/mapbox_geocode.py
python/mapbox_geocode.py
import __future__ import os, sys, json try: # python 3 from urllib.request import urlopen as urlopen from urllib.parse import quote_plus as quote_plus except: # python 2 from urllib import quote_plus as quote_plus from urllib2 import urlopen as urlopen def geocode(mapbox_access_token, query): ...
import __future__ import os, sys, json try: # python 3 from urllib.request import urlopen as urlopen from urllib.parse import quote_plus as quote_plus except: # python 2 from urllib import quote_plus as quote_plus from urllib2 import urlopen as urlopen def geocode(mapbox_access_token, query): ...
isc
Python
d6ffb7c91d3cfd9b9e0caeec41921ec3ddce6efa
rewrite custom command for django 1.10 compatibility
hddn/studentsdb,hddn/studentsdb,hddn/studentsdb
students/management/commands/stcount.py
students/management/commands/stcount.py
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from students.models import Student, Group class Command(BaseCommand): help = 'Prints to console number of students related in database.' models = (('student', Student), ('group', Group), ('user', User)) def...
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from students.models import Student, Group class Command(BaseCommand): args = '<model_name model_name ...>' help = 'Prints to console number of students related in database.' models = (('student', Student), (...
mit
Python
42ad2c26368dfaa19efcc5ea57902857aae3e2cf
fix horizon metrics
klynch/skyline,klynch/skyline,klynch/skyline
src/horizon/protocols.py
src/horizon/protocols.py
from twisted.internet.error import ConnectionDone from twisted.internet.protocol import DatagramProtocol, ServerFactory from twisted.protocols.basic import LineOnlyReceiver, Int32StringReceiver from twisted.python import log from utils import SafeUnpickler from cache import MetricCache from regexlist import WhiteList,...
from twisted.internet.error import ConnectionDone from twisted.internet.protocol import DatagramProtocol, ServerFactory from twisted.protocols.basic import LineOnlyReceiver, Int32StringReceiver from twisted.python import log from utils import SafeUnpickler from cache import MetricCache from regexlist import WhiteList,...
mit
Python
454c7d322af3328279582aef629736b92c87e869
Revert "It seems the mechanism to declare a namespace package changed."
peterjc/backports.lzma,peterjc/backports.lzma
backports/__init__.py
backports/__init__.py
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
# This file is part of a backport of 'lzma' included with Python 3.3, # exposed under the namespace of backports.lzma following the conventions # laid down here: http://pypi.python.org/pypi/backports/1.0 # Backports homepage: http://bitbucket.org/brandon/backports # A Python "namespace package" http://www.python.org/d...
bsd-3-clause
Python
d1be7f345529594ba25ed5d0f22e544735a64404
Add a custom admin site header.
qubs/climate-data-api,qubs/climate-data-api,qubs/data-centre,qubs/data-centre
qubs_data_centre/urls.py
qubs_data_centre/urls.py
from django.conf.urls import url, include from django.contrib import admin admin.site.site_header = 'QUBS Data Centre Admin' urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^admin/', admin.site.urls), ]
apache-2.0
Python
914f95b8acc84828c8a5aea1138415542b066a62
switch order
tjcsl/director,tjcsl/director,tjcsl/director,tjcsl/director
web3/urls.py
web3/urls.py
"""web3 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
"""web3 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
mit
Python
b2270d751146ed8f27a0d0cc85a10a15ea28dab3
Fix float to byte conversion.
eliteraspberries/avena
avena/np.py
avena/np.py
#!/usr/bin/env python import numpy import sys _eps = 10.0 * sys.float_info.epsilon # Map of NumPy array type strings to types _np_dtypes = { 'int8': numpy.int8, 'int16': numpy.int16, 'int32': numpy.int32, 'int64': numpy.int64, 'uint8': numpy.uint8, 'uint16': numpy.uint16, ...
#!/usr/bin/env python import numpy import sys _eps = 10.0 * sys.float_info.epsilon # Map of NumPy array type strings to types _np_dtypes = { 'int8': numpy.int8, 'int16': numpy.int16, 'int32': numpy.int32, 'int64': numpy.int64, 'uint8': numpy.uint8, 'uint16': numpy.uint16, ...
isc
Python
2b21a07ad1a26f7006809936e5a58e5af710f61b
bump version: 1.0.1
collab-project/django-admin-footer,collab-project/django-admin-footer
admin_footer/__init__.py
admin_footer/__init__.py
# Copyright Collab 2015-2016 # See LICENSE for details. """ `django-admin-footer` application. """ from __future__ import unicode_literals #: Application version. __version__ = (1, 0, 1) def short_version(version=None): """ Return short application version. For example: `1.0.0`. """ v = version or...
# Copyright Collab 2015-2016 # See LICENSE for details. """ `django-admin-footer` application. """ from __future__ import unicode_literals #: Application version. __version__ = (1, 0, 0) def short_version(version=None): """ Return short application version. For example: `1.0.0`. """ v = version or...
mit
Python
2847daea8c3508ee9a71a0513d77e83ef5216e1c
Reduce caching time of sidebar to 3 minutes
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/soc/cache/sidebar.py
app/soc/cache/sidebar.py
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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
9968247d4a73549f1c5b02abf8976f11662b46f7
Add a default logger. Specifically log repeated regulation node labels
18F/regulations-core,cmc333333/regulations-core,eregs/regulations-core
regcore/settings/base.py
regcore/settings/base.py
"""Base settings file; used by manage.py. All settings can be overridden via local_settings.py""" import os from django.utils.crypto import get_random_string INSTALLED_APPS = [ 'haystack', 'regcore', 'regcore_read', 'regcore_write', 'south' ] SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', get_...
"""Base settings file; used by manage.py. All settings can be overridden via local_settings.py""" import os from django.utils.crypto import get_random_string INSTALLED_APPS = [ 'haystack', 'regcore', 'regcore_read', 'regcore_write', 'south' ] SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', get_...
cc0-1.0
Python
16eda1aac6183f612c678ae555367113f1326c0a
Mark upcoming release number.
myimages/django-registration,ubernostrum/django-registration
registration/__init__.py
registration/__init__.py
VERSION = (2, 2, 0, 'alpha', 0) def get_version(): """ Returns a PEP 386-compliant version number from VERSION. """ assert len(VERSION) == 5 assert VERSION[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre...
VERSION = (2, 1, 2, 'final', 0) def get_version(): """ Returns a PEP 386-compliant version number from VERSION. """ assert len(VERSION) == 5 assert VERSION[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre...
bsd-3-clause
Python
18e4e457752051dc4d5f57e78e83572638c4fe62
Refactor syncdb replacement. Clone existing schemata if they don't exist at syncdb time.
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
multi_schema/management/commands/syncdb.py
multi_schema/management/commands/syncdb.py
from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **options): # En...
from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass class Command(syncdb.Command): def handle_noargs(self, **options): cursor = connection.cursor() # Ensu...
bsd-3-clause
Python
2665aa46702175a0d33ae76cfccdbbbddf42d316
Allow for comments in the sql file that do not start the line.
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
multi_schema/management/commands/syncdb.py
multi_schema/management/commands/syncdb.py
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
import os.path from django.core.management.commands import syncdb from django.db import models, connection, transaction try: from south.management.commands import syncdb except ImportError: pass from ...models import Schema, template_schema class Command(syncdb.Command): def handle_noargs(self, **option...
bsd-3-clause
Python
e2555422c12f0b4cf59d8c636a087eddc3150948
allow CR
ContinuumIO/anaconda-verify,mandeep/conda-verify
anaconda_verify/utils.py
anaconda_verify/utils.py
import sys import collections from anaconda_verify.const import MAGIC_HEADERS, DLL_TYPES def get_object_type(data): head = data[:4] if head not in MAGIC_HEADERS: return None lookup = MAGIC_HEADERS.get(head) if lookup == 'DLL': pos = data.find('PE\0\0') if pos < 0: ...
import sys import collections from anaconda_verify.const import MAGIC_HEADERS, DLL_TYPES def get_object_type(data): head = data[:4] if head not in MAGIC_HEADERS: return None lookup = MAGIC_HEADERS.get(head) if lookup == 'DLL': pos = data.find('PE\0\0') if pos < 0: ...
bsd-3-clause
Python
d4ff0f80f065b6f3efa79a5cf17bc4e81a6bb6f2
Add TODO comment.
ohsu-qin/qipipe
qipipe/staging/__init__.py
qipipe/staging/__init__.py
""" Image processing preparation. The staging package defines the functions used to prepare the study image files for import into XNAT, submission to the TCIA QIN collections and pipeline processing. """ # OHSU - The ohsu module creates the OHSU QIN collections. # TODO - this should be a config item. from . import oh...
""" Image processing preparation. The staging package defines the functions used to prepare the study image files for import into XNAT, submission to the TCIA QIN collections and pipeline processing. """ # The ohsu module creates the OHSU QIN collections. # TODO - this should be a config item. from . import ohsu
bsd-2-clause
Python
0d0041678b598e623b3479942c3dd4fc23c5ab23
Upgrade Pip
GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,AdamIsrael/PerfKitBenchmarker,AdamIsrael/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/pip.py
perfkitbenchmarker/linux_packages/pip.py
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
Python
d25bfd459bfc03ea7a3a84a26d80b9db8036c168
Add new NAMES_TO_EDITIONS mapping
freelawproject/reporters-db
reporters_db/__init__.py
reporters_db/__init__.py
import datetime import json import os import six from .utils import suck_out_editions, suck_out_names, suck_out_variations_only # noinspection PyBroadException def datetime_parser(dct): for k, v in dct.items(): if isinstance(v, six.string_types): try: dct[k] = datetime.datetime...
import datetime import json import os import six from .utils import suck_out_variations_only from .utils import suck_out_editions # noinspection PyBroadException def datetime_parser(dct): for k, v in dct.items(): if isinstance(v, six.string_types): try: dct[k] = datetime.dateti...
bsd-2-clause
Python
bffdc451e8dc9df2219158349b60f082ab087a27
add proposal pk to serializer to give votes unique id
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
meinberlin/apps/budgeting/serializers.py
meinberlin/apps/budgeting/serializers.py
from rest_framework import serializers from adhocracy4.categories.models import Category from .models import Proposal class CategoryField(serializers.Field): def to_internal_value(self, category): if category: return Category.objects.get(pk=category) else: return None ...
from rest_framework import serializers from adhocracy4.categories.models import Category from .models import Proposal class CategoryField(serializers.Field): def to_internal_value(self, category): if category: return Category.objects.get(pk=category) else: return None ...
agpl-3.0
Python
9df2420f152e48a0e99598220e4560fe25c9fd36
add an argument to TblTreeEntries.__init__()
TaiSakuma/AlphaTwirl,alphatwirl/alphatwirl,TaiSakuma/AlphaTwirl,alphatwirl/alphatwirl,alphatwirl/alphatwirl,alphatwirl/alphatwirl
AlphaTwirl/HeppyResult/TblTreeEntries.py
AlphaTwirl/HeppyResult/TblTreeEntries.py
# Tai Sakuma <tai.sakuma@cern.ch> from ..mkdir_p import mkdir_p from ..listToAlignedText import listToAlignedText import os import ROOT ##__________________________________________________________________|| class TblTreeEntries(object): def __init__(self, analyzerName, fileName, treeName, outPath, columnName = 'n'...
# Tai Sakuma <tai.sakuma@cern.ch> from ..mkdir_p import mkdir_p from ..listToAlignedText import listToAlignedText import os import ROOT ##__________________________________________________________________|| class TblTreeEntries(object): def __init__(self, analyzerName, fileName, treeName, outPath): self.an...
bsd-3-clause
Python
0de57c0c14362d2f9c40975326c8cb1bf792e2a0
make compiled dir
deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera
binding.gyp
binding.gyp
{ 'targets': [ { 'target_name': 'chimera', 'sources': [ 'src/top.cc', 'src/cookiejar.cc', 'src/chimera.cc', 'src/browser.cc' ], 'conditions': [ ['OS=="mac"', { 'include_dirs': [ 'qt_compiled/include', 'qt_compiled/in...
{ 'targets': [ { 'target_name': 'chimera', 'sources': [ 'src/top.cc', 'src/cookiejar.cc', 'src/chimera.cc', 'src/browser.cc' ], 'conditions': [ ['OS=="mac"', { 'include_dirs': [ 'qt/include', 'qt/include/QtCore', ...
mit
Python
20ee95f56033b5a7d9d1e5f022118850b339ace9
remove old ssl
deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera,deanmao/node-chimera
binding.gyp
binding.gyp
{ 'targets': [ { 'target_name': 'chimera', 'sources': [ 'src/top.cc', 'src/cookiejar.cc', 'src/chimera.cc', 'src/browser.cc' ], 'conditions': [ ['OS=="mac"', { 'include_dirs': [ 'qt_compiled/include', 'qt_compiled/in...
{ 'targets': [ { 'target_name': 'chimera', 'sources': [ 'src/top.cc', 'src/cookiejar.cc', 'src/chimera.cc', 'src/browser.cc' ], 'conditions': [ ['OS=="mac"', { 'include_dirs': [ 'qt_compiled/include', 'qt_compiled/in...
mit
Python
fe290c9f3edc477707e88cb5942ee6c5bd1db568
fix the http backend -- outgoing was still busted
catalpainternational/rapidsms,catalpainternational/rapidsms,eHealthAfrica/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,ken-muturi/rapidsms,dimagi/rapidsms-core-dev,unicefuganda/edtrac,unicefuganda/edtrac,ehealthafrica-ci/rapidsms,rapidsms/rapidsms-core-dev,dimagi/rapidsms-core-dev,dimagi/rapidsms,unicefuganda/edtra...
lib/rapidsms/backends/http.py
lib/rapidsms/backends/http.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import BaseHTTPServer, SocketServer import select import random import re import urllib import httphandlers as handlers import rapidsms from rapidsms.backends.base import BackendBase class HttpServer (BaseHTTPServer.HTTPServer, SocketServer.ThreadingMixIn): ...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import BaseHTTPServer, SocketServer import select import random import re import urllib import httphandlers as handlers import rapidsms from rapidsms.backends.base import BackendBase class HttpServer (BaseHTTPServer.HTTPServer, SocketServer.ThreadingMixIn): ...
bsd-3-clause
Python
ad94ae60f418b6030be12d4e650eac5ddb33df4b
Hide vk_app_id setting in stage settings
sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/ritmserdtsa
rynda/Rynda/settings/stage.py
rynda/Rynda/settings/stage.py
# coding: utf-8 import os from .base import * DEBUG = TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'devrynda', 'USER': 'devrynda', 'PASSWORD': 'RyndaDeveloper', 'HOST': 'rynda.org', 'PORT': '', } ...
# coding: utf-8 import os from .base import * DEBUG = TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'devrynda', 'USER': 'devrynda', 'PASSWORD': 'RyndaDeveloper', 'HOST': 'rynda.org', 'PORT': '', } ...
mit
Python
bf336d99484cc3804f469631b513a927940ada30
Add scan_steps wrapper for scan_nd
NSLS-II-HXN/ipython_ophyd,NSLS-II-HXN/ipython_ophyd
profile_collection/startup/50-scans.py
profile_collection/startup/50-scans.py
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
bsd-2-clause
Python
a292e1fe8ec72355ce2bb3c1f99dd82d6f145438
Add path to homebrew-installed pkgconfig for Mac OS 10.8 (10.9 is symlinked to 10.8) #9
leiyangyou/sharp,cmtt/sharp,mhirsch/sharp,kevinsawicki/sharp,kevinsawicki/sharp,lovell/sharp,brandonaaron/sharp,mcanthony/sharp,lovell/sharp,digital-flowers/sharp-win32,papandreou/sharp,mhirsch/sharp,digital-flowers/sharp-win32,mcanthony/sharp,pporada-gl/sharp,digital-flowers/sharp-win32,papandreou/sharp,mdimitrov/shar...
binding.gyp
binding.gyp
{ 'targets': [{ 'target_name': 'sharp', 'sources': ['src/sharp.cc'], 'libraries': [ '<!@(PKG_CONFIG_PATH="/usr/local/Library/ENV/pkgconfig/10.8:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --libs vips)' ], 'include_dirs': [ '/usr/local/include/glib-2.0', '/usr/local/li...
{ 'targets': [{ 'target_name': 'sharp', 'sources': ['src/sharp.cc'], 'libraries': [ '<!@(PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" pkg-config --libs vips)', '<!@(PKG_CONFIG_PATH="/usr/lib/pkgconfig" pkg-config --libs vips)' ], 'include_dirs': [ '/usr/local/include/glib-2.0', ...
apache-2.0
Python
88021aeb5e7c4d0f3a50333b3f77624ac718c03c
Use `ASM` mode on the linux + non glibc environ
Icenium/node-fibers,laverdet/node-fibers,meteor/node-fibers,Icenium/node-fibers,laverdet/node-fibers,meteor/node-fibers,laverdet/node-fibers,meteor/node-fibers,meteor/node-fibers,laverdet/node-fibers,Icenium/node-fibers,Icenium/node-fibers
binding.gyp
binding.gyp
{ 'target_defaults': { 'default_configuration': 'Release', 'configurations': { 'Release': { 'cflags': [ '-O3' ], 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', }, 'msvs_settings': { 'VCCLCompilerTool': { 'Optimization': 3, 'F...
{ 'target_defaults': { 'default_configuration': 'Release', 'configurations': { 'Release': { 'cflags': [ '-O3' ], 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', }, 'msvs_settings': { 'VCCLCompilerTool': { 'Optimization': 3, 'F...
mit
Python
b5df30371e7f975311ed4e783e204a9e38f97b0a
add conditions in binding.gyp file to fix issues
charliegerard/Epoc.js,charliegerard/Epoc.js,charliegerard/Epoc.js,charliegerard/Epoc.js
binding.gyp
binding.gyp
{ "targets": [ { "target_name": "addon", "sources": [ "addon.cc", "myobject.cc" ], "conditions": [ ['OS=="mac"', { "cflags": [ "-m64" ], "ldflags": [ "-m64" ], "xcode_settings": { "OTHER_CFLAGS": ["-O...
{ "targets": [ { "target_name": "addon", "sources": [ "addon.cc", "myobject.cc" ] } ] }
mit
Python
9b9359c06e44fe5a8f5f16f662fcea2ef3e8f18d
Remove delay load hook
trevnorris/node-ofe,trevnorris/node-ofe,trevnorris/node-ofe
binding.gyp
binding.gyp
{ "targets" : [{ "target_name" : "ofe", "sources" : [ "ofe.cc" ], "include_dirs": [ '<!(node -e "require(\'nan\')")' ], "win_delay_load_hook" : "false" }] }
{ "targets" : [{ "target_name" : "ofe", "sources" : [ "ofe.cc" ], "include_dirs": [ '<!(node -e "require(\'nan\')")' ] }] }
mit
Python
a30eb4a1eaa3a9677950c37f273e7ac16cae698f
Change init method
JOHNKYON/DSTC
DSTC2/basic.py
DSTC2/basic.py
# -*- coding:utf-8 -*- from sklearn.cross_validation import train_test_split from DSTC2.traindev.scripts import myLogger from DSTC2.traindev.scripts.model import bp from traindev.scripts import file_reader from traindev.scripts import initializer from traindev.scripts.initializer import Set __author__ = "JOHNKYON"...
# -*- coding:utf-8 -*- from sklearn.cross_validation import train_test_split from DSTC2.traindev.scripts import myLogger from DSTC2.traindev.scripts.model import bp from traindev.scripts import file_reader from traindev.scripts import initializer from traindev.scripts.initializer import Set __author__ = "JOHNKYON"...
mit
Python
e36054ab878b10d9e2bc0b21a21d589a16945449
Add -Wno-unused-function to xcode flags
zbjornson/node-bswap,zbjornson/node-bswap,zbjornson/node-bswap
binding.gyp
binding.gyp
{ "targets": [ { "target_name": "bswap", "sources": [ "src/bswap.cc" ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], "cflags":[ "-march=native", "-falign-loops=32", # See readme; significant improvement for some cases "-Wno-unused-function", ...
{ "targets": [ { "target_name": "bswap", "sources": [ "src/bswap.cc" ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], "cflags":[ "-march=native", "-falign-loops=32", # See readme; significant improvement for some cases "-Wno-unused-function", ...
mit
Python
d749361a7ee14b96c2235300b15fbba1222a6a9c
remove comment.
snogcel/bitcore-node-dash,jameswalpole/bitcore-node,fanatid/bitcore-node,pnagurny/bitcoind.js,kleetus/bitcore-node,eXcomm/bitcoind.js,wzrdtales/bitcore-node,bitpay/bitcoind.js,bitpay/bitcoind.js,isghe/bitcore-node,CryptArc/bitcore-node,snogcel/bitcore-node-dash,studio666/bitcoind.js,bitpay/bitcoind.js,pnagurny/bitcoind...
binding.gyp
binding.gyp
{ 'targets': [{ 'target_name': 'bitcoindjs', 'variables': { 'BOOST_INCLUDE': '<!(test -n "$BOOST_INCLUDE"'\ ' && echo "$BOOST_INCLUDE"'\ ' || test -e /usr/include/boost && echo /usr/include/boost' \ ' || echo ./include)', 'LEVELDB_INCLUDE': '<!(test -n "$LEVELDB_INCLUDE"'\ ...
{ 'targets': [{ 'target_name': 'bitcoindjs', 'variables': { 'BOOST_INCLUDE': '<!(test -n "$BOOST_INCLUDE"'\ ' && echo "$BOOST_INCLUDE"'\ ' || test -e /usr/include/boost && echo /usr/include/boost' \ ' || echo ./include)', 'LEVELDB_INCLUDE': '<!(test -n "$LEVELDB_INCLUDE"'\ ...
mit
Python
539f575832244e426d768b0901113a1e45b25f3f
modify python ext setup script
neeraj9/zfor,neeraj9/zfor,chaoslawful/zfor,neeraj9/zfor,neeraj9/zfor,chaoslawful/zfor,chaoslawful/zfor,chaoslawful/zfor,neeraj9/zfor
src/python_zfor/setup.py
src/python_zfor/setup.py
#!/usr/bin/env python from distutils.core import setup, Extension zformod = Extension( 'zfor', sources = ['src/zfor.c'], include_dirs = ['../libzfor'], library_dirs = ['/usr/local/lib', '../libzfor'], libraries = ['zfor'] ) setup( name = 'zfo...
#!/usr/bin/env python from distutils.core import setup, Extension zformod = Extension('zfor', sources = ['src/zfor.c'], library_dirs = ['/usr/local/lib'], libraries = ['zfor'] ) setup(name = 'zfor', version = '0.1', description = 'Python zfor binding', ...
bsd-3-clause
Python
e346f70eb34a029642410a92e449915801d9f78f
use relative import
Crossway/antimarkdown,Crossway/antimarkdown
antimarkdown/__init__.py
antimarkdown/__init__.py
# -*- coding: utf-8 -*- """antimarkdown -- convert Markdown to HTML. """ from lxml import html from lxml.builder import E from . import handlers default_safe_tags = set('p blockquote i em strong b u a h1 h2 h3 h4 h5 h6 hr pre code div br img ul ol li span'.split()) default_safe_attrs = set('href src alt style title'...
# -*- coding: utf-8 -*- """antimarkdown -- convert Markdown to HTML. """ from lxml import html from lxml.builder import E import handlers default_safe_tags = set('p blockquote i em strong b u a h1 h2 h3 h4 h5 h6 hr pre code div br img ul ol li span'.split()) default_safe_attrs = set('href src alt style title'.split(...
mit
Python
0a725db8e8d7f1e73a84fb0d0acc181603e706cb
Refactor to readability test
hyesun03/k-board,kboard/kboard,hyesun03/k-board,guswnsxodlf/k-board,guswnsxodlf/k-board,guswnsxodlf/k-board,kboard/kboard,hyesun03/k-board,kboard/kboard,darjeeling/k-board
kboard/functional_test/test_post_delete.py
kboard/functional_test/test_post_delete.py
from .base import FunctionalTest, login_test_user_with_browser, NotFoundPostError class DeletePostTest(FunctionalTest): @login_test_user_with_browser def test_delete_post(self): # 지훈이는 게시글을 삭제하는 기능이 제대로 동작하는지 확인하기 위해 기본 게시판으로 이동한다. self.move_to_default_board() # 'django' 대한 게시글과 'spri...
from .base import FunctionalTest, login_test_user_with_browser, NotFoundPostError class DeletePostTest(FunctionalTest): @login_test_user_with_browser def test_delete_post(self): # 지훈이는 게시글을 삭제하는 기능이 제대로 동작하는지 확인하기 위해 기본 게시판으로 이동한다. self.move_to_default_board() # 'django' 대한 게시글과 'spri...
mit
Python
bbd7266a9e228ac111497b12d00ea71b3e0f4f5a
fix imports
xahgmah/edx-proctoring,edx/edx-proctoring,edx/edx-proctoring,edx/edx-proctoring,xahgmah/edx-proctoring,xahgmah/edx-proctoring
edx_proctoring/management/commands/set_attempt_status.py
edx_proctoring/management/commands/set_attempt_status.py
""" Django management command to manually set the attempt status for a user in a proctored exam """ from optparse import make_option from django.core.management.base import BaseCommand from edx_proctoring.models import ProctoredExamStudentAttemptStatus class Command(BaseCommand): """ Django Management comm...
""" Django management command to manually set the attempt status for a user in a proctored exam """ from optparse import make_option from django.core.management.base import BaseCommand from edx_proctoring.api import ( update_attempt_status, get_exam_by_id ) from edx_proctoring.models import ProctoredExamStu...
agpl-3.0
Python
9c0d62d7b08d63b7daf338a16fc34896856aefb2
Test code for encoding password in postgresql uri
frankyrumple/smc,frankyrumple/smc,frankyrumple/smc,frankyrumple/smc
controllers/lms.py
controllers/lms.py
import sys import os import subprocess import urllib from gluon import current import paramiko from ednet.ad import AD from ednet.canvas import Canvas from ednet.appsettings import AppSettings # Needed for remote connection? auth.settings.allow_basic_login = True #auth.settings.actions_disabled.append('login') #aut...
import sys import os import subprocess from gluon import current import paramiko from ednet.ad import AD from ednet.canvas import Canvas from ednet.appsettings import AppSettings # Needed for remote connection? auth.settings.allow_basic_login = True #auth.settings.actions_disabled.append('login') #auth.settings.al...
mit
Python
a619f703b2d259877e30d3e1ede11813c014f3ad
Fix the AvailableActionsPrinter to support the new multiplayer action spec.
deepmind/pysc2
pysc2/env/available_actions_printer.py
pysc2/env/available_actions_printer.py
# Copyright 2017 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 2017 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