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
ff4eeb2868e403bed36cd062a68f5e14e0a79a12
change import of tfpark
yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL
python/chronos/src/bigdl/chronos/forecaster/tfpark_forecaster.py
python/chronos/src/bigdl/chronos/forecaster/tfpark_forecaster.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
08b88042729fdbf3a169b6cfa681e873a1c4d386
Increase version number
zonca/petsc4py,zonca/petsc4py,zonca/petsc4py,zonca/petsc4py
src/__init__.py
src/__init__.py
# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # -------------------------------------------------------------------- """ PETSc for Python ================ This package is an interface to PETSc libraries. PETSc_ (the Portable, Extensible Toolkit for Scientific Computation) is a suite of data structures and...
# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # -------------------------------------------------------------------- """ PETSc for Python ================ This package is an interface to PETSc libraries. PETSc_ (the Portable, Extensible Toolkit for Scientific Computation) is a suite of data structures and...
bsd-2-clause
Python
42a18f43d0ed817b66ea5f27d8ca0925d8703843
Increment version to 1.10.6.
pombredanne/wrapt,GrahamDumpleton/wrapt,pombredanne/wrapt,GrahamDumpleton/wrapt
src/__init__.py
src/__init__.py
__version_info__ = ('1', '10', '6') __version__ = '.'.join(__version_info__) from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper, BoundFunctionWrapper, WeakFunctionProxy, resolve_path, apply_patch, wrap_object, wrap_object_attribute, function_wrapper, wrap_function_wrapper,...
__version_info__ = ('1', '10', '5') __version__ = '.'.join(__version_info__) from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper, BoundFunctionWrapper, WeakFunctionProxy, resolve_path, apply_patch, wrap_object, wrap_object_attribute, function_wrapper, wrap_function_wrapper,...
bsd-2-clause
Python
a183940e09123eb4f11d8972e6dd321d0715c6f5
Add version back into __init__.py
questrail/applyaf
src/__init__.py
src/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2013-2017 The applyaf developers. All rights reserved. # Project site: https://github.com/questrail/applyaf # Use of this source code is governed by a MIT-style license that # can be found in the LICENSE.txt file for the project. """ Applyaf """ __version__ = '1.2.0'
mit
Python
f3a4512fc056175612ad4bfb13240743591d3830
Update limit.py (#498)
keon/algorithms
algorithms/arrays/limit.py
algorithms/arrays/limit.py
""" Sometimes you need to limit array result to use. Such as you only need the value over 10 or, you need value under than 100. By use this algorithms, you can limit your array to specific value If array, Min, Max value was given, it returns array that contains values of given array which was larger than Min, and...
""" Sometimes you need to limit array result to use. Such as you only need the value over 10 or, you need value under than 100. By use this algorithms, you can limit your array to specific value If array, Min, Max value was given, it returns array that contains values of given array which was larger than Min, and...
mit
Python
ab624302aadce80e8493a78013026bb96647e9c6
Call Time
stevex86/RandomActsOfKindness,stevex86/RandomActsOfKindness
server/server.py
server/server.py
from flask import Flask from subprocess import call app = Flask(__name__) """ """ from flask import request from flask import abort from flask import jsonify objects = [] @app.route('/create', methods=['POST']) def create_object(): if not request.json or not 'important' in request.json: abort(400) ...
from flask import Flask from subprocess import call app = Flask(__name__) """ """ from flask import request from flask import abort from flask import jsonify objects = [] @app.route('/create', methods=['POST']) def create_object(): if not request.json or not 'important' in request.json: abort(400) ...
mit
Python
eded3a677df824ebf1709a90c7f62e67d349423a
set session on login
ericlifka/AdventureBattle,ericlifka/AdventureBattle,ericlifka/AdventureBattle
server/server.py
server/server.py
from flask import Flask from flask import render_template from flask import request from flask import make_response from flask import session app = Flask(__name__) users = {'test': '1234'} @app.route("/") def hello(): return render_template('index.html') @app.route("/login", methods=['POST']) def login(): u...
from flask import Flask from flask import render_template from flask import request from flask import make_response app = Flask(__name__) users = {'test': '1234'} @app.route("/") def hello(): return render_template('index.html') @app.route("/login", methods=['POST']) def login(): username = request.form['us...
mit
Python
a6bd787b86bdc96ef1a65558403a4956bfd98e86
修改 celery 配置文件格式
Timeship/OnlineJudge-1,wwj718/OnlineJudge,uestcxl/OnlineJudge,Timeship/OnlineJudge-QDU,Timeship/OnlineJudge-1,hxsf/OnlineJudge,wwj718/OnlineJudge,wangmingjob/OnlineJudge,Timeship/OnlineJudge-QDU,uestcxl/OnlineJudge,hxsf/OnlineJudge,wangmingjob/OnlineJudge,hxsf/OnlineJudge,wangmingjob/OnlineJudge,wangmingjob/OnlineJudge...
judge/judger_controller/celery.py
judge/judger_controller/celery.py
# coding=utf-8 from __future__ import absolute_import from celery import Celery from .settings import redis_config app = Celery("judge", broker='redis://%s:%s/%s' % (redis_config["host"], redis_config["port"], redis_config["db"]), include=["judge.judger_controller.tasks"]) Celery().conf.update(CELERY_ACC...
# coding=utf-8 from __future__ import absolute_import from celery import Celery from .settings import redis_config app = Celery("judge", broker="redis://" + redis_config["host"] + ":" + str(redis_config["port"]) + "/" + str(redis_co...
mit
Python
35408760229d7652c8d887c0c463fb964e446a59
Fix undefined variable pylint error
simonjbeaumont/planex,jonludlam/planex,simonjbeaumont/planex,euanh/planex-cleanhistory,djs55/planex,euanh/planex-cleanhistory,jonludlam/planex,jonludlam/planex,djs55/planex,djs55/planex,simonjbeaumont/planex,euanh/planex-cleanhistory
install.py
install.py
#!/usr/bin/env python import sys import os import glob import subprocess import shutil import demjson from planex_globals import RPMS_DIR CONFIG = "install.json" def parse_config(config_path): """Returns list of package names to install. These can be used in conjunction with rpm query to find the relevant ...
#!/usr/bin/env python import sys import os import glob import subprocess import shutil import demjson from planex_globals import RPMS_DIR CONFIG = "install.json" def parse_config(config_path): """Returns list of package names to install. These can be used in conjunction with rpm query to find the relevant ...
lgpl-2.1
Python
3643548beead0f71b004eaad7d4098b15125bba8
add ponytools package
schae234/PonyTools
install.py
install.py
#!/usr/bin/env bash # Script to setup stuff in an anaconda environment # Written by Joe Jeffers and Rob Schaefer # Email: jeffe174@umn.edu, schae234@umn.edu NAME="ponytools" function usage(){ cat <<EOF Usage: $0 [flags] Flags ----- -h | --help print help message -b | --base Base i...
#!/usr/bin/env bash # Script to setup stuff in an anaconda environment # Written by Joe Jeffers and Rob Schaefer # Email: jeffe174@umn.edu, schae234@umn.edu NAME="ponytools" function usage(){ cat <<EOF Usage: $0 [flags] Flags ----- -h | --help print help message -b | --base Base i...
mit
Python
a38d5514167fec5ef330d47f858ba6dcfdf29253
Update License
andersenmp/pipic,andersenmp/pipic
src/SMTPGmail.py
src/SMTPGmail.py
# -*- coding: utf-8 -*- """ pipic.SMTPGmail ~~~~~~~~~~~~~~ Send email from Gmail using smptlib The MIT License (MIT) Copyright (c) 2013-2014 Andersen Pecorone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation fi...
# -*- coding: utf-8 -*- """ mailwebcan.SMTPGmail ~~~~~~~~~~~~~~ Send email from Gmail using smptlib :copyright: (c) 2013 by Andersen Pecorone. :license: LICENSE_NAME, see LICENSE_FILE for more details. """ import smtplib from email.mime.image import MIMEImage from email.mime.multipart import MIMEM...
mit
Python
515c7963ca53bac3ab090b07baaa61be09fad24d
Fix issues with experiment and experiment job signals
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
api/experiments/signals.py
api/experiments/signals.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from spawner.utils.constants import JobLifeCycle, ExperimentLifeCycle def new_experiment(sender, **kwargs): instance = kwargs['instance'] created = kwargs.get('created', False) # Check if the experiment is newly cre...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_k8s.constants import JobLifeCycle, ExperimentLifeCycle def new_experiment(sender, **kwargs): instance = kwargs['instance'] created = kwargs.get('created', False) # Check if the experiment is newly crea...
apache-2.0
Python
2cdf9745c7b0ac40ba811eb576af9ef4c258b788
Tidy this too.
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
takeyourmeds/settings/defaults/third_party.py
takeyourmeds/settings/defaults/third_party.py
TWILIO_CONFIG = { 'ACCOUNT_SID': 'XXX', 'AUTH_TOKEN': 'XXX', 'FROM_NUMBER': '0000', 'ROOT_URL': 'http://takeyourmeds.fixm/telephony/info', }
TWILIO_CONFIG = { #"test": { # # You can retrieve these settings from # # https://www.twilio.com/user/account/developer-tools/test-credentials # "ACCOUNT_SID": "", # "AUTH_TOKEN": "", # "FROM_NUMBER": "+15005550006", # "ROOT_URL": "http://127.0.0.1:8000/telephony/info" ...
mit
Python
7f464589c8c54ac5b7feed1ddb8ea762c47dd722
Migrate to new skylark rules
dancingdan/tensorflow,alsrgv/tensorflow,jbedorf/tensorflow,aam-at/tensorflow,kobejean/tensorflow,lukeiwanski/tensorflow,cxxgtxy/tensorflow,hehongliang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,dancingdan/tensorflow,chemelnucfin/tensorflow,gautam185...
tensorflow/contrib/lite/java/aar_with_jni.bzl
tensorflow/contrib/lite/java/aar_with_jni.bzl
"""Generate zipped aar file including different variants of .so in jni folder.""" load("@build_bazel_rules_android//android:rules.bzl", "android_binary") def aar_with_jni(name, android_library): # Generate dummy AndroidManifest.xml for dummy apk usage # (dummy apk is generated by <name>_dummy_app_for_so target be...
"""Generate zipped aar file including different variants of .so in jni folder.""" def aar_with_jni(name, android_library): # Generate dummy AndroidManifest.xml for dummy apk usage # (dummy apk is generated by <name>_dummy_app_for_so target below) native.genrule( name = name + "_binary_manifest_generator", ...
apache-2.0
Python
c667b576bba24e497bfaceab80a8c4e0285043e1
Bump version.
concordusapps/python-hummus,concordusapps/python-hummus
src/hummus/meta.py
src/hummus/meta.py
# -*- coding: utf-8 -*- version = '0.3.8' description = 'Pythonic API for hummus, the fast and free PDF reader / writer.'
# -*- coding: utf-8 -*- version = '0.3.7' description = 'Pythonic API for hummus, the fast and free PDF reader / writer.'
mit
Python
c74012255080c37ad6a185fdddcdffd28c3a6839
remove lyricsnmusic from AVAILABLE_APIS (#31)
ysim/songtext,ysim/songtext
libsongtext/songtext.py
libsongtext/songtext.py
import argparse from importlib import import_module # __import__ does not resolve dotted paths import os import sys import click from errors import ArgumentError, TrackIndexError, SearchError from properties import __version__ DEFAULT_API = os.environ.get('SONGTEXT_DEFAULT_API', 'lyricwiki') AVAILABLE_APIS = ['lyr...
import argparse from importlib import import_module # __import__ does not resolve dotted paths import os import sys import click from errors import ArgumentError, TrackIndexError, SearchError from properties import __version__ DEFAULT_API = os.environ.get('SONGTEXT_DEFAULT_API', 'lyricwiki') AVAILABLE_APIS = ['lyr...
bsd-2-clause
Python
38e576c7256b78f24953200e03554034e4a2875d
Update pyrarcr.py
jonDel/pyrarcr
pyrarcr.py
pyrarcr.py
#!/usr/bin/env python3 #finds the password of a desired rar or zip file using a brute-force algorithm ##will fail to find the password if the password has a character that isnt in ##the english alphabet or isnt a number (you can change the char. list though) #importing needed modules import time,os,sys,shutil #check...
#!/usr/bin/env python3 #finds the password of a desired rar or zip file using a brute-force algorithm ##will fail to find the password if the password has a character that isnt in ##the english alphabet or isnt a number (you can change the char. list though) #importing needed modules import time,os,sys,shutil #check...
mit
Python
5594c02e8ccdd6942d28425baea5a9f1b9c179c5
tweak statement()
TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools
setools/policyrep/role.py
setools/policyrep/role.py
# 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.1 of # the License, or (at your option) any later ...
# 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.1 of # the License, or (at your option) any later ...
lgpl-2.1
Python
9a9e4ba45e000bbc496eeb624961a38ba833f708
fix fingerprint script
commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot
selfdrive/debug/internal/get_fingerprint_from_route.py
selfdrive/debug/internal/get_fingerprint_from_route.py
#!/usr/bin/env python3 import sys from tools.lib.route import Route from tools.lib.logreader import MultiLogIterator def get_fingerprint(lr): can_msgs = [m for m in lr if m.which() == 'can'] msgs = {} for msg in can_msgs: for c in msg.can: # read also msgs sent by EON on CAN bus 0x80 and filter out...
#!/usr/bin/env python3 # type: ignore import sys from tools.lib.logreader import MultiLogIterator from xx.chffr.lib.route import Route # pylint: disable=import-error def get_fingerprint(lr): can_msgs = [m for m in lr if m.which() == 'can'] msgs = {} for msg in can_msgs: for c in msg.can: # read al...
mit
Python
3589b66fd54339ddd831bd243d10163b73cf1760
add addt'l output formats
csirtgadgets/csirtgsdk-py
whitefacesdk/format/__init__.py
whitefacesdk/format/__init__.py
from whitefacesdk.format import table, format_json, format_csv plugins = { 'table': table.Table, 'csv': format_csv.CSV, 'json': format_json.JSON } # http://stackoverflow.com/a/456747 def factory(name): if name in plugins: return plugins[name] else: raise Exception("No such factory...
from whitefacesdk.format.table import Table plugins = { 'table': Table, } # http://stackoverflow.com/a/456747 def factory(name): if name in plugins: return plugins[name] else: return None
mpl-2.0
Python
9fe1baa51c91aa70b5d5970114fb008d4f3a39cd
Add a StickyMasterSlaveRouter that pins a request to the master after a write.
sonico999/django-multidb-router,sonico999/django-multidb-router
multidb/__init__.py
multidb/__init__.py
""" With :class:`multidb.MasterSlaveRouter` all read queries will go to a slave database; all inserts, updates, and deletes will do to the ``default`` database. First, define ``SLAVE_DATABASES`` in your settings. It should be a list of database aliases that can be found in ``DATABASES``:: DATABASES = { ...
""" With :class:`multidb.MasterSlaveRouter` all read queries will go to a slave database; all inserts, updates, and deletes will do to the ``default`` database. First, define ``SLAVE_DATABASES`` in your settings. It should be a list of database aliases that can be found in ``DATABASES``:: DATABASES = { ...
bsd-3-clause
Python
7871076b5cdf7db4343cdef2d82acd71dd41dc61
Remove unused regex VALID_PAGE. Only the one in .lib.static is used.
phihag/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,DanielNeugebauer/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,phihag/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,SysTheron/adhocracy,liqd/adhocracy,liqd/adhocracy,alkadis/vcv,phihag/adhocracy,SysT...
adhocracy/controllers/static.py
adhocracy/controllers/static.py
import logging from time import time from pylons import tmpl_context as c from pylons.controllers.util import abort from pylons.i18n import _ from adhocracy.lib.base import BaseController from adhocracy.lib.static import StaticPage from adhocracy.lib.templating import render log = logging.getLogger(__name__) class...
import logging import re from time import time from pylons import tmpl_context as c from pylons.controllers.util import abort from pylons.i18n import _ from adhocracy.lib.base import BaseController from adhocracy.lib.static import StaticPage from adhocracy.lib.templating import render log = logging.getLogger(__name_...
agpl-3.0
Python
1e794414571d7fed0c323af29914b419ac9f8b1c
fix wrong vouchers due to Valuation charges
saurabh6790/med_new_app,indictranstech/trufil-erpnext,indictranstech/trufil-erpnext,gangadhar-kadam/mtn-erpnext,mbauskar/helpdesk-erpnext,mbauskar/sapphire-erpnext,hatwar/buyback-erpnext,Tejal011089/digitales_erpnext,susuchina/ERPNEXT,Tejal011089/Medsyn2_app,gangadharkadam/letzerp,Tejal011089/fbd_erpnext,gangadharkadam...
patches/october_2012/fix_wrong_vouchers.py
patches/october_2012/fix_wrong_vouchers.py
def execute(): import webnotes from webnotes.utils import flt from webnotes.model.code import get_obj vouchers = webnotes.conn.sql(""" select parent, parenttype, modified, sum(if(category in ('Valuation and Total', 'Total') and add_deduct_tax='Add', tax_amount, 0)) as tax_added, sum(if(category ...
def execute(): import webnotes from webnotes.utils import flt from webnotes.model.code import get_obj vouchers = webnotes.conn.sql(""" select parent, parenttype, modified, sum(if(category in ('Valuation and Total', 'Total') and add_deduct_tax='Add', tax_amount, 0)) as tax_added, sum(if(category ...
agpl-3.0
Python
40e4f8d9766eff22c15259b0b0d70005e244282e
Add registration to JINGO_EXCLUDE_APPS.
Osmose/snippets-service,glogiotatidis/snippets-service,akatsoulas/snippets-service,mozilla/snippets-service,schalkneethling/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,schalkneethling/snippets-service,mozmar/snippets-service,akatsoulas/snippets-service,bensternthal/s...
snippets/settings/base.py
snippets/settings/base.py
# This is your project's main settings file that can be committed to your # repo. If you need to override a setting locally, use settings_local.py from funfactory.settings_base import * # Defines the views served for root URLs. ROOT_URLCONF = 'snippets.urls' INSTALLED_APPS = list(INSTALLED_APPS) + [ 'snippets.b...
# This is your project's main settings file that can be committed to your # repo. If you need to override a setting locally, use settings_local.py from funfactory.settings_base import * # Defines the views served for root URLs. ROOT_URLCONF = 'snippets.urls' INSTALLED_APPS = list(INSTALLED_APPS) + [ 'snippets.b...
mpl-2.0
Python
f3c7d41316cf4159fd830a475ffdeac81f2c8395
Strengthen types using WildValue.
zulip/zulip,zulip/zulip,zulip/zulip,andersk/zulip,rht/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip,andersk/zulip,zulip/zulip,zulip/zulip,andersk/zulip,andersk/zulip,rht/zulip,andersk/zulip,rht/zulip,rht/zulip,andersk/zulip,zulip/zulip
zerver/webhooks/netlify/view.py
zerver/webhooks/netlify/view.py
from typing import Tuple from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.validator import Wil...
from typing import Any, Dict, Sequence, Tuple from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib...
apache-2.0
Python
75f47f0e4b3e20834037e4a0b72fdee8e100551d
Remove cruft
kkurian/craigsgigs
src/models_base.py
src/models_base.py
import peewee class ModelsBase: """Perform gymnastics to allow the database to be specified at runtime. See existing subclasses of ModelsBase for usage examples. """ def __init__(self, database, model_names): self._base_model = None self._database = database self._database.c...
import peewee class ModelsBase: """Perform gymnastics to allow the database to be specified at runtime. See existing subclasses of ModelsBase for usage examples. """ def __init__(self, database, model_names): if type(database) != peewee.SqliteDatabase: raise RuntimeError( ...
unlicense
Python
4a0f77bc93261e88fcc95b9e7c40c7835da47740
add demo skscene
jbking/pythonista-misc
spritekit/skview-demo.py
spritekit/skview-demo.py
import ui from objc_util import CGRect, CGPoint, CGSize, ObjCClass, ObjCInstance, NSBundle, create_objc_class NSBundle.bundleWithPath_("/System/Library/Frameworks/SpriteKit.framework").load() SKView = ObjCClass('SKView') SKScene = ObjCClass('SKScene') SKPhysicsBody = ObjCClass('SKPhysicsBody') SKNode = ObjCClass('SKNo...
import ui from objc_util import CGRect, CGPoint, CGSize, ObjCClass, ObjCInstance, NSBundle NSBundle.bundleWithPath_("/System/Library/Frameworks/SpriteKit.framework").load() SKView = ObjCClass('SKView') SKNode = ObjCClass('SKNode') class MyView(ui.View): debug = True def __init__(self): # Setup SKView ...
mit
Python
b6e7763fa1c192d1b8648383e363d01330d831b9
Move logic into session/adapter
BuildingLink/sentry,boneyao/sentry,korealerts1/sentry,alexm92/sentry,beeftornado/sentry,imankulov/sentry,1tush/sentry,llonchj/sentry,JTCunning/sentry,jean/sentry,jokey2k/sentry,jokey2k/sentry,looker/sentry,zenefits/sentry,wujuguang/sentry,ewdurbin/sentry,1tush/sentry,mvaled/sentry,argonemyth/sentry,fuziontech/sentry,ar...
src/sentry/http.py
src/sentry/http.py
""" sentry.utils.http ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sentry import socket import requests from django.conf import settings from django.core.exceptions import S...
""" sentry.utils.http ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import re import sentry import socket import requests from django.conf import settings from django.core.exception...
bsd-3-clause
Python
d828d60b87b1ba34e8d8d5024854f768860b4407
add db_env_set_checkpoint_callback to the tokuglobals. closes #1695
flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,da...
src/tokuglobals.py
src/tokuglobals.py
#!/usr/bin/python import sys import os import stat import re def checkglobals(libname, exceptsymbols, verbose): badglobals = 0 nmcmd = "nm -g " + libname f = os.popen(nmcmd) b = f.readline() while b != "": match = re.match("^([0-9a-f]+)\s(.?)\s(.*)$", b) if match == None: ...
#!/usr/bin/python import sys import os import stat import re def checkglobals(libname, exceptsymbols, verbose): badglobals = 0 nmcmd = "nm -g " + libname f = os.popen(nmcmd) b = f.readline() while b != "": match = re.match("^([0-9a-f]+)\s(.?)\s(.*)$", b) if match == None: ...
lgpl-2.1
Python
6073c3c7f3566c115e135d118511a25ff6f84b88
Bump version to 0.7.2
nioinnovation/nio-cli,neutralio/nio-cli
nio_cli/__init__.py
nio_cli/__init__.py
__version__ = '0.7.2'
__version__ = '0.7.1'
apache-2.0
Python
f766f8dfa4448fab0a0f5c4befab43615fea5314
Add basic CORS support
EliRibble/vanth,EliRibble/vanth,EliRibble/vanth,EliRibble/vanth
vanth/server.py
vanth/server.py
import uuid import flask import flask_login import flask_uuid import sepiida.cors import sepiida.endpoints import vanth.api.about import vanth.api.session import vanth.api.user import vanth.user EXPOSE_HEADERS = [ 'Location', ] def index(): return flask.render_template('index.html') def load_user(user_id):...
import uuid import flask import flask_login import flask_uuid import sepiida.endpoints import vanth.api.about import vanth.api.user import vanth.user def index(): return flask.render_template('index.html') def load_user(user_id): return vanth.user.load(user_id) def login(): if flask.request.method == ...
agpl-3.0
Python
7e8e47246fcc4d2941050882b075c22531568091
Update client.py
ducin/thrift-hello-world,ducin/thrift-hello-world
client.py
client.py
#!/usr/bin/python import sys sys.path.append('./gen-py') from hello import HelloService from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: socket = TSocket.TSocket('localhost', 12345) transport = TTransport....
#!/usr/bin/python import sys sys.path.append('./gen-py') from hello import HelloService from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: transport = TSocket.TSocket('localhost', 12345) transport = TTranspo...
mit
Python
b37c231e572ff3a5a9f466d9ad25d1a2a7d4ab37
add get_feature and sort order of file in make_db.py
chengchingwen/moth_prediction
make_db.py
make_db.py
import pandas as pd from bs4 import BeautifulSoup as bs import sqlite3 as sql from stlist import stList import os import gevent from gevent import monkey import datetime stl = list(stList.keys()) db_path = "./db/%s.db" target_dir = sorted([i for i in os.listdir("./data") if os.path.isdir("./data/"+i)], key=lambda x: i...
import pandas as pd from bs4 import BeautifulSoup as bs import sqlite3 as sql from stlist import stList import os import gevent from gevent import monkey import datetime stl = list(stList.keys()) db_path = "./db/%s.db" target_dir = [i for i in os.listdir("./data") if os.path.isdir("./data/"+i)] column = {"觀測時間(LST)Obs...
artistic-2.0
Python
7534ad5ac18b185ee81cd5c0847a79e54732a850
bump version in __init__.py
1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.18.3.3'
VERSION = '0.18.3.2'
agpl-3.0
Python
89e8f60567f5e1bd84cf1cccf13bdd61a36d3575
Upgrade to v1.4.2
biolink/ontobio,biolink/ontobio
ontobio/__init__.py
ontobio/__init__.py
from __future__ import absolute_import __version__ = '1.4.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.4.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
159d09e18dc3b10b7ba3c104a2761f300d50ff28
Add options to NewsLink model fields. [skip ci]
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/models.py
organizer/models.py
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
bsd-2-clause
Python
b1d564302fc28a684c8894211d1987722fe65056
work on NER types.
pudo/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph
services/extract-entities/entityextractor/extract.py
services/extract-entities/entityextractor/extract.py
import os import spacy import logging from polyglot.text import Text from alephclient.services.entityextract_pb2 import ExtractedEntity # noqa log = logging.getLogger(__name__) POLYGLOT_LANGUAGES = os.listdir('/data/polyglot_data/ner2') POLYGLOT_TYPES = { 'I-PER': ExtractedEntity.PERSON, 'I-ORG': ExtractedEn...
import os import spacy import logging from polyglot.text import Text from alephclient.services.entityextract_pb2 import ExtractedEntity # noqa log = logging.getLogger(__name__) POLYGLOT_LANGUAGES = os.listdir('/data/polyglot_data/ner2') POLYGLOT_TYPES = { 'I-PER': ExtractedEntity.PERSON, 'I-ORG': ExtractedEn...
mit
Python
52e82e587a0900ed7933622144386f8d2eb2f180
Fix author name
CompassionCH/l10n-switzerland,CompassionCH/l10n-switzerland,BT-aestebanez/l10n-switzerland
l10n_ch_hr_payroll/__openerp__.py
l10n_ch_hr_payroll/__openerp__.py
# -*- coding: utf-8 -*- # # File: __openerp__.py # Module: l10n_ch_hr_payroll # # Created by sge@open-net.ch # # Copyright (c) 2014-TODAY Open-Net Ltd. <http://www.open-net.ch> ############################################################################## # # OpenERP, Open Source Management Solution # Copyrig...
# -*- coding: utf-8 -*- # # File: __openerp__.py # Module: l10n_ch_hr_payroll # # Created by sge@open-net.ch # # Copyright (c) 2014-TODAY Open-Net Ltd. <http://www.open-net.ch> ############################################################################## # # OpenERP, Open Source Management Solution # Copyrig...
agpl-3.0
Python
6a3ca96fe529c69ea7725ef4f66adf72776b68ed
Add test for equality between tuple and namedtuple.
kerneltask/micropython,selste/micropython,bvernoux/micropython,adafruit/circuitpython,tobbad/micropython,kerneltask/micropython,bvernoux/micropython,pramasoul/micropython,henriknelson/micropython,henriknelson/micropython,henriknelson/micropython,bvernoux/micropython,selste/micropython,henriknelson/micropython,adafruit/...
tests/basics/namedtuple1.py
tests/basics/namedtuple1.py
try: try: from ucollections import namedtuple except ImportError: from collections import namedtuple except ImportError: print("SKIP") raise SystemExit T = namedtuple("Tup", ["foo", "bar"]) # CPython prints fully qualified name, what we don't bother to do so far #print(T) for t in T(1, ...
try: try: from ucollections import namedtuple except ImportError: from collections import namedtuple except ImportError: print("SKIP") raise SystemExit T = namedtuple("Tup", ["foo", "bar"]) # CPython prints fully qualified name, what we don't bother to do so far #print(T) for t in T(1, ...
mit
Python
407a74119814e719a952444af6a8c3c0727bbd2a
change tartini to beta address for behave tests, see #934
jmcmurry/monarch-app,kshefchek/monarch-app,monarch-initiative/monarch-app,jmcmurry/monarch-app,kshefchek/monarch-app,DoctorBud/monarch-app,kshefchek/monarch-app,monarch-initiative/monarch-app,monarch-initiative/monarch-app,monarch-initiative/monarch-app,DoctorBud/monarch-app,kshefchek/monarch-app,DoctorBud/monarch-app,...
tests/behave/environment.py
tests/behave/environment.py
#### #### Setup gross testing environment. #### #### This currently includes the UI instance target and browser type #### (FF vs PhantomJS). #### import os import time from selenium import webdriver ### ### Simple (but somewhat excessive for the data parts) environment. ### ## Run this before anything else. def befo...
#### #### Setup gross testing environment. #### #### This currently includes the UI instance target and browser type #### (FF vs PhantomJS). #### import os import time from selenium import webdriver ### ### Simple (but somewhat excessive for the data parts) environment. ### ## Run this before anything else. def befo...
bsd-3-clause
Python
653a4c188ed115b98fd6cb8ceeca74daf9771b9d
update requirements
barisser/coins,barisser/coins
transactions.py
transactions.py
import db import hashlib import os import bitcoin import json import requests import coinprism default_fee = 5000 def queue_issuing_tx(source_address, recipient_address, source_private, metadata, amount): dbstring = "insert into color_issue_tx_queue values ('"+str(source_address)+"', '"+str(source_private)+"', '"...
#import db import hashlib import os import bitcoin import json import requests import coinprism default_fee = 5000 def queue_issuing_tx(source_address, recipient_address, source_private, metadata, amount): dbstring = "insert into color_issue_tx_queue values ('"+str(source_address)+"', '"+str(source_private)+"', '...
agpl-3.0
Python
ba81eeba449695ab20e293bd0c2b84503d4626c0
Use memory saving mode
adusca/try_extender,adusca/try_extender,armenzg/try_extender,armenzg/try_extender
try_extender.py
try_extender.py
import string from flask import Flask, request, jsonify, redirect from urllib import unquote from mozci.mozci import trigger_job from mozci.sources.allthethings import list_builders from mozci.utils.transfer import MEMORY_SAVING_MODE from revision_info import jobs_per_revision app = Flask(__name__, static_folder='st...
from flask import Flask, request, jsonify from urllib import unquote from mozci.mozci import trigger_job from revision_info import jobs_per_revision app = Flask(__name__, static_folder='static', static_url_path='/static') app.debug = True @app.route("/backend/process_data", methods=['POST']) def process_data(): ...
mpl-2.0
Python
f0ad02108230365d9ad2373d30ac7d55acc96e59
Disable proxy before accessing local host in apache test
badele/fabtools,wagigi/fabtools-python,n0n0x/fabtools-python,ahnjungho/fabtools,AMOSoft/fabtools,hagai26/fabtools,pombredanne/fabtools,davidcaste/fabtools,ronnix/fabtools,fabtools/fabtools,sociateru/fabtools,bitmonk/fabtools,prologic/fabtools
fabtools/tests/fabfiles/apache.py
fabtools/tests/fabfiles/apache.py
from __future__ import with_statement from fabric.api import ( shell_env, task, ) @task def apache(): """ Check apache server, enabling and disabling sites. """ from fabric.api import run, sudo from fabtools import require from fabtools.files import is_link require.apache.server...
from __future__ import with_statement from fabric.api import task @task def apache(): """ Check apache server, enabling and disabling sites. """ from fabric.api import run, sudo from fabtools import require from fabtools.files import is_link require.apache.server() require.apache.d...
bsd-2-clause
Python
9c60a2660f96959c3a3f582520b61c5e887c4dc9
remove invalid reference to LSFExecutor
genome/flow-core,genome/flow-core,genome/flow-core
flow/shell_command/lsf/handler.py
flow/shell_command/lsf/handler.py
from flow.configuration.settings.injector import setting from flow.shell_command.handler_base import ShellCommandSubmitMessageHandler from flow.shell_command.lsf import executor from injector import inject @inject(queue_name=setting('shell_command.lsf.queue'), exchange=setting('shell_command.lsf.exchange'), ...
from flow.configuration.settings.injector import setting from flow.shell_command.handler_base import ShellCommandSubmitMessageHandler from flow.shell_command.lsf import executor from injector import inject @inject(executor=executor.LSFExecutor, queue_name=setting('shell_command.lsf.queue'), exchange=s...
agpl-3.0
Python
b24c04d379340088711d7c8cd30fba26c1d067f1
Update decompile.py
goodhacker/lobotomy,HackerTool/lobotomy,AndroidSecurityTools/lobotomy,goodhacker/lobotomy,0xr0ot/lobotomy,goodhacker/lobotomy,HackerTool/lobotomy,AndroidSecurityTools/lobotomy,0xr0ot/lobotomy,0xr0ot/lobotomy,HackerTool/lobotomy,AndroidSecurityTools/lobotomy
framework/brains/apk/decompile.py
framework/brains/apk/decompile.py
from framework.logging.logger import Logger from subprocess import Popen, CalledProcessError from datetime import datetime from blessings import Terminal t = Terminal() class Decompile(object): def __init__(self, directory, apk): super(Decompile, self).__init__() self.apk = apk self.dire...
from framework.logging.logger import Logger from subprocess import Popen, CalledProcessError from datetime import datetime from blessings import Terminal t = Terminal() class Decompile(object): def __init__(self, directory, apk): super(Decompile, self).__init__() self.apk = apk self.dire...
mit
Python
2f65fa12824d3a0d62bfed0bde5857356b5116f7
Use sphinx-style documentation
mheilman/Lasagne,ErnstHowie/Lasagne,takacsg84/Lasagne,cancan101/Lasagne,DataFighter/Lasagne-tutorial,ebattenberg/Lasagne,DeanChan/Lasagne,kracwarlock/Lasagne,dnuffer/Lasagne,gabortakacs/Lasagne,rlkelly/Lasagne,MihailoIsakov/fishfish,Richi91/nntools
lasagne/layers/normalization.py
lasagne/layers/normalization.py
import numpy as np import theano import theano.tensor as T from .. import init from .. import nonlinearities from ..theano_extensions import conv from .base import Layer __all__ = [ "LocalResponseNormalization2DLayer", ] class LocalResponseNormalization2DLayer(Layer): """ Cross-channel Local Response ...
import numpy as np import theano import theano.tensor as T from .. import init from .. import nonlinearities from ..theano_extensions import conv from .base import Layer __all__ = [ "LocalResponseNormalization2DLayer", ] class LocalResponseNormalization2DLayer(Layer): """ Cross-Channel Local Response...
mit
Python
0a650933f51df5795dc5a1af6354226391f9665b
fix sorting
t-8ch/ugrm-cal
ugrm/builder.py
ugrm/builder.py
from icalendar import Calendar, Event from config import PRODID, MEETING_LENGTH, CAL_NAME, CAL_DESC from datetime import datetime, timedelta, time from hashlib import sha1 from pytz import utc meeting_length = timedelta(minutes=MEETING_LENGTH) def build_calendar(groups, exclude=None): exclude = set(exclude or []...
from icalendar import Calendar, Event from config import PRODID, MEETING_LENGTH, CAL_NAME, CAL_DESC from datetime import datetime, timedelta, time from hashlib import sha1 meeting_length = timedelta(minutes=MEETING_LENGTH) def build_calendar(groups, exclude=None): exclude = set(exclude or []) included_tags =...
mit
Python
b5039f27f02f02c22e8384c8aae98aca71197e89
Remove print
invkrh/vps-traffic,invkrh/vps-traffic,invkrh/vps-traffic,invkrh/vps-traffic
app/main.py
app/main.py
from flask import Flask, render_template from traffic import * app = Flask(__name__) @app.route("/") def root(): err_msg = "Please check vnstat version >= 1.14" try: data = load_json_data() except subprocess.CalledProcessError: print(err_msg) return err_msg df = create_df(data...
from flask import Flask, render_template from traffic import * app = Flask(__name__) @app.route("/") def root(): err_msg = "Please check vnstat version >= 1.14" try: data = load_json_data() except subprocess.CalledProcessError: print(err_msg) return err_msg df = create_df(data...
mit
Python
8afd2432f2e4d0996274cc4020ad7f5090f22fa1
Update test_stock_graph3.py
sdpython/pyensae,sdpython/pyensae,sdpython/pyensae
_unittests/ut_finance/test_stock_graph3.py
_unittests/ut_finance/test_stock_graph3.py
""" @brief test log(time=2s) """ import os import unittest import warnings from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import fix_tkinter_issues_virtualenv, ExtTestCase from pyensae.finance.astock import StockPrices class TestStockGraph3(ExtTestCase): tick = ['MSFT', 'GOOGL'] sour...
""" @brief test log(time=2s) """ import os import unittest import warnings from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import fix_tkinter_issues_virtualenv, ExtTestCase from pyensae.finance.astock import StockPrices class TestStockGraph3(ExtTestCase): tick = ['MSFT', 'GOOGL'] sour...
mit
Python
0d28d7f528907610e2c73425f3e8150c4e76cc38
add HTTPS to test_describe_endpoints
scylladb/scylla,scylladb/scylla,avikivity/scylla,scylladb/scylla,avikivity/scylla,scylladb/scylla,avikivity/scylla
alternator-test/test_describe_endpoints.py
alternator-test/test_describe_endpoints.py
# Copyright 2019 ScyllaDB # # This file is part of Scylla. # # Scylla is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Scylla...
# Copyright 2019 ScyllaDB # # This file is part of Scylla. # # Scylla is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Scylla...
agpl-3.0
Python
ace15f2d42e2da5bee040331157d043833f674f2
Remove unnecessary print statements
samjabrahams/anchorhub
anchorhub/validation/validate_overwrite.py
anchorhub/validation/validate_overwrite.py
""" Functions for validating the overwrite argument in combination with other arguments """ import os.path as path from anchorhub.exceptions.validationexception import ValidationException from anchorhub.util.hasattrs import hasattrs def validate(opts): """ Client facing overwrite validation. Checks to see i...
""" Functions for validating the overwrite argument in combination with other arguments """ import os.path as path from anchorhub.exceptions.validationexception import ValidationException from anchorhub.util.hasattrs import hasattrs def validate(opts): """ Client facing overwrite validation. Checks to see i...
apache-2.0
Python
92de84282a91a137049440e01f05f01fc67791f6
Fix linker flag in binding.gyp for mac build.
jeremycx/node-LDAP,jeremycx/node-LDAP,jeremycx/node-LDAP,jeremycx/node-LDAP
binding.gyp
binding.gyp
{ "targets": [ { 'target_name': 'LDAP', 'sources': [ 'src/LDAP.cc' ], 'include_dirs': [ '/usr/local/include' ], 'defines': [ 'LDAP_DEPRECATED' ], 'cflags': [ '-Wall', '-g' ], 'libraries': [ '-llber -ll...
{ "targets": [ { 'target_name': 'LDAP', 'sources': [ 'src/LDAP.cc' ], 'include_dirs': [ '/usr/local/include' ], 'defines': [ 'LDAP_DEPRECATED' ], 'cflags': [ '-Wall', '-g' ], 'libraries': [ '-llber -ll...
mit
Python
37f56bc02ebcac91f43dcef01f1b303ec21c005f
Add OS X build support
Innovailable/node-libnice,Innovailable/node-libnice,Innovailable/node-libnice
binding.gyp
binding.gyp
{ "targets": [ { "target_name": "native_libnice", "sources": [ "native/module.cpp", "native/agent.cpp", "native/stream.cpp", "native/helper.cpp", ], "defines": [ #'DO_DEBUG' ], 'cflags': [ '-std=c++0x', '<!@(pkg-config --cflags nice glib-2.0)', '-Wall', '-g', ...
{ "targets": [ { "target_name": "native_libnice", "sources": [ "native/module.cpp", "native/agent.cpp", "native/stream.cpp", "native/helper.cpp", ], "defines": [ #'DO_DEBUG' ], 'cflags': [ '-std=c++0x', '<!@(pkg-config --cflags nice glib-2.0)', '-Wall', '-g', ...
agpl-3.0
Python
f310949d7f8c2c4afb40a407cc7c8726abe78138
add author
windwound/reptile
reptile.py
reptile.py
# by jdqi #!/usr/bin/env python print 'hello world'
#!/usr/bin/env python print 'hello world'
apache-2.0
Python
f5948b05f6ab56bbf484add2cbf8f4bb9e3e230f
Use transient model !
EBII/account-invoicing
account_invoice_check_total/models/account_config_settings.py
account_invoice_check_total/models/account_config_settings.py
# -*- coding: utf-8 -*- # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models, _ GROUP_XML_ID = 'account_invoice_check_total.group_supplier_inv_check_total' class AccountConfigSettings(models.TransientModel): _inherit = 'account.co...
# -*- coding: utf-8 -*- # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models, _ GROUP_XML_ID = 'account_invoice_check_total.group_supplier_inv_check_total' class AccountConfigSettings(models.Model): _inherit = 'account.config.sett...
agpl-3.0
Python
761fbb68f72ff8f425ad40670ea908b4959d3292
Fix the output when there is wrong usage
brickgao/specchio
specchio/main.py
specchio/main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time from watchdog.observers import Observer from specchio.handlers import SpecchioEventHandler from specchio.utils import init_logger, logger def main(): """Main function for specchio Example: specchio test/ user@host:test/ :return: Non...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time from watchdog.observers import Observer from specchio.handlers import SpecchioEventHandler from specchio.utils import init_logger, logger def main(): """Main function for specchio Example: specchio test/ user@host:test/ :return: Non...
mit
Python
5ff87eda723899e9ea0d76c69fcf6d2d1cc273e9
Change way to generate path, add var for plugin source
epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp
src/settings.py
src/settings.py
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" import os from utils import Utils VERSION = "0.2.5" DATA_PATH = os.path.abspath( os.path.sep.join([ os.path.dirname(__file__), '..', 'data', 'wp', ] ) ) ENV_DIRS = ['logs'...
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" import os from utils import Utils VERSION = "0.2.5" DATA_PATH = os.path.abspath( os.path.sep.join([ os.path.dirname(__file__), '..', 'data', 'wp', ] ) ) ENV_DIRS = ['logs'...
mit
Python
c8bfcce96e9a60369513dbd9d29a091c3061e243
change tinyxml.lib to tinyxml2005.lib
danheeks/heekscad,danheeks/heekscad,danheeks/heekscad,danheeks/heekscad
src/vc_retro.py
src/vc_retro.py
# Process the SLN: f_in = open('HeeksCAD.sln'); f_vc3 = open('HeeksCAD VC2003.sln', 'w'); f_vc5 = open('HeeksCAD VC2005.sln', 'w'); while (True): line = f_in.readline(); if (len(line) == 0) : break; if (line == 'Microsoft Visual Studio Solution File, Format Version 10.00\n'): f_vc3....
# Process the SLN: f_in = open('HeeksCAD.sln'); f_vc3 = open('HeeksCAD VC2003.sln', 'w'); f_vc5 = open('HeeksCAD VC2005.sln', 'w'); while (True): line = f_in.readline(); if (len(line) == 0) : break; if (line == 'Microsoft Visual Studio Solution File, Format Version 10.00\n'): f_vc3....
bsd-3-clause
Python
ada49cdecd9fe13740639e1e5510067f7ad09763
Add files via upload
ifrguy/NHWG-MIMS,ifrguy/NHWG-MIMS,ifrguy/NHWG-MIMS,ifrguy/NHWG-MIMS
src/capwatch2.py
src/capwatch2.py
#!/usr/bin/python3 ## Copyright 2018 Marshall E. Giguere ## ## 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 requi...
#!/usr/bin/python3 ## Copyright 2018 Marshall E. Giguere ## ## 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 requi...
apache-2.0
Python
d7d6ebaea91e81bc0481e9961a30e8e08c75f904
Update utility imports for infer
israelg99/eva
eva/examples/infer.py
eva/examples/infer.py
#%% from matplotlib import pyplot as plt import keras from eva.layers.masked_convolution2d import MaskedConvolution2D from eva.util.mutil import infer from eva.util.nutil import to_rgb count = 1 model = keras.models.load_model('eva/examples/pixelcnn.h5', custom_objects={'MaskedConvolution2D':MaskedConvolution2D}) ...
#%% from matplotlib import pyplot as plt import keras from eva.layers.masked_convolution2d import MaskedConvolution2D from eva.util.mutil import Mutil from eva.util.nutil import Nutil count = 1 model = keras.models.load_model('eva/examples/pixelcnn.h5', custom_objects={'MaskedConvolution2D':MaskedConvolution2D}) f...
apache-2.0
Python
83510717f403d12aaf6bb7e3c662a12b5669fb32
Add json renderer
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
api/api/config_settings/rest.py
api/api/config_settings/rest.py
REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( # 'djangorestframework_camel_case.render.CamelCaseJSONRenderer', # Any other renders, 'rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.BrowsableAPIRenderer', ), # 'DEFAULT_PARSER_CLASSES': ( # 'djangorestfr...
REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( # 'djangorestframework_camel_case.render.CamelCaseJSONRenderer', # Any other renders, 'rest_framework.renderers.BrowsableAPIRenderer', ), # 'DEFAULT_PARSER_CLASSES': ( # 'djangorestframework_camel_case.parser.CamelCaseJSONParser', ...
apache-2.0
Python
60d8f8bd674706efe810fe8ee7f8870f0562a31f
Update ipc_lista1.11.py
any1m1c/ipc20161
lista1/ipc_lista1.11.py
lista1/ipc_lista1.11.py
#ipc_lista1.11 #Professor: Jucimar Junior #Any Mendes Carvalho # # # # #Faça um programa que peça 2 numeros inteiros e um numero real. Calcule e mostre: #a- o produto do dobro #b- a soma do triplo #c- o terceiro elevado ao cubo
#ipc_lista1.11 #Professor: Jucimar Junior #Any Mendes Carvalho # # # # #Faça um programa que peça 2 numeros inteiros e um numero real. Calcule e mostre: #a- o produto do dobro #b- a soma do triplo #c- o
apache-2.0
Python
95e7c9fb387ebcdd2f5d5da600a79af9eb7e3028
Update ipc_lista1.14.py
any1m1c/ipc20161
lista1/ipc_lista1.14.py
lista1/ipc_lista1.14.py
#ipc_lista1.14 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # # #João Papo-de-Pescador, homem de bem, comprou um microcomputador para controlar o rendimento diário de seu trabalho. Toda vez que ele traz um peso de peixes maior que o estabelecido pelo regulamento de pesca do estado de São Paulo (50...
#ipc_lista1.14 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # # #João Papo-de-Pescador, homem de bem, comprou um microcomputador para controlar o rendimento diário de seu trabalho. Toda vez que ele traz um peso de peixes maior que o estabelecido pelo regulamento de pesca do estado de São Paulo (50...
apache-2.0
Python
429ad8cf4025b1d867716fb75e5ef596b892b56f
Update ipc_lista1.17.py
any1m1c/ipc20161
lista1/ipc_lista1.17.py
lista1/ipc_lista1.17.py
#ipc_lista1.17 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # # import math #Calculo para verificar quantas latas/galoes de tintas sera necessarias e o valor delas metros = input("Entre como o tamnho em metros quadrdados" / / / / / /
#ipc_lista1.17 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # # import math #Calculo para verificar quantas latas/galoes de tintas sera necessarias e o valor delas metros = / / / / / /
apache-2.0
Python
30c69e3d7854d3279f6035745b09a94b55509d97
Remove unused imports in api.auth
LINKIWI/linkr,LINKIWI/linkr,LINKIWI/linkr
api/auth.py
api/auth.py
from flask_login import logout_user import database.user import util.response from linkr import app from uri.auth import * from util.decorators import * from util.exception import * @app.route(AuthCheckURI.path, methods=AuthCheckURI.methods) def api_auth_check(): """ Check if any user is currently authentica...
from flask_login import login_user from flask_login import logout_user from flask_login import current_user import database.user import util.response from linkr import app from uri.auth import * from util.decorators import * from util.exception import * @app.route(AuthCheckURI.path, methods=AuthCheckURI.methods) def...
mit
Python
b6f7f2b129a00cf915d4b9c4e1906222457eb666
Update ipc_lista4.08.py
any1m1c/ipc20161
lista4/ipc_lista4.08.py
lista4/ipc_lista4.08.py
""" lista 4 questao 8: Faça um Programa que peça a idade e a altura de 5 pessoas, armazene cada informação no seu respectivo vetor. Imprima a idade e a altura na ordem inversa a ordem lida. """ # EQUIPE 2 #ANA BEATRIZ FROTA - 1615310027 # # #Luiz Gustavo Rocha Melo - 1615310015 altura = [] #vetor para altu...
""" lista 4 questao 8: Faça um Programa que peça a idade e a altura de 5 pessoas, armazene cada informação no seu respectivo vetor. Imprima a idade e a altura na ordem inversa a ordem lida. """ #Luiz Gustavo Rocha Melo - 1615310015 altura = [] alturainv = [] idade = [] idadeinv = [] v = 5 c1 = 0 while ...
apache-2.0
Python
905fb06ecce72eec9a0cac8c5ba4b0c601b24a67
Revert "testing without timezone"
not-nexus/shelf,kyle-long/pyshelf,kyle-long/pyshelf,not-nexus/shelf
tests/cloud/storage_test.py
tests/cloud/storage_test.py
from tests.test_base import TestBase from pyshelf.cloud.storage import Storage import logging class StorageTest(TestBase): def setUp(self): logger = logging.Logger("StorageTest") self.storage = Storage("FakeAccessKey", "FakeSecretKey", "FakeBucketName", logger) def test_travis_ci(self): ...
from tests.test_base import TestBase from pyshelf.cloud.storage import Storage import logging class StorageTest(TestBase): def setUp(self): logger = logging.Logger("StorageTest") self.storage = Storage("FakeAccessKey", "FakeSecretKey", "FakeBucketName", logger) def test_travis_ci(self): ...
mit
Python
cf8d35feccf235becefbd4be72f2d782026d759d
add missing semicolon
fkmclane/vbx,fkmclane/vbx,fkmclane/vbx
vbx/__main__.py
vbx/__main__.py
def main(): from vbx import main if __name__ == '__main__': main()
def main() from vbx import main if __name__ == '__main__': main()
mit
Python
9e8aae1a5a45edaf82350bf7a36c281440cf2732
Remove unused imports
igordejanovic/textX,igordejanovic/textX,igordejanovic/textX
tests/functional/registration/test_version.py
tests/functional/registration/test_version.py
""" Test `version` command. """ from pkg_resources import parse_version from textx.cli import textx from click.testing import CliRunner def test_version_command(): runner = CliRunner() result = runner.invoke(textx, ['version']) assert result.exit_code == 0 assert result.output.startswith('textX') ...
""" Test `version` command. """ import os import re from pkg_resources import parse_version from textx.cli import textx from click.testing import CliRunner def test_version_command(): runner = CliRunner() result = runner.invoke(textx, ['version']) assert result.exit_code == 0 assert result.output.star...
mit
Python
fc03c71cef828e63cea1792711bc8802eab80c7a
Fix task renaming
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tasks/__init__.py
luigi/tasks/__init__.py
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requir...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requir...
apache-2.0
Python
32cf7d726bfa80aa63941ae7035e4b02cbb5151b
Add checks to test to see the correct contents are present
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
tests/views/test_admin_committee_questions.py
tests/views/test_admin_committee_questions.py
import os from builtins import str from tests import PMGLiveServerTestCase from pmg.models import db, Committee from tests.fixtures import dbfixture, UserData, CommitteeData, MembershipData from werkzeug.datastructures import FileStorage from io import BytesIO class TestAdminCommitteeQuestions(PMGLiveServerTestCase):...
import os from builtins import str from tests import PMGLiveServerTestCase from pmg.models import db, Committee from tests.fixtures import dbfixture, UserData, CommitteeData, MembershipData from werkzeug.datastructures import FileStorage from io import BytesIO class TestAdminCommitteeQuestions(PMGLiveServerTestCase):...
apache-2.0
Python
efec3cf6bb20aa1c52a9c8c7c0f121f0d7105ceb
write test metadata
gdsfactory/gdsfactory,gdsfactory/gdsfactory
gdsfactory/mask/merge_metadata.py
gdsfactory/mask/merge_metadata.py
from pathlib import Path from typing import Tuple from omegaconf import DictConfig, OmegaConf import gdsfactory as gf from gdsfactory.mask.merge_markdown import merge_markdown from gdsfactory.mask.merge_test_metadata import merge_test_metadata # from gdsfactory.mask.merge_json import merge_json from gdsfactory.mask....
from pathlib import Path from typing import Tuple from omegaconf import DictConfig import gdsfactory as gf from gdsfactory.mask.merge_markdown import merge_markdown from gdsfactory.mask.merge_test_metadata import merge_test_metadata # from gdsfactory.mask.merge_json import merge_json from gdsfactory.mask.merge_yaml ...
mit
Python
f0eb7dc817ba05c40a4de21abd43522fb5679108
Add allowed hosts
daviferreira/defprogramming,daviferreira/defprogramming,daviferreira/defprogramming
defprogramming/settings_production.py
defprogramming/settings_production.py
from defprogramming.settings import * ALLOWED_HOSTS = ['*'] DEBUG = False TEMPLATE_DEBUG = DEBUG # Update database configuration with $DATABASE_URL. import dj_database_url db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_P...
from defprogramming.settings import * DEBUG = False TEMPLATE_DEBUG = DEBUG # Update database configuration with $DATABASE_URL. import dj_database_url db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') # MIDD...
mit
Python
bea9f5497d0ecedf5fe92b409af587df0c53ea0a
Fix for randomely ocurring bug
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/main.py
app/main.py
#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
Python
26cff14cb7679222cae4fed8c67893936b4561bb
Change version to 0.7.6-git
souravsingh/sympy,Mitchkoens/sympy,oliverlee/sympy,abloomston/sympy,rahuldan/sympy,saurabhjn76/sympy,toolforger/sympy,vipulroxx/sympy,pandeyadarsh/sympy,postvakje/sympy,Vishluck/sympy,jamesblunt/sympy,Gadal/sympy,Designist/sympy,Titan-C/sympy,shikil/sympy,oliverlee/sympy,Mitchkoens/sympy,MechCoder/sympy,yashsharan/symp...
sympy/release.py
sympy/release.py
__version__ = "0.7.6-git"
__version__ = "0.7.6"
bsd-3-clause
Python
b08fb9603f43df0050aaf61b2d5ad506e32ded1f
Fix typo
JokerQyou/bot
config.py
config.py
# coding: utf-8 from functools import wraps from os import path import json from redis_wrap import get_hash, get_list, SYSTEMS __name__ = 'eth0_bot' __bot__ = 'eth0' __config__ = path.abspath(path.join(path.dirname(__file__), 'config.json')) with open(__config__, 'r') as cfr: config = json.loads(cfr.read()) PAT...
# coding: utf-8 from functools import wraps from os import path import json from redis_wrap import get_hash, get_list, SYSTEMS __name__ = 'eth0_bot' __bot__ = 'eth0' __config__ = path.abspath(path.join(path.dirname(__file__), 'config.json')) with open(__config__, 'r') as cfr: config = json.loads(cfr.read()) PAT...
bsd-2-clause
Python
f5efad8debd4f348e8e334f49c9756f47a981f52
remove print statement
grvrulz/BookPlayer,nerk/BookPlayer
config.py
config.py
#!/usr/bin/env python # encoding: utf-8 """ config.py Application configurations db_file : the SQLite file used to store the progress serial : settings for the serial port that the RFID reader connects to mpd_conn : the connection details for the MPD client gpio_pins : the ids of the GPIO input pins and their callba...
#!/usr/bin/env python # encoding: utf-8 """ config.py Application configurations db_file : the SQLite file used to store the progress serial : settings for the serial port that the RFID reader connects to mpd_conn : the connection details for the MPD client gpio_pins : the ids of the GPIO input pins and their callba...
mit
Python
df6949d98f368bd0758afbae48b39454de7aafd0
Update config.py with new options
Phyks/arxiv_metadata
config.py
config.py
database = ":memory:" # database = "db.sqlite3" host = "localhost" port = 8080 production = False queue_polling_interval = 30
database = ":memory:" # database = "db.sqlite3" host = "localhost" port = 8080 production = False
mit
Python
0baa10771d95e9b13a86441954753a98232ece18
clean up the testing tmp directory.
fengluo/flask-storage,lepture/flask-storage,LiuDeng/flask-storage,menghan/flask-storage
tests/test_flask_storage.py
tests/test_flask_storage.py
import os import shutil import unittest from flask import Flask, request from flask_storage.local import LocalStorage class BaseCase(unittest.TestCase): CONFIG = { 'TESTING': True } def setUp(self): self.app = self.create_app() self.client = self.app.test_client() def create...
import os import unittest from flask import Flask, request from flask_storage.local import LocalStorage class BaseCase(unittest.TestCase): CONFIG = { 'TESTING': True } def setUp(self): self.app = self.create_app() self.client = self.app.test_client() def create_app(self): ...
bsd-3-clause
Python
a46e123cb36720e2aa63262061e74f1e6d1a89ab
update example to new api
MLWave/kepler-mapper,MLWave/kepler-mapper,MLWave/kepler-mapper
examples/lion/lion.py
examples/lion/lion.py
import os import numpy as np from kmapper import KeplerMapper from sklearn import cluster dir_path = os.path.dirname(os.path.realpath(__file__)) data = np.genfromtxt(os.path.join(dir_path,'lion-reference.csv'),delimiter=',') mapper = KeplerMapper(verbose=1) lens = mapper.fit_transform(data) graph = mapper.map(lens...
import km data = km.np.genfromtxt('lion-reference.csv',delimiter=',') mapper = km.KeplerMapper(verbose=1) lens = mapper.fit_transform(data) graph = mapper.map(lens, data, clusterer=km.cluster.DBSCAN(eps=0.1, min_samples=5), nr_cubes=10, ove...
mit
Python
6bef5db6e2af5d6c580a5a6a27dff2d68ffce347
use append
Schevo/kiwi,Schevo/kiwi,Schevo/kiwi
examples/listradio.py
examples/listradio.py
import gobject import gtk from kiwi.ui.widgets.list import Column, List class Object: def __init__(self, name, value): self.name, self.value = name, value columns = [Column('name'), Column('value', data_type=bool, radio=True, editable=True)] win = gtk.Window() win.set_size_request(300, 120) w...
import gobject import gtk from kiwi.ui.widgets.list import Column, List class Object: def __init__(self, name, value): self.name, self.value = name, value columns = [Column('name'), Column('value', data_type=bool, radio=True, editable=True)] win = gtk.Window() win.set_size_request(300, 120) w...
lgpl-2.1
Python
65228172ad9479c52e45fcb76c697997c9927917
add test
AtsushiSakai/pycubicspline,AtsushiSakai/pycubicspline
tests/test_pycubicspline.py
tests/test_pycubicspline.py
#! /usr/bin/python # --*-- coding:utf-8 --*-- u""" Test code """ import unittest import pycubicspline class Test(unittest.TestCase): def test_param(self): x = [-0.5, 0.0, 0.5, 1.0, 1.5] y = [3.2, 2.7, 6, 5, 6.5] sp = pycubicspline.Spline(x, y) self.assertEqual(sp.a[0], 3.2) ...
#! /usr/bin/python # --*-- coding:utf-8 --*-- u""" Test code """ import unittest import pycubicspline class Test(unittest.TestCase): def test_1(self): x = [-0.5, 0.0, 0.5, 1.0, 1.5] y = [3.2, 2.7, 6, 5, 6.5] sp = pycubicspline.Spline(x, y) self.assertEqual(sp.a[0], 3.2) s...
mit
Python
7cb9f51be6d6057c05ba18075796c4cd352811ce
Add Italian stopwords
aikramer2/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,banglakit/spaCy,raphael0202/spaCy,aikramer2/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,explosion/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,recognai/spaCy,banglakit/spaCy,rec...
spacy/it/language_data.py
spacy/it/language_data.py
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * from ..language_data import TOKENIZER_PREFIXES from ..language_data import TOKENIZER_SUFFIXES from ..language_data import TOKENIZER_INFIXES def strings_to_exc(orths): return {orth: [{ORTH: orth}] for orth in orths} PRON_LEMMA = "-...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * from ..language_data import TOKENIZER_PREFIXES from ..language_data import TOKENIZER_SUFFIXES from ..language_data import TOKENIZER_INFIXES def strings_to_exc(orths): return {orth: [{ORTH: orth}] for orth in orths} PRON_LEMMA = "-...
mit
Python
8c9df8da6e7f044747e65cd170eb29158b486d03
add ClientView
madmath/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,madmath/sous-chef
django/santropolFeast/member/views.py
django/santropolFeast/member/views.py
# coding: utf-8 from django.views import generic from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from member.models import Client class ClientList(generic.ListView): # Display the list of clients template_name = 'client/list.html' context_obj...
# coding: utf-8 from django.views import generic from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required class ClientList(generic.ListView): # Display the list of clients template_name = 'client/list.html' context_object_name = 'client' @method_...
agpl-3.0
Python
e910c9f3ee3fec868f2a6dfb7b7d337440cbb768
Write all log lines to log files
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
virtool/logs.py
virtool/logs.py
import logging.handlers import coloredlogs def configure(verbose=False): logging_level = logging.INFO if verbose else logging.DEBUG logging.captureWarnings(True) log_format = "%(asctime)-20s %(module)-11s %(levelname)-8s %(message)s" coloredlogs.install( level=logging_level, fmt=lo...
import logging.handlers import coloredlogs def configure(verbose=False): logging_level = logging.INFO if verbose else logging.DEBUG logging.captureWarnings(True) log_format = "%(asctime)-20s %(module)-11s %(levelname)-8s %(message)s" coloredlogs.install( level=logging_level, fmt=lo...
mit
Python
c50aa79aceb7dccd372fc5ef852985f12842bbdd
Increase version for release
MGHComputationalPathology/highdicom
src/highdicom/version.py
src/highdicom/version.py
__version__ = '0.4.1'
__version__ = '0.5.0rc'
mit
Python
5247f8ac63d461a1b2f96c2b98276ebad42b6f41
add is_app_ready_predicate to testWebView in AndroidAppTest
Chilledheart/chromium,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,chuan9/chromium-cros...
tools/telemetry/telemetry/core/android_app_unittest.py
tools/telemetry/telemetry/core/android_app_unittest.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import time import unittest from pylib.device import intent from telemetry.core import android_app from telemetry.core import platform as pla...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import time import unittest from pylib.device import intent from telemetry.core import android_app from telemetry.core import platform as pla...
bsd-3-clause
Python
11f21e0be6558896db0b8f981477ec8f5f43ca75
Fix active_taxis tasks
odtvince/APITaxi,odtvince/APITaxi,openmaraude/APITaxi,l-vincent-l/APITaxi,l-vincent-l/APITaxi,odtvince/APITaxi,openmaraude/APITaxi,odtvince/APITaxi
APITaxi/commands/active_tasks.py
APITaxi/commands/active_tasks.py
from . import manager from ..extensions import celery @manager.command def active_tasks(queue): i = celery.control.inspect() if i.active() is None: return '' for tasks in i.active().values(): for t in tasks: if t['delivery_info']['routing_key'] == queue: return t...
from . import manager from ..extensions import celery @manager.command def active_tasks(queue): i = celery.control.inspect() for tasks in i.active().values(): for t in tasks: if t['delivery_info']['routing_key'] == queue: return t return ''
agpl-3.0
Python
547e9d8f4a560c72778591e176b12dbbba6f019f
Bump Version 0.1.3
3bot/3bot-worker
threebot_worker/__init__.py
threebot_worker/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.1.3'
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.1.2'
bsd-3-clause
Python
656ef67c4b4399605993e848b9a0ba1a269189d2
add creating enemy function and shooting function
Tvli/aircraft-python
process.py
process.py
import pygame, sys, random, classes def process(player, FPS, total_frames, SCREENWIDTH): velocity = 10 for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_d: player.velx = velocity if event.key == pyga...
import pygame, sys def process(player): velocity = 2 for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_d: player.velx = velocity if event.key == pygame.K_a: player.velx = -velocity if event.ke...
unlicense
Python
429c5d4865694e3c5d3508df8d716cbb38bd5205
Fix traceback when notification daemon not running
enkore/i3pystatus,Arvedui/i3pystatus,enkore/i3pystatus,richese/i3pystatus,Arvedui/i3pystatus,schroeji/i3pystatus,richese/i3pystatus,teto/i3pystatus,drwahl/i3pystatus,schroeji/i3pystatus,fmarchenko/i3pystatus,teto/i3pystatus,facetoe/i3pystatus,ncoop/i3pystatus,yang-ling/i3pystatus,ncoop/i3pystatus,drwahl/i3pystatus,face...
i3pystatus/core/desktop.py
i3pystatus/core/desktop.py
import logging class BaseDesktopNotification: """ Class to display a desktop notification :param title: Title of the notification :param body: Body text of the notification, depending on the users system configuration HTML may be used, but is not recommended :param icon: A XDG icon name, see http...
class BaseDesktopNotification: """ Class to display a desktop notification :param title: Title of the notification :param body: Body text of the notification, depending on the users system configuration HTML may be used, but is not recommended :param icon: A XDG icon name, see http://standards.free...
mit
Python
ccfca87518db8e4f3678baf4b4d2bf8d05d2a71d
Add an error class
thombashi/tcconfig,thombashi/tcconfig
tcconfig/_error.py
tcconfig/_error.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class NetworkInterfaceNotFoundError(Exception): """ Exception raised when network interface not found. """ class ModuleNotFoundError(Exception): """ Exception raised when ma...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class NetworkInterfaceNotFoundError(Exception): """ Exception raised when network interface not found. """ class ModuleNotFoundError(Exception): """ Exception raised when ma...
mit
Python
a0fee562835a368e60dbba61ae4ac86aa3e43a20
add yahoo 100m words
mathrho/word2vec,mathrho/word2vec,mathrho/word2vec,mathrho/word2vec
extractVecMat_attr.py
extractVecMat_attr.py
#/datastore/zhenyang/bin/python import sys import os import gensim, logging import numpy as np import scipy.io as sio def main(): ############## logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) #pretrained_model = './vectors.bin' #pretrained_model = '../fr...
#/datastore/zhenyang/bin/python import sys import os import gensim, logging import numpy as np import scipy.io as sio def main(): ############## logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) #pretrained_model = './vectors.bin' #pretrained_model = '../fr...
apache-2.0
Python
19dd5309e9882f1f553ac95c3202072d8244a1be
fix local_file_storage method to use Tile proxy model, re #1323
cvast/arches,archesproject/arches,cvast/arches,archesproject/arches,archesproject/arches,archesproject/arches,cvast/arches,cvast/arches
arches/app/functions/local_file_storage.py
arches/app/functions/local_file_storage.py
from arches.app.models.tile import Tile from arches.app.models import models from arches.app.functions.base import BaseFunction class LocalFileStorageFunction(BaseFunction): def save(self, tile, request): for node in tile.nodegroup.node_set.all(): if node.datatype == 'file-list': ...
from arches.app.models.tile import Tile from arches.app.models import models from arches.app.functions.base import BaseFunction class LocalFileStorageFunction(BaseFunction): def save(self, tile, request): # a function meant to handle this datatype during tile save # try: # tile_model =...
agpl-3.0
Python
efea0190bf43329910c442e5de12048cda23bfb2
move cleanup to finally clause
OpenBounds/Processing
process.py
process.py
import os from urlparse import urlparse import click import adapters import utils @click.command() @click.argument('sources', type=click.Path(exists=True), required=True) @click.argument('output', type=click.Path(exists=True), required=True) @click.option('--force', is_flag=True) def process(sources, output, force...
import os from urlparse import urlparse import click import adapters import utils @click.command() @click.argument('sources', type=click.Path(exists=True), required=True) @click.argument('output', type=click.Path(exists=True), required=True) @click.option('--force', is_flag=True) def process(sources, output, force...
mit
Python
f47156e11ef955f7fbcd684aa1803b0bc97a7807
increment version
Parsely/parsely_raw_data,Parsely/parsely_raw_data
parsely_raw_data/__init__.py
parsely_raw_data/__init__.py
__license__ = """ Copyright 2016 Parsely, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
__license__ = """ Copyright 2016 Parsely, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
apache-2.0
Python
b903b1fc01690f13fdacf0c0b98d27b99a280d7e
Apply changes to docstrings of enums.py as well 💖✨💖✨
exercism/python,jmluy/xpython,jmluy/xpython,exercism/python
exercises/concept/log-levels/enums.py
exercises/concept/log-levels/enums.py
from enum import Enum class LogLevel(Enum): """Represent different log levels by their verbose codes.""" pass def parse_log_level(message): """Returns level enum for log message. :param message: log message (string) :return: enum - 'LogLevel.<level>'. Return 'LogLevel.Unknown' if an unknow...
from enum import Enum class LogLevel(Enum): """Represent different log levels by their verbose codes.""" pass def parse_log_level(message): """Takes a log message and returns the enum member of its level Returns a LogLevel.Unknown incase an unknown severity is found :param message: log message...
mit
Python
ea19d550114be9b1f27dd79fcdf04d3788697767
Change order on lines
cubells/l10n-spain,cubells/l10n-spain,cubells/l10n-spain
l10n_es_vat_book/models/l10n_es_vat_book_line.py
l10n_es_vat_book/models/l10n_es_vat_book_line.py
# Copyright 2017 Praxya (http://praxya.com/) # Daniel Rodriguez Lijo <drl.9319@gmail.com> # Copyright 2017 ForgeFlow, S.L. <contact@forgeflow.com> # Copyright 2019 Tecnativa - Carlos Dauden # License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0 from odoo import api, fields, models class L10nEsVa...
# Copyright 2017 Praxya (http://praxya.com/) # Daniel Rodriguez Lijo <drl.9319@gmail.com> # Copyright 2017 ForgeFlow, S.L. <contact@forgeflow.com> # Copyright 2019 Tecnativa - Carlos Dauden # License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0 from odoo import api, fields, models class L10nEsVa...
agpl-3.0
Python
0ddbea23c8703576e260fa5b57474930393e7d1a
Create a small detail view for videodiscs.
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/components/merchandise/media/views.py
base/components/merchandise/media/views.py
from django.views.generic import DetailView from .models import Videodisc class VideodiscDetailView(DetailView): model = Videodisc template_name = 'merchandise/media/videodisc_detail.html'
apache-2.0
Python
403c98148518a0b594f72a745abf406b552a009a
Update __init__.py
DeflatedPickle/pkinter
pkinter/__init__.py
pkinter/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """""" from .toggledlabelframe import ToggledLabelFrame from .labeledseparator import LabeledSeparator from .roundingscale import RoundingScale from .entrytext import EntryText from .limitedentry import LimitedEntry from .colourpickerbutton import ColourPickerButt...
#!/usr/bin/env python # -*- coding: utf-8 -*- """""" from .toggledlabelframe import ToggledLabelFrame from .labeledseparator import LabeledSeparator from .roundingscale import RoundingScale from .entrytext import EntryText from .limitedentry import LimitedEntry from .colourpickerbutton import ColourPickerButt...
mit
Python