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
ca786d14261dcb00e2b27ca9414c7a1cbb335b48
Update sample config
vikasgorur/wrangler
config.sample.py
config.sample.py
class Config: # These are both for the app that belongs to the handler's account CONSUMER_KEY = '' CONSUMER_SECRET = '' # Generate these tokens by running get_oauth_token.py OAUTH_TOKEN = '' OAUTH_TOKEN_SECRET = '' EBOOKS_COMMAND = 'ebooks gen /home/vikas/shakti_ebooks/model/shakti_shetty....
class Config: CONSUMER_KEY = '' CONSUMER_SECRET = '' OAUTH_TOKEN = '' OAUTH_TOKEN_SECRET = '' EBOOKS_COMMAND = 'ebooks gen /Users/vikas/workspace/shakti_ebooks/model/shakti_shetty.model' BOT_NAME = 'shakti_ebooks' HANDLER_NAME = 'vikasgorur'
mit
Python
0eb7216c9d182a4c306c81a7bacc3030970b5191
Add data model of league points won, tie to CompetitionSeasons
soccermetrics/marcotti-mls
models/statistics.py
models/statistics.py
from sqlalchemy import Column, Integer, String, ForeignKey, Sequence, Index, ForeignKeyConstraint from sqlalchemy.orm import relationship, backref from models.common import BaseSchema class CommonStats(BaseSchema): """ Data model of common season statistics for football players. """ __tablename__ = '...
from sqlalchemy import Column, Integer, String, ForeignKey, Sequence, Index from sqlalchemy.orm import relationship, backref from models.common import BaseSchema class CommonStats(BaseSchema): """ Data model of common season statistics for football players. """ __tablename__ = 'common_stats' id ...
mit
Python
19b167f7fccc4ab2f3989b910f2756ec9be3f004
use stestdata
gipit/gippy,gipit/gippy
test/utils.py
test/utils.py
import gippy from stestdata import TestData # TODO - download landsat test image if not already def get_test_image(): """ get test image """ t = TestData('landsat8') fnames = [None, None] for k, v in t.examples[t.names[0]].iteritems(): if v['band_type'] == 'red': fnames[0] = v['pa...
import os import glob import gippy # TODO - download landsat test image if not already def get_test_image(): """ get test image """ # look in samples directory #dirs = [d for d in os.listdir(os.path.join(path, 'samples')) if os.path.isdir(d)] bname = os.path.join(os.path.dirname(__file__), 'samples/la...
apache-2.0
Python
2f3471504e6902046435dfdf31b584eacf9a814f
prepare for release 1.2.155-dev
coryb/aminator,Netflix/aminator,bmoyles/aminator,kvick/aminator
aminator/__init__.py
aminator/__init__.py
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
apache-2.0
Python
3cbef4a35f74872bb491fbcf50507efb2f2783ae
Fix exception inheritance
wooey/Wooey,wooey/Wooey,wooey/Wooey,wooey/Wooey
wooey/errors.py
wooey/errors.py
class ParserError(Exception): pass class DuplicateScriptError(Exception): pass
class ParserError(BaseException): pass class DuplicateScriptError(BaseException): pass
bsd-3-clause
Python
91077b9a723e102b740666f56fa1502674d2752d
Bump version number
toabctl/py2pack,saschpe/py2pack
py2pack/__init__.py
py2pack/__init__.py
__doc__ = 'Generate distribution packages from Python packages on PyPI' __author__ = 'Sascha Peilicke <saschpe@gmx.de>' __version__ = '0.3.14' from py2pack import list, search, fetch, generate, main
__doc__ = 'Generate distribution packages from Python packages on PyPI' __author__ = 'Sascha Peilicke <saschpe@gmx.de>' __version__ = '0.3.13' from py2pack import list, search, fetch, generate, main
apache-2.0
Python
1b1e6df9af7a86f3e97d29178632fa9461f1f936
Use urllib2 instead of requests in tempest generate plugin list
Juniper/tempest,vedujoshi/tempest,cisco-openstack/tempest,cisco-openstack/tempest,vedujoshi/tempest,Juniper/tempest,openstack/tempest,masayukig/tempest,masayukig/tempest,openstack/tempest
tools/generate-tempest-plugins-list.py
tools/generate-tempest-plugins-list.py
#! /usr/bin/env python # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # 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...
#! /usr/bin/env python # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # 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...
apache-2.0
Python
6312f866e61458cdd8d322d169a63d53f82fa2f8
add objects interface
mylokin/mongoext
mongoext/document.py
mongoext/document.py
from __future__ import absolute_import import mongoext.collection import mongoext.fields import mongoext.exc class MetaDocument(type): def __new__(cls, name, bases, attrs): fields = {} for base in bases: for attr, obj in vars(base).iteritems(): if issubclass(type(obj),...
from __future__ import absolute_import import mongoext.collection import mongoext.fields import mongoext.exc class MetaDocument(type): def __new__(cls, name, bases, attrs): fields = {} for base in bases: for attr, obj in vars(base).iteritems(): if issubclass(type(obj),...
mit
Python
426380b3a46cad09e23a192d27bcca1dfc72cbb0
Fix relative import
vulpicastor/miniraf
miniraf/__init__.py
miniraf/__init__.py
import argparse from . import calc from . import combine from . import map as mmap from .combine import stack_fits_data from .calc import load_fits_data def _make_argparser(): argparser = argparse.ArgumentParser() subparsers = argparser.add_subparsers(help="sub-command help") calc.create_parser(subparser...
import argparse import calc import combine import map as mmap from combine import stack_fits_data from calc import load_fits_data def _make_argparser(): argparser = argparse.ArgumentParser() subparsers = argparser.add_subparsers(help="sub-command help") calc.create_parser(subparsers) combine.create_p...
mit
Python
c59cb4da0939b178fe61396dfa1aaf2ccb23030c
bump to 3.4.1
ibab/root_numpy,ibab/root_numpy,ndawe/root_numpy,scikit-hep/root_numpy,scikit-hep/root_numpy,scikit-hep/root_numpy,rootpy/root_numpy,scikit-hep/root_numpy,ndawe/root_numpy,ndawe/root_numpy,ibab/root_numpy,ibab/root_numpy,rootpy/root_numpy,rootpy/root_numpy,rootpy/root_numpy,ndawe/root_numpy
root_numpy/info.py
root_numpy/info.py
""" _ _ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _ | '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | | | | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| | |_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | {0} |_____| |_| ...
""" _ _ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _ | '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | | | | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| | |_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | {0} |_____| |_| ...
bsd-3-clause
Python
5256408a2a5d7a4c5562962a590487b39da3dcff
Use 'language' for query string instead of 'lang'
uktrade/directory-ui-supplier,uktrade/directory-ui-supplier,uktrade/directory-ui-supplier
core/helpers.py
core/helpers.py
from django.shortcuts import Http404 from django.utils import translation def handle_cms_response(response): if response.status_code == 404: raise Http404() response.raise_for_status() return response.json() def get_language_from_querystring(request): language_code = request.GET.get('languag...
from django.shortcuts import Http404 from django.utils import translation def handle_cms_response(response): if response.status_code == 404: raise Http404() response.raise_for_status() return response.json() def get_language_from_querystring(request): language_code = request.GET.get('lang') ...
mit
Python
9b0cd08ca4acc7f32b636fd085baaa42024d6e72
bump patch release
swistakm/pyrilla,swistakm/pyrilla
pyrilla/__init__.py
pyrilla/__init__.py
# -*- coding: utf-8 -*- VERSION = (0, 0, 2) # PEP 386 __version__ = ".".join([str(x) for x in VERSION]) from pyrilla.core import ( Sound, Voice, Mixer, Manager, )
# -*- coding: utf-8 -*- VERSION = (0, 0, 1) # PEP 386 __version__ = ".".join([str(x) for x in VERSION]) from pyrilla.core import ( Sound, Voice, Mixer, Manager, )
bsd-3-clause
Python
66e9bf5dea33fd9cf18048cad0fc3ed2baaec8e6
bump up version
thiagofa/pysendy
pysendy/__init__.py
pysendy/__init__.py
# -*- coding: utf-8 -*- from .pysendy import * """ See PEP 386 (http://www.python.org/dev/peps/pep-0386/) Release logic: 1. Remove "dev" from current. 2. git commit 3. git tag <version> 4. push to pypi + push to github 5. bump the version, append '.dev0' 6. git commit 7. push to github (to avoid confusion) """ __aut...
# -*- coding: utf-8 -*- from .pysendy import * """ See PEP 386 (http://www.python.org/dev/peps/pep-0386/) Release logic: 1. Remove "dev" from current. 2. git commit 3. git tag <version> 4. push to pypi + push to github 5. bump the version, append '.dev0' 6. git commit 7. push to github (to avoid confusion) """ __aut...
mit
Python
e6e34a1dc587f71c5cb68871cb145a148eb68537
FIX Fixed UTF8 enconding issue in the get_token.py script.
telefonicaid/fiware-figway,telefonicaid/fiware-figway,telefonicaid/fiware-figway
python/get_token.py
python/get_token.py
# Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U # # This file is part of FIGWAY software (a set of tools for FIWARE Orion ContextBroker and IDAS2.6). # # FIGWAY 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 ...
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FIGWAY software (a set of tools for FIWARE Orion ContextBroker and IDAS2.6). # # FIGWAY 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 ...
agpl-3.0
Python
885348bdc52db5adae84c43f9066d2493f53d4a5
bump pypi version to 1.9.21
GoogleCloudPlatform/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,aozarov/appengine-gcs-client,aozarov/appengine-gcs-client,aozarov/appengine-gcs-client
python/src/setup.py
python/src/setup.py
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.9.21.0", packages=setuptools.find_packages(), author="Google App Engine", aut...
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.9.15.0", packages=setuptools.find_packages(), author="Google App Engine", aut...
apache-2.0
Python
fbfc3522846d62ad77d586d1bf7066262f8e3378
Remove extra comma in about.py
wikimedia/pywikibot-wikibase
pywikibase/about.py
pywikibase/about.py
__name__ = 'pywikibase' __version__ = '0.0.5' __maintainer__ = 'The Pywikibot team' __maintainer_email__ = 'pywikibot@lists.wikimedia.org', __description__ = "Python package to handle Wikibase DataModel" __license__ = 'MIT License' __url__ = 'https://www.mediawiki.org/wiki/Pywikibot' all = [__name__, __version__, __ma...
__name__ = 'pywikibase' __version__ = '0.0.5' __maintainer__ = 'The Pywikibot team', __maintainer_email__ = 'pywikibot@lists.wikimedia.org', __description__ = "Python package to handle Wikibase DataModel" __license__ = 'MIT License' __url__ = 'https://www.mediawiki.org/wiki/Pywikibot' all = [__name__, __version__, __m...
mit
Python
30b64a6f93e4ae63873ade35b217ddf3866f87f8
Bump patch version to 0.33.2
conan-io/conan-package-tools
cpt/__init__.py
cpt/__init__.py
__version__ = '0.33.2' NEWEST_CONAN_SUPPORTED = "1.26.000" def get_client_version(): from conans.model.version import Version from conans import __version__ as client_version # It is a mess comparing dev versions, lets assume that the -dev is the further release return Version(client_version.replace(...
__version__ = '0.33.1' NEWEST_CONAN_SUPPORTED = "1.26.000" def get_client_version(): from conans.model.version import Version from conans import __version__ as client_version # It is a mess comparing dev versions, lets assume that the -dev is the further release return Version(client_version.replace(...
mit
Python
897ad207b500440d5abc9b2c413348d145f0980a
add infer checkpoint
liyi193328/seq2seq,liyi193328/seq2seq,liyi193328/seq2seq,liyi193328/seq2seq,liyi193328/seq2seq
run_scripts/infer_checkpoint.py
run_scripts/infer_checkpoint.py
#encoding=utf-8 import os import sys import codecs import click import shutil import make_seq2seq_data @click.group() def cli(): pass @click.command() @click.argument("ques_path") @click.argument("infer_path") @click.argument("ques_done_path") @click.argument("infer_done_path") @click.option("--overwrite", is_flag...
#encoding=utf-8 import os import sys import codecs import click import shutil import make_seq2seq_data @click.group() def cli(): pass @click.command() @click.argument("ques_path") @click.argument("infer_path") @click.argument("ques_done_path") @click.argument("infer_done_path") @click.option("--overwrite", is_flag...
apache-2.0
Python
ef0ecb89eca2f8d43f20ec43aacda0ce00002823
Bump version to 0.1.4
saschpe/rapport
rapport/__init__.py
rapport/__init__.py
# Copyright 2013 Sascha Peilicke # # 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...
# Copyright 2013 Sascha Peilicke # # 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...
apache-2.0
Python
1d701cd04ffb98128f674cd9f52ec11256893f4d
update version to 0.2.0
rsalmaso/django-reactjs,rsalmaso/django-reactjs
reactjs/__init__.py
reactjs/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2007-2015, Raffaele Salmaso <raffaele@salmaso.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation...
# -*- coding: utf-8 -*- # Copyright (C) 2007-2015, Raffaele Salmaso <raffaele@salmaso.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation...
mit
Python
fa6c8389de29faac11660312d8a9db3ec5e9220a
Remove deprecated django.utils.importlib
python-recsys/django-recommends,fcurella/django-recommends,python-recsys/django-recommends,fcurella/django-recommends
recommends/utils.py
recommends/utils.py
import contextlib import errno import os import time import tempfile import importlib def import_from_classname(class_name_str): module, class_name = class_name_str.rsplit('.', 1) Class = getattr(importlib.import_module(module), class_name) return Class def ctypes_dict(): from django.contrib.content...
import contextlib import errno import os import time import tempfile from django.utils import importlib def import_from_classname(class_name_str): module, class_name = class_name_str.rsplit('.', 1) Class = getattr(importlib.import_module(module), class_name) return Class def ctypes_dict(): from djan...
mit
Python
fe41fe9397e1f52e7f9186d08f4e24f35e76abbe
use the ensemble model for prediction
brityboy/BotBoosted
src/prediction_model.py
src/prediction_model.py
import pandas as pd import dill as pickle from load_test_data import * def load_pickled_model(filename): ''' INPUT - filename: str, path and name of the file OUTPUT - model: sklearn classifier model, fit already Returns the unpickled model ''' with open(filename, 'r') as f: ...
import pandas as pd import dill as pickle from load_test_data import * def load_pickled_model(filename): ''' INPUT - filename: str, path and name of the file OUTPUT - model: sklearn classifier model, fit already Returns the unpickled model ''' with open(filename, 'r') as f: ...
mit
Python
a906af72c040ac7d6d151b437b4f2adef433eb6e
Update parser.py
EmilStenstrom/conllu
conllu/parser.py
conllu/parser.py
from collections import OrderedDict, defaultdict from conllu.tree_helpers import create_tree def parse(text, to_parse): ''' to_parse - a list of columns to parse (id, form, lemma, upostag, xpostag, feats, head, deprel, deps or misc). ''' return list( [ parse_line(line, to_parse) ...
from collections import OrderedDict, defaultdict from conllu.tree_helpers import create_tree def parse(text): return list( [ parse_line(line) for line in sentence.split("\n") if line and not line.strip().startswith("#") ] for sentence in text.split("\n\n"...
mit
Python
7c95e75d739eae3d492bfdeb7454b435fc843b53
trim down required deps
plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash
packages/dash-html-components/setup.py
packages/dash-html-components/setup.py
from setuptools import setup exec (open('dash_html_components/version.py').read()) setup( name='dash_html_components', version=__version__, author='Chris Parmer', author_email='chris@plot.ly', packages=['dash_html_components'], include_package_data=True, license='MIT', description='Das...
from setuptools import setup exec (open('dash_html_components/version.py').read()) setup( name='dash_html_components', version=__version__, author='Chris Parmer', author_email='chris@plot.ly', packages=['dash_html_components'], include_package_data=True, license='MIT', description='Das...
mit
Python
e9ec1fdb1520bd50e5b588e350941c00e95dbc2a
Upgrade to v1.9.2
biolink/ontobio,biolink/ontobio
ontobio/__init__.py
ontobio/__init__.py
from __future__ import absolute_import __version__ = '1.9.2' from .ontol_factory import OntologyFactory from .ontol import Ontology, Synonym, TextDefinition from .assoc_factory import AssociationSetFactory from .io.ontol_renderers import GraphRenderer
from __future__ import absolute_import __version__ = '1.9.1' from .ontol_factory import OntologyFactory from .ontol import Ontology, Synonym, TextDefinition from .assoc_factory import AssociationSetFactory from .io.ontol_renderers import GraphRenderer
bsd-3-clause
Python
b11892305941ce27759d175c370ab9ff5bc4417a
Change BC to BCN in defaults.
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
emstrack/models.py
emstrack/models.py
from django.contrib.auth.models import User from django.contrib.gis.db import models from django.contrib.gis.geos import Point defaults = { 'location': Point(-117.0382, 32.5149, srid=4326), 'state': 'BCN', 'city': 'Tijuana', 'country': 'MX', } class AddressModel(models.Model): """ An abstrac...
from django.contrib.auth.models import User from django.contrib.gis.db import models from django.contrib.gis.geos import Point defaults = { 'location': Point(-117.0382, 32.5149, srid=4326), 'state': 'BC', 'city': 'Tijuana', 'country': 'MX', } class AddressModel(models.Model): """ An abstract...
bsd-3-clause
Python
299ef729f84b97967a07e7b03e8fbf622ca3cfeb
fix delay in emulation
andres-erbsen/rrtcp,andres-erbsen/rrtcp,andres-erbsen/rrtcp
emulation/rrtcp.py
emulation/rrtcp.py
#!/usr/bin/python from mininet.topo import Topo from mininet.net import Mininet from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections from mininet.log import setLogLevel import time class SingleSwitchTopo(Topo): "Single switch connected to n hosts." ...
#!/usr/bin/python from mininet.topo import Topo from mininet.net import Mininet from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections from mininet.log import setLogLevel import time class SingleSwitchTopo(Topo): "Single switch connected to n hosts." ...
apache-2.0
Python
19d64eebcf07d17986a76f957b9530533b3037f5
Add murano-api to PYTHONPATH
sajuptpm/murano,DavidPurcell/murano_temp,NeCTAR-RC/murano,ativelkov/murano-api,openstack/murano,sergmelikyan/murano,NeCTAR-RC/murano,NeCTAR-RC/murano,sajuptpm/murano,olivierlemasle/murano,telefonicaid/murano,openstack/murano,DavidPurcell/murano_temp,chenyujie/hybrid-murano,telefonicaid/murano,ativelkov/murano-api,olivi...
muranoapi/cmd/api.py
muranoapi/cmd/api.py
#!/usr/bin/env python # # Copyright (c) 2013 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/licenses/LICENSE-2.0 # # Unless re...
#!/usr/bin/env python # # Copyright (c) 2013 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/licenses/LICENSE-2.0 # # Unless re...
apache-2.0
Python
46c9aa915b14deab899b207877d25d107902246f
Fix the way datadog tags arg is formatted
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/celery.py
corehq/celery.py
from __future__ import absolute_import, unicode_literals import datetime import os import django from celery.signals import after_task_publish, task_prerun from django.core.cache import cache from django.core.checks import run_checks from django.core.exceptions import AppRegistryNotReady from celery import Celery f...
from __future__ import absolute_import, unicode_literals import datetime import os import django from celery.signals import after_task_publish, task_prerun from django.core.cache import cache from django.core.checks import run_checks from django.core.exceptions import AppRegistryNotReady from celery import Celery f...
bsd-3-clause
Python
24ce17b42902868658e63388728ec286cbebf6a5
Add 'create_user' method to base testcase
interactomix/iis,interactomix/iis
tests/base.py
tests/base.py
import tempfile from datetime import datetime import flask_testing from flask import url_for from flask_login import current_user import iis from iis.models import User from iis.database import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI = "sqlite:///"...
import tempfile from datetime import datetime import flask_testing from flask import url_for from flask_login import current_user import iis from iis.models import User from iis.database import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI = "sqlite:///"...
agpl-3.0
Python
a4996412bae67c4d4c170e74da8ff3a885010c11
check for spyder
interrogator/corpkit,interrogator/corpkit
corpkit/tests.py
corpkit/tests.py
def check_pytex(): """checks for pytex, i hope""" import inspect thestack = [] for bit in inspect.stack(): for b in bit: thestack.append(str(b)) as_string = ' '.join(thestack) if 'pythontex' in as_string: return True else: return False def check_spyder():...
def check_pytex(): """checks for pytex, i hope""" import inspect thestack = [] for bit in inspect.stack(): for b in bit: thestack.append(str(b)) as_string = ' '.join(thestack) if 'pythontex' in as_string: return True else: return False def check_dit(): ...
mit
Python
e866e196f72f9965dfbca1f7628c8b90e5c627dc
Fix the location path of OpenIPSL
OpenIPSL/OpenIPSL,SmarTS-Lab/OpenIPSL,tinrabuzin/OpenIPSL,SmarTS-Lab/OpenIPSL
CI/syntaxCheck.py
CI/syntaxCheck.py
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
bsd-3-clause
Python
300e00f7f3e80949292b5068a591933f0679c555
Fix broken paths in setup script.
mthomure/glimpse-project,mthomure/glimpse-project,mthomure/glimpse-project
cython_setup.py
cython_setup.py
#!/usr/bin/env python # Copyright (c) 2011 Mick Thomure # All rights reserved. # # Please see the file COPYING in this distribution for usage # terms. from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy #### Control Flags for Compilation ####...
#!/usr/bin/env python # Copyright (c) 2011 Mick Thomure # All rights reserved. # # Please see the file COPYING in this distribution for usage # terms. from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy #### Control Flags for Compilation ####...
mit
Python
d7e33871d28f946812e3384260321636f8b65346
Update vars.py
jenfly/atmos-tools
atmos/vars.py
atmos/vars.py
import numpy as np import xray mp = ('Atmosphere, Ocean, and Climate Dynamics: An Introductory Text,' 'by John Marshall and R. Alan Plumb, 2008') constants = xray.Dataset() constants['g'] = xray.DataArray( 9.81, attrs={'name' : "Earth's surface gravity", 'units' : 'm s^-2', 'ref' : ...
import numpy as np import xray mp = 'Marshall and Plumb' constants = xray.Dataset() constants['g'] = xray.DataArray( 9.81, attrs={'name' : "Earth's surface gravity", 'units' : 'm s^-2', 'ref' : mp }) constants['R'] = xray.DataArray( 6.37e6, attrs={'name' : "Earth's me...
mit
Python
12f8460628f7e1c1ed05df0b21d858082737d0c0
Remove evm redundant parentheses
b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril
mythril/ether/evm.py
mythril/ether/evm.py
from ethereum import vm, messages, transactions from ethereum.state import State from ethereum.slogging import get_logger from mythril.ether import util from logging import StreamHandler from io import StringIO import re def trace(code, calldata=""): log_handlers = ['eth.vm.op', 'eth.vm.op.stack', 'eth.vm.op.memo...
from ethereum import vm, messages, transactions from ethereum.state import State from ethereum.slogging import get_logger from mythril.ether import util from logging import StreamHandler from io import StringIO import re def trace(code, calldata=""): log_handlers = ['eth.vm.op', 'eth.vm.op.stack', 'eth.vm.op.memo...
mit
Python
0057acea411c7c64995dc86cd826d5f5df5778b9
Remove API workers option
openstack/aodh,openstack/aodh
aodh/api/__init__.py
aodh/api/__init__.py
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
Python
eed21e06dbb61899e9c14352750258aa81cc5d3c
Sort yml items to get same results for regendoc runs
The-Compiler/pytest,pfctdayelise/pytest,malinoff/pytest,tomviner/pytest,hackebrot/pytest,rmfitzpatrick/pytest,nicoddemus/pytest,tomviner/pytest,RonnyPfannschmidt/pytest,skylarjhdownes/pytest,etataurov/pytest,hpk42/pytest,alfredodeza/pytest,nicoddemus/pytest,markshao/pytest,ddboline/pytest,hpk42/pytest,jaraco/pytest,The...
doc/en/example/nonpython/conftest.py
doc/en/example/nonpython/conftest.py
# content of conftest.py import pytest def pytest_collect_file(parent, path): if path.ext == ".yml" and path.basename.startswith("test"): return YamlFile(path, parent) class YamlFile(pytest.File): def collect(self): import yaml # we need a yaml parser, e.g. PyYAML raw = yaml.safe_load...
# content of conftest.py import pytest def pytest_collect_file(parent, path): if path.ext == ".yml" and path.basename.startswith("test"): return YamlFile(path, parent) class YamlFile(pytest.File): def collect(self): import yaml # we need a yaml parser, e.g. PyYAML raw = yaml.safe_load...
mit
Python
d1eeca9b102955967b165011a3a70d37424febdc
Correct typo
SLongofono/448_Project4,SLongofono/448_Project4
create_config.py
create_config.py
import os def prompt_and_verify(prompt): while True: value = raw_input(prompt) response = raw_input("You entered: " + str(value) + "\nIs this correct? (y/n): ") if (response == 'y'): break return value def go(): print "\n[ Setting up configuration file... ]\n" username = prompt_and_verify("\nEnter yo...
import os def prompt_and_verify(prompt): while True: value = raw_input(prompt) response = raw_input("You entered: " + str(value) + "\nIs this correct? (y/n): ") if (response == 'y'): break return value def go(): print "\n[ Setting up configuration file... ]\n" username = prompt_and_verify("\nEnter yo...
mit
Python
0fb90c43c5fab2a0b2d7a8684f26f6995d9aa212
Make go proto plugin configurable (#833)
Xjs/rules_go,Xjs/rules_go,bazelbuild/rules_go,bazelbuild/rules_go,bazelbuild/rules_go,Xjs/rules_go,Xjs/rules_go,Xjs/rules_go,bazelbuild/rules_go,bazelbuild/rules_go
proto/toolchain.bzl
proto/toolchain.bzl
_protoc_prefix = "protoc-gen-" def _emit_proto_compile(ctx, proto_toolchain, go_proto_toolchain, lib, importpath): go_srcs = [] outpath = None for proto in lib.proto.direct_sources: out = ctx.new_file(importpath + "/"+ proto.basename[:-len(".proto")] + ".pb.go") go_srcs += [out] if outpath == None: ...
def _emit_proto_compile(ctx, proto_toolchain, go_proto_toolchain, lib, importpath): go_srcs = [] outpath = None for proto in lib.proto.direct_sources: out = ctx.new_file(importpath + "/"+ proto.basename[:-len(".proto")] + ".pb.go") go_srcs += [out] if outpath == None: outpath = out.dirname[:-...
apache-2.0
Python
33b03a50f9818d900cd9ec280688e7771a313ed0
Revert "Expose csft2data to __init__"
yanqd0/csft
csft/__init__.py
csft/__init__.py
# -*- coding:utf-8 -*- """ Count Sizes of File Types """ from .__info__ import ( __author__, __version__, __email__, __copyright__, __license__, __url__, )
# -*- coding:utf-8 -*- """ Count Sizes of File Types """ from .__info__ import ( __author__, __version__, __email__, __copyright__, __license__, __url__, ) from .csft import ( csft2data, )
mit
Python
e10c5308cb6ad271c9c8324b2686d38f47f495dd
Modify logic
csm-aut/csm,kstaniek/csm,csm-aut/csm,smjurcak/csm,csm-aut/csm,csm-aut/csm,kstaniek/csm,smjurcak/csm,kstaniek/csm,smjurcak/csm,smjurcak/csm,kstaniek/csm
csmserver/gjm.py
csmserver/gjm.py
# ============================================================================= # Copyright (c) 2015, Cisco Systems, Inc # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sour...
# ============================================================================= # Copyright (c) 2015, Cisco Systems, Inc # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sour...
apache-2.0
Python
b6b0dc99e162cf0d123668066db9af0069fd5bab
Fix bug in vocabulary.py
robinjia/nectar,robinjia/nectar
nectar/vocabulary.py
nectar/vocabulary.py
"""A basic vocabulary class.""" import collections UNK_TOKEN = '<UNK>' UNK_INDEX = 0 class Vocabulary(object): def __init__(self, unk_threshold=0): """Initialize the vocabulary. Args: unk_threshold: words with <= this many counts will be considered <UNK>. """ self.unk_threshold = unk_threshol...
"""A basic vocabulary class.""" import collections UNK_TOKEN = '<UNK>' UNK_INDEX = 0 class Vocabulary(object): def __init__(self, unk_threshold=0): """Initialize the vocabulary. Args: unk_threshold: words with <= this many counts will be considered <UNK>. """ self.unk_threshold = 0 self.c...
mit
Python
37072f8e46d04adbc73f78f95b2af5d6ba217d3e
Add missing pytest marker
alisaifee/limits,alisaifee/limits
tests/test_ratelimit_parser.py
tests/test_ratelimit_parser.py
import unittest import pytest from limits.util import parse, parse_many, granularity_from_string from limits import limits @pytest.mark.unit class RatelimitParserTests(unittest.TestCase): def test_singles(self): for rl_string in ["1 per second", "1/SECOND", "1 / Second"]: self.assertEqual( ...
import unittest from limits.util import parse, parse_many, granularity_from_string from limits import limits class RatelimitParserTests(unittest.TestCase): def test_singles(self): for rl_string in ["1 per second", "1/SECOND", "1 / Second"]: self.assertEqual( parse(rl_string), l...
mit
Python
28c8e9fef839b48a4eb6b961557f031aa6686aa7
Remove token when session closes
sait-berkeley-infosec/pynessus-api
nessusapi/session.py
nessusapi/session.py
# session.py import random import xmltodict # try python 3 imports, fall back to python 2 try: from urllib.parse import urlencode from urllib.request import urlopen, Request from urllib.error import URLError, HTTPError except ImportError: from urllib import urlencode from urllib2 import urlopen, R...
# session.py import random import xmltodict # try python 3 imports, fall back to python 2 try: from urllib.parse import urlencode from urllib.request import urlopen, Request from urllib.error import URLError, HTTPError except ImportError: from urllib import urlencode from urllib2 import urlopen, R...
mit
Python
ab66140fd369c4722475bed6549dbb1eef35f74d
Simplify the example data
ppb/ppb-vector,ppb/ppb-vector
tests/test_vector2_truncate.py
tests/test_vector2_truncate.py
import pytest # type: ignore from hypothesis import assume, example, given, note from typing import Type, Union from utils import floats, lengths, vectors from ppb_vector import Vector2 @given(x=vectors(), max_length=lengths()) def test_truncate_length(x: Vector2, max_length: float): assert x.truncate(max_lengt...
import pytest # type: ignore from hypothesis import assume, example, given, note from typing import Type, Union from utils import floats, lengths, vectors from ppb_vector import Vector2 @given(x=vectors(), max_length=lengths()) def test_truncate_length(x: Vector2, max_length: float): assert x.truncate(max_lengt...
artistic-2.0
Python
88bf125cd9c5cbd1353885c164826be54bec445a
change some info logging to debug
jblance/mpp-solar
mppsolar/helpers.py
mppsolar/helpers.py
#!/usr/bin/env python3 import logging import re log = logging.getLogger("helpers") def get_kwargs(kwargs, key, default=None): if not key in kwargs or not kwargs[key]: return default return kwargs[key] def key_wanted(key, filter=None, excl_filter=None): # remove any specifically excluded keys ...
#!/usr/bin/env python3 import logging import re log = logging.getLogger("helpers") def get_kwargs(kwargs, key, default=None): if not key in kwargs or not kwargs[key]: return default return kwargs[key] def key_wanted(key, filter=None, excl_filter=None): # remove any specifically excluded keys ...
mit
Python
7f9a147eefc9eec7feb5b653950703d372407930
add example of methods with arbritary amount of arguments
nakednamor/naked-python
samples/methods.py
samples/methods.py
# methods are created using the def keyword and brackets def first_method (): print("I'm the first method") # methods are called as expected first_method() # methods can have arguments def parameter_method(param1, param2, param3): print("passed param1: " + param1) print("passed param2: " + param2) pri...
# methods are created using the def keyword and brackets def first_method (): print("I'm the first method") # methods are called as expected first_method() # methods can have arguments def parameter_method(param1, param2, param3): print("passed param1: " + param1) print("passed param2: " + param2) pri...
mit
Python
cb88e57d460493849a4ff8845f355882e00c9e59
Integrate LLVM at llvm/llvm-project@d709dcc09097
karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,Intel-Corporati...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "d709dcc0909716ce23c30d9884712766aec6a628" LLVM_SHA256 = "856e49474ef82d86613a94c7cdebf23ce91a79ef610c4a0e82d2d19d099d4231" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "b24436ac96bdf3f2c545fc85dc8af239d618c9c4" LLVM_SHA256 = "6af626445defe88eb4ccaa1ebdc6f7642775a8c8a64f2213157b4a16c26a2319" tf_http_archive( ...
apache-2.0
Python
647e200abea429724af2fe50f21c0fb13ef82653
Integrate LLVM at llvm/llvm-project@564e082d0954
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "564e082d0954e0beebfff994ac03471d926cd1d1" LLVM_SHA256 = "7480a29ae37e692c3c7851750fdd137c10eb711b069e8f51cfd75672e44f40f6" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "40d85f16c45e09c1e280bcb8e63342392036f1eb" LLVM_SHA256 = "18ab1503bfc9a032ce566f4b4a43b2ccf9a73602b15b2e0e26ba42904d5ad6fa" tfrt_http_archive( ...
apache-2.0
Python
4cba1c036bff8875329e0761ee8cd476e967b11f
Integrate LLVM at llvm/llvm-project@961fd77687d2
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "961fd77687d27089acf0a09ea29a87fb8ccd7522" LLVM_SHA256 = "7c225e465ae120daa639ca68339fe7f43796ab08ff0ea893579a067b8f875078" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4004fb6453d9cee1fc0160d6ebac62fa8e898131" LLVM_SHA256 = "faec068929d9f039b3f65d8f074bfbee4d9bdc0829b50f7848b110f2bf7c3383" tfrt_http_archive( ...
apache-2.0
Python
54a48066b83c1c90b38a068194b0167a9116c634
Integrate LLVM at llvm/llvm-project@0820c6ef6038
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "0820c6ef60383962ca7c9bbffd224d1d47f0c999" LLVM_SHA256 = "f0a9b3f7832f7c115c60a0ce446d0b34c4ee3955e6b056f5d2952ce8970ce79b" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "42a90e6017b04f218a398b46c331fb5a8336433d" LLVM_SHA256 = "fa1986c42aee428a9caa26a40398b33237657c36b5fdee07c0888d2440b3730a" tfrt_http_archive( ...
apache-2.0
Python
c7a56ae8636c8e5644be559b080dcd594b9a2484
Update scanForProducts.py
cmrust/boomscraper
scanForProducts.py
scanForProducts.py
#!/usr/bin/env python import sys import urllib2 import re def main(): # Take user input from CLI if len(sys.argv) > 2: category = sys.argv[1] subcategory = sys.argv[2] categoryStructure = parseProductPages(category,subcategory) print categoryStructure else: print "Usage: ./scanForProducts.py category sub...
#!/usr/bin/env python import sys import urllib2 import re def main(): # Take user input from CLI if len(sys.argv) > 2: category = sys.argv[1] subcategory = sys.argv[2] categoryStructure = parseProductPages(category,subcategory) print categoryStructure else: print "Usage: ./scanForProducts.py category sub...
mit
Python
d10ad4f5e143746db59468f0d676cde419ca886d
Integrate LLVM at llvm/llvm-project@c36ff6424f24
yongtang/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow-py...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "c36ff6424f249d3e2005fb0589337452cd7ddad3" LLVM_SHA256 = "6f236ad6089a59a347fe06f3b4ac2a9206837e39ac4f7cb88ebc797eece29b0c" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "577fea4e1a13319adf2b660f57bf570195a7f78d" LLVM_SHA256 = "0ec4987b7af1ccf251ee0097b78e8921600c9c5d748d79709bad74df0f504a0e" tf_http_archive( ...
apache-2.0
Python
d5791081918fcacfe8927c80286fe1d732b393b6
Integrate LLVM at llvm/llvm-project@bd7ece4e063e
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "bd7ece4e063e7afd08cbaa311878c09aadf5ec21" LLVM_SHA256 = "e9390dfa94c1143f35437bea8a011b030194e047bc3df45e2627cff88f83d2ed" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "cc4bfd7f59d5a0024ada2a5c2a6f46d53290882b" LLVM_SHA256 = "37536d911a0c82f6c5a0f3e3804c40781fac87f5f4457387cef9eaf9c8026f9f" tfrt_http_archive( ...
apache-2.0
Python
6dd8a940db1cd40df491764398ff8217d143b185
Integrate LLVM at llvm/llvm-project@4da47bee48a5
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4da47bee48a57cc5fa0256623dbd749c3bf14759" LLVM_SHA256 = "5376641bde40ca3829a31d6a91587e6dd0ea98f5fe124d842f3dc833d2dfaee2" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9f6ba4be26858a8c581b212efebe993e3c22e8d7" LLVM_SHA256 = "8134f6d29e93ad86b2c8a152695db90966b1279551be7e4f5ab65496dd7283b0" tfrt_http_archive( ...
apache-2.0
Python
6e15137e1d63eab72f6d2fb5c52dbe598930fec7
Integrate LLVM at llvm/llvm-project@d56b171ee965
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "d56b171ee965eba9ba30f4a479a9f2e1703105cf" LLVM_SHA256 = "bce89fe2ac52b1d3165d8e85c3df02da1a222f4f61dced63bbfe2fc35ad97d4a" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "703ded8dda2034353959d2336affe9bf66db9471" LLVM_SHA256 = "f179a90ed8f44e9347f7791fee9439b2541976d7ccc60ca72dffdc811f7d8cba" tfrt_http_archive( ...
apache-2.0
Python
19792d99f7e0f3a5b41235aae604f7800a44bb4f
Integrate LLVM at llvm/llvm-project@2bf8be79b10c
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "2bf8be79b10cc41064bdbe3d001c48669027ccfe" LLVM_SHA256 = "7cc446a20360a16926e83ac8b97de6af51d623dea3be680a5fa69d04f3c738cd" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "03512ae9bf31b725d8233c03094fd463b5f46285" LLVM_SHA256 = "7022aac9ace736042b9363fb8becb5bc17efd78c045592506d866d88b34ba271" tfrt_http_archive( ...
apache-2.0
Python
8997563a6971829a5ae837177a64c4564bb94f24
Integrate LLVM at llvm/llvm-project@4e77868c7c4b
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4e77868c7c4ba79ed025b87f84ce66fc8dca25d6" LLVM_SHA256 = "b564a29d3e47f9a8075ff34242e6aee6f43382a2751e4d8a7ba38c4e362c8541" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "ad1b8772cf6b16c1162bb8ff425679f5ff046ae9" LLVM_SHA256 = "9de72382111445c5b16e45c315d50b8ce200d8a903a3a2f818eccbe7e8aa59ec" tfrt_http_archive( ...
apache-2.0
Python
7e0f6c55e991559460bc72c12b6b367dd4ce6254
add lines apply
Strangemother/PlogBlock-CDP
cdp/plog/working.py
cdp/plog/working.py
from api import Plog from patterns import PlogBlock, PlogLine ''' Entry address(es): IP address: 10.243.14.48 Platform: Cisco IP Phone 7941, Capabilities: Host Phone Interface: FastEthernet0/15, Port ID (outgoing port): Port 1 Holdtime : 124 sec Version : SCCP41.8-2-1S advertisement version: 2 Duplex: full Power...
from api import Plog from patterns import PlogBlock, PlogLine f = open('test_data2.txt', 'r') plog = Plog(f, whitespace='|') # Capture a device object. device_block = PlogBlock('Device ID', ref='Device') footer_line = PlogLine('----------').anything() device_block.footer = footer_line lock = PlogBlock('Duplex', ref='R...
mit
Python
ad1421096a7692cd520d0e265c9a82dd00f5815d
allow api to accept mac_address to filter playlists
hub-ology/video_village,hub-ology/video_village,BrianPainter/video_village,hub-ology/video_village,BrianPainter/video_village,BrianPainter/video_village
schedules/views.py
schedules/views.py
from django.shortcuts import render from rest_framework import viewsets from schedules.models import ScheduleItem, WindowShow from schedules.serializers import ScheduleItemSerializer, WindowShowSerializer class ScheduleViewSet(viewsets.ModelViewSet): """ API Endpoint for videos. """ queryset = Schedu...
from django.shortcuts import render from rest_framework import viewsets from schedules.models import ScheduleItem, WindowShow from schedules.serializers import ScheduleItemSerializer, WindowShowSerializer class ScheduleViewSet(viewsets.ModelViewSet): """ API Endpoint for videos. """ queryset = Schedu...
mit
Python
ab746d431faeabfdf50da3b57a6fdfb74407bc39
Add getController, setController and getRenderer methods to View
onitake/Uranium,onitake/Uranium
Cura/View/View.py
Cura/View/View.py
from Cura.View.ClassicGLRenderer import ClassicGLRenderer #from Cura.View.GL2Renderer import GL2Renderer ## Abstract base class for view objects. class View(object): def __init__(self): super(View, self).__init__() self._renderer = ClassicGLRenderer() self._controller = None def getCon...
#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcontext): pass
agpl-3.0
Python
21a8c3462fe4e323833bc4a3b83a83a4203b91f5
Fix logic
emma4you/mfinante
scraper/scraper.py
scraper/scraper.py
from company_scraper import CompanyDataScraper import flask import settings app = flask.Flask(__name__) def scrape_company(year, cui, raw=False): my_url = settings.URL_PATH.format(settings.DOCUMENT_TEMPLATE.format(year), cui, settings.D...
from company_scraper import CompanyDataScraper import flask import settings app = flask.Flask(__name__) def scrape_company(year, cui, raw=False): my_url = settings.URL_PATH.format(settings.DOCUMENT_TEMPLATE.format(year), cui, settings.D...
mit
Python
4d2fbe81984385eb9f2b0531e650705c38e220e1
Allow the Frame's color to be user settable.
Moguri/bgui,Remwrath/bgui,marcioreyes/bgui,Moguri/bgui
bgui/Frame.py
bgui/Frame.py
from bgl import * from bgui.Widget import * class Frame(Widget): """Frame for storing other widgets""" def __init__(self, parent, name, size=[1, 1], pos=[0, 0], options=BGUI_DEFAULT): """ """ Widget.__init__(self, parent, name, size, pos, options) self.colors = ( (1, 1, 1, 1), (0,...
from bgl import * from bgui.Widget import * class Frame(Widget): """Frame for storing other widgets""" def __init__(self, parent, name, size=[1, 1], pos=[0, 0], options=BGUI_DEFAULT): """ """ Widget.__init__(self, parent, name, size, pos, options) def _draw(self): """Draw the window""" ...
mit
Python
a50e3a1b50a7284fe38205857d39e80d3d7abcd7
remove comments
shantnu/TwitterAnalyser,shantnu/TwitterAnalyser
Part1/twit1.py
Part1/twit1.py
import tweepy from local_config import * a=tweepy.OAuthHandler(cons_tok, cons_sec) a.set_access_token(app_tok, app_sec) a2=tweepy.API(a) # Search stuff tt=tweepy.Cursor(a2.search, q = "Python").items(5) for t in tt: print(t.text) t2= a2.trends_place(1) for t in t2[0]["trends"]: print(t['name'...
import tweepy from local_config import * a=tweepy.OAuthHandler(cons_tok, cons_sec) a.set_access_token(app_tok, app_sec) a2=tweepy.API(a) # Search stuff tt=tweepy.Cursor(a2.search, q = "Python").items(5) for t in tt: print(t.text) t2= a2.trends_place(1) for t in t2[0]["trends"]: print(t['name'...
agpl-3.0
Python
3e9619845c69ade2e02f54aad2de8c02dc559270
bump version
colinhoglund/piprepo
piprepo/__init__.py
piprepo/__init__.py
__version__ = '0.1.1' __description__ = 'piprepo creates PEP-503 compliant package repositories.'
__version__ = '0.1.0' __description__ = 'piprepo creates PEP-503 compliant package repositories.'
mit
Python
04b775afe587a24d8eff230c7add0bfa7ea499e9
add development warning to scriptine.file module
olt/scriptine
scriptine/files.py
scriptine/files.py
from scriptine import path, log import tarfile import warnings warnings.warn('scriptine.file module is still in development and will be changed') class file_collection(object): def __init__(self): self.files = [] self.base = path('.') def include(self, patterns, recursive=False): if i...
from scriptine import path, log import tarfile class file_collection(object): def __init__(self): self.files = [] self.base = path('.') def include(self, patterns, recursive=False): if isinstance(patterns, basestring): patterns = (patterns,) for pattern in patterns: ...
mit
Python
3e08e3e89d08dc85951c974999f34c29398f2112
add status for failed deliveries
Galithil/charon,NationalGenomicsInfrastructure/charon,NationalGenomicsInfrastructure/charon,pekrau/charon,Galithil/charon,pekrau/charon,Galithil/charon,pekrau/charon,NationalGenomicsInfrastructure/charon
charon/constants.py
charon/constants.py
" Charon: Various constants." import re # For CouchDB view ranges. # CouchDB uses the Unicode Collation Algorithm, which is not the same # as the ASCII collation sequence. The endkey is inclusive, by default. HIGH_CHAR = 'ZZZZZZZZ' IUID_RX = re.compile(r'^[0-9a-z]{32}$') ID_RX = re.compile(r'^[a-z][-._a-z0-9]*$', re...
" Charon: Various constants." import re # For CouchDB view ranges. # CouchDB uses the Unicode Collation Algorithm, which is not the same # as the ASCII collation sequence. The endkey is inclusive, by default. HIGH_CHAR = 'ZZZZZZZZ' IUID_RX = re.compile(r'^[0-9a-z]{32}$') ID_RX = re.compile(r'^[a-z][-._a-z0-9]*$', re...
mit
Python
2c18b5e41639f5fce64ab33b7ad3b8ffad6b74c5
Remove unnedded fields.
niwinz/needlestack
needlestack/base.py
needlestack/base.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): self.name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): def update(self, *args, **kwargs): """ Method that creates or updates some document on the search engine. """ raise NotImplementedError() def search(self, *ar...
bsd-3-clause
Python
6cfeb9bb08448e8671c145f07b2638e43db0d3d4
Update mssql_export.py
jmhwang/personal_utils
database/mssql_export.py
database/mssql_export.py
# -*-coding:cp949-*- # vim: set et:ts=4:sw=4 """ FOR WINDOWS exe 만들기 ========== pyinstall --onefile mssql_export.py * 이때 한글경로가 있으면 안됨 사용법 ====== mssql_export.exe db_name..tablename * db_name..tablename.csv 파일로 결과 저장 """ def export_table(table): import pyodbc import unicodecsv as csv ...
# -*-coding:cp949-*- # vim: set et:ts=4:sw=4 """ FOR WINDOWS exe 만들기 ========== pyinstall --onefile mssql_export.py * 이때 한글경로가 있으면 안됨 사용법 ====== mssql_export.exe db_name..tablename * db_name..tablename.csv 파일로 결과 저장 """ def export_table(table): import pyodbc import unicodecsv as csv ...
mit
Python
376e23e9c20f683bdddf3655a9860d8bcf089bc4
RENAME ALL THE THINGS!!!
ryansb/netHUD
nethud/nh_client.py
nethud/nh_client.py
""" An example client. Run simpleserv.py first before running this. """ import json from twisted.internet import reactor, protocol # a client protocol class NethackClient(protocol.Protocol): """Once connected, send a message, then print the result.""" def connectionMade(self): self.send_message('a...
""" An example client. Run simpleserv.py first before running this. """ import json from twisted.internet import reactor, protocol # a client protocol class EchoClient(protocol.Protocol): """Once connected, send a message, then print the result.""" def connectionMade(self): self.send_message('auth...
mit
Python
cf09237c9d889b83f76e22835cb62da3711b6342
Fix markdown issue on pypi
ktbyers/netmiko,ktbyers/netmiko
netmiko/__init__.py
netmiko/__init__.py
from __future__ import unicode_literals import logging # Logging configuration log = logging.getLogger(__name__) # noqa log.addHandler(logging.NullHandler()) # noqa from netmiko.ssh_dispatcher import ConnectHandler from netmiko.ssh_dispatcher import ssh_dispatcher from netmiko.ssh_dispatcher import redispatch from ...
from __future__ import unicode_literals import logging # Logging configuration log = logging.getLogger(__name__) # noqa log.addHandler(logging.NullHandler()) # noqa from netmiko.ssh_dispatcher import ConnectHandler from netmiko.ssh_dispatcher import ssh_dispatcher from netmiko.ssh_dispatcher import redispatch from ...
mit
Python
0fb29e151914bc94192640c6be04cf2257b3d78d
Disable media.tough_media_cases on Win8
hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,dednal/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-cros...
tools/perf/benchmarks/media.py
tools/perf/benchmarks/media.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import platform import sys from measurements import media from telemetry import test class Media(test.Test): """Obtains media metrics for key user scenar...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from measurements import media from telemetry import test class Media(test.Test): """Obtains media metrics for key user scenarios.""" test =...
bsd-3-clause
Python
e339c7af5a0bbe913b9ad41595b6b4c4e87756c9
remove 404 page
xyuanmu/you-get,lilydjwg/you-get,smart-techs/you-get,smart-techs/you-get,qzane/you-get,zmwangx/you-get,linhua55/you-get,lilydjwg/you-get,cnbeining/you-get,xyuanmu/you-get,qzane/you-get,zmwangx/you-get,linhua55/you-get,cnbeining/you-get
tests/test.py
tests/test.py
#!/usr/bin/env python import unittest from you_get import * from you_get.extractors import * from you_get.common import * class YouGetTests(unittest.TestCase): def test_freesound(self): freesound.download("http://www.freesound.org/people/Corsica_S/sounds/184419/", info_only=True) def test_magisto(s...
#!/usr/bin/env python import unittest from you_get import * from you_get.extractors import * from you_get.common import * class YouGetTests(unittest.TestCase): def test_freesound(self): freesound.download("http://www.freesound.org/people/Corsica_S/sounds/184419/", info_only=True) def test_magisto(s...
mit
Python
35952913ae647321d8d9d27d4a51c116814bbddb
Fix typo in 339978ff.
aaugustin/django-sesame,aaugustin/django-sesame
tests/urls.py
tests/urls.py
from django.urls import path, re_path from sesame.decorators import authenticate from sesame.views import LoginView from .views import show_user urlpatterns = [ # For test_decorators.TestAuthenticate path("authenticate/", authenticate(show_user)), path("authenticate/not_required/", authenticate(required=...
from django.urls import path, re_path from sesame.decorators import authenticate from sesame.views import LoginView from .views import show_user urlpatterns = [ # For test_decorators.TestAuthenticate path("authenticate/", authenticate(show_user)), path("authenticate/not_required/", authenticate(required=...
bsd-3-clause
Python
8d42b6d4cf4457f0f01894e45b871c23e454f592
Update version
newfies-dialer/newfies-dialer,romonzaman/newfies-dialer,berinhard/newfies-dialer,romonzaman/newfies-dialer,newfies-dialer/newfies-dialer,romonzaman/newfies-dialer,saydulk/newfies-dialer,laprice/newfies-dialer,emartonline/newfies-dialer,laprice/newfies-dialer,newfies-dialer/newfies-dialer,berinhard/newfies-dialer,Star2B...
newfies/__init__.py
newfies/__init__.py
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2B...
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2B...
mpl-2.0
Python
aa23b184981650c8ea9ea8e170310c66c8158b3e
Improve indico_unaccent
pferreir/indico,pferreir/indico,mic4ael/indico,pferreir/indico,OmeGak/indico,DirkHoffmann/indico,indico/indico,mvidalgarcia/indico,DirkHoffmann/indico,OmeGak/indico,mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,ThiefMaster/indico,mvidalgarcia/indico,DirkHoffmann/indico,mic4ael/indico,indico/indico,mvidalgarcia...
migrations/versions/201506051421_4074211727ba_add_indico_unaccent_function.py
migrations/versions/201506051421_4074211727ba_add_indico_unaccent_function.py
"""Add indico_unaccent function Revision ID: 4074211727ba Revises: 3f3a9554a6da Create Date: 2015-06-05 14:21:52.752777 """ from alembic import op, context # revision identifiers, used by Alembic. revision = '4074211727ba' down_revision = '3f3a9554a6da' # if you wonder why search_path is set and the two-argument `...
"""Add indico_unaccent function Revision ID: 4074211727ba Revises: 3f3a9554a6da Create Date: 2015-06-05 14:21:52.752777 """ from alembic import op # revision identifiers, used by Alembic. revision = '4074211727ba' down_revision = '3f3a9554a6da' SQL_FUNCTION_TEMPLATE = ''' CREATE FUNCTION indico_unaccent(value T...
mit
Python
aaf1a8e7da7320328a6598b9be02ac28408c4b34
bump version to 0.5dev
semio/ddf_utils
ddf_utils/__init__.py
ddf_utils/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.5.0-dev0' from . import (str, cli, datapackage, i18n, io, patch, qa, transformer, factory) from .datapackage import get_datapackage
# -*- coding: utf-8 -*- __version__ = '0.4.2-dev1' from . import (str, cli, datapackage, i18n, io, patch, qa, transformer, factory) from .datapackage import get_datapackage
mit
Python
3251be51fb1b25c9973dd4e5e08875cb304ddf77
handle single-digit state codes in geographical browse (e.g., Ireland) [#60544204]
emory-libraries/ddi-search,emory-libraries/ddi-search
ddisearch/geo/urls.py
ddisearch/geo/urls.py
from django.conf.urls import patterns, url from ddisearch.geo import views urlpatterns = patterns('', url(r'^$', views.browse, name='browse'), url(r'^(?P<continent>[A-Z]{2})/$', views.browse, name='continent'), url(r'^(?P<continent>[A-Z]{2})/(?P<country>[A-Z]{2})/$', views.browse, name='country'),...
from django.conf.urls import patterns, url from ddisearch.geo import views urlpatterns = patterns('', url(r'^$', views.browse, name='browse'), url(r'^(?P<continent>[A-Z]{2})/$', views.browse, name='continent'), url(r'^(?P<continent>[A-Z]{2})/(?P<country>[A-Z]{2})/$', views.browse, name='country'),...
apache-2.0
Python
6b50e7188870af655b2d3d638510a374d644d668
Bump version to 0.5.5
neutralio/nio-cli,nioinnovation/nio-cli
nio_cli/__init__.py
nio_cli/__init__.py
__version__ = '0.5.5'
__version__ = '0.5.4'
apache-2.0
Python
5391bc191ef1c5d5733e7e5f5235dcdab6c48894
append .log to log file names
rcbops/opencenter-agent,rcbops/opencenter-agent
roushagent/utils.py
roushagent/utils.py
#!/usr/bin/env python import logging import os import sys import traceback def detailed_exception(e): exc_type, exc_value, exc_traceback = sys.exc_info() full_traceback = repr( traceback.format_exception( exc_type, exc_value, exc_traceback)) return full_traceback class SplitFileHandl...
#!/usr/bin/env python import logging import os import sys import traceback def detailed_exception(e): exc_type, exc_value, exc_traceback = sys.exc_info() full_traceback = repr( traceback.format_exception( exc_type, exc_value, exc_traceback)) return full_traceback class SplitFileHandl...
apache-2.0
Python
43a579916608bad7b45925fe30f4630d0dfc8af1
make valgrind happy
hitstanley/libpomelo2,NetEase/libpomelo2,hitstanley/libpomelo2,tempbottle/libpomelo2,NetEase/libpomelo2,jiangzhuo/libpomelo2,jiangzhuo/libpomelo2,uus169/libpomelo2,Jennal/libpomelo2,hitstanley/libpomelo2,LosingLin/libpomelo2,uus169/libpomelo2,Jennal/libpomelo2,NetEase/libpomelo2,hitstanley/libpomelo2,jiangzhuo/libpomel...
deps/jansson/jansson.gyp
deps/jansson/jansson.gyp
{ 'variables': { 'platform%': 'pc' }, 'conditions': [ ['platform == "ios"', { 'xcode_settings': { 'SDKROOT': 'iphoneos', }, # xcode_settings }], # platform == "ios" ], # conditions 'targets': [ { 'target_name': 'jansson', 'type': 'static_library', 'inc...
{ 'variables': { 'platform%': 'pc' }, 'conditions': [ ['platform == "ios"', { 'xcode_settings': { 'SDKROOT': 'iphoneos', }, # xcode_settings }], # platform == "ios" ], # conditions 'targets': [ { 'target_name': 'jansson', 'type': 'static_library', 'inc...
mit
Python
be3b142176cdba312fb3d266b92b6a5f3888b9a3
Update output format of twiddle generator
Rookfighter/fft-spartan6,Rookfighter/fft-spartan6
scripts/twiddle.py
scripts/twiddle.py
# twiddle.py # # Created on: 15 May 2017 # Author: Fabian Meyer import argparse import math VERSION = '0.1.0' def parse_args(): '''Parse command line arguments.''' parser = argparse.ArgumentParser( description="Calculate twiddle factor.") parser.add_argument('--version', action='version', ...
# twiddle.py # # Created on: 15 May 2017 # Author: Fabian Meyer import argparse import math VERSION = '0.1.0' def parse_args(): '''Parse command line arguments.''' parser = argparse.ArgumentParser( description="Calculate twiddle factor.") parser.add_argument('--version', action='version', ...
mit
Python
a3fce3124168cde5dec925c3346bab59f4e6d59c
Add the form for Comment
andreagrandi/bloggato,andreagrandi/bloggato
blog/forms.py
blog/forms.py
from .models import BlogPost, Comment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) class CommentForm(ModelForm): class Meta: model = Comment exclude = ('post',)
from .models import BlogPost from django import forms class BlogPostForm(forms.ModelForm): class Meta: model = BlogPost exclude = ('user',)
mit
Python
a8e5e8ef81f142d2f3bf01b59191be3b09ff96db
Update utils.py
aspuru-guzik-group/selfies
selfiesv1/utils.py
selfiesv1/utils.py
from typing import Iterable, List def len_selfies(selfies: str) -> int: """Retrieves the character length of a SELFIES. That is, the number of characters that make up the SELFIES; and not the length of the string itself (i.e. len(selfies)) Args: selfies: a SELFIES Returns: the length of ...
from typing import Iterable, List def len_selfies(selfies: str) -> int: """Retrieves the character length of a SELFIES. That is, the number of characters that make up the SELFIES; and not the length of the string itself (i.e. len(selfies)) Args: selfies: a SELFIES Returns: the length of ...
apache-2.0
Python
6a42db67c36996a95d758da44e05193c7852e8eb
合并了代码....去掉了未删除的合并标记.....同志们,合并代码时要试试阿....
hexuotzo/khufu,hexuotzo/khufu,hexuotzo/khufu
py-khufu/pykhufu.py
py-khufu/pykhufu.py
# encoding: utf-8 from ctypes import * class PyDystopia(object): """Tokyo Dystopia Python Interface""" def __init__(self, dbname='khufu'): self.dbname = dbname try: self.lib=CDLL('libtokyodystopia.so') except: self.lib=CDLL('libtokyodystopia.dylib') self....
# encoding: utf-8 from ctypes import * class PyDystopia(object): """Tokyo Dystopia Python Interface""" def __init__(self, dbname='khufu'): self.dbname = dbname <<<<<<< HEAD:py-khufu/py-khufu.py self.lib=CDLL('libtokyodystopia.dylib') ======= try: self.lib=CDLL('libtokyodysto...
bsd-2-clause
Python
7af86fde34d1cbe6f27cfd329a018eb9e1853c3a
Bump to 1.0.2-dev
axiom-data-science/pyaxiom,ocefpaf/pyaxiom,ocefpaf/pyaxiom,axiom-data-science/pyaxiom
pyaxiom/__init__.py
pyaxiom/__init__.py
__version__ = "1.0.2-dev" # Package level logger import logging try: # Python >= 2.7 from logging import NullHandler except ImportError: # Python < 2.7 class NullHandler(logging.Handler): def emit(self, record): pass logger = logging.getLogger("pyaxiom") logger.addHandler(logging.Nu...
__version__ = "1.0.1" # Package level logger import logging try: # Python >= 2.7 from logging import NullHandler except ImportError: # Python < 2.7 class NullHandler(logging.Handler): def emit(self, record): pass logger = logging.getLogger("pyaxiom") logger.addHandler(logging.NullHa...
mit
Python
a13ecc8a3c05c44cdbd399736f358fce1d1d2504
Complete property descriptions
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft
pycroft/property.py
pycroft/property.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from collections import OrderedDict property_categories = OrderedDict(( (u"Mitglie...
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from collections import OrderedDict property_categories = OrderedDict(( (u"Mitglie...
apache-2.0
Python
65c2e9cf751bea61ec8babb8813c520c88a01344
reset version to 2.0.0-dev. 2.0.0 hasn't been pushed to PyPI and it has some issues, so hold back on calling it ready.
benauthor/pykafka,thedrow/samsa,wikimedia/operations-debs-python-pykafka,thedrow/samsa,thedrow/samsa,benauthor/pykafka,yungchin/pykafka,jofusa/pykafka,yungchin/pykafka,wikimedia/operations-debs-python-pykafka,benauthor/pykafka,jofusa/pykafka,wikimedia/operations-debs-python-pykafka
pykafka/__init__.py
pykafka/__init__.py
from .broker import Broker from .simpleconsumer import SimpleConsumer from .cluster import Cluster from .partition import Partition from .producer import Producer from .topic import Topic from .client import KafkaClient from .balancedconsumer import BalancedConsumer __version__ = '2.0.0-dev' __all__ = ["Broker", "Si...
from .broker import Broker from .simpleconsumer import SimpleConsumer from .cluster import Cluster from .partition import Partition from .producer import Producer from .topic import Topic from .client import KafkaClient from .balancedconsumer import BalancedConsumer __version__ = '2.1.0-dev' __all__ = ["Broker", "Si...
apache-2.0
Python
b069dc2b2454ac19f996b2bd0a57f7953ce1da15
Bump version.
goliatone/notario,goliatone/notario,goliatone/notario
notable/__init__.py
notable/__init__.py
VERSION = '0.2.0'
VERSION = '0.1.0'
mit
Python
d0acf8191d53ac2da02aa1f5903af159ef9a5083
bump to 3.0.6
mjs7231/python-plexapi,pkkid/python-plexapi
plexapi/__init__.py
plexapi/__init__.py
# -*- coding: utf-8 -*- import logging import os from logging.handlers import RotatingFileHandler from platform import uname from plexapi.config import PlexConfig, reset_base_headers from plexapi.utils import SecretsFilter from uuid import getnode # Load User Defined Config DEFAULT_CONFIG_PATH = os.path.expanduser('~/...
# -*- coding: utf-8 -*- import logging import os from logging.handlers import RotatingFileHandler from platform import uname from plexapi.config import PlexConfig, reset_base_headers from plexapi.utils import SecretsFilter from uuid import getnode # Load User Defined Config DEFAULT_CONFIG_PATH = os.path.expanduser('~/...
bsd-3-clause
Python
46e47cc152d92ad5450e20e52bf32a8c2b6344b2
Update __init__.py
simphony/simphony-common
simphony/cuds/tests/__init__.py
simphony/cuds/tests/__init__.py
__author__ = 'itziakos'
bsd-2-clause
Python
ac68c85f37e0fb7a217ebf576d1cd1fe1b051d6e
rearrange params for create invoice
bruxr/Sirius2,bruxr/Sirius2,bruxr/Sirius2
sirius/tasks/freshbooks_sync.py
sirius/tasks/freshbooks_sync.py
import os from refreshbooks import api from sirius.models import Contract, Project from sirius.errors import RecordNotFoundError freshbooks = api.TokenClient( os.environ['FRESHBOOKS_URL'], os.environ['FRESHBOOKS_TOKEN'], user_agent='Sirius/1.0' ) def freshbooks_sync(data): project_id = long(data['proj...
import os from refreshbooks import api from sirius.models import Contract, Project from sirius.errors import RecordNotFoundError freshbooks = api.TokenClient( os.environ['FRESHBOOKS_URL'], os.environ['FRESHBOOKS_TOKEN'], user_agent='Sirius/1.0' ) def freshbooks_sync(data): project_id = long(data['proj...
mit
Python
296005cae2af44e7e14a7e7ee9a99a2deab8c924
Make the SSH configuration more resilient.
redsnapper8t8/pyvarnish
pyvarnish/remote.py
pyvarnish/remote.py
# -*- coding: utf-8 -*- __author__ = 'John Moylan' import sys from paramiko import SSHClient, SSHConfig, AutoAddPolicy from pyvarnish.settings import SSH_CONFIG class Varnish_admin(): def __init__(self, server=''): self.server = server self.conf = { 'hostname': server, ...
# -*- coding: utf-8 -*- __author__ = 'John Moylan' import sys from paramiko import SSHClient, SSHConfig, AutoAddPolicy from pyvarnish.settings import SSH_CONFIG class Varnish_admin(): def __init__(self, server=''): self.server = server self.conf = self.config() def config(self): s...
bsd-3-clause
Python
61605fa39920eca5bd47f7dc1b54eab67dd7d015
Make the quantum top-level a namespace package.
gkotton/vmware-nsx,gkotton/vmware-nsx
quantum/__init__.py
quantum/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC # 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/l...
apache-2.0
Python
09cc5eccf45809f8190afc02d3cf1d28d8e790b1
fix multi-line string formatting
danfairs/kral,lrvick/kral
plugins/facebook.py
plugins/facebook.py
import re import json import urllib2 import datetime import settings from utils import fetch_json from celery.task import task,TaskSet @task def facebook(query, refresh_url=None, **kwargs): logger = facebook.get_logger() if refresh_url: url = refresh_url else: url = "https://graph....
import re import json import urllib2 import datetime import settings from utils import fetch_json from celery.task import task,TaskSet @task def facebook(query, refresh_url=None, **kwargs): logger = self.get_logger() if refresh_url: url = refresh_url else: url = "https://graph.face...
agpl-3.0
Python
5c874f5ae68c34b2501136400186a2fa29e5aa62
Fix the import statement in test_io
StongeEtienne/dipy,nilgoyyou/dipy,villalonreina/dipy,FrancoisRheaultUS/dipy,matthieudumont/dipy,StongeEtienne/dipy,nilgoyyou/dipy,villalonreina/dipy,FrancoisRheaultUS/dipy,matthieudumont/dipy
dipy/io/tests/test_io.py
dipy/io/tests/test_io.py
""" Tests for overall io sub-package """ from dipy import io from nose.tools import assert_false def test_imports(): # Make sure io has not pulled in setup_module from dpy assert_false(hasattr(io, 'setup_module'))
""" Tests for overall io sub-package """ from dipy.io import io from nose.tools import assert_false def test_imports(): # Make sure io has not pulled in setup_module from dpy assert_false(hasattr(io, 'setup_module'))
bsd-3-clause
Python
b705ac422dd9390162ab8d88f953494ce6cd8d93
add post_musich_token_handler() for qiniu cloud storage
free-free/pyblog,free-free/pyblog,free-free/pyblog,free-free/pyblog
app/music_handler.py
app/music_handler.py
#-*- coding:utf-8 -*- from tools.httptools import Route from models import Music from tools.config import Config import logging logging.basicConfig(level=logging.ERROR) import time import random try: from qiniu import Auth import qiniu.config except ImportError: logging.error("can't import 'qiniu' module") @Route....
#-*- coding:utf-8 -*- from tools.httptools import Route from models import Music @Route.get("/music") def get_music_handler(app): ret={}; ret['code']=200 ret['msg']='ok' ret['type']=3 ret['data']=[ {'music_name':'CountrintStars','music_url':'http://7xs7oc.com1.z0.glb.clouddn.com/music%2FJason%20Chen%20-%20Count...
mit
Python
9020acb36a509d5823df71e712430a69e94e997a
Use always_iterable from jaraco.util
yougov/pmxbot,yougov/pmxbot,yougov/pmxbot
pmxbot/itertools.py
pmxbot/itertools.py
from jaraco.util.itertools import always_iterable def generate_results(function): """ Take a function, which may return an iterator or a static result and convert it to a late-dispatched generator. """ for item in always_iterable(function()): yield item def trap_exceptions(results, handler, exceptions=Exceptio...
import io import six def always_iterable(item): r""" Given an item from a pmxbot handler, always return an iterable. If the item is None, return an empty iterable. >>> list(always_iterable(None)) [] If the item is a string, return an iterable of the lines in the string. >>> print('/'.join(always_iterable('fo...
mit
Python
3876b5c4c7c65bbcd6b4ca573f4c98e8ee63ca92
Update SController.py
nvthanh1/Skypybot
skype_controller/SController.py
skype_controller/SController.py
"""Import needed packages""" import Skype4Py import config as gbconfig import json from common import get_project_path # Get Skype class instance SKYPE_OBJ = Skype4Py.Skype() # Establish the connection from the Skype object to the Skype ddclient. SKYPE_OBJ.Attach() # Get all contact from object. This function might...
import Skype4Py import config as gbconfig import json from common import get_project_path # Get Skype class instance SKYPE_OBJ = Skype4Py.Skype() # Establish the connection from the Skype object to the Skype ddclient. SKYPE_OBJ.Attach() # Get all contact from object. This function might not be used in this case d...
mit
Python
0521ca620cfa6970a8b3fe945910a36a0f43c264
Correct comment.
markstory/lint-review,markstory/lint-review,adrianmoisey/lint-review,adrianmoisey/lint-review,markstory/lint-review,zoidbergwill/lint-review,zoidbergwill/lint-review,zoidbergwill/lint-review
settings.sample.py
settings.sample.py
# Webserver configuration # ########################### # gunicorn config bind = '127.0.0.1:5000' errorlog = 'lintreview.error.log' accesslog = 'lintreview.access.log' debug = True loglevel = 'debug' # Basic flask config DEBUG = True TESTING = True SERVER_NAME = '127.0.0.1:5000' # Config file for logging LOGGING_CON...
# Webserver configuration # ########################### # gunicorn config bind = '127.0.0.1:5000' errorlog = 'lintreview.error.log' accesslog = 'lintreview.access.log' debug = True loglevel = 'debug' # Basic flask config DEBUG = True TESTING = True SERVER_NAME = '127.0.0.1:5000' # Config file for logging LOGGING_CON...
mit
Python