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
1b7e38828b56feb6ff44955acd577b7b1315922f
bump to v1.0
h2non/pook
pook/__init__.py
pook/__init__.py
from .api import * # noqa from .api import __all__ as api_exports # Delegate to API export __all__ = api_exports # Package metadata __author__ = 'Tomas Aparicio' __license__ = 'MIT' # Current version __version__ = '1.0.0'
from .api import * # noqa from .api import __all__ as api_exports # Delegate to API export __all__ = api_exports # Package metadata __author__ = 'Tomas Aparicio' __license__ = 'MIT' # Current version __version__ = '0.2.8'
mit
Python
17ce5e71a1ba49231ffd46d15a6369f2ff94a931
FIX - .cfg file path fixed
ashgkwd/brainy-beats,ashgkwd/brainy-beats
post-to-slack.py
post-to-slack.py
""" Author: Ashish Gaikwad <ash.gkwd@gmail.com> Copyright (c) 2015 Ashish Gaikwad Description: This script will post a message on your slack channel Please configure your `/etc/brainy-beats.cfg` file first. Example brainy-beats.cfg [slack] url=https://hooks.slack.com/services/XxXxXxXxXx channel=botwa icon_emoji=ghos...
""" Author: Ashish Gaikwad <ash.gkwd@gmail.com> Copyright (c) 2015 Ashish Gaikwad Description: This script will post a message on your slack channel Please configure your `/etc/brainy-beats.cfg` file first. Example brainy-beats.cfg [slack] url=https://hooks.slack.com/services/XxXxXxXxXx channel=botwa icon_emoji=ghos...
mit
Python
0004bde0d40dfea167d76a83c20acfffc0abfa28
Add NullHandler to poyo root logger
hackebrot/poyo
poyo/__init__.py
poyo/__init__.py
# -*- coding: utf-8 -*- import logging from .exceptions import PoyoException from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.3.0' logging.getLogger(__name__).addHandler(logging.NullHandler()) __all__ = ['parse_string', 'PoyoException']
# -*- coding: utf-8 -*- from .exceptions import PoyoException from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.3.0' __all__ = ['parse_string', 'PoyoException']
mit
Python
0647c03ffd8003d5c342d44083d704a677d0f370
move mongodb setting to cameo code
muchu1983/104_cameo,muchu1983/104_cameo
cameo/externaldb.py
cameo/externaldb.py
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import logging from pymongo import MongoClient """ 外部資料庫存取 """ #外部資料庫 cameo 210.65.11.231 class CameoMongoDb: #建構子 de...
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ from bennu.externaldb import CameoMongoDb """ 外部資料庫存取 """ #cameo mongodb tier class ExternalDbOfCameo: #建構子 def __init__(s...
bsd-3-clause
Python
be1b850389c4bf5c30b62d2ebe5ef47f0f4e098d
Write docstrings
econ-ark/HARK,econ-ark/HARK
HARK/econforgeinterp.py
HARK/econforgeinterp.py
from .core import MetricObject from interpolation.splines import eval_linear, UCGrid from interpolation.splines import extrap_options as xto import numpy as np from copy import copy class LinearFast(MetricObject): """ A class that constructs and holds all the necessary elements to call a multilinear inte...
from .core import MetricObject from interpolation.splines import eval_linear, UCGrid from interpolation.splines import extrap_options as xto import numpy as np from copy import copy class LinearFast(MetricObject): distance_criteria = ["f_val", "grid_list"] def __init__(self, f_val, grids, extrap_options=No...
apache-2.0
Python
ccf97e390451a1da96bb9e3e8d261db6d2339702
Bump version
Samsung-IoT-Academy/mockquitto
mockquitto/version.py
mockquitto/version.py
__version__ = '0.0.2'
__version__ = '0.0.2.dev0'
mit
Python
49a397f18b4cbee929f4de91f125aef574561d0e
Move this to initial connect hook
alama/PSO2Proxy,cyberkitsune/PSO2Proxy,cyberkitsune/PSO2Proxy,alama/PSO2Proxy,alama/PSO2Proxy,flyergo/PSO2Proxy,cyberkitsune/PSO2Proxy,flyergo/PSO2Proxy
proxy/plugins/disabled/Translate.py
proxy/plugins/disabled/Translate.py
import data.clients import packetFactory import struct from microsofttranslator import Translator from commands import Command from config import YAMLConfig import plugins as p translation_config = YAMLConfig("cfg/translator.config.yml", {'app_id': '', 'secret_key': ''}, True) translator = Translator(translation_conf...
import data.clients import packetFactory import struct from microsofttranslator import Translator from commands import Command from config import YAMLConfig import plugins as p translation_config = YAMLConfig("cfg/translator.config.yml", {'app_id': '', 'secret_key': ''}, True) translator = Translator(translation_conf...
agpl-3.0
Python
531bc0de6c9a67c8e081fb243daf8a4cc9691027
Fix openmv-fb.py script.
iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv
usr/openmv-fb.py
usr/openmv-fb.py
#!/usr/bin/env python2 import sys # import usb.core # import usb.util import numpy as np import pygame import openmv from time import sleep script = """ # Hello World Example # # Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script! import sensor, image, time sensor.reset() ...
#!/usr/bin/env python import sys # import usb.core # import usb.util import numpy as np import pygame import openmv from time import sleep script = """ # Hello World Example # # Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script! import sensor, image, time sensor.reset() ...
mit
Python
56dd184f7fe002dabe6d2761684098d750719a29
Set version to v3.0.7, update contact (#34)
explosion/preshed,explosion/preshed,explosion/preshed
preshed/about.py
preshed/about.py
__title__ = "preshed" __version__ = "3.0.7" __summary__ = "Cython hash table that trusts the keys are pre-hashed" __uri__ = "https://github.com/explosion/preshed" __author__ = "Explosion" __email__ = "contact@explosion.ai" __license__ = "MIT" __release__ = True
__title__ = "preshed" __version__ = "3.0.6" __summary__ = "Cython hash table that trusts the keys are pre-hashed" __uri__ = "https://github.com/explosion/preshed" __author__ = "Matthew Honnibal" __email__ = "matt@explosion.ai" __license__ = "MIT" __release__ = True
mit
Python
3b815819bb89f4e239bb350168d8f5cfe0ffe5fe
include discount policies
hasgeek/boxoffice,hasgeek/boxoffice,hasgeek/boxoffice,hasgeek/boxoffice
boxoffice/views/item_collection.py
boxoffice/views/item_collection.py
from flask import render_template from flask.ext.cors import cross_origin from coaster.views import load_models, jsonp from boxoffice import app from boxoffice.models import Organization, ItemCollection, Price ALLOWED_ORIGINS = ['http://shreyas-wlan.dev:8000', 'http://rootconf.vidya.dev:8090'] def item_json(item): ...
from flask import render_template from flask.ext.cors import cross_origin from coaster.views import load_models, jsonp from boxoffice import app from boxoffice.models import Organization, ItemCollection, Price ALLOWED_ORIGINS = ['http://shreyas-wlan.dev:8000', 'http://rootconf.vidya.dev:8090'] def item_json(item): ...
agpl-3.0
Python
c41a86d2bcc45c6d29b5c847aec8075b7028341e
Revise doc
termoshtt/continuate
continuate/linalg.py
continuate/linalg.py
# -*- coding: utf-8 -*- import numpy as np from scipy.sparse.linalg import LinearOperator from logging import getLogger, DEBUG logger = getLogger(__name__) logger.setLevel(DEBUG) def Jacobian(func, x0, alpha=1e-7, fx=None): """ Jacobi oprator :math:`DF(x0)`, where .. math:: DF(x0)dx = (F(x0 + \...
# -*- coding: utf-8 -*- import numpy as np from scipy.sparse.linalg import LinearOperator from logging import getLogger, DEBUG logger = getLogger(__name__) logger.setLevel(DEBUG) def Jacobian(func, x0, alpha=1e-7, fx=None): """ Jacobi oprator :math:`DF(x0)`, where .. math:: DF(x0)dx = (F(x0 + \a...
mit
Python
87889d324a506564a0233830e0e3eb7e5036616c
bump version to 0.9.7 to fix windows wheels
Toblerity/rtree,Toblerity/rtree
rtree/__init__.py
rtree/__init__.py
""" # rtree Rtree provides Python bindings to libspatialindex for quick hyperrectangular intersection queries. """ __version__ = '0.9.7' from .index import Rtree, Index # noqa
""" # rtree Rtree provides Python bindings to libspatialindex for quick hyperrectangular intersection queries. """ __version__ = '0.9.6' from .index import Rtree, Index # noqa
mit
Python
ff744967660c1cec2fa8e228672f9037a50b0d8e
Add prefix to progress bar.
levilucio/SyVOLT,levilucio/SyVOLT
util/progress.py
util/progress.py
import time, sys class ProgressBar: def __init__(self, num_items, bar_length=50, prefix=""): self.num_items = num_items self.bar_length = bar_length # Modify this to change the length of the progress bar self.step_size = num_items/bar_length self.current_num = 0 self.prefix...
import time, sys class ProgressBar: def __init__(self, num_items, bar_length=50): self.num_items = num_items self.bar_length = bar_length # Modify this to change the length of the progress bar self.step_size = num_items/bar_length self.current_num = 0 # update_progress() : Dis...
mit
Python
6974d2f02bcd59a1991e60428ea0a49ced9a6972
Fix windows build by removing build step.
sbc100/nativeclient-sdk,sbc100/nativeclient-sdk,sbc100/nativeclient-sdk,sbc100/nativeclient-sdk,sbc100/nativeclient-sdk,sbc100/nativeclient-sdk,sbc100/nativeclient-sdk
build_tools/install_third_party.py
build_tools/install_third_party.py
#!/usr/bin/python # Copyright (c) 2010 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that be # found in the LICENSE file. """Build and install all the third-party tools and libraries required to build the SDK code. To add a script, add it to the array |TH...
#!/usr/bin/python # Copyright (c) 2010 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that be # found in the LICENSE file. """Build and install all the third-party tools and libraries required to build the SDK code. To add a script, add it to the array |TH...
bsd-3-clause
Python
b41c5dc60cd63248c7232911dee456fa97bf466d
Update icecream_box.py
Zex/Starter,Zex/Starter,Zex/Starter
cgi/icecream_box.py
cgi/icecream_box.py
#!/usr/bin/python import cgi fields = cgi.FieldStorage() title = "Icecream Box" print "Content-Type: text/html" print print "<html>" print "<title>",title,"</title>" print "<body>" for k in fields.keys(): print "<b>", k.upper(), "</b>", fields[k].value,"<br>" print "</body>" print "</html>"
#!/usr/bin/python import cgi fields = cgi.FieldStorage() title = "Icecream Box" print "Content-Type: text/html" print print "<html>" print "<title>",title,"</title>" print "<body>" for k in fields.keys(): print "<b>", k.upper(), "</b>", fields[k].value,"</br>" print "</body>" print "</html>"
mit
Python
e583400de98a4fe9d16a10a51dd5e3dda13c6115
Remove support for old positional settings.
bradleyg/django-s3direct,bradleyg/django-s3direct,bradleyg/django-s3direct
s3direct/utils.py
s3direct/utils.py
import hashlib import hmac from django.conf import settings def get_at(index, t): try: value = t[index] except IndexError: value = None return value def get_s3direct_destinations(): """Returns s3direct destinations. NOTE: Don't use constant as it will break ability to change at...
import hashlib import hmac from django.conf import settings def get_at(index, t): try: value = t[index] except IndexError: value = None return value # NOTE: Don't use constant as it will break ability to change at runtime # (E.g. tests) def get_s3direct_destinations(): """Returns s3...
mit
Python
615016be867dfd03bd0c3a38642709ab6832cacb
Remove unnecessary shebang line
libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar
libravatar/utils.py
libravatar/utils.py
# Copyright (C) 2011 Francois Marier <francois@libravatar.org> # # This file is part of Libravatar # # Libravatar 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 # ...
#!/usr/bin/python # Copyright (C) 2011 Francois Marier <francois@libravatar.org> # # This file is part of Libravatar # # Libravatar 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 ...
agpl-3.0
Python
74e18fb6d816f9b7a67313a24d68cfe395b15ec4
bump version to 0.3
ducksboard/libsaas,80vs90/libsaas,CptLemming/libsaas,livingbio/libsaas
libsaas/__init__.py
libsaas/__init__.py
__version__ = (0, 3) __versionstr__ = '.'.join([str(n) for n in __version__])
__version__ = (0, 2) __versionstr__ = '.'.join([str(n) for n in __version__])
mit
Python
9ef86f0b5ff1b4e1521a3dc075ff16bc6aef2d0c
Fix for truncated whitespace on DB level
DrDos0016/z2,DrDos0016/z2,DrDos0016/z2
museum_site/scroll.py
museum_site/scroll.py
from django.db import models class Scroll(models.Model): # Constants SCROLL_TOP = """``` ╞╤═════════════════════════════════════════════╤╡ │ Scroll ### │ ╞═════════════════════════════════════════════╡ │ • • • • • • • • •│""" SCROLL_BOTTOM = ...
from django.db import models class Scroll(models.Model): # Constants SCROLL_TOP = """``` ╞╤═════════════════════════════════════════════╤╡ │ Scroll ### │ ╞═════════════════════════════════════════════╡ │ • • • • • • • • •│""" SCROLL_BOTTOM = ...
mit
Python
53c5489a53e3a5d205a5cb207df751c09633e7ce
Bump to 0.4.8
jurismarches/chopper
chopper/__init__.py
chopper/__init__.py
__version__ = '0.4.8' __version_info__ = tuple(__version__.split('.'))
__version__ = '0.4.7' __version_info__ = tuple(__version__.split('.'))
mit
Python
f68e4a7899af750216e8ffb706a90639a4e7e916
Add merchant id inventory (#17) (#18)
Bobspadger/python-amazon-mws
mws/apis/inventory.py
mws/apis/inventory.py
""" Amazon MWS Inventory Fulfillment API """ from __future__ import absolute_import from ..mws import MWS from .. import utils from ..decorators import next_token_action class Inventory(MWS): """ Amazon MWS Inventory Fulfillment API Docs: http://docs.developer.amazonservices.com/en_US/fba_inventory/...
""" Amazon MWS Inventory Fulfillment API """ from __future__ import absolute_import from ..mws import MWS from .. import utils from ..decorators import next_token_action class Inventory(MWS): """ Amazon MWS Inventory Fulfillment API Docs: http://docs.developer.amazonservices.com/en_US/fba_inventory/...
unlicense
Python
8d76be20f314b1105fe0c08b78ff04d758054729
make the newrelic parser python 2 compatible
pyupio/changelogs
changelogs/custom/pypi/newrelic.py
changelogs/custom/pypi/newrelic.py
from lxml import etree import sys def get_urls(releases, **kwargs): urls = set() for release in releases: urls.add( 'https://docs.newrelic.com/docs/release-notes/agent-release-notes/' 'python-release-notes/python-agent-{}'.format(release.replace('.', '')) ) return ur...
from lxml import etree def get_urls(releases, **kwargs): urls = set() for release in releases: urls.add( 'https://docs.newrelic.com/docs/release-notes/agent-release-notes/' 'python-release-notes/python-agent-{}'.format(release.replace('.', '')) ) return urls, set() ...
mit
Python
530f540b11959956c0cd08b95b2c7c373d829c8e
Handle edge case with zero count
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/sherlock-and-valid-string.py
python/sherlock-and-valid-string.py
#!/bin/python3 import math import os import random import re import sys from collections import Counter import copy def isValid(s): return "YES" if containsOnlyOneDifferentCharacterCount(s) else "NO" def containsOnlyOneDifferentCharacterCount(string): characterCounts = Counter(string) if allOccurencesA...
#!/bin/python3 import math import os import random import re import sys from collections import Counter def isValid(s): return "YES" if containsOnlyOneDifferentCharacterCount(s) else "NO" def containsOnlyOneDifferentCharacterCount(string): characterCounts = Counter(string) if allOccurencesAreEqual(char...
mit
Python
9e576236d635adb78aac8fbec8b8ea91c4234f0f
Set version
lljzfly/mapzen-geohash,tianruoxuanhe/mapzen-geohash,transitland/mapzen-geohash
mzgeohash/__init__.py
mzgeohash/__init__.py
from geohash import encode, decode, adjacent, neighbors, neighborsfit __version__ = '0.9b1'
from geohash import encode, decode, adjacent, neighbors, neighborsfit __version__ = '1.0'
mit
Python
7005b68312199590d802826c027865609c8368c7
Set version to 0.1.1
gnotaras/django-postgresql-manager
src/PostgreSQL_manager/__init__.py
src/PostgreSQL_manager/__init__.py
# -*- coding: utf-8 -*- # # This file is part of django-postgresql-manager. # # django-postgresql-manager - a Django application which can be used to manage # PostgreSQL users and databases. # # Development Web Site: # - http://www.codetrax.org/projects/django-postgresql-manager # Public Source Code Repository:...
# -*- coding: utf-8 -*- # # This file is part of django-postgresql-manager. # # django-postgresql-manager - a Django application which can be used to manage # PostgreSQL users and databases. # # Development Web Site: # - http://www.codetrax.org/projects/django-postgresql-manager # Public Source Code Repository:...
apache-2.0
Python
cbd3dd3a35189a5371045c4909b44b617e8472e0
Update version to 9.2.2.dev0 [ci skip]
angr/claripy
claripy/__init__.py
claripy/__init__.py
#!/usr/bin/env python # pylint: disable=F0401,W0401,W0603, __version__ = "9.2.2.dev0" if bytes is str: raise Exception("This module is designed for python 3 only. Please install an older version to use python 2.") import os import sys import socket import logging l = logging.getLogger("claripy") l.addHandler(log...
#!/usr/bin/env python # pylint: disable=F0401,W0401,W0603, __version__ = "9.2.1.dev0" if bytes is str: raise Exception("This module is designed for python 3 only. Please install an older version to use python 2.") import os import sys import socket import logging l = logging.getLogger("claripy") l.addHandler(log...
bsd-2-clause
Python
899dd49d22f9936908fea71130ec39d11624e65d
Remove unused function.
benmishkanian/ASF-JIRA-mine,benmishkanian/ASF-JIRA-mine,benmishkanian/ASF-JIRA-mine
createContributorCompany.py
createContributorCompany.py
from jiradb import * if __name__ == "__main__": log.setLevel(logging.DEBUG) # Add console log handler ch = logging.StreamHandler() ch.setLevel(logging.INFO) ch.setFormatter(logging.Formatter('%(message)s')) log.addHandler(ch) # Add file log handler fh = logging.FileHandler('buildContrib...
from jiradb import * def waitForSearchQuota(jiradb): if not jiradb.googleSearchEnabled: jiradb.session.commit() log.warn('Exhausted search quota. Waiting a day...') time.sleep(60 * 60 * 24) jiradb.googleSearchEnabled = True if __name__ == "__main__": log.setLevel(logging.DEBU...
mit
Python
a67b71ebadbffa864f60869878198ce4e2eb3fa3
Use Netmiko to change the logging buffer size (logging buffered <size>) on pynet-rtr2.
linkdebian/pynet_course
class4/exercise7.py
class4/exercise7.py
# Use Netmiko to change the logging buffer size (logging buffered <size>) on pynet-rtr2. from getpass import getpass from netmiko import ConnectHandler def main(): password = getpass() pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 8022} ...
from getpass import getpass from netmiko import ConnectHandler def main(): password = getpass() pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 8022} ssh_connection = ConnectHandler(**pynet_rtr2) ssh_connection.config_mode() lo...
apache-2.0
Python
35c91a5cfc7b9fef02c775eade2145991281e75e
use pathlib
Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki
crowd_anki/anki_exporter.py
crowd_anki/anki_exporter.py
import json import os import shutil from pathlib import Path from crowd_anki.utils.constants import DECK_FILE_EXTENSION, MEDIA_SUBDIRECTORY_NAME from crowd_anki.representation.deck import Deck class AnkiJsonExporter(object): def __init__(self, collection): self.collection = collection def export_dec...
import json import os import shutil from crowd_anki.utils.constants import DECK_FILE_EXTENSION, MEDIA_SUBDIRECTORY_NAME from crowd_anki.representation.deck import Deck class AnkiJsonExporter(object): def __init__(self, collection): self.collection = collection def export_deck(self, deck_name, output...
mit
Python
e5df2effd7c714a41a455b40d1a7303423224bff
add RegisterFile to __init__.py
Abhinav117/pymtl,Abhinav117/pymtl,Abhinav117/pymtl,Abhinav117/pymtl
new_pmlib/__init__.py
new_pmlib/__init__.py
#========================================================================= # Modular Python Build System __init__ file #========================================================================= # List of collection modules import regs import arith import valrdy import queues # List of single-class modules from Mux ...
#========================================================================= # Modular Python Build System __init__ file #========================================================================= # List of collection modules import regs import arith import valrdy import queues # List of single-class modules from Mux ...
bsd-3-clause
Python
ddd661add51c4b120763062aff6a72ccbda4d608
remove rc
adrn/TwoFace,adrn/TwoFace
scripts/initdb.py
scripts/initdb.py
# Standard library import sys # Project from twoface.log import log as logger from twoface.db.init import initialize_db, load_nessrg def main(allVisit_file, allStar_file, nessrg_file, **_): database_name = 'apogee.sqlite' # TODO: should this be enforced? initialize_db(allVisit_file, allStar_file, database_n...
# Standard library import sys # Project from twoface.log import log as logger from twoface.db.init import initialize_db, load_nessrg def main(allVisit_file, allStar_file, rc_file, nessrg_file, **_): database_name = 'apogee.sqlite' # TODO: should this be enforced? initialize_db(allVisit_file, allStar_file, d...
mit
Python
5540098f10b24c39b9cf5c47101b03959a13c2c9
Check cwd for pupa_settings
mileswwatkins/pupa,influence-usa/pupa,opencivicdata/pupa,datamade/pupa,influence-usa/pupa,rshorey/pupa,datamade/pupa,rshorey/pupa,mileswwatkins/pupa,opencivicdata/pupa
pupa/settings.py
pupa/settings.py
import os import importlib import sys import dj_database_url DATABASE_URL = os.environ.get('DATABASE_URL', 'postgis://pupa:pupa@localhost/opencivicdata') SECRET_KEY = 'non-secret' INSTALLED_APPS = ('opencivicdata.apps.BaseConfig', 'pupa',) # scrape settings SCRAPELIB_RPM = 60 SCRAPELIB_TIMEOUT = 60 SCRAPELIB_RETRY_A...
import os import importlib import dj_database_url DATABASE_URL = os.environ.get('DATABASE_URL', 'postgis://pupa:pupa@localhost/opencivicdata') SECRET_KEY = 'non-secret' INSTALLED_APPS = ('opencivicdata.apps.BaseConfig', 'pupa',) # scrape settings SCRAPELIB_RPM = 60 SCRAPELIB_TIMEOUT = 60 SCRAPELIB_RETRY_ATTEMPTS = 3...
bsd-3-clause
Python
7f557e95073ad06d79439b95b9c6ca5aecde33de
Update version
lyst/lightfm,maciejkula/lightfm
lightfm/__init__.py
lightfm/__init__.py
from .lightfm import LightFM __version__ = '1.11' __all__ = ['LightFM', 'datasets', 'evaluation']
from .lightfm import LightFM __version__ = '1.9' __all__ = ['LightFM', 'datasets', 'evaluation']
apache-2.0
Python
1ef80abd679bb99b76725a27ae971f2d6082a63b
Add notification bar.
Livit/Livit.Learn.EdX,Livit/Livit.Learn.EdX,Livit/Livit.Learn.EdX,Livit/Livit.Learn.EdX
lms/envs/labster.py
lms/envs/labster.py
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import import urlparse LABSTER_SETTINGS = ENV_TOKENS.get('LABSTER_SETTINGS', {}) LABSTER_AUTH = AUTH_TOKENS.get('LABSTER_AUTH', {}) FEATURES['CUSTOM_COURSES_EDX'] = True FEATURES['SHOW_LABSTER_NOTIFICATION'] = True LABSTER_FEATURES = { "ENABL...
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import import urlparse LABSTER_SETTINGS = ENV_TOKENS.get('LABSTER_SETTINGS', {}) LABSTER_AUTH = AUTH_TOKENS.get('LABSTER_AUTH', {}) FEATURES['CUSTOM_COURSES_EDX'] = True LABSTER_FEATURES = { "ENABLE_WIKI": True, } ENV_LABSTER_FEATURES = LAB...
agpl-3.0
Python
3def282c7ce3d99b68f9c796c9155c39b723e557
fix CSRF exemption
resmio/django-sendgrid
sendgrid/views.py
sendgrid/views.py
from django.views.generic import View from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.utils.timezone import utc from django.conf import settings import json import datetime from .models import Email import signals class SendgridHook(View): @csrf_exempt d...
from django.views.generic import View from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.utils.timezone import utc from django.conf import settings import json import datetime from .models import Email import signals class SendgridHook(View): @csrf_exempt d...
bsd-2-clause
Python
c676b1b46893e2376a559f188f97aeae54e218ca
Change to module which can be easily imported
hiepph/leopica,hiepph/leopica
sensors/gy_521.py
sensors/gy_521.py
import smbus import math power_mgmt_1 = 0x6b power_mgmt_2 = 0x6c bus = smbus.SMBus(1) address = 0x68 bus.write_byte_data(address, power_mgmt_1, 0) def read_byte(adr): return bus.read_byte_data(address, adr) def read_word(adr): high = bus.read_byte_data(address, adr) low = bus.read_byte_data(address, adr...
#! /usr/bin/python3 import smbus import math power_mgmt_1 = 0x6b power_mgmt_2 = 0x6c def read_byte(adr): return bus.read_byte_data(address, adr) def read_word(adr): high = bus.read_byte_data(address, adr) low = bus.read_byte_data(address, adr+1) val = (high << 8) + low return val def read_wo...
mit
Python
39ad4665b21703b6876514cd829e5cddb560eece
Add instaflights endpoint
Jamil/sabre_dev_studio
sabre_dev_studio/sabre_endpoints.py
sabre_dev_studio/sabre_endpoints.py
sabre_endpoints = { 'instaflights': '/v1/shop/flights' }
sabre_endpoints = { 'instaflights': '' }
mit
Python
8061c64f783bc75fd5e71e00e69d7b178d4a0740
Remove wizard import (unused)
clubit/sale-workflow
sale_fixed_delivery_day/__init__.py
sale_fixed_delivery_day/__init__.py
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 Clubit BVBA # ( http://www.clubit.be). # # This program is free software: you can redistribute it and/or modify # it under th...
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 Clubit BVBA # ( http://www.clubit.be). # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
Python
5444609f470e93b328b9f06cd065bf7dda5bbae4
Fix attribute name
CloudNcodeInc/sendgrid-django
sgbackend/mail.py
sgbackend/mail.py
# -*- encoding: utf-8 -*- from __future__ import absolute_import, unicode_literals import sendgrid from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.base import BaseEmailBackend from . import utils __all__ = ('SendGridBackend', ) class SendGrid...
# -*- encoding: utf-8 -*- from __future__ import absolute_import, unicode_literals import sendgrid from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.base import BaseEmailBackend from . import utils __all__ = ('SendGridBackend', ) class SendGrid...
mit
Python
8db13cbeaa571c3bf5e112e45624138e4d2ee3cc
update unit test, more explicit message
sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper,sdpython/pyquickhelper
_unittests/ut_pycode/test_pip_helper.py
_unittests/ut_pycode/test_pip_helper.py
""" @brief test tree node (time=11s) """ import sys import os import unittest import re import shutil import warnings import pandas try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "...
""" @brief test tree node (time=11s) """ import sys import os import unittest import re import shutil import warnings import pandas try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "...
mit
Python
9334046abdbe1b815329ccb6da1ea152dbc6b92d
Fix comments.
deepmind/acme,deepmind/acme
acme/wrappers/atari_wrapper_dopamine.py
acme/wrappers/atari_wrapper_dopamine.py
# Copyright 2018 DeepMind Technologies Limited. 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 ...
# Copyright 2018 DeepMind Technologies Limited. 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 ...
apache-2.0
Python
fcfac9cb420c39f1ed8342cadacfa1984a93f19b
remove the name from init
hbrunn/OpenUpgrade,bealdav/OpenUpgrade,tangyiyong/odoo,blaggacao/OpenUpgrade,salaria/odoo,havt/odoo,janocat/odoo,syci/OCB,janocat/odoo,odootr/odoo,waytai/odoo,fdvarela/odoo8,zchking/odoo,leorochael/odoo,ingadhoc/odoo,grap/OCB,juanalfonsopr/odoo,rschnapka/odoo,frouty/odoogoeen,avoinsystems/odoo,guewen/OpenUpgrade,Codefa...
addons/point_of_sale/wizard/__init__.py
addons/point_of_sale/wizard/__init__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
Python
acc87f5fdcfa22a7b3a85c69203100c74c8e800e
Remove warnings
thoas/django-separatedvaluesfield
separatedvaluesfield/tests/tests.py
separatedvaluesfield/tests/tests.py
from django import forms from django.test import TestCase from .models import Project, RequiredProject class SeparatedValuesFieldTests(TestCase): def test_basics(self): project = Project(name='monthly') self.assertEqual(project.languages, None) langs = ['en', 'fr'] project.langu...
from django import forms from django.test import TestCase from .models import Project, RequiredProject class SeparatedValuesFieldTests(TestCase): def test_basics(self): project = Project(name='monthly') self.assertEqual(project.languages, None) langs = ['en', 'fr'] project.langu...
mit
Python
e72c22aef558da3a6a6deb6de63f80706245b61a
Add a verbose logging to mission (disabled by default.)
kcaa/kcaa,kcaa/kcaa,kcaa/kcaa,kcaa/kcaa
server/kcaa/manipulators/mission.py
server/kcaa/manipulators/mission.py
#!/usr/bin/env python import datetime import logging import time import base from kcaa import screens logger = logging.getLogger('kcaa.manipulators.automission') class CheckMissionResult(base.Manipulator): def run(self): logger.info('Checking mission result') yield self.screen.check_mission_r...
#!/usr/bin/env python import logging import time import base from kcaa import screens logger = logging.getLogger('kcaa.manipulators.automission') class CheckMissionResult(base.Manipulator): def run(self): logger.info('Checking mission result') yield self.screen.check_mission_result() class ...
apache-2.0
Python
88e276952639711f1bca7774cd04d96a5564aae3
bump 2.0.1-->2.1.0.dev1
ankostis/smmap
smmap/__init__.py
smmap/__init__.py
"""Intialize the smmap package""" __author__ = "Sebastian Thiel" __contact__ = "byronimo@gmail.com" __homepage__ = "https://github.com/Byron/smmap" version_info = (2, 1, 0, 'dev1') __version__ = '.'.join(str(i) for i in version_info) # make everything available in root package for convenience from .mman import * from...
"""Intialize the smmap package""" __author__ = "Sebastian Thiel" __contact__ = "byronimo@gmail.com" __homepage__ = "https://github.com/Byron/smmap" version_info = (2, 1, 0, 'dev0') __version__ = '.'.join(str(i) for i in version_info) # make everything available in root package for convenience from .mman import * from...
bsd-3-clause
Python
c10621a5be587f531de9de61c8a185e4f2ade59a
make gl entries for submitted sales invoice where no gl entries exists
gangadharkadam/verveerp,indictranstech/osmosis-erpnext,mbauskar/helpdesk-erpnext,Tejal011089/digitales_erpnext,indictranstech/buyback-erp,hatwar/focal-erpnext,gangadharkadam/tailorerp,Tejal011089/fbd_erpnext,rohitwaghchaure/GenieManager-erpnext,saurabh6790/trufil_app,rohitwaghchaure/erpnext-receipher,gangadharkadam/ver...
patches/november_2013/p01_make_gl_entries_for_si.py
patches/november_2013/p01_make_gl_entries_for_si.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt import webnotes def execute(): si_no_gle = webnotes.conn.sql("""select si.name from `tabSales Invoice` si where docstatus=1 and not exists(select name from `tabGL Entry` where voucher_type='Sales I...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt import webnotes def execute(): si_no_gle = webnotes.conn.sql("""select si.name from `tabSales Invoice` si where docstatus=1 and not exists(select name from `tabGL Entry` where voucher_type='Sales I...
agpl-3.0
Python
a0e8d3f6f1e4d26da0010f67993b8ebeba8d83a4
Bump 5.2.1
penguinolog/logwrap,penguinolog/logwrap
logwrap/__init__.py
logwrap/__init__.py
# Copyright 2016-2018 Alexey Stepanov aka penguinolog # # Copyright 2016 Mirantis, 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/licens...
# Copyright 2016-2018 Alexey Stepanov aka penguinolog # # Copyright 2016 Mirantis, 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/licens...
apache-2.0
Python
acc7f70de3f5e05e61f1d7caf2cd250d0e695012
enumerate each preset as its own test
NervanaSystems/coach,NervanaSystems/coach,NervanaSystems/coach
rl_coach/tests/presets/test_presets.py
rl_coach/tests/presets/test_presets.py
# nasty hack to deal with issue #46 import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) import pytest import os import time import shutil from subprocess import Popen, DEVNULL from rl_coach.logger import screen def all_presets(): result = [] for f in sorted(os.l...
# nasty hack to deal with issue #46 import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) import pytest import os import time import shutil from subprocess import Popen, DEVNULL from rl_coach.logger import screen @pytest.mark.integration_test def test_all_presets_are_runn...
apache-2.0
Python
508e8d161746b82ac63e66eedafb917a0a3f4535
Bump version to 0.1.2.dev
ellmetha/django-machina,reinbach/django-machina,ellmetha/django-machina,reinbach/django-machina,franga2000/django-machina,franga2000/django-machina,franga2000/django-machina,ellmetha/django-machina,reinbach/django-machina
machina/__init__.py
machina/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os __version__ = '0.1.2.dev' MACHINA_VANILLA_APPS = [ 'machina', 'machina.apps.forum', 'machina.apps.forum_conversation', 'machina.apps.forum_conversation.forum_attachments', 'machina.apps.forum_conversation.forum_polls', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os __version__ = '0.1.1' MACHINA_VANILLA_APPS = [ 'machina', 'machina.apps.forum', 'machina.apps.forum_conversation', 'machina.apps.forum_conversation.forum_attachments', 'machina.apps.forum_conversation.forum_polls', 'ma...
bsd-3-clause
Python
3fb1c14f750afa742f476e3b2fcc4d39662554e3
Change unicode rep to use Subject text
crcresearch/osf.io,Nesiehr/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,chrisseto/osf.io,icereval/osf.io,brianjgeiger/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,aaxelb/osf.io,aaxelb/osf.io,chrisseto/osf.io,felliott/osf.io,cslzchen/osf.io,HalcyonChimera/osf.io,mfraezz/osf.io,leb2dg/osf.io,caseyrollins/...
osf/models/subject.py
osf/models/subject.py
# -*- coding: utf-8 -*- from django.db import models from website.util import api_v2_url from osf.models.base import BaseModel, ObjectIDMixin class Subject(ObjectIDMixin, BaseModel): """A subject discipline that may be attached to a preprint.""" modm_model_path = 'website.project.taxonomies.Subject' mod...
# -*- coding: utf-8 -*- from django.db import models from website.util import api_v2_url from osf.models.base import BaseModel, ObjectIDMixin class Subject(ObjectIDMixin, BaseModel): """A subject discipline that may be attached to a preprint.""" modm_model_path = 'website.project.taxonomies.Subject' mod...
apache-2.0
Python
615d61aff5da1753a79c4e3f904d4404b136d8f6
Fix minor bug with response.with_header function.
adeel/pump
pack/util/response.py
pack/util/response.py
import os skeleton = {"status": 200, "headers": {}, "body": ""} def with_body(body): "Return a skeleton response with the given body." return dict(skeleton, body=body) def redirect(url): "Return a redirect response to the given URL." return {"status": 302, "headers": {"Location": url}, "body": ""} def with_...
import os skeleton = {"status": 200, "headers": {}, "body": ""} def with_body(body): "Return a skeleton response with the given body." return dict(skeleton, body=body) def redirect(url): "Return a redirect response to the given URL." return {"status": 302, "headers": {"Location": url}, "body": ""} def with_...
mit
Python
8fedb9076cb52d8a889fd4e33118435ec9789189
add getResources acc and default path for dbm files
druidops/beholder,druidops/beholder,lpefferkorn/beholder,lpefferkorn/beholder
rainbow/cache.py
rainbow/cache.py
#!/usr/bin/python2.7 # -*- coding: utf8 -*- """ Copyright [2014,2015] [beholder developers] This file is part of beholder project Provides a generic interface to allow rainbow to register resources. - get/put/update resources - dump to disk for persistence Licensed under the Apache License, Version 2.0 (the "Lice...
#!/usr/bin/python2.7 # -*- coding: utf8 -*- """ Copyright [2014,2015] [beholder developers] This file is part of beholder project Provides a generic interface to allow rainbow to register resources. - get/put/update resources - dump to disk for persistence Licensed under the Apache License, Version 2.0 (the "Lice...
apache-2.0
Python
4256b4bfc5b20b2d97867dbd276f255a343f7f2a
Bump the --build flag used by llvm configure to i386-apple-darwin11.4.0 to fix the build on mavericks.
BansheeMediaPlayer/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/mono-llvm.py
packages/mono-llvm.py
class MonoLlvmPackage (GitHubPackage): def __init__ (self): GitHubPackage.__init__ (self, 'mono', 'llvm', '3.0', revision = 'e656caccc7dfb5c51c208906f0e176f0973f030f', configure_flags = ['--enable-optimized', '--enable-targets="x86 x86_64"' ] ) if Package.profile.name == 'darwin' and not Package.profile....
class MonoLlvmPackage (GitHubPackage): def __init__ (self): GitHubPackage.__init__ (self, 'mono', 'llvm', '3.0', revision = 'e656caccc7dfb5c51c208906f0e176f0973f030f', configure_flags = ['--enable-optimized', '--enable-targets="x86 x86_64"' ] ) if Package.profile.name == 'darwin' and not Package.profile....
mit
Python
18f78874eb06a228cbd3f9e73e95be565cb7570f
Update predicates.py
dedupeio/dedupe,neozhangthe1/dedupe,davidkunio/dedupe,dedupeio/dedupe-examples,01-/dedupe,davidkunio/dedupe,tfmorris/dedupe,nmiranda/dedupe,nmiranda/dedupe,dedupeio/dedupe,neozhangthe1/dedupe,01-/dedupe,datamade/dedupe,pombredanne/dedupe,tfmorris/dedupe,pombredanne/dedupe,datamade/dedupe
dedupe/predicates.py
dedupe/predicates.py
#!/usr/bin/python # -*- coding: utf-8 -*- import re def tokenFieldPredicate(field): """returns the tokens""" return tuple(field.split()) def commonIntegerPredicate(field): """"return any integers""" return tuple(re.findall("\d+", field)) def nearIntegersPredicate(field): """return any integer...
#!/usr/bin/python # -*- coding: utf-8 -*- import re def wholeFieldPredicate(field): """return the whole field""" if field: return (field, ) else: return () def tokenFieldPredicate(field): """returns the tokens""" return tuple(field.split()) def commonIntegerPredicate(field):...
mit
Python
49067acc356503f27b132183edc0884d8fd43af3
Test autojit specialized extension attribute type recognition
gdementen/numba,jriehl/numba,seibert/numba,stefanseefeld/numba,gmarkall/numba,numba/numba,sklam/numba,pitrou/numba,seibert/numba,pitrou/numba,gmarkall/numba,stefanseefeld/numba,cpcloud/numba,IntelLabs/numba,sklam/numba,IntelLabs/numba,gmarkall/numba,stuartarchibald/numba,IntelLabs/numba,jriehl/numba,pombredanne/numba,g...
numba/exttypes/tests/test_type_recognition.py
numba/exttypes/tests/test_type_recognition.py
""" >>> test_typeof() """ import numba from numba import * def make_base(compiler): @compiler class Base(object): value1 = double value2 = int_ @void(int_, double) def __init__(self, value1, value2): self.value1 = value1 self.value2 = value2 retur...
""" >>> test_typeof() """ import sys import numba from numba import * from nose.tools import raises @jit class Base(object): value1 = double value2 = int_ @void(int_, double) def __init__(self, value1, value2): self.value1 = value1 self.value2 = value2 @jit class Derived(Base): ...
bsd-2-clause
Python
df49dc2ae7fceeddd2aa34bf1be5c8340f3e6f06
Refactor variable usage
pasupulaphani/spacy-nlp-docker,pasupulaphani/spacy-nlp-docker,pasupulaphani/spacy-nlp-docker
zeromq/server.py
zeromq/server.py
import zerorpc import os import logging, sys import json import spacy import spacy.util logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) sys.path.append(os.path.join(os.path.dirname(__file__), '../spacyParser')) from parse import Parse from entities import Entities from noun_chunks import NounChunks port ...
import zerorpc import os import logging, sys import json import spacy import spacy.util logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) sys.path.append(os.path.join(os.path.dirname(__file__), '../spacyParser')) from parse import Parse from entities import Entities from noun_chunks import NounChunks port ...
mit
Python
708e56f5d0eda81d5103543364c827cceb5d5e01
Implement webadapter
kanosaki/PicDump,kanosaki/PicDump
picdump/webadapter.py
picdump/webadapter.py
import urllib.request class WebAdapter: def get(self, urllike): url = self.mk_url(urllike) try: res = urllib.request.urlopen(url) return res.read() except Exception as e: raise e def open(self, urllike): url = self.mk_url(urllike) t...
class WebAdapter: pass
mit
Python
e2d53eac958171b30eae94e3b58d012d3caa8c8d
make admin menu test more solid
shoopio/shoop,shoopio/shoop,shoopio/shoop
shuup_tests/browser/admin/test_menu.py
shuup_tests/browser/admin/test_menu.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import os import pytest import selenium from django.core.urlresolvers imp...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import os import pytest from django.core.urlresolvers import reverse fro...
agpl-3.0
Python
31756e62c8003d6819c5a128e6ddce9b8dd868a5
Replace ugettext_laxy
weinbusch/django-tex
django_tex/models.py
django_tex/models.py
from django.db import models from django.core.exceptions import ValidationError from django.template import TemplateDoesNotExist from django.utils.translation import gettext_lazy as _ from django.template.loader import get_template def validate_template_path(name): try: get_template(name, using="tex") ...
from django.db import models from django.core.exceptions import ValidationError from django.template import TemplateDoesNotExist from django.utils.translation import ugettext_lazy as _ from django.template.loader import get_template def validate_template_path(name): try: get_template(name, using="tex") ...
mit
Python
6f3b451a6f3436578c5e9ff3fc0a56593574bec1
bump version to 0.12.1
ivelum/djangoql,ivelum/djangoql,ivelum/djangoql
djangoql/__init__.py
djangoql/__init__.py
__version__ = '0.12.1'
__version__ = '0.12.0'
mit
Python
34da1ef556f82df845bfe314c69d1653a63e19b6
bump version to 0.1.2
ivelum/djangoql,ivelum/djangoql,artinnok/djangoql,artinnok/djangoql,ivelum/djangoql,artinnok/djangoql
djangoql/__init__.py
djangoql/__init__.py
__version__ = '0.1.2'
__version__ = '0.1.1'
mit
Python
4f6521b14cf9c33107d74038f75a533d465fc564
remove Windows support
DMOJ/judge,DMOJ/judge,DMOJ/judge
dmoj/executors/BF.py
dmoj/executors/BF.py
import itertools import six from six.moves import map from dmoj.executors.C import Executor as CExecutor from dmoj.error import CompileError template = b'''\ #define _GNU_SOURCE #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> int main(int argc, char **argv) { char *p; size_t ...
import itertools import six from six.moves import map from dmoj.executors.C import Executor as CExecutor from dmoj.error import CompileError template = b'''\ #define _GNU_SOURCE #include <errno.h> #include <stdio.h> #include <stdlib.h> #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> #else # inc...
agpl-3.0
Python
78a1d328267f94277f9cbeb7a3618dd602646345
Fix dependency bug
CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,MickSandoz/compassion-switzerland,MickSandoz/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switz...
partner_compassion_switzerland/__openerp__.py
partner_compassion_switzerland/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # ______ Releasing children from poverty _ # / ____/___ ____ ___ ____ ____ ___________(_)___ ____ # / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ # / /___/ /_/ / / / / / / /...
# -*- encoding: utf-8 -*- ############################################################################## # # ______ Releasing children from poverty _ # / ____/___ ____ ___ ____ ____ ___________(_)___ ____ # / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ # / /___/ /_/ / / / / / / /...
agpl-3.0
Python
1f2b667b2fb02afefbec5b3e57c167d69b7e6f89
add django1.10 templaet settinsg
LegoStormtroopr/django-spaghetti-and-meatballs,LegoStormtroopr/django-spaghetti-and-meatballs
django_spaghetti/tests/settings.py
django_spaghetti/tests/settings.py
""" Django settings for data_interrogator project. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DI...
""" Django settings for data_interrogator project. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DI...
mit
Python
6e67e2882c71e291dc1f161ffc7638f42c86ddbc
Fix zmq communications module Does not hang when connection is unavailable
olfa-lab/DmdLib
dmdlib/randpatterns/ephys_comms.py
dmdlib/randpatterns/ephys_comms.py
""" Module handling the communication with OpenEphys. """ import zmq TIMEOUT_MS = 250 # time to wait for ZMQ socket to respond before error. HOSTNAME = 'localhost' PORT = 5556 _ctx = zmq.Context() # should be only one made per process. def send_message(msg, hostname=HOSTNAME, port=PORT): """ sends a messa...
import zmq def send_message(msg, hostname='localhost', port=5556): """ sends a message to openephys ZMQ socket. :param msg: string :param hostname: ip address to send to :param port: zmq port number :return: none """ with zmq.Context() as ctx: with ctx.socket(zmq.REQ) as sock: ...
mit
Python
3a70ab28b1cb50804a26533d47531cb4e0cb003c
remove setup.py refrence to GitPython, the version is specified in requirements-common.txt
Bitergia/allura,apache/allura,lym/allura-git,Bitergia/allura,heiths/allura,heiths/allura,apache/incubator-allura,heiths/allura,Bitergia/allura,apache/allura,apache/incubator-allura,lym/allura-git,Bitergia/allura,heiths/allura,lym/allura-git,Bitergia/allura,apache/allura,apache/allura,apache/incubator-allura,heiths/allu...
ForgeGit/setup.py
ForgeGit/setup.py
from setuptools import setup, find_packages import sys, os from forgegit.version import __version__ setup(name='ForgeGit', version=__version__, description="", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords=''...
from setuptools import setup, find_packages import sys, os from forgegit.version import __version__ setup(name='ForgeGit', version=__version__, description="", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords=''...
apache-2.0
Python
0d61ff29fb2a363d41e0bd3c03933d5d3d843c76
prepare consume Ethernet frame
Jitrixis/2ARC-Network-stack
Frame/Ethernet.py
Frame/Ethernet.py
__author__ = 'jitrixis' class Ethernet: def __init__(self): self.__src = '00:00:00:00:00:00' self.__dst = 'ff:ff:ff:ff:ff:ff' self.__type = 0x0000 '''Destination MAC Address''' def getDst(self): return self.__dst def setDst(self, dst): self.__dst = dst ...
__author__ = 'jitrixis' class Ethernet: def __init__(self): self.__src = '00:00:00:00:00:00' self.__dst = 'ff:ff:ff:ff:ff:ff' self.__type = 0x0000 '''Destination MAC Address''' def getDst(self): return self.__dst def setDst(self, dst): self.__dst = dst ...
mit
Python
bc0fd22fb29af63097cc91da72fe5827cd2d2773
Improve record format.
andrewguy9/diskwarmer
diskwarmer/vmtouchparser.py
diskwarmer/vmtouchparser.py
from pyparsing import nums as digits from pyparsing import alphas, LineStart, LineEnd, Word, Literal, Regex, ZeroOrMore, OnlyOnce from collections import namedtuple whole_number = Word(digits) whole_number_ratio = whole_number + Literal("/") + whole_number rational_number = Regex("[0-9]+\.[0-9]+") unit = Regex("[BKM...
from pyparsing import nums as digits from pyparsing import alphas, LineStart, LineEnd, Word, Literal, Regex, ZeroOrMore, OnlyOnce from collections import namedtuple whole_number = Word(digits) whole_number_ratio = whole_number + Literal("/") + whole_number rational_number = Regex("[0-9]+\.[0-9]+") unit = Regex("[BKM...
mit
Python
3d3d6ef8393339f7246e6c6a9693d883ca3246f2
Remove the __MARCONI_SETUP_ global from init
openstack/zaqar,openstack/zaqar,rackerlabs/marconi,openstack/zaqar,openstack/zaqar
marconi/__init__.py
marconi/__init__.py
# Copyright (c) 2013 Rackspace Hosting, 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 ...
# Copyright (c) 2013 Rackspace Hosting, 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 ...
apache-2.0
Python
8ac9efdd5927cefae02bbd77871108a51e19897f
add upadte_permissions_user function (accepts a list of permissions)
theatlantic/djangotoolbox
djangotoolbox/auth/utils.py
djangotoolbox/auth/utils.py
from djangotoolbox.auth.models import UserPermissionList, GroupPermissionList, GroupList def add_to(obj, list_cls, filter): obj_list, created = list_cls.objects.get_or_create(**filter) obj_list.fk_list.append(obj.id) obj_list.save() def add_permission_to_user(perm, user): add_to(perm, UserPermissionL...
from djangotoolbox.auth.models import UserPermissionList, GroupPermissionList, GroupList def add_to(obj, list_cls, filter): obj_list, created = list_cls.objects.get_or_create(**filter) obj_list.fk_list.append(obj.id) obj_list.save() def add_permission_to_user(perm, user): add_to(perm, UserPermissionL...
bsd-3-clause
Python
e265be235d615c12b6a314c42e6f861190b9da70
discard changes to README after pandoc conversion
barbagroup/pygbe,barbagroup/pygbe,barbagroup/pygbe
docs/update_index.py
docs/update_index.py
import os import subprocess with open('../README.md', 'r') as f: readme = f.readlines() #remove DOI badge from readme before conversion to RST for line in readme: if '[DOI]' in line: readme.remove(line) with open('../README.md', 'w') as f: f.writelines(readme) #convert README to rst for file in ...
import os import subprocess #remove DOI badge from readme before conversion to RST with open('../README.md', 'r') as f: readme = f.readlines() for line in readme: if '[DOI]' in line: readme.remove(line) with open('../README.md', 'w') as f: f.writelines(readme) #convert README to rst for file in ...
bsd-3-clause
Python
ec78d362d21d420fe6ee24bf888cb6fc2af37611
add version 2.6.1, update build system (#10405)
iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/git-lfs/package.py
var/spack/repos/builtin/packages/git-lfs/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class GitLfs(MakefilePackage): """Git LFS is a system for managing and versioning large files in...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class GitLfs(Package): """Git LFS is a system for managing and versioning large files in ...
lgpl-2.1
Python
4e4e3d192ec3a96d51e1f2afaeeb7a351826a094
Add old version of py-gast (#13806)
LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/py-gast/package.py
var/spack/repos/builtin/packages/py-gast/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyGast(PythonPackage): """Python AST that abstracts the underlying Python version""" ...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyGast(PythonPackage): """Python AST that abstracts the underlying Python version""" ...
lgpl-2.1
Python
e05d165f92a684e6f1299f90ece87d3f7befa3f2
Add latest version of py-idna (#13313)
LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/py-idna/package.py
var/spack/repos/builtin/packages/py-idna/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) # from spack import * class PyIdna(PythonPackage): """Internationalized Domain Names for Python (IDNA 2008 and UTS #...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) # from spack import * class PyIdna(PythonPackage): """Internationalized Domain Names for Python (IDNA 2008 and UTS #...
lgpl-2.1
Python
08af7967fbb20a0b3fe3b04dd9337ff90610a792
Fix password validation tests
lorenzogil/yith-library-server,lorenzogil/yith-library-server,lorenzogil/yith-library-server
yithlibraryserver/password/tests/test_validation.py
yithlibraryserver/password/tests/test_validation.py
# Yith Library Server is a password storage server. # Copyright (C) 2012-2013 Yaco Sistemas # Copyright (C) 2012-2013 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012-2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is...
# Yith Library Server is a password storage server. # Copyright (C) 2012-2013 Yaco Sistemas # Copyright (C) 2012-2013 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012-2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is...
agpl-3.0
Python
159db028cfa951a111b4cc7e3f369674509cf30c
Implement upload prefixes
bodylabs/drf-to-s3,pombredanne/drf-to-s3,pombredanne/drf-to-s3,pombredanne/drf-to-s3,bodylabs/drf-to-s3,bodylabs/drf-to-s3,pombredanne/drf-to-s3,bodylabs/drf-to-s3,bodylabs/drf-to-s3,pombredanne/drf-to-s3
drf_to_s3/access_control.py
drf_to_s3/access_control.py
from django.utils.translation import ugettext as _ def upload_bucket(): ''' The upload bucket. Exposed here for convenience, as you may need to send it to the client to easily dev/prod configuration. ''' from django.conf import settings return settings.AWS_UPLOAD_BUCKET def upload_prefix_...
from django.utils.translation import ugettext as _ def upload_bucket(): ''' The upload bucket. Exposed here for convenience, as you may need to send it to the client to easily dev/prod configuration. ''' from django.conf import settings return settings.AWS_UPLOAD_BUCKET def upload_prefix_...
mit
Python
b62758c644eab23c3cf6e773e2d044bd0b3f5e86
add master url to socket client
maxpumperla/elephas,maxpumperla/elephas
elephas/parameter/client.py
elephas/parameter/client.py
from __future__ import absolute_import from __future__ import print_function import abc import numpy as np import socket import six.moves.cPickle as pickle try: import urllib.request as urllib2 except ImportError: import urllib2 from ..utils.sockets import determine_master, send, receive class BaseParameter...
from __future__ import absolute_import from __future__ import print_function import abc import numpy as np import socket import six.moves.cPickle as pickle try: import urllib.request as urllib2 except ImportError: import urllib2 from ..utils.sockets import determine_master, send, receive class BaseParameter...
mit
Python
6fe73f555b5a7a580a76265be2b30c03816a6052
Add SQL migration, re #6700
archesproject/arches,archesproject/arches,archesproject/arches,archesproject/arches
arches/app/models/migrations/6700_unique_nodename.py
arches/app/models/migrations/6700_unique_nodename.py
# Generated by Django 2.2.13 on 2020-10-09 19:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("models", "6492_add_date_datatype_configs"), ] def forward_migrate(apps, schema_editor, with_create_permissions=True): node_model = apps.get...
# Generated by Django 2.2.13 on 2020-10-09 19:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("models", "6492_add_date_datatype_configs"), ] def forward_migrate(apps, schema_editor, with_create_permissions=True): node_model = apps.get...
agpl-3.0
Python
96bb6182b35965051b7e63adb66f9ec0c1c310c7
Update download.py
connoranderson/Speechables,connoranderson/Speechables,connoranderson/Speechables,connoranderson/Speechables,connoranderson/Speechables,connoranderson/Speechables,connoranderson/Speechables
download/download.py
download/download.py
import pafy url = "https://www.youtube.com/watch?v=bMt47wvK6u0" video = pafy.new(url)
apache-2.0
Python
ad4240e6e36a3935967031904f1b3f6ce9c698fd
Update Departamento.py
AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb
backend/Models/Departamento/Departamento.py
backend/Models/Departamento/Departamento.py
class Departamento(object): def __init__(self,departamento): self.id = departamento.getId() self.nome = departamento.getNome() self.id_campus = dpartamento.getId_campus()
class Departamento(object): def __init__(self,departamento): self.id = departamento.getId() self.nome = departamento.getNome()
mit
Python
2bf0702ec0cac9d5a6733386d495c9d895e962cb
Add my-app on reset
smart-classic/smart_server,smart-classic/smart_server
bootstrap_helpers/bootstrap_applications.py
bootstrap_helpers/bootstrap_applications.py
from django.conf import settings from smart.models import * from string import Template import re import sys import os from django.utils import simplejson import urllib2 from load_tools.load_one_app import LoadApp, LoadAppFromJSON def sub(str, var, val): return str.replace("{%s}"%var, val) # Some basic apps and a...
from django.conf import settings from smart.models import * from string import Template import re import sys import os from django.utils import simplejson import urllib2 from load_tools.load_one_app import LoadApp, LoadAppFromJSON def sub(str, var, val): return str.replace("{%s}"%var, val) # Some basic apps and a...
apache-2.0
Python
d2dc4e8bcdf7219a35d829c835c76dde49b9de10
update User model: rename email_notification field
jupiny/EnglishDiary,jupiny/EnglishDiary,jupiny/EnglishDiary
english_diary/users/models/user.py
english_diary/users/models/user.py
from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) email_notification = models.BooleanField( default=True, )
from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) receive_email_notifications = models.BooleanField( default=True, )
mit
Python
7a571230e9678f30e6178da01769424213471355
Add missing libapol rolequery import.
TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools
libapol/__init__.py
libapol/__init__.py
"""The SETools SELinux policy analysis library.""" # Copyright 2014, Tresys Technology, LLC # # This file is part of SETools. # # SETools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2...
"""The SETools SELinux policy analysis library.""" # Copyright 2014, Tresys Technology, LLC # # This file is part of SETools. # # SETools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2...
lgpl-2.1
Python
3545776fd35ef4c7d7e5a1603c28977f884097cb
Add the pylint disabler
f-prettyland/angr,chubbymaggie/angr,axt/angr,tyb0807/angr,schieb/angr,angr/simuvex,iamahuman/angr,f-prettyland/angr,tyb0807/angr,angr/angr,f-prettyland/angr,chubbymaggie/simuvex,angr/angr,tyb0807/angr,axt/angr,schieb/angr,chubbymaggie/simuvex,axt/angr,angr/angr,schieb/angr,iamahuman/angr,chubbymaggie/simuvex,chubbymagg...
simuvex/procedures/syscalls/stub.py
simuvex/procedures/syscalls/stub.py
import simuvex ###################################### # stub, for unsupported syscalls ###################################### #pylint:disable=redefined-builtin,arguments-differ class stub(simuvex.SimProcedure): IS_SYSCALL = True def run(self, resolves=None): self.resolves = resolves # pylint:disab...
import simuvex ###################################### # stub, for unsupported syscalls ###################################### #pylint:disable=redefined-builtin,arguments-differ class stub(simuvex.SimProcedure): IS_SYSCALL = True def run(self, resolves=None): self.resolves = resolves return...
bsd-2-clause
Python
e671c55d0415886083e7555b6349295d5fe2a81c
Fix Accuracy for binary classification (#830)
intel-analytics/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL,yangw1234/BigDL,yangw1234/BigDL
python/dllib/src/bigdl/dllib/keras/metrics.py
python/dllib/src/bigdl/dllib/keras/metrics.py
# # Copyright 2018 Analytics Zoo 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...
# # Copyright 2018 Analytics Zoo 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...
apache-2.0
Python
d5c68f445013bca0a7f3417809e013da5d5b6728
Remove deprecated fast_suite
ovnicraft/odoo_addons,tiexinliu/odoo_addons,bmya/odoo_addons,chadyred/odoo_addons,ovnicraft/odoo_addons,chadyred/odoo_addons,bmya/odoo_addons,tiexinliu/odoo_addons,odoocn/odoo_addons,odoocn/odoo_addons,bmya/odoo_addons,odoocn/odoo_addons,ovnicraft/odoo_addons,chadyred/odoo_addons,tiexinliu/odoo_addons
smile_action_rule/tests/__init__.py
smile_action_rule/tests/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
agpl-3.0
Python
e6c41d8bd83b6710114a9d37915a0b3bbeb78d2a
Replace phone number and avoid sending SMS for load testing
eicher31/compassion-modules,eicher31/compassion-modules,ecino/compassion-modules,ecino/compassion-modules,CompassionCH/compassion-modules,ecino/compassion-modules,CompassionCH/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-modules,eicher31/compassion-modules,ecino/compassion-modules,ecino/compas...
sms_sponsorship/tests/load_tests.py
sms_sponsorship/tests/load_tests.py
# coding: utf-8 # pylint: disable=W7936 from locust import HttpLocust, TaskSet, task from random import randint class SmsSponsorWorkflow(TaskSet): @task(1) def send_sms(self): url = "/sms/mnc?sender=%2B4199{}&service=compassion&text=test".format( randint(1000000, 9999999)) self.cl...
# coding: utf-8 # pylint: disable=W7936 from locust import HttpLocust, TaskSet, task from random import randint class SmsSponsorWorkflow(TaskSet): @task(1) def send_sms(self): url = "/sms/mnc?sender=%2B41789364{}&service=compassion".format( randint(100, 999)) self.client.get(url) ...
agpl-3.0
Python
de69b88f47714848e4a73b6375d9665fb48faeda
Increment version number to 0.5.0
cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab
climlab/__init__.py
climlab/__init__.py
__version__ = '0.5.0' # this should ensure that we can still import constants.py as climlab.constants from climlab.utils import constants from climlab.utils import thermo, legendre # some more useful shorcuts from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel from climlab.model....
__version__ = '0.5.0.dev0' # this should ensure that we can still import constants.py as climlab.constants from climlab.utils import constants from climlab.utils import thermo, legendre # some more useful shorcuts from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel from climlab.m...
mit
Python
feb46fccee8f07d1ad563440cf52b344594f411c
Order by -count, name as there are duplicate names
YoQuieroSaber/yournextrepresentative,mysociety/yournextrepresentative,openstate/yournextrepresentative,DemocracyClub/yournextrepresentative,openstate/yournextrepresentative,mysociety/yournextmp-popit,neavouli/yournextrepresentative,mysociety/yournextrepresentative,datamade/yournextmp-popit,datamade/yournextmp-popit,dat...
cached_counts/models.py
cached_counts/models.py
from django.db import models from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify class CachedCount(models.Model): """ Fairly generic model for storing counts of various sorts. The object_id is used for linking through to the relevant URL. """ count_type...
from django.db import models from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify class CachedCount(models.Model): """ Fairly generic model for storing counts of various sorts. The object_id is used for linking through to the relevant URL. """ count_type...
agpl-3.0
Python
f93b5c911054ef3b08d002451a09c07fff1d00f7
Add LAMBDA_AT
architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst
cea/demand/constants.py
cea/demand/constants.py
# -*- coding: utf-8 -*- """ This file contains the constants used in the building energy demand calculations """ __author__ = "Gabriel Happle" __copyright__ = "Copyright 2018, Architecture and Building Systems - ETH Zurich" __credits__ = ["Gabriel Happle"] __license__ = "MIT" __version__ = "0.1" __maintainer__ = "Daren...
# -*- coding: utf-8 -*- """ This file contains the constants used in the building energy demand calculations """ __author__ = "Gabriel Happle" __copyright__ = "Copyright 2018, Architecture and Building Systems - ETH Zurich" __credits__ = ["Gabriel Happle"] __license__ = "MIT" __version__ = "0.1" __maintainer__ = "Daren...
mit
Python
23cee9a1fbd1ad7430970b452dcfba554c09a77d
Update for v2.3.0
maxmind/minfraud-api-python,maxmind/minfraud-api-python
minfraud/version.py
minfraud/version.py
"""Internal module for version (to prevent cyclic imports)""" __version__ = "2.3.0"
"""Internal module for version (to prevent cyclic imports)""" __version__ = "2.2.0"
apache-2.0
Python
539611a9dec5db3264de612be5cb9af8de79de06
Allow building packages that only have variants defined
mesosphere-mergebot/mergebot-test-dcos,darkonie/dcos,xinxian0458/dcos,BenWhitehead/dcos,mellenburg/dcos,branden/dcos,mellenburg/dcos,kensipe/dcos,xinxian0458/dcos,lingmann/dcos,dcos/dcos,mesosphere-mergebot/dcos,mellenburg/dcos,vishnu2kmohan/dcos,branden/dcos,jeid64/dcos,jeid64/dcos,jeid64/dcos,mesosphere-mergebot/dcos...
pkgpanda/build/cli.py
pkgpanda/build/cli.py
"""Panda package builder Reads a buildinfo file, uses it to assemble the sources and determine the package version, then builds the package in an isolated environment along with the necessary dependencies. Usage: mkpanda [--repository-url=<repository_url>] [--dont-clean-after-build] mkpanda tree [--mkbootstrap] [...
"""Panda package builder Reads a buildinfo file, uses it to assemble the sources and determine the package version, then builds the package in an isolated environment along with the necessary dependencies. Usage: mkpanda [--repository-url=<repository_url>] [--dont-clean-after-build] mkpanda tree [--mkbootstrap] [...
apache-2.0
Python
7c1975c46fb9920c6fde99779558bbb1bd2137e0
simplify the visualization example
abenicho/isvr
plot_visualization.py
plot_visualization.py
""" Simple example to show data manipulation and visualization. """ ### NIfTI: haxby ############################################################## # Haxby: Fetch data from nisl import datasets haxby = datasets.fetch_haxby() # Haxby: Get the files relative to this dataset files = haxby.files bold = files[1] # Haxby...
### NIfTI: haxby ############################################################## # Haxby: Fetch data from nisl import datasets haxby = datasets.fetch_haxby() # Haxby: Get the files relative to this dataset files = haxby.files bold = files[1] # Haxby: Load the NIfTI data import nibabel data = nibabel.load(bold).get_da...
bsd-3-clause
Python
fdd57913aa11c29ecf160f32a9091e59de598899
Update translate plugin to new message format
ProtoxiDe22/Octeon
plugins/YTranslate.py
plugins/YTranslate.py
""" Yandex Translation API """ import logging from urllib.parse import quote from telegram import Bot, Update from telegram.ext import Updater from requests import post import constants # pylint: disable=E0401 import settings import octeon LOGGER = logging.getLogger("YTranslate") YAURL = "https://translate.yandex.ne...
""" Yandex Translation API """ import logging from urllib.parse import quote from telegram import Bot, Update from telegram.ext import Updater from requests import post import constants # pylint: disable=E0401 import settings LOGGER = logging.getLogger("YTranslate") YAURL = "https://translate.yandex.net/api/v1.5/tr....
mit
Python
fe4676d9636813aee660b8637789d0c6e33137f6
change format
shortdudey123/SysInfoAPI
src/filesystem.py
src/filesystem.py
#!/usr/bin/env python # ============================================================================= # file = filesystem.py # description = Gets file system data # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-29 # mod_date = 2014-07-29 # version = 0.1 # usage = # notes = # python_ver = 2.7.6...
#!/usr/bin/env python # ============================================================================= # file = filesystem.py # description = Gets file system data # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-29 # mod_date = 2014-07-29 # version = 0.1 # usage = # notes = # python_ver = 2.7.6...
apache-2.0
Python
61a544c56a9a74f37ece908fed55233a015ae193
Update ensure_path.py
richardseifert/Hydra_pipeline
libs/ensure_path.py
libs/ensure_path.py
import os def ensure_path(path): ''' This function checks if a path to a directory exists. If the path exists, this function does nothing but return the given path. If the path does not exist, then it makes all of the necessary directories for the path to exist. ARGUMENTS: path - String ...
import os def ensure_path(path): ''' This function checks if a path to a directory exists. If the path exists, this function does nothing but return the given path. If the path does not exist, then it makes all of the necessary directories for the path to exist. ARGUMENTS: path - String ...
mit
Python
ad14ccd195510c482a29bf3943036da389ac5c6c
Update the external binaries version
the-ress/electron,shiftkey/electron,wan-qy/electron,Floato/electron,seanchas116/electron,shiftkey/electron,wan-qy/electron,electron/electron,bpasero/electron,bpasero/electron,seanchas116/electron,gerhardberger/electron,seanchas116/electron,bpasero/electron,gerhardberger/electron,bpasero/electron,gerhardberger/electron,...
script/update-external-binaries.py
script/update-external-binaries.py
#!/usr/bin/env python import errno import sys import os from lib.config import get_target_arch from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download VERSION = 'v1.2.1' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'http://github.com/electron/electron-fra...
#!/usr/bin/env python import errno import sys import os from lib.config import get_target_arch from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download VERSION = 'v1.2.0' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'http://github.com/electron/electron-fra...
mit
Python
ae570159d3774caf990af567ce60b81e3da2d5db
remove unused imports
ssadedin/seqr,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/seqr
seqr/management/commands/copy_project_tags.py
seqr/management/commands/copy_project_tags.py
from django.core.management.base import BaseCommand from django.db.models.query_utils import Q from seqr.models import Project, VariantTagType class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--source', help='Project to copy tags from', required=True) parser.add_...
from django.core.management.base import BaseCommand, CommandError from django.db.models.query_utils import Q from seqr.models import Project, VariantTagType from seqr.model_utils import create_seqr_model class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--source', help='Pr...
agpl-3.0
Python
c8c00f8d825534f2493a1478bdf462412ab84a36
use ods3
chfw/pyexcel,chfw/pyexcel
examples/basics/read_excel_book.py
examples/basics/read_excel_book.py
""" read_excel_book.py :copyright: (c) 2014-2015 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details This shows how to use get_book to go through a multiple sheet spreadsheet. """ import os import pyexcel as pe import pyexcel.ext.ods3 def main(base_dir): # Simply give a name to the Book...
""" read_excel_book.py :copyright: (c) 2014-2015 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details This shows how to use get_book to go through a multiple sheet spreadsheet. """ import os import pyexcel as pe import pyexcel.ext.ods def main(base_dir): # Simply give a name to the Book ...
bsd-3-clause
Python
73c4a95726fa23e9bdf9eeaad1570d75080634c2
Use complete namespace for describing type in documentation.
LowieHuyghe/edmunds
src/Edmunds/Support/ServiceProvider.py
src/Edmunds/Support/ServiceProvider.py
import abc class ServiceProvider(object): """ The Service Provider """ __metaclass__ = abc.ABCMeta def __init__(self, app): """ Initialize the application :param app: The application :type app: Edmunds.Application """ self.app = app @abc.abstractmethod def register(self): """ Register...
import abc class ServiceProvider(object): """ The Service Provider """ __metaclass__ = abc.ABCMeta def __init__(self, app): """ Initialize the application :param app: The application :type app: Application """ self.app = app @abc.abstractmethod def register(self): """ Register the ser...
apache-2.0
Python