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 |
|---|---|---|---|---|---|---|---|
b83c4ddb14c9ba555d187125838a5189dfb3530c | Remove six as an explicit dependency. | setup.py | setup.py | import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('mycli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'CLI for MySQL Database. With auto-completi... | import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('mycli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'CLI for MySQL Database. With auto-completi... | Python | 0 |
540bf48cdca59744baf043cbfa5056b07e493429 | fix sage script to work generally over a list of account ids to produce lists of journals | portality/scripts/journals_in_doaj_by_account.py | portality/scripts/journals_in_doaj_by_account.py | from portality import models
from portality.core import app
from portality.core import es_connection
import esprit
import csv
import json
from portality.util import ipt_prefix
class JournalQuery(object):
def __init__(self, owner):
self.owner = owner
def query(self):
return {
"query... | Python | 0 | |
4d139c6d2b9ea368bfc5189537d9af67cea582f6 | Create demo_Take_Photo_when_PIR_high.py | demo_Take_Photo_when_PIR_high.py | demo_Take_Photo_when_PIR_high.py | import time
import picamera
import datetime
import RPi.GPIO as GPIO
def CheckPIR():
# dependencies are RPi.GPIO and time
# returns whats_here with "NOTHING HERE" or "SOMETHING HERE"
time.sleep(1)
#don't rush the PIR!
GPIO.setmode(GPIO.BOARD)
# set numbering system for GPIO PINs are BOARD
GP... | Python | 0.000001 | |
feeb386efe01fb3dd4e70e216337c8a4b476cb9a | Add setup.py | setup.py | setup.py | #!/usr/bin/env python
# Copyright 2015-2015 ARM Limited
#
# 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... | Python | 0 | |
4a4231976f2f084c1233e3efe27f5d18b486f146 | Create setup.py | setup.py | setup.py | from setuptools import setup
import re
name = 'gcdb'
version = ''
with open('{0}/__init__.py'.format(name), 'rb') as f:
match_object = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(),
re.MULTILINE)
version = match_object.group(1)
setup(
name=name,
version=versio... | Python | 0.000001 | |
3c314d006fb1726b671d0223f08fe16f0944cd82 | test call started sla | cla_backend/apps/reports/tests/test_mi_sla_report.py | cla_backend/apps/reports/tests/test_mi_sla_report.py | # -*- coding: utf-8 -*-
from contextlib import contextmanager
import datetime
from django.test import TestCase
from legalaid.forms import get_sla_time
import mock
from core.tests.mommy_utils import make_recipe, make_user
from cla_eventlog import event_registry
from cla_eventlog.models import Log
from reports.forms imp... | Python | 0.000001 | |
0e45b8fcf1978f560713864e18a270719d7d4872 | Make sure the handle dict values are string. Looks like dbus-python get confused if they are dbus.String. | sugar/activity/activityhandle.py | sugar/activity/activityhandle.py | # Copyright (C) 2006-2007 Red Hat, Inc.
#
# This library 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 of the License, or (at your option) any later version.
#
# This library is dis... | # Copyright (C) 2006-2007 Red Hat, Inc.
#
# This library 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 of the License, or (at your option) any later version.
#
# This library is dis... | Python | 0 |
26cbfe83f0047c8ce66a21237db8ae484736a085 | Add TensorboardLogs class for use as a proxy to tensorboard data. | helpers/tensorboard.py | helpers/tensorboard.py | import glob
import numpy as np
import os
from tensorflow.tensorboard.backend.event_processing.event_accumulator import EventAccumulator
from . import get_first_existing_path, get_nth_matching_path
from ..experiments import Experiment
class TensorboardLogs(object):
def __init__(self, path):
self.path = pat... | Python | 0 | |
c184e79b91a63299c249e207dba1e8cd95a8e5d0 | Add fpocket (#12675) | var/spack/repos/builtin/packages/fpocket/package.py | var/spack/repos/builtin/packages/fpocket/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 Fpocket(MakefilePackage):
"""fpocket is a very fast open source protein pocket detection a... | Python | 0 | |
fb6eee18b2bf48dd0063623515ced00e980bdf10 | Add a few tests for docparse. | nipype/utils/tests/test_docparse.py | nipype/utils/tests/test_docparse.py | from nipype.testing import *
from nipype.utils.docparse import reverse_opt_map, build_doc
class Foo(object):
opt_map = {'outline': '-o', 'fun': '-f %.2f', 'flags': '%s'}
foo_doc = """Usage: foo infile outfile [opts]
Bunch of options:
-o something about an outline
-f <f> intensity of fun factor
O... | Python | 0.999642 | |
e71742bc0fc09ebf37532b92458670a4efe8926b | Add setup file | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='django-device-notifications',
version='0.0.1',
description='Generic library for APN & GCM notifications',
author='Johann Heller',
author_email='johann@rover.com',
url='https://github.com/roverdotcom/django-device-notifications',
packa... | Python | 0 | |
ec54935e169019067f2179a92d0f6e833f133bc9 | add a DataContainer implemented as a subclass of dict | simphony/core/data_container.py | simphony/core/data_container.py | from collections import Mapping
from simphony.core.cuba import CUBA
_ERROR_MESSAGE = "Keys {!r} are not in the approved CUBA keywords"
_CUBA_KEYS = set(CUBA)
class DataContainer(dict):
""" A DataContainer instance
The DataContainer object is implemented as a python dictionary whose keys
are restricted ... | Python | 0 | |
4912bac4ab534ca942393c36f71dd7df4182eb94 | add test_dot.py | sympy/printing/tests/test_dot.py | sympy/printing/tests/test_dot.py | from sympy.printing.dot import (purestr, styleof, attrprint, dotnode,
dotedges, dotprint)
from sympy import Symbol, Integer, Basic, Expr
from sympy.abc import x
def test_purestr():
assert purestr(Symbol('x')) == "Symbol(x)"
assert purestr(Basic(1, 2)) == "Basic(1, 2)"
def test_styleof():
styles =... | Python | 0.00008 | |
4567a9810b8c9abdb450a442c892dbdb4eecf0e0 | Add test.py to test gsutil in pantheon | vm_server/accept/test.py | vm_server/accept/test.py | from google.cloud import storage
bucket_name = "automation-interns"
destination_file_name = ("./text.txt")
source_blob_name = "test/text_file.txt"
storage_client = storage.Client()
bucket = storage_client.bucket(bucket_name)
blob = bucket.blob(source_blob_name)
blob.download_to_filename(destination_file_name) | Python | 0.000001 | |
a43acda7271c3fc48a82552721aec1332e9892d6 | Create OpticalDensityInv.py | OpticalDensityInv.py | OpticalDensityInv.py | import numpy
def OpticalDensityInv( I ):
'''
Transforms input RGB image "I" into optical density space for color deconvolution.
*Inputs:
I (rgbimage) - a floating-point image of optical density values obtained
from OpticalDensityFwd.
*Outputs:
Out (rgbimage) - a ... | Python | 0.000001 | |
fa049b79c24f8213fa9335a31a34c354faf67459 | Add exmaple about proving equivalence of exprs | src/examples/python/proving_equivalence.py | src/examples/python/proving_equivalence.py | #!/usr/bin/env python
## -*- coding: utf-8 -*-
##
## $ python ./proving equivalence.py
## True
## True
## True
## True
## True
## True
## True
## True
## True
## True
## True
## True
## True
## True
##
import sys
from triton import *
def prove(ctx, n):
ast = ctx.getAstContext()
if ctx.isSat(ast.lnot(n)) == T... | Python | 0.000119 | |
3c997e3a9eb92c3053c521f6c2fff6cfdf99c126 | add setup.py | setup.py | setup.py | # noqa: D100
import os
import re
from setuptools import setup
requirements_txt = open(os.path.join(os.path.dirname(__file__), 'requirements.txt')).read()
requirements = re.findall(r'^([^\s#]+)', requirements_txt, re.M)
setup(name='assignment_dashboard',
packages=['assignment_dashboard'],
include_package_... | Python | 0.000001 | |
11cf7dd63f8fe7453057ef0846d4e645fa05f124 | Add setuptools setup.py | setup.py | setup.py | from setuptools import setup
setup(name='pybeam',
version='0.1',
description='Python module to parse Erlang BEAM files',
url='http://github.com/matwey/pybeam',
author='Matwey V. Kornilov',
author_email='matwey.kornilov@gmail.com',
license='MIT',
packages=['pybeam'],
inst... | Python | 0.000001 | |
555dac76a8810cfeaae96f8de04e9eb3362a3314 | Remove old notification status column | migrations/versions/0109_rem_old_noti_status.py | migrations/versions/0109_rem_old_noti_status.py | """
Revision ID: 0109_rem_old_noti_status
Revises: 0108_change_logo_not_nullable
Create Date: 2017-07-10 14:25:15.712055
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
revision = '0109_rem_old_noti_status'
down_revision = '0108_change_logo_not_nullable'
def upgrade():... | Python | 0.000001 | |
21a67556b83b7905134439d55afe33c35e4b3422 | Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists. | migrations/versions/0246_notifications_index.py | migrations/versions/0246_notifications_index.py | """
Revision ID: 0246_notifications_index
Revises: 0245_archived_flag_jobs
Create Date: 2018-12-12 12:00:09.770775
"""
from alembic import op
revision = '0246_notifications_index'
down_revision = '0245_archived_flag_jobs'
def upgrade():
conn = op.get_bind()
conn.execute(
"CREATE INDEX IF NOT EXISTS... | Python | 0 | |
1337c19df3ccecf5739c58a719742d970c7faa14 | Calculate LDA | build_topics.py | build_topics.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
import logging
import os
from gensim import corpora
from gensim.models.ldamulticore import LdaMulticore
from common import SimpleTokenizer
def parse_args():
description = '''
Finds topics from reviews
'''
parser = argparse.A... | Python | 0.998653 | |
86b2f32bd212a14e904b9823fbf543b321f46ca7 | Add very basic setup.py | setup.py | setup.py | from distutils.core import setup
setup(name='astcheck',
version='0.1',
py_modules=['astcheck'],
) | Python | 0.000001 | |
523a6fe005149bf0a8a91cd81c9f692f5aaaf1c9 | fix description | farmer/models.py | farmer/models.py | #coding=utf8
import os
import sys
import time
from psutil import Process
from datetime import datetime
from threading import Thread
from ansible.runner import Runner
from ansible.inventory import Inventory
from django.db import models
from farmer.settings import WORKER_TIMEOUT, ANSIBLE_FORKS
class Task(models.Mod... | #coding=utf8
import os
import sys
import time
from psutil import Process
from datetime import datetime
from threading import Thread
from ansible.runner import Runner
from ansible.inventory import Inventory
from django.db import models
from farmer.settings import WORKER_TIMEOUT, ANSIBLE_FORKS
class Task(models.Mod... | Python | 0.020455 |
5acc7d50cbe199af49aece28b95ea97484ae31c7 | Add solution class for Ghia et al. (1982) | snake/solutions/ghiaEtAl1982.py | snake/solutions/ghiaEtAl1982.py | """
Implementation of the class `GhiaEtAl1982` that reads the centerline velocities
reported in Ghia et al. (1982).
_References:_
* Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982).
High-Re solutions for incompressible flow using the Navier-Stokes equations
and a multigrid method.
Journal of computational ph... | Python | 0 | |
a893a8f9375164cbbec4e276ae73f181f74fd9ae | create image,py | src/image.py | src/image.py | #
# image.py
# Created by pira on 2017/07/28.
#
#coding: utf-8 | Python | 0.000001 | |
14068a2e3ca445c02895aed38420baf846338aae | Add smile detection example script. | scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py | scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py | # Simle detection using Haar Cascade + CNN.
import sensor, time, image, os, nn
sensor.reset() # Reset and initialize the sensor.
sensor.set_contrast(2)
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565
sensor.set_framesize(sensor.QQVGA) # Set frame size to QVGA (320x240... | Python | 0 | |
b31e7a3471daefb79b1d63a433c480cf51b75745 | Create __init__.py | FireModules/FileDownloads/AccountBruting/__init__.py | FireModules/FileDownloads/AccountBruting/__init__.py | Python | 0.000429 | ||
11504d8087e963e4683d5dd3a0101772832e0c81 | Increase unit test coverage for Package Base API. | murano/tests/unit/packages/test_package_base.py | murano/tests/unit/packages/test_package_base.py | # Copyright (c) 2016 AT&T Corp
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python | 0.000003 | |
7a4df9d8c385ed53e29e5171c115939920a271b3 | Add a setup.py script | setup.py | setup.py | # Use the setuptools package if it is available. It's preferred
# because it creates an exe file on Windows for Python scripts.
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(name='csv_util',
entr... | Python | 0.000001 | |
1e7548a5b237f18c3bf5918a2254d04125492372 | Add setup script | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='rapidtest',
version='0.1',
author='Simon Zhang',
license='MIT',
packages=find_packages(),
install_requires=[])
| Python | 0.000001 | |
61fcca809b31372bb5e793359df243cff5ee23cf | Add the setup.py file | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='fedmsg_fasclient',
version='0.1',
description='A fedmsg consumer that runs the fasClient based on fedmsg FAS messages',
license="LGPLv2+",
author='Janez Nemanič, Ralph Bean and Pierre-Yves Chibon',
author_email='admin@fedoraproje... | Python | 0.000002 | |
139123ddb81eec12d0f932ff6ff73aadb4b418cc | Add decorator to make a Node class from a regular function | ocradmin/lib/nodetree/decorators.py | ocradmin/lib/nodetree/decorators.py | """
Nodetree decorators.
"""
import inspect
import textwrap
import node
def underscore_to_camelcase(value):
def camelcase():
yield str.lower
while True:
yield str.capitalize
c = camelcase()
return "".join(c.next()(x) if x else '_' for x in value.split("_"))
def upper_camelca... | Python | 0.000001 | |
fe7f07cbd9ff9844efa2b191a900f6efb9de576e | add db model file | model/db.py | model/db.py | # db model - all db handlers
| Python | 0 | |
8ec524a7a64c55f0759e18ea4b70c63c9c83f99a | Add admin for the various models | pombola/interests_register/admin.py | pombola/interests_register/admin.py | from django.contrib import admin
from . import models
class CategoryAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ["name"]}
list_display = ['slug', 'name', 'sort_order']
search_fields = ['name']
class ReleaseAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ["name"]}
list_displa... | Python | 0 | |
a4f49b988a10afc160c217d32da46ea854059e8c | Add migration file | ureport/polls/migrations/0060_populate_category_displayed.py | ureport/polls/migrations/0060_populate_category_displayed.py | # Generated by Django 2.2.10 on 2020-05-05 15:01
from django.db import migrations
def noop(apps, schema_editor): # pragma: no cover
pass
def populate_category_displayed(apps, schema_editor): # pragma: no cover
PollResponseCategory = apps.get_model("polls", "PollResponseCategory")
updated = 0
fo... | Python | 0.000001 | |
b7cd3081585c0a4695db4f85b7db8e346a525e23 | add to pypi | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="libraw.py",
version="1.0",
description="python bindings using ctypes for libraw",
url="https://github.com/paroj/libraw.py",
author="Pavel Rojtberg",
license="LGPLv2",
classifiers=[
'Programming Language :: Python :: 2.7',
... | Python | 0 | |
88cb2155d55100d9b00dca1ecf4f9a01dec7c3f5 | Add missing 'import os' for integrationtest/vm/basic/suite_setup.py | integrationtest/vm/basic/suite_setup.py | integrationtest/vm/basic/suite_setup.py | '''
@author: Frank
'''
import os
import zstackwoodpecker.setup_actions as setup_actions
import zstackwoodpecker.operations.deploy_operations as deploy_operations
import zstackwoodpecker.operations.config_operations as config_operations
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.tes... | '''
@author: Frank
'''
import zstackwoodpecker.setup_actions as setup_actions
import zstackwoodpecker.operations.deploy_operations as deploy_operations
import zstackwoodpecker.operations.config_operations as config_operations
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_util as t... | Python | 0.000011 |
f0205534cd1c812db94921b29ebef4207039e56b | work in progress (kind of) | hamster_sun.py | hamster_sun.py | #!/usr/bin/env python
# - coding: utf-8 -
# Copyright (C) 2010 Toms Bauģis <toms.baugis at gmail.com>
"""Base template"""
import gtk
from lib import graphics
import math
import hamster.client
import datetime as dt
from collections import defaultdict
class Scene(graphics.Scene):
def __init__(self):
graph... | Python | 0 | |
e3cbc79cc60e21978fe682b73413e9de19b71543 | add a print hello world function | helloAlyssa.py | helloAlyssa.py | #This is my hello world program
print ('Hello World')
| Python | 0.999999 | |
9339307b6bd42ad014e528d337fc9f195c632245 | Add tick class | zaifbot/exchange/tick.py | zaifbot/exchange/tick.py | class Tick:
def __init__(self, currency_pair):
self.size = currency_pair.info['aux_unit_step']
self._decimal_digits = currency_pair.info['aux_unit_point']
def truncate_price(self, price):
remainder = price % self.size
truncated_price = price - remainder
if self._decimal_... | Python | 0.000001 | |
d9d84083a488ad1b4643298d7a75b54b4e0e34be | add OptionChainConsistencyRegressionAlgorithm | Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py | Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | using System;
namespace QuantConnect.Algorithm.Python
{
public class OptionChainConsistencyRegressionAlgorithm
{
public OptionChainConsistencyRegressionAlgorithm()
{
}
}
}
| Python | 0.000001 |
aafb77596ae0cb6c27b2564434367d2b4d5debd1 | Add tests | Orange/widgets/visualize/tests/test_owscatterplot.py | Orange/widgets/visualize/tests/test_owscatterplot.py | import numpy as np
from Orange.data import Table
from Orange.widgets.tests.base import WidgetTest
from Orange.widgets.visualize.owscatterplot import OWScatterPlot
class TestOWScatterPlot(WidgetTest):
def setUp(self):
self.widget = self.create_widget(OWScatterPlot)
self.data = Table("iris")
d... | Python | 0 | |
47ad7f4d3b69315e25ae96099fe73b4d9cd7666e | Use file extension to select config file parser | dotbot/config.py | dotbot/config.py | import yaml
import json
import os.path
from .util import string
class ConfigReader(object):
def __init__(self, config_file_path):
self._config = self._read(config_file_path)
def _read(self, config_file_path):
try:
_, ext = os.path.splitext(config_file_path)
with open(co... | import yaml
import json
from .util import string
class ConfigReader(object):
def __init__(self, config_file_path):
self._config = self._read(config_file_path)
def _read(self, config_file_path):
try:
with open(config_file_path) as fin:
try:
data =... | Python | 0 |
fec74a5401f925755484955a1b38dd3044824eb3 | Create npy2ckpt.py | npy2ckpt.py | npy2ckpt.py | """Conversion of the .npy weights into the .ckpt ones.
This script converts the weights of the DeepLab-ResNet model
from the numpy format into the TensorFlow one.
"""
from __future__ import print_function
import argparse
import os
import tensorflow as tf
import numpy as np
from deeplab_resnet import DeepLabResNetM... | Python | 0.000006 | |
8b5bf433b304895f04813c64d556316c48c046fe | add setup.py for distribute | setup.py | setup.py | #!/usr/bin/env python
import os, os.path
from distutils.core import setup, Extension
import distutils.msvccompiler
source_files = ["Engine.cpp", "Wrapper.cpp", "PyV8.cpp"]
macros = [("BOOST_PYTHON_STATIC_LIB", None)]
third_party_libraries = ["python", "boost", "v8"]
include_dirs = os.environ["INCLUDE"].spl... | Python | 0.000001 | |
e24a354ae65db5874f51305b839a7ce553d44d78 | Build Sticks | GeoHat_V10/BuildSticks.py | GeoHat_V10/BuildSticks.py | #---------------------------------------------------------------------------------
# BuildSticks.py
#
# Description: Create sticks (lines between connected patches, with appropriate weights),
# from edge list csv file
#
# Requires: NetworkX to be stored in script folder (or installed)
# Create Edge List tool must be ru... | Python | 0.000019 | |
56915ed7d290fff6e37859181781687590a2e974 | Remove early_stopping.py from estimator/contrib in favor of estimator/python/estimator/early_stopping.py. And the test. | tensorflow/contrib/estimator/python/estimator/early_stopping.py | tensorflow/contrib/estimator/python/estimator/early_stopping.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000131 |
1ee1d0daab4b8e123bc04996019fb12cc65b8888 | Add tISM SDB module (#36957) | salt/sdb/tism.py | salt/sdb/tism.py | # -*- coding: utf-8 -*-
'''
tISM - the Immutalbe Secrets Manager SDB Module
:maintainer: tISM
:maturity: New
:platform: all
.. versionadded:: TBD
This module will decrypt PGP encrypted secrets against a tISM server.
.. code::
sdb://<profile>/<encrypted secret>
sdb://tism/hQEMAzJ+GfdAB3KqAQf9E3cyv... | Python | 0 | |
8dad8cf8c83eba037b29d3243b29b985dc4004a1 | add setup.py | setup.py | setup.py | #!/usr/bin/python
from distutils.core import setup
setup(
name='telepathy-python',
version='0.0.1',
packages=['telepathy'],
)
| Python | 0 | |
b5c2986ccf3c70b9cb52d0374c53bc8232719554 | Add dbm_metrics.py script where the AIS method will be stored | pylearn2/scripts/dbm/dbm_metrics.py | pylearn2/scripts/dbm/dbm_metrics.py | #!/usr/bin/env python
import argparse
if __name__ == '__main__':
# Argument parsing
parser = argparse.ArgumentParser()
parser.add_argument("metric", help="the desired metric",
choices=["ais"])
parser.add_argument("model_path", help="path to the pickled DBM model")
args = par... | Python | 0 | |
a8b079b8be1e9559770dd0f701385b2361158e24 | Add tests_require to setup.py | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
import io
import os
import sys
if sys.version_info < (2, 6):
raise ImportError("smart_open requires python >= 2.6")
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
import io
import os
import sys
if sys.version_info < (2, 6):
raise ImportError("smart_open requires python >= 2.6")
... | Python | 0.000001 |
c230fc69e2509c79190e53589457f161accd1626 | Change long_description in setup.py. | setup.py | setup.py | import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('mycli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'CLI for MySQL Database. With auto-completi... | import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('mycli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'CLI for MySQL Database. With auto-completi... | Python | 0 |
2a331f0165b2e3874243fcfecc3e3deab2760ff4 | Add python setup filie | setup.py | setup.py | from setuptools import setup
setup(name='bitevery',
version='0.0.1.b2',
description='BitEvery Python API',
url='https://www.bitevery.com',
author='BitEvery',
author_email='support@bitevery.com',
license='MIT',
packages=['bitevery'],
zip_safe=False) | Python | 0.000002 | |
57bfd23957bdd535b5ae21ed1df3ff25dd75a8bd | Add setup.py | setup.py | setup.py | from setuptools import setup
setup(
name='pirx',
version='0.1',
author='Piotr Wasilewski',
author_email='wasilewski.piotrek@gmail.com',
description='Django settings builder',
license='MIT',
keywords='django settings build builder',
url='https://github.com/piotrekw/pirx',
scripts=['s... | Python | 0.000001 | |
76a8834243cc70f3065b686dd09004f1dc3ffdb0 | Create rapideye_remover_bordas_catalogo.py | rapideye_remover_bordas_catalogo.py | rapideye_remover_bordas_catalogo.py | from osgeo import ogr
import os
from osgeo import osr
from qgis.core import *
shapefile = "C:/Users/pedro.mendes/Desktop/Brasil_00_2016.shp"
driver = ogr.GetDriverByName("ESRI Shapefile")
dataSource = driver.Open(shapefile, 0)
layer = dataSource.GetLayer()
proj=layer.GetSpatialRef()
outputMergefn = "C:/Users/pedro.... | Python | 0.000038 | |
737dadd2e447c9f03de80ea808e137dcc1206c9b | Create Nvidia_GPU_Temperature.py | Nvidia_GPU_Temperature.py | Nvidia_GPU_Temperature.py | import time
from BlinkyTape import BlinkyTape
import subprocess
import os
import re
#bb = BlinkyTape('/dev/tty.usbmodemfa131')
bb = BlinkyTape('COM8')
while True:
output = subprocess.check_output(["C:\\Program Files\\NVIDIA Corporation\\NVSMI\\nvidia-smi.exe", "-a"], shell=True)
#os.popen('C:\\Program Files\... | Python | 0.000028 | |
b39af3af2104875919577f769701e7bde73967fd | clean file initialized | genetic_music.py | genetic_music.py | print('hola chio') | Python | 0.000003 | |
fbc780c7beb94d73b2a4ea110e733f8c87763741 | Add location name lookup for ajax_select. | geoip/lookups.py | geoip/lookups.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
## Author: Orcun Avsar <orc.avs@gmail.com>
##
## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License as
## pub... | Python | 0 | |
af3ba846a8074132c64568c420ecb9b6ade9c6ea | Work on defining RegEx to find and format molecular geometries in Gaussian output files. | geomRegexTest.py | geomRegexTest.py | __author__ = 'Thomas Heavey'
import re
filename = "testg.out"
def findgeoms(filename):
"""A function that takes a file name and returns a list of
geometries."""
relevantelem = [1,3,4,5]
xyzformat = '{:>2} {: f} {: f} {: f}'
geomregex = re.compile(
r'(?:Standard orientation)' # no... | Python | 0 | |
df9a6ab91eedfe91343ceb103156fe08cd965614 | test script form new Keras 2x API model config | app/backend-test/keras_2x_api/run01_print_keras_model_json.py | app/backend-test/keras_2x_api/run01_print_keras_model_json.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'ar'
if __name__ == '__main__':
pass | Python | 0 | |
1498e786201c1c1e2127da7d23db142559ad68a8 | Add support for Assembla | services/assembla.py | services/assembla.py | import foauth.providers
class Assembla(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.assembla.com/'
docs_url = 'http://api-doc.assembla.com/content/api_reference.html'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://api.asse... | Python | 0 | |
10c7e718488a6daad5bcea97e00aece24179168e | Add regression test for bug #1937084 | nova/tests/functional/regressions/test_bug_1937084.py | nova/tests/functional/regressions/test_bug_1937084.py | # Copyright 2021, Red Hat, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | Python | 0.000008 | |
e67abde6228feaa231b2b3bfc97d6ca1f2cf8276 | Use match argument in calls to pytest.raises when testing pin | tests/unit_tests/test_pin.py | tests/unit_tests/test_pin.py | """
Tests for constructing Pin universes
"""
import numpy
import pytest
import openmc
from openmc.model import Pin
@pytest.fixture
def pin_mats():
fuel = openmc.Material(name="UO2")
clad = openmc.Material(name="zirc")
water = openmc.Material(name="water")
return fuel, clad, water
@pytest.fixture
d... | """
Tests for constructing Pin universes
"""
import numpy
import pytest
import openmc
from openmc.model import Pin
@pytest.fixture
def pin_mats():
fuel = openmc.Material(name="UO2")
clad = openmc.Material(name="zirc")
water = openmc.Material(name="water")
return fuel, clad, water
@pytest.fixture
d... | Python | 0 |
0fc46c92f8682879591d9fc473be34116c9106be | add migration | custom/ilsgateway/migrations/0010_auto_20160830_1923.py | custom/ilsgateway/migrations/0010_auto_20160830_1923.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('ilsgateway', '0009_auto_20160413_1311'),
]
operations = [
migrations.AlterField(
model_name='del... | Python | 0.000001 | |
fdd9ac1da19d37ca482d770bb0c8f159fb7d4752 | optimize to not instantiate Fortune. | flask/app.py | flask/app.py | #!/usr/bin/env python
from flask import Flask, jsonify, request, render_template
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from random import randint
from operator import attrgetter
try:
import MySQLdb
mysql_schema = "mysql:"
except ImportError:
mysql_schema = "mysql+... | #!/usr/bin/env python
from flask import Flask, jsonify, request, render_template
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from random import randint
from operator import attrgetter
try:
import MySQLdb
mysql_schema = "mysql:"
except ImportError:
mysql_schema = "mysql+... | Python | 0 |
3dfa8bb2d428f86c5156a974e84e0756cc6d792f | Create headache.py | headache.py | headache.py | # This is... Headache! One more very simple Brainfuck interpreter! #
# by Sidnei Diniz - sidneidiniz@gmail.com - http://bitworm.com.br #
# GitHub: http://github.com/scdiniz/headache
# Date: 29-12-2015 #
import sys
# Interpreter kernel
class Headache():
# Constructor
def __init__(self):
self.cells = bytearray([0] *... | Python | 0.001409 | |
c2b69a51faac56689edc88e747a00b60cf08cc04 | Add default ordering of progress outcome groups | dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py | dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py | # Generated by Django 2.1.5 on 2019-07-31 07:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('poet', '0002_progressoutcomegroup'),
]
operations = [
migrations.AlterModelOptions(
name='progressoutcomegroup',
options={'o... | Python | 0 | |
32a79573b38c6d2ea7f5b81363610a5d9332ed4e | Add python script to parse JSON output | src/main/resources/jsonformat.py | src/main/resources/jsonformat.py | #!/usr/bin/python2.7
import json
import socket
import sys
def readOutput(host, port):
data = None
s = None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, int(port)))
except socket.error as msg:
s = None
print msg
if s is None:
return None
try:
data = s.recv(1024)
except ... | Python | 0.000006 | |
699469342179fdc4319b5f39ea201015860ef09d | Add migration for CI fix | infrastructure/migrations/0020_auto_20210922_0929.py | infrastructure/migrations/0020_auto_20210922_0929.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-09-22 07:29
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('infrastructure', '0019_project_latest_implementation_year'... | Python | 0 | |
b19ba3f63240db6c710e8ef7388d7a5b9a2834c2 | bring back tecplot reader | tests/problems/tecplot_reader.py | tests/problems/tecplot_reader.py | # -*- coding: utf-8 -*-
#
'''
Read Tecplot data.
'''
import numpy
import re
def read(filename):
# Read the meta data.
# It is principally structured like
#
# NAME = content
#
# Items aren't separated by anything else than whitespace. Hence, the only
# character that provides structure h... | Python | 0 | |
2ead746f0e697276e7753c735befbd1a14feba6d | Restrict parquet many cols test to one test dimension. | tests/query_test/test_parquet.py | tests/query_test/test_parquet.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
# Tests specific to parquet.
class TestParquetManyColumns(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'functional-q... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
# Tests specific to parquet.
class TestParquetManyColumns(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'functional-q... | Python | 0.999962 |
09d815c6b53c74ae9a2f3831a2eec9c2b266eca7 | add the prototype. | simple_xls_to_xml.py | simple_xls_to_xml.py | # encoding:utf-8
import codecs
import xlrd
import xml.dom.minidom
filter_words = None
def xlsRead():
global filter_words
data = xlrd.open_workbook("filter.xlsx")
table = data.sheets()[0] # 获取第一个sheet
filter_words = table.col_values(0)
def createXML():
if filter_words is None:
... | Python | 0 | |
6a268c69fced2a5b9e97086fa2a9089837376db4 | add subfolder | keras/metrics/empty.py | keras/metrics/empty.py | #
| Python | 0.000005 | |
9524b824e5edb6e88c776d3420b618b6a2d1b7fa | Add files via upload | src/graph_realtimeEdit.py | src/graph_realtimeEdit.py | from pylsl import StreamInlet, resolve_byprop, local_clock, TimeoutError
from pylsl import StreamInfo,StreamOutlet
from random import random as rand
import collections
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui,QtCore
import time
import signal, sys, os, time, csv
import serial
i... | Python | 0 | |
1d1712259a1e6e23b7a6a5541f70573b05619e99 | Create stock.py | stock.py | stock.py | from openerp.osv import fields, osv
class stock_move(osv.Model):
_name = 'stock.move'
_inherit = 'stock.move'
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
loc_dest_id=False, partner_id=False):
res_prod = super(stock_move, self).onchange_produ... | Python | 0.000001 | |
ed09ca11fc3586c9782103269b12240ed6b27911 | complete and tested juliaset, HW4 | juliaset.py | juliaset.py | class JuliaSet(object):
def set_plane(self, _d):
self._d=_d
self._complexplane=[]
x=-2
y=-2
while x<=2:
while y<=2:
self._complexplane.append(complex(x,y))
y+=_d
x+=_d
y=-2
return self._complexplane
... | Python | 0 | |
8282cca05b784bb0966ba8246900627286c5d98c | Use invoke as build tool | tasks.py | tasks.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from os.path import join, abspath, dirname, exists
from invoke import run, task
ROOT = abspath(join(dirname(__file__)))
I18N_DOMAIN = 'udata-admin'
def green(text):
return '\033[1;32m{0}\033[0;m'.format(text)
def red(text):
... | Python | 0.000001 | |
c63144242d9cf2ecf02d58eb9a93cfe426acc6dc | Add script to send unregister user emails | scripts/send_preprint_unreg_contributor_emails.py | scripts/send_preprint_unreg_contributor_emails.py | # -*- coding: utf-8 -*-
"""Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that
date which caused unregistered user claim emails to not be sent. The regression was fixed on 2017-05-05. This
sends the emails that should have been sent during that time period.
NOTE: Th... | Python | 0 | |
fcac525d3f974c7d4a1e90c1adc444c6d6e72018 | Add sed executor #123 | executors/SED.py | executors/SED.py |
from .base_executor import ScriptExecutor
from judgeenv import env
class Executor(ScriptExecutor):
ext = '.sed'
name = 'SED'
command = env['runtime'].get('sed')
test_program = '''s/.*/echo: Hello, World!/
q'''
fs = ['.*\.(so|sed)', '/dev/urandom$', '/proc/self/maps$', '/proc/filesystems$', '/+lib... | Python | 0.000001 | |
1f52ef331a3529fe0f8b1ad5528d4d5cdd5d0b7a | add mnist deep auto like hinton's | rbm/autoencoder/mnist_deep_auto.py | rbm/autoencoder/mnist_deep_auto.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Author : @Jason_wbw
"""
This program pertrains a deep autoencoder for MNIST dataset
You cat set the maxinum number of epochs for pertraining each layer
and you can set the architectrue of the multiplayer nets.
"""
from converter import Converter
from rbm import R... | Python | 0 | |
84cf95cde942d91f53959fea4151847902a69d14 | Add a cleanup script. | rl-rc-car/cleanup.py | rl-rc-car/cleanup.py | from rccar import RCCar
car = RCCar()
car.cleanup_gpio()
| Python | 0 | |
b2741a8316ea1ffbf9e88a9fb883ef9e2507be42 | Upgrade libchromiuncontent to 3245ef8 | script/lib/config.py | script/lib/config.py | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '3245ef802fbf546f1a1d206990aa9d18be6bfbfe'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'f0c3a4546d8e75689c16b9aee1052a72951e58de'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | Python | 0 |
a03eaddd3e950f628320d1b5b007d87b11906844 | add saveload.py (with error) | converter/saveload.py | converter/saveload.py | #!/usr/local/bin/python
# -*- encoding:utf-8
import sys
import subprocess as sp
import numpy
def load_mp3(filename):
command = [ 'ffmpeg',
'-i', sys.argv[1],
'-f', 's16le',
'-acodec', 'pcm_s16le',
'-ar', '44100', # ouput will have 44100 Hz
'-ac', '2', # stereo (set to '1' for mono)
'-']
pipe = sp.Popen(comman... | Python | 0 | |
4ab3e59b7e9fe339c96042107c3f59bdf1afc46a | add instagram compliance fix | requests_oauthlib/compliance_fixes/instagram.py | requests_oauthlib/compliance_fixes/instagram.py | try:
from urlparse import urlparse, parse_qs
except ImportError:
from urllib.parse import urlparse, parse_qs
from oauthlib.common import add_params_to_uri
def instagram_compliance_fix(session):
def _non_compliant_param_name(url, headers, data):
# If the user has already specified the token, eithe... | Python | 0 | |
b9b34eb2bca76e76ba4f7399b12daa27ed2ab7f4 | Create uvSetTgl.py | af_scripts/uv/uvSetTgl.py | af_scripts/uv/uvSetTgl.py | # This script will switch UV Set between "map1" and "atlasmap".
# Useage:
# Select meshes and run this script
import maya.cmds as cmds
def uvsetTgl():
shape_node = cmds.ls(sl=True, fl=True, dag=True, type='shape')
current_uvset = cmds.polyUVSet(shape_node[0],q=True, currentUVSet=True)
for shape in shap... | Python | 0.000002 | |
a9b45bf50dae68c9a801ec7942c4f4cc38fa08f5 | Create GenerateUnifiedReports.py | GenerateUnifiedReports.py | GenerateUnifiedReports.py | import argparse
# Read options on which PayPal records to process (year / month) or run on discovery to find the files or discover new files and generate new unified files but preserve the old ones (default)
# load all the Website records based on discovery
# load the PayPal monthly report(s)
# reconsile each record... | Python | 0 | |
24f665e02912a3f79eec9776c86863a9e172d94a | Create HR_pythonPrintFunction.py | HR_pythonPrintFunction.py | HR_pythonPrintFunction.py | import sys
if __name__ == '__main__':
n = int(input())
# imported sys for a elegant solution, Python 3
# * before range means taking everything 0 or more
print(*range(1,n+1), sep='',end='\n', file= sys.stdout)
| Python | 0.000991 | |
ce552a70f77934d4b76b5710b76b22967484d17e | Create folderwatcher.py | folderwatcher.py | folderwatcher.py | import os
import time
import datetime
outold = []
try:
while True:
out = os.listdir()
if outold != out:
ldate= datetime.datetime.now().strftime('%I:%M:%S')
for x in outold:
if x not in out:
print ('Moved: '+ldate+' '+x)
for x in out:
if x not in outold:
print ('New: '+ldate+' '+... | Python | 0.000001 | |
ee92a9d89ce2aa9ccbd8ad3de664befeb55ae892 | add API tests for data sources | tempest/api/data_processing/test_data_sources.py | tempest/api/data_processing/test_data_sources.py | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Python | 0.000001 | |
41fc87e402aa2864c22adb5c09a713c2b0eacb72 | Add replace test that shutdowns a node and replaces a pod (#806) | frameworks/cassandra/tests/test_recovery_shutdown.py | frameworks/cassandra/tests/test_recovery_shutdown.py | import pytest
from tests.config import *
import sdk_install as install
import sdk_tasks as tasks
import sdk_utils as utils
import json
import shakedown
import time
import sdk_cmd as cmd
def setup_module(module):
install.uninstall(PACKAGE_NAME)
utils.gc_frameworks()
# check_suppression=False due to https:... | Python | 0 | |
c11e74d4210c6de8917dfde6cb33d75f6b1b835a | add migration that solves BigAutoField problem | hordak/migrations/0032_check_account_type_big_int.py | hordak/migrations/0032_check_account_type_big_int.py | # Generated by Django 4.0.7 on 2022-09-18 10:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("hordak", "0031_alter_account_currencies"),
]
operations = [
migrations.RunSQL(
"""
CREATE OR REPLACE FUNCTION check_account_... | Python | 0 | |
d3a11021f8be8e93c5c067b5fcf59bc4f9f92cea | add computation of sts for ISUSM | scripts/dbutil/compute_isusm_sts.py | scripts/dbutil/compute_isusm_sts.py | """
Figure out when the ISUSM data started...
"""
import psycopg2
import network
import sys
import datetime
import pytz
basets = datetime.datetime.now()
basets = basets.replace(tzinfo=pytz.timezone("America/Chicago"))
isuag = psycopg2.connect(database='isuag', host='iemdb')
icursor = isuag.cursor()
mesosite = psyco... | Python | 0.000376 | |
133a4311fdb3c96edeb927250e549fcaf4080696 | add silly module | modules/silly.py | modules/silly.py | # -*- coding: ISO-8859-15 -*-
from core.Uusipuu import UusipuuModule
import random, time
from core.tdiff import *
class Module(UusipuuModule):
def cmd_noppa(self, user, target, params):
self.log('ok noppaa heitetn!!')
self.chanmsg('%s!' % random.choice((
'ykknen',
'kak... | Python | 0.000001 | |
f340bde6e047d86171385b90a023ac01e8914d0c | Add simple neural network (#6452) | neural_network/simple_neural_network.py | neural_network/simple_neural_network.py | """
Forward propagation explanation:
https://towardsdatascience.com/forward-propagation-in-neural-networks-simplified-math-and-code-version-bbcfef6f9250
"""
import math
import random
# Sigmoid
def sigmoid_function(value: float, deriv: bool = False) -> float:
"""Return the sigmoid function of a float.
>>> si... | Python | 0 | |
4b07d7cdd791a03ef4c7ec7e6e4188b625ffb8dc | Add migration | src/clarityv2/portfolio/migrations/0002_auto_20180228_2055.py | src/clarityv2/portfolio/migrations/0002_auto_20180228_2055.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-02-28 18:55
from __future__ import unicode_literals
import ckeditor.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0001_initial'),
]
operations = [
migrations.Alt... | Python | 0.000002 | |
0bc48c7131e0589e7f2980e16bce6c2dfcdbafda | Fix usage message from tag:file to tag=file | python/utils.py | python/utils.py | '''
This file is part of the PyPhantomJS project.
Copyright (C) 2011 James Roe <roejames12@hotmail.com>
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the F... | '''
This file is part of the PyPhantomJS project.
Copyright (C) 2011 James Roe <roejames12@hotmail.com>
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the F... | Python | 0.000623 |
4065a08ea401e0d95e8d40d9d735edf92edda861 | Add unit tests on cache handler | oslo_policy/tests/test_cache_handler.py | oslo_policy/tests/test_cache_handler.py | # Copyright (c) 2020 OpenStack Foundation.
# All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | Python | 0.000002 | |
bcc7dc9bc014dfd17db6fced18de47535a003b60 | add import JSON script for propostions #2 | scripts/import_proposition_json.py | scripts/import_proposition_json.py | import argparse
import json
import logging
import sqlalchemy.orm
import transaction
from eliot import log_call, start_task
logging.basicConfig(level=logging.INFO)
from ekklesia_portal.app import make_wsgi_app
@log_call
def load_proposition_json_file(filepath):
with open(filepath) as f:
json_data = json.... | Python | 0 | |
09a413c3d02d177a85872c7957591f18489a9ed0 | Add test for linearmodel functions | seaborn/tests/test_linearmodels.py | seaborn/tests/test_linearmodels.py | import numpy as np
import statsmodels.api as sm
import nose.tools as nt
import numpy.testing as npt
from .. import linearmodels as lm
rs = np.random.RandomState(0)
class TestRegPlot(object):
"""Test internal functions that perform computation for regplot()."""
x = rs.randn(50)
x_discrete = np.repeat([0... | Python | 0.000002 | |
b3a7bca64b256dcc09b8ad49a7491e7a3717e74f | disable automatic deployment of images (needs verification) | planetstack/observer/steps/sync_image_deployments.py | planetstack/observer/steps/sync_image_deployments.py | import os
import base64
from collections import defaultdict
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.deployment import Deployment
from core.models.image import Image, ImageDeployments
from util.logger import Logger,... | import os
import base64
from collections import defaultdict
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.deployment import Deployment
from core.models.image import Image, ImageDeployments
from util.logger import Logger,... | Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.