commit stringlengths 40 40 | subject stringlengths 1 1.49k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | new_contents stringlengths 1 29.8k | old_contents stringlengths 0 9.9k | lang stringclasses 3
values | proba float64 0 1 |
|---|---|---|---|---|---|---|---|
9f1a4977e34dc01a0489655df826b63b84f7d3be | Use SunPy sample data for Solar Cycle example. | examples/solar_cycle_example.py | examples/solar_cycle_example.py | """
===============
The Solar Cycle
===============
This example shows the current and possible next solar cycle.
"""
import datetime
import matplotlib.pyplot as plt
import sunpy.lightcurve as lc
from sunpy.data.sample import NOAAINDICES_LIGHTCURVE, NOAAPREDICT_LIGHTCURVE
############################################... | """
===============
The Solar Cycle
===============
This example shows the current and possible next solar cycle.
"""
import datetime
import matplotlib.pyplot as plt
import sunpy.lightcurve as lc
###############################################################################
# Let's download the latest data from NOA... | Python | 0 |
0ac3750c2b8d0fc978c076604db3bfee1a47708f | allow name param to name tab widgets | examples/tabpanelwidget/Tabs.py | examples/tabpanelwidget/Tabs.py | import pyjd # dummy in pyjs
from pyjamas.ui.TabBar import TabBar
from pyjamas.ui.TabPanel import TabPanel
from pyjamas.ui import HasAlignment
from pyjamas.ui.Image import Image
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.HorizontalPanel import Horizonta... | import pyjd # dummy in pyjs
from pyjamas.ui.TabBar import TabBar
from pyjamas.ui.TabPanel import TabPanel
from pyjamas.ui import HasAlignment
from pyjamas.ui.Image import Image
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.HorizontalPanel import Horizonta... | Python | 0 |
23cc84147f52cd4036398200916e68bd0f078050 | Fix print statemenet | stationspinner/evecentral/tasks.py | stationspinner/evecentral/tasks.py | from stationspinner.celery import app
from celery import chord
from stationspinner.evecentral.models import Market, MarketItem
from stationspinner.libs.pragma import get_location_name
from stationspinner.sde.models import InvType
from stationspinner.settings import STATIC_ROOT
from evelink.thirdparty.eve_central import... | from stationspinner.celery import app
from celery import chord
from stationspinner.evecentral.models import Market, MarketItem
from stationspinner.libs.pragma import get_location_name
from stationspinner.sde.models import InvType
from stationspinner.settings import STATIC_ROOT
from evelink.thirdparty.eve_central import... | Python | 0.99991 |
ca57e29c15ad02dee3cdad0d2159cbe33c15d6e0 | fix expire cache | corehq/apps/app_manager/signals.py | corehq/apps/app_manager/signals.py | from __future__ import absolute_import
from __future__ import unicode_literals
from django.dispatch.dispatcher import Signal
from corehq.apps.callcenter.app_parser import get_call_center_config_from_app
from corehq.apps.domain.models import Domain
from dimagi.utils.logging import notify_exception
def create_app_stru... | from __future__ import absolute_import
from __future__ import unicode_literals
from django.dispatch.dispatcher import Signal
from corehq.apps.callcenter.app_parser import get_call_center_config_from_app
from corehq.apps.domain.models import Domain
from dimagi.utils.logging import notify_exception
def create_app_stru... | Python | 0.000001 |
55c0d8912750ad8ddc702213c340c02d10638640 | Test function | corehq/apps/sms/tests/test_util.py | corehq/apps/sms/tests/test_util.py | #!/usr/bin/env python
from django.test import TestCase
from nose.tools import assert_false, assert_true
from corehq.apps.hqcase.utils import update_case
from corehq.apps.sms.mixin import apply_leniency
from corehq.apps.sms.util import (
ContactNotFoundException,
clean_phone_number,
get_contact,
is_con... | #!/usr/bin/env python
from django.test import TestCase
from corehq.apps.hqcase.utils import update_case
from corehq.apps.sms.mixin import apply_leniency
from corehq.apps.sms.util import (
ContactNotFoundException,
clean_phone_number,
get_contact,
is_contact_active,
)
from corehq.apps.users.models impor... | Python | 0.000006 |
4f0d43f3c451a4059a2931ec771a8d796396250e | fasta2imgt converts to upper | bin/fasta2imgt.py | bin/fasta2imgt.py | #! /usr/bin/env python
import sys
import optparse
from Bio import SeqIO
from Bio.Alphabet import generic_dna
import vdj
parser = optparse.OptionParser()
(options, args) = parser.parse_args()
if len(args) == 2:
inhandle = open(args[0],'r')
outhandle = open(args[1],'w')
elif len(args) == 1:
inhandle = op... | #! /usr/bin/env python
import sys
import optparse
from Bio import SeqIO
from Bio.Alphabet import generic_dna
import vdj
parser = optparse.OptionParser()
(options, args) = parser.parse_args()
if len(args) == 2:
inhandle = open(args[0],'r')
outhandle = open(args[1],'w')
elif len(args) == 1:
inhandle = op... | Python | 0.999999 |
9ebf03ddcba26054824547f6d1094ba9fb37a030 | Restructure the create_permission signal handler to perform fewer SQL queries, this speeds up the test suite dramatically. | django/contrib/auth/management/__init__.py | django/contrib/auth/management/__init__.py | """
Creates permissions for all installed apps that need permissions.
"""
from django.contrib.auth import models as auth_app
from django.db.models import get_models, signals
def _get_permission_codename(action, opts):
return u'%s_%s' % (action, opts.object_name.lower())
def _get_all_permissions(opts):
"Retu... | """
Creates permissions for all installed apps that need permissions.
"""
from django.db.models import get_models, signals
from django.contrib.auth import models as auth_app
def _get_permission_codename(action, opts):
return u'%s_%s' % (action, opts.object_name.lower())
def _get_all_permissions(opts):
"Retur... | Python | 0.000002 |
8431458f7f18ec0dde86d46ec18dbdb61412f8ef | bump version | blaze/__init__.py | blaze/__init__.py | from __future__ import absolute_import, division, print_function
import logging
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)
inf = float('inf')
nan = float('nan')
__version__ = '0.6.0-dev'
# If IPython is already loaded, register the Blaze catalog magic
# from . impo... | from __future__ import absolute_import, division, print_function
import logging
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)
inf = float('inf')
nan = float('nan')
__version__ = '0.4.2-dev'
# If IPython is already loaded, register the Blaze catalog magic
# from . impo... | Python | 0 |
f794817bf62c8f92a6d7d9e55e13866dc63df7ba | Fix issue #7 | botbot/checker.py | botbot/checker.py | import stat, os
from . import problems
class Checker:
"""
Holds a set of checks that can be run on a file to make sure that
it's suitable for the shared directory. Runs checks recursively on a
given path.
"""
# checks is a set of all the checking functions this checker knows of. All
# che... | import stat, os
from . import problems
class Checker:
"""
Holds a set of checks that can be run on a file to make sure that
it's suitable for the shared directory. Runs checks recursively on a
given path.
"""
# checks is a set of all the checking functions this checker knows of. All
# che... | Python | 0 |
a7b9c9a120aebe270ea200f3be0b2d3468f911cf | Bump version | modelqueryform/__init__.py | modelqueryform/__init__.py | __version__ = "2.2"
| __version__ = "2.1"
| Python | 0 |
ed360f5d896593f2646037c1b2028d8a5552a2d2 | fix test import data | tests/case_manager/test_case_data_manager.py | tests/case_manager/test_case_data_manager.py | # @Time : 2016/9/1 21:04
# @Author : lixintong
import datetime
import os
import unittest
from uitester.case_manager.case_data_manager import CaseDataManager
class TestCaseDataManager(unittest.TestCase):
def setUp(self):
self.case_data_manager = CaseDataManager()
self.package_name = ''
de... | # @Time : 2016/9/1 21:04
# @Author : lixintong
import datetime
import os
import unittest
from uitester.case_manager.case_data_manager import CaseDataManager
class TestCaseDataManager(unittest.TestCase):
def setUp(self):
self.case_data_manager = CaseDataManager()
self.package_name = ''
de... | Python | 0 |
4d40e9db4bd6b58787557e8d5547f69eb67c9b96 | Add additional coverage to author build list | tests/changes/api/test_author_build_index.py | tests/changes/api/test_author_build_index.py | from uuid import uuid4
from changes.config import db
from changes.models import Author
from changes.testutils import APITestCase
class AuthorBuildListTest(APITestCase):
def test_simple(self):
fake_author_id = uuid4()
self.create_build(self.project)
path = '/api/0/authors/{0}/builds/'.fo... | from uuid import uuid4
from changes.config import db
from changes.models import Author
from changes.testutils import APITestCase
class AuthorBuildListTest(APITestCase):
def test_simple(self):
fake_author_id = uuid4()
self.create_build(self.project)
path = '/api/0/authors/{0}/builds/'.fo... | Python | 0 |
03aebd7eff51be1847866d9920b8520cee72348f | fix failure in test_global_pinger_memo | tests/python/pants_test/cache/test_pinger.py | tests/python/pants_test/cache/test_pinger.py | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import threading
imp... | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import threading
imp... | Python | 0.000017 |
932fccc77fb10ece61c3feeb47a28225216c7c0d | add two more authors for gemeinfrei_2021.py | service/ws_re/scanner/tasks/gemeinfrei_2021.py | service/ws_re/scanner/tasks/gemeinfrei_2021.py | import pywikibot
from service.ws_re.register.authors import Authors
from service.ws_re.scanner.tasks.base_task import ReScannerTask
from service.ws_re.template.article import Article
from tools.bots.pi import WikiLogger
class GF21Task(ReScannerTask):
def __init__(self, wiki: pywikibot.Site, logger: WikiLogger, d... | import pywikibot
from service.ws_re.register.authors import Authors
from service.ws_re.scanner.tasks.base_task import ReScannerTask
from service.ws_re.template.article import Article
from tools.bots.pi import WikiLogger
class GF21Task(ReScannerTask):
def __init__(self, wiki: pywikibot.Site, logger: WikiLogger, d... | Python | 0 |
6a7d7393d90c1a10071b392d24431af1111a0824 | clean up | streamteam/dynamics/plot.py | streamteam/dynamics/plot.py | # coding: utf-8
""" ...explain... """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os, sys
# Third-party
import matplotlib.pyplot as plt
import numpy as np
__all__ = ['plot_orbits']
def plot_orbits(x, ix=None, axes=None, triangle=False, *... | # coding: utf-8
""" ...explain... """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os, sys
# Third-party
import matplotlib.pyplot as plt
import numpy as np
__all__ = ['plot_orbits']
def plot_orbits(w, ix=None, axes=None, triangle=False, *... | Python | 0.000001 |
d56382a87068e7d43b3333b6ea3dc2fd0a80d929 | Use dict instead of list | 10-disambiguate.py | 10-disambiguate.py | #!/usr/bin/env python
from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE, SIG_DFL)
import csv
import gc
import sys
from collections import defaultdict
from sklearn.feature_extraction import DictVectorizer
from sklearn.metrics.pairwise import cosine_similarity as sim
from operator import itemgetter
from multip... | #!/usr/bin/env python
from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE, SIG_DFL)
import csv
import gc
import sys
from collections import defaultdict
from sklearn.feature_extraction import DictVectorizer
from sklearn.metrics.pairwise import cosine_similarity as sim
from operator import itemgetter
from multip... | Python | 0.000001 |
a2753124d89689dcfd3f90e050417d38a17bdd60 | Fix redis caching when multiple GitDox instances share a Redis instance | modules/redis_cache.py | modules/redis_cache.py | import os
import platform
import redis
from modules.configobj import ConfigObj
r = redis.Redis()
GITDOX_PREFIX = "__gitdox"
SEP = "|"
REPORT = "report"
TIMESTAMP = "timestamp"
if platform.system() == "Windows":
prefix = "transc\\"
else:
prefix = ""
rootpath = os.path.dirname(os.path.dirname(os.path.re... | import redis
r = redis.Redis()
GITDOX_PREFIX = "__gitdox"
SEP = "|"
REPORT = "report"
TIMESTAMP = "timestamp"
def make_key_base(doc_id, validation_type):
"""Keys for this cache have the form, e.g., __gitdox|123|ether|report
This function formats the first three pieces of this string."""
if validation_type... | Python | 0 |
72df22e62806e64e05b3bbb6eca0efd958c7c8bb | make btcnet_wrapper fail in a more instructive manner | btcnet_wrapper.py | btcnet_wrapper.py | from git import Repo
try:
repo = Repo("btcnet_info")
except:
repo = Repo.init("btcnet_info")
repo = repo.clone("git://github.com/c00w/btcnet_info.git")
origin = repo.create_remote('origin', 'git://github.com/c00w/btcnet_info.git')
origin = repo.remotes.origin
origin.fetch()
origin.pull('master')
... | from git import Repo
try:
repo = Repo("btcnet_info")
except:
repo = Repo.init("btcnet_info")
repo = repo.clone("git://github.com/c00w/btcnet_info.git")
origin = repo.create_remote('origin', 'git://github.com/c00w/btcnet_info.git')
origin = repo.remotes.origin
origin.fetch()
origin.pull('master')
... | Python | 0.000001 |
1ac423e9127631eeb78868c47cf6fee12bf36a12 | Fix bug in handling get/post, should work now | test_utils/middleware/testmaker.py | test_utils/middleware/testmaker.py | from django.conf import settings
from django.test import Client
from django.test.utils import setup_test_environment
import logging, re
from django.utils.encoding import force_unicode
log = logging.getLogger('testmaker')
print "Loaded Testmaker Middleware"
#Remove at your own peril
debug = getattr(settings, 'DEBUG', ... | from django.conf import settings
from django.test import Client
from django.test.utils import setup_test_environment
import logging, re
from django.utils.encoding import force_unicode
log = logging.getLogger('testmaker')
print "Loaded Testmaker Middleware"
#Remove at your own peril
debug = getattr(settings, 'DEBUG', ... | Python | 0 |
46268cb2cf5e4570ef3e08440291e802d9e16b05 | Fix variable name conflict | modules/networking/page.py | modules/networking/page.py | import http.client
import socket
import subprocess
import tempfile
import urllib
from nemubot import __version__
from nemubot.exception import IRCException
from nemubot.tools import web
def load(CONF, add_hook):
# check w3m exists
pass
def headers(url):
"""Retrieve HTTP header for the given URL
Ar... | import http.client
import socket
import subprocess
import tempfile
import urllib
from nemubot import __version__
from nemubot.exception import IRCException
from nemubot.tools import web
def load(CONF, add_hook):
# check w3m exists
pass
def headers(url):
"""Retrieve HTTP header for the given URL
Ar... | Python | 0.00001 |
e4a5dd51829df198a07232afc06afdff6089ae6c | fix wmt datatype checking (#1259) | parlai/tasks/wmt/agents.py | parlai/tasks/wmt/agents.py | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
fr... | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
fr... | Python | 0 |
542bb81e68975d52c23fa3829233cbff9ead39a7 | Use json for PUT | mnubo/api_manager.py | mnubo/api_manager.py | import requests
import json
import base64
import datetime
def authenticate(func):
def authenticate_and_call(*args):
if not args[0].is_access_token_valid():
args[0].access_token = args[0].fetch_access_token()
return func(*args)
return authenticate_and_call
class APIManager(object)... | import requests
import json
import base64
import datetime
def authenticate(func):
def authenticate_and_call(*args):
if not args[0].is_access_token_valid():
args[0].access_token = args[0].fetch_access_token()
return func(*args)
return authenticate_and_call
class APIManager(object)... | Python | 0.000002 |
226b27ad6e66c7d512ce6cad300b7f96de5ccfa7 | Introduce cache feature to GoogleDrive base logic. | model/googledrive.py | model/googledrive.py | # -*- encoding:utf8 -*-
import os
import httplib2
from oauth2client.client import SignedJwtAssertionCredentials
from apiclient.discovery import build
from model.cache import Cache
class GoogleDrive(object):
@classmethod
def retrieve_content(cls, **kwargs):
document_id = kwargs.get('document_id')
... | # -*- encoding:utf8 -*-
import os
import httplib2
from oauth2client.client import SignedJwtAssertionCredentials
from apiclient.discovery import build
class GoogleDrive(object):
@classmethod
def retrieve_content(cls, **kwargs):
document_id = kwargs.get('document_id')
export_type = kwargs.get(... | Python | 0 |
2ab36d3f98a3b909801b557df39742ef3a09d561 | Remove unused flag on autodiscover and handle_translation_registrations() | modeltrans/models.py | modeltrans/models.py |
def autodiscover():
'''
Auto-discover INSTALLED_APPS translation.py modules and fail silently when
not present. This forces an import on them to register.
Also import explicit modules.
'''
import os
import sys
import copy
from django.utils.module_loading import module_has_submodule... |
def autodiscover(create_virtual_fields=True):
'''
Auto-discover INSTALLED_APPS translation.py modules and fail silently when
not present. This forces an import on them to register.
Also import explicit modules.
'''
import os
import sys
import copy
from django.utils.module_loading i... | Python | 0 |
4c4499dcb86ae16a7d3822feab4390adca89d348 | Bump version to 0.12.1 | pingparsing/__version__.py | pingparsing/__version__.py | # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.12.1"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.12.0"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| Python | 0 |
0b94543d605ad64149faa6df2e3d8bf2e4b5c08c | remove print statement | plots/gender_by_country.py | plots/gender_by_country.py | from __future__ import print_function
from collections import OrderedDict
import csv
import numpy as np
import pandas
import world_countries as wc
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import autoload_static
import os
de... | from __future__ import print_function
from collections import OrderedDict
import csv
import numpy as np
import pandas
import world_countries as wc
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import autoload_static
import os
de... | Python | 0.999999 |
12995be9490bde60c92e6f962b748832c083fe45 | use API and HTTP HEAD instead | modules/subreddit.py | modules/subreddit.py | import re
import urllib.request as req
import urllib.error as err
class SubredditModule:
subre = re.compile(r"^(?:.* )?/r/([A-Za-z0-9][A-Za-z0-9_]{2,20})")
def __init__(self, circa):
self.circa = circa
self.events = {
"message": [self.findsub]
}
def findsub(self, fr, to, msg, m):
for sub in self.subr... | import re
import urllib.request as req
class SubredditModule:
subre = re.compile(r"^(?:.* )?/r/([A-Za-z0-9][A-Za-z0-9_]{2,20})")
def __init__(self, circa):
self.circa = circa
self.events = {
"message": [self.findsub]
}
def findsub(self, fr, to, msg, m):
for sub in self.subre.findall(msg):
url = "htt... | Python | 0 |
c1e84bd196f28c35b032a609a3edb5f596216f71 | fix for document.iter | mongoext/document.py | mongoext/document.py | from __future__ import absolute_import
import mongoext.collection
import mongoext.scheme
import mongoext.exc
class MetaDocument(type):
def __new__(cls, name, bases, attrs):
fields = {}
for base in bases:
for name, obj in vars(base).iteritems():
if issubclass(type(obj),... | from __future__ import absolute_import
import collections
import mongoext.collection
import mongoext.scheme
import mongoext.exc
class MetaDocument(type):
def __new__(cls, name, bases, attrs):
fields = {}
for base in bases:
for name, obj in vars(base).iteritems():
if i... | Python | 0.000001 |
15c2595e126689d184a5de52b8f209b4e3e6eb67 | add a test for json | zq_gen/str.py | zq_gen/str.py | '''
Helper functions for string related operation
'''
import unittest
def cmd_str2dic(cmd_str):
words = cmd_str.split()
rst = {}
if len(words) >= 1:
begin = 0;
if words[0][0:1] != '-': # the first one could be the the name of the command
rst['cmd_name'] = words[0]... | '''
Helper functions for string related operation
'''
import unittest
def cmd_str2dic(cmd_str):
words = cmd_str.split()
rst = {}
if len(words) >= 1:
begin = 0;
if words[0][0:1] != '-': # the first one could be the the name of the command
rst['cmd_name'] = words[0]... | Python | 0.000023 |
8bbb160cc742fa04c7aace678afa0d226c0d1407 | fix sample script | resources/examples/ClickToCall.py | resources/examples/ClickToCall.py | import string, cgi, time, thread
import sys, urllib, urllib2
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
number1 = ""
number2 = ""
listeningPort = 8081
listeningIp = "127.0.0.1"
bluescaleIp = "127.0.0.1"
bluescalePort = 8080
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self)... | import string, cgi, time, thread
import sys, urllib, urllib2
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
number1 = ""
number2 = ""
listeningPort = 8081
listeningIp = "127.0.0.1"
bluescaleIp = "127.0.0.1"
bluescalePort = 8080
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self)... | Python | 0.000001 |
7cd3c0449b05e75ffbe5ba346bab3ff389f63b9d | clean up map_async_bench | tests/benchmark/map_async_bench.py | tests/benchmark/map_async_bench.py | import threading
import random
import time
import logging
import sys
from os.path import dirname
sys.path.append(dirname(dirname(dirname(__file__))))
import hazelcast
REQ_COUNT = 50000
ENTRY_COUNT = 10 * 1000
VALUE_SIZE = 10000
GET_PERCENTAGE = 40
PUT_PERCENTAGE = 40
logging.basicConfig(format='%(asctime)s%(msecs... | import threading
import random
import time
import logging
import sys
from os.path import dirname
sys.path.append(dirname(dirname(dirname(__file__))))
import hazelcast
REQ_COUNT = 20000
ENTRY_COUNT = 10 * 1000
VALUE_SIZE = 10000
GET_PERCENTAGE = 40
PUT_PERCENTAGE = 40
logging.basicConfig(format='%(asctime)s%(msecs... | Python | 0.000018 |
29315213a8503de018a76badc71da3737d2b54c7 | Fix spiffsgen example test | examples/storage/spiffsgen/example_test.py | examples/storage/spiffsgen/example_test.py | from __future__ import print_function
import os
import hashlib
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_spiffsgen(env, extra_data):
# Test with default build configurations
dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen', dut_class=ttfw_idf.ESP32DUT)... | from __future__ import print_function
import os
import hashlib
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_spiffsgen(env, extra_data):
# Test with default build configurations
dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen', dut_class=ttfw_idf.ESP32DUT)... | Python | 0 |
7c762733311c6a52f0a7605a9495f8234c1d6ff2 | put portLo..Hi as arg | predictor/server/server.py | predictor/server/server.py | #!/usr/bin/python
import sys
from datetime import datetime
from server_thread import ServerThread as Server
def main(argv):
if len(sys.argv)!=4:
print 'USAGE: phyton prediction_server.py [serverId] [portLo] [portHi]'
return
host = '127.0.0.1'
serverId = argv[1]
portLo,portHi = int(arg... | #!/usr/bin/python
import sys
from datetime import datetime
from server_thread import ServerThread as Server
from config import serverConfig as scfg
def main():
if len(sys.argv)!=2:
print 'USAGE: phyton prediction_server.py [serverId]'
return
serverId = sys.argv[1]
if serverId not in scfg[... | Python | 0.000001 |
87ca8475f58b057e8043f8b398bd76123a89a733 | Revert "parsing html" | moz/minutes/helpers.py | moz/minutes/helpers.py | #!/usr/bin/env python
# encoding: utf-8
"""
helpers.py
Some modules to help with this project
Created by Karl Dubost on 2016-02-24.
Copyright (c) 2016 La Grange. All rights reserved.
MIT License
"""
import requests
def fetch_content(uri):
'''Fetch the URI and returns the raw content and its encoding'''
conten... | #!/usr/bin/env python
# encoding: utf-8
"""
helpers.py
Some modules to help with this project
Created by Karl Dubost on 2016-02-24.
Copyright (c) 2016 La Grange. All rights reserved.
MIT License
"""
import io
import sys
import lxml.html
import requests
def fetch_content(uri):
'''Fetch the URI and returns the ... | Python | 0 |
90b75ba76c5f98abf3d6484cc9c51119042b7812 | Fix issues with the tethys manage sync command. | tethys_apps/cli/manage_commands.py | tethys_apps/cli/manage_commands.py | """
********************************************************************************
* Name: manage_commands.py
* Author: Nathan Swain
* Created On: 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
"""
import os... | """
********************************************************************************
* Name: manage_commands.py
* Author: Nathan Swain
* Created On: 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
"""
import os... | Python | 0 |
8ecc26cffabb5a4c80b9a5574b102cc5c63312d3 | Update accounts.py | myuw/views/accounts.py | myuw/views/accounts.py | from myuw.views.page import page
from myuw.util.page_view import page_view
@page_view
def accounts(request):
return page(request, {}, template='accounts.html')
| from myuw.views.page import page
from myuw.util.page_view import page_view
@page_view
def accounts(request):
return page(request, {}, template='accounts.html') | Python | 0.000001 |
affb8417c7592158fbfd62c4cd49608a368ccabf | Switch update flag for full flag | nap/dataviews/views.py | nap/dataviews/views.py |
from collections import defaultdict
from inspect import classify_class_attrs
from django.db.models.fields import NOT_PROVIDED
from django.forms import ValidationError
from django.utils.functional import cached_property
from .fields import field
from .utils import DictObject
class DataView(object):
def __init__... |
from collections import defaultdict
from inspect import classify_class_attrs
from django.db.models.fields import NOT_PROVIDED
from django.forms import ValidationError
from django.utils.functional import cached_property
from .fields import field
from .utils import DictObject
class DataView(object):
def __init__... | Python | 0 |
9eebf1d43b93a6e1001186693d3a15ce2b5d568e | Add Bank and BankAccount models, add some fields to Supplier model | nbs/models/supplier.py | nbs/models/supplier.py | # -*- coding: utf-8 -*-
from nbs.models import db
from nbs.models.entity import Entity
from nbs.models.misc import FiscalDataMixin
class Supplier(Entity, FiscalDataMixin):
__tablename__ = 'supplier'
__mapper_args__ = {'polymorphic_identity': u'supplier'}
FREIGHT_SUPPLIER = 'FREIGHT_SUPPLIER'
FREIGHT... | # -*- coding: utf-8 -*-
from nbs.models import db
from nbs.models.entity import Entity
from nbs.models.misc import FiscalDataMixin
class Supplier(Entity, FiscalDataMixin):
__tablename__ = 'supplier'
__mapper_args__ = {'polymorphic_identity': u'supplier'}
supplier_id = db.Column(db.Integer, db.ForeignKey... | Python | 0 |
e1a7262bc4fc841b95ee6fb45c1bb0da5cc3f2c1 | add an option for fallback style in vimrc | tools/clang-format/clang-format.py | tools/clang-format/clang-format.py | # This file is a minimal clang-format vim-integration. To install:
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
#
# The first line enables clang-fo... | # This file is a minimal clang-format vim-integration. To install:
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
#
# The first line enables clang-fo... | Python | 0.000099 |
f57294c59e197c989536638776738b0ed0bcee1d | disable scheduler.tough_pepper_cases | tools/perf/benchmarks/scheduler.py | tools/perf/benchmarks/scheduler.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.
from telemetry import benchmark
from measurements import smoothness
import page_sets
class SchedulerToughSchedulingCases(benchmark.Benchmark):
"""Measure... | # 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.
from telemetry import benchmark
from measurements import smoothness
import page_sets
class SchedulerToughSchedulingCases(benchmark.Benchmark):
"""Measure... | Python | 0.000031 |
4fb1ad11add4436395f775a12f0d4e90b99d6594 | add ignore filtering | psutil_mon/psutil_alarm.py | psutil_mon/psutil_alarm.py |
#
# Hubblemon - Yet another general purpose system monitor
#
# Copyright 2015 NAVER Corp.
#
# 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
#
# U... |
#
# Hubblemon - Yet another general purpose system monitor
#
# Copyright 2015 NAVER Corp.
#
# 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
#
# U... | Python | 0.000001 |
7a66989b62d1776e72229ac36c0ed77235549b1d | Add a data timeout to ensure that we aren't blocked waiting on data for a connection that the pusher server does not think exists. This occurs when the network cable has been unplugged for an extended period of time and then reconnected. | pusherclient/connection.py | pusherclient/connection.py | import websocket
try:
import simplejson as json
except:
import json
from threading import Thread, Timer
import time
import logging
CONNECTION_EVENTS_NEW = [
'initialized',
'connecting',
'connected',
'unavailabl... | import websocket
try:
import simplejson as json
except:
import json
from threading import Thread
import time
import logging
CONNECTION_EVENTS_NEW = [
'initialized',
'connecting',
'connected',
'unavailable',
... | Python | 0 |
5cd9499fcc0c1f9b48216aeca11a7adcd8995a47 | Fix for MRV failing to enter enable mode | netmiko/mrv/mrv_ssh.py | netmiko/mrv/mrv_ssh.py | """MRV Communications Driver (OptiSwitch)."""
from __future__ import unicode_literals
import time
import re
from netmiko.cisco_base_connection import CiscoSSHConnection
class MrvOptiswitchSSH(CiscoSSHConnection):
"""MRV Communications Driver (OptiSwitch)."""
def session_preparation(self):
"""Prepare ... | """MRV Communications Driver (OptiSwitch)."""
from __future__ import unicode_literals
import time
import re
from netmiko.cisco_base_connection import CiscoSSHConnection
class MrvOptiswitchSSH(CiscoSSHConnection):
"""MRV Communications Driver (OptiSwitch)."""
def session_preparation(self):
"""Prepare ... | Python | 0 |
d24a8db471cc9a415e3e2081e702199990bd6ac4 | Add option to configure plot's linewidth | pyexperiment/utils/plot.py | pyexperiment/utils/plot.py | """Provides setup for matplotlib figures
Written by Peter Duerr.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import matplotlib
from matplotlib import pyplot as plt
def setup_matplotlib(font_size=14,
... | """Provides setup for matplotlib figures
Written by Peter Duerr.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import matplotlib
from matplotlib import pyplot as plt
def setup_matplotlib(font_size=14,
... | Python | 0.000001 |
9c40fa22c395b3d1dba800f0826606ecf314ddb2 | test update | apps/pypi/tests/test_slurper.py | apps/pypi/tests/test_slurper.py | from django.template.defaultfilters import slugify
from django.test import TestCase
from package.models import Package, Version
from pypi.slurper import Slurper
TEST_PACKAGE_NAME = 'Django'
TEST_PACKAGE_VERSION = '1.3'
TEST_PACKAGE_REPO_NAME = 'django-uni-form'
class SlurpAllTests(TestCase):
def tes... | from django.template.defaultfilters import slugify
from django.test import TestCase
from package.models import Package, Version
from pypi.slurper import Slurper
TEST_PACKAGE_NAME = 'Django'
TEST_PACKAGE_VERSION = '1.2.5'
TEST_PACKAGE_REPO_NAME = 'django-uni-form'
class SlurpAllTests(TestCase):
def t... | Python | 0.000001 |
fe797b35d4e9b3f623d60b42f38efe3bf9ac3705 | test para vistas de charlas | apps/votos/tests/tests_views.py | apps/votos/tests/tests_views.py | # -*- coding: utf-8 -*-
import unittest
from test_plus.test import TestCase
from ..factories.user import UserFactory
from ..factories.charla import CharlaFactory
from .. import constants
from ..models import Charla
class ViewsTestCase(TestCase):
def setUp(self):
self.user = UserFactory()
def tes... | # -*- coding: utf-8 -*-
import unittest
from test_plus.test import TestCase
from ..factories.user import UserFactory
class ViewsTestCase(TestCase):
def setUp(self):
self.user = UserFactory()
def test_posibles_eventos(self):
self.get('index')
self.response_200()
def test_agend... | Python | 0 |
fe3bb9440a46ae626c9bfd34882f3ad5823d7396 | drop unnecessary conn assignment | python/libvirt-override.py | python/libvirt-override.py | #
# Manually written part of python bindings for libvirt
#
# On cygwin, the DLL is called cygvirtmod.dll
try:
import libvirtmod
except ImportError, lib_e:
try:
import cygvirtmod as libvirtmod
except ImportError, cyg_e:
if str(cyg_e).count("No module named"):
raise lib_e
import ... | #
# Manually written part of python bindings for libvirt
#
# On cygwin, the DLL is called cygvirtmod.dll
try:
import libvirtmod
except ImportError, lib_e:
try:
import cygvirtmod as libvirtmod
except ImportError, cyg_e:
if str(cyg_e).count("No module named"):
raise lib_e
import ... | Python | 0 |
a961e11c5b3666f2504cf2a0d46028b5957cb9bf | Fix doctest | qnet/misc/testing_tools.py | qnet/misc/testing_tools.py | """Collection of routines needed for testing. This includes proto-fixtures,
i.e. routines that should be imported and then turned into a fixture with the
pytest.fixture decorator.
See <https://pytest.org/latest/fixture.html>
"""
import os
from glob import glob
from collections import OrderedDict
from distutils import ... | """Collection of routines needed for testing. This includes proto-fixtures,
i.e. routines that should be imported and then turned into a fixture with the
pytest.fixture decorator.
See <https://pytest.org/latest/fixture.html>
"""
import os
from glob import glob
from collections import OrderedDict
from distutils import ... | Python | 0.000002 |
a6b49b92bd942655c0fe9a1c745e53ea19e070b5 | create a new django custom tag to replace a substring in a global string | src/alfanous-django/wui/templatetags/custom_filters.py | src/alfanous-django/wui/templatetags/custom_filters.py | '''
Created on Dec 29, 2012
@author: assem
'''
from django.template import Library
register = Library()
@register.filter
def get_range( value ):
""" make a range from a number starting of 1 """
return range( 1, value + 1 )
@register.filter
def space_split( str ):
""" split a string counting on spaces """
r... | '''
Created on Dec 29, 2012
@author: assem
'''
from django.template import Library
register = Library()
@register.filter
def get_range( value ):
""" make a range from a number starting of 1 """
return range( 1, value + 1 )
@register.filter
def space_split( str ):
""" split a string counting on spaces """
r... | Python | 0.000777 |
728cfe8e3c40ecd4e0128030d1d66864816626c8 | use single pipe to avoid problems with Jenkins reading them concurrently (#552) | ros_buildfarm/catkin_workspace.py | ros_buildfarm/catkin_workspace.py | # Copyright 2014-2016 Open Source Robotics Foundation, 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 applicabl... | # Copyright 2014-2016 Open Source Robotics Foundation, 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 applicabl... | Python | 0 |
8369d189e822fa7496864cac4ddc906bf7c05fe3 | Convert gaphor/UML/classes/tests/test_interface.py to pytest | gaphor/UML/classes/tests/test_interface.py | gaphor/UML/classes/tests/test_interface.py | """Test classes."""
from gaphor import UML
from gaphor.UML.classes.interface import Folded, InterfaceItem
class TestInterface:
def test_interface_creation(self, case):
"""Test interface creation."""
iface = case.create(InterfaceItem, UML.Interface)
assert isinstance(iface.subject, UML.Int... | """Test classes."""
from gaphor import UML
from gaphor.tests import TestCase
from gaphor.UML.classes.interface import Folded, InterfaceItem
class InterfaceTestCase(TestCase):
def test_interface_creation(self):
"""Test interface creation."""
iface = self.create(InterfaceItem, UML.Interface)
... | Python | 0.999999 |
03734b5f42a448e20f5926dd6ffc24cc40dc004e | Remove unused methods | src/foremast/pipeline/construct_pipeline_block_datapipeline.py | src/foremast/pipeline/construct_pipeline_block_datapipeline.py | # Foremast - Pipeline Tooling
#
# Copyright 2016 Gogo, LLC
#
# 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... | # Foremast - Pipeline Tooling
#
# Copyright 2016 Gogo, LLC
#
# 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... | Python | 0.000034 |
a842439edb47524b64345d3a893199f3b92f2b14 | Fix top-level domain extraction from site name. | google_analytics/templatetags/analytics.py | google_analytics/templatetags/analytics.py | from django import template
from django.db import models
from django.contrib.sites.models import Site
from django.template import Context, loader
register = template.Library()
Analytics = models.get_model('google_analytics', 'analytic')
def do_get_analytics(parser, token):
try:
# split_contents() knows ... | from django import template
from django.db import models
from django.contrib.sites.models import Site
from django.template import Context, loader
register = template.Library()
Analytics = models.get_model('google_analytics', 'analytic')
def do_get_analytics(parser, token):
try:
# split_contents() knows ... | Python | 0 |
0d2f35ddc27cf4c7155a4d1648c0bbfe0ff3a528 | Fix the bool name in the array API namespace | numpy/_array_api/dtypes.py | numpy/_array_api/dtypes.py | from .. import int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64
# Note: This name is changed
from .. import bool_ as bool
__all__ = ['int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'float32', 'float64', 'bool']
| from .. import int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64, bool
__all__ = ['int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'float32', 'float64', 'bool']
| Python | 0.99996 |
ff611c4a41cdbaf9b3306650a3d1bc4177b23bad | Update sst.py | banpei/sst.py | banpei/sst.py | import numpy as np
from banpei.base.model import Model
class SST(Model):
def __init__(self):
pass
def detect(self, data, w, m=2, k=None, L=None):
"""
Parameters
----------
data : array_like
Input array or object that can be converted to an array.
... | import numpy as np
from banpei.base.model import Model
class SST(Model):
def __init__(self):
pass
def _extract_matrix(self, data, start, end, w):
row = w
column = end - start + 1
matrix = np.empty((row, column))
i = 0
for t in range(start, end+1):
m... | Python | 0.000001 |
ff268941bfc588e21a2f460c034e3c0a99837d23 | Fix migration order (post-rebase) | migrations/versions/201502111317_233928da84b2_create_video_conference_rooms.py | migrations/versions/201502111317_233928da84b2_create_video_conference_rooms.py | """Create video conference rooms
Revision ID: 233928da84b2
Revises: 50c2b5ee2726
Create Date: 2015-02-11 13:17:44.365589
"""
import sqlalchemy as sa
from alembic import op
from indico.core.db.sqlalchemy import PyIntEnum
from indico.core.db.sqlalchemy import UTCDateTime
from indico.modules.vc.models.vc_rooms import VC... | """Create video conference rooms
Revision ID: 233928da84b2
Revises: 50c2b5ee2726
Create Date: 2015-02-11 13:17:44.365589
"""
import sqlalchemy as sa
from alembic import op
from indico.core.db.sqlalchemy import PyIntEnum
from indico.core.db.sqlalchemy import UTCDateTime
from indico.modules.vc.models.vc_rooms import VC... | Python | 0 |
8d40cd3dab606d558806fa00b0ed5df73c457045 | Fix for issue #2. | bgui/frame.py | bgui/frame.py | from .gl_utils import *
from .widget import Widget, BGUI_DEFAULT
class Frame(Widget):
"""Frame for storing other widgets"""
theme_section = 'Frame'
theme_options = {
'Color1': (0, 0, 0, 0),
'Color2': (0, 0, 0, 0),
'Color3': (0, 0, 0, 0),
'Color4': (0, 0, 0, 0),
'BorderSize': 0,
'BorderColor... | from .gl_utils import *
from .widget import Widget, BGUI_DEFAULT
class Frame(Widget):
"""Frame for storing other widgets"""
theme_section = 'Frame'
theme_options = {
'Color1': (0, 0, 0, 0),
'Color2': (0, 0, 0, 0),
'Color3': (0, 0, 0, 0),
'Color4': (0, 0, 0, 0),
'BorderSize': 0,
'BorderColor... | Python | 0 |
7a0560d8bd9dcb421b54522df92618d439941e69 | Change bill detail page to use session and identifier | bills/urls.py | bills/urls.py | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_session>(... | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_id>(.*))/... | Python | 0 |
14e2d2282b7c95a1bb6d475faa6d827d90609e16 | Define PostAdmin list_display. | blog/admin.py | blog/admin.py | from django.contrib import admin
from .models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ('title', 'pub_date')
| from django.contrib import admin
from .models import Post
admin.site.register(Post)
| Python | 0 |
0d389018353f03d79332a1b40d6dc1881df91cd0 | Fix sorting of items in RSS feed | blog/views.py | blog/views.py | from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed
from .models import BlogIndexPage, BlogPage, BlogCategory
from django.shortcuts import get_object_or_404
from django.conf import settings
def tag_view(request, tag):
index = BlogIndexPage.objects.first()
return ... | from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed
from .models import BlogIndexPage, BlogPage, BlogCategory
from django.shortcuts import get_object_or_404
from django.conf import settings
def tag_view(request, tag):
index = BlogIndexPage.objects.first()
return ... | Python | 0 |
3e2cbd52a916b767473335427702ecf3bae5a51d | create dir if image_filter not exist | CapturePictures.py | CapturePictures.py | #!/usr/bin/env python
import cv2
import os
import argparse
def capturePicturesByCamera(num = 300, saveDir = "./image_filter/"):
"""
Capture pictures with faces detected.
Args:
num (int): The number of pictures to capture. Default: 300.
saveDir (str): The directory to save the captured pi... | #!/usr/bin/env python
import cv2
import sys
import argparse
def capturePicturesByCamera(num = 300, saveDir = "./image_filter/"):
"""
Capture pictures with faces detected.
Args:
num (int): The number of pictures to capture. Default: 300.
saveDir (str): The directory to save the captured p... | Python | 0.000008 |
d9f623baaa8e1d1075f9132108ed7bb11eea39b0 | Replace dask.get from core.get to async.get_sync | dask/__init__.py | dask/__init__.py | from __future__ import absolute_import, division, print_function
from .core import istask
from .context import set_options
from .async import get_sync as get
try:
from .imperative import do, value
except ImportError:
pass
__version__ = '0.7.3'
| from __future__ import absolute_import, division, print_function
from .core import istask, get
from .context import set_options
try:
from .imperative import do, value
except ImportError:
pass
__version__ = '0.7.3'
| Python | 0 |
de4f02fff4b23a442abe3062c2da4c52d8823627 | Fix spurious deprecation warning for fatal_warnings (#6237) | src/python/pants/backend/jvm/subsystems/zinc_language_mixin.py | src/python/pants/backend/jvm/subsystems/zinc_language_mixin.py | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from pants.base.deprecated import deprecated
class ZincLan... | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from pants.base.deprecated import deprecated
class ZincLan... | Python | 0 |
93b752a251b43c268a6becb53ab298e958a46aeb | add Category Field in template | awesomepose/posts/forms/post.py | awesomepose/posts/forms/post.py | from django import forms
from django.forms import ModelMultipleChoiceField
from django_summernote.widgets import SummernoteWidget, SummernoteInplaceWidget
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field, Fieldset, Button, Div
from crispy_forms.bootstrap import (
Prep... | from django import forms
from django_summernote.widgets import SummernoteWidget, SummernoteInplaceWidget
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field, Fieldset, Button
from crispy_forms.bootstrap import (
PrependedText, PrependedAppendedText, FormActions)
from po... | Python | 0 |
8a26eddf5c8d0913f15722a59542cd1dccfbbad4 | fix reference to instance var | Conficat/Config.py | Conficat/Config.py | #!/usr/bin/env python
"""
Conficat internal configuration class
"""
import os
import re
import sys
import logging
from Cheetah.ImportHooks import install as cheetah_import_install
from TemplateRegistry import TemplateRegistry
from CSVDataSource import CSVDataSource
from ConfigError import ConfigError
class Config(obj... | #!/usr/bin/env python
"""
Conficat internal configuration class
"""
import os
import re
import sys
import logging
from Cheetah.ImportHooks import install as cheetah_import_install
from TemplateRegistry import TemplateRegistry
from CSVDataSource import CSVDataSource
from ConfigError import ConfigError
class Config(obj... | Python | 0.000001 |
ad2944a49b357494ff09a729b468f2fb19934909 | remove vertically-aligned assignments, per PEP8 | guestbook/__init__.py | guestbook/__init__.py | # coding: utf-8
import shelve
from datetime import datetime
from flask import Flask, request, render_template, redirect, escape, Markup
application = Flask(__name__)
DATA_FILE = 'guestbook.dat'
def save_data(name, comment, create_at):
database = shelve.open(DATA_FILE)
if 'greeting_list' not in database:
... | # coding: utf-8
import shelve
from datetime import datetime
from flask import Flask, request, render_template, redirect, escape, Markup
application = Flask(__name__)
DATA_FILE = 'guestbook.dat'
def save_data(name, comment, create_at):
database = shelve.open(DATA_FILE)
if 'greeting_list' not in database:
... | Python | 0.000006 |
1c6a2f87ebd75d69857590ec3918d65ee6468b81 | Add link to docs | homeassistant/components/feedreader.py | homeassistant/components/feedreader.py | """
Support for RSS/Atom feed.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/feedreader/
"""
from datetime import datetime
from logging import getLogger
import voluptuous as vol
from homeassistant.helpers.event import track_utc_time_change
REQUIREMENT... | """RSS/Atom feed reader for Home Assistant."""
from datetime import datetime
from logging import getLogger
import voluptuous as vol
from homeassistant.helpers.event import track_utc_time_change
REQUIREMENTS = ['feedparser==5.2.1']
_LOGGER = getLogger(__name__)
DOMAIN = "feedreader"
EVENT_FEEDREADER = "feedreader"
# py... | Python | 0 |
f6efb0ff31ae8d0db5682cd7ad5b0921e3a4e924 | Bump version for new release. | openstack_auth/__init__.py | openstack_auth/__init__.py | # following PEP 386
__version__ = "1.0.7"
| # following PEP 386
__version__ = "1.0.6"
| Python | 0 |
8da7edb1311b73013dcf497c293212df5e0041c7 | use new nfw potential | ophiuchus/potential/oph.py | ophiuchus/potential/oph.py | # coding: utf-8
# cython: boundscheck=False
# cython: nonecheck=False
# cython: cdivision=True
# cython: wraparound=False
# cython: profile=False
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Third-party
from gala.units import galactic
from gala.potential import (CCo... | # coding: utf-8
# cython: boundscheck=False
# cython: nonecheck=False
# cython: cdivision=True
# cython: wraparound=False
# cython: profile=False
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Third-party
from gala.units import galactic
from gala.potential import (CCo... | Python | 0.000001 |
a66ff915dcaee3e1db370196a3b40b612eb43d19 | Add support to template_name_suffix in get_template_names methods | opps/views/generic/list.py | opps/views/generic/list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.list import ListView as DjangoListView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from django.conf import settings
from opps.views.generic.base import View
from opps.containers.models import Contain... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.list import ListView as DjangoListView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from django.conf import settings
from opps.views.generic.base import View
from opps.containers.models import Contain... | Python | 0 |
7a99ade694c5844727ca33461dd3ad5271b61f14 | Improve q_n tests. | hic/test/test_flow.py | hic/test/test_flow.py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from .. import flow
def test_qn(seed=1248):
# q_n(0) = 1
q = flow.qn(2, 0)
assert q == 1+0j, \
'Incorrect single-particle q_n ({} != 1).'.format(q)
# q_3(uniform phi) = -1
q = flow.qn(3, np.arange(-np.pi, np.pi,... | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from .. import flow
def test_qn():
assert flow.qn(2, 0) == 1+0j, \
'Single-particle q_n.'
assert np.allclose(flow.qn(3, np.arange(-np.pi, np.pi, 10)), -1+0j), \
'Isotropic q_n.'
def test_flow_cumulant():
pass
| Python | 0.000012 |
7c10feeed640f4d1a66bb3207ade980733409ad9 | improve unit test | witica/test_source.py | witica/test_source.py | # coding=utf-8
import os
import unittest
import pkg_resources
from witica.source import Source, SourceItemList
from witica.log import *
from witica.metadata import extractor
class TestSourceItemList(unittest.TestCase):
def setUp(self):
Logger.start(verbose=False)
self.resource_path = pkg_resources.resource_fi... | # coding=utf-8
import os
import unittest
import pkg_resources
from witica.source import Source, SourceItemList
from witica.log import *
from witica.metadata import extractor
class TestSourceItemList(unittest.TestCase):
def setUp(self):
Logger.start(verbose=False)
self.resource_path = pkg_resources.resource_fi... | Python | 0.000002 |
1b7e6d41a6832ef7a8f9dafe0cd8580356f8e9da | check regex match before access in flickr module | mygpo/data/flickr.py | mygpo/data/flickr.py | #
# This file is part of gpodder.net.
#
# my.gpodder.org 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.
#
# my.gpodder.org is d... | #
# This file is part of gpodder.net.
#
# my.gpodder.org 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.
#
# my.gpodder.org is d... | Python | 0 |
963481958af78655e02a5d7d01e156f9b6ee506e | Correct HStoreField code | hs_core/hydro_realtime_signal_processor.py | hs_core/hydro_realtime_signal_processor.py | from django.db import models
from haystack.signals import RealtimeSignalProcessor
from haystack.exceptions import NotHandled
import logging
import types
from haystack.query import SearchQuerySet
from haystack.utils import get_identifier
logger = logging.getLogger(__name__)
class HydroRealtimeSignalProcessor(Realtime... | from django.db import models
from haystack.signals import RealtimeSignalProcessor
from haystack.exceptions import NotHandled
import logging
import types
from haystack.query import SearchQuerySet
from haystack.utils import get_identifier
logger = logging.getLogger(__name__)
class HydroRealtimeSignalProcessor(Realtime... | Python | 0.000041 |
81d01175a7403b3e627738056ef9436e8172e51e | Enforce python 3.6 | shared_infra/lambdas/common/setup.py | shared_infra/lambdas/common/setup.py | import os
from setuptools import find_packages, setup
def local_file(name):
return os.path.relpath(os.path.join(os.path.dirname(__file__), name))
SOURCE = local_file('src')
setup(
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
version='1.0.0',
insta... | import os
from setuptools import find_packages, setup
def local_file(name):
return os.path.relpath(os.path.join(os.path.dirname(__file__), name))
SOURCE = local_file('src')
setup(
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
version='1.0.0',
insta... | Python | 0.000187 |
3abe25d2272e2a0111511b68407da0ef3c53f59e | Use wizard settings during samba provision | nazs/samba/module.py | nazs/samba/module.py | from nazs import module
from nazs.commands import run
from nazs.sudo import root
import os
import logging
from .models import DomainSettings
logger = logging.getLogger(__name__)
class Samba(module.Module):
"""
Samba 4 module, it deploys samba AD and file server
"""
ETC_FILE = '/etc/samba/smb.conf'... | from nazs import module
from nazs.commands import run
from nazs.sudo import root
import os
import logging
logger = logging.getLogger(__name__)
class Samba(module.Module):
"""
Samba 4 module, it deploys samba AD and file server
"""
ETC_FILE = '/etc/samba/smb.conf'
install_wizard = 'samba:instal... | Python | 0 |
2383497f25e400aa27c600d3a30526d118e2a6dc | fix scan, follow new scan chain | host/test_register.py | host/test_register.py | from scan.scan import ScanBase
class TestRegisters(ScanBase):
def __init__(self, config_file, definition_file = None, bit_file = None, device = None, scan_identifier = "test_register", scan_data_path = None):
super(TestRegisters, self).__init__(config_file = config_file, definition_file = definition_fi... | from scan.scan import ScanBase
class TestRegisters(ScanBase):
def __init__(self, config_file, definition_file = None, bit_file = None, device = None, scan_identifier = "test_register", scan_data_path = None):
super(TestRegisters, self).__init__(config_file = config_file, definition_file = definition_fi... | Python | 0 |
63ed4199e5cb3f8eb9a6b294ac8c6df12f9b5f56 | Add last_request function to httprequest module | httpretty/__init__.py | httpretty/__init__.py | # #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to d... | # #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to d... | Python | 0.000002 |
2e4a934203b4d736a4180a970cacca508400ea7e | Update runcrons Command() to timezone.now() | django_cron/management/commands/runcrons.py | django_cron/management/commands/runcrons.py | from django.core.management.base import BaseCommand
from django.conf import settings
from django.core.cache import cache
from django.utils import timezone
from django_cron import CronJobManager
from datetime import datetime
from optparse import make_option
DEFAULT_LOCK_TIME = 15*60
def get_class( kls ):
"""TODO:... | from django.core.management.base import BaseCommand
from django.conf import settings
from django.core.cache import cache
from django_cron import CronJobManager
from datetime import datetime
from optparse import make_option
DEFAULT_LOCK_TIME = 15*60
def get_class( kls ):
"""TODO: move to django-common app.
C... | Python | 0.000001 |
abbe9b391ed32a07c5e912e3683ff7668e12eeb5 | bump to new version | octbrowser/__init__.py | octbrowser/__init__.py | __version__ = '0.4.1'
| __version__ = '0.4'
| Python | 0 |
5fb03068113ccdaebb2496f127146617f8931c02 | Add depth users to user summary | scripts/analytics/user_summary.py | scripts/analytics/user_summary.py | import pytz
import logging
from dateutil.parser import parse
from datetime import datetime, timedelta
from modularodm import Q
from website.app import init_app
from website.models import User, NodeLog
from scripts.analytics.base import SummaryAnalytics
logger = logging.getLogger(__name__)
logging.basicConfig(level=l... | import pytz
import logging
from dateutil.parser import parse
from datetime import datetime, timedelta
from modularodm import Q
from website.app import init_app
from website.models import User
from scripts.analytics.base import SummaryAnalytics
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.IN... | Python | 0.00001 |
3582191d79646041ec589e2f1928c4cc560f5eaa | Add model, iOS, id to underlevel script. | scripts/my_export_accounts_csv.py | scripts/my_export_accounts_csv.py | #!/usr/bin/env python3
import csv
import sys
from datetime import datetime
from pathlib import Path
monocle_dir = Path(__file__).resolve().parents[1]
sys.path.append(str(monocle_dir))
from monocle.shared import ACCOUNTS
accounts_file = monocle_dir / 'accounts.csv'
try:
now = datetime.now().strftime("%Y-%m-%d-%... | #!/usr/bin/env python3
import csv
import sys
from datetime import datetime
from pathlib import Path
monocle_dir = Path(__file__).resolve().parents[1]
sys.path.append(str(monocle_dir))
from monocle.shared import ACCOUNTS
accounts_file = monocle_dir / 'accounts.csv'
try:
now = datetime.now().strftime("%Y-%m-%d-%... | Python | 0 |
0c1952c70358494cafcd5b6d2bbee31bdd1a5cb1 | update post code detector documentation | scrubadub/detectors/postalcode.py | scrubadub/detectors/postalcode.py | import re
from .base import RegionLocalisedRegexDetector
from ..filth.postalcode import PostalCodeFilth
class PostalCodeDetector(RegionLocalisedRegexDetector):
"""Detects postal codes, currently only British post codes are supported."""
filth_cls = PostalCodeFilth
name = 'postalcode'
region_regex = {... | import re
from .base import RegionLocalisedRegexDetector
from ..filth.postalcode import PostalCodeFilth
class PostalCodeDetector(RegionLocalisedRegexDetector):
"""Detects british postcodes."""
filth_cls = PostalCodeFilth
name = 'postalcode'
region_regex = {
'GB': re.compile(r"""
(... | Python | 0 |
6eff7f5d614a89a298fd31f83e0a514193b1d73a | add plot for cot_globale | c2cstats/plots.py | c2cstats/plots.py | #!/usr/bin/env python2
# -*- coding:utf-8 -*-
import datetime
import string
import os.path
import numpy as np
import matplotlib.pyplot as plt
from collections import Counter
OUTPUT_DIR = "_output"
FILE_EXT = ".svg"
MONTHS = {u'janvier': 1, u'février': 2, u'mars': 3, u'avril': 4, u'mai': 5,
u'juin': 6, u'ju... | #!/usr/bin/env python2
# -*- coding:utf-8 -*-
import datetime
import string
import os.path
import numpy as np
import matplotlib.pyplot as plt
from collections import Counter
OUTPUT_DIR = "_output"
FILE_EXT = ".svg"
MONTHS = {u'janvier': 1, u'février': 2, u'mars': 3, u'avril': 4, u'mai': 5,
u'juin': 6, u'ju... | Python | 0.000002 |
1d2ea0c72d8700687761125e4eaf90ec52f419be | Fix ORM call and add progress check | custom/icds_reports/management/commands/update_aadhar_date.py | custom/icds_reports/management/commands/update_aadhar_date.py | from __future__ import absolute_import, print_function
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from django.db import connections
from corehq.apps.locations.models import SQLLocation
from corehq.sql_db.routers import db_for_read_write
from custom.icds_reports.model... | from __future__ import absolute_import, print_function
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from django.db import connections
from corehq.apps.locations.models import SQLLocation
from corehq.sql_db.routers import db_for_read_write
from custom.icds_reports.model... | Python | 0 |
e2d8a32590c0865b2a8339d86af4eb9b34ea5d20 | Update __init__.py | tendrl/node_agent/objects/cluster_message/__init__.py | tendrl/node_agent/objects/cluster_message/__init__.py | from tendrl.commons import etcdobj
from tendrl.commons.message import Message as message
from tendrl.commons import objects
class ClusterMessage(objects.BaseObject, message):
internal = True
def __init__(self, **cluster_message):
self._defs = {}
message.__init__(self, **cluster_message)
... | from tendrl.commons import etcdobj
from tendrl.commons.message import Message as message
from tendrl.commons import objects
class ClusterMessage(objects.BaseObject, message):
internal = True
def __init__(self, **cluster_message):
self._defs = {}
message.__init__(self, **cluster_message)
... | Python | 0.000072 |
724b4c382015aa933659a24f7be3bd2cabbcb5eb | Add flag --exclusive setting whether to run as exclusive or not | sherlock.stanford.edu.run_gpaw.py | sherlock.stanford.edu.run_gpaw.py | #!/usr/bin/env python
from sys import argv
import os
job = argv[1]
nodes = argv[2]
time = argv[3] + ":00"
if '--exclusive' in argv:
is_exclusive = True
argv.remove('--exclusive')
else:
is_exclusive = False
if len(argv) > 4:
gpaw_options = ' '.join(argv[4:])
else:
gpaw_options = ' '
#options = '-l... | """This is the submission script for GPAW on Sherlock at Stanford"""
#!/usr/bin/env python
from sys import argv
import os
job = argv[1]
nodes = argv[2]
time = argv[3] + ":00"
if len(argv) > 4:
gpaw_options = ' '.join(argv[4:])
else:
gpaw_options = ' '
#options = '-l nodes=' + nodes +':ppn=2' + ' -l' +' wallti... | Python | 0 |
31cec1c5ab052f237445b8969088aba755ae73cf | Clean up now-unnecessary DummyStorage(). | incuna_test_utils/testcases/integration.py | incuna_test_utils/testcases/integration.py | from django.core.exceptions import ImproperlyConfigured
from django.shortcuts import render
from .request import BaseRequestTestCase
class BaseIntegrationTestCase(BaseRequestTestCase):
"""
A TestCase that operates similarly to a Selenium test.
Contains methods that access pages and render them to string... | from django.core.exceptions import ImproperlyConfigured
from django.shortcuts import render
from .request import BaseRequestTestCase
class BaseIntegrationTestCase(BaseRequestTestCase):
"""
A TestCase that operates similarly to a Selenium test.
Contains methods that access pages and render them to string... | Python | 0 |
ec25f9c1b0212f1f23855eab22078d1563cd7165 | Use int for survey_id and question_id | indico/modules/events/surveys/blueprint.py | indico/modules/events/surveys/blueprint.py | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Python | 0.000003 |
da0289cf8e95b3f462b4596bb9534d7bb853cae8 | Add test for reply_affinity = True case. | vumi/dispatchers/tests/test_load_balancer.py | vumi/dispatchers/tests/test_load_balancer.py | """Tests for vumi.dispatchers.load_balancer."""
from twisted.internet.defer import inlineCallbacks
from vumi.tests.utils import VumiWorkerTestCase
from vumi.dispatchers.tests.utils import DummyDispatcher
from vumi.dispatchers.load_balancer import LoadBalancingRouter
class BaseLoadBalancingTestCase(VumiWorkerTestCas... | """Tests for vumi.dispatchers.load_balancer."""
from twisted.internet.defer import inlineCallbacks
from vumi.tests.utils import VumiWorkerTestCase
from vumi.dispatchers.tests.utils import DummyDispatcher
from vumi.dispatchers.load_balancer import LoadBalancingRouter
class TestLoadBalancingRouter(VumiWorkerTestCase)... | Python | 0.000001 |
76f19afd5cfb084327740de9346781e730d764f9 | Add message method for create etc | iatiupdates/models.py | iatiupdates/models.py |
# IATI Updates, IATI Registry API augmented
# by Mark Brough
#
# Copyright (C) 2013 Publish What You Fund
#
# This programme is free software; you may redistribute and/or modify
# it under the terms of the GNU Affero General Public License v3.0
from sqlalchemy import *
from iatiupdates import db
from datetime im... |
# IATI Updates, IATI Registry API augmented
# by Mark Brough
#
# Copyright (C) 2013 Publish What You Fund
#
# This programme is free software; you may redistribute and/or modify
# it under the terms of the GNU Affero General Public License v3.0
from sqlalchemy import *
from iatiupdates import db
from datetime im... | Python | 0 |
c019c337c8642006a7a851c40bbedbb2c32fc5b5 | Add nuclear option to delete all available caches | wger/core/management/commands/clear-cache.py | wger/core/management/commands/clear-cache.py | # -*- coding: utf-8 *-*
# This file is part of wger Workout Manager.
#
# wger Workout Manager 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 ... | # -*- coding: utf-8 *-*
# This file is part of wger Workout Manager.
#
# wger Workout Manager 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 ... | Python | 0 |
5952c372ae01672bfce450aec924628faecd3654 | bump version for release | crossbar/crossbar/__init__.py | crossbar/crossbar/__init__.py | ###############################################################################
##
## Copyright (C) 2011-2015 Tavendo GmbH
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License, version 3,
## as published by the Free Software Founda... | ###############################################################################
##
## Copyright (C) 2011-2015 Tavendo GmbH
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License, version 3,
## as published by the Free Software Founda... | Python | 0 |
0b4fb3dd59ce0940026b1cf212adcf6d17bca7a0 | Refactor build_update_query (2) | mongots/query.py | mongots/query.py | from datetime import datetime
AGGREGATION_KEYS = [
'',
'months.{month}.',
'months.{month}.days.{day}.',
'months.{month}.days.{day}.hours.{hour}.',
]
DATETIME_KEY = 'datetime'
def build_filter_query(timestamp, tags=None):
filters = tags or {}
filters[DATETIME_KEY] = datetime(timestamp.year, 1... | from datetime import datetime
AGGREGATION_KEYS = [
'',
'months.{month}.',
'months.{month}.days.{day}.',
'months.{month}.days.{day}.hours.{hour}.',
]
DATETIME_KEY = 'datetime'
def build_filter_query(timestamp, tags=None):
filters = tags or {}
filters[DATETIME_KEY] = datetime(timestamp.year, 1... | Python | 0 |
51432aa92e233ba3c9db500e4e3d55b7067e906c | Add latest version of py-jinja2 (#13311) | var/spack/repos/builtin/packages/py-jinja2/package.py | var/spack/repos/builtin/packages/py-jinja2/package.py | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJinja2(PythonPackage):
"""Jinja2 is a template engine written in pure Python. It provide... | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJinja2(PythonPackage):
"""Jinja2 is a template engine written in pure Python. It provide... | Python | 0 |
77f155fec48c808724eff1b2631035d2526c170f | add version 2.11.3 (#23698) | var/spack/repos/builtin/packages/py-jinja2/package.py | var/spack/repos/builtin/packages/py-jinja2/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJinja2(PythonPackage):
"""Jinja2 is a template engine written in pure Python. It provide... | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJinja2(PythonPackage):
"""Jinja2 is a template engine written in pure Python. It provide... | Python | 0.000009 |
5b6445e519fa9c03d703144462004ac27b9079ba | Add latest version of joblib (#11495) | var/spack/repos/builtin/packages/py-joblib/package.py | var/spack/repos/builtin/packages/py-joblib/package.py | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJoblib(PythonPackage):
"""Python function as pipeline jobs"""
homepage = "http://pa... | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyJoblib(PythonPackage):
"""Python function as pipeline jobs"""
homepage = "http://pa... | Python | 0 |
028391c0a3778d20d162882b6778a164984ceb2a | update dependencies and fix build (#9207) | var/spack/repos/builtin/packages/py-spyder/package.py | var/spack/repos/builtin/packages/py-spyder/package.py | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 |
350a5422ed1f874e7b2780348663f320a1af6676 | Update py-theano dependencies (#14015) | var/spack/repos/builtin/packages/py-theano/package.py | var/spack/repos/builtin/packages/py-theano/package.py | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyTheano(PythonPackage):
"""Optimizing compiler for evaluating mathematical expressions on... | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyTheano(PythonPackage):
"""Optimizing compiler for evaluating mathematical expressions on... | Python | 0 |
38199ce9cfb69b21e45e679d3a6604a72da7cc5b | add version 0.5.0 to r-forcats (#20972) | var/spack/repos/builtin/packages/r-forcats/package.py | var/spack/repos/builtin/packages/r-forcats/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RForcats(RPackage):
"""Tools for Working with Categorical Variables (Factors)
Helpers... | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RForcats(RPackage):
"""Helpers for reordering factor levels (including moving specified le... | Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.